:root {
  --brand:#2d6bff;
  --brand-dark:#1f3fa9;
  --brand-light:#edf2ff;
  --bg:#f5f7fb;
  --card:#ffffff;
  --text:#151a2a;
  --text-muted:#5d6477;
  --border:#d9dff0;
  --code-bg:#0f172a;
  --code-text:#e2e8f0;
  --accent:#22c55e;
  --danger:#ef4444;
  --shadow:0 24px 48px rgba(23,40,90,0.08);
}

*, *::before, *::after {
  box-sizing:border-box;
}

body {
  margin:0;
  font-family:"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:var(--bg);
  color:var(--text);
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

a {
  color:inherit;
  text-decoration:none;
}

img {
  max-width:100%;
  display:block;
}

code {
  font-family:"Fira Code", "Source Code Pro", monospace;
}

.container {
  width:min(1180px, calc(100% - 32px));
  margin:0 auto;
}

header {
  background:rgba(255,255,255,0.85);
  backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(13,23,55,0.08);
  position:sticky;
  top:0;
  z-index:40;
}

.header-bar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px 0;
  gap:16px;
}

.brand {
  display:flex;
  align-items:center;
  gap:12px;
  color:var(--brand-dark);
}

.brand img {
  width:44px;
  height:44px;
  object-fit:contain;
}

.brand-text {
  display:flex;
  flex-direction:column;
  gap:2px;
  line-height:1.1;
}

.brand-text strong {
  font-size:18px;
  font-weight:800;
  letter-spacing:0.2px;
}

.brand-sub {
  font-size:13px;
  font-weight:600;
  color:var(--text-muted);
  letter-spacing:0.4px;
  text-transform:uppercase;
}

.main-nav {
  display:flex;
  align-items:center;
  gap:18px;
  font-size:15px;
}

.main-nav a {
  color:var(--text-muted);
  font-weight:500;
  padding:6px 10px;
  border-radius:8px;
  transition:background .18s ease, color .18s ease;
}

.main-nav a:hover,
.main-nav a.active {
  background:var(--brand-light);
  color:var(--brand);
}

.version-pill {
  font-size:12px;
  font-weight:600;
  color:var(--brand-dark);
  background:rgba(45,107,255,0.12);
  border:1px solid rgba(45,107,255,0.2);
  padding:6px 12px;
  border-radius:999px;
}

main {
  flex:1;
  padding:40px 0 0;
}

.content {
  display:grid;
  gap:26px;
}

.chip-trail {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.anchor-nav {
  display:flex;
  align-items:center;
  gap:12px;
  padding:0 0 18px;
  margin-top:-8px;
  overflow-x:auto;
  scrollbar-width:none;
}

.anchor-nav::-webkit-scrollbar {
  display:none;
}

.chip-trail a {
  background:var(--brand-light);
  border:1px solid rgba(45,107,255,0.2);
  border-radius:999px;
  padding:8px 14px;
  font-size:13px;
  font-weight:600;
  color:var(--brand-dark);
  transition:background .18s ease, transform .18s ease;
}

.chip-trail a:focus,
.chip-trail a:hover {
  background:var(--brand);
  color:#fff;
  transform:translateY(-1px);
}

.card {
  background:var(--card);
  border-radius:20px;
  padding:28px 32px;
  border:1px solid rgba(15,23,42,0.08);
  box-shadow:var(--shadow);
}

.card h1,
.card h2,
.card h3 {
  margin-top:0;
  color:var(--brand-dark);
}

.hero-card {
  background:linear-gradient(135deg, var(--brand), var(--brand-dark));
  color:#fff;
  overflow:hidden;
  position:relative;
}

.hero-card::after {
  content:"";
  position:absolute;
  inset:0;
  background:radial-gradient(circle at top right, rgba(255,255,255,0.25), transparent 42%);
  opacity:0.6;
  pointer-events:none;
}

.hero-card h1 {
  font-size:36px;
  font-weight:800;
  margin-bottom:12px;
}

.hero-card p {
  font-size:16px;
  max-width:600px;
  line-height:1.6;
}

.hero-meta {
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:24px;
}

.pill {
  background:rgba(255,255,255,0.16);
  border:1px solid rgba(255,255,255,0.3);
  border-radius:999px;
  padding:8px 14px;
  font-size:13px;
  font-weight:600;
  letter-spacing:0.6px;
}

.section-title {
  font-size:22px;
  margin-bottom:14px;
}

.section-lead {
  margin:0 0 22px;
  color:var(--text-muted);
  font-size:15px;
  line-height:1.7;
}

.step-list {
  display:grid;
  gap:16px;
}

.step-item {
  background:var(--brand-light);
  border-radius:14px;
  padding:18px 20px;
  border:1px solid rgba(45,107,255,0.2);
}

.step-item strong {
  display:block;
  font-size:15px;
  margin-bottom:6px;
  color:var(--brand-dark);
}

.code-block {
  background:var(--code-bg);
  color:var(--code-text);
  padding:20px;
  border-radius:14px;
  font-size:14px;
  line-height:1.6;
  overflow:auto;
  position:relative;
}

.code-block button.copy {
  position:absolute;
  top:14px;
  right:14px;
  background:rgba(255,255,255,0.12);
  color:#fff;
  border:1px solid rgba(255,255,255,0.2);
  border-radius:8px;
  padding:6px 12px;
  font-size:12px;
  cursor:pointer;
  transition:opacity .16s ease;
}

.code-block button.copy:hover {
  opacity:0.8;
}

.hidden {
  display:none !important;
}

.ticket-wrapper {
  display:grid;
  gap:22px;
}

.ticket-shell {
  background:linear-gradient(160deg, #ffffff 0%, #f2f5ff 100%);
  border:1px solid rgba(45,107,255,0.18);
  border-radius:24px;
  box-shadow:0 28px 48px rgba(23,40,90,0.08);
  padding:26px 28px 32px;
  display:grid;
  gap:20px;
  position:relative;
}

.ticket-shell::before,
.ticket-shell::after {
  content:"";
  position:absolute;
  width:16px;
  height:16px;
  border-radius:50%;
  background:var(--bg);
  border:1px solid rgba(45,107,255,0.18);
  left:50%;
  transform:translateX(-50%);
}

.ticket-shell::before {
  top:-8px;
}

.ticket-shell::after {
  bottom:-8px;
}

.ticket-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-bottom:18px;
  border-bottom:1px dashed rgba(45,107,255,0.35);
}

.ticket-label {
  font-size:14px;
  letter-spacing:1px;
  text-transform:uppercase;
  font-weight:700;
  color:var(--brand-dark);
}

.btn.ghost {
  background:transparent;
  border:1px dashed var(--border);
  color:var(--text-muted);
}

.btn.small {
  padding:8px 12px;
  font-size:13px;
}

.ticket-body {
  display:grid;
  gap:14px;
  text-align:center;
}

.ticket-number {
  font-size:86px;
  font-weight:800;
  color:var(--brand);
  letter-spacing:8px;
  text-shadow:0 12px 32px rgba(45,107,255,0.18);
  margin:0;
}

.ticket-meta {
  display:flex;
  justify-content:center;
  gap:16px;
  font-weight:600;
  font-size:15px;
  color:var(--text-muted);
  text-transform:uppercase;
  letter-spacing:0.6px;
}

.ticket-note {
  margin:0;
  font-size:14px;
  color:var(--text-muted);
}

.code-panel {
  transition:all .2s ease;
}

.code-notes {
  margin-top:24px;
  background:linear-gradient(135deg, rgba(45,107,255,0.08), rgba(45,107,255,0.16));
  border:1px solid rgba(45,107,255,0.2);
  border-radius:16px;
  padding:20px 22px;
}

.code-notes h3 {
  margin:0 0 10px;
  font-size:16px;
  color:var(--brand-dark);
}

.code-notes ol {
  margin:0;
  padding-left:18px;
  color:var(--text-muted);
  font-size:14px;
  line-height:1.7;
}

.code-stack {
  display:grid;
  gap:22px;
}

.order-card {
  border:1px solid rgba(45,107,255,0.22);
  border-radius:20px;
  padding:22px 24px;
  background:linear-gradient(160deg, #ffffff 0%, #f5f7ff 100%);
  display:grid;
  gap:18px;
}

.order-card-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}

.order-subtitle {
  margin:4px 0 0;
  font-size:13px;
  color:var(--text-muted);
}

.order-list {
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:12px;
}

.order-list li {
  display:flex;
  justify-content:space-between;
  gap:12px;
  background:#fff;
  border:1px solid rgba(45,107,255,0.12);
  border-radius:12px;
  padding:12px 14px;
  font-size:14px;
}

.order-item-meta {
  display:flex;
  flex-direction:column;
  gap:4px;
}

.order-item-meta span:first-child {
  font-weight:600;
  color:var(--text);
}

.order-item-meta span:last-child {
  font-size:13px;
  color:var(--text-muted);
}

.order-price {
  font-weight:700;
}

.order-totals {
  margin-top:8px;
  display:grid;
  gap:8px;
}

.order-total-row {
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:14px;
  color:var(--text-muted);
}

.order-total-row strong {
  color:var(--brand-dark);
}

.order-total-row.highlight strong {
  color:var(--brand);
}

.order-total-row.meta {
  font-size:13px;
}

.receipt-wrapper {
  display:grid;
  gap:22px;
}

.receipt-layout {
  display:grid;
  gap:24px;
  grid-template-columns:1fr;
}

.receipt-stage {
  display:grid;
  gap:18px;
}

.receipt-ticket {
  background:linear-gradient(155deg, #ffffff 0%, #f2f5ff 100%);
  border:1px solid rgba(45,107,255,0.2);
  border-radius:24px;
  padding:24px 26px;
  box-shadow:0 24px 48px rgba(23,40,90,0.08);
  position:relative;
  display:grid;
  gap:18px;
}

.receipt-ticket::before,
.receipt-ticket::after {
  content:"";
  position:absolute;
  width:16px;
  height:16px;
  border-radius:50%;
  background:var(--bg);
  border:1px solid rgba(45,107,255,0.25);
  left:50%;
  transform:translateX(-50%);
}

.receipt-ticket::before { top:-8px; }
.receipt-ticket::after { bottom:-8px; }

.receipt-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-bottom:1px dashed rgba(45,107,255,0.3);
  padding-bottom:14px;
}

.ticket-id {
  font-size:13px;
  font-weight:700;
  color:var(--brand);
  background:rgba(45,107,255,0.12);
  padding:6px 10px;
  border-radius:8px;
}

.receipt-body {
  font-family:"Courier New", monospace;
  font-size:14px;
  line-height:1.6;
  white-space:pre-wrap;
}

.ticket-sub {
  margin:2px 0 0;
  font-size:13px;
  color:rgba(255,255,255,0.75);
}

.code-entry {
  background:linear-gradient(145deg, rgba(15,23,42,0.85), rgba(15,23,42,0.92));
  border-radius:16px;
  padding:18px 20px;
  color:var(--code-text);
  border:1px solid rgba(15,23,42,0.55);
}

.code-entry-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
}

.code-entry h3 {
  margin:0 0 6px;
  font-size:17px;
  color:#fff;
}

.copy-inline {
  background:rgba(255,255,255,0.08);
  color:#fff;
  border:1px solid rgba(255,255,255,0.2);
  border-radius:10px;
  padding:6px 12px;
  font-size:12px;
  font-weight:600;
  cursor:pointer;
  transition:opacity .16s ease;
}

.copy-inline:hover {
  opacity:0.8;
}

.code-preview {
  margin:0;
  font-family:"Fira Code","Source Code Pro",monospace;
  font-size:13px;
  line-height:1.7;
  white-space:pre-wrap;
  word-break:break-word;
}

.quick-links {
  display:grid;
  gap:16px;
}

.quick-card {
  border-radius:16px;
  border:1px solid rgba(15,23,42,0.08);
  background:var(--card);
  padding:22px 24px;
  display:flex;
  flex-direction:column;
  gap:12px;
  transition:transform .18s ease, box-shadow .18s ease;
}

.quick-card:hover {
  transform:translateY(-4px);
  box-shadow:0 28px 45px rgba(23,40,90,0.12);
}

.quick-card span {
  color:var(--brand);
  font-weight:600;
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:1px;
}

.btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  border:0;
  border-radius:12px;
  cursor:pointer;
  padding:12px 20px;
  font-weight:600;
  font-size:14px;
  transition:transform .16s ease, box-shadow .16s ease;
}

.btn.primary {
  background:var(--brand);
  color:#fff;
  box-shadow:0 14px 32px rgba(45,107,255,0.28);
}

.btn.primary:hover {
  transform:translateY(-1px);
}

.btn.secondary {
  background:var(--brand-light);
  color:var(--brand-dark);
  border:1px solid rgba(45,107,255,0.2);
}

.action-row {
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  justify-content:center;
  margin-top:20px;
}

.demo-grid {
  display:grid;
  gap:20px;
}

.demo-grid.two {
  grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
}

.tag {
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  font-weight:600;
  color:var(--brand-dark);
  background:rgba(45,107,255,0.15);
  padding:4px 10px;
  border-radius:999px;
}

.callout {
  background:linear-gradient(135deg, rgba(45,107,255,0.1), rgba(120,162,255,0.18));
  border:1px solid rgba(45,107,255,0.22);
  border-radius:16px;
  padding:22px 24px;
}

.callout strong {
  display:block;
  margin-bottom:8px;
  color:var(--brand-dark);
}

.grid-two {
  display:grid;
  gap:20px;
}

.demo-shell {
  display:grid;
  gap:18px;
}

.demo-stage {
  background:rgba(255,255,255,0.9);
  border:1px dashed rgba(45,107,255,0.25);
  border-radius:18px;
  padding:24px;
  text-align:center;
}

.demo-stage h3 {
  margin-top:0;
}

.demo-preview {
  background:linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
  border:1px solid rgba(15,23,42,0.08);
  border-radius:18px;
  padding:24px;
  display:grid;
  gap:12px;
}

.stat {
  display:flex;
  align-items:center;
  gap:12px;
}

.stat strong {
  font-size:16px;
}

.table-fit {
  width:100%;
  border-collapse:collapse;
  font-size:14px;
}

.table-fit th,
.table-fit td {
  padding:12px 14px;
  border-bottom:1px solid var(--border);
  text-align:left;
  vertical-align:top;
}

.table-fit tr:hover td {
  background:rgba(45,107,255,0.06);
}

.table-wrapper {
  width:100%;
  overflow:auto;
}

.table-wrapper table {
  min-width:640px;
}

.example-steps {
  margin:0 0 18px;
  padding-left:20px;
  color:var(--text-muted);
  font-size:14px;
  line-height:1.7;
}

.example-steps li {
  margin-bottom:6px;
}

.toggle {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.toggle button {
  padding:8px 14px;
  border-radius:10px;
  border:1px solid rgba(15,23,42,0.12);
  background:#fff;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  transition:background .16s ease, color .16s ease, border .16s ease;
}

.toggle button.active {
  background:var(--brand);
  color:#fff;
  border-color:var(--brand);
}

.code-view {
  display:none;
}

.code-view.active {
  display:block;
}

.iframe-sink {
  position:absolute;
  width:0;
  height:0;
  border:0;
  visibility:hidden;
}

footer {
  border-top:1px solid rgba(13,23,55,0.08);
  padding:24px 0 0 0;
  background:#0b0b0c;
}

.footer-inner {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  font-size:13px;
  color:var(--text-muted);
}

.footer-inner a {
  color:var(--brand);
  font-weight:600;
}

@media (min-width: 960px) {
  .hero-card h1 {
    font-size:42px;
  }

  .demo-grid {
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .receipt-layout {
    grid-template-columns:360px 1fr;
  }
}

/* Tablet and medium screens */
@media (max-width: 960px) {
  .container {
    width: calc(100% - 24px);
  }
  
  .header-bar {
    padding: 16px 0;
  }
  
  main {
    padding: 30px 0 0;
  }
}

@media (max-width: 720px) {
  .header-bar {
    flex-direction:column;
    align-items:flex-start;
    gap: 12px;
  }

  .main-nav {
    flex-wrap:wrap;
    gap:12px;
    font-size: 14px;
  }

  .brand {
    gap:10px;
  }

  .brand img {
    width:40px;
    height:40px;
  }

  .brand-text strong {
    font-size:16px;
  }

  .brand-sub {
    font-size:11px;
  }

  .card {
    padding:20px;
    border-radius: 16px;
  }

  .hero-card {
    padding:24px;
  }

  .chip-trail {
    gap:8px;
  }

  .chip-trail a {
    padding:8px 12px;
    font-size: 12px;
  }
  
  .anchor-nav {
    padding: 0 0 16px;
    gap: 8px;
  }
  
  .content {
    gap: 20px;
  }
}

/* Mobile specific styles */
@media (max-width: 600px) {
  .container {
    width: calc(100% - 20px);
  }
  
  .header-bar {
    padding: 12px 0;
  }
  
  .brand-text strong {
    font-size: 15px;
  }
  
  .brand-sub {
    font-size: 10px;
  }
  
  .main-nav {
    font-size: 13px;
    gap: 8px;
  }
  
  .main-nav a {
    padding: 4px 8px;
  }
  
  .version-pill {
    font-size: 11px;
    padding: 4px 10px;
  }
  
  .card {
    padding: 16px;
  }
}

@media (max-width: 720px) {
  .ticket-shell {
    padding:22px 20px 26px;
  }

  .ticket-number {
    font-size:64px;
    letter-spacing:6px;
  }

  .ticket-meta {
    flex-direction:column;
    gap:6px;
  }

  .receipt-layout {
    grid-template-columns:1fr;
  }

  .order-card {
    padding:20px 18px;
  }
}
.command-tabs {
  margin-top:18px;
  display:grid;
  gap:20px;
}

.tab-toggle {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.tab-toggle button {
  padding:10px 14px;
  border-radius:10px;
  border:1px solid rgba(45,107,255,0.25);
  background:#f3f6ff;
  color:var(--brand-dark);
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  transition:background .18s ease, color .18s ease, border .18s ease;
}

.tab-toggle button.active {
  background:var(--brand);
  color:#fff;
  border-color:var(--brand);
}

.command-pane {
  display:none;
  animation:fadeIn .24s ease;
}

.command-pane.active {
  display:block;
}

@keyframes fadeIn {
  from { opacity:0; transform:translateY(6px); }
  to { opacity:1; transform:translateY(0); }
}
