/* TG Partner Portal — Traxler Graphics brand standard (claude/tg-brand-standards.md), matched to traxlergraphics.com.
   Display: Archivo 900 @ 75% width (titles) · Archivo 700–800 (subheads, figures, buttons)
   Reading/UI: Inter · Labels and data: IBM Plex Mono 600 */

:root {
  --paper: #FAF8F4;
  --paper-2: #F2EEE6;
  --surface: #FFFFFF;
  --ink: #231F20;
  --ink-2: #3A3536;
  --muted: #6E6862;
  --line: #E3DED4;
  --line-strong: #231F20;
  --red: #E33726;
  --red-text: #C22A1B;
  --on-red: #FFFFFF;
  --c: #00A3E0; --m: #E6007E; --y: #FFE600; --k: #0F0F0F;
  --up: #0080B8;
  --down: #C22A1B;
  --track: #F2EEE6;
  --header-bg: rgba(250, 248, 244, 0.92);
  --crop-color: rgba(15, 15, 15, 0.4);
  --crop-len: 16px; --crop-w: 1.5px; --crop-gap: 6px;

  --font-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --t-hero: clamp(2.4rem, 1.6rem + 3vw, 3.6rem);
  --t-h2: clamp(1.7rem, 1.35rem + 1.3vw, 2.4rem);
  --t-h3: 1.08rem;
  --t-kpi: clamp(1.75rem, 1.45rem + 1.1vw, 2.35rem);
  --t-body: 1rem;
  --t-small: 0.92rem;
  --t-label: 0.74rem;
  --t-data: 0.9rem;

  --radius: 14px;
  --radius-sm: 10px;
  --gutter: clamp(16px, 3vw, 32px);
  --maxw: 1160px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #231F20;
    --paper-2: #2E2A2B;
    --surface: #2E2A2B;
    --ink: #FFFFFF;
    --ink-2: #CFC8C0;
    --muted: #B7B0A8;
    --line: #423D3E;
    --line-strong: #FFFFFF;
    --red-text: #FF7A66;
    --up: #00A3E0;
    --down: #FF7A66;
    --track: #423D3E;
    --header-bg: rgba(35, 31, 32, 0.92);
    --crop-color: rgba(255, 255, 255, 0.35);
    color-scheme: dark;
  }
  .logo-light { display: none !important; }
  .logo-dark { display: inline-block !important; }
}
.logo-dark { display: none; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
::selection { background: var(--red); color: #fff; }
img { max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red-text); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- type roles ---------- */
.display { font-family: var(--font-display); font-weight: 900; font-stretch: 75%; text-transform: uppercase; letter-spacing: 0; line-height: 0.92; margin: 0; }
h1.display { font-size: var(--t-hero); text-wrap: balance; }
h2.display { font-size: var(--t-h2); text-wrap: balance; }
h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.015em; font-size: var(--t-h3); line-height: 1.25; margin: 0 0 12px; }
.label { font-family: var(--font-mono); font-size: var(--t-label); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
/* Kicker: the CMYK chip, then the mono label (same as the site) */
.eyebrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.eyebrow::before {
  content: ""; flex: none; width: 49px; height: 10px;
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / 10px 10px no-repeat,
    linear-gradient(var(--m), var(--m)) 13px 0 / 10px 10px no-repeat,
    linear-gradient(var(--y), var(--y)) 26px 0 / 10px 10px no-repeat,
    linear-gradient(var(--k), var(--k)) 39px 0 / 10px 10px no-repeat;
}
@media (prefers-color-scheme: dark) { .eyebrow::before { --k: #FFFFFF; } }
.hl { background: linear-gradient(var(--y), var(--y)) 0 52% / 100% 72% no-repeat; color: #231F20; padding: 0 0.06em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: var(--t-small); }
p { margin: 0 0 12px; max-width: 68ch; }
.lede { font-size: 1.0625rem; color: var(--ink-2); max-width: 60ch; }
code { font-family: var(--font-mono); font-size: 0.85em; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
#app { flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; padding-bottom: 56px; }

.topbar { border-bottom: 1px solid var(--line); background: var(--header-bg); -webkit-backdrop-filter: saturate(1.2) blur(8px); backdrop-filter: saturate(1.2) blur(8px); position: sticky; top: 0; z-index: 20; }
.topbar .wrap { display: flex; align-items: center; gap: 14px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand img { height: 40px; width: auto; flex: none; }
.brand .brand-name { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 1.05rem; letter-spacing: 0.06em; line-height: 1.15; white-space: nowrap; }
.brand .brand-name small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.62rem; letter-spacing: 0.22em; color: var(--muted); }
.app-name { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); padding-left: 14px; border-left: 1px solid var(--line); white-space: nowrap; }
.topbar .spacer { flex: 1; }
.account { display: flex; align-items: center; gap: 10px; flex: none; }
.account .btn { white-space: nowrap; }
.account .who { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) { .account .who { display: none; } }
@media (max-width: 680px) { .brand .brand-name small { display: none; } }
@media (max-width: 540px) { .brand .brand-name { display: none; } .brand img { height: 36px; } .app-name { padding-left: 12px; } }

.pagehead { padding: 32px 0 8px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 24px; }
.pagehead .titles { flex: 1 1 320px; min-width: 0; }
.pagehead .eyebrow { margin-bottom: 12px; }
.pagehead h1 { overflow-wrap: anywhere; }

.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin: 18px 0 26px; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { font-family: var(--font-body); font-size: 0.92rem; font-weight: 500; text-decoration: none; padding: 12px 14px 11px; border-bottom: 3px solid transparent; white-space: nowrap; color: var(--ink-2); }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--red); }
.tabs a:hover { color: var(--ink); }

.grid { display: grid; gap: 16px; }
.grid.kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.grid.two { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .grid.two { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 16px; }
.section { margin-top: 30px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card .card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card .card-head h3 { margin: 0; }
.card.accent { border-color: var(--line-strong); }
/* Crop marks at the corners of feature cards (same values as the site) */
.crop { position: relative; }
.crop::before {
  content: ""; position: absolute; pointer-events: none;
  inset: calc(-1 * (var(--crop-gap) + var(--crop-len)));
  --o: calc(var(--crop-len) + var(--crop-gap));
  background:
    linear-gradient(var(--crop-color), var(--crop-color)) 0 var(--o) / var(--crop-len) var(--crop-w) no-repeat,
    linear-gradient(var(--crop-color), var(--crop-color)) var(--o) 0 / var(--crop-w) var(--crop-len) no-repeat,
    linear-gradient(var(--crop-color), var(--crop-color)) 100% var(--o) / var(--crop-len) var(--crop-w) no-repeat,
    linear-gradient(var(--crop-color), var(--crop-color)) calc(100% - var(--o)) 0 / var(--crop-w) var(--crop-len) no-repeat,
    linear-gradient(var(--crop-color), var(--crop-color)) 0 calc(100% - var(--o)) / var(--crop-len) var(--crop-w) no-repeat,
    linear-gradient(var(--crop-color), var(--crop-color)) var(--o) 100% / var(--crop-w) var(--crop-len) no-repeat,
    linear-gradient(var(--crop-color), var(--crop-color)) 100% calc(100% - var(--o)) / var(--crop-len) var(--crop-w) no-repeat,
    linear-gradient(var(--crop-color), var(--crop-color)) calc(100% - var(--o)) 100% / var(--crop-w) var(--crop-len) no-repeat;
}
.grid .crop, .stack .crop { --crop-len: 9px; --crop-gap: 4px; } /* stays inside the 16px gap between cards */
@media (max-width: 420px) { .crop::before { display: none; } }

.kpi .label { display: block; margin-bottom: 10px; }
.kpi .value { font-family: var(--font-display); font-weight: 800; font-size: var(--t-kpi); line-height: 1; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.kpi .delta { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; margin-top: 10px; color: var(--muted); }
.kpi .delta.up { color: var(--up); }
.kpi .delta.down { color: var(--down); }
.kpi .note { font-size: 0.8rem; color: var(--muted); margin-top: 10px; line-height: 1.45; }

/* ---------- overview band: upcoming payout + sales this period ---------- */
.band { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin-bottom: 26px; }
.band-tile { display: flex; flex-direction: column; padding: 22px 22px 18px; }
.band-tile .card-head { margin-bottom: 12px; align-items: center; }
.band-tile .card-head .label { margin: 0; }
.band-tile .value { font-size: clamp(2.3rem, 1.75rem + 2vw, 3.1rem); }
.band-tile .note { font-size: 0.86rem; }
.band-tile .note b { color: var(--ink); font-weight: 600; }
.meter { display: block; height: 10px; background: var(--track); border-radius: 999px; overflow: hidden; margin: 16px 0 12px; }
.meter > span { display: block; height: 100%; background: var(--red); border-radius: 999px; }
.band-tile .band-kv { grid-template-columns: 1fr auto; gap: 7px 16px; margin: 0; }
.band-tile .band-kv dt { display: flex; align-items: center; gap: 8px; padding-top: 0; }
.band-tile .band-kv dd { text-align: right; font-family: var(--font-mono); font-size: 0.84rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.sw { width: 10px; height: 10px; border-radius: 3px; background: var(--track); border: 1.5px solid var(--line); flex: none; }
.sw.on { background: var(--red); border-color: var(--red); }
.band-foot { margin: auto 0 0; padding-top: 14px; font-size: 0.84rem; line-height: 1.5; color: var(--muted); max-width: none; }
.band-foot b { color: var(--ink); font-weight: 600; }
.band-foot a { color: var(--ink); font-weight: 500; white-space: nowrap; }
.band .crop { --crop-len: 9px; --crop-gap: 4px; }
.daystrip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; align-items: end; height: 52px; margin-top: 18px; border-bottom: 1.5px solid var(--ink); }
.daystrip span { display: block; background: var(--red); border-radius: 2px 2px 0 0; }
.daystrip span.future { height: 100%; background: var(--track); border-radius: 2px 2px 0 0; }
.payees { list-style: none; margin: 0; padding: 0; }
.payees li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); }
.payees li:first-child { padding-top: 0; }
.payees li:last-child { border-bottom: 0; }
.payees .who { font-family: var(--font-display); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.payees .amt { font-family: var(--font-mono); font-weight: 600; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.payees .meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.payees .meta:empty { display: none; }
.daystrip-axis { display: flex; justify-content: space-between; margin-top: 6px; font-family: var(--font-mono); font-size: 0.66rem; color: var(--muted); }

/* ---------- controls ---------- */
.btn { font-family: var(--font-display); font-size: 0.92rem; font-weight: 600; letter-spacing: 0.02em; border: 2px solid var(--red); background: var(--red); color: var(--on-red); border-radius: 999px; padding: 11px 24px; min-height: 46px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; line-height: 1.1; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: #C22A1B; border-color: #C22A1B; color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.small { min-height: 36px; padding: 6px 16px; font-size: 0.84rem; }
.btn.danger { background: transparent; color: var(--red-text); border-color: var(--red-text); }
.btn.danger:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg button { font-family: var(--font-body); font-size: 0.86rem; font-weight: 500; background: var(--surface); color: var(--ink-2); border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 14px; min-height: 36px; cursor: pointer; }
.seg button:hover { border-color: var(--ink); color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

[hidden] { display: none !important; }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; margin-bottom: 7px; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=month], select, textarea {
  font-family: var(--font-body); font-size: 16px; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 12px 15px; width: 100%; min-height: 46px;
}
input[disabled] { color: var(--muted); background: var(--paper-2); }
textarea { min-height: 96px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--red); outline: none; }
.inline-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; margin-bottom: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--red); }

/* ---------- tables (same as the site's spec tables) ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-family: var(--font-body); font-size: var(--t-data); font-variant-numeric: tabular-nums; }
table.data th { text-align: left; font-family: var(--font-display); font-size: 0.76rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; background: #231F20; padding: 11px 14px; white-space: nowrap; }
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tbody tr:nth-child(odd) td { background: var(--paper-2); }
table.data tr:last-child td { border-bottom: 0; }
table.data .num { text-align: right; white-space: nowrap; }
table.data td.num, table.data td .mono { font-family: var(--font-mono); font-size: 0.84rem; }
table.data tfoot td { font-weight: 700; border-top: 2px solid var(--line-strong); background: var(--surface) !important; }
table.data a { text-decoration: none; border-bottom: 1px solid var(--line); }
table.data a:hover { border-bottom-color: var(--red); }
.card.flush table.data th:first-child, .card.flush table.data td:first-child { padding-left: 20px; }
.card.flush table.data th:last-child, .card.flush table.data td:last-child { padding-right: 20px; }
.item-line { font-size: var(--t-small); }

.chip { display: inline-block; font-family: var(--font-mono); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; border-radius: 999px; padding: 3px 10px; border: 1.5px solid var(--line); color: var(--ink-2); white-space: nowrap; background: var(--surface); }
.chip.good { color: var(--up); border-color: currentColor; }
.chip.warn { background: var(--y); border-color: var(--y); color: #231F20; }
.chip.hot { background: var(--red); border-color: var(--red); color: #fff; }
.chip.ink { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- monthly bars ---------- */
.bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; align-items: end; height: 190px; padding-top: 8px; border-bottom: 1.5px solid var(--ink); position: relative; }
.bars .gridline { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--line); pointer-events: none; }
.bars .gridline span { position: absolute; right: 0; top: -16px; font-family: var(--font-mono); font-size: 0.62rem; color: var(--muted); background: var(--surface); padding-left: 4px; }
.bar-col { height: 100%; display: flex; align-items: flex-end; justify-content: center; background: none; border: 0; padding: 0 1px; cursor: pointer; position: relative; z-index: 1; }
.bar-col .bar { width: 100%; max-width: 34px; background: var(--red); border-radius: 4px 4px 0 0; min-height: 0; transition: opacity .15s; }
.bar-col .bar.zero { background: var(--line); height: 2px !important; border-radius: 0; }
.bars:hover .bar-col .bar:not(.zero) { opacity: 0.5; }
.bars .bar-col:hover .bar, .bars .bar-col:focus-visible .bar { opacity: 1 !important; }
.bar-labels { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; margin-top: 7px; }
.bar-labels span { font-family: var(--font-mono); font-size: 0.66rem; color: var(--muted); text-align: center; overflow: hidden; }
@media (max-width: 480px) { .bar-labels span:nth-child(even) { visibility: hidden; } }
.tooltip { position: fixed; z-index: 50; pointer-events: none; background: #231F20; color: #fff; font-family: var(--font-mono); font-size: 0.74rem; line-height: 1.5; padding: 9px 12px; border-radius: var(--radius-sm); max-width: 240px; border: 1px solid #423D3E; }
.tooltip strong { display: block; font-weight: 600; letter-spacing: 0.04em; }

/* ---------- horizontal breakdown ---------- */
.hbars { display: grid; gap: 9px; }
.hbar { display: grid; grid-template-columns: 72px minmax(0, 1fr) 44px; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 0.8rem; }
.hbar .track { display: block; height: 12px; background: var(--track); border-radius: 999px; overflow: hidden; }
.hbar .fill { display: block; height: 100%; background: var(--red); border-radius: 999px; }
.chart-foot { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-2); }
.chart-foot b { font-weight: 600; color: var(--ink); }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.people li:first-child { padding-top: 0; }
.people .who-line { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; font-size: 0.92rem; }
.hbar .n { text-align: right; font-variant-numeric: tabular-nums; }
.hbar .k { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- products ---------- */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.product { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.product .ph { aspect-ratio: 1 / 1; background: #000; display: flex; align-items: center; justify-content: center; }
.product .ph img { width: 100%; height: 100%; object-fit: contain; }
.product .body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product .title { font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1.3; letter-spacing: -0.01em; }
.product .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.product .stats b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.product .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.product .foot a { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------- misc ---------- */
.notice { border: 1px solid var(--line); border-left: 4px solid var(--red); background: var(--surface); padding: 15px 18px; border-radius: var(--radius-sm); font-size: var(--t-small); }
.notice.soft { border-left-color: var(--ink); }
.notice p:last-child { margin-bottom: 0; }
.notice ol { margin: 6px 0 0; padding-left: 20px; }
.empty { text-align: center; padding: 38px 16px; color: var(--muted); font-size: var(--t-small); }
.kv { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 9px 16px; font-size: var(--t-small); }
.kv dt { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.kv dd { margin: 0; }
.linkbox { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.linkbox input { flex: 1 1 260px; }
.qr { background: #fff; padding: 14px; border-radius: var(--radius); width: 220px; max-width: 100%; border: 1px solid var(--line); }
.qr svg { display: block; width: 100%; height: auto; }
.loading { padding: 48px 0; text-align: center; font-family: var(--font-mono); font-size: 0.76rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #231F20; color: #fff; font-size: 0.9rem; font-weight: 500; padding: 12px 20px; border-radius: 999px; z-index: 60; max-width: calc(100vw - 32px); border: 1px solid #423D3E; }
.toast.err { background: var(--red); border-color: var(--red); color: #fff; }
dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); padding: 24px; width: min(520px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(35, 31, 32, .5); }
.rate-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 0.92rem; }
.partner-switch { max-width: 260px; }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }

/* ---------- login / connect ---------- */
.login { max-width: 460px; margin: 0 auto; padding: 52px 0; }
.login .logo { width: 150px; margin-bottom: 26px; }
.login .eyebrow { margin-bottom: 14px; }
.login h1 { margin-bottom: 14px; }

/* ---------- footer (ink band, like the site) ---------- */
footer.site { background: #231F20; color: #B7B0A8; border-top: 1px solid #423D3E; padding: 22px 0 26px; font-size: 0.86rem; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; align-items: center; }
footer.site a { color: #CFC8C0; }
footer.site a:hover { color: #fff; }
footer.site .foot-brand { color: #fff; font-weight: 600; }

/* ---------- referrals ---------- */
.grid.two > .stack { min-width: 0; } /* lets wide tables scroll inside their card instead of stretching the page */
@media (min-width: 861px) { .grid.two.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.nav-count { margin-left: 6px; padding: 1px 7px; font-size: 0.62rem; vertical-align: 1px; }
.ref-hero .eyebrow { margin-bottom: 12px; }
.ref-hero h2 { margin-bottom: 14px; }
.ref-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 14px 18px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.ref-kpis .label { display: block; margin-bottom: 8px; }
.ref-kpis .value { font-size: 1.55rem; }
.meter.sm { height: 8px; margin: 5px 0 4px; min-width: 96px; max-width: 160px; }
td.prog { min-width: 136px; }
.ref-note { max-width: 46ch; white-space: pre-line; margin-top: 4px; }
tr.is-threshold td { font-weight: 600; }
ol.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }
ol.steps li { counter-increment: step; position: relative; padding: 0 0 14px 38px; font-size: var(--t-small); }
ol.steps li:last-child { padding-bottom: 0; }
ol.steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 1px; font-family: var(--font-mono); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.08em; color: var(--red-text); }
ul.fine { margin: 0; padding-left: 18px; }
ul.fine li { margin-bottom: 8px; }
ul.fine li:last-child { margin-bottom: 0; }
.model-fields .hint { display: block; margin-top: 6px; font-size: 0.76rem; color: var(--muted); line-height: 1.35; }
.landing { max-width: 640px; margin: 0 auto; padding: 44px 0 8px; }
.landing .eyebrow { margin-bottom: 14px; }
.landing h1 { margin-bottom: 16px; }
.referred-by { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.referred-by b { color: var(--ink); }
ul.ticks { list-style: none; margin: 22px 0 28px; padding: 0; display: grid; gap: 12px; }
ul.ticks li { position: relative; padding-left: 26px; font-size: var(--t-small); max-width: 62ch; }
ul.ticks li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 11px; height: 11px; border-radius: 3px; background: var(--red); }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
[data-terms-fields].dim { opacity: 0.45; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.switch input { appearance: none; -webkit-appearance: none; flex: none; margin: 0; width: 40px; height: 22px; border-radius: 999px; background: var(--track); border: 1.5px solid var(--line); position: relative; cursor: pointer; transition: background .15s, border-color .15s; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 1px var(--line); transition: transform .15s; }
.switch input:checked { background: var(--red); border-color: var(--red); }
.switch input:checked::after { transform: translateX(18px); background: #fff; box-shadow: none; }
.switch input:disabled { opacity: 0.45; cursor: not-allowed; }
@media (prefers-color-scheme: dark) { .switch input::after { background: var(--muted); box-shadow: none; } }
.switch input:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
@media (forced-colors: active) { .switch input { appearance: auto; -webkit-appearance: auto; width: 20px; height: 20px; } .switch input::after { display: none; } }

@media (forced-colors: active) {
  .bar-col .bar, .hbar .fill, .meter > span, .sw.on, .daystrip span:not(.future) { background: CanvasText; }
  .eyebrow::before { forced-color-adjust: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* referral alerts setup + store credit */
details.setup { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
details.setup summary { cursor: pointer; padding: 4px 0; }
details.setup summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
details.setup ol.steps { margin: 12px 0; }
details.setup code { background: var(--paper-2); padding: 1px 5px; border-radius: 3px; overflow-wrap: anywhere; }
.card-head .chip { flex: none; }
table.data td.num .small { font-family: var(--font-body); font-size: 0.76rem; white-space: normal; min-width: 7.5em; }

/* ---------- discount codes ---------- */
table.data.calc-table tbody th { background: transparent; color: var(--ink-2); font-family: var(--font-body); font-size: var(--t-data); font-weight: 500; letter-spacing: 0; text-transform: none; white-space: normal; padding: 11px 14px; border-bottom: 1px solid var(--line); }
table.data.calc-table tbody tr.calc-key th, table.data.calc-table tbody tr.calc-key td { background: var(--y); color: #231F20; font-weight: 700; }
.calc-note { margin: 12px 0 0; }
.calc-cover { color: var(--red-text); font-weight: 600; }
.disc-card .card-head h3 .mono { font-family: var(--font-mono); letter-spacing: 0.04em; }
.disc-detail { margin-top: 14px; }
.disc-detail summary { cursor: pointer; color: var(--ink-2); margin-bottom: 10px; }
.disc-actions { margin-top: 16px; }
.disc-actions .btn-row { margin-top: 4px; }
table.data.calc-table tbody tr:nth-child(odd) th { background: var(--paper-2); }

/* Per-item payouts: product rows with a POD / Stocked picker under the title */
.rate-row.prod { align-items: start; padding: 8px 0; border-top: 1px solid var(--line); margin-bottom: 0; }
.rate-row.prod .item-line { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rate-row.prod .fulfill-pick { width: auto; max-width: 180px; padding: 4px 8px; font-size: 0.82rem; }
.rate-row.prod input::placeholder { color: var(--muted); }
@media (max-width: 520px) { .rate-row { grid-template-columns: minmax(0, 1fr) 110px; } }

/* ---------- referrers: join picker, referrer page (Oct 30, 2026) ---------- */
.circle-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.circle { min-height: 56px; text-align: left; font-family: var(--font-body); font-size: 0.95rem; font-weight: 600; line-height: 1.25; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; cursor: pointer; }
.circle:hover { border-color: var(--ink); }
.circle[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.kit-box { margin: 0 0 14px; }
ul.ticks.kit { margin: 0; gap: 8px; }
.tier-kv { grid-template-columns: 1fr max-content; }
.tier-kv dd { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; text-align: right; }
.landing .card { margin-bottom: 18px; }
.founding, .offer { font-size: var(--t-small); margin: 0 0 18px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.script { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--paper); }
.script-text { margin: 0 0 10px; font-size: var(--t-small); line-height: 1.5; overflow-wrap: anywhere; }
fieldset.needs { border: 0; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
fieldset.needs legend { margin-bottom: 10px; padding: 0; }
fieldset.needs .check { margin-bottom: 10px; align-items: flex-start; }
.join-done .linkbox { margin: 6px 0 14px; }
.tier-rows .inline-fields { margin-bottom: 0; }
@media (max-width: 520px) {
  .circle-grid, fieldset.needs { grid-template-columns: 1fr; }
}
/* ---------- two doors: something made vs their own merch store (Oct 30, 2026) ---------- */
.doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 6px 0 22px; }
.door { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; cursor: pointer; font-family: var(--font-body);
  background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 16px; min-height: 120px; }
.door:hover { border-color: var(--ink); }
.door[aria-checked="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.door[aria-checked="true"] .door-s { color: var(--paper); opacity: 0.85; }
.door-t { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; line-height: 1.15; }
.door-s { font-size: var(--t-small); line-height: 1.4; color: var(--ink-2); }
.door .chip { margin-top: auto; }
@media (max-width: 520px) { .doors { grid-template-columns: 1fr; } .door { min-height: 0; } }
.door-sec + .door-sec { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.door-k { display: flex; align-items: center; gap: 8px; font-weight: 700; margin: 0 0 4px; }
.door-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--paper);
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; flex: none; }
.door-sec > .small.muted { margin: 0 0 10px; }
.door-note { margin: 12px 0 0; padding: 10px 12px; border-left: 3px solid var(--ink); background: var(--paper); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
