/* Layout and components. All colours, fonts and the site name come from theme.css; the artwork from static/brand. */
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.5 var(--font-body); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2 { color: var(--heading); }
h1 { font-size: 1.7rem; margin: .2rem 0 .6rem; line-height: 1.25; }
h2 { font-size: 1.2rem; margin: 1.4rem 0 .6rem; }
h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
p { margin: .4rem 0 .8rem; }
small, .muted { color: var(--muted); }
code { background: var(--chip); padding: 1px 5px; border-radius: 4px; font-size: .9em; font-family: var(--font-mono); }

/* layout */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 18px; }
header.top { background: var(--header); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; color: var(--header-ink); }
header.top .wrap { display: flex; align-items: center; gap: 14px; min-height: 56px; flex-wrap: wrap; }
.brand { font-weight: 700; letter-spacing: .3px; color: var(--header-ink); white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.brand:hover { text-decoration: none; }
.beta-badge { font-size: .7rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--header-ink); border: 1px solid var(--header-muted); border-radius: 99px; padding: 1px 7px; margin-left: -4px; }
.brand .mark { width: 40px; height: 40px; display: block; flex: none; }
.brand .site-name::after { content: var(--site-name); }
nav.main { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
nav.main a { font-size: .94rem; color: var(--header-muted); padding: 6px 5px; border-radius: 8px; white-space: nowrap; }
nav.main a.on, nav.main a:hover { color: var(--accent-ink); background: var(--accent); text-decoration: none; }
nav.main a .lock { font-size: .8em; opacity: .7; }
.who { color: var(--header-muted); font-size: .85rem; white-space: nowrap; }
.who a { color: var(--header-ink); }
.who form.logout { display: inline; margin: 0; }
.who form.logout button { background: none; border: 0; padding: 0; color: var(--header-ink); font: inherit; font-weight: 400; cursor: pointer; }
.who form.logout button:hover { background: none; text-decoration: underline; }
main { padding: 22px 0 60px; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; padding: 18px 0 30px; }
footer a { color: var(--muted); margin-right: 14px; }
footer .by { text-align: center; margin-top: 18px; line-height: 0; }
footer .by img { height: 48px; width: auto; opacity: .85; }
@media (max-width: 620px) { footer .by img { height: 40px; } }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 900px) { .g4, .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .g2, .g3, .g4, .g5 { grid-template-columns: 1fr; } h1 { font-size: 1.35rem; } nav.main { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; } }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.right { text-align: right; }

/* cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.card h3 { margin-top: 0; color: var(--muted); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; }
.big { font-size: 1.9rem; font-weight: 700; line-height: 1.15; }
.hero { padding: 26px; background: linear-gradient(135deg, var(--panel) 0%, var(--panel2) 100%); }
.hero .big { font-size: 2.4rem; }
/* review 12, A3.4: money first (a sentence, so a little smaller), the efficiency as a small line under it */
.hero .big:has(+ .muted), .hero .big:has(+ .effline) { font-size: 1.9rem; line-height: 1.25; }
.hero .effline { font-size: 1rem; color: var(--muted); margin: 10px 0 0; }
.hero .effline:first-child { margin-top: 0; }   /* review 15, item 22: the line alone (Optimiser factions) */
.kpi .big { font-size: 1.6rem; }
.claim, .good { color: var(--claim); }
.premium, .neutral { color: var(--premium); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .78rem; background: var(--chip); color: var(--muted); white-space: nowrap; }
.pill.good { background: var(--claim-bg); color: var(--claim); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.alert { background: var(--alert-bg); color: var(--alert); }
/* review 13, I3 (owner pages): red = act now (overdue, a key failing), the same as a red light; amber = coming up
   (a top-up due, a cancellation stopping, a model light); the owner's outflows (claims he sends) are never "good" green */
.banner.alert { background: var(--alert-bg); border-color: var(--alert); color: var(--text); }
.banner.alert b { color: var(--alert); }
body.owner .claim { color: var(--premium); }
/* review 13, I4: no cut-off columns on the owner pages (a wider page; long notes wrap) */
body.owner .wrap { max-width: 1480px; }
td.step { white-space: normal; min-width: 150px; max-width: 260px; }
td .pill.wraps { white-space: normal; }
.today-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.today-list a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.today-list a b { color: var(--text); }
.today-list a.alert b { color: var(--alert); } .today-list a.warn b { color: var(--warn); }
.seen { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.tier { display: inline-flex; align-items: center; gap: 6px; }
.diamond { width: 12px; height: 12px; transform: rotate(45deg); display: inline-block; border-radius: 2px; }
.d-bronze { background: var(--tier-bronze); } .d-silver { background: var(--tier-silver); } .d-gold { background: var(--tier-gold); } .d-none { background: transparent; border: 1px solid var(--muted); }
.light { width: 12px; height: 12px; border-radius: 50%; display: inline-block; vertical-align: middle; }
.l-green { background: var(--claim); box-shadow: 0 0 8px var(--claim); } .l-amber { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.l-red { background: var(--alert); box-shadow: 0 0 8px var(--alert); }

/* banners */
.banner { border-radius: var(--radius); padding: 10px 14px; margin: 0 0 14px; border: 1px solid; }
.banner.warn { background: var(--warn-bg); border-color: var(--warn); color: var(--text); }
.banner.info { background: var(--panel2); border-color: var(--line); }
.banner.info b { color: var(--heading); }
.banner b { color: var(--warn); }
.banner.gain { background: var(--claim-bg); border-color: var(--claim); color: var(--text); }
.banner.gain b { color: var(--claim); }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .4px; background: var(--panel2); position: sticky; top: 0; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:after { content: " ↕"; opacity: .35; }
tr.total td { font-weight: 700; background: var(--panel2); }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--panel2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.wrap, th.wrap { white-space: normal; }

/* forms */
input, select, button, textarea { font: inherit; color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
input[type=range] { padding: 0; accent-color: var(--accent); }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
button, .btn { background: var(--accent); color: var(--accent-ink); border: 0; font-weight: 600; cursor: pointer; padding: 9px 14px; border-radius: 8px; display: inline-block; }
button:hover, .btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn.ghost, button.ghost { background: transparent; color: var(--text); border: 1px solid var(--muted-line); }
.btn.ghost:hover, button.ghost:hover { background: var(--panel2); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.btn.small, button.small { padding: 4px 9px; font-size: .85rem; }
/* review 14, C10: Cancel on a product line is small and secondary (a quiet link; the next page asks to confirm) */
a.cancel-link { font-size: .8rem; color: var(--muted); text-decoration: underline; padding: 2px 4px; }
a.cancel-link:hover { color: var(--text); }
/* review 13b, 10: a Pay link the leader has opened turns muted, like a visited link */
.btn.opened { background: transparent; color: var(--muted); border: 1px solid var(--line); font-weight: 500; }
.btn.opened:hover { background: var(--panel2); color: var(--muted); }
.paycell { white-space: nowrap; }
label { display: block; color: var(--muted); font-size: .85rem; margin-bottom: 4px; }
.field { margin-bottom: 12px; }
.keybox input { width: 100%; font-family: var(--font-mono); letter-spacing: 1px; }
.controls { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.controls .field { margin: 0; }

/* locked products */
/* review 14, C10: the blurred preview and the lock message share one grid cell under the card's title, so the card
   grows to fit the message and its headline is never drawn over the title (13b's note) */
.locked { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
.locked > h3 { grid-row: 1; grid-column: 1; }
.locked > .preview, .locked > .lockmsg { grid-row: 2; grid-column: 1; }
.locked .preview { filter: blur(3px); opacity: .45; pointer-events: none; user-select: none; }
.locked .lockmsg { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 12px 8px; background: linear-gradient(transparent, var(--panel)); }
.lockmsg .big { font-size: 1.3rem; }

/* feed */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: baseline; }
.feed li:last-child { border-bottom: 0; }
.feed .t { color: var(--muted); font-size: .8rem; min-width: 92px; }

/* Torn-style role cards (optimiser) */
.lineup { display: flex; gap: 6px; flex-wrap: wrap; background: var(--torn-row); padding: 6px; border-radius: 6px; border: 1px solid var(--torn-line); }
.rc { width: 124px; background: linear-gradient(var(--torn-card-top), var(--torn-card-bottom)); border: 1px solid var(--torn-line); border-radius: 4px; font-family: var(--font-torn); }
.rc .h { display: flex; align-items: center; gap: 5px; padding: 3px 6px 2px; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--torn-text); letter-spacing: .2px; }
.rc .h .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--torn-dot); border: 1px solid var(--torn-dot); flex: none; }
.rc .h .dot.hollow { background: transparent; border: 1px dashed var(--torn-dot); }
.rc .h .lab { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc .h .c { font-weight: 700; }
.cpr-hi { color: var(--cpr-high); } .cpr-mid { color: var(--cpr-mid); } .cpr-lo { color: var(--cpr-low); } .cpr-none { color: var(--muted); }
.rc .n { margin: 2px 5px 5px; background: var(--torn-name); border: 1px solid var(--torn-line); border-radius: 2px; color: var(--torn-text); text-align: center; font-size: 11px; padding: 4px 2px; font-family: var(--font-mono); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc.plan { border-style: dashed; border-color: var(--accent); }
.rc.plan .n { color: var(--link); }
.rc.empty .n { color: var(--muted); }
.rc .it { font-size: 10px; color: var(--muted); text-align: center; margin: -2px 0 4px; }
.lineup-row { display: grid; grid-template-columns: 170px 1fr 180px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lineup-row:last-child { border-bottom: 0; }
@media (max-width: 760px) { .lineup-row { grid-template-columns: 1fr; } }

/* modal */
#modal:empty { display: none; }
.modal-bg { position: fixed; inset: 0; background: var(--overlay); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 40px 12px; overflow: auto; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; max-width: 1120px; width: 100%; }

/* misc */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; }
.kv div:nth-child(odd) { color: var(--muted); }
.formula { font-family: var(--font-mono); background: var(--panel2); border: 1px dashed var(--line); padding: 8px 12px; border-radius: 8px; display: inline-block; }
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.signer { margin: 0 0 14px; }                     /* review 14, B5: sign-up step 1, who's signing up */
.steps span { padding: 4px 10px; border-radius: 99px; background: var(--chip); color: var(--muted); font-size: .85rem; }
.steps span.on { background: var(--accent); color: var(--accent-ink); }
.steps span.done { color: var(--claim); }
.tiercard { border-top: 4px solid var(--line); }
.tiercard.bronze { border-top-color: var(--tier-bronze); } .tiercard.silver { border-top-color: var(--tier-silver); } .tiercard.gold { border-top-color: var(--tier-gold); }
.tiercard ul { padding-left: 18px; margin: 8px 0; }
.tiercard.chosen { outline: 2px solid var(--gold); outline-offset: 2px; }   /* review 13, C4: the chosen plan */
.optcard ul { padding-left: 18px; margin: 4px 0 10px; }
.price { font-size: 1.4rem; font-weight: 700; }
.tiercard .cover-pct { font-size: 2.6rem; font-weight: 800; color: var(--heading); line-height: 1.1; margin-top: 10px; }
.tiercard .cover-pct small { font-size: .95rem; font-weight: 600; color: var(--muted); }
.tiercard .price { font-size: 1.15rem; }
.tiercard .covers { font-size: .85rem; margin-top: 8px; }
.land-hero { text-align: center; padding: 34px 0 10px; }
.land-hero h1 { font-size: 2.3rem; max-width: 820px; margin: 0 auto .5rem; }
.land-hero p.sub { font-size: 1.15rem; color: var(--muted); max-width: 720px; margin: 0 auto; }
@media (max-width: 620px) { .land-hero h1 { font-size: 1.6rem; } }
.disclosure td, .disclosure th { white-space: normal; }
.theme-toggle { background: transparent; border: 1px solid var(--header-muted); color: var(--header-muted); padding: 4px 8px; font-size: .8rem; }
.note { font-size: .85rem; color: var(--muted); }
.mono { font-family: var(--font-mono); overflow-wrap: anywhere; }
canvas { max-width: 100%; }

/* small additions (review 1) */
details.disclose { margin-top: 12px; }
details.disclose summary { cursor: pointer; color: var(--link); }
.legend { display: flex; gap: 14px; align-items: center; font-size: .85rem; color: var(--muted); margin: 6px 0 0; }
.legend .rc { width: 44px; display: inline-block; height: 14px; vertical-align: middle; }
.copy { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.copy input { flex: 1; min-width: 220px; font-family: var(--font-mono); }
.radios { display: flex; gap: 6px; flex-wrap: wrap; }
.radios label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); margin: 0; cursor: pointer; }
.radios label:has(input:checked) { border-color: var(--focus); background: var(--panel2); }
.endlabels { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); }

/* review 5: "new" = first time in this role in this crime (optimiser, board) */
.newtag { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 6px; font-size: .68rem; font-weight: 600;
  letter-spacing: .02em; text-transform: lowercase; background: var(--chip); color: var(--muted); vertical-align: middle; }

/* ---- review 6 ---- */
/* product names with their mark (A5) and stage pills (A6) */
/* review 14, E2: the mark is always the button (the icon PNG), sized to the text beside it, always with the name */
.prod { display: inline-flex; align-items: center; gap: .35em; white-space: nowrap; vertical-align: middle; }
.prod .picon { flex: none; display: block; width: 1.4em; height: 1.4em; margin: -.15em 0; }
/* the owner's Customers list: the Optimiser's button alone, text-sized */
.pmark { width: 1.4em; height: 1.4em; vertical-align: middle; }
.stage { display: inline-block; font-size: .66rem; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; padding: 0 6px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); vertical-align: middle; line-height: 1.5; }
h1 .stage, h2 .stage, h3 .stage { font-size: .62rem; }
/* review 12, A16.1: the cog sits centred on the header's text line (same box height as the other links) */
nav.main { align-items: center; }
nav.main a.cog { font-size: 1.1rem; line-height: 1; padding: 0 8px; display: inline-flex; align-items: center;
  justify-content: center; height: calc(.94rem * 1.5 + 12px); }
/* a small (?) with a few words behind it (A7) */
/* review 12, A16.2: every (?) centred on its line of text: an inline box the height of the text's x-height band */
.tip { position: relative; display: inline-flex; align-items: center; vertical-align: middle; top: -.08em; line-height: 1;
  cursor: help; outline: none; }
.tip .tq { display: inline-flex; align-items: center; justify-content: center; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); font-size: .66rem; font-weight: 700; line-height: 1; }
.tip .tt { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); width: max-content; max-width: 240px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; font-size: .78rem; font-weight: 400; line-height: 1.35; text-transform: none; letter-spacing: 0; white-space: normal; box-shadow: 0 6px 18px var(--shadow, transparent); z-index: 40; visibility: hidden; opacity: 0; transition: opacity .12s; pointer-events: none; }
.tip:hover .tt, .tip:focus .tt, .tip:focus-within .tt { visibility: visible; opacity: 1; }
/* one row of member cards per OC, filled slots on the left (C-Optimiser 2) */
.lineup.onerow { flex-wrap: nowrap; overflow-x: auto; }
.lineup.onerow .rc { flex: 1 1 0; min-width: 88px; max-width: 124px; }
.lineup-row .tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.lineup-row .val { font-weight: 700; }
/* payout settings as steps, one row each (C-Payouts 1) */
.steps-form .step { display: grid; grid-template-columns: 190px 1fr; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.steps-form .step:last-child { border-bottom: 0; }
.steps-form .step > .lab { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.steps-form .step > .lab .n { display: inline-flex; width: 20px; height: 20px; border-radius: 50%; background: var(--chip); color: var(--muted); font-size: .75rem; align-items: center; justify-content: center; flex: none; }
.levels { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; align-items: end; }
.levels > div { flex: 1 1 0; min-width: 52px; }
.levels > div label { margin: 0; font-size: .75rem; }
.levels input { width: 100%; padding: 4px 6px; }
.levels .global { border-right: 1px solid var(--line); padding-right: 8px; margin-right: 2px; }
.presets .row { gap: 6px; flex-wrap: wrap; }
.preset-row-label { font-size: .75rem; color: var(--muted); min-width: 60px; }
.ins-line { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; padding: 12px 16px; border-radius: 10px; background: var(--claim-bg); color: var(--claim); font-size: 1.05rem; margin-bottom: 12px; }
.ins-line.none { background: var(--chip); color: var(--text); }
.ins-line b { font-size: 1.25rem; }
.working { display: none; }
.show-working .working { display: table-row; }
.foot { font-size: .8rem; color: var(--muted); margin-top: 8px; }
@media (max-width: 760px) { .steps-form .step { grid-template-columns: 1fr; gap: 6px; } }
.land-key { max-width: 560px; margin: 18px auto 0; }
.wordmark { text-align: center; line-height: 0; margin: 8px 0 14px; }
/* review 14, E3: the logo now ends "BY [gorilla] CORNHUB"; its own parts stay the size they were at 320px / 240px */
.wordmark img { width: 404px; height: auto; max-width: 100%; }
@media (max-width: 620px) { .wordmark img { width: 303px; } }
.working-cell { display: none; }
.show-working .working-cell { display: block; }
.keybox select { width: 100%; max-width: 100%; }

/* review 8, D: presets as four small cards, each with its one plain line */
.preset-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.preset-grid .preset { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left;
  background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.preset-grid .preset span { font-size: .78rem; color: var(--muted); font-weight: 400; line-height: 1.3; }
.preset-grid .preset.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.preset-grid .preset:disabled { cursor: default; opacity: .7; }

/* review 10, B: customer charts */
.chart-card h3 { margin-bottom: 6px; }
.chart-box { position: relative; height: 240px; }
.chart-box.tall { height: 300px; }
.chart-box.small-chart { height: 180px; margin-top: 8px; }   /* review 14, C8: the luck and paid-out bars */
.chart-legend { margin: 0 0 6px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.chart-legend .key { display: inline-block; width: 22px; height: 0; margin-right: 6px; vertical-align: middle; }
.chart-legend .k-green { border-top: 3px solid var(--claim); }
.chart-legend .k-dash { border-top: 2px dashed var(--chart-2); }
/* review 10, B7: "Your estimated finances" on the Plans page */
.estimate .mid { font-size: 1.3rem; font-weight: 700; }
.estimate .mid.ratio { font-size: 1.6rem; margin-top: 14px; }
.estimate .note { margin: 2px 0 0; }
/* review 10, A: the guest-view label in the header */
.guest-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--header-muted); color: var(--header-ink); font-size: .8rem; }
.tester-pill { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--gold); color: var(--gold); font-size: .75rem; vertical-align: 1px; }   /* review 13b, 3 */

/* review 12, A6.2 / C: owned = green tick, not owned = grey tick of the same shape (top-right of a product card) */
.card.has-tick { position: relative; padding-right: 48px; }
.tick { position: absolute; top: 12px; right: 12px; width: 26px; height: 26px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-size: 15px; font-weight: 700; line-height: 1; background: var(--chip);
  color: var(--muted); }
.tick.on { background: var(--claim); color: var(--panel); }
.prodline { padding: 8px 0; border-bottom: 1px solid var(--line); gap: 10px; flex-wrap: wrap; }
.prodline:last-of-type { border-bottom: 0; }
.prodline form { margin: 0; }
/* review 12, A12.1: the owner's Customers page keeps three fixed product places (O P I) so rows line up */
.pslots { display: inline-flex; gap: 4px; }
.pslot { display: inline-block; width: 28px; text-align: center; }
/* review 12, A5.2: the To pay breakdown (opens below the figure; the last rows open upwards) */
.paytip { cursor: pointer; }
.paytip .tt { left: auto; right: 0; transform: none; bottom: auto; top: calc(100% + 6px); max-width: 340px;
  min-width: 250px; text-align: left; }
.paytip.up .tt { top: auto; bottom: calc(100% + 6px); }
.paytip .bl { display: flex; justify-content: space-between; gap: 18px; font-variant-numeric: tabular-nums; }
.paytip .bl.tot { font-weight: 700; border-top: 1px solid var(--line); margin-top: 3px; padding-top: 3px; }
/* review 12, A6.4: the Plans cards show value only */
.tiercard .would { font-size: 1.05rem; margin: 8px 0 2px; }
/* review 12, A12.3: owner-side column explanations */
.colhelp ul { margin: 0; padding-left: 18px; font-size: .88rem; color: var(--muted); }
.colhelp li { margin: 2px 0; }
.colhelp b { color: var(--text); }
/* review 12, A11.1: sign-up step 1, one grid: icon, name and tick on one row; the price under the name */
.pickgrid { margin-bottom: 8px; }
.card.pick { display: flex; flex-direction: column; gap: 8px; cursor: pointer; color: var(--text); margin: 0; }
.pick-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; }
.pick-top input { width: 20px; height: 20px; flex: none; }
.pick-price { color: var(--muted); font-size: .95rem; }
.card.pick select { margin-top: 2px; }

/* review 13, H1: the member board (and the Optimiser's next joins) on a phone: under ~620px each row becomes a card
   (member, OC and role, time or Join), with the Join button at least 44px tall, so nothing sits off-screen */
.btn.join { min-height: 44px; min-width: 88px; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 620px) {
  .table-wrap:has(table.cards-on-phone) { border: 0; background: transparent; overflow-x: visible; }
  table.cards-on-phone, table.cards-on-phone tbody, table.cards-on-phone tr, table.cards-on-phone td { display: block; width: 100%; }
  table.cards-on-phone thead { display: none; }
  table.cards-on-phone tr { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 10px; }
  table.cards-on-phone td { border: 0; padding: 3px 0; text-align: left; white-space: normal; overflow-wrap: anywhere; }
  table.cards-on-phone td.num { text-align: left; }
  table.cards-on-phone td[data-l]::before { content: attr(data-l); display: inline-block; min-width: 64px; color: var(--muted); font-size: .85rem; }
  table.cards-on-phone td[data-l="Name"]::before, table.cards-on-phone td[data-l="Join"]::before { content: none; }
  table.cards-on-phone .btn.join { width: 100%; margin-top: 6px; }
}
/* a long "(leave X · OC · with Name)" note wraps under the member, so Next joins never runs off the page */
.leave-note { display: block; white-space: normal; max-width: 340px; }
/* review 13, H6: the board's gains line */
.gains { font-size: 1.25rem; font-weight: 700; margin: 2px 0 14px; }
/* review 13, J6: a payment reference ("O3-NH-2026-11") in the normal font, so the O never reads as a zero */
.ref { font-family: var(--font-body); font-weight: 600; letter-spacing: .02em; overflow-wrap: anywhere; }

/* review 13b, 16: "Delete my data" sits quietly under the free score */
form.delete-data { margin-top: 10px; text-align: right; }

/* review 14, A5: away marks (one row: member, day, time, Save; the list under it with Remove) */
.away-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin: 6px 0 12px; }
.away-row label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); }
.away-row select, .away-row input { min-width: 0; }
.away-list .away-line { padding: 6px 0; border-bottom: 1px solid var(--line); }
.away-list .away-line:last-child { border-bottom: 0; }
.away-list form { margin: 0; }

/* review 14, B1: the live check report (owner faction page) */
.livecheck textarea { width: 100%; font-size: .78rem; line-height: 1.35; margin-top: 8px; white-space: pre; }

/* review 14, C9: product marks above Statements' columns and lines */
tr.prodheads th { border-bottom: 0; padding-bottom: 0; font-weight: 600; text-transform: none; letter-spacing: 0;
                  font-size: .9rem; color: var(--text); position: static; }
tr.prodheads th { text-align: center; }
tr.prodheads th .prod { justify-content: center; }
.kv div.prodhead { grid-column: 1 / -1; margin-top: 6px; font-weight: 600; color: var(--text); }
/* review 15, item 4: the plan picked on its card at sign-up; a plan too large for the alpha limit is greyed */
.tiercard .tierpick { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--heading); }
.tiercard .tierpick input { width: 18px; height: 18px; }
.tiercard.too-large { opacity: .6; }
.tierpicker { margin: 0 0 12px; }

/* review 15, item 24: `hidden` always hides (a .row rule would otherwise show it) */
[hidden] { display: none !important; }

/* review 15, item 25: phone and narrow screens.
   - The menu never wraps (⚙ stays on the menu's line): where it doesn't fit beside the logo and the name, it gets a
     line of its own and scrolls sideways. */
body:not(.owner) nav.main { flex-wrap: nowrap; overflow-x: auto; min-width: 0; scrollbar-width: thin; }
@media (max-width: 1100px) { body:not(.owner) nav.main { order: 3; flex: 1 0 100%; width: 100%; } }
/* - A "?" tip takes no room until it's open (a hidden one off the right edge made the page wider than the screen),
     never runs wider than the screen, and opens leftwards from a right-hand column. */
.tip .tt { display: none; visibility: visible; opacity: 1; max-width: min(240px, calc(100vw - 24px)); }
.tip:hover .tt, .tip:focus .tt, .tip:focus-within .tt { display: block; }
.right .tip .tt { left: auto; right: 0; transform: none; }
/* - Role labels and names in full on a second line (Muscle #1, #2 and #3 always told apart); the crew wraps instead
     of running off the side. */
@media (max-width: 620px) {
  .rc .h { flex-wrap: wrap; }
  .rc .h .c { margin-left: auto; }
  .rc .h .lab { order: 3; flex: 1 0 100%; white-space: normal; overflow: visible; text-overflow: clip; }
  .rc .n { white-space: normal; overflow-wrap: anywhere; }
  .lineup.onerow { flex-wrap: wrap; overflow-x: visible; }
  .lineup.onerow .rc { flex: 1 1 calc(33.333% - 6px); max-width: none; }
}
/* review 15, item 34: the statement's Settlement line under a divider; a reference never wraps */
.kv .settle-line { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.ref.nowrap { white-space: nowrap; overflow-wrap: normal; }

/* Insurance wording (owner, 5 Dec 2026): the headline under Insurance's name, and the crew line on each plan */
.big.headline { font-size: 1.2rem; margin: -4px 0 10px; }
.tiercard .crewline { margin: 6px 0 4px; font-size: .92rem; }
