/* Soma Seoul
   Layout: left-aligned editorial storefront. The hero is a Seoul-Metro-style route map (four provider lines
   into one Soma Seoul interchange, one line on to "your app"); everything after it is quiet: rate card,
   credits, docs, then a calm console for the dashboard.
   Colour: cool hanji paper, with the logo's deep green for actions and its gold for figures. */
:root {
  --bg: #f1f3ef;          /* hanji paper, cool */
  --surface: #ffffff;
  --sunk: #e6eae6;
  --ink: #18201d;
  --muted: #59665f;
  --line: #d3dad5;
  --accent: #2e4f3e;      /* logo green */
  --accent-ink: #ffffff;
  --accent-soft: #dde8e1;
  --logo-green: #2e4f3e;  /* logo colours: fixed in both themes */
  --logo-gold: #b08d57;
  --logo-line: #1e251e;
  --good: #2b7a4b;
  --bad: #b5362b;
  --warn: #8a6410;
  --readout-bg: #18201d;
  --readout-fg: #e9eeeb;
  --readout-num: #d9b97f;  /* logo gold, lightened for the dark panel */
  --l-anthropic: #c8643b;
  --l-openai: #1f7a8c;
  --l-azure: #3557c9;
  --l-google: #8b4fc2;
  --display: "Gowun Batang", "Noto Serif SC", "Songti SC", Georgia, serif;
  --body: "Gothic A1", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --radius: 6px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111715; --surface: #18201d; --sunk: #0d1210; --ink: #e4ebe7; --muted: #95a39d; --line: #28332f;
    --accent: #9cc3ae; --accent-ink: #0c1411; --accent-soft: #1f332a; --good: #6cc08f; --bad: #ec8577; --warn: #e2b55a;
    --readout-bg: #0a0f0d; --readout-fg: #e4ebe7; --readout-num: #d9b97f;
    --l-anthropic: #e08a63; --l-openai: #4fb1c4; --l-azure: #7e9bf0; --l-google: #b78be3;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111715; --surface: #18201d; --sunk: #0d1210; --ink: #e4ebe7; --muted: #95a39d; --line: #28332f;
  --accent: #9cc3ae; --accent-ink: #0c1411; --accent-soft: #1f332a; --good: #6cc08f; --bad: #ec8577; --warn: #e2b55a;
  --readout-bg: #0a0f0d; --readout-fg: #e4ebe7; --readout-num: #d9b97f;
  --l-anthropic: #e08a63; --l-openai: #4fb1c4; --l-azure: #7e9bf0; --l-google: #b78be3;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.65 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -0.005em; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
code, .mono { font-family: var(--mono); font-size: 0.9em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.wrap { max-width: 1160px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 40px); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 11px; white-space: nowrap; }
.brand-logo { width: 40px; height: 40px; display: block; flex: none; }
/* Wordmark set like the logo's lettering: heavy SOMA, light, widely spaced SEOUL */
.wordmark { font-family: var(--body); text-transform: uppercase; display: inline-flex; align-items: baseline; gap: 8px; line-height: 1; }
.wm-soma { font-weight: 700; font-size: 18px; letter-spacing: 0.14em; }
.wm-seoul { font-weight: 400; font-size: 12px; letter-spacing: 0.32em; color: var(--muted); }
.nav { display: flex; align-items: center; gap: clamp(10px, 2vw, 22px); flex-wrap: wrap; justify-content: flex-end; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--accent); }
.nav a.btn-primary, .nav a.btn-primary:hover { color: var(--accent-ink); } /* header link colour mustn't override the button's */

/* Buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 700 14px var(--body); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--accent); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: none; border-color: transparent; color: var(--muted); padding-inline: 8px; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
input, select, textarea { font: 15px var(--body); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; width: 100%; }
textarea { resize: vertical; min-height: 90px; font-family: var(--body); }

/* Hero: route map */
.hero { padding-block: clamp(36px, 7vw, 84px) clamp(28px, 5vw, 56px); display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 5vw, 56px); align-items: center; }
.hero > * { min-width: 0; }
.eyebrow { font: 700 14px var(--body); color: var(--accent); margin-bottom: 14px; }
.hero h1 { font-size: clamp(36px, 4.6vw, 56px); line-height: 1.1; margin-bottom: 20px; }
section[id] { scroll-margin-top: calc(72px + env(safe-area-inset-top, 0px)); }
.hero .lede { font-size: 17px; color: var(--muted); max-width: 50ch; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.route { width: 100%; max-width: 100%; height: auto; display: block; overflow: visible; }
.route .ln { fill: none; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.route .ln-anthropic { stroke: var(--l-anthropic); } .route .ln-openai { stroke: var(--l-openai); }
.route .ln-azure { stroke: var(--l-azure); } .route .ln-google { stroke: var(--l-google); }
.route .trunk { fill: none; stroke: var(--ink); stroke-width: 10; stroke-linecap: round; }
.route .stop { fill: var(--surface); stroke-width: 4; }
.route .stop-anthropic { stroke: var(--l-anthropic); } .route .stop-openai { stroke: var(--l-openai); }
.route .stop-azure { stroke: var(--l-azure); } .route .stop-google { stroke: var(--l-google); }
.route .interchange { fill: var(--surface); stroke: var(--ink); stroke-width: 4; }
.route .mk-gold { fill: var(--logo-gold); }
.route .mk-green { fill: var(--logo-green); }
.route .mk-line { fill: none; stroke: var(--logo-line); stroke-width: 1.5; }
.route .terminus { fill: var(--surface); stroke: var(--ink); stroke-width: 5; }
.route text { font-family: var(--body); fill: var(--ink); }
.route .t-line { font-size: 15px; font-weight: 700; }
.route .t-model { font-size: 12px; fill: var(--muted); }
.route .t-hub { font: 700 17px var(--display); }
.route .t-end { font-size: 15px; font-weight: 700; }
.route .t-key { font: 12px var(--mono); fill: var(--muted); }

/* Sections */
section.block { padding-block: clamp(36px, 6vw, 64px); border-top: 1px solid var(--line); }
.block-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.block-head h2 { font-size: clamp(26px, 3.4vw, 38px); }
.block-head p { color: var(--muted); max-width: 60ch; margin-top: 6px; }

/* Cost estimate */
.meter { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: clamp(18px, 3vw, 26px); display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px 28px; align-items: stretch; }
.meter > * { min-width: 0; }
.meter-fields { display: grid; gap: 14px; align-content: start; }
.meter-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.readout { background: var(--readout-bg); color: var(--readout-fg); border-radius: 8px; padding: 20px 22px; display: grid; gap: 8px; align-content: center; }
.readout .label { font: 500 13px var(--body); opacity: 0.75; }
.readout .big { font: 700 clamp(30px, 4vw, 40px) var(--body); color: var(--readout-num); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.readout .split { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; opacity: 0.85; font-variant-numeric: tabular-nums; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: 500 13px var(--body); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Rate card */
.table-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 700 12px var(--body); color: var(--muted); background: var(--sunk); }
tr:last-child td { border-bottom: 0; }
td.price { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 700; }
td.price .list { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.model-name { font-weight: 700; }
.foot { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; max-width: 44ch; }
.tier { font-size: 12px; color: var(--muted); }
.tier.unconfirmed { color: var(--warn); font-weight: 700; }
.lang-btn { min-width: 48px; font-family: var(--body); }
/* Chinese text reads better a little looser */
:root[data-lang="zh"] body { line-height: 1.8; }
:root[data-lang="zh"] h1, :root[data-lang="zh"] h2, :root[data-lang="zh"] h3 { letter-spacing: 0; line-height: 1.3; }
/* Provider marker: a line-colour roundel, like a metro line badge */
.prov { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.prov::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 3.5px var(--dot, var(--muted)); }
.prov-anthropic { --dot: var(--l-anthropic); } .prov-openai { --dot: var(--l-openai); } .prov-azure { --dot: var(--l-azure); } .prov-google { --dot: var(--l-google); }
.chip.prov::before { width: 10px; height: 10px; }
.idcopy { font: 12px var(--mono); background: var(--sunk); border: 1px solid var(--line); border-radius: 4px; padding: 4px 8px; color: var(--ink); cursor: pointer; white-space: nowrap; }
.table-note { margin-top: 12px; font-size: 13px; color: var(--muted); }

/* Credit packs */
.packs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pack { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 22px; display: grid; gap: 10px; align-content: start; }
.pack.featured { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pack .tag { font: 700 12px var(--body); color: var(--accent); min-height: 1.2em; }
.pack h3 { font-size: 21px; }
.pack .amt { font: 700 34px var(--body); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.pack .gets { font-size: 13px; color: var(--muted); }
.pack .gets strong { color: var(--good); font-weight: 700; }

/* Docs */
.docs { display: grid; grid-template-columns: 1fr 1.3fr; gap: 24px; }
.docs > * { min-width: 0; }
.steps { display: grid; gap: 18px; counter-reset: s; padding: 0; margin: 0; }
.steps li { list-style: none; display: grid; grid-template-columns: 30px 1fr; gap: 12px; }
.steps li::before { counter-increment: s; content: counter(s); font: 700 14px var(--display); width: 28px; height: 28px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 3px var(--ink); display: grid; place-items: center; color: var(--ink); }
pre.code { margin: 0; background: var(--readout-bg); color: var(--readout-fg); border-radius: 10px; padding: 18px; overflow-x: auto; font: 13px/1.65 var(--mono); }
pre.code .k { color: var(--readout-num); }

/* Auth */
.auth { max-width: 420px; margin: clamp(32px, 8vw, 80px) auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 28px; display: grid; gap: 16px; }
.auth h1 { font-size: 30px; }
.auth form { display: grid; gap: 14px; }
.switch { font-size: 14px; color: var(--muted); }
.switch button { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
.form-error { color: var(--bad); font-size: 14px; }

/* Dashboard */
.dash { padding-block: clamp(28px, 5vw, 48px); display: grid; gap: 20px; }
.dash-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.dash-head h1 { font-size: clamp(26px, 4vw, 38px); word-break: break-all; }
.dash-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 20px; }
.dash-grid > * { min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px; display: grid; gap: 14px; align-content: start; }
.panel h2 { font-size: 20px; }
.balance { font: 700 40px var(--body); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.bal-low { color: var(--bad); }
.topups { display: flex; flex-wrap: wrap; gap: 8px; }
.keys { display: grid; gap: 8px; }
.key-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; background: var(--sunk); border-radius: var(--radius); flex-wrap: wrap; }
.key-row .mono { color: var(--muted); }
.new-key { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: var(--radius); padding: 12px; display: grid; gap: 8px; }
.new-key code { word-break: break-all; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; }
.inline > input { flex: 1; min-width: 160px; }
.usage td, .usage th { padding: 10px 12px; font-size: 13px; }
.usage table { min-width: 560px; }
.reply { background: var(--sunk); border-radius: var(--radius); padding: 14px; white-space: pre-wrap; font-size: 14px; }
.receipt { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.receipt strong { color: var(--accent); }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }

.banner { background: var(--readout-bg); color: var(--readout-fg); font-size: 13px; text-align: center; padding: 8px 16px; }
.banner code { color: var(--readout-num); }
/* Contact form */
.contact-panel { gap: 16px; }
.contact-panel h1 { font-size: clamp(28px, 4vw, 40px); }
.contact-form { display: grid; gap: 14px; }
.contact-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form .two > * { min-width: 0; }
.contact-form textarea { min-height: 140px; }
.hint { font-weight: 400; font-size: 12px; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.order-help a, .footer a { color: var(--accent); }
.footer { border-top: 1px solid var(--line); padding-block: 28px; color: var(--muted); font-size: 13px; display: grid; gap: 6px; }

.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 16px); background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 8px; font-size: 14px; opacity: 0; transition: all 0.2s; pointer-events: none;
  display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px); z-index: 70; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.has-action { pointer-events: auto; }
.toast-action { background: none; border: 0; color: inherit; font: 700 14px var(--body); text-decoration: underline; cursor: pointer; padding: 0; white-space: nowrap; }

/* Cart button in the header */
.cart-btn { position: relative; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 6px; display: inline-grid; place-items: center; }
.cart-btn:hover { color: var(--accent); }
.cart-count { position: absolute; top: -3px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font: 700 11px var(--body); display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.cart-count.bump { animation: bump 0.45s ease; }
@keyframes bump { 40% { transform: scale(1.45); } }

/* Pack "in cart" note and custom amount row */
.in-cart { color: var(--good); font: 700 12px var(--body); min-height: 1.2em; }
.custom-amount { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; background: var(--surface); border: 1px dashed var(--line); border-radius: 10px; padding: 18px 22px; }
.ca-text { flex: 1 1 240px; min-width: 0; }
.ca-text h3 { font-size: 19px; margin-bottom: 2px; }
.ca-input { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); padding-left: 12px; font: 700 16px var(--body); }
.ca-input input { border: 0; background: none; width: 110px; font: 700 16px var(--body); padding-left: 4px; }
.ca-input input:focus { outline: none; }
.ca-input:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Cart drawer */
.cart-overlay { position: fixed; inset: 0; background: rgba(10, 16, 14, 0.45); opacity: 0; pointer-events: none; transition: opacity 0.25s; z-index: 60; }
.cart-overlay.show { opacity: 1; pointer-events: auto; }
.cart { position: fixed; top: 0; right: 0; bottom: 0; z-index: 65; width: min(420px, 100%); background: var(--surface); border-left: 1px solid var(--line);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.28s ease; visibility: hidden;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.cart.open { transform: none; visibility: visible; }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.cart-head h2 { font-size: 21px; }
.icon-btn { background: none; border: 0; color: var(--ink); font-size: 18px; cursor: pointer; padding: 6px; }
.cart-body { flex: 1; overflow-y: auto; padding: 4px 22px; }
.cart-line { display: flex; justify-content: space-between; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cl-main { display: grid; gap: 4px; min-width: 0; }
.cl-end { display: grid; justify-items: end; align-content: space-between; gap: 8px; font: 700 15px var(--body); font-variant-numeric: tabular-nums; }
.stepper { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.stepper button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 16px; cursor: pointer; display: grid; place-items: center; }
.stepper button:disabled { opacity: 0.4; cursor: not-allowed; }
.stepper .num { min-width: 22px; text-align: center; font: 700 14px var(--body); }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); font: 13px var(--body); text-decoration: underline; cursor: pointer; }
.linkish.center { justify-self: center; padding: 4px; }
.cart-empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 40px 0; }
.cart-foot { border-top: 1px solid var(--line); padding: 16px 22px; display: grid; gap: 10px; }
.cart-summary, .order-sum { display: grid; gap: 6px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; font-variant-numeric: tabular-nums; }
.sum-row.good { color: var(--good); }
.sum-row.total { font-size: 16px; padding-top: 8px; border-top: 1px dashed var(--line); }
.sum-row.total strong { color: var(--ink); }
.full { width: 100%; }

/* Checkout and order pages */
.narrow { max-width: 640px; }
.checkout, .narrow { padding-block: clamp(28px, 5vw, 56px); }
.co-head { display: grid; gap: 8px; margin-bottom: 22px; }
.co-head h1 { font-size: clamp(28px, 4vw, 42px); }
.co-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.co-grid > * { min-width: 0; }
.co-items-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.table-scroll.flat { border: 0; border-radius: 0; background: none; }
.co-table { min-width: 0; }
.co-table td { padding: 12px 0; }
.co-table td + td { padding-left: 14px; text-align: right; white-space: nowrap; }
.co-summary { position: sticky; top: calc(76px + env(safe-area-inset-top, 0px)); gap: 12px; }
.co-account { display: grid; gap: 2px; padding: 10px 12px; background: var(--sunk); border-radius: var(--radius); word-break: break-all; }
.co-note { line-height: 1.55; }
.center-panel { text-align: center; justify-items: center; padding-block: 36px; }
.order-panel { gap: 12px; }
.order-panel h1 { font-size: clamp(26px, 4vw, 36px); }
.order-mark { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; }
.order-mark.ok { background: var(--accent-soft); }
.order-mark.ok::after { content: ""; width: 14px; height: 8px; border: solid var(--good); border-width: 0 0 3px 3px; transform: translateY(-2px) rotate(-45deg); }
.order-mark.wait { border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
.order-mark.bad { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); }
.order-mark.bad::after { content: "!"; color: var(--bad); font: 700 20px var(--display); }
@keyframes spin { to { transform: rotate(360deg); } }
.order-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.pill { display: inline-block; font: 700 12px var(--body); padding: 3px 9px; border-radius: 999px; background: var(--sunk); color: var(--muted); }
.pill-paid { background: var(--accent-soft); color: var(--good); }
.pill-pending { background: color-mix(in srgb, var(--warn) 16%, var(--surface)); color: var(--warn); }
.pill-expired, .pill-failed { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); color: var(--bad); }
.orders-table { min-width: 380px; }
.keep-case { text-transform: none; letter-spacing: 0; user-select: all; font-family: var(--mono); font-weight: 500; }
.orders td, .orders th { padding: 10px 12px; font-size: 13px; }

@media (max-width: 900px) {
  .co-grid { grid-template-columns: 1fr; }
  .co-summary { position: static; }
  .hero, .docs, .dash-grid, .meter, .contact-form .two { grid-template-columns: 1fr; }
  .packs { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .toast { left: 16px; right: 16px; transform: translateY(16px); justify-content: space-between; max-width: none; }
  .toast.show { transform: none; }
  .meter-grid { grid-template-columns: 1fr 1fr; }
  .meter-grid label:last-child { grid-column: 1 / -1; }
  /* The route map shrinks on phones; keep its labels readable by dropping the small ones */
  .route .t-model, .route .t-key { display: none; }
  .route .t-line, .route .t-end { font-size: 21px; }
  .route .t-hub { font-size: 22px; }
}
@media (max-width: 480px) {
  .packs { grid-template-columns: 1fr; }
  .nav .hide-sm { display: none; }
  .brand-logo { width: 36px; height: 36px; }
  .wm-soma { font-size: 16px; }
}
