/* TacoAI theme tokens — Atelier. Drop-in: replaces the :root / [data-theme=dark] / @media blocks at the top
   of web/src/styles.css. Existing variable names are kept (--bg, --surface, --ink, --accent, --ok-*, ...);
   new ones: --surface-solid, --popover, --accent-bg, --focus, --track, --meter-fill, --progress-fill, --pip-off,
   --t-{free,low,medium,high,premium}[-ink], --inverse-muted, --font-*, --display-weight, --r-btn, art tokens.
   Generated by tools/tokens.mjs — edit there. */
:root {
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --display-weight: 480;
  --r: 6px;
  --r-sm: 4px;
  --r-btn: 999px;
  --bg: #F6F0E6;
  --surface: #FFFBF4;
  --surface-solid: #FFFDF8;
  --subtle: #F1E8DA;
  --popover: #FFFDF8;
  --border: #E4D8C6;
  --border-strong: #CDBBA2;
  --input-border: #8C7B66;
  --ink: #1E1A16;
  --muted: #594E43;
  --faint: #6B5F52;
  --accent: #B5441B;
  --accent-bg: #B5441B;
  --accent-hover: #93360F;
  --accent-fg: #A63D16;
  --accent-soft: #F8E6D6;
  --accent-line: #EBC3A6;
  --on-accent: #FFFFFF;
  --focus: #A63D16;
  --track: #E9DECD;
  --meter-fill: linear-gradient(90deg, #C27A12, #B5441B 70%, #8F2F3F);
  --pip-off: #E0D3BF;
  --progress-fill: linear-gradient(45deg, rgba(255,255,255,.22) 25%, transparent 25% 50%, rgba(255,255,255,.22) 50% 75%, transparent 75%), linear-gradient(90deg, #C27A12, #B5441B);
  --t-free: #4A7656;
  --t-low: #3A6B84;
  --t-medium: #986A0F;
  --t-high: #B5441B;
  --t-premium: #7B2D52;
  --t-free-ink: #3C6347;
  --t-low-ink: #305B70;
  --t-medium-ink: #7F570A;
  --t-high-ink: #9E3B17;
  --t-premium-ink: #7B2D52;
  --inverse-bg: #231D18;
  --inverse-fg: #F3EADC;
  --inverse-muted: #BCAE9B;
  --inverse-hover: #3A3129;
  --header-bg: rgba(246,240,230,.84);
  --shadow: 0 1px 0 rgba(60,40,20,.04), 0 6px 22px -8px rgba(60,40,20,.14);
  --shadow-lg: 0 2px 4px rgba(60,40,20,.05), 0 22px 48px -16px rgba(60,40,20,.25);
  --btn-shadow: none;
  --teal: #2F6B6B;
  --teal-hover: #245656;
  --ok: #3F7A4E;
  --ok-ink: #2F6140;
  --ok-soft: #EEF4EC;
  --ok-line: #C8DCC6;
  --bad: #A3311F;
  --bad-ink: #8A2616;
  --bad-soft: #F9E9E3;
  --bad-line: #EBC0B3;
  --warn-ink: #7A560A;
  --warn-soft: #FAF1DC;
  --warn-line: #E8D29A;
  --art-1: #E8A33D;
  --art-2: #C9542A;
  --art-3: #8F2F3F;
  --art-4: #3A6B84;
  --art-paper: #F6F0E6;
  --art-ink: #1E1A16;
  --grain-opacity: .32;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #15110E;
  --surface: #1E1915;
  --surface-solid: #221C17;
  --subtle: #2B241E;
  --popover: #251F1A;
  --border: #352D25;
  --border-strong: #4A3F34;
  --input-border: #857664;
  --ink: #F2E9DB;
  --muted: #C4B6A3;
  --faint: #A69885;
  --accent: #E8834A;
  --accent-bg: #E8834A;
  --accent-hover: #F09A66;
  --accent-fg: #F0975E;
  --accent-soft: #3A2518;
  --accent-line: #5C3A22;
  --on-accent: #1A120C;
  --focus: #F0975E;
  --track: #30281F;
  --meter-fill: linear-gradient(90deg, #E8A33D, #E8834A 70%, #D97A8E);
  --pip-off: #3D342A;
  --progress-fill: linear-gradient(45deg, rgba(0,0,0,.14) 25%, transparent 25% 50%, rgba(0,0,0,.14) 50% 75%, transparent 75%), linear-gradient(90deg, #E8A33D, #E8834A);
  --t-free: #8DBB97;
  --t-low: #86B6CE;
  --t-medium: #E0B252;
  --t-high: #F0975E;
  --t-premium: #D893B5;
  --t-free-ink: #8DBB97;
  --t-low-ink: #86B6CE;
  --t-medium-ink: #E0B252;
  --t-high-ink: #F0975E;
  --t-premium-ink: #D893B5;
  --inverse-bg: #F2E9DB;
  --inverse-fg: #1E1A16;
  --inverse-muted: #5A4F44;
  --inverse-hover: #E2D6C4;
  --header-bg: rgba(21,17,14,.82);
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.5);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.4), 0 24px 50px -16px rgba(0,0,0,.6);
  --btn-shadow: none;
  --teal: #5FA8A8;
  --teal-hover: #7BBDBD;
  --ok: #86C49A;
  --ok-ink: #A6D8B4;
  --ok-soft: #16231A;
  --ok-line: #2E4A36;
  --bad: #F08B78;
  --bad-ink: #F6A898;
  --bad-soft: #2D1813;
  --bad-line: #5A2C22;
  --warn-ink: #EBCB7E;
  --warn-soft: #2A2212;
  --warn-line: #5A4818;
  --art-1: #E8A33D;
  --art-2: #D9622B;
  --art-3: #A8445A;
  --art-4: #4E86A1;
  --art-paper: #15110E;
  --art-ink: #F2E9DB;
  --grain-opacity: .22;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #15110E;
    --surface: #1E1915;
    --surface-solid: #221C17;
    --subtle: #2B241E;
    --popover: #251F1A;
    --border: #352D25;
    --border-strong: #4A3F34;
    --input-border: #857664;
    --ink: #F2E9DB;
    --muted: #C4B6A3;
    --faint: #A69885;
    --accent: #E8834A;
    --accent-bg: #E8834A;
    --accent-hover: #F09A66;
    --accent-fg: #F0975E;
    --accent-soft: #3A2518;
    --accent-line: #5C3A22;
    --on-accent: #1A120C;
    --focus: #F0975E;
    --track: #30281F;
    --meter-fill: linear-gradient(90deg, #E8A33D, #E8834A 70%, #D97A8E);
    --pip-off: #3D342A;
    --progress-fill: linear-gradient(45deg, rgba(0,0,0,.14) 25%, transparent 25% 50%, rgba(0,0,0,.14) 50% 75%, transparent 75%), linear-gradient(90deg, #E8A33D, #E8834A);
    --t-free: #8DBB97;
    --t-low: #86B6CE;
    --t-medium: #E0B252;
    --t-high: #F0975E;
    --t-premium: #D893B5;
    --t-free-ink: #8DBB97;
    --t-low-ink: #86B6CE;
    --t-medium-ink: #E0B252;
    --t-high-ink: #F0975E;
    --t-premium-ink: #D893B5;
    --inverse-bg: #F2E9DB;
    --inverse-fg: #1E1A16;
    --inverse-muted: #5A4F44;
    --inverse-hover: #E2D6C4;
    --header-bg: rgba(21,17,14,.82);
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.5);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.4), 0 24px 50px -16px rgba(0,0,0,.6);
    --btn-shadow: none;
    --teal: #5FA8A8;
    --teal-hover: #7BBDBD;
    --ok: #86C49A;
    --ok-ink: #A6D8B4;
    --ok-soft: #16231A;
    --ok-line: #2E4A36;
    --bad: #F08B78;
    --bad-ink: #F6A898;
    --bad-soft: #2D1813;
    --bad-line: #5A2C22;
    --warn-ink: #EBCB7E;
    --warn-soft: #2A2212;
    --warn-line: #5A4818;
    --art-1: #E8A33D;
    --art-2: #D9622B;
    --art-3: #A8445A;
    --art-4: #4E86A1;
    --art-paper: #15110E;
    --art-ink: #F2E9DB;
    --grain-opacity: .22;
    color-scheme: dark;
  }
}

:root { font-family: var(--font-body); font-feature-settings: "cv11", "ss01"; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; line-height: 1.55; font-size: 15px; }
main { flex: 1; outline: none; }
img, video { max-width: 100%; display: block; }
a { color: var(--accent-fg); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -.022em; font-weight: 650; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); }
h3, .h3 { font-size: 1.02rem; letter-spacing: -.01em; }
p { margin: 0 0 1rem; }
.wrap { width: min(1140px, 100% - 2.5rem); margin-inline: auto; }
.narrow { max-width: 760px; }
.center { text-align: center; } .center.cta-row { justify-content: center; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.small { font-size: .9rem; } .tiny { font-size: .8rem; }
.accent { color: var(--accent-fg); }
.nowrap { white-space: nowrap; }
.mt { margin-top: .75rem; }
.lead { font-size: 1.1rem; }
.eyebrow { font-size: .78rem; font-weight: 600; color: var(--accent-fg); margin-bottom: .6rem; letter-spacing: .01em; }
.skip { position: absolute; left: -999px; top: 0; background: var(--inverse-bg); color: var(--inverse-fg); padding: .5rem 1rem; z-index: 99; }
.skip:focus { left: .5rem; top: .5rem; }
:focus-visible { outline: 2px solid var(--accent-fg); outline-offset: 2px; border-radius: 6px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 18px; height: 18px; flex: none; }
.ico.xs { width: 14px; height: 14px; } .ico.lg { width: 28px; height: 28px; }

/* header */
.mock-banner { background: var(--inverse-bg); color: var(--inverse-fg); border-bottom: 1px solid var(--border); font-size: .78rem; text-align: center; padding: .3rem 1rem; }
.mock-banner button { font: inherit; background: none; border: 0; color: var(--inverse-fg); text-decoration: underline; cursor: pointer; margin-left: .4rem; font-weight: 600; }
.site-header { background: var(--header-bg); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.header-row { display: flex; align-items: center; gap: 1.5rem; min-height: 60px; }
.wordmark { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.08rem; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.wordmark .mark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: .85rem; font-weight: 800; }
.wordmark.sm { font-size: 1rem; margin-bottom: .4rem; }
.nav { display: flex; gap: .15rem; }
.nav a { padding: .4rem .7rem; border-radius: var(--r-sm); text-decoration: none; color: var(--muted); font-weight: 500; font-size: .92rem; white-space: nowrap; }
.nav a:hover { color: var(--ink); background: var(--subtle); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--subtle); }
.account { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.account .account { margin-left: 0; }
.chip { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--border); background: var(--surface); color: var(--ink); padding: .32rem .7rem; border-radius: 999px; font-weight: 600; font-size: .85rem; text-decoration: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--border-strong); }
.chip .dot, .status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); font: inherit; font-weight: 600; font-size: .92rem; padding: .6rem 1rem; border-radius: var(--r-sm); cursor: pointer; text-decoration: none; min-height: 40px; transition: background .15s, border-color .15s, box-shadow .15s; box-shadow: 0 1px 2px rgba(28,25,23,.08); }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.sm { min-height: 34px; padding: .35rem .75rem; font-size: .85rem; }
.btn.lg { min-height: 46px; padding: .7rem 1.25rem; font-size: 1rem; }
.btn.block { width: 100%; }
.btn.ghost, .btn.outline { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn.ghost:hover, .btn.outline:hover { background: var(--subtle); border-color: var(--border-strong); }
.btn.outline { min-height: 46px; font-weight: 500; }
.btn.teal { background: var(--teal); border-color: var(--teal); } .btn.teal:hover { background: var(--teal-hover); border-color: var(--teal-hover); }
.btn[disabled], .btn[aria-disabled="true"], .btn[disabled]:hover { background: var(--subtle); border-color: var(--border); color: var(--faint); cursor: not-allowed; box-shadow: none; }
.btn .spinner, .status .spinner { width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none !important; } }
.link { display: inline-flex; gap: .3rem; align-items: center; font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* surfaces */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); padding: 1.25rem; }
.pad-lg { padding: 1.5rem; }
.grid { display: grid; gap: 1rem; }
.g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); } .g5 { grid-template-columns: repeat(5, 1fr); }
.section { padding: 4.5rem 0; }
.section.alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 2rem; }
.section-title { margin-top: 3rem; }
.page-head { padding: 3rem 0 1.75rem; }
.page-head.narrow { padding-top: 3.5rem; }
.page-head .lead { max-width: 60ch; }
.page-head.center .lead { margin-inline: auto; }

/* hero */
.hero { padding: 5rem 0 4.5rem; background: radial-gradient(900px 400px at 85% -10%, var(--accent-soft), transparent 70%); border-bottom: 1px solid var(--border); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3.5rem; align-items: center; }
.hero .lead { color: var(--muted); max-width: 46ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 0; }
.trust { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-size: .85rem; color: var(--muted); padding: 0; list-style: none; margin: 1.75rem 0 0; }
.trust li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: .5rem; vertical-align: middle; }
.preview { padding: 1.25rem; box-shadow: var(--shadow-lg); display: grid; gap: .9rem; }
.preview-top { display: flex; gap: .4rem; }
.tab-pill { display: inline-flex; gap: .35rem; align-items: center; font-size: .8rem; padding: .3rem .65rem; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
.tab-pill .ico { width: 14px; height: 14px; }
.tab-pill.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.preview-tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.pt { border: 1px solid var(--border); border-radius: var(--r-sm); padding: .55rem; display: grid; gap: .1rem; font-size: .85rem; }
.pt.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.preview-prompt { border: 1px solid var(--border); border-radius: var(--r-sm); padding: .75rem; color: var(--muted); font-size: .88rem; min-height: 64px; background: var(--bg); }
.preview-result { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }

.cat-card { text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; display: block; }
.cat-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.cat-ico { width: 36px; height: 36px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-fg); display: grid; place-items: center; margin-bottom: .9rem; border: 1px solid var(--accent-line); }
.cat-card p { margin-bottom: .5rem; }
.tier-names { margin: .75rem 0 0; padding-top: .6rem; border-top: 1px solid var(--border); }
.steps { list-style: none; padding: 0; margin: 0; }
.step-n { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border-strong); display: grid; place-items: center; font-size: .8rem; font-weight: 600; margin-bottom: .9rem; color: var(--muted); }
.steps p { margin: 0; font-size: .92rem; }
.demo-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 3rem; align-items: start; }
.cta-band { display: flex; justify-content: space-between; align-items: center; gap: 2rem; padding: 2rem; flex-wrap: wrap; }
.cta-band p { margin: 0; } .cta-band .cta-row { margin: 0; }

/* forms */
.field { display: grid; gap: .35rem; margin-bottom: 1rem; }
.field label, legend { font-weight: 600; font-size: .88rem; }
.field textarea, .field input, .field select { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--input-border); border-radius: var(--r-sm); padding: .6rem .75rem; min-height: 40px; }
.field textarea { resize: vertical; }
.field textarea:focus, .field input:focus, .field select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: end; }
.row > .field { flex: 1 1 180px; }
.row > .field.grow-0 { flex: 0 0 auto; }
.narrow-field { max-width: 220px; }
.form-error { color: var(--bad); font-size: .88rem; margin: .5rem 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: -.25rem 0 1rem; }
.chips button { font: inherit; font-size: .8rem; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .3rem .7rem; cursor: pointer; color: var(--muted); }
.chips button:hover { border-color: var(--border-strong); color: var(--ink); }
.answer { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 1rem; white-space: pre-wrap; margin-top: 1rem; font-size: .93rem; }
.answer .who { font-weight: 600; font-size: .78rem; color: var(--accent-fg); display: block; margin-bottom: .3rem; }
.alert { border-radius: var(--r-sm); padding: .7rem .9rem; margin-top: 1rem; background: var(--bad-soft); border: 1px solid var(--bad-line); color: var(--bad-ink); font-size: .9rem; }
.alert.info { background: var(--subtle); border-color: var(--border); color: var(--ink); }
.notice { display: inline-flex; gap: .45rem; align-items: center; font-size: .85rem; color: var(--muted); border: 1px solid var(--border); background: var(--surface); padding: .35rem .8rem; border-radius: 999px; }

/* auth */
.auth { display: grid; place-items: center; padding: 4rem 0; }
.auth-card { width: min(420px, 100%); padding: 2rem; box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 1.5rem; letter-spacing: -.02em; }
.auth-buttons { display: grid; gap: .6rem; margin-top: 1.5rem; }
.divider { display: flex; align-items: center; gap: .75rem; color: var(--faint); font-size: .8rem; margin: 1.25rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.terms { margin-top: 1.25rem; margin-bottom: 0; }

/* studio */
.tabs { display: flex; gap: .25rem; overflow-x: auto; padding: .25rem; margin-bottom: 1.25rem; background: var(--subtle); border: 1px solid var(--border); border-radius: 10px; width: max-content; max-width: 100%; }
.tab { font: inherit; font-weight: 500; font-size: .9rem; display: inline-flex; gap: .4rem; align-items: center; border: 1px solid transparent; background: transparent; color: var(--muted); padding: .45rem .9rem; border-radius: 7px; cursor: pointer; white-space: nowrap; min-height: 36px; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); border-color: var(--border); box-shadow: var(--shadow); }
.tab .ico { width: 16px; height: 16px; }
.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin: 0 0 1.25rem; border: 0; padding: 0; min-width: 0; }
.tiers legend { margin-bottom: .6rem; padding: 0; }
.tier { position: relative; display: block; }
.tier input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.tier .face { border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: .8rem; height: 100%; display: flex; flex-direction: column; gap: .1rem; transition: border-color .15s, box-shadow .15s; }
.tier:hover .face { border-color: var(--border-strong); }
.tier input:checked + .face { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tier input:focus-visible + .face { outline: 2px solid var(--accent-fg); outline-offset: 2px; }
.tier .level { font-size: .7rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.tier .name { font-weight: 650; font-size: .98rem; margin-bottom: .2rem; }
.tier .cost { font-weight: 600; font-size: .88rem; font-variant-numeric: tabular-nums; }
.tier .cost.free { color: var(--ok); }
.tier .powered { font-size: .7rem; color: var(--faint); margin-top: auto; padding-top: .5rem; line-height: 1.35; }
.studio-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1.25rem; align-items: start; }
.result-card { position: sticky; top: 80px; min-height: 260px; }
.form-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 1rem; margin-top: .25rem; }
.form-foot p { margin: 0; max-width: 44ch; }
.result-empty { display: grid; place-items: center; text-align: center; color: var(--faint); padding: 3.5rem 1rem; gap: .5rem; }
.result-empty p { margin: 0; font-size: .9rem; }
.status { border-radius: 10px; padding: .9rem 1rem; border: 1px solid; }
.status h3 { display: flex; gap: .5rem; align-items: center; margin-bottom: .25rem; font-size: .98rem; }
.status p { margin: 0 0 .25rem; }
.status.pending { border-color: var(--warn-line); background: var(--warn-soft); }
.status.ok { border-color: var(--ok-line); background: var(--ok-soft); } .status.ok h3 { color: var(--ok-ink); }
.status.failed { border-color: var(--bad-line); background: var(--bad-soft); } .status.failed h3 { color: var(--bad-ink); }
.result-media { margin-top: .9rem; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--subtle); }
.result-media.pad { padding: 1rem; } .result-media audio { width: 100%; }
.result-text { white-space: pre-wrap; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; margin-top: .9rem; font-size: .93rem; }
.placeholder-media { display: grid; place-items: center; align-content: center; gap: .35rem; aspect-ratio: 16/9; color: var(--muted); text-align: center; padding: 1rem; word-break: break-all; }
.result-actions { display: flex; align-items: center; gap: .75rem; margin-top: .9rem; flex-wrap: wrap; }
.dev-note { font-size: .8rem; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--r-sm); padding: .55rem .8rem; margin-top: 1.25rem; }
.dev-note code { background: var(--subtle); padding: .05rem .3rem; border-radius: 4px; font-size: .78rem; }
.badge { display: inline-flex; gap: .25rem; align-items: center; font-size: .72rem; font-weight: 600; padding: .12rem .5rem; border-radius: 999px; border: 1px solid var(--border); background: var(--subtle); color: var(--muted); white-space: nowrap; }
.badge.pending { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn-ink); }
.badge.captured { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok-ink); }
.badge.released { background: var(--bad-soft); border-color: var(--bad-line); color: var(--bad-ink); }
.badge.grant { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-fg); }

/* wallet */
.balance-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.label-sm { font-size: .8rem; color: var(--muted); font-weight: 500; margin-bottom: .35rem; }
.big-num { font-size: 2.6rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; margin: 0 0 .4rem; font-variant-numeric: tabular-nums; }
.big-num span { font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.num { font-size: 1.7rem; font-weight: 650; letter-spacing: -.02em; margin: 0 0 .3rem; font-variant-numeric: tabular-nums; }
.total { border-top: 3px solid var(--accent); }
.wallet-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 1rem; align-items: start; }
.side-col { display: grid; gap: 1rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.kv { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.kv:last-of-type { border: 0; }
.ok-text { color: var(--ok); }
.caps { display: grid; gap: .8rem; margin-top: .75rem; }
.cap-row .top { display: flex; justify-content: space-between; font-size: .85rem; font-weight: 500; }
.bar { height: 6px; background: var(--subtle); border-radius: 999px; overflow: hidden; margin-top: .35rem; border: 1px solid var(--border); }
.bar > span { display: block; height: 100%; background: var(--accent); }
.vote .btn { margin: .25rem 0 .5rem; }
.vote p:last-child { margin: 0; }
.table-wrap { overflow-x: auto; }
table.ledger { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.ledger th { text-align: left; font-size: .75rem; font-weight: 500; color: var(--faint); padding: .5rem; border-bottom: 1px solid var(--border); }
table.ledger td { padding: .7rem .5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
table.ledger tr:last-child td { border-bottom: 0; }
table.ledger .delta { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos { color: var(--ok); } .struck { text-decoration: line-through; color: var(--faint); }
.nochg { color: var(--bad); font-weight: 600; }

/* pricing */
.plus { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; padding: 2rem; border-top: 3px solid var(--accent); box-shadow: var(--shadow-lg); }
.plus .price, .pack .price { font-weight: 700; letter-spacing: -.02em; }
.plus .price { font-size: 2.4rem; margin: .25rem 0 1rem; }
.plus .price small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; font-size: .92rem; }
.checks li { display: flex; gap: .5rem; align-items: center; } .checks .ico { color: var(--accent-fg); }
.plus-side { display: grid; gap: 1rem; align-content: center; }
.packs { margin-top: 1rem; }
.pack { display: flex; flex-direction: column; gap: .3rem; position: relative; }
.pack h3 { margin: 0; }
.pack p { margin: 0; }
.pack.featured { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.ribbon { position: absolute; top: -11px; right: 14px; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: .72rem; padding: .15rem .55rem; border-radius: 999px; }
.pack .credits { font-size: 2rem; font-weight: 700; letter-spacing: -.03em; margin-top: .75rem !important; font-variant-numeric: tabular-nums; }
.pack .credits small { font-size: .85rem; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.pack .price { font-size: 1.05rem; color: var(--muted); margin-bottom: .9rem !important; }
details { font-size: .85rem; }
.pack details { border-top: 1px solid var(--border); padding-top: .6rem; margin-top: .75rem; }
summary { cursor: pointer; font-weight: 500; color: var(--muted); min-height: 28px; display: flex; align-items: center; gap: .35rem; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
details[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.yield-hl { margin-top: .9rem; }
.yield-hl p { margin: 0 0 .3rem !important; }
.yield-hl ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .15rem; font-size: .82rem; }
.yield-hl li { display: flex; justify-content: space-between; gap: .5rem; color: var(--muted); }
.yield-hl b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.email-form { border: 1px solid var(--border); border-radius: var(--r-sm); padding: .9rem; background: var(--bg); }
.email-form p { margin: .5rem 0 0; }
summary:hover { color: var(--ink); }
.yield { width: 100%; border-collapse: collapse; margin-top: .4rem; }
.yield th { text-align: left; font-size: .72rem; font-weight: 600; color: var(--ink); padding-top: .6rem; }
.yield th .muted { font-weight: 400; }
.yield td { padding: .08rem 0; color: var(--muted); }
.yield td:last-child { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }

/* footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 4rem; padding: 2.5rem 0 1.5rem; }
.footer-row { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-brand p { margin: 0; }
.footer-links { display: flex; gap: .4rem 1.25rem; flex-wrap: wrap; align-content: flex-start; font-size: .88rem; }
.footer-links a { color: var(--muted); text-decoration: none; } .footer-links a:hover { color: var(--ink); }
.fine-print { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .78rem; color: var(--faint); border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1.75rem; }
.status-pill { display: inline-flex; gap: .4rem; align-items: center; white-space: nowrap; }
.status-pill .dot { background: var(--ok); }
#api-status.down { color: var(--bad); }

/* responsive */
@media (max-width: 980px) {
  .g5 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(2, 1fr); }
  .hero-grid, .studio-grid, .demo-grid, .wallet-grid, .plus { grid-template-columns: 1fr; }
  .hero-grid { gap: 2.5rem; }
  .result-card { position: static; }
  .balance-grid { grid-template-columns: 1fr 1fr; } .balance-grid .total { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  body { font-size: 15px; }
  .wrap { width: min(1140px, 100% - 2rem); }
  .header-row { flex-wrap: wrap; gap: .25rem .75rem; padding: .6rem 0 0; }
  .nav { order: 3; width: 100%; overflow-x: auto; margin: 0 -.5rem; padding-bottom: .35rem; }
  .hide-sm { display: none; }
  .g3 { grid-template-columns: 1fr; } .g5 { grid-template-columns: repeat(2, 1fr); }
  .tiers, .preview-tiers { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 3rem 0; } .hero { padding: 2.75rem 0 3rem; }
  .page-head { padding: 2rem 0 1.25rem; } .page-head.narrow { padding-top: 2.25rem; }
  .plus, .cta-band { padding: 1.5rem; }
  .ledger .hide-sm { display: none; }
  .tabs { width: 100%; }
}
@media (max-width: 440px) {
  .g4 { grid-template-columns: 1fr; }
  .balance-grid { grid-template-columns: 1fr; }
  .cta-row .btn { width: 100%; }
  .form-foot .btn { width: 100%; }
  .auth { padding: 2rem 0; } .auth-card { padding: 1.5rem; }
}

/* account */
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--surface); display: grid; place-items: center; font-weight: 600; font-size: .85rem; text-decoration: none; }
.avatar:hover { opacity: .85; }
.account-page { display: grid; gap: 1rem; }
.links { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .5rem; }
.link-row { display: flex; align-items: center; gap: .75rem; border: 1px solid var(--border); border-radius: 10px; padding: .7rem .8rem; }
.link-ico { width: 34px; height: 34px; border-radius: 8px; background: var(--subtle); display: grid; place-items: center; color: var(--ink); flex: none; }
.link-name { display: grid; flex: 1; min-width: 0; font-size: .92rem; }
.link-name .tiny { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.row-between p { margin: 0; }
@media (max-width: 440px) { .link-row .badge { display: none; } }

/* flash + inbox */
.flash { display: flex; gap: .75rem; align-items: flex-start; border: 1px solid; border-radius: var(--r); padding: .9rem 1rem; margin-bottom: 1rem; }
.flash p { margin: .15rem 0 0; font-size: .9rem; color: var(--muted); }
.flash.ok { background: var(--ok-soft); border-color: var(--ok-line); } .flash.ok b, .flash.ok .flash-ico { color: var(--ok-ink); }
.flash.error { background: var(--bad-soft); border-color: var(--bad-line); } .flash.error b, .flash.error .flash-ico { color: var(--bad-ink); }
.flash-ico { flex: none; padding-top: .1rem; }
.auth-card .flash { margin: 0 0 1.25rem; }
.inbox-state { border: 1px solid var(--border); background: var(--bg); border-radius: var(--r-sm); padding: 1rem; margin-top: 1rem; }
.inbox-state .cat-ico { margin-bottom: .6rem; }
.inbox-state p { margin: 0 0 .75rem; }
.row-tight { display: flex; gap: .5rem; flex-wrap: wrap; }

/* theme toggle */
.theme-btn { width: 34px; padding: 0; }
.theme-btn .ico { width: 16px; height: 16px; }
html { background: var(--bg); }

.lineage { display: flex; align-items: center; gap: .35rem; margin: .35rem 0 0 !important; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; }

.note-box { border: 1px dashed var(--border-strong); border-radius: 10px; padding: .9rem 1rem; background: var(--subtle); }
.note-box p { margin: .3rem 0 0; }
.note-inline { margin: .75rem 0 .25rem; }

/* generation progress (timer) */
.studio-intro { max-width: 68ch; text-wrap: pretty; overflow-wrap: break-word; }
.gen-progress { border: 1px solid var(--border); background: var(--bg); border-radius: 10px; padding: .9rem 1rem 1rem; }
.gen-progress[data-phase="almost"] { border-color: var(--accent-line); }
.gp-head { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; flex-wrap: wrap; margin-bottom: .6rem; }
.gp-head h3 { display: flex; gap: .5rem; align-items: center; margin: 0; font-size: .98rem; }
.gp-time { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gp-bar { position: relative; height: 8px; border-radius: 999px; background: var(--subtle); border: 1px solid var(--border-strong); overflow: hidden; margin-bottom: .7rem; }
.gp-bar > span { display: block; height: 100%; width: 0; background: var(--accent-fg); border-radius: 999px; transition: width .25s linear; }
.gen-progress.indeterminate .gp-bar > span { width: 35%; position: absolute; left: 0; animation: gp-slide 1.4s ease-in-out infinite; }
.gen-progress[data-phase="almost"] .gp-bar > span { animation: gp-pulse 1.6s ease-in-out infinite; }
.gen-progress p { margin: 0 0 .25rem; }
@keyframes gp-slide { 0% { left: -35%; } 100% { left: 100%; } }
@keyframes gp-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) {
  .gp-bar > span { transition: none; }
  .gen-progress.indeterminate .gp-bar > span { animation: none; left: 0; width: 100%; opacity: .35; }
  .gen-progress[data-phase="almost"] .gp-bar > span { animation: none; }
}
.balance-grid.unlimited { grid-template-columns: 1fr; }
.unlimited-notice .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.mock-banner button[aria-pressed="true"] { color: var(--inverse-fg); }

/* usage bar (plan allowance) */
.usage-card { margin-bottom: 1rem; }
.studio-usage { padding: 1rem 1.25rem; }
.usage-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .35rem; }
.usage-head h2, .usage-head .label-sm { margin: 0; }
.usage-main { margin: 0 0 .5rem; font-size: .92rem; font-variant-numeric: tabular-nums; }
.usage-main b { font-size: 1.05rem; }
.usage-bar { height: 10px; border-radius: 999px; background: var(--subtle); border: 1px solid var(--border-strong); overflow: hidden; margin-bottom: .55rem; }
.usage-bar > span { display: block; height: 100%; background: var(--accent-fg); border-radius: 999px; }
.usage-bar.full > span, .usage-bar.over > span { background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(255,255,255,.28) 6px 9px); }
.usage p { margin: 0 0 .2rem; }
.usage-warn { color: var(--warn-ink); font-weight: 500; }
.usage-pill { font-size: .72rem; font-weight: 600; padding: .12rem .55rem; border-radius: 999px; border: 1px solid var(--border); background: var(--subtle); color: var(--muted); white-space: nowrap; }
.usage-pill.near, .usage-pill.full, .usage-pill.over { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn-ink); }
.usage-pill.unlimited { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-fg); }
.plan-month { margin-top: 1rem; }
@media (max-width: 720px) { .usage-pack { display: block; } .usage-pack .sep { display: none; } }

/* model picker */
.model-field select { font-weight: 500; }
.model-info { border: 1px solid var(--border); background: var(--bg); border-radius: var(--r-sm); padding: .7rem .8rem; margin-top: .15rem; }
.model-info p { margin: .35rem 0 0; }
.mi-top { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.mi-cost { margin-left: auto; font-size: .85rem; font-variant-numeric: tabular-nums; }
.mi-extras { display: flex; flex-wrap: wrap; gap: .25rem 1rem; color: var(--muted); }
.mi-extras b { color: var(--ink); font-weight: 600; margin-right: .25rem; }
.level-meter { display: inline-flex; gap: 3px; }
.level-meter i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--input-border); }
.level-meter i.on { background: var(--accent-fg); border-color: var(--accent-fg); }
.tier-chip { font-size: .72rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.tier-chip.t-free { background: #F5F5F5; color: #404040; border-color: #A3A3A3; }
.tier-chip.t-low { background: #FFF7ED; color: #9A3412; border-color: #FDBA74; }
.tier-chip.t-medium { background: #FFEDD5; color: #9A3412; border-color: #FB923C; }
.tier-chip.t-high { background: #FED7AA; color: #7C2D12; border-color: #F97316; }
.tier-chip.t-premium { background: #C2410C; color: #FFFFFF; border-color: #9A3412; }
:root[data-theme="dark"] .tier-chip.t-free { background: #262626; color: #D4D4D4; border-color: #525252; }
:root[data-theme="dark"] .tier-chip.t-low { background: #2A1A0E; color: #FDBA74; border-color: #7C2D12; }
:root[data-theme="dark"] .tier-chip.t-medium { background: #3A1F0B; color: #FDBA74; border-color: #C2410C; }
:root[data-theme="dark"] .tier-chip.t-high { background: #4A230A; color: #FED7AA; border-color: #EA580C; }
:root[data-theme="dark"] .tier-chip.t-premium { background: #EA580C; color: #1C0A00; border-color: #FB923C; }
@media (max-width: 440px) { .mi-cost { margin-left: 0; width: 100%; } }

/* real-generation daily meter */
.realgen { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .75rem; border-top: 1px solid var(--border); margin-top: .75rem; padding-top: .6rem; }
.realgen-bar { display: inline-block; width: 120px; height: 6px; border-radius: 999px; background: var(--subtle); border: 1px solid var(--border-strong); overflow: hidden; }
.realgen-bar > span { display: block; height: 100%; background: var(--muted); }
.realgen.full .realgen-bar > span { background: var(--warn-ink); }

/* pricing: period toggle + plan cards */
.period-toggle { display: inline-flex; gap: .2rem; padding: .2rem; background: var(--subtle); border: 1px solid var(--border); border-radius: 10px; margin: 0 0 1rem; }
.period-toggle button { font: inherit; font-size: .88rem; font-weight: 500; border: 1px solid transparent; background: transparent; color: var(--muted); padding: .4rem 1rem; border-radius: 7px; cursor: pointer; min-height: 34px; }
.period-toggle button[aria-checked="true"] { background: var(--surface); color: var(--ink); border-color: var(--border); box-shadow: var(--shadow); }
.plan-cards { display: grid; gap: 1rem; }
.plan-cards.n2 { grid-template-columns: 1fr 1fr; }
.plan-cards.n2 .plus { grid-template-columns: 1fr; }
@media (max-width: 980px) { .plan-cards.n2 { grid-template-columns: 1fr; } }

/* about the models */
.about-link { display: inline-flex; margin-top: .5rem; }
.models-filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; padding: 1rem 1.25rem; margin-bottom: .5rem; }
.models-filters .field { margin: 0; flex: 1 1 160px; }
.models-filters .field.grow { flex: 2 1 260px; }
.models-cat { margin-top: 2rem; }
.models-cat > h2 { display: flex; align-items: center; gap: .5rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border); }
.cat-ico.sm { width: 28px; height: 28px; margin: 0; border-radius: 7px; }
.cat-ico.sm .ico { width: 16px; height: 16px; }
.models-tier { margin-top: 1rem; }
.models-tier > h3 { margin-bottom: .4rem; text-transform: uppercase; letter-spacing: .04em; font-size: .72rem; font-weight: 600; color: var(--faint); }
.model-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.model-row { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .85rem 1rem; }
.model-row.off { background: var(--subtle); }
.model-row p { margin: .25rem 0 0; }
.mr-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.mr-head h4 { margin: 0 .25rem 0 0; font-size: .98rem; font-weight: 650; letter-spacing: -.01em; }
.mr-lab { color: var(--muted); font-weight: 500; }
.mr-meta b { font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .model-list { grid-template-columns: 1fr; } }


/* ======================================================================= Atelier theme layer
   Tokens: themes/atelier/tokens.css (above). Personality: themes/atelier/theme.css, ported to this site's class names
   (Carlos's final pick, 2026-10-20; replaces Signal and Nocturne). Warm paper and ink, Fraunces editorial serif,
   Instrument Sans UI, IBM Plex Mono labels, saffron / terracotta / oxblood art with film grain. */
html { background: var(--bg); }
body { position: relative; overflow-x: hidden;
  background: radial-gradient(1100px 620px at 92% -8%, color-mix(in srgb, var(--art-1) 16%, transparent), transparent 70%),
    radial-gradient(900px 600px at -10% 30%, color-mix(in srgb, var(--art-3) 7%, transparent), transparent 70%), var(--bg); }
h1, h2, h3, .h3, .wordmark, .big-num, .num, .plus .price, .pack .credits, .gp-head h3 { font-family: var(--font-display); font-weight: var(--display-weight);
  font-variation-settings: "opsz" 96, "SOFT" 30; font-optical-sizing: auto; }
code, .mono, .dev-note code, .dollars, .step-n { font-family: var(--font-mono); }
:focus-visible { outline-color: var(--focus); }
.tier input:focus-visible + .face { outline-color: var(--focus); }
a { color: var(--accent-fg); }

/* backdrop: film grain (assets/atelier/backdrop.svg, inlined in index.html) */
.backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.backdrop svg { width: 100%; height: 100%; display: block; }
@media (max-width: 720px) { .backdrop { display: none; } }

/* panels: warm paper cards, hairline borders, soft shadow */
.card { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: var(--r); }
.site-header { background: var(--header-bg); border-bottom: 1px solid var(--border); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.site-footer { background: transparent; border-top: 1px solid var(--ink); }
.section.alt { background: color-mix(in srgb, var(--surface) 60%, transparent); }
.model-row, .link-row, .gen-progress, .model-info, .answer, .result-text, .preview-prompt, .email-form, .inbox-state, .note-box { background: var(--surface-solid); }
.model-row { border: 1px solid var(--border); border-radius: var(--r); }
.model-row.off { background: var(--subtle); }
.hero { background: none; }
.models-filters, .period-toggle, .tabs { background: var(--surface); border: 1px solid var(--border); }

/* header */
.wordmark { font-weight: 500; letter-spacing: -.01em; font-size: 1.3rem; }
.wordmark .accent { font-style: italic; color: var(--accent-fg); }
.wordmark .mark { background: none; width: 28px; height: 28px; border-radius: 0; }
.wordmark .mark svg { width: 100%; height: 100%; display: block; }
.wordmark.sm .mark { width: 24px; height: 24px; }
.nav a { border-radius: 0; background: none !important; padding: 8px 2px; margin: 0 10px; border-bottom: 1px solid transparent; }
.nav a[aria-current="page"] { border-bottom-color: var(--ink); box-shadow: none; }
.avatar { background: var(--inverse-bg); color: var(--inverse-fg); }
.chip { background: var(--surface-solid); }
.chip .dot { background: var(--meter-fill); }
.mock-banner { position: relative; z-index: 11; }
.hdr-usage { display: none; text-decoration: none; color: var(--ink); width: 260px; gap: 3px; }
.hdr-usage .hu-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; }
.hdr-usage .hu-top span { color: var(--muted); font-family: var(--font-mono); font-weight: 500; text-transform: uppercase; letter-spacing: .1em; font-size: 10.5px; }
.hdr-usage .hu-top b { font-weight: 600; font-variant-numeric: tabular-nums; }
.hdr-usage .hu-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr-usage .meter { height: 6px; }
@media (min-width: 1180px) { .hdr-usage { display: grid; } .account .chip.has-usage { display: none; } }

/* buttons: pill, terracotta */
.btn { background: var(--accent-bg); border-color: transparent; color: var(--on-accent); border-radius: var(--r-btn); box-shadow: var(--btn-shadow); font-family: var(--font-body); font-weight: 600; }
.btn:hover { background: var(--accent-hover); border-color: transparent; }
.btn.ghost, .btn.outline { background: transparent; color: var(--ink); border: 1px solid var(--ink); box-shadow: none; }
.btn.ghost:hover, .btn.outline:hover { background: var(--subtle); border-color: var(--ink); }
.btn.teal { background: var(--teal); color: #fff; border-color: transparent; }
.btn.teal:hover { background: var(--teal-hover); }
:root[data-theme="dark"] .btn.teal { color: #15110E; }
.btn[disabled], .btn[aria-disabled="true"], .btn[disabled]:hover { background: var(--subtle); border-color: var(--border); color: var(--faint); cursor: not-allowed; box-shadow: none; }
@media (prefers-reduced-motion: no-preference) { .btn:active { transform: translateY(1px); } }

/* type treatments */
.eyebrow { display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-weight: 500; letter-spacing: .16em; text-transform: uppercase; font-size: 11.5px; color: var(--muted); background: none; border: 0; padding: 0; }
.eyebrow::before { content: ""; width: 36px; height: 1px; background: currentColor; }
.hero h1 { font-weight: 400; letter-spacing: -.03em; }
.hero h1 .accent { font-style: italic; color: var(--accent-fg); font-weight: 400; }
.hero-art { aspect-ratio: 5 / 4; position: relative; }
.hero-art svg { width: 100%; height: 100%; display: block; }
.cat-ico { background: var(--accent-soft); border-color: var(--accent-line); }
h2 { font-weight: 400; }
.models-cat > h2 { border-bottom: 1px solid var(--ink); }
.models-tier > h3, .label-sm { font-family: var(--font-mono); font-weight: 500; text-transform: uppercase; letter-spacing: .12em; }

/* forms */
.field label { font-family: var(--font-mono); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.field textarea, .field input { background: var(--surface-solid); border-color: var(--input-border); }
.field select { background-color: var(--surface-solid); border-color: var(--input-border); }
.field textarea:focus, .field input:focus, .field select:focus { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 20%, transparent); }
.tier .face { background: var(--surface-solid); }
.tier input:checked + .face { background: var(--ink); color: var(--bg); border-color: var(--ink); box-shadow: none; }
.tier input:checked + .face * { color: var(--bg); }
.tabs { border-radius: 999px; }
.tab { border-radius: 999px; }
.tab[aria-selected="true"] { background: var(--ink); color: var(--bg); box-shadow: none; border-color: var(--ink); }
.period-toggle { border-radius: 999px; }
.period-toggle button { border-radius: 999px; }
.period-toggle button[aria-checked="true"] { background: var(--ink); color: var(--bg); box-shadow: none; border-color: var(--ink); }

/* tier chips: tier colour + 1-5 pips (shape, never colour alone) */
.tier-chip { --tc: var(--t-free); --tk: var(--t-free-ink); display: inline-flex; align-items: center; gap: 6px;
  color: var(--tk); background: transparent; border: 1px solid currentColor; border-radius: 999px; padding: 2px 9px; }
.t-low { --tc: var(--t-low); --tk: var(--t-low-ink); }
.t-medium { --tc: var(--t-medium); --tk: var(--t-medium-ink); }
.t-high { --tc: var(--t-high); --tk: var(--t-high-ink); }
.t-premium { --tc: var(--t-premium); --tk: var(--t-premium-ink); }
.tier-chip.t-free, .tier-chip.t-low, .tier-chip.t-medium, .tier-chip.t-high, .tier-chip.t-premium,
:root[data-theme="dark"] .tier-chip.t-free, :root[data-theme="dark"] .tier-chip.t-low, :root[data-theme="dark"] .tier-chip.t-medium,
:root[data-theme="dark"] .tier-chip.t-high, :root[data-theme="dark"] .tier-chip.t-premium {
  color: var(--tk); background: transparent; border-color: currentColor; }
.pips { --tc: var(--t-free); display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.pips i { width: 3.5px; border-radius: 2px; background: var(--pip-off); }
.pips i:nth-child(1) { height: 5px; } .pips i:nth-child(2) { height: 7px; } .pips i:nth-child(3) { height: 9.5px; } .pips i:nth-child(4) { height: 12px; } .pips i:nth-child(5) { height: 14px; }
.pips i.on { background: var(--tc); }
.dollars { font-size: .75rem; color: var(--muted); letter-spacing: .04em; }

/* meters: usage bar, wallet caps, real-generation meter */
.usage-bar, .bar, .realgen-bar { background: var(--track); border-color: transparent; }
.usage-bar > span, .bar > span, .realgen-bar > span, .realgen.full .realgen-bar > span { background: var(--meter-fill); box-shadow: none; }
.usage-bar.full > span, .usage-bar.over > span { background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(255,255,255,.3) 6px 9px), var(--meter-fill); }
.usage-pill.unlimited { background: var(--inverse-bg); color: var(--inverse-fg); font-family: var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.total { border-top: 1px solid var(--ink); }
.total .big-num { color: var(--ink); }
.total .big-num span { color: var(--muted); }

/* progress card */
.gen-progress { border-color: var(--border); }
.gp-head h3 { font-weight: 400; font-size: 1.25rem; }
.gp-time { font-family: var(--font-mono); color: var(--ink); font-size: .9rem; }
.gp-bar { height: 8px; background: var(--track); border-color: transparent; }
.gp-bar > span { background: var(--progress-fill); background-size: 28px 28px, 100% 100%; box-shadow: none; }
@media (prefers-reduced-motion: no-preference) {
  .gen-progress[data-phase="running"] .gp-bar > span, .gen-progress[data-phase="almost"] .gp-bar > span { animation: pg-stripe 1.1s linear infinite; }
  .gen-progress[data-phase="almost"] .gp-bar > span { animation: pg-stripe 1.1s linear infinite, gp-pulse 1.6s ease-in-out infinite; }
}
@keyframes pg-stripe { to { background-position: 28px 0, 0 0; } }

/* pricing */
.plus { border-top: 1px solid var(--ink); }
.plus .price, .pack .credits { letter-spacing: -.02em; font-weight: 350; }
.pack h3 { font-weight: 500; font-style: italic; font-size: 1.25rem; }
.pack.featured { border-color: var(--accent-line); box-shadow: var(--shadow-lg); }
.ribbon { background: var(--accent-bg); color: var(--on-accent); font-family: var(--font-mono); font-weight: 500; border-radius: 0; }
.plan-month { background: var(--surface) radial-gradient(260px 200px at 100% 0%, color-mix(in srgb, var(--art-1) 22%, transparent), transparent 70%); }
.checks .ico { color: var(--t-free-ink); }

/* status + misc */
.status { border-radius: var(--r-sm); font-family: var(--font-mono); font-weight: 500; }
.trust li::before { background: var(--accent-bg); }
.step-n { background: var(--subtle); border-radius: 999px; }
.badge { background: var(--subtle); }
.dev-note { background: var(--surface-solid); }

/* ---------------------------------------------------------------- pricing round + usage caps (2026-10-20) */
.tier.off .face { opacity: .55; background: var(--subtle); border-style: dashed; }
.tier.off input { cursor: not-allowed; }
.badge.soon { background: var(--subtle); color: var(--muted); border: 1px solid var(--border); }
.model-row.off h4 { color: var(--muted); }
select option:disabled { color: var(--faint); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; flex-wrap: wrap; }
.char-count { font-variant-numeric: tabular-nums; }
.char-count[data-state="near"] { color: var(--warn-ink); }
.char-count[data-state="over"] { color: var(--bad-ink); font-weight: 600; }
.gate:empty { display: none; }
.gate-alert { margin-top: .75rem; }
.gate-alert b { display: block; margin-bottom: .15rem; }
.btn[aria-disabled="true"] { cursor: not-allowed; }
.caps-panel { margin-top: .9rem; border-top: 1px solid var(--border); padding-top: .7rem; }
.caps-panel > summary { cursor: pointer; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem .75rem; font-weight: 600; font-size: .9rem; list-style: none; min-height: 32px; align-items: center; }
.caps-panel > summary::-webkit-details-marker { display: none; }
.caps-panel > summary:focus-visible { outline: 2px solid var(--accent-fg, var(--accent)); outline-offset: 2px; border-radius: 4px; }
.caps-panel h3.label-sm { margin: .9rem 0 .35rem; }
.cap-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.cap-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem .75rem; font-size: .85rem; }
.cap-row .usage-bar { grid-column: 1 / -1; height: 6px; }
.cap-row .cap-reset { grid-column: 1 / -1; }
.cap-row .cap-val { font-variant-numeric: tabular-nums; text-align: right; }
.cap-row[data-state="full"] .cap-val { color: var(--bad-ink); font-weight: 600; }
.cap-row[data-state="near"] .cap-val { color: var(--warn-ink); }
@media (max-width: 560px) { .cap-row { grid-template-columns: 1fr; } .cap-row .cap-val { text-align: left; } }
.cap-row .usage-bar { margin: .1rem 0 0; }
select option, select optgroup { background: var(--popover); color: var(--ink); }
