/* CopyrightNow — "The Register": a warm card-catalogue for creative works */
/* Note: display face is Futura (bundled on macOS/iOS); graceful geometric fallbacks for other OSes. */
:root {
  --paper: #e8e6db;         /* bone / archival stock */
  --card: #f3f1e7;          /* index-card */
  --ink: #1c1d16;           /* warm-green tinted near-black (never pure) */
  --ink-soft: #55564a;
  --ink-faint: #8a8b7b;
  --line: #d3d0c1;
  --dot: rgba(28,29,22,.07); /* ledger rule */
  --blue: #a02b28;          /* CLARET — primary accent (the seal / registered) */
  --blue-soft: #f1e1dd;
  --pink: #986c1a;          /* OCHRE — seal / secondary (used sparingly) */
  --pink-soft: #eee4cd;
  --yellow: #c9992b;        /* aged brass highlight */
  --yellow-soft: #f0e6c9;
  --gold: #856428;          /* deep seal ink */
  --good: #2f7d52;
  --good-soft: #dde9df;
  --warn: #9d5a26;
  --warn-soft: #f0e3d2;
  --hard: rgba(28,29,22,.13); /* soft catalogue shadow */
  --accent: var(--blue);
  --accent-soft: var(--blue-soft);
  --accent-2: var(--pink);
  --accent-2-soft: var(--pink-soft);
  --radius: 7px;
  --shadow: 0 1px 2px rgba(28,29,22,.05), 0 8px 24px rgba(28,29,22,.07);
  --font-display: 'Futura', 'Futura PT', 'Avenir Next', 'Century Gothic', ui-sans-serif, sans-serif;
  --font-body: 'Avenir Next', 'Avenir', 'Segoe UI', ui-sans-serif, -apple-system, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;
  --font-serif: 'Hoefler Text', 'Iowan Old Style', Palatino, Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12140d; --card: #1b1e14; --ink: #eceadc; --ink-soft: #adae9d; --ink-faint: #797b6a;
    --line: #2b2e21; --dot: rgba(236,234,220,.06);
    --blue: #e57a63; --blue-soft: #2c1a16; --pink: #d6a75d; --pink-soft: #2d2513;
    --yellow: #e3bd5a; --yellow-soft: #332b14; --gold: #c9a24e;
    --good: #4fc78d; --good-soft: #16281d; --warn: #d68b4f; --warn-soft: #2e2113;
    --hard: rgba(0,0,0,.4);
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 28px rgba(0,0,0,.45);
  }
}
:root[data-theme="light"] {
  --paper: #e8e6db; --card: #f3f1e7; --ink: #1c1d16; --ink-soft: #55564a; --ink-faint: #8a8b7b;
  --line: #d3d0c1; --dot: rgba(28,29,22,.07); --blue: #a02b28; --blue-soft: #f1e1dd;
  --pink: #986c1a; --pink-soft: #eee4cd; --yellow: #c9992b; --yellow-soft: #f0e6c9; --gold: #856428;
  --good: #2f7d52; --good-soft: #dde9df; --warn: #9d5a26; --warn-soft: #f0e3d2; --hard: rgba(28,29,22,.13);
  --shadow: 0 1px 2px rgba(28,29,22,.05), 0 8px 24px rgba(28,29,22,.07);
}
:root[data-theme="dark"] {
  --paper: #12140d; --card: #1b1e14; --ink: #eceadc; --ink-soft: #adae9d; --ink-faint: #797b6a;
  --line: #2b2e21; --dot: rgba(236,234,220,.06); --blue: #e57a63; --blue-soft: #2c1a16;
  --pink: #d6a75d; --pink-soft: #2d2513; --yellow: #e3bd5a; --yellow-soft: #332b14; --gold: #c9a24e;
  --good: #4fc78d; --good-soft: #16281d; --warn: #d68b4f; --warn-soft: #2e2113; --hard: rgba(0,0,0,.4);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 28px rgba(0,0,0,.45);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 15.5px; line-height: 1.65; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }

/* ── Shell ── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 24px;
  padding: 0 28px; height: 60px;
}
.brand { font-family: var(--font-display); font-size: 20px; letter-spacing: .2px; white-space: nowrap; }
.brand b { color: var(--accent); font-weight: 700; }
.brand small { display:block; font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ink-faint); font-family: var(--font-body); margin-top: -3px; }
nav.tabs { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; }
nav.tabs button {
  background: none; border: none; padding: 8px 14px; border-radius: 8px;
  font-size: 14px; color: var(--ink-soft); white-space: nowrap;
}
nav.tabs button:hover { background: var(--accent-soft); color: var(--ink); }
nav.tabs button.active { background: var(--ink); color: var(--paper); }
main { max-width: 1060px; margin: 0 auto; padding: 36px 28px 90px; }
.view { display: none; }
.view.active { display: block; animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px);} to { opacity: 1; transform:none; } }

/* ── Type ── */
h1 { font-family: var(--font-display); font-size: 34px; font-weight: 600; line-height: 1.2; margin-bottom: 10px; }
h2 { font-family: var(--font-display); font-size: 24px; font-weight: 600; margin: 34px 0 12px; }
h3 { font-size: 17px; font-weight: 650; margin: 22px 0 8px; }
h4 { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--ink-soft); margin: 18px 0 8px; }
p.lede { font-size: 17.5px; color: var(--ink-soft); max-width: 640px; }
.muted { color: var(--ink-faint); font-size: 13px; }

/* ── Cards & grids ── */
.grid { display: grid; gap: 16px; margin-top: 22px; }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card.clickable { cursor: pointer; transition: border-color .15s, transform .15s; }
.card.clickable:hover { border-color: var(--accent); transform: translateY(-2px); }
.card h3 { margin-top: 0; }
.pill {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; padding: 3px 10px; border-radius: 20px;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 10px;
}
.pill.brass { background: var(--accent-2-soft); color: var(--accent-2); }
.pill.green { background: var(--good-soft); color: var(--good); }

/* ── Learn ── */
.cat-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0 6px; }
.cat-row button {
  border: 1px solid var(--line); background: var(--card); color: var(--ink-soft);
  padding: 7px 16px; border-radius: 20px; font-size: 13.5px;
}
.cat-row button.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.topic-body { display: none; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.topic-body.open { display: block; }
.topic-body table, .article table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 14px; }
.topic-body th, .topic-body td, .article th, .article td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.topic-body th, .article th { background: var(--paper); font-weight: 650; }
.topic-body ul, .topic-body ol { padding-left: 22px; margin: 10px 0; }
.topic-body li { margin: 5px 0; }
.topic-body p { margin: 10px 0; }
.toggle-hint { color: var(--accent); font-size: 13.5px; font-weight: 600; }

/* ── Chat ── */
.chat-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; height: 66vh; min-height: 460px; margin-top: 22px; }
.chat-log { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 78%; padding: 12px 16px; border-radius: 14px; font-size: 14.5px; }
.msg.user { align-self: flex-end; background: var(--ink); color: var(--paper); border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.bot h5 { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--accent); margin-bottom: 6px; }
.msg.bot ul, .msg.bot ol { padding-left: 20px; margin: 8px 0; }
.msg.bot table { border-collapse: collapse; margin: 8px 0; font-size: 13px; }
.msg.bot th, .msg.bot td { border: 1px solid var(--line); padding: 5px 9px; }
.msg.bot .readmore { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--accent); cursor: pointer; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 24px 12px; }
.chips button { border: 1px solid var(--line); background: var(--paper); border-radius: 18px; padding: 6px 14px; font-size: 13px; color: var(--ink-soft); }
.chips button:hover { border-color: var(--accent); color: var(--accent); }
.chat-input { display: flex; gap: 10px; border-top: 1px solid var(--line); padding: 14px 18px; }
.chat-input input { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; font-size: 15px; background: var(--paper); color: var(--ink); }
.chat-input input:focus { outline: none; border-color: var(--accent); }
.chat-input button { background: var(--ink); color: var(--paper); border: none; border-radius: 10px; padding: 0 22px; font-size: 14.5px; font-weight: 600; }

/* ── Services ── */
.svc-table { width: 100%; border-collapse: collapse; margin-top: 18px; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); font-size: 14px; }
.svc-table th { background: var(--ink); color: var(--paper); font-weight: 600; padding: 11px 14px; text-align: left; }
.svc-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.svc-table tr.cat-head td { background: var(--accent-soft); font-weight: 700; color: var(--accent); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; padding: 8px 14px; }
.svc-table td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.svc-table td.total { font-weight: 700; }
.svc-table .svc-note { color: var(--ink-faint); font-size: 12.5px; display: block; margin-top: 3px; }
.svc-table button.req { background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 7px 14px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.svc-table button.req:hover { background: #59497e; }
.svc-table-scroll { overflow-x: auto; }

/* ── Forms / modal ── */
.modal-back { position: fixed; inset: 0; background: rgba(43,42,39,.45); z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-back.open { display: flex; }
.modal { background: var(--card); border-radius: 16px; padding: 28px; max-width: 480px; width: 100%; max-height: 88vh; overflow-y: auto; }
.modal h3 { margin-top: 0; }
.field { margin: 14px 0; }
.field label { display: block; font-size: 13px; font-weight: 650; color: var(--ink-soft); margin-bottom: 5px; }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px;
  font-size: 14.5px; font-family: inherit; background: var(--paper); color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }
.btn { display: inline-block; background: var(--ink); color: var(--paper); border: none; border-radius: 10px; padding: 11px 22px; font-size: 14.5px; font-weight: 600; }
.btn.subtle { background: var(--paper); color: var(--ink-soft); border: 1px solid var(--line); }
.btn.accent { background: var(--accent); color: #fff; }
.btn.danger { background: #8f4a3f; color: #fff; }
.btn-row { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* ── Vault ── */
.vault-status { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-radius: 10px; margin: 18px 0; font-size: 14px; }
.vault-status.locked { background: var(--warn-soft); color: var(--warn); }
.vault-status.unlocked { background: var(--good-soft); color: var(--good); }
.file-row { display: flex; align-items: center; gap: 14px; padding: 13px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 9px; }
.file-row .fname { font-weight: 600; font-size: 14.5px; }
.file-row .fmeta { color: var(--ink-faint); font-size: 12.5px; }
.file-row .spacer { flex: 1; }
.file-row button { border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 6px 12px; font-size: 13px; color: var(--ink-soft); }
.file-row button.del { color: #8f4a3f; border-color: #e5cfc9; }
.drop {
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 34px; text-align: center;
  color: var(--ink-faint); margin: 18px 0; background: var(--card); transition: border-color .15s;
}
.drop.over { border-color: var(--accent); color: var(--accent); }
.calc-out { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-top: 14px; }
.calc-out .big { font-family: var(--font-display); font-size: 30px; }
.calc-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.calc-row:last-child { border-bottom: none; }
.calc-row b { font-variant-numeric: tabular-nums; }
.regime-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.regime-pair .calc-out.winner { border-color: var(--good); background: var(--good-soft); }

/* ── Misc ── */
.notice { background: var(--accent-2-soft); border: 1px solid #e8dcc4; color: var(--accent-2); border-radius: 10px; padding: 12px 16px; font-size: 13.5px; margin: 16px 0; }
.footer-note { text-align: center; color: var(--ink-faint); font-size: 12.5px; margin-top: 60px; line-height: 1.7; }
.stat { text-align: center; }
.stat .n { font-family: var(--font-display); font-size: 30px; color: var(--accent); }
.stat .l { font-size: 12.5px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 1px; }
.hero { padding: 30px 0 6px; }
.hero .cta-row { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }
.checklist li { list-style: none; padding-left: 26px; position: relative; margin: 7px 0; }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 700; }
.article { max-width: 760px; }
.article ul, .article ol { padding-left: 24px; margin: 10px 0; }
.article li { margin: 6px 0; }
.article p { margin: 12px 0; }

/* ── App shell (PWA) ── */
html, body { overscroll-behavior-y: none; }
button, nav { -webkit-tap-highlight-color: transparent; }
nav.tabs button, .bottombar button { user-select: none; -webkit-user-select: none; }

.bottombar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  justify-content: space-around;
}
.bottombar button {
  background: none; border: none; flex: 1; max-width: 96px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 4px 4px; border-radius: 12px;
  color: var(--ink-faint); font-size: 10.5px; font-weight: 600; letter-spacing: .2px;
}
.bottombar button svg { width: 22px; height: 22px; }
.bottombar button.active { color: var(--accent); }
.bottombar button:active { transform: scale(.94); transition: transform .08s; }

/* ═══════════ "The Register" — card-catalogue refinements ═══════════ */
body {
  background-color: var(--paper);
  background-image: repeating-linear-gradient(var(--dot), var(--dot) 1px, transparent 1px, transparent 30px);
}
h1, h2, h3 { font-family: var(--font-display); }
h1 { font-weight: 600; letter-spacing: -.01em; line-height: 1.05; }
h2 { font-weight: 600; letter-spacing: -.005em; }
.brand { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; }
.brand b { color: var(--blue); }
.kicker { font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .18em; color: var(--pink); font-weight: 600; }
.icon-btn { background: none; border: 1.5px solid var(--line); color: var(--ink); width: 38px; height: 34px; border-radius: 9px; display: grid; place-items: center; margin-left: 10px; transition: border-color .15s, transform .1s; }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .moon { display: none; }
:root[data-theme="dark"] .icon-btn .sun, .icon-btn .sun { display: block; }
:root[data-theme="dark"] .icon-btn .moon { display: none; }
@media (prefers-color-scheme: dark) { .icon-btn .sun { display: none; } .icon-btn .moon { display: block; } }
:root[data-theme="dark"] .icon-btn .sun { display: block; }
:root[data-theme="dark"] .icon-btn .moon { display: none; }
:root[data-theme="light"] .icon-btn .sun { display: block; }
:root[data-theme="light"] .icon-btn .moon { display: none; }

/* ═══════════ Landing ═══════════ */
.hero-land { max-width: 760px; padding: 14px 0 6px; }
.hero-title { font-family: var(--font-display); font-size: clamp(36px, 6.4vw, 64px); font-weight: 600; letter-spacing: -.022em; line-height: 1.01; margin: 14px 0 16px; text-wrap: balance; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.section-h { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .18em; color: var(--ink-faint); font-weight: 600; margin: 56px 0 18px; display: flex; align-items: center; gap: 14px; }
.section-h::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.cap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; }
.cap-card { position: relative; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 24px; cursor: pointer; overflow: hidden; transition: transform .16s cubic-bezier(.2,.7,.3,1), box-shadow .16s, border-color .16s; }
.cap-card::after { content: ""; position: absolute; left: 22px; right: 22px; bottom: 0; height: 2px; background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .22s cubic-bezier(.2,.7,.3,1); }
.cap-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--ink); }
.cap-card:hover::after { transform: scaleX(1); }
.cap-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.cap-ico { display: block; color: var(--blue); width: 30px; height: 30px; margin-bottom: 15px; }
.cap-ico svg { width: 100%; height: 100%; }
.cap-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -.01em; margin: 0 0 7px; color: var(--ink); }
.cap-card p { color: var(--ink-soft); font-size: 14px; line-height: 1.55; margin: 0; }
.cap-card .cap-tag { display: block; font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint); margin-top: 13px; }
.trust-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin-top: 44px; padding: 26px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }

/* ═══════════ Onboarding — the register desk ═══════════ */
.onb { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 36px 38px; box-shadow: var(--shadow); overflow: hidden; }
.onb::after { content: ""; position: absolute; inset: 9px; border: 1px solid var(--line); border-radius: 3px; pointer-events: none; } /* certificate rule */
.onb-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.onb-step-tag { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); margin-left: auto; }
.onb-progress { height: 4px; background: var(--line); border-radius: 20px; overflow: hidden; margin-bottom: 24px; }
.onb-progress i { display: block; height: 100%; width: 25%; background: var(--blue); border-radius: 20px; transition: width .45s cubic-bezier(.2,.8,.2,1); }
.onb-q { font-family: var(--font-display); font-size: clamp(28px, 5vw, 46px); font-weight: 600; letter-spacing: -.012em; line-height: 1.04; text-wrap: balance; margin: 4px 0 10px; }
.rot { color: var(--blue); position: relative; white-space: nowrap; box-shadow: inset 0 -.14em 0 var(--pink-soft); transition: opacity .2s; }
.onb-sub { color: var(--ink-soft); font-size: 16px; max-width: 560px; margin-bottom: 4px; }
.onb-body { position: relative; }
.onb-step { animation: stepin .4s cubic-bezier(.2,.8,.2,1); }
@keyframes stepin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Art picker — catalogue cards (each work is an entry in the register) */
.art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; margin-top: 24px; }
.art-tile { position: relative; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 15px 16px; cursor: pointer; overflow: hidden; transition: transform .16s cubic-bezier(.2,.7,.3,1), box-shadow .16s, border-color .16s; }
.art-tile::before { content: ""; position: absolute; top: 13px; right: 13px; width: 9px; height: 9px; border: 1.5px solid var(--line); border-radius: 50%; transition: border-color .16s; }
.art-tile::after { content: ""; position: absolute; left: 15px; right: 15px; bottom: 0; height: 2px; background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .22s cubic-bezier(.2,.7,.3,1); }
.art-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--ink); }
.art-tile:hover::after { transform: scaleX(1); }
.art-tile:hover::before { border-color: var(--blue); }
.art-tile:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.art-tile .glyph { display: block; font-family: var(--font-serif); font-size: 26px; line-height: 1; color: var(--blue); margin-bottom: 30px; }
.art-tile.t-pink .glyph { color: var(--pink); }
.art-tile.t-ink .glyph { color: var(--ink); }
.art-tile.t-gold .glyph { color: var(--gold); }
.art-tile .glyph::after { content: none; }
.art-tile .a-label { display: block; font-family: var(--font-display); font-weight: 600; font-size: 15.5px; letter-spacing: -.005em; color: var(--ink); }
.art-tile .a-sub { display: block; font-family: var(--font-mono); font-size: 10px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .1em; margin-top: 4px; }

/* Selectable chips & fields */
.onb-label { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); margin: 22px 0 10px; }
.onb-label:first-child { margin-top: 8px; }
.chip-set { display: flex; flex-wrap: wrap; gap: 9px; }
.chip { border: 1.5px solid var(--line); background: var(--card); color: var(--ink-soft); border-radius: 11px; padding: 9px 15px; font-size: 14px; font-weight: 600; transition: all .13s; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); transform: translateY(-1px); }
.chip.on.pink { background: var(--pink); border-color: var(--pink); color: #fff; }
.onb-input { width: 100%; max-width: 460px; border: 1.5px solid var(--line); border-radius: 11px; padding: 12px 14px; font-size: 16px; font-family: inherit; background: var(--paper); color: var(--ink); }
.onb-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.onb-nav { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; align-items: center; }
.onb-skip { font-family: var(--font-mono); font-size: 13px; color: var(--ink-faint); background: none; border: none; text-decoration: underline; }
.onb-back { background: none; border: none; color: var(--ink-soft); font-weight: 600; font-size: 14px; padding: 6px 4px; }
.onb-back:hover { color: var(--ink); }

/* Plan reveal — the stamped register entry */
.plan { display: grid; gap: 16px; margin-top: 22px; }
.plan-hero { position: relative; border: 1px solid var(--ink); border-radius: var(--radius); padding: 22px 24px; background: var(--blue-soft); box-shadow: var(--shadow); overflow: hidden; }
.plan-hero .kicker { color: var(--blue); }
.plan-title { font-family: var(--font-display); font-size: 23px; font-weight: 600; letter-spacing: -.01em; margin: 6px 0 4px; text-wrap: balance; max-width: 78%; }
.stamp { position: absolute; top: 16px; right: 18px; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: 12.5px; color: var(--blue); border: 2.5px solid var(--blue); border-radius: 6px; padding: 6px 11px; transform: rotate(-9deg); opacity: .92; }
.stamp small { display: block; font-family: var(--font-mono); font-weight: 500; font-size: 8px; letter-spacing: .1em; text-align: center; margin-top: 2px; opacity: .85; }
.stamp.go { animation: stampin .38s cubic-bezier(.2,.9,.3,1) both; }
@keyframes stampin { 0% { transform: rotate(-9deg) scale(2.5); opacity: 0; } 55% { opacity: 1; } 100% { transform: rotate(-9deg) scale(1); opacity: .92; } }
.rights-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0; }
.rights-chips span { font-family: var(--font-mono); font-size: 11.5px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 4px 11px; font-weight: 600; }
.plan-meta { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 14px; font-size: 14px; }
.plan-meta b { font-family: var(--font-mono); display: block; font-size: 18px; letter-spacing: -.01em; color: var(--ink); }
.plan-meta span { color: var(--ink-faint); font-size: 11px; text-transform: uppercase; letter-spacing: .09em; }
.addon { border: 1.5px dashed var(--pink); border-radius: var(--radius); padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; background: var(--pink-soft); }
.addon .a-plus { font-family: var(--font-mono); font-weight: 700; color: var(--pink); font-size: 18px; line-height: 1.2; }
.addon .a-t { font-family: var(--font-display); font-weight: 600; font-size: 14.5px; }
.addon .a-d { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.save-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; background: var(--card); box-shadow: var(--shadow); }
.save-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.onb-explore { margin-top: 18px; font-family: var(--font-mono); font-size: 13px; color: var(--ink-faint); }
.onb-explore a { font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .onb-step, .onb-progress i, .art-tile, .art-tile::after, .stamp.go { animation: none !important; transition: none !important; }
  .rot { color: var(--blue); }
}

@media (max-width: 720px) {
  .topbar { padding: 0 14px; gap: 10px; padding-top: env(safe-area-inset-top); height: calc(56px + env(safe-area-inset-top)); }
  nav.tabs { display: none; }
  .bottombar { display: flex; }
  #theme-toggle { margin-left: auto; }
  main { padding: 20px 16px calc(86px + env(safe-area-inset-bottom)); }
  h1 { font-size: 27px; }
  .onb { padding: 24px 20px 28px; box-shadow: 6px 6px 0 var(--hard); }
  .art-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .save-grid { grid-template-columns: 1fr; }
  .regime-pair { grid-template-columns: 1fr; }
  .msg { max-width: 92%; }
  .chat-wrap { height: 60vh; min-height: 400px; }
}

/* Installed (standalone) — app chrome regardless of width */
@media (display-mode: standalone) {
  .topbar { padding-top: env(safe-area-inset-top); height: calc(56px + env(safe-area-inset-top)); }
  nav.tabs { display: none; }
  .bottombar { display: flex; }
  main { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
}
