/* SAGEO app: chat, report pages, admin. Same brand as the landing; one deliberate light theme. */
:root {
  color-scheme: light;
  --ink: #1d1a16; --cream: #fbf6ec; --paper: #ffffff; --soft: #f1e9d9; --hair: #d9cfbd;
  --orange: #e8541d; --orange-deep: #b93d0f; --yellow: #ffd84a; --sky: #bfe3ff; --peach: #ffc9b3; --mint: #cdeccf;
  --muted: #6f675b; --you: #1f6fd1; --you-soft: #dcebff; --good: #2f8a4a; --bad: #b93d0f;
  --disp: 'Bricolage Grotesque', 'Arial Black', sans-serif;
  --body: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'DM Mono', ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 15px/1.45 var(--body); }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
a { color: var(--orange-deep); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.disp { font-family: var(--disp); font-weight: 800; letter-spacing: -0.025em; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 13px; color: var(--muted); }
.tab { font-variant-numeric: tabular-nums; }

/* ---------- top bar ---------- */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; display: flex; align-items: center; gap: 12px;
       justify-content: space-between; padding: 10px 16px; background: var(--cream); border-bottom: 2px solid var(--ink); }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--disp); font-weight: 800; font-size: 22px; color: var(--ink); text-decoration: none; }
.top .who { display: flex; align-items: center; gap: 10px; font-size: 14px; min-width: 0; }
.top .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; background: var(--soft); white-space: nowrap; }
.badge.paid { background: var(--mint); }
.badge.free { background: var(--yellow); }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: minmax(0, 1fr); height: calc(100vh - 56px); height: calc(100dvh - 56px); }
.app.with-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
@media (max-width: 980px) { .app.with-panel { grid-template-columns: minmax(0, 1fr); } .app.with-panel .chat-col { display: none; } }
.chat-col { display: flex; flex-direction: column; min-height: 0; border-right: 2px solid var(--ink); }
.messages { flex: 1 1 auto; overflow-y: auto; padding: 18px 16px 10px; display: flex; flex-direction: column; gap: 12px; }
.composer { border-top: 2px solid var(--ink); padding: 10px 12px; display: flex; gap: 8px; background: var(--paper); padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
.composer textarea { flex: 1 1 auto; min-width: 0; border: 2px solid var(--ink); border-radius: 14px; padding: 10px 12px; resize: none; height: 46px; max-height: 160px; }
.btn { border: 0; border-radius: 999px; background: var(--orange); color: #fff; font-weight: 700; padding: 11px 18px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--orange-deep); }
.btn.dark { background: var(--ink); }
.btn.light { background: var(--paper); color: var(--ink); border: 2px solid var(--ink); }
.btn.small { padding: 7px 12px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: wait; }

/* ---------- messages ---------- */
.msg { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 8px; align-items: start; max-width: 860px; }
.msg.client { grid-template-columns: minmax(0, 1fr); justify-items: end; margin-left: auto; }
.ava { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; color: var(--cream); font-weight: 700; font-size: 13px; }
.ava.op { background: var(--orange); }
.bub { background: var(--paper); border: 1.5px solid var(--ink); border-radius: 4px 16px 16px 16px; padding: 10px 13px; display: grid; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.msg.client .bub { background: var(--ink); color: var(--cream); border-radius: 16px 4px 16px 16px; max-width: 560px; }
.bub .meta { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.msg.client .bub .meta { color: #b8ae9f; }
.bub p { white-space: pre-wrap; }
.md { display: grid; gap: 8px; }
.md p { white-space: normal; }
.md h4 { font-family: var(--disp); font-weight: 800; font-size: 16px; letter-spacing: -.01em; margin-top: 2px; }
.md ul, .md ol { margin: 0; padding-left: 20px; display: grid; gap: 3px; }
.md code { font-family: var(--mono); font-size: 12.5px; background: var(--soft); border-radius: 5px; padding: 0 4px; }
.md a { color: var(--you); }
.bub .pages { display: flex; flex-wrap: wrap; gap: 6px; }
.bub.card { border-width: 2px; border-radius: 18px; padding: 14px; }

/* research block */
.rb { display: grid; gap: 12px; }
.phases { display: flex; gap: 3px; }
.phases div { flex: 1 1 0; min-width: 0; }
.phases i { display: block; height: 5px; border-radius: 3px; background: var(--soft); }
.phases .done i { background: var(--orange); }
.phases .on i { background: linear-gradient(90deg, var(--orange) 50%, var(--soft) 50%); background-size: 200% 100%; animation: slide 1.2s linear infinite; }
@keyframes slide { from { background-position: 100% 0; } to { background-position: 0 0; } }
.phases span { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phases .on span { color: var(--ink); font-weight: 700; }
/* one step of the brief per message */
.ph { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ph b { font-family: var(--disp); font-weight: 800; font-size: 16px; letter-spacing: -.01em; }
.ph-n { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ph-live, .ph-ok { margin-left: auto; font-size: 12.5px; white-space: nowrap; }
.ph-live { color: var(--ink); font-weight: 700; }
.ph-ok { color: var(--good); font-weight: 700; }
.phases.mini i { height: 3px; }
.qstage { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 8px; align-items: baseline; font-size: 13.5px; }
.qstage .small { grid-column: 2; }
.typing .eta { font-size: 12.5px; color: var(--muted); }
.more-wins { background: var(--yellow); border-radius: 10px; padding: 8px 12px; font-size: 13.5px; }
.rb h4 { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.who-line mark { background: var(--yellow); padding: 0 .15em; border-radius: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; border: 1.5px solid var(--ink); border-radius: 999px; padding: 2px 9px; font-size: 12.5px; background: var(--paper); }
.chip.ok::before { content: "✓"; color: var(--good); font-weight: 700; }
.chip.no { border-color: var(--orange); }
.chip.no::before { content: "✕"; color: var(--bad); font-weight: 700; }
.qrow { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 6px; padding: 6px 0; border-bottom: 1px dashed var(--hair); font-size: 13.5px; }
.qrow .st { font-family: var(--mono); font-size: 12px; padding-top: 1px; }
.qrow .r { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.stage-tag { font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 7px; white-space: nowrap; background: var(--soft); }
.st-problem { background: var(--peach); } .st-category { background: var(--yellow); } .st-alternatives { background: var(--sky); } .st-brand { background: var(--mint); }
.named { color: var(--you); font-weight: 700; }
.wrong { color: var(--bad); font-weight: 700; }
.spin { display: inline-block; width: 11px; height: 11px; border: 2px solid var(--hair); border-top-color: var(--orange); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }
.typing { display: grid; gap: 6px; }
.typing .dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); animation: bounce 1.2s infinite ease-in-out; }
.typing .dots i:nth-child(2) { animation-delay: .15s; } .typing .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-4px); opacity: 1; } }
.typing .steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 13.5px; }
.typing .steps li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 6px; align-items: baseline; animation: fadein .25s ease-out; }
.typing .steps li.done { color: var(--muted); }
.typing .steps .mk { color: var(--good); font-weight: 700; }
@keyframes fadein { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .typing .dots i, .typing .steps li { animation: none; } }
@media (prefers-reduced-motion: reduce) { .spin, .phases .on i { animation: none; } }
.sample { font-size: 12px; background: var(--cream); border: 1.5px dashed var(--muted); border-radius: 10px; padding: 6px 10px; color: var(--muted); }
.bars { display: grid; gap: 5px; }
.bar { display: grid; grid-template-columns: minmax(70px, 36%) minmax(0, 1fr) 36px; gap: 8px; align-items: center; font-size: 13px; }
.bar .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .tr { height: 11px; background: var(--soft); border-radius: 6px; overflow: hidden; }
.bar .tr b { display: block; height: 100%; background: #8f8574; border-radius: 6px; transition: width .5s; }
.bar.you .tr b { background: var(--you); }
.bar.you .nm { color: var(--you); font-weight: 700; }
.bar .v { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 640px) { .two { grid-template-columns: minmax(0, 1fr); } }
.src { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; font-size: 13px; align-items: center; }
.src .d { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cls { font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 6px; background: var(--soft); white-space: nowrap; }
.cls-own { background: var(--you-soft); color: var(--you); } .cls-competitor { background: #eadfcf; } .cls-review { background: var(--mint); }
.cls-listicle { background: var(--yellow); } .cls-community { background: var(--peach); } .cls-reference { background: var(--sky); }

/* report card */
.rc { display: grid; gap: 10px; }
.rc h3 { font-family: var(--disp); font-weight: 800; font-size: 21px; line-height: 1.1; letter-spacing: -.02em; }
.rc .row { display: flex; gap: 14px; align-items: center; }
.ring { --v: 0; width: 64px; height: 64px; flex: none; border-radius: 50%; display: grid; place-items: center;
        background: conic-gradient(var(--orange) calc(var(--v) * 36deg), var(--soft) 0); }
.ring b { width: 50px; height: 50px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; font-family: var(--disp); font-size: 19px; }
.rc ol { margin: 0; padding-left: 18px; display: grid; gap: 3px; }
.rc .pages { display: flex; flex-wrap: wrap; gap: 6px; }
.rc .up-line { display: grid; gap: 4px; background: #fffbea; border-left: 4px solid var(--orange); border-radius: 0 8px 8px 0; padding: 8px 12px; }
.rc .hot { color: var(--orange-deep); background: var(--yellow); border-radius: 4px; padding: 0 4px; white-space: nowrap; }

/* ---------- side panel ---------- */
.panel { display: flex; flex-direction: column; min-height: 0; background: var(--cream); }
.panel-tabs { display: flex; gap: 8px; padding: 6px 10px; border-bottom: 1.5px solid var(--ink); align-items: center; background: var(--paper); }
.panel-tabs .seg { display: flex; gap: 2px; padding: 2px; background: var(--soft); border-radius: 9px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.panel-tabs button[role=tab] { border: 0; background: transparent; border-radius: 7px; padding: 4px 10px; cursor: pointer; font-weight: 600; font-size: 13px; line-height: 20px; white-space: nowrap; color: var(--ink); }
.panel-tabs button[role=tab]:hover { background: rgba(255, 255, 255, .6); }
.panel-tabs button[aria-selected=true] { background: var(--paper); box-shadow: 0 1px 2px rgba(29, 26, 22, .18); }
.panel-tabs .sp { flex: 1 1 auto; }
.panel-tabs .x { flex: none; width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; font-size: 18px; line-height: 1; cursor: pointer; color: var(--ink); }
.panel-tabs .x:hover { background: var(--soft); }
.panel-body { flex: 1 1 auto; overflow-y: auto; }

/* ---------- report pages (fragments) ---------- */
.fp { padding: 20px clamp(14px, 3vw, 30px) 36px; display: grid; gap: 20px; }
.fp h1 { font-family: var(--disp); font-weight: 800; letter-spacing: -.03em; font-size: clamp(24px, 3vw, 36px); line-height: 1.02; }
.fp h2 { font-family: var(--disp); font-weight: 800; letter-spacing: -.02em; font-size: clamp(19px, 2.2vw, 24px); line-height: 1.1; }
.fp .lede { font-size: 16px; }
.unlock { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px;
          background: #fffbea; border: 1.5px solid var(--ink); border-radius: 12px; }
.unlock > div { flex: 1 1 260px; }
.faq details { border-bottom: 1px solid var(--hair); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 700; list-style-position: outside; }
.faq details p { margin-top: 8px; color: #3d372f; }
.card { background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; padding: 14px; display: grid; gap: 10px; align-content: start; }
.dash { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; }
.bigring { --v: 0; width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--orange) calc(var(--v) * 36deg), var(--soft) 0); }
.bigring div { width: 94px; height: 94px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; text-align: center; line-height: 1; }
.bigring b { font-family: var(--disp); font-size: 34px; }
.bigring small { font-size: 11px; color: var(--muted); }
.scale { display: grid; gap: 3px; padding: 6px 0; border-bottom: 1px dashed var(--hair); }
.scale .h { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 14px; }
.scale .t { height: 8px; background: var(--soft); border-radius: 4px; overflow: hidden; }
.scale .t b { display: block; height: 100%; background: var(--orange); }
.scale.later { opacity: .55; }
.scale .rule { font-size: 12px; color: var(--muted); }
@media (max-width: 560px) { .dash { grid-template-columns: minmax(0, 1fr); justify-items: start; } }
.act { background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; padding: 12px; display: grid; gap: 6px; }
.act.first { background: #fffbea; }
.act-h { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; }
.act-h .num { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--cream); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.act .where { font-family: var(--mono); font-size: 12.5px; color: var(--you); overflow-wrap: anywhere; }
.copybox { position: relative; background: #fffdf7; border: 1.5px solid var(--hair); border-radius: 10px; padding: 10px 64px 10px 12px; font-family: var(--mono); font-size: 12.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.copybox button { position: absolute; top: 6px; right: 6px; border: 1.5px solid var(--ink); background: var(--paper); border-radius: 999px; font-size: 12px; font-weight: 700; padding: 2px 10px; cursor: pointer; }
.bad-quote { background: #fff1ea; border: 2px solid var(--orange); border-radius: 14px; padding: 12px; display: grid; gap: 4px; }
.lock-row { display: flex; gap: 8px; align-items: baseline; padding: 7px 0; border-bottom: 1px dashed var(--hair); }
.lock-row::before { content: "🔒"; font-size: 12px; }
.h2h { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: end; }
.h2h .big { font-family: var(--disp); font-weight: 800; font-size: clamp(34px, 6vw, 60px); line-height: .9; font-variant-numeric: tabular-nums; display: block; }
.h2h .you .big { color: var(--you); }
.h2h .r { text-align: right; }
.duel { display: grid; }
.duel-row { display: grid; grid-template-columns: minmax(0, 1fr) 64px 64px; gap: 8px; font-size: 13px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--hair); }
.duel-row .m { text-align: center; font-weight: 700; border-radius: 6px; padding: 2px 0; }
.m.y { background: var(--you-soft); color: var(--you); } .m.c { background: #eadfcf; } .m.n { color: var(--hair); }
.ladder { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rung { border: 2px solid var(--ink); border-radius: 12px; padding: 10px; background: var(--paper); display: grid; gap: 3px; align-content: start; }
.rung .n { font-family: var(--disp); font-weight: 800; font-size: 28px; line-height: 1; }
.rung.bad { background: #fff1ea; }
.rung .lose { font-size: 12px; color: var(--bad); font-weight: 700; }
@media (max-width: 640px) { .ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ans { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, .6fr); gap: 10px; font-size: 13.5px; padding: 9px 0; border-bottom: 1px dashed var(--hair); }
.ans .lab { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 640px) { .ans { grid-template-columns: minmax(0, 1fr); gap: 3px; } }
.plans-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.plan { background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; padding: 14px; display: grid; gap: 8px; align-content: start; }
.plan.rec { background: #fffbea; box-shadow: 5px 5px 0 var(--orange); }
.plan .price { font-family: var(--disp); font-weight: 800; font-size: 30px; }
.plan .price small { font-size: 14px; color: var(--muted); font-family: var(--body); font-weight: 500; }
.plan ul { margin: 0; padding-left: 18px; font-size: 13.5px; display: grid; gap: 2px; }
.plan .tl { display: grid; grid-template-columns: 3fr 2fr; border: 1.5px solid var(--ink); border-radius: 10px; overflow: hidden; font-size: 12px; line-height: 1.25; }
.plan .tl span { padding: 5px 8px; display: grid; }
.plan .tl span:first-child { background: var(--ink); color: var(--cream); }
.plan .tl span:last-child { background: var(--soft); color: var(--muted); }
.plan .tl b { font-size: 13px; }
.line-h { display: grid; gap: 2px; }
.plan .fc-line { background: var(--soft); border-radius: 10px; padding: 6px 9px; font-size: 13.5px; line-height: 1.35; }
.plan .fc-line > .small:first-child { display: block; }
.plan .fc-line b { font-family: var(--disp); font-weight: 800; font-variant-numeric: tabular-nums; }
.line-h p { color: var(--muted); font-size: 14px; }
.upside { background: #fffbea; box-shadow: 5px 5px 0 var(--orange); }
.up-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.up-nums div { display: grid; gap: 2px; }
.up-nums b { font-family: var(--disp); font-weight: 800; font-size: clamp(24px, 3vw, 32px); line-height: 1; font-variant-numeric: tabular-nums; }
.up-nums span { font-size: 13px; color: var(--muted); }
.up-refs { display: grid; }
.up-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; font-size: 13px; padding: 5px 0; border-bottom: 1px dashed var(--hair); align-items: baseline; }
.up-row > span:not(:first-child) { text-align: right; }
.more-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.act .place { font-family: var(--body); color: var(--muted); }
.act .how { font-size: 13.5px; }
.after { background: var(--ink); color: var(--cream); border-radius: 16px; padding: 16px; display: grid; gap: 8px; }
.after ol { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: #e6ddcc; }

/* ---------- pay modal ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(29, 26, 22, .55); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal { width: 100%; max-width: 520px; background: var(--cream); border: 2px solid var(--ink); border-radius: 22px; padding: 20px; display: grid; gap: 12px; position: relative; }
.modal .x { position: absolute; top: 10px; right: 10px; border: 0; background: none; font-size: 24px; cursor: pointer; width: 36px; height: 36px; border-radius: 50%; }
.pay-frame { width: 100%; min-height: 260px; border: 0; background: var(--cream); }  /* the frame paints itself the modal colour: allpay-hosted-fields.css */

/* ---------- admin ---------- */
.admin { padding: 16px; max-width: 1300px; margin: 0 auto; display: grid; gap: 16px; }
.admin table { width: 100%; border-collapse: collapse; background: var(--paper); border: 2px solid var(--ink); font-size: 13.5px; }
.admin th, .admin td { text-align: left; padding: 7px 9px; border-top: 1px solid var(--hair); vertical-align: top; }
.admin th { background: var(--soft); font-size: 12px; }
.admin table.rep td { border-top-style: dashed; }
.admin table.rep tr.first td { border-top: 2px solid var(--ink); }
.admin .num { text-align: right; white-space: nowrap; }
.admin form.inline { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.admin input, .admin select, .admin textarea { border: 1.5px solid var(--ink); border-radius: 8px; padding: 6px 8px; background: var(--paper); }
.admin .grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .admin .grid { grid-template-columns: minmax(0, 1fr); } }
.admin iframe { width: 100%; height: 72vh; border: 2px solid var(--ink); border-radius: 12px; background: var(--cream); }
.unread { background: #fffbea; }

/* legal pages */
.legal { max-width: 760px; margin: 0 auto; padding: 40px clamp(16px, 4vw, 32px) 64px; display: grid; gap: 22px; }
.legal h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.02; }
.legal-kicker { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.legal .lede { font-size: 17px; }
.legal section { display: grid; gap: 10px; padding-top: 18px; border-top: 1.5px solid var(--ink); scroll-margin-top: 72px; }
.legal h2 { font-family: var(--disp); font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.legal h3 { font-size: 16px; margin-top: 6px; }
.legal p, .legal li { line-height: 1.6; max-width: 68ch; }
.legal ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.legal-toc { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.legal-toc a { color: var(--ink); }
.legal-table { width: 100%; border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--soft); }
.legal-table th { font-family: var(--mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.legal-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 24px; border-top: 2px solid var(--ink); font-size: 14px; color: var(--muted); }
.legal-foot a { color: var(--muted); }

/* ---------- sign-in and the account page (Plan & team) ---------- */
.admin.narrow { max-width: 760px; padding-top: 32px; padding-bottom: 48px; }
.admin.narrow h2 { font-family: var(--disp); font-weight: 800; letter-spacing: -.02em; font-size: 22px; }
.note { background: var(--yellow); border: 2px solid var(--ink); border-radius: 12px; padding: 10px 14px; }
.stack { display: grid; gap: 8px; }
.stack input, .stack textarea, .inline-form input { border: 2px solid var(--ink); border-radius: 12px; padding: 10px 12px; background: var(--paper); font: inherit; width: 100%; }
.stack .btn { justify-self: start; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1 1 auto; min-width: 0; }
@media (max-width: 560px) { .inline-form { flex-direction: column; } .inline-form .btn { align-self: start; } }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions form { margin: 0; }
a.btn { display: inline-block; text-decoration: none; }
details.cancel summary { cursor: pointer; color: var(--muted); font-size: 14px; }
details.cancel[open] summary { margin-bottom: 8px; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th, table.list td { text-align: left; padding: 8px 6px; border-top: 1px solid var(--hair); vertical-align: top; }
table.list th { font-size: 12px; color: var(--muted); font-weight: 700; border-top: 0; }
table.list .num { text-align: right; white-space: nowrap; }
table.list td:first-child { overflow-wrap: anywhere; }
.linkish { border: 0; background: none; padding: 0; color: var(--orange-deep); cursor: pointer; font: inherit; font-size: 13px; text-decoration: underline; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.row-link { display: flex; justify-content: space-between; gap: 10px; padding: 10px 4px; border-top: 1px solid var(--hair); color: var(--ink); text-decoration: none; }
.row-link:first-child { border-top: 0; }
.row-link:hover b { text-decoration: underline; }
.admin table.list { border: 0; background: none; font-size: 14px; }
.row-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
