/* Momentum Creator cockpit — Momentum's brand on a light canvas.
   Layout from Momentum Outreach (white cards, pill tabs, tinted chips); colour
   from the brand: navy for structure and action, gold as the accent, silver for
   lines. Gold is never used for small text on white — it fails contrast — so
   text that carries gold uses the deeper --gold-ink. */
:root {
    --canvas: #F5F6F8;
    --card: #FFFFFF;
    --line: #E3E6EC;
    --ink: #0F1C2E;
    --muted: #5E6878;
    --faint: #8F98A6;
    --navy: #0F1C2E;
    --navy-2: #1C2E47;
    --navy-soft: #EDF0F5;
    --gold: #CFAF6A;
    --gold-soft: #F8F2E4;
    --gold-line: #EADBB5;
    --gold-ink: #8A6A24;
    --silver: #C9CED6;
    --ok: #16A34A;
    --ok-soft: #EAF8EF;
    --ok-line: #BFE8CD;
    --warn: #B7791F;
    --warn-soft: #FDF4E3;
    --warn-line: #F2DDB0;
    --bad: #D14343;
    --bad-soft: #FDECEC;
    --radius: 18px;
    --shadow: 0 1px 2px rgba(15,28,46,.04), 0 4px 16px rgba(15,28,46,.04);
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: inherit; }
html, body { background: var(--canvas); }
body { margin: 0; color: var(--ink); font: 400 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--gold-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
img { max-width: 100%; display: block; }

.frame { max-width: 1180px; margin: 0 auto; padding: 28px 28px 48px; }

/* ── Masthead ─────────────────────────────────────── */
.masthead { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.ident { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; }
.ident:hover { text-decoration: none; }
.logo { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(145deg, var(--navy-2), var(--navy));
        display: grid; place-items: center; color: var(--gold); font: 600 21px var(--display); box-shadow: 0 6px 14px rgba(15,28,46,.18); }
.name { font: 600 24px var(--display); letter-spacing: -0.01em; }
.name b { color: var(--gold-ink); font-weight: 600; }
.tagline { color: var(--muted); font-size: 14px; }

/* ── Tabs ─────────────────────────────────────────── */
.tabs { display: inline-flex; gap: 4px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
        margin-bottom: 26px; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 11px;
          color: var(--muted); font-weight: 500; white-space: nowrap; text-decoration: none; }
.tabs a:hover { color: var(--ink); background: #F7F7FA; text-decoration: none; }
.tabs a.on { color: var(--navy); background: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--gold-line); }
.tabs svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabs a.on svg { stroke: var(--gold-ink); }

/* ── Type ─────────────────────────────────────────── */
h1, h2, h3 { color: var(--ink); margin: 0; letter-spacing: -0.01em; font-family: var(--display); }
h1 { font-size: 26px; font-weight: 600; line-height: 1.2; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 17px; font-weight: 600; }
.section { margin: 30px 0 14px; }
.lede { color: var(--muted); max-width: 64ch; margin: 8px 0 0; }
.note, .aside { color: var(--muted); font-size: 13.5px; max-width: 64ch; }
small { color: var(--faint); font-size: 12.5px; }

.head { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--shadow); margin-bottom: 20px; }

/* ── Banner ───────────────────────────────────────── */
.banner { display: flex; align-items: flex-start; gap: 16px; padding: 22px 26px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); }
.banner > div { flex: 1; }
.banner h1 { font-size: 20px; }
.banner p { margin: 4px 0 0; color: var(--ink); opacity: .85; }
.banner .sub { color: var(--muted); opacity: 1; font-size: 13.5px; margin-top: 8px; }
.banner .dot { width: 18px; height: 18px; border-radius: 50%; margin-top: 4px; background: var(--faint); box-shadow: 0 0 0 5px rgba(143,152,166,.18); flex: none; }
.banner.is-ok   { background: var(--ok-soft);   border-color: var(--ok-line); }
.banner.is-ok .dot   { background: var(--ok);   box-shadow: 0 0 0 5px rgba(22,163,74,.16); }
.banner.is-warn { background: var(--warn-soft); border-color: var(--warn-line); }
.banner.is-warn .dot { background: var(--warn); box-shadow: 0 0 0 5px rgba(183,121,31,.16); }
.banner.is-idle { background: var(--gold-soft); border-color: var(--gold-line); }
.banner.is-idle .dot { background: var(--gold); box-shadow: 0 0 0 5px rgba(207,175,106,.22); }

/* ── Cards ────────────────────────────────────────── */
.grid { display: grid; gap: 22px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.card, .shelf { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: 12px; }
.shelf { margin-top: 20px; }
.shelf h2 { margin-bottom: 14px; }

.chip { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.chip.is-ok   { background: var(--ok-soft); color: var(--ok); }
.chip.is-idle { background: var(--navy-soft); color: var(--navy-2); }
.chip.is-warn { background: var(--warn-soft); color: var(--warn); }

.rows { margin: 16px 0 0; }
.rows div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.rows div:first-child { border-top: 0; }
.rows dt { color: var(--muted); }
.rows dd { margin: 0; font: 600 16px var(--display); }

.linkline { margin: 16px 0 10px; font-weight: 600; font-family: var(--display); overflow-wrap: anywhere; color: var(--ink); }
.card .note { margin: 0 0 12px; }

.strip { margin-top: 22px; padding: 16px 22px; border-radius: 14px; background: var(--ok-soft); border: 1px solid var(--ok-line); color: var(--ink); }
.strip b { color: var(--ok); }

/* ── Buttons ──────────────────────────────────────── */
.btn { appearance: none; cursor: pointer; border: 1px solid transparent; background: var(--navy); color: #fff;
       font: 600 15px var(--font); padding: 11px 20px; border-radius: 12px; min-height: 44px;
       display: inline-flex; align-items: center; text-decoration: none; box-shadow: 0 6px 14px rgba(15,28,46,.16); }
.btn:hover { background: var(--navy-2); text-decoration: none; }
.btn::after { content: ''; width: 6px; height: 6px; margin-left: 10px; border-radius: 50%; background: var(--gold); }
.btn.ghost { background: var(--card); color: var(--ink); border-color: var(--line); box-shadow: none; }
.btn.ghost:hover { background: #F7F7FA; }
.btn.is-done, .btn.ghost.is-done { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn.ghost::after, .btn.is-done::after { display: none; }
.quiet { font-size: 14px; font-weight: 600; }

/* ── Push ─────────────────────────────────────────── */
.offers { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.offer { display: grid; grid-template-columns: 96px 1fr auto; gap: 20px; align-items: start;
         background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.offer img, .img-blank { width: 96px; height: 96px; object-fit: cover; border-radius: 14px; background: var(--navy-soft); }
.offer h2 { font-size: 17px; }
.offer .price { font: 600 22px var(--display); margin: 6px 0 8px; }
.offer .state { display: inline-block; margin: 0; padding: 4px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; background: var(--ok-soft); color: var(--ok); }
.offer.state-low_stock .state, .offer.state-preorder .state { background: var(--warn-soft); color: var(--warn); }
.offer .desc { color: var(--muted); font-size: 14px; margin: 12px 0 0; max-width: 58ch; }
.offer .earn { margin: 12px 0 0; font-size: 14px; font-weight: 600; color: var(--gold-ink); }
.offer-act { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }

/* ── Shared blocks ────────────────────────────────── */
.empty { color: var(--muted); background: var(--card); border: 1px dashed #D5D9E1; border-radius: var(--radius); padding: 22px 24px; margin: 0; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 4px; }
.pair.three { grid-template-columns: repeat(3, 1fr); }
.pair > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow); }
.pair .k { display: block; color: var(--muted); font-size: 13.5px; }
.pair .v { display: block; font: 600 26px var(--display); margin-top: 4px; }
.pair .s { display: block; color: var(--faint); font-size: 13px; margin-top: 2px; }
.is-amber { color: var(--warn) !important; }

.files { list-style: none; margin: 0; padding: 0; }
.files li { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-top: 1px solid var(--line); }
.files li:first-child { border-top: 0; }
.files a { font-weight: 600; }
.files span { color: var(--muted); font-size: 13px; text-align: right; }

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; color: var(--muted); font-weight: 500; padding: 0 14px 10px 0; font-size: 13px; }
.tbl td { padding: 13px 14px 13px 0; border-top: 1px solid var(--line); vertical-align: top; }
.tbl tr.is-muted td { color: var(--faint); }
.shelf:has(.tbl) { overflow-x: auto; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 12px 28px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; }

/* ── Forms and the door ───────────────────────────── */
.door { max-width: 460px; margin: 6vh auto 0; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 34px 34px 30px; box-shadow: var(--shadow); }
.door.wide { max-width: 620px; }
.brand { display: none; }
.door h1 { font-size: 24px; }
.stack { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; }
.stack .btn { align-self: flex-start; margin-top: 12px; }
label { font-size: 14px; font-weight: 500; color: var(--ink); margin-top: 4px; }
input, textarea { font: 400 15px var(--font); color: var(--ink); background: #FAFAFC; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%; }
input:focus, textarea:focus { border-color: var(--gold); background: #fff; outline: none; box-shadow: 0 0 0 4px rgba(207,175,106,.2); }
input.code { font: 600 26px var(--display); letter-spacing: 0.3em; text-align: center; }
.flash { background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--ink); padding: 12px 16px; border-radius: 12px; font-size: 14px; }
.flash.is-error { background: var(--bad-soft); border-color: #F5C9C9; }
.flash p { margin: 0; }
.flash p + p { margin-top: 4px; }

.apply fieldset { border: 0; border-top: 1px solid var(--line); margin: 18px 0 0; padding: 22px 0 0; display: flex; flex-direction: column; gap: 8px; }
.apply legend { font: 600 16px var(--display); color: var(--ink); padding: 0 12px 0 0; }
.hint { color: var(--muted); font-size: 13px; margin: -2px 0 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.foot { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 13px; }
.foot a { color: var(--muted); }

/* ── Small screens ────────────────────────────────── */
@media (max-width: 900px) {
    .grid.three, .pair.three { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .frame { padding: 18px 16px 36px; }
    .is-signed .frame { padding-bottom: 96px; }
    .name { font-size: 20px; }
    .tagline { display: none; }

    /* Phones: the tabs become a bottom bar, icon over label, all six visible. */
    .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; margin: 0; border-radius: 0; border: 0;
            border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
            justify-content: space-around; gap: 0; box-shadow: 0 -4px 16px rgba(15,28,46,.06); }
    .tabs a { flex: 1; flex-direction: column; gap: 3px; padding: 7px 0 5px; font-size: 11px; border-radius: 10px; }
    .tabs svg { width: 21px; height: 21px; }
    .tabs a.on { box-shadow: none; }

    .banner { flex-wrap: wrap; padding: 18px 20px; }
    .banner .btn { width: 100%; justify-content: center; }
    .card, .shelf, .head { padding: 20px; }
    .pair { grid-template-columns: 1fr; }
    .offer { grid-template-columns: 72px 1fr; padding: 18px; }
    .offer img, .img-blank { width: 72px; height: 72px; }
    .offer-act { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 18px; }
    .door { padding: 26px 22px; margin-top: 2vh; }
}
@media (prefers-reduced-motion: no-preference) {
    .btn, .tabs a { transition: background .15s ease, color .15s ease; }
}