:root {
  --ink: #07111d;
  --ink-soft: #101e2c;
  --paper: #f2efe7;
  --paper-bright: #fbfaf6;
  --mint: #62e6a7;
  --mint-dark: #18794e;
  --orange: #ff9f62;
  --line: rgba(7, 17, 29, .14);
  --muted: #66717b;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  transform: translateY(-160%);
  padding: 10px 14px;
  background: var(--mint);
  color: var(--ink);
  font-weight: 800;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  width: min(calc(100% - 48px), var(--max));
  min-height: 86px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 10;
}
.brand { display: inline-flex; align-items: center; gap: 7px; width: fit-content; font-size: 14px; font-weight: 900; letter-spacing: .13em; }
.brand b { color: var(--mint-dark); font-weight: 800; }
.brand-mark { width: 28px; height: 22px; display: inline-flex; align-items: flex-end; gap: 3px; margin-right: 4px; }
.brand-mark i { display: block; width: 6px; background: var(--ink); border-radius: 4px 4px 1px 1px; }
.brand-mark i:nth-child(1) { height: 9px; }
.brand-mark i:nth-child(2) { height: 21px; background: var(--mint-dark); }
.brand-mark i:nth-child(3) { height: 15px; }
.site-header nav { display: flex; align-items: center; gap: 30px; color: #35404a; font-size: 13px; font-weight: 700; }
.site-header nav a, .language { transition: color .2s ease; }
.site-header nav a:hover, .language:hover { color: var(--mint-dark); }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 22px; }
.language { font-size: 13px; font-weight: 800; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 54px;
  padding: 0 24px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: white;
  font-size: 13px;
  font-family: inherit;
  font-weight: 800;
  letter-spacing: .02em;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); box-shadow: 5px 5px 0 var(--mint-dark); }
.button-small { min-height: 40px; padding: 0 16px; gap: 10px; }
.login-button { white-space: nowrap; cursor: pointer; }

.hero {
  width: min(calc(100% - 48px), var(--max));
  min-height: 720px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(460px, .98fr);
  align-items: center;
  gap: 7vw;
  position: relative;
}
.hero-grid {
  position: absolute;
  inset: 0 calc(50% + 12px) 0 auto;
  width: 50vw;
  pointer-events: none;
  opacity: .42;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, rgba(0,0,0,.75), transparent 88%);
}
.hero-copy { position: relative; z-index: 1; padding: 76px 0 58px; }
.eyebrow, .section-kicker { margin: 0 0 28px; color: var(--mint-dark); font-size: 12px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 10px; }
.eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: var(--mint-dark); box-shadow: 0 0 0 5px rgba(24,121,78,.12); }
h1 { margin: 0; font-size: clamp(60px, 6.7vw, 105px); line-height: .88; letter-spacing: -.072em; font-weight: 850; }
h1 em { color: var(--mint-dark); font-style: normal; font-weight: 500; }
.hero-lede { max-width: 630px; margin: 34px 0 0; color: #3e4953; font-size: 18px; line-height: 1.65; }
.hero-actions { margin-top: 36px; display: flex; align-items: center; gap: 30px; }
.text-link { padding: 12px 0; border-bottom: 1px solid var(--ink); font-size: 13px; font-weight: 800; }
.text-link span { margin-left: 16px; }
.hero-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 58px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.hero-facts div { padding-right: 20px; }
.hero-facts dt { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero-facts dd { margin: 7px 0 0; font-size: 13px; font-weight: 800; }

.console-card { position: relative; z-index: 2; overflow: hidden; background: var(--ink); color: #dce7e2; box-shadow: 20px 24px 0 rgba(24,121,78,.17); }
.console-card::before { content: ""; position: absolute; inset: 0; opacity: .07; background-image: linear-gradient(rgba(255,255,255,.4) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.4) 1px, transparent 1px); background-size: 24px 24px; pointer-events: none; }
.console-topbar { min-height: 56px; padding: 0 18px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; position: relative; border-bottom: 1px solid rgba(255,255,255,.12); color: #7f918a; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.console-dots { display: flex; gap: 7px; }
.console-dots span { width: 8px; height: 8px; border-radius: 50%; background: #34443e; }
.console-dots span:nth-child(2) { background: var(--orange); }
.console-dots span:nth-child(3) { background: var(--mint); }
.copy-button { justify-self: end; padding: 7px 10px; border: 1px solid rgba(255,255,255,.2); background: transparent; color: #aebdb7; font: inherit; cursor: pointer; }
.copy-button:hover { color: white; border-color: var(--mint); }
pre { min-height: 410px; margin: 0; padding: 35px 36px; position: relative; overflow: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.8; tab-size: 2; }
.code-muted { color: #798d85; }
.code-string { color: #8aefbd; }
.code-value { color: #ffb785; }
.console-response { min-height: 58px; padding: 0 22px; display: flex; align-items: center; gap: 10px; position: relative; border-top: 1px solid rgba(255,255,255,.12); color: #91a49d; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 5px rgba(98,230,167,.1); }
.response-time { margin-left: auto; }

.principles { background: var(--paper-bright); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.principles > p, .principle-list { width: min(calc(100% - 48px), var(--max)); margin-left: auto; margin-right: auto; }
.principles > p { margin-top: 0; margin-bottom: 0; padding: 24px 0; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.principle-list { display: grid; grid-template-columns: repeat(4, 1fr); }
.principle-list span { min-height: 96px; display: flex; align-items: center; gap: 14px; border-right: 1px solid var(--line); font-size: 13px; font-weight: 800; }
.principle-list span:first-child { border-left: 1px solid var(--line); padding-left: 22px; }
.principle-list b { color: var(--mint-dark); font-family: ui-monospace, monospace; font-size: 10px; }

.section-shell { width: min(calc(100% - 48px), var(--max)); margin: 0 auto; }
.platform-section { padding: 132px 0 116px; }
.section-heading { display: grid; grid-template-columns: 1.35fr .65fr; column-gap: 9vw; }
.section-heading .section-kicker { grid-column: 1 / -1; }
.section-heading h2, .model-intro h2, .billing-title h2, .key-copy h2, .faq h2 { margin: 0; font-size: clamp(42px, 5.2vw, 72px); line-height: .98; letter-spacing: -.055em; }
.section-heading > p:last-child, .model-intro > p:last-child, .key-copy > p { align-self: end; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.72; }
.feature-grid { margin-top: 76px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.feature-grid article { min-height: 290px; padding: 30px 34px 36px 0; border-right: 1px solid var(--line); }
.feature-grid article + article { padding-left: 34px; }
.feature-grid article:last-child { border-right: 0; }
.feature-number, .mono { color: var(--mint-dark); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.feature-grid h3 { margin: 92px 0 14px; font-size: 24px; letter-spacing: -.025em; }
.feature-grid p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.72; }

.model-section { padding: 108px 6vw; display: grid; grid-template-columns: .85fr 1.15fr; gap: 9vw; background: var(--ink); color: white; }
.model-intro { align-self: center; }
.model-intro .section-kicker { color: var(--mint); }
.model-intro > p:last-child { margin-top: 28px; color: #8fa099; }
.model-card { padding: 38px; border: 1px solid rgba(255,255,255,.18); background: var(--ink-soft); }
.model-card-top { display: flex; justify-content: space-between; align-items: center; }
.status-label { display: flex; align-items: center; gap: 9px; color: var(--mint); font-family: ui-monospace, monospace; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.status-label i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 5px rgba(98,230,167,.1); }
.model-card .mono { color: #71847c; }
.model-card h3 { margin: 74px 0 16px; font-size: clamp(34px, 4vw, 52px); letter-spacing: -.045em; }
.model-card > p { max-width: 570px; margin: 0; color: #9eada7; line-height: 1.65; }
.model-card dl { margin: 58px 0 0; border-top: 1px solid rgba(255,255,255,.14); }
.model-card dl div { padding: 16px 0; display: flex; justify-content: space-between; gap: 24px; border-bottom: 1px solid rgba(255,255,255,.1); }
.model-card dt { color: #71847c; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.model-card dd { margin: 0; font-size: 12px; font-weight: 800; }

.preview-note { width: min(calc(100% - 48px), 920px); margin: 0 auto; padding: 130px 0; text-align: center; }
.preview-note h2, .access-strip h2 { margin: 0; font-size: clamp(42px, 5.4vw, 76px); line-height: .98; letter-spacing: -.055em; }
.preview-note > p:last-child { max-width: 720px; margin: 30px auto 0; color: var(--muted); font-size: 17px; line-height: 1.75; }
.billing-flow { padding-bottom: 128px; display: grid; grid-template-columns: .68fr 1.32fr; gap: 8vw; }
.billing-title { position: sticky; top: 36px; align-self: start; }
.billing-flow ol { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.billing-flow li { padding: 28px 0; display: grid; grid-template-columns: 58px 1fr; border-bottom: 1px solid var(--line); }
.billing-flow li > span { color: var(--mint-dark); font-family: ui-monospace, monospace; font-size: 11px; font-weight: 800; }
.billing-flow h3 { margin: 0 0 9px; font-size: 21px; letter-spacing: -.02em; }
.billing-flow li p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }

.first-key { margin-bottom: 132px; display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; background: var(--paper-bright); border: 1px solid var(--line); }
.key-visual { min-height: 480px; padding: 46px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; background: var(--orange); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.key-prefix { font-size: 13px; font-weight: 800; text-transform: uppercase; }
.key-secret { margin-top: 18px; white-space: nowrap; font-size: clamp(24px, 3.4vw, 48px); font-weight: 900; letter-spacing: -.045em; transform: translateX(-2px); }
.key-visual div { display: flex; align-items: end; gap: 8px; margin-top: 90px; }
.key-visual i { width: 17px; background: var(--ink); }
.key-visual i:nth-child(1) { height: 30px; }
.key-visual i:nth-child(2) { height: 82px; }
.key-visual i:nth-child(3) { height: 54px; }
.key-copy { padding: 62px; align-self: center; }
.key-copy > p { margin-top: 26px; }
.key-copy ul { margin: 30px 0 0; padding: 0; list-style: none; }
.key-copy li { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 800; }
.key-copy li::before { content: "✓"; margin-right: 12px; color: var(--mint-dark); }

.faq { padding: 0 0 132px; display: grid; grid-template-columns: .72fr 1.28fr; gap: 8vw; }
.faq-list { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { padding: 25px 0; display: flex; justify-content: space-between; gap: 20px; cursor: pointer; list-style: none; font-size: 15px; font-weight: 800; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary span { color: var(--mint-dark); font-size: 20px; transition: transform .2s ease; }
.faq details[open] summary span { transform: rotate(45deg); }
.faq details p { max-width: 680px; margin: -5px 36px 25px 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.access-strip { width: min(calc(100% - 48px), var(--max)); margin: 0 auto 96px; padding: 52px 56px; display: flex; align-items: center; justify-content: space-between; gap: 40px; background: var(--mint-dark); color: white; }
.access-strip .section-kicker { color: #a6f5cb; }
.access-strip h2 { font-size: clamp(34px, 4vw, 56px); }
.button-light { flex: 0 0 auto; background: var(--paper-bright); color: var(--ink); border-color: var(--paper-bright); }
.button-light:hover { box-shadow: 5px 5px 0 var(--orange); }

footer { width: min(calc(100% - 48px), var(--max)); margin: 0 auto; padding: 50px 0 34px; display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 32px; align-items: start; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.brand-footer { color: var(--ink); }
footer p { max-width: 420px; margin: 0; line-height: 1.6; }
.footer-links { display: flex; gap: 22px; color: var(--ink); font-weight: 700; }
.footer-regulatory { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.footer-regulatory span { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.footer-regulatory a { color: var(--ink); font-weight: 700; }
.footer-regulatory a:hover { color: var(--mint-dark); }
footer small { grid-column: 1 / -1; padding-top: 28px; border-top: 1px solid var(--line); }

.subpage { min-height: 70vh; }
.page-hero { padding: 104px 0 112px; }
.page-hero h1 { max-width: 1000px; font-size: clamp(58px, 7.5vw, 108px); }
.page-hero > p:last-child { max-width: 720px; margin: 38px 0 0; color: var(--muted); font-size: 18px; line-height: 1.7; }
.catalog-heading { max-width: 760px; }
.catalog-heading h2, .price-formula h2, .docs-content h2 { margin: 0; font-size: clamp(38px, 4.8vw, 66px); line-height: 1; letter-spacing: -.05em; }
.catalog-heading > p:last-child { margin: 24px 0 0; color: var(--muted); line-height: 1.7; }
.price-table { margin-top: 54px; border-top: 1px solid var(--ink); }
.price-row { min-height: 96px; display: grid; grid-template-columns: 1.35fr 1fr 1fr .9fr; align-items: center; border-bottom: 1px solid var(--line); }
.price-row > span { padding: 20px 24px 20px 0; font-size: 13px; }
.price-row strong, .price-row small { display: block; }
.price-row small { margin-top: 7px; color: var(--muted); }
.price-head { min-height: 52px; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.availability { display: inline-flex; align-items: center; gap: 9px; color: var(--mint-dark); font-size: 11px; }
.availability i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint-dark); }
.table-note { margin: 18px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.price-formula { padding: 128px 0; display: grid; grid-template-columns: .8fr 1.2fr; gap: 8vw; }
.formula-card { padding: 42px; background: var(--ink); color: white; }
.formula-card code { color: var(--mint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: clamp(13px, 1.8vw, 20px); line-height: 1.7; }
.formula-card p { margin: 34px 0 0; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.14); color: #9eada7; font-size: 13px; line-height: 1.7; }
.pricing-principles { margin-bottom: 128px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.pricing-principles article { min-height: 260px; padding: 28px 28px 30px 0; border-right: 1px solid var(--line); }
.pricing-principles article + article { padding-left: 28px; }
.pricing-principles article:last-child { border-right: 0; }
.pricing-principles span { color: var(--mint-dark); font: 800 10px ui-monospace, monospace; }
.pricing-principles h3 { margin: 80px 0 14px; font-size: 19px; }
.pricing-principles p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.endpoint-banner { margin-bottom: 96px; padding: 28px 30px; display: flex; align-items: center; justify-content: space-between; gap: 30px; background: var(--ink); color: white; }
.endpoint-banner div { display: flex; align-items: center; gap: 24px; }
.endpoint-banner span { color: #7f918a; font: 800 9px ui-monospace, monospace; letter-spacing: .1em; }
.endpoint-banner code { color: var(--mint); font: 700 clamp(12px, 2vw, 18px) ui-monospace, monospace; }
.light-copy { flex: 0 0 auto; }
.docs-layout { padding-bottom: 128px; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 8vw; }
.docs-layout aside { position: sticky; top: 30px; align-self: start; display: flex; flex-direction: column; gap: 14px; font-size: 12px; font-weight: 700; }
.docs-layout aside span { margin-bottom: 8px; color: var(--muted); font: 800 9px ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; }
.docs-layout aside a:hover { color: var(--mint-dark); }
.docs-content > section { padding: 0 0 88px; scroll-margin-top: 30px; }
.docs-content > section + section { padding-top: 88px; border-top: 1px solid var(--line); }
.docs-content section > p:not(.section-kicker):not(.docs-note) { max-width: 750px; color: var(--muted); line-height: 1.72; }
.inline-code { margin-top: 26px; padding: 20px 24px; overflow: auto; background: var(--paper-bright); border: 1px solid var(--line); }
.inline-code code { font: 700 13px ui-monospace, monospace; }
.doc-code { margin-top: 28px; overflow: hidden; background: var(--ink); color: white; }
.doc-code > div { min-height: 48px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.12); color: #7f918a; font: 800 10px ui-monospace, monospace; }
.doc-code pre { min-height: auto; padding: 30px; }
.route-list { margin-top: 30px; border-top: 1px solid var(--ink); }
.route-list div { padding: 22px 0; display: grid; grid-template-columns: minmax(220px, .7fr) 1.3fr; gap: 24px; border-bottom: 1px solid var(--line); }
.route-list code { font-weight: 800; }
.route-list span { color: var(--muted); font-size: 13px; }
.error-grid { margin-top: 30px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.error-grid div { min-height: 130px; padding: 24px 22px 20px 0; display: flex; flex-direction: column; gap: 20px; border-right: 1px solid var(--line); }
.error-grid div + div { padding-left: 22px; }
.error-grid div:last-child { border-right: 0; }
.error-grid strong { color: var(--mint-dark); font: 900 22px ui-monospace, monospace; }
.error-grid span { color: var(--muted); font-size: 12px; line-height: 1.55; }
.docs-note { margin-top: 28px; padding: 18px 20px; border-left: 3px solid var(--orange); background: var(--paper-bright); color: #4d5861; font-size: 12px; line-height: 1.65; }

.portal-main { overflow: hidden; }
.portal-hero { min-height: 690px; padding: 76px 0 92px; display: grid; grid-template-columns: .82fr 1.18fr; gap: 7vw; align-items: center; }
.portal-intro h1 { font-size: clamp(56px, 6.3vw, 92px); }
.portal-intro > p:not(.eyebrow) { max-width: 530px; margin: 30px 0 0; color: var(--muted); font-size: 17px; line-height: 1.7; }
.chat-panel { overflow: hidden; scroll-margin-top: 30px; background: var(--paper-bright); border: 1px solid var(--line); box-shadow: 16px 18px 0 rgba(24,121,78,.14); }
.chat-toolbar { min-height: 58px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); font-size: 12px; }
.chat-toolbar > div { display: flex; align-items: center; gap: 10px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint-dark); box-shadow: 0 0 0 5px rgba(24,121,78,.1); }
.demo-tag { padding: 6px 9px; background: #e7e3d9; color: var(--muted); font: 800 9px ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
.chat-thread { height: 350px; padding: 30px 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; }
.chat-message { display: flex; align-items: flex-start; gap: 11px; }
.chat-message > span { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 50%; background: var(--mint-dark); color: white; font-size: 10px; font-weight: 900; }
.chat-message p { max-width: 78%; margin: 0; padding: 12px 15px; background: #e9eee9; color: #2c3841; font-size: 13px; line-height: 1.65; }
.chat-message.user { justify-content: flex-end; }
.chat-message.user p { order: 1; background: var(--ink); color: white; }
.chat-message.user > span { order: 2; background: var(--orange); color: var(--ink); }
.chat-composer { margin: 0 18px; padding: 9px 9px 9px 14px; display: flex; gap: 12px; align-items: end; border: 1px solid var(--line); background: white; }
.chat-composer textarea { min-height: 42px; flex: 1; resize: none; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; line-height: 1.5; }
.chat-composer button { width: 40px; height: 40px; flex: 0 0 40px; border: 0; background: var(--mint-dark); color: white; font-size: 20px; cursor: pointer; }
.chat-note { margin: 10px 18px 15px; color: var(--muted); font-size: 10px; }
.account-strip { margin-bottom: 122px; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--ink); color: white; }
.account-strip > div { min-height: 112px; padding: 24px 27px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid rgba(255,255,255,.12); }
.account-strip > div:last-child { border-right: 0; }
.account-strip span { color: #82928c; font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.account-strip strong { font-size: 25px; letter-spacing: -.03em; }
.status-good { display: flex; align-items: center; gap: 9px; color: var(--mint); font-size: 14px !important; }
.status-good i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.portal-section { padding-bottom: 132px; scroll-margin-top: 30px; }
.portal-section-heading { margin-bottom: 54px; display: grid; grid-template-columns: 1.25fr .75fr; gap: 8vw; align-items: end; }
.portal-section-heading h2, .api-home h2, .billing-home h2 { margin: 0; font-size: clamp(40px, 5vw, 68px); line-height: .98; letter-spacing: -.055em; }
.portal-section-heading > p, .api-home-copy > p:not(.section-kicker), .billing-card > p:not(.section-kicker) { margin: 0; color: var(--muted); line-height: 1.72; }
.portal-table { border-top: 1px solid var(--ink); }
.portal-row { min-height: 94px; display: grid; grid-template-columns: 1.35fr 1fr 1fr .8fr; align-items: center; border-bottom: 1px solid var(--line); }
.portal-row > span { padding: 18px 22px 18px 0; font-size: 13px; }
.portal-row strong, .portal-row small { display: block; }
.portal-row small { margin-top: 7px; color: var(--muted); }
.portal-table-head { min-height: 48px; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.inline-action { display: inline-flex; gap: 18px; margin-top: 24px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); font-size: 12px; font-weight: 800; }
.api-home { display: grid; grid-template-columns: .85fr 1.15fr; gap: 8vw; align-items: center; }
.api-home-copy > p:not(.section-kicker) { margin-top: 25px; }
.key-card { margin-top: 36px; padding: 23px; display: grid; gap: 14px; background: var(--paper-bright); border: 1px solid var(--line); }
.key-card > span { color: var(--muted); font: 800 9px ui-monospace, monospace; letter-spacing: .1em; }
.key-card code { font: 800 15px ui-monospace, monospace; }
.key-card a { width: fit-content; color: var(--mint-dark); font-size: 12px; font-weight: 800; }
.home-code { margin-top: 0; }
.home-code pre { min-height: 330px; }
.code-doc-link { min-height: 50px; padding: 0 18px; display: flex; align-items: center; border-top: 1px solid rgba(255,255,255,.12); color: var(--mint); font-size: 11px; font-weight: 800; }
.billing-home { display: grid; grid-template-columns: 1.15fr .85fr; background: var(--mint-dark); color: white; }
.billing-card { padding: 62px; }
.billing-card .section-kicker { color: #a6f5cb; }
.billing-card > p:not(.section-kicker) { max-width: 650px; margin-top: 25px; color: #b6d5c6; }
.amount-options { margin: 36px 0 22px; display: flex; gap: 10px; }
.amount-options button { min-width: 92px; min-height: 46px; border: 1px solid rgba(255,255,255,.25); background: transparent; color: white; font-weight: 800; cursor: pointer; }
.amount-options button[aria-pressed="true"] { background: white; color: var(--ink); }
.disabled-action { background: var(--ink); opacity: .72; cursor: not-allowed; }
.balance-receipt { padding: 60px 48px; background: var(--paper-bright); color: var(--ink); }
.balance-receipt > span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.balance-receipt > strong { display: block; margin: 36px 0 44px; font-size: clamp(48px, 6vw, 76px); letter-spacing: -.06em; }
.balance-receipt dl { margin: 0; border-top: 1px solid var(--line); }
.balance-receipt dl div { padding: 15px 0; display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); font-size: 12px; }
.balance-receipt dt { color: var(--muted); }
.balance-receipt dd { margin: 0; font-weight: 800; }
.usage-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.usage-grid article { min-height: 170px; padding: 28px 28px 26px 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.usage-grid article + article { padding-left: 28px; }
.usage-grid article:last-child { border-right: 0; }
.usage-grid span, .usage-grid small { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.usage-grid strong { margin-top: auto; font-size: 38px; letter-spacing: -.04em; }
.usage-grid small { margin-top: 8px; text-transform: none; letter-spacing: 0; }
.usage-chart { height: 260px; margin-top: 30px; padding: 30px 24px 18px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 3vw; background: var(--paper-bright); border: 1px solid var(--line); }
.usage-chart > div { display: flex; flex-direction: column; justify-content: end; align-items: center; gap: 10px; }
.usage-chart i { width: min(48px, 70%); height: var(--h); display: block; background: var(--mint-dark); }
.usage-chart div:nth-child(6) i { background: var(--orange); }
.usage-chart span { color: var(--muted); font-size: 9px; font-weight: 800; }

.app-body { min-height: 100vh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.login-button { visibility: hidden; }
.auth-ready .login-button { visibility: visible; }
.app-header nav a[aria-current="page"] { color: var(--mint-dark); }
.app-header nav a[aria-current="page"]::after { content: ""; display: block; height: 2px; margin-top: 6px; background: var(--mint-dark); }
.app-page { min-height: 0; display: flex; }
.app-view { min-height: 100%; padding: 44px 0 48px; display: flex; flex-direction: column; justify-content: center; }
.view-heading { margin-bottom: 34px; display: flex; align-items: end; justify-content: space-between; gap: 50px; }
.view-heading > div { max-width: 760px; }
.view-heading .section-kicker { margin-bottom: 14px; }
.view-heading h1 { font-size: clamp(42px, 5vw, 68px); line-height: .98; }
.view-heading > p, .view-heading > div > p:last-child { max-width: 560px; margin: 18px 0 0; color: var(--muted); line-height: 1.65; }
.home-view { display: grid; grid-template-columns: .78fr 1.22fr; gap: 6vw; align-items: center; }
.welcome-copy h1 { font-size: clamp(54px, 6.5vw, 92px); }
.welcome-copy > p:not(.eyebrow) { max-width: 530px; margin: 28px 0 0; color: var(--muted); font-size: 16px; line-height: 1.7; }
.home-dashboard { display: grid; grid-template-columns: repeat(2, 1fr); background: var(--paper-bright); border: 1px solid var(--line); box-shadow: 14px 16px 0 rgba(24,121,78,.12); }
.home-stat { min-height: 130px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.home-stat:nth-child(2n) { border-right: 0; }
.home-stat:nth-last-child(-n+2) { border-bottom: 0; }
.home-stat span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.home-stat strong { font-size: 30px; letter-spacing: -.04em; }
.quick-pages { grid-column: 1 / -1; padding: 18px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; background: var(--ink); }
.quick-pages a { min-height: 74px; padding: 13px; display: flex; flex-direction: column; justify-content: space-between; background: var(--ink-soft); color: white; font-size: 11px; font-weight: 800; }
.quick-pages a span { color: var(--mint); }
.quick-pages a:hover { background: var(--mint-dark); }
.chat-view { max-width: 980px; }
.chat-view .chat-panel { box-shadow: none; }
.chat-view .chat-thread { height: clamp(290px, 42vh, 430px); }
.models-view .portal-table { margin-top: 4px; }
.market-tools { margin-bottom: 18px; display: flex; justify-content: space-between; gap: 20px; }
.market-tools input { width: min(100%, 360px); min-height: 42px; padding: 0 14px; border: 1px solid var(--line); background: var(--paper-bright); font: inherit; }
.market-tools span { align-self: center; color: var(--muted); font-size: 11px; }
.api-view-grid { display: grid; grid-template-columns: .75fr 1.25fr; gap: 5vw; align-items: start; }
.api-account { display: grid; gap: 16px; }
.endpoint-card, .protocol-card, .api-account .key-card { margin: 0; }
.endpoint-card { padding: 22px; background: var(--ink); color: white; }
.endpoint-card span { display: block; margin-bottom: 12px; color: #82928c; font: 800 9px ui-monospace, monospace; letter-spacing: .1em; }
.endpoint-card code { color: var(--mint); font: 700 12px ui-monospace, monospace; overflow-wrap: anywhere; }
.protocol-card { padding: 22px; border: 1px solid var(--line); background: var(--paper-bright); }
.protocol-card > span { display: block; margin-bottom: 15px; color: var(--muted); font: 800 9px ui-monospace, monospace; letter-spacing: .1em; }
.protocol-card div { display: grid; grid-template-columns: auto 1fr; gap: 9px 14px; align-items: center; }
.protocol-card b { color: var(--mint-dark); font-size: 10px; }
.protocol-card code { font: 700 10px ui-monospace, monospace; overflow-wrap: anywhere; }
.protocol-card code + code { grid-column: 2; }
.usage-view .usage-grid { margin-bottom: 24px; }
.usage-view .usage-chart { height: clamp(210px, 31vh, 300px); margin-top: 0; }
.billing-view-grid { display: grid; grid-template-columns: 1fr .8fr; background: var(--mint-dark); color: white; }
.billing-view-grid .billing-card { padding: 48px; }
.billing-view-grid .balance-receipt { padding: 48px; }
.app-footer { width: min(calc(100% - 48px), var(--max)); margin: 0 auto; padding: 16px 0 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.app-footer > div { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.app-footer a { color: var(--ink); font-weight: 700; }

.login-dialog { width: min(calc(100% - 32px), 480px); padding: 0; border: 0; background: transparent; color: var(--ink); }
.login-dialog::backdrop { background: rgba(7,17,29,.72); backdrop-filter: blur(5px); }
.login-box { position: relative; padding: 42px; display: grid; gap: 20px; background: var(--paper-bright); border: 1px solid var(--line); box-shadow: 14px 16px 0 var(--mint-dark); }
.login-box h2 { margin: -8px 0 8px; font-size: 42px; letter-spacing: -.05em; }
.login-box label { display: grid; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.login-box input { min-height: 48px; padding: 0 14px; border: 1px solid var(--line); background: white; color: var(--ink); font: inherit; text-transform: none; letter-spacing: 0; }
.login-box .button { margin-top: 4px; }
.dialog-close { position: absolute; top: 14px; right: 16px; width: 34px; height: 34px; border: 0; background: transparent; color: var(--muted); font-size: 25px; cursor: pointer; }
.form-error { min-height: 18px; margin: -6px 0; color: #a22f2f; font-size: 12px; }
.toast { position: fixed; z-index: 120; right: 24px; bottom: 24px; max-width: min(420px, calc(100% - 48px)); padding: 16px 20px; background: var(--mint-dark); color: white; box-shadow: 7px 8px 0 var(--ink); font-size: 12px; font-weight: 800; line-height: 1.5; }
.toast.error { background: #9d3b32; }
.chat-message.pending p:empty::after { content: "···"; animation: pulse-text 1.1s infinite; }
@keyframes pulse-text { 50% { opacity: .35; } }
.chat-composer button:disabled { opacity: .45; cursor: wait; }
.key-list { display: grid; border-top: 1px solid var(--line); }
.key-row { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.key-row span { min-width: 0; }
.key-row strong, .key-row small { display: block; overflow: hidden; text-overflow: ellipsis; }
.key-row strong { font-size: 12px; }
.key-row small { margin-top: 5px; color: var(--muted); font: 10px ui-monospace, monospace; }
.key-row button, .inline-button, .key-reveal button { padding: 8px 10px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: 800 10px inherit; cursor: pointer; }
.key-row button:disabled { opacity: .4; cursor: default; }
.key-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.inline-button { width: fit-content; border-color: var(--ink); background: var(--ink); color: white; }
.key-create-form { padding: 15px; display: grid; gap: 12px; border: 1px solid var(--ink); background: var(--paper); }
.key-create-form label { display: grid; gap: 8px; color: var(--muted); font-size: 10px; font-weight: 800; }
.key-create-form input { min-height: 42px; padding: 0 12px; border: 1px solid var(--line); background: white; color: var(--ink); font: inherit; }
.key-create-actions { display: flex; gap: 8px; }
.key-create-actions button { padding: 8px 12px; border: 1px solid var(--ink); background: var(--ink); color: white; font: 800 10px inherit; cursor: pointer; }
.key-create-actions button + button { background: transparent; color: var(--ink); }
.key-create-actions button:disabled { opacity: .45; cursor: wait; }
.key-reveal { padding: 16px; display: grid; gap: 10px; background: rgba(255,159,98,.28); border: 1px solid var(--orange); }
.key-reveal small { color: #6e4933; line-height: 1.5; }
.key-reveal code { overflow-wrap: anywhere; user-select: all; }
.usage-list { max-height: 310px; overflow-y: auto; background: var(--paper-bright); border-top: 1px solid var(--ink); }
.usage-list > div { min-height: 68px; padding: 12px 0; display: grid; grid-template-columns: 1.2fr 1fr .65fr .55fr; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); font-size: 11px; }
.usage-list strong, .usage-list small { display: block; }
.usage-list small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.usage-list b { color: var(--mint-dark); font: 800 9px ui-monospace, monospace; text-transform: uppercase; }

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-header .brand { grid-column: 1; grid-row: 1; }
  .site-header nav { grid-column: 1 / -1; grid-row: 2; width: 100%; padding: 0 0 16px; display: flex; flex-wrap: wrap; gap: 14px 24px; white-space: normal; }
  .header-actions { grid-column: 2; grid-row: 1; }
  .hero { grid-template-columns: 1fr; gap: 0; padding-bottom: 90px; }
  .hero-copy { padding-bottom: 30px; }
  .hero-grid { inset: 0; width: 100%; }
  .console-card { width: min(100%, 680px); }
  .principle-list { grid-template-columns: repeat(2, 1fr); }
  .principle-list span:nth-child(3) { border-left: 1px solid var(--line); padding-left: 22px; }
  .access-strip { align-items: flex-start; flex-direction: column; }
  .section-heading, .model-section, .billing-flow, .first-key, .faq { grid-template-columns: 1fr; }
  .section-heading > p:last-child, .model-intro > p:last-child { margin-top: 26px; }
  .model-section { gap: 64px; }
  .billing-title { position: static; margin-bottom: 38px; }
  .key-visual { min-height: 360px; }
  .faq { gap: 44px; }
  .price-formula { grid-template-columns: 1fr; }
  .pricing-principles { grid-template-columns: repeat(2, 1fr); }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-layout aside { position: static; flex-direction: row; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
  .docs-layout aside span { width: 100%; }
  .portal-hero, .api-home { grid-template-columns: 1fr; }
  .portal-hero { padding-top: 80px; }
  .chat-panel { width: min(100%, 720px); }
  .account-strip { grid-template-columns: repeat(2, 1fr); }
  .account-strip > div:nth-child(2) { border-right: 0; }
  .account-strip > div:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.12); }
  .portal-section-heading { grid-template-columns: 1fr; }
  .billing-home { grid-template-columns: 1fr; }
  .home-view { grid-template-columns: 1fr; padding-top: 64px; padding-bottom: 64px; }
  .home-dashboard { width: min(100%, 760px); }
  .api-view-grid { grid-template-columns: 1fr; }
  .billing-view-grid { grid-template-columns: 1fr; }
  footer { grid-template-columns: 1fr 1fr; }
  .footer-links { justify-self: end; }
}

@media (max-width: 640px) {
  .site-header, .hero, .principles > p, .principle-list, .section-shell, .preview-note, .access-strip, footer { width: min(calc(100% - 28px), var(--max)); }
  .site-header { min-height: 104px; padding-top: 12px; }
  .site-header nav { gap: 10px 18px; padding-bottom: 13px; font-size: 11px; }
  .header-actions { gap: 10px; }
  .button-small { min-height: 36px; padding: 0 12px; }
  h1 { font-size: clamp(52px, 17vw, 74px); }
  .hero { min-height: auto; }
  .hero-copy { padding-top: 70px; }
  .hero-lede { font-size: 16px; }
  .hero-actions { align-items: stretch; flex-direction: column; gap: 12px; }
  .text-link { width: fit-content; }
  .hero-facts { grid-template-columns: 1fr; gap: 14px; }
  .hero-facts div { display: flex; justify-content: space-between; }
  .hero-facts dd { margin: 0; }
  .console-card { box-shadow: 10px 12px 0 rgba(24,121,78,.17); }
  pre { min-height: 380px; padding: 26px 20px; font-size: 11px; }
  .console-response { align-items: flex-start; flex-direction: column; padding-top: 16px; padding-bottom: 16px; }
  .response-time { margin-left: 17px; }
  .principle-list { grid-template-columns: 1fr; }
  .principle-list span, .principle-list span:nth-child(3) { min-height: 70px; padding-left: 18px; border-left: 1px solid var(--line); }
  .platform-section { padding: 92px 0 78px; }
  .feature-grid { grid-template-columns: 1fr; margin-top: 50px; }
  .feature-grid article, .feature-grid article + article { min-height: auto; padding: 25px 0 32px; border-right: 0; border-bottom: 1px solid var(--line); }
  .feature-grid h3 { margin-top: 44px; }
  .model-section { width: 100%; padding: 82px 22px; }
  .model-card { padding: 26px 22px; }
  .model-card h3 { margin-top: 56px; }
  .preview-note { padding: 92px 0; text-align: left; }
  .preview-note > p:last-child { font-size: 15px; }
  .billing-flow { padding-bottom: 92px; }
  .billing-flow li { grid-template-columns: 42px 1fr; }
  .first-key { margin-bottom: 92px; }
  .key-visual { min-height: 300px; padding: 28px; }
  .key-secret { font-size: 24px; }
  .key-visual div { margin-top: 60px; }
  .key-copy { padding: 42px 28px; }
  .faq { padding-bottom: 92px; }
  .access-strip { margin-bottom: 60px; padding: 38px 28px; }
  .button-light { width: 100%; }
  .page-hero { padding: 72px 0 82px; }
  .page-hero > p:last-child { font-size: 15px; }
  .price-row { grid-template-columns: 1.3fr 1fr; padding: 12px 0; }
  .price-head { display: none; }
  .price-row > span { padding: 10px 12px 10px 0; }
  .price-row > span::before { display: block; margin-bottom: 5px; color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
  .price-row > span:nth-child(2)::before { content: "Input / 1M"; }
  .price-row > span:nth-child(3)::before { content: "Output / 1M"; }
  .price-row > span:nth-child(4)::before { content: "Access"; }
  html[lang^="zh"] .price-row > span:nth-child(2)::before { content: "输入 / 百万"; }
  html[lang^="zh"] .price-row > span:nth-child(3)::before { content: "输出 / 百万"; }
  html[lang^="zh"] .price-row > span:nth-child(4)::before { content: "开放状态"; }
  .price-formula { padding: 88px 0; }
  .formula-card { padding: 28px 22px; }
  .pricing-principles { grid-template-columns: 1fr; margin-bottom: 88px; }
  .pricing-principles article, .pricing-principles article + article { min-height: auto; padding: 24px 0 28px; border-right: 0; border-bottom: 1px solid var(--line); }
  .pricing-principles h3 { margin-top: 38px; }
  .endpoint-banner { margin-bottom: 70px; align-items: flex-start; flex-direction: column; }
  .endpoint-banner div { align-items: flex-start; flex-direction: column; gap: 10px; }
  .docs-layout { padding-bottom: 88px; }
  .docs-content > section { padding-bottom: 64px; }
  .docs-content > section + section { padding-top: 64px; }
  .doc-code pre { font-size: 10px; }
  .route-list div { grid-template-columns: 1fr; gap: 8px; }
  .error-grid { grid-template-columns: repeat(2, 1fr); }
  .error-grid div:nth-child(2) { border-right: 0; }
  .footer-regulatory { flex-direction: column; }
  .portal-hero { padding-top: 64px; padding-bottom: 76px; }
  .portal-intro h1 { font-size: clamp(50px, 15vw, 70px); }
  .chat-thread { height: 320px; padding: 24px 16px; }
  .chat-message p { max-width: 86%; font-size: 12px; }
  .account-strip { margin-bottom: 88px; grid-template-columns: 1fr; }
  .account-strip > div { min-height: 94px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .portal-section { padding-bottom: 92px; }
  .portal-row { grid-template-columns: 1.2fr 1fr; padding: 12px 0; }
  .portal-table-head { display: none; }
  .portal-row > span { padding: 9px 10px 9px 0; }
  .api-home { gap: 45px; }
  .home-code pre { min-height: auto; }
  .billing-home { width: 100%; }
  .billing-card, .balance-receipt { padding: 42px 26px; }
  .amount-options { flex-wrap: wrap; }
  .usage-grid { grid-template-columns: 1fr; }
  .usage-grid article, .usage-grid article + article { min-height: 135px; padding: 24px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .usage-chart { height: 210px; gap: 10px; padding-left: 12px; padding-right: 12px; }
  .app-view { width: min(calc(100% - 28px), var(--max)); padding: 34px 0 40px; justify-content: flex-start; }
  .view-heading { align-items: flex-start; flex-direction: column; gap: 8px; margin-bottom: 26px; }
  .view-heading h1 { font-size: 42px; }
  .home-view { padding-top: 46px; }
  .home-dashboard { grid-template-columns: 1fr; }
  .home-stat, .home-stat:nth-child(2n), .home-stat:nth-last-child(-n+2) { min-height: 105px; border-right: 0; border-bottom: 1px solid var(--line); }
  .quick-pages { grid-template-columns: repeat(2, 1fr); }
  .quick-pages a:last-child { grid-column: 1 / -1; }
  .chat-view .chat-thread { height: 340px; }
  .market-tools { align-items: flex-start; flex-direction: column; }
  .billing-view-grid .billing-card, .billing-view-grid .balance-receipt { padding: 34px 24px; }
  .app-footer { width: min(calc(100% - 28px), var(--max)); align-items: flex-start; flex-direction: column; }
  .login-box { padding: 34px 24px; box-shadow: 8px 9px 0 var(--mint-dark); }
  .usage-list > div { grid-template-columns: 1fr 1fr; gap: 8px 14px; }
  footer { grid-template-columns: 1fr; }
  .footer-links { justify-self: start; }
}
