/* LuciMail. White, cool gray, near-black ink and ONE accent (#0060f0); one slim top bar with one dropdown; chat on the left that
   never scrolls the page, work on the right (Ben, 2026-11-06 and 2026-11-20). Light only, by design. The logo's four colors appear
   only as small dots. Plus Jakarta Sans ExtraBold for titles, Figtree for everything else, IBM Plex Mono only for small
   uppercase labels. Type floor: nothing under 13px except .fine (fine print), and tests/test_ui.py checks it. Spacing runs on an
   8px rhythm (4 for hairline gaps). Also used by the server-rendered sign-in, join and billing pages (the "sign" section at the end). */
@font-face { font-family: "Figtree"; src: url("/fonts/Figtree-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/Figtree-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/Figtree-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/Figtree-Bold.ttf") format("truetype"); font-weight: 700 900; font-display: swap; }
/* headlines: one heavy cut for every weight a rule asks for (Ben picked Plus Jakarta Sans + Figtree, 2026-11-20) */
@font-face { font-family: "Plus Jakarta Sans"; src: url("/fonts/PlusJakartaSans-ExtraBold.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/IBMPlexMono-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/IBMPlexMono-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
:root {
  --page: #f3f5f8; --paper: #ffffff; --cream: #f7f8fa; --cream-2: #eef1f5; --hover: #f2f4f7;
  --ink: #15171d; --ink-2: #474f5c; --taupe: #5b6371; --line: #e3e7ed; --line-2: #ccd3dc;
  --accent: #0060f0; --accent-dark: #004ac0; --accent-soft: #eef4ff; --accent-edge: #c7dbff;
  --ok: #1d7444; --ok-soft: #e6f4ec; --ok-edge: #bde2cb; --bad: #b3261e; --bad-soft: #fcecea; --bad-edge: #f0c4c0;
  --warn: #7a5000; --warn-soft: #fff6e2; --warn-edge: #f0d9a2;
  --lu-blue: #0084fc; --lu-red: #f03c30; --lu-green: #24c048; --lu-yellow: #fcb400;
  --sans: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Plus Jakarta Sans", "Figtree", -apple-system, sans-serif;   /* the display face (name kept for the sign pages' rules) */
  --mono: "Plex Mono", ui-monospace, Menlo, monospace;
  --r-sm: 8px; --r: 12px; --r-lg: 16px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-2: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 16px rgba(16, 24, 40, .07);
  --shadow-3: 0 2px 4px rgba(16, 24, 40, .05), 0 14px 32px rgba(16, 24, 40, .10);
  --shadow-pop: 0 16px 40px rgba(16, 24, 40, .16), 0 2px 6px rgba(16, 24, 40, .06);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: var(--ink); }
body { font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
button, input, select, textarea { font-family: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent-edge); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px;
  font-weight: 600; text-decoration: none; }
.skip:focus { top: 10px; color: #fff; }
svg.i { width: 18px; height: 18px; flex: none; display: block; }
svg.i.s { width: 16px; height: 16px; }
svg.i.l { width: 22px; height: 22px; }
.fine { font-size: 12px; line-height: 1.45; color: var(--taupe); margin: 0; }   /* fine print: the one class allowed under 13px */
kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; background: #fff;
  border: 1px solid var(--line-2); box-shadow: 0 1px 0 var(--line-2); font: 600 13px/1 var(--mono); color: var(--ink); }

/* ------------------------------------------------------------------------------- one slim top bar: logo and ONE dropdown */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 40; flex: none; }
.topin { max-width: 1440px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(8px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); min-width: 0; border-radius: 10px; flex: none; }
.brand:hover { color: var(--ink); }
.brand img { width: 30px; height: 30px; }
.word { font: 800 19px/1 var(--serif); letter-spacing: -.02em; }
.word b { color: var(--accent); font-weight: 800; }
.tag { font: 500 13px var(--sans); color: var(--taupe); margin-left: 2px; white-space: nowrap; }
.menuwrap { position: relative; min-width: 0; }
.menubtn { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px 0 6px; border: 1px solid var(--line-2); border-radius: 12px;
  background: #fff; font: 600 14px var(--sans); color: var(--ink); cursor: pointer; white-space: nowrap; max-width: min(520px, 62vw); min-width: 0;
  transition: border-color .15s, background .15s, box-shadow .15s; }
.menubtn:hover, .menubtn[aria-expanded="true"] { border-color: var(--accent-edge); background: #f8faff; }
.menubtn[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--accent-soft); }
.menubtn .where { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; line-height: 1.15; }
.menubtn .wk { font: 600 13px var(--sans); color: var(--taupe); }
.menubtn .wn { overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 100%; font-size: 14px; }
.menubtn .n, .mitem .n { font: 600 13px/20px var(--sans); min-width: 24px; height: 22px; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); text-align: center; flex: none; }
.avatar { width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font: 600 13px var(--sans); flex: none; text-transform: uppercase; }
.chev { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: -4px 2px 0 0; opacity: .55; flex: none; }
.menupop, .morepop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 300px; max-width: calc(100vw - 24px); background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-pop); padding: 6px; display: flex; flex-direction: column; z-index: 70; animation: popin .14s var(--ease); }
.menupop { max-height: min(80vh, 720px); overflow-y: auto; overscroll-behavior: contain; }
@keyframes popin { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.mitem { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; border: 0; border-radius: 9px; background: none;
  font: 500 14px var(--sans); color: var(--ink); text-decoration: none; cursor: pointer; min-height: 40px; }
.mitem svg.i { color: var(--taupe); }
.mitem .mt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.mitem:hover, .mitem:focus-visible { background: var(--hover); outline: none; color: var(--ink); }
.mitem[aria-checked="true"], .mitem[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.mitem[aria-checked="true"] svg.i, .mitem[aria-current="page"] svg.i { color: var(--accent); }
.mitem.accent { color: var(--accent); font-weight: 600; } .mitem.accent svg.i { color: var(--accent); }
.mitem[disabled] { opacity: .5; cursor: not-allowed; }
.menucamps { display: flex; flex-direction: column; max-height: 260px; overflow-y: auto; }
.menuwho { padding: 8px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: flex; gap: 10px; align-items: center; min-width: 0; }
.menuwho .avatar { width: 36px; height: 36px; border-radius: 10px; font-size: 14px; }
.menuwho > div b { display: block; font-size: 14px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menuwho > div span { display: block; font-size: 13px; color: var(--taupe); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menuwho > div { min-width: 0; }
.menusep { height: 1px; background: var(--line); margin: 6px 2px; flex: none; }
.menuk { font: 600 13px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--taupe); padding: 8px 10px 4px; }
.menupop .signout { margin: 0; }
.menupop .linkish { color: var(--ink-2); }
@media (max-width: 640px) { .tag, .menubtn .wk { display: none; } .menubtn { height: 42px; gap: 8px; } }
@media (max-width: 420px) { .word { display: none; } .menubtn .n { display: none; } }

/* ------------------------------------------------- the app view: the page never scrolls; only the work column does */
html:has(body.splitpage) { height: 100%; overflow: hidden; }
body.splitpage { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
.shell { flex: 1; min-height: 0; width: 100%; max-width: 1440px; margin: 0 auto; display: flex; flex-direction: column;
  padding: 16px max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
.shell > main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.split { --chatw: 42%; position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(380px, var(--chatw)) 16px minmax(0, 1fr);
  padding-bottom: 16px; }
.chatcol { min-width: 0; height: 100%; min-height: 0; }
.workcol { position: relative; min-width: 0; height: 100%; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 0 8px 40px 4px; display: flex; flex-direction: column; gap: 16px; container: work / inline-size; scroll-padding-bottom: 80px; }
.workcol:focus { outline: none; }
.workcol > * { flex-shrink: 0; }       /* a card never squeezes; the column scrolls instead */
@media (min-width: 901px) { .split > .chatcol { grid-column: 1; grid-row: 1; } .split > .splitbar { grid-column: 2; grid-row: 1; } .split > .workcol { grid-column: 3; grid-row: 1; } }
.splitbar { align-self: stretch; cursor: col-resize; position: relative; touch-action: none; }
.splitbar::after { content: ""; position: absolute; top: 0; bottom: 0; left: 7px; width: 2px; border-radius: 2px; background: transparent; transition: background .15s; }
.splitbar.dragging::after, .splitbar:focus-visible::after { background: var(--accent); }
.splitbar:focus-visible { outline: none; }
.splitbar .grip { position: absolute; top: 50%; left: 5px; width: 6px; height: 44px; margin-top: -22px; border-radius: 4px; background: #cfd5de;
  box-shadow: 0 0 0 3px var(--page); transition: background .15s, height .15s, margin-top .15s; }
.splitbar:hover .grip, .splitbar:focus-visible .grip, .splitbar.dragging .grip { background: var(--accent); height: 64px; margin-top: -32px; }
html.resizing, html.resizing * { cursor: col-resize !important; user-select: none !important; }
.split.snap-chat > .chatcol, .split.snap-work > .workcol { opacity: .35; transition: opacity .1s; }
.sbarrow { position: absolute; left: -4px; width: 24px; height: 24px; padding: 0; border: 1px solid var(--line-2); border-radius: 50%; background: #fff;
  color: var(--ink-2); font: 600 16px/1 var(--sans); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2;
  opacity: 0; transform: scale(.85); transition: opacity .15s, transform .15s; box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.sbarrow.sbl { top: calc(50% - 64px); } .sbarrow.sbr { top: calc(50% + 40px); }
.splitbar:hover .sbarrow, .splitbar:focus-within .sbarrow { opacity: 1; transform: none; }
.sbarrow:hover, .sbarrow:focus-visible { color: var(--accent); border-color: var(--accent-edge); outline: none; }
.rail { display: none; }
@media (min-width: 901px) {
  html.hide-chat .split { grid-template-columns: 0 0 minmax(0, 1fr); }
  html.hide-chat .split > .chatcol, html.hide-chat .split > .splitbar { display: none; }
  html.hide-chat .split > .workcol { padding-left: 56px; }
  html.hide-work .split { grid-template-columns: minmax(0, 1fr) 0 0; }
  html.hide-work .split > .workcol, html.hide-work .split > .splitbar { display: none; }
  html.hide-work .split > .chatcol { padding-right: 56px; }
  html.hide-chat .rail-chat, html.hide-work .rail-work { display: flex; align-items: center; justify-content: center; position: absolute; top: 0; bottom: 16px;
    width: 40px; padding: 16px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink-2); cursor: pointer;
    writing-mode: vertical-rl; font: 600 14px var(--sans); box-shadow: var(--shadow-1); }
  html.hide-chat .rail-chat { left: 0; transform: rotate(180deg); }
  html.hide-work .rail-work { right: 0; }
  .rail:hover, .rail:focus-visible { color: var(--accent); border-color: var(--accent-edge); outline: none; }
}
.splitswitch { display: none; }
@media (max-width: 1100px) { .split { grid-template-columns: minmax(340px, var(--chatw)) 16px minmax(0, 1fr); } }
@media (max-width: 900px) {
  .shell { padding-top: 12px; }
  .split { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); padding-bottom: 12px; }
  .splitbar { display: none; }
  .splitswitch { display: flex; flex: none; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--paper); margin-bottom: 12px; padding: 4px; gap: 4px; }
  .splitswitch button { flex: 1; padding: 8px; border: 0; border-radius: 8px; background: transparent; font: 600 14px var(--sans); color: var(--ink-2); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
  .splitswitch button[aria-pressed="true"] { background: var(--accent); color: #fff; }
  html.pane-chat .workcol, html.pane-work .chatcol { display: none; }
  .workcol { padding: 0 2px 32px; }
}

/* --------------------------------------------------------------------------------------------------------- the chat */
.chatpanel { height: 100%; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1); }
.chathead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); flex: none; }
.chatid { display: flex; align-items: center; gap: 12px; min-width: 0; }
.chatavatar { width: 32px; height: 32px; flex: none; }
.chattitle { font: 800 16px/1.2 var(--serif); letter-spacing: -.01em; }
.chatsub { font-size: 13px; color: var(--taupe); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 1px solid transparent; border-radius: 10px;
  background: transparent; color: var(--taupe); cursor: pointer; flex: none; text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.iconbtn:hover, .iconbtn:focus-visible { background: var(--cream-2); color: var(--ink); outline: none; }
.iconbtn.sm { width: 30px; height: 30px; border-radius: 8px; }
.iconbtn.off { opacity: .35; cursor: default; }
.iconbtn.off:hover { background: transparent; color: var(--taupe); }
.chatlist { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.chatrow { display: flex; align-items: flex-start; gap: 10px; }
.msgavatar { width: 28px; height: 28px; flex: none; margin-top: 4px; }
.msgavatar.pulse { animation: bulbpulse 1.6s ease-in-out infinite; }
@keyframes bulbpulse { 0%, 100% { transform: scale(1); filter: saturate(1); } 50% { transform: scale(1.12); filter: saturate(1.6) brightness(1.08); } }
.chatmsg { font-size: 15px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.chatmsg.them { flex: 1; min-width: 0; background: var(--cream); border: 1px solid #edf0f4; padding: 10px 14px; border-radius: 4px 16px 16px 16px; }
.chatmsg.me { align-self: flex-end; max-width: 85%; background: var(--accent); color: #fff; padding: 10px 14px; border-radius: 16px 16px 4px 16px; box-shadow: 0 1px 2px rgba(0, 72, 192, .2); }
.thinkline { display: inline-flex; gap: 4px; align-items: center; height: 22px; }
.thinkline i { width: 7px; height: 7px; border-radius: 50%; background: var(--taupe); opacity: .35; animation: dots 1.2s ease-in-out infinite; }
.thinkline i:nth-child(2) { animation-delay: .15s; } .thinkline i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: .9; transform: translateY(-3px); } }
.nextcard { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; flex: 1; min-width: 0; box-shadow: var(--shadow-1); }
.nextcard .nk { margin: 0 0 6px; font: 600 13px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.nextcard .nk .linkbtn { font: 600 13px var(--sans); letter-spacing: 0; text-transform: none; color: var(--taupe); }
.nextcard .nk .linkbtn:hover { color: var(--accent); }
.nextcard h3 { margin: 0 0 8px; font: 800 17px/1.3 var(--serif); letter-spacing: -.01em; }
.moves { list-style: none; margin: 0 -8px; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.4; }
.moves a { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; transition: background .15s; }
.moves a:hover, .moves a:focus-visible { background: var(--accent-soft); color: var(--accent-dark); outline: none; }
.moves .mt { flex: 1; min-width: 0; }
.moves svg.go { opacity: 0; color: var(--accent); margin-top: 2px; transition: opacity .15s, transform .15s; }
.moves a:hover svg.go, .moves a:focus-visible svg.go { opacity: 1; transform: translateX(2px); }
.dot { flex: none; width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; background: var(--lu-green); }
.dot.c1 { background: var(--lu-blue); } .dot.c2 { background: var(--lu-red); } .dot.c3 { background: var(--lu-yellow); }
.onboard { border-color: var(--accent-edge); background: linear-gradient(180deg, #f4f8ff, #fff 60%); }
.onboard .meter { margin: 4px 0 12px; }
.checks { list-style: none; margin: 0 -8px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.checks a { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; transition: background .15s; }
.checks a:hover, .checks a:focus-visible { background: #fff; color: var(--accent); outline: none; box-shadow: inset 0 0 0 1px var(--accent-edge); }
.checks .ct { flex: 1; min-width: 0; }
.checks .ck { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none; display: flex; align-items: center; justify-content: center;
  color: var(--taupe); background: #fff; font: 600 13px var(--sans); }
.checks .next .ck { border-color: var(--accent); color: var(--accent); }
.checks .next a { font-weight: 600; }
.checks .done .ck { background: var(--ok); border-color: var(--ok); color: #fff; }
.checks .done a { color: var(--taupe); text-decoration: line-through; text-decoration-color: rgba(91, 99, 113, .5); }
.checks .ck svg { width: 14px; height: 14px; stroke-width: 2.4; }
.checks small { color: var(--taupe); font-size: 13px; font-weight: 400; }
.suggest { margin-left: 38px; display: flex; flex-direction: column; gap: 8px; }
.suggest .sk { margin: 0; font: 600 13px var(--sans); color: var(--taupe); }
.chiprow { display: flex; flex-wrap: wrap; gap: 8px; }
.schip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff;
  font: 500 14px/1.3 var(--sans); color: var(--ink); cursor: pointer; text-align: left; transition: border-color .15s, background .15s, color .15s, box-shadow .15s; }
.schip svg.i { color: var(--accent); }
.schip:hover, .schip:focus-visible { border-color: var(--accent-edge); background: var(--accent-soft); color: var(--accent-dark); outline: none; }
@media (max-width: 900px) { .suggest { margin-left: 0; } }
.actcard { margin-top: 12px; border: 1px solid var(--accent-edge); background: #fff; border-radius: var(--r); padding: 12px 14px; white-space: normal; box-shadow: var(--shadow-1); }
.actcard .ak { font: 600 13px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.actcard .what { font-weight: 600; font-size: 14px; line-height: 1.45; }
.actcard .btns { display: flex; gap: 8px; margin-top: 12px; }
.actcard.done { border-color: var(--line); background: var(--cream); box-shadow: none; }
.actcard.done .ak { color: var(--taupe); }
.actcard .res { font-size: 13px; color: var(--ink-2); margin-top: 8px; display: flex; gap: 6px; align-items: center; }
.actcard .res.ok { color: var(--ok); }
.chatform { display: flex; align-items: flex-end; gap: 8px; padding: 12px 14px 4px; flex: none; margin: 0; border-top: 1px solid var(--line); background: #fff; }
.chatform textarea { flex: 1; height: 46px; min-height: 46px; max-height: 140px; border-radius: 23px; padding: 12px 18px; resize: none; background: var(--cream);
  border: 1px solid var(--line); font: 15px/1.4 var(--sans); color: var(--ink); min-width: 0; transition: border-color .15s, box-shadow .15s, background .15s; }
.chatform textarea:focus { background: #fff; border-color: var(--accent-edge); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.chatsend { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: flex; align-items: center;
  justify-content: center; cursor: pointer; transition: background .15s, transform .1s; }
.chatsend:hover { background: var(--accent-dark); } .chatsend:active { transform: scale(.95); } .chatsend:disabled { background: #b8c7e6; cursor: default; }
.chatsend svg { width: 20px; height: 20px; }
.chatnote { margin: 0; padding: 4px 16px calc(10px + env(safe-area-inset-bottom)); font-size: 13px; color: var(--taupe); text-align: center; flex: none; }

/* ------------------------------------------------------------------------------------------------- the work column */
.phead { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.phrow { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px 16px; }
.phtext { min-width: 0; flex: 1 1 280px; }
.ptitle { margin: 0; font: 800 30px/1.1 var(--serif); letter-spacing: -.025em; overflow-wrap: anywhere; }
.psub { margin: 8px 0 0; font-size: 15px; color: var(--ink-2); max-width: 70ch; }
.psub .nextk { display: inline-block; font: 600 13px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-right: 8px; }
.ptools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.kicker { font: 600 13px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }
.muted { color: var(--ink-2); } .small { font-size: 13px; } .nowrap { white-space: nowrap; }
.lead { font-size: 16px; color: var(--ink-2); margin: 0; max-width: 62ch; }
.accent { color: var(--accent); }
.back { font: 600 14px var(--sans); color: var(--ink-2); text-decoration: none; display: inline-flex; gap: 4px; align-items: center; align-self: flex-start;
  padding: 4px 10px 4px 4px; margin: 0 0 0 -4px; border-radius: 8px; max-width: 100%; transition: background .15s, color .15s; }
.back span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.back:hover, .back:focus-visible { color: var(--accent); background: var(--accent-soft); outline: none; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-1); min-width: 0; }
.card h2 { margin: 0; font: 700 17px/1.3 var(--sans); letter-spacing: -.005em; }
.card h3 { margin: 0; font-size: 15px; font-weight: 650; }
.cardhead { display: flex; align-items: flex-start; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.cardhead > .grow { flex: 1 1 220px; min-width: 0; }
.cardhead p { margin: 4px 0 0; font-size: 14px; }
.cardhead .ic { width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex: none; }
.cardhead .ic.mono { font: 700 14px var(--sans); letter-spacing: .02em; background: var(--cream-2); color: var(--ink); }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stack.tight { gap: 8px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.secthead { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.secthead h2 { margin: 0; font: 800 19px/1.2 var(--serif); letter-spacing: -.015em; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--cream-2);
  color: var(--ink-2); font: 600 13px/1 var(--sans); letter-spacing: 0; text-transform: none; margin-left: 8px; vertical-align: 2px; }
.secthead .count { margin-left: 0; }

/* buttons */
.btn { font: 600 14px/1.2 var(--sans); border-radius: 10px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); padding: 10px 16px; cursor: pointer;
  min-height: 40px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  transition: border-color .15s, background .15s, color .15s, box-shadow .15s, transform .1s; }
.btn:hover { border-color: var(--accent-edge); background: #f8faff; color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(0, 72, 192, .25); }
.btn.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn.quiet { background: transparent; border-color: transparent; color: var(--ink-2); box-shadow: none; } .btn.quiet:hover { color: var(--accent); background: var(--accent-soft); }
.btn.yes { background: var(--ok); border-color: var(--ok); color: #fff; } .btn.yes:hover { background: #155c35; border-color: #155c35; color: #fff; }
.btn.danger { background: #fff; border-color: var(--bad-edge); color: var(--bad); } .btn.danger:hover { background: var(--bad-soft); color: var(--bad); }
.btn.danger-text { color: var(--bad); } .btn.danger-text:hover { background: var(--bad-soft); color: var(--bad); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.primary.waiting[disabled] { opacity: 1; background: var(--accent-soft); border-color: var(--accent-edge); color: var(--accent-dark); cursor: progress; }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; gap: 6px; min-height: 32px; }
.btn.lg { padding: 12px 20px; font-size: 15px; min-height: 48px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn svg.i { width: 16px; height: 16px; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  border: 2px solid currentColor; border-color: rgba(255, 255, 255, .9) rgba(255, 255, 255, .9) transparent transparent; animation: spin .7s linear infinite; }
.btn:not(.primary):not(.yes).busy::after { border-color: var(--accent) var(--accent) transparent transparent; }
.btn.busy svg { opacity: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.linkbtn { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.linkbtn:hover { text-decoration: underline; }
.helplink { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.morewrap { position: relative; }
.btn.more { padding: 0; width: 40px; }
.morepop { min-width: 230px; }

/* chips: one small label per thing, in plain words */
.chip { font: 600 13px/1.2 var(--sans); padding: 4px 10px; border-radius: 999px; background: var(--cream-2); color: var(--ink-2); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; }
.chip.blue { background: var(--accent-soft); color: var(--accent-dark); }
.chip.ok { background: var(--ok-soft); color: var(--ok); } .chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.warn { background: var(--warn-soft); color: var(--warn); } .chip.ink { background: var(--ink); color: #fff; }
.chip.line { background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); }
.chip svg.i { width: 14px; height: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* tiles, stats and meters */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; min-width: 0; box-shadow: var(--shadow-1); }
.tile .v { font: 800 28px/1.05 var(--serif); letter-spacing: -.025em; overflow-wrap: anywhere; }
.tile .v small { font: 500 13px var(--sans); color: var(--taupe); letter-spacing: 0; margin-left: 4px; }
.tile .l { font: 600 14px var(--sans); color: var(--ink-2); margin-top: 8px; }
.tile .sub { font-size: 13px; color: var(--taupe); margin-top: 2px; }
.tile.hot { color: var(--accent); }
.tile.hot { border-color: var(--accent-edge); background: linear-gradient(180deg, #f5f9ff, #fff); }
.tile .meter { margin-top: 12px; }
.meter { height: 8px; border-radius: 6px; background: var(--cream-2); overflow: hidden; display: flex; }
.meter > i { display: block; height: 100%; background: var(--accent); border-radius: 6px; transition: width .4s var(--ease); }
.meter.warn > i { background: var(--lu-yellow); } .meter.bad > i { background: var(--bad); }

/* notices */
.callout { background: var(--accent-soft); border: 1px solid var(--accent-edge); border-radius: var(--r); padding: 12px 16px; font-size: 14px; display: flex; gap: 12px; align-items: flex-start; color: #12346e; }
.callout > svg.i { margin-top: 2px; color: var(--accent); }
.callout > div { min-width: 0; flex: 1; }
.callout p { margin: 0; } .callout p + p { margin-top: 4px; }
.callout .actions { margin-top: 12px; }
.callout.warn { background: var(--warn-soft); border-color: var(--warn-edge); color: #5a3d00; } .callout.warn > svg.i { color: #9a6a00; }
.callout.bad { background: var(--bad-soft); border-color: var(--bad-edge); color: #8f1f18; } .callout.bad > svg.i { color: var(--bad); }
.callout.ok { background: var(--ok-soft); border-color: var(--ok-edge); color: #14532f; } .callout.ok > svg.i { color: var(--ok); }
.callout.plain { background: #fff; border-color: var(--line); color: var(--ink-2); } .callout.plain > svg.i { color: var(--taupe); }
.callout.slim { padding: 10px 14px; }
.callout .spinner { margin-top: 2px; }
.stepintro { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 14px; color: var(--ink-2); }
.stepintro svg.i { color: var(--accent); margin-top: 3px; }

/* ----------------------------------------------------------------------------------------------------------- home */
/* One grid answers the four questions. Narrow: the low-balance banner, balance, needs you, campaigns, results. Wide: balance and
   results side by side on top. Home plug-ins carry a slot class (hs-banner, hs-balance, hs-results; hs-more for the rest). */
.homegrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.homegrid > * { min-width: 0; }
.homegrid > .xsec { margin: 0; }
.homegrid > .hs-banner { order: 0; } .homegrid > .hs-balance { order: 1; } .homegrid > .hs-needs { order: 3; }
.homegrid > .hs-camps { order: 4; } .homegrid > .hs-results { order: 5; } .homegrid > .hs-more { order: 6; }
@container work (min-width: 700px) {
  .homegrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
  .homegrid > * { grid-column: 1 / -1; }
  .homegrid > .hs-balance, .homegrid > .hs-results { grid-column: auto; }
  .homegrid > .hs-results { order: 2; }
  .homegrid:not(:has(> .hs-balance)) > .hs-results, .homegrid:not(:has(> .hs-results)) > .hs-balance { grid-column: 1 / -1; }
  .homegrid > .hs-needs, .homegrid > .hs-camps, .homegrid > .hs-more { align-self: start; }
}

/* What needs you now: one row per thing, each with its one action */
.needs { padding: 18px 20px; }
.nhead { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.nhead h2 { display: flex; align-items: center; gap: 0; font: 800 19px/1.2 var(--serif); letter-spacing: -.015em; }
.count.hot { background: var(--accent); color: #fff; }
.nclear { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font: 600 13px var(--sans); color: var(--ok); }
.nnone { margin: 0; font-size: 14px; }
.nlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.need { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.need:first-child { border-top: 0; }
.nic { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--cream-2); color: var(--ink-2); align-self: start; }
.need.warn .nic { background: var(--warn-soft); color: #9a6a00; }
.need.bad .nic { background: var(--bad-soft); color: var(--bad); }
.need.blue .nic { background: var(--accent-soft); color: var(--accent); }
.need.ok .nic { background: var(--ok-soft); color: var(--ok); }
.ntext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ntext b { font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.nline { font-size: 14px; color: var(--ink-2); line-height: 1.45; overflow-wrap: anywhere; }
.ncamp { font-weight: 600; color: var(--ink); text-decoration: none; }
.ncamp:hover { color: var(--accent); text-decoration: underline; }
.nact { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nmore { margin-top: 8px; font-size: 14px; }
@container work (max-width: 560px) {
  .need { grid-template-columns: 32px minmax(0, 1fr); }
  .nact { grid-column: 2; justify-content: flex-start; }
}

/* Campaigns at a glance: where every piece is, and the next step */
.ccards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ccard { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; color: var(--ink); text-decoration: none;
  box-shadow: var(--shadow-1); transition: border-color .15s, box-shadow .2s var(--ease), transform .2s var(--ease); min-width: 0; }
.ccard:hover, .ccard:focus-visible { border-color: var(--accent-edge); box-shadow: var(--shadow-3); transform: translateY(-2px); outline: none; color: var(--ink); }
.cthumb { aspect-ratio: 2 / 1; background: linear-gradient(135deg, #e9edf3, #f5f7fa); overflow: hidden; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--line); }
.cthumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.cph { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--taupe); font-size: 14px; }
.cbody { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ccard h3 { margin: 0; font: 800 18px/1.25 var(--serif); letter-spacing: -.012em; overflow-wrap: anywhere; }
.cmeta { margin: 0; font-size: 13px; color: var(--taupe); }
.ccounts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ccounts li { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 6px 2px; border-left: 1px solid var(--line); min-width: 0; color: var(--taupe); }
.ccounts li:first-child { border-left: 0; }
.ccounts b { font: 800 18px/1.2 var(--serif); color: var(--line-2); }
.ccounts li.on b { color: var(--ink); }
.ccounts span { font-size: 13px; color: var(--taupe); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cflags { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cprog { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin-top: 4px; }
.cprog i { height: 6px; border-radius: 3px; background: var(--cream-2); }
.cprog i.done { background: var(--ok); } .cprog i.cur { background: var(--accent); }
.cstep { margin: 0; font-size: 13px; color: var(--ink-2); display: flex; gap: 8px; }
.cstep .k { color: var(--taupe); }
.cnext { margin: 4px 0 0; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; font-size: 14px; }
.cnext span { flex: 1; min-width: 0; }
.cnext svg.go { transition: transform .15s; }
.ccard:hover .cnext svg.go { transform: translateX(3px); }
.cnext.off { background: var(--cream); color: var(--ink-2); }
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: center; padding: 32px; overflow: hidden;
  background: radial-gradient(90% 120% at 100% 0%, #eef4ff 0%, #fff 60%); }
.herotext { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.herotext .kicker { margin: 0; }
.herotitle { margin: 0; font: 800 36px/1.08 var(--serif) !important; letter-spacing: -.03em !important; }
.herotext .actions { margin-top: 4px; }
.heroart { position: relative; min-height: 240px; align-self: stretch; }
.heroart img { position: absolute; width: 82%; border-radius: 8px; box-shadow: 0 18px 40px rgba(16, 24, 40, .2); }
.heroart .c1 { right: 0; top: 0; transform: rotate(3deg); }
.heroart .c2 { left: 0; bottom: 0; transform: rotate(-3deg); }
.how .howsteps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.howsteps li { position: relative; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: var(--cream); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.howsteps .num { position: absolute; right: 14px; top: 12px; font: 800 20px/1 var(--serif); color: var(--line-2); }
.howsteps .hic { width: 36px; height: 36px; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.howsteps b { font-size: 15px; }
.howsteps p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.5; }

/* -------------------------------------------------------------------------------------------- a campaign's steps */
.stepper ol { list-style: none; margin: 0; padding: 6px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.stepper li { position: relative; min-width: 0; }
.stepper .step { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 11px; text-decoration: none; color: var(--ink-2); min-width: 0; height: 100%;
  transition: background .15s, color .15s; }
.stepper a.step:hover { background: var(--hover); color: var(--ink); }
.stepper .dot { width: 30px; height: 30px; margin: 0; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; background: #fff;
  border: 1.5px solid var(--line-2); color: var(--taupe); font: 700 14px var(--sans); }
.stepper .dot svg { width: 15px; height: 15px; stroke-width: 2.4; }
.stepper .done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.stepper .cur .dot { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.stepper .stx { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.stepper .sl { font: 600 14px var(--sans); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stepper .sl .sh { display: none; }
.stepper .sc { font-size: 13px; color: var(--taupe); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stepper [aria-current="step"] { background: var(--accent-soft); }
.stepper [aria-current="step"] .sl { color: var(--accent-dark); }
.stepper.preview .step { cursor: default; }
.stepper.preview li:not(.cur) .dot { border-style: dashed; }

/* toolbar, search, segmented control */
.toolbar { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; }
.toolbar .tbend { margin-left: auto; display: flex; gap: 8px; }
.search { position: relative; min-width: 0; max-width: 340px; }
.search.wide { max-width: none; }
.toolbar .search { flex: 1 1 200px; }
.search svg.i { position: absolute; left: 12px; top: 50%; margin-top: -8px; width: 16px; height: 16px; color: var(--taupe); pointer-events: none; }
.search input { width: 100%; height: 40px; padding: 8px 12px 8px 36px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; font: 14px var(--sans); color: var(--ink);
  transition: border-color .15s, box-shadow .15s; }
.search input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--cream-2); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 12px; min-height: 32px; border-radius: 8px; font: 600 13px var(--sans); color: var(--ink-2); cursor: pointer;
  display: inline-flex; gap: 6px; align-items: center; transition: background .15s, color .15s; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .1); }
.seg button .n { font: 600 13px var(--sans); color: var(--taupe); }
.nomatch { grid-column: 1 / -1; margin: 8px 0; }

/* pieces */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.pcard { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; color: var(--ink);
  text-decoration: none; min-width: 0; box-shadow: var(--shadow-1); transition: border-color .15s, box-shadow .2s var(--ease), transform .2s var(--ease); }
.pcard:hover, .pcard:focus-visible { border-color: var(--accent-edge); box-shadow: var(--shadow-3); transform: translateY(-2px); outline: none; color: var(--ink); }
.pcard .pv { aspect-ratio: 3 / 2; background: var(--cream-2); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.pcard .pv img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.pcard .pv .ph { font-size: 14px; color: var(--taupe); padding: 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pcard .pv .ph svg { color: #9aa3b0; }
.pcard .pv .chip { position: absolute; left: 10px; top: 10px; box-shadow: 0 1px 3px rgba(16, 24, 40, .16); }
.pcard .pv .chip:not(.ink):not(.blue):not(.ok):not(.warn):not(.bad) { background: #fff; }
.pcard .pv .chip.blue { background: #fff; color: var(--accent); } .pcard .pv .chip.ok { background: #fff; color: var(--ok); }
.pcard .pv .chip.thin { left: auto; right: 10px; background: var(--warn-soft); }
.pcard .pb { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pcard h3 { margin: 0; font: 700 15px/1.3 var(--sans); overflow-wrap: anywhere; }
.pcard p { margin: 0; }
.pcard .who { font-size: 13px; color: var(--taupe); }
.pcard .hook { font-size: 14px; color: var(--ink-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; }
.pcard .err { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--warn); margin-top: 4px; }
.pcard .err svg { margin-top: 2px; }
.pcard .scans { display: flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; color: var(--ok); margin-top: 4px; }
.working .pv::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .55) 50%, transparent 80%);
  animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.psect { display: flex; flex-direction: column; gap: 12px; }
.psh { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.psh h2 { margin: 0; font: 800 18px/1.25 var(--serif); letter-spacing: -.012em; display: flex; align-items: center; }
.psh p { margin: 2px 0 0; font-size: 14px; }
.psect + .psect { border-top: 1px solid var(--line); padding-top: 16px; }

/* images fade in over a soft placeholder */
img.pic { opacity: 0; transition: opacity .25s var(--ease); }
img.pic.on { opacity: 1; }

/* the piece page */
.pager { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; height: 40px; }
.pager .pos { font: 600 13px var(--sans); color: var(--ink-2); padding: 0 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pager .iconbtn { width: 34px; height: 34px; border-radius: 8px; }
.kbdhint { display: none; margin: -4px 0 0; font-size: 13px; color: var(--taupe); align-items: center; gap: 6px; flex-wrap: wrap; }
.kbdhint .sep { margin: 0 4px; }
@media (hover: hover) and (pointer: fine) { .kbdhint { display: flex; } }
.pdetail { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.pleft { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.preview { padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.pvbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pvk { font: 600 14px var(--sans); color: var(--ink-2); padding-left: 4px; }
.pvtools { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.stage { margin: 0; background: linear-gradient(180deg, #eef1f5, #e6eaf0); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.stage a { display: block; width: 100%; border-radius: 6px; }
.stage img { width: 100%; display: block; border-radius: 6px; box-shadow: 0 2px 6px rgba(16, 24, 40, .12), 0 12px 28px rgba(16, 24, 40, .12); background: #fff; }
.stage.proof { background: linear-gradient(180deg, #edf3ff, #e4ecfb); }
.stage figcaption { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.film { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.film button { display: flex; flex-direction: column; gap: 4px; align-items: stretch; padding: 4px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer;
  font: 600 13px var(--sans); color: var(--ink-2); transition: border-color .15s, box-shadow .15s; }
.film button img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: top; border-radius: 6px; display: block; background: var(--cream-2); }
.film button:hover { border-color: var(--accent-edge); }
.film button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); color: var(--accent-dark); }
.mailsto { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--cream); font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.mailsto svg { margin-top: 3px; color: var(--taupe); }
.mailsto b { color: var(--ink); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); min-width: 0; container: panel / inline-size; }
@container panel (max-width: 480px) {
  .panel > .tabs.line .lg { display: none; } .panel > .tabs.line .sh { display: inline; }
  .panel > .tabs.line button { padding: 12px 8px; gap: 6px; }
}
@container panel (max-width: 360px) { .panel > .tabs.line svg.i { display: none; } .panel > .pbody { padding: 16px; } }
.panel > .tabs.line { padding: 0 12px; }
.panel > .pbody { padding: 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sect { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sect > h4, .listk { margin: 0; font: 600 13px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--taupe); display: flex; align-items: center; gap: 4px; }
.sect > h4 .count { margin-left: 4px; }
.listk { margin: 16px 0 4px; }
.angle { border-radius: 12px; padding: 14px 16px; background: linear-gradient(180deg, #f3f7ff, #fff); border: 1px solid var(--accent-edge); }
.angle .k { font: 600 13px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.angle p { margin: 4px 0 0; font: 600 16px/1.5 var(--sans); color: var(--ink); }
.claims, .srcs, .found { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.claims { gap: 2px; }
.claims li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; padding: 8px 4px; border-bottom: 1px solid #eef1f5; }
.claims li:last-child { border-bottom: 0; }
.claims li > svg.i { color: var(--ok); margin-top: 3px; }
.claims li.nocite > svg.i { color: var(--taupe); }
.claims li > div { flex: 1; min-width: 0; }
.cite { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 6px; border-radius: 6px; vertical-align: 1px;
  background: var(--accent-soft); color: var(--accent); font: 600 13px/1 var(--sans); text-decoration: none; border: 1px solid var(--accent-edge); transition: background .15s, color .15s; }
a.cite:hover, a.cite:focus-visible { background: var(--accent); color: #fff; border-color: var(--accent); outline: none; }
span.cite { background: var(--cream-2); color: var(--ink-2); border-color: var(--line-2); }
.qa { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.qa > div { border-left: 3px solid var(--accent-edge); padding: 2px 0 2px 12px; }
.qa dt { font-size: 13px; color: var(--taupe); font-weight: 600; }
.qa dd { margin: 2px 0 0; font-size: 14px; }
.qa .nf dd { color: var(--taupe); }
.qa > div.nf { border-left-color: var(--line-2); }
.folds { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.fold { border-top: 1px solid var(--line); }
.folds > .fold:first-child { border-top: 0; }
.panel .pbody > .fold, .card > .fold { border: 1px solid var(--line); border-radius: 12px; }
.fold summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 12px 14px; cursor: pointer; font: 600 14px var(--sans); color: var(--ink); }
.fold summary::-webkit-details-marker { display: none; }
.fold summary:hover { background: var(--hover); }
.fold summary svg.fchev { color: var(--taupe); transition: transform .15s; }
.fold[open] > summary svg.fchev { transform: rotate(90deg); }
.fold summary .count { margin-left: 0; }
.foldbody { padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.removed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.removed li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.removed li svg.i { color: var(--bad); margin-top: 3px; }
.removed s { text-decoration-color: rgba(179, 38, 30, .5); }
.verdicts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.verdict { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.verdict.chosen { border-color: var(--ok-edge); background: var(--ok-soft); }
.verdict .v { font: 800 22px/1.05 var(--serif); letter-spacing: -.012em; }
.verdict .l { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.srcs { gap: 10px; }
.srcs li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.srcs li .cite { margin: 1px 0 0; }
.srcs li .src { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; font-size: 13px; color: var(--taupe); align-items: center; }
.srcs li .src svg.i { width: 14px; height: 14px; }
.srcs li a { overflow-wrap: anywhere; display: inline-flex; gap: 4px; align-items: center; }
.srcs b { color: var(--ink); font-weight: 500; }
.howline { display: flex; gap: 6px; align-items: center; margin: 0; font-size: 13px; color: var(--taupe); }
.fitbig { display: flex; gap: 16px; align-items: center; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--cream); }
.fitbig .num { font: 800 34px/1 var(--serif); letter-spacing: -.028em; min-width: 64px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fitbig .num small { font: 600 13px var(--sans); color: var(--taupe); letter-spacing: 0; }
.fitbig.hi .num { color: var(--ok); } .fitbig.mid .num { color: var(--accent); } .fitbig.lo .num { color: var(--warn); }
.fitbig.lo { background: var(--warn-soft); border-color: var(--warn-edge); }
.fitbig ul { margin: 4px 0 0; padding: 0 0 0 18px; font-size: 14px; color: var(--ink-2); }
.srcgroup { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.srcgroup > header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--cream); border-bottom: 1px solid var(--line); }
.srcgroup > header .ic { width: 30px; height: 30px; border-radius: 8px; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--ink-2); flex: none; }
.srcgroup > header b { font-size: 14px; }
.srcgroup > header .grow { min-width: 0; }
.srcgroup > header .grow span { display: block; font-size: 13px; color: var(--taupe); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.found li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; font-size: 14px; line-height: 1.45; border-top: 1px solid #eef1f5; }
.found li:first-child { border-top: 0; }
.found li > .grow > span { display: block; font-size: 13px; color: var(--taupe); margin-top: 2px; }
.found .more { justify-content: center; padding: 8px; }
.siteshot { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; box-shadow: var(--shadow-1); }
.siteshot .bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: var(--cream); border-bottom: 1px solid var(--line); font: 500 13px var(--sans); color: var(--taupe); }
.siteshot .bar i { width: 8px; height: 8px; border-radius: 50%; background: #d6dae1; display: inline-block; }
.siteshot .bar a { margin-left: 6px; color: var(--ink-2); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.siteshot .bar a:hover { color: var(--accent); }
.siteshot img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.kv { display: grid; grid-template-columns: minmax(96px, auto) minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 14px; }
.kv dt { color: var(--taupe); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.addr { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.addr .ic { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex: none; background: var(--cream-2); color: var(--ink-2); }
.addr.ok .ic { background: var(--ok-soft); color: var(--ok); } .addr.bad .ic { background: var(--warn-soft); color: var(--warn); }
.addr .lines { font: 500 13px/1.5 var(--mono); color: var(--ink); margin-top: 4px; }
.addr p { margin: 4px 0 0; }
.pagecard { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.pagecard .cardhead { margin-bottom: 0; }
.pagecard .url { display: flex; gap: 6px; align-items: center; min-width: 0; padding: 6px 6px 6px 12px; border-radius: 10px; background: var(--cream); border: 1px solid var(--line); }
.pagecard .url a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 13px var(--mono); text-decoration: none; }
.pagecard p { margin: 0; }
.minitiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.minitiles > div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.minitiles b { display: block; font: 800 20px/1.05 var(--serif); letter-spacing: -.012em; }
.minitiles span { display: block; font-size: 13px; color: var(--taupe); margin-top: 4px; }

/* tabs inside the work column (never another top bar) */
.tabs { display: flex; gap: 2px; padding: 3px; background: var(--cream-2); border-radius: 11px; align-self: flex-start; max-width: 100%; flex-wrap: wrap; }
.tabs a, .tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; border: 0; background: transparent; color: var(--ink-2);
  font: 600 14px var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; transition: color .15s, background .15s; }
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs [aria-current="page"], .tabs [aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .1); }
.tabs svg.i { width: 16px; height: 16px; }
.tabs .sh { display: none; }
.tabs.line { background: transparent; padding: 0; gap: 4px; border-bottom: 1px solid var(--line); border-radius: 0; align-self: stretch; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.tabs.line::-webkit-scrollbar { display: none; }
.tabs.line button, .tabs.line a { border-radius: 0; padding: 12px 10px; margin-bottom: -1px; border-bottom: 2px solid transparent; }
.tabs.line [aria-selected="true"], .tabs.line [aria-current="page"] { box-shadow: none; background: transparent; border-bottom-color: var(--accent); color: var(--ink); }
.tabs.line [aria-selected="true"] svg.i { color: var(--accent); }

/* forms: a clear label, the control, a hint, and an error that says what to fix */
.form { display: grid; gap: 16px; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form .row3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; }
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fl { font: 600 14px/1.3 var(--sans); color: var(--ink); }
.fhint { font: 400 13px/1.45 var(--sans); color: var(--taupe); }
.ferr { font: 600 13px/1.4 var(--sans); color: var(--bad); }
.ferr:empty { display: none; }
.fld.invalid input, .fld.invalid textarea, .fld.invalid select { border-color: var(--bad); background: #fff; }
.fld.invalid input:focus, .fld.invalid textarea:focus { box-shadow: 0 0 0 3px var(--bad-soft); }
.form input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), .form textarea, .form select, .input {
  font: 15px/1.4 var(--sans); color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 10px; min-height: 42px;
  padding: 10px 12px; width: 100%; min-width: 0; transition: border-color .15s, background .15s, box-shadow .15s; }
.form input:hover:not(:focus), .form textarea:hover:not(:focus), .input:hover:not(:focus) { border-color: #b6bfcb; }
.form input::placeholder, .form textarea::placeholder { color: #8a929e; }
.input.auto { width: auto; }
.input.num { width: 110px; }
.form label.filebtn, label.filebtn { cursor: pointer; }
.filebtn:focus-within { outline: 3px solid var(--accent-edge); outline-offset: 2px; }
.form textarea { min-height: 88px; resize: vertical; }
.form textarea.tall { min-height: 160px; font: 13px/1.55 var(--mono); }
.form input:focus, .form textarea:focus, .form select:focus, .input:focus { border-color: var(--accent); background: #fff; outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.form select, select.input { appearance: none; padding-right: 34px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--taupe) 50%), linear-gradient(135deg, var(--taupe) 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.formsect { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 16px 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.formsect:first-child, .callout + .formsect { padding-top: 0; border-top: 0; }
.formsect > .sh { display: flex; gap: 12px; align-items: flex-start; }
.formsect > .sh h3 { margin: 0; font: 700 16px/1.3 var(--sans); }
.formsect > .sh p { margin: 4px 0 0; font-size: 13px; color: var(--taupe); line-height: 1.45; }
.formsect > .sh .num { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: 700 13px/26px var(--sans); text-align: center; flex: none; }
.formsect > .sbody { display: grid; gap: 16px; min-width: 0; }
.colorrow { display: flex; gap: 8px; align-items: center; }
.colorrow input[type=color] { width: 46px; height: 42px; padding: 3px; border-radius: 10px; flex: none; border: 1px solid var(--line-2); background: #fff; cursor: pointer; }
.colorrow input:not([type=color]) { max-width: 140px; font-family: var(--mono) !important; }
.logorow { display: flex; gap: 16px; align-items: center; }
.logorow img { width: 72px; height: 72px; object-fit: contain; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 6px; flex: none; }
.toggle { position: relative; display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font: 500 15px/1.4 var(--sans); color: var(--ink); }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .track { width: 40px; height: 24px; border-radius: 12px; background: var(--line-2); position: relative; flex: none; transition: background .15s; }
.toggle .track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s var(--ease); }
.toggle input:checked + .track { background: var(--accent); }
.toggle input:checked + .track::after { transform: translateX(16px); }
.toggle input:focus-visible + .track { outline: 3px solid var(--accent-edge); outline-offset: 2px; }
.toggle small { display: block; color: var(--taupe); font-size: 13px; margin-top: 2px; }
.check { display: flex; gap: 8px; align-items: center; font: 500 14px var(--sans); color: var(--ink); cursor: pointer; }
.check input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.qlist { display: flex; flex-direction: column; gap: 8px; }
.qrow { display: flex; gap: 8px; align-items: center; }
.qrow .qn { font: 600 13px var(--sans); color: var(--taupe); width: 18px; text-align: right; flex: none; }
.qrow input { flex: 1; }
.styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.stylecard { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 8px 8px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer;
  text-align: left; font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.stylecard img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; display: block; background: var(--cream-2); }
.stylecard b { font: 600 14px var(--sans); padding: 0 4px; }
.stylecard small { font: 400 13px/1.4 var(--sans); color: var(--taupe); padding: 0 4px; }
button.stylecard:hover { border-color: var(--accent-edge); }
.stylecard[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.savebar { position: sticky; bottom: -40px; margin: 0 -24px -24px; padding: 14px 24px; background: #fff; border-top: 1px solid var(--line);
  border-radius: 0 0 var(--r-lg) var(--r-lg); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; z-index: 5; box-shadow: 0 -6px 16px rgba(16, 24, 40, .05); }
.savebar .fhint { margin-right: auto; }
.savebar.dirty .fhint { color: var(--warn); font-weight: 600; }
.fmts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.fmt { position: relative; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; text-align: left; background: #fff; border: 1.5px solid var(--line);
  border-radius: 12px; padding: 12px 14px 14px; cursor: pointer; font: 400 14px/1.4 var(--sans); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
button.fmt:hover { border-color: var(--accent-edge); }
.fmt[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fmt[aria-checked="true"]::after { content: ""; position: absolute; right: 12px; top: 12px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent);
  box-shadow: inset 0 0 0 4px #fff, 0 0 0 1.5px var(--accent); }
.fmt[disabled], .fmt.soon { cursor: not-allowed; background: var(--cream); }
.fmt.soon .shape { opacity: .55; }
.fmt .shape { height: 60px; width: 100%; display: flex; align-items: center; justify-content: center; }
.fmt .shape i { display: block; background: linear-gradient(135deg, #0d1016, #164aa8); border-radius: 4px; box-shadow: 0 2px 6px rgba(16, 24, 40, .18); }
.fmt .shape i.paper { background: #fff; border: 1px solid var(--line-2); box-shadow: 0 2px 6px rgba(16, 24, 40, .1); }
.fmt b { font-size: 14px; } .fmt small { font-size: 13px; color: var(--taupe); line-height: 1.4; }

/* the Businesses step */
.ways { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; background: var(--cream-2); border-radius: 12px; }
.ways button { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 8px; min-height: 42px; border: 0; border-radius: 9px; background: transparent;
  font: 600 14px var(--sans); color: var(--ink-2); cursor: pointer; transition: background .15s, color .15s; white-space: nowrap; }
.ways button:hover { color: var(--ink); }
.ways button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .1); }
.ways button[aria-selected="true"] svg.i { color: var(--accent); }
.ways .on { width: 8px; height: 8px; border-radius: 50%; background: var(--lu-green); flex: none; }
.waybody { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.waybody > .muted { margin: 0; }
.importopts { gap: 16px; }
.row.cond .cf { flex: 1 1 150px; min-width: 0; } .row.cond .cv { flex: 1 1 120px; min-width: 0; }
.row.invite { align-items: flex-end; gap: 12px; } .row.invite .grow { flex: 1 1 220px; } .row.invite .rolef { flex: 0 0 140px; }
.blist { list-style: none; margin: 0 -8px; padding: 0; display: flex; flex-direction: column; }
.blist a { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 10px; color: var(--ink); text-decoration: none; transition: background .15s; }
.blist a:hover, .blist a:focus-visible { background: var(--hover); outline: none; color: var(--ink); }
.blist li + li a { border-top: 1px solid #eef1f5; border-radius: 0; }
.blist li + li a:hover { border-radius: 10px; }
.blist .bav { width: 34px; height: 34px; border-radius: 9px; background: var(--cream-2); color: var(--ink-2); display: flex; align-items: center; justify-content: center; font: 700 13px var(--sans); flex: none; text-transform: uppercase; }
.blist b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blist .bmeta { display: block; font-size: 13px; color: var(--taupe); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blist svg.i { color: var(--taupe); }
.blist .more { justify-content: center; display: flex; padding: 8px; }
.warnlist { margin: 0; padding-left: 18px; font-size: 13px; }

/* settings: a sub-nav with what a seller needs first */
.setgrid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.subnav { position: sticky; top: 0; display: flex; flex-direction: column; gap: 16px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.subgroup { display: flex; flex-direction: column; gap: 2px; }
.subk { margin: 0 0 4px; padding: 0 8px; font: 600 13px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--taupe); }
.subnav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--ink-2); font: 600 14px var(--sans); text-decoration: none; transition: background .15s, color .15s; }
.subnav a svg.i { color: var(--taupe); }
.subnav a:hover { background: var(--hover); color: var(--ink); }
.subnav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-dark); }
.subnav a[aria-current="page"] svg.i { color: var(--accent); }
.setbody { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sethead h2 { margin: 0; font: 800 22px/1.2 var(--serif); letter-spacing: -.015em; }
.sethead p { margin: 4px 0 0; }

/* tables and lists that turn into cards when the column is narrow */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font: 600 13px var(--sans); color: var(--taupe); padding: 0 12px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px; border-bottom: 1px solid #eef1f5; vertical-align: middle; min-width: 0; overflow-wrap: anywhere; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .plus { color: var(--ok); font-weight: 600; } .tbl .minus { color: var(--ink); }
.tbl .who { display: flex; gap: 12px; align-items: center; min-width: 0; }
.tbl .who .avatar { width: 34px; height: 34px; border-radius: 9px; background: var(--cream-2); color: var(--ink-2); font-size: 13px; }
.tbl .who b { display: block; font-weight: 600; }
.tbl .who span { display: block; font-size: 13px; color: var(--taupe); overflow-wrap: anywhere; }
.tbl select.input { width: auto; min-height: 36px; padding: 6px 30px 6px 10px; font-size: 14px; }
.tbl code { font: 500 13px var(--mono); }
.tblwrap { margin: 0 -4px; }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list > li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid #eef1f5; min-width: 0; flex-wrap: wrap; }
.list > li:first-child { border-top: 0; padding-top: 4px; }
.pick { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.pick button { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
  font: 500 14px var(--sans); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s; }
.pick button:hover { border-color: var(--accent-edge); }
.pick button[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.pick button .grow { min-width: 0; overflow-wrap: anywhere; }
.pick button small { display: block; font-size: 13px; color: var(--taupe); font-weight: 400; }
.pick button .n { font: 600 13px var(--sans); color: var(--ink-2); white-space: nowrap; }
.leads { display: flex; flex-direction: column; gap: 12px; }
.leadcard { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow-1); }
.leadcard .who { display: flex; gap: 12px; align-items: center; min-width: 0; }
.leadcard .who .avatar { width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); font-size: 14px; }
.leadcard .who b { display: block; font-size: 15px; }
.leadcard .who span { display: block; font-size: 13px; color: var(--ink-2); }
.leadcard .when { font-size: 13px; color: var(--taupe); white-space: nowrap; text-align: right; }
.leadcard blockquote { grid-column: 1 / -1; margin: 0; padding: 12px 14px; background: var(--cream); border-radius: 10px; font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; border-left: 3px solid var(--accent-edge); }
.leadcard .reach { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.pack { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; background: #fff; }
.pack.best { border-color: var(--accent-edge); box-shadow: 0 0 0 3px var(--accent-soft); }
.pack .v { font: 800 30px/1.05 var(--serif); letter-spacing: -.028em; }
.pack .btn { margin-top: 8px; }
.copybox { position: relative; margin: 0; padding: 12px 44px 12px 14px; border-radius: 10px; background: #10131a; color: #e6e9ef; font: 13px/1.55 var(--mono);
  white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }
.copybox .iconbtn { position: absolute; top: 6px; right: 6px; color: #aab2c0; }
.copybox .iconbtn:hover, .copybox .iconbtn:focus-visible { background: rgba(255, 255, 255, .1); color: #fff; }
.inlinecopy { display: flex; gap: 6px; align-items: center; padding: 6px 6px 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--cream); min-width: 0; }
.inlinecopy.onwhite { background: #fff; margin-top: 8px; }
.inlinecopy code { flex: 1; min-width: 0; font: 500 13px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scopes { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; align-items: center; }
.scopes code { font: 500 13px var(--mono); padding: 3px 8px; border-radius: 6px; background: var(--cream-2); color: var(--ink); }
.scopes code.miss { background: var(--warn-soft); color: var(--warn); }
.steps { margin: 0; padding: 0 0 0 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--ink-2); }
.steps b { color: var(--ink); }
.progress { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 12px; border: 1px solid var(--accent-edge); background: var(--accent-soft); font-size: 14px; }
.progress p { margin: 0; }
.progress.done { border-color: var(--ok-edge); background: var(--ok-soft); }
.progress.failed { border-color: var(--bad-edge); background: var(--bad-soft); }
.progress .meter { background: rgba(255, 255, 255, .8); }
.progress.done .meter > i { background: var(--ok); }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 96px; padding-top: 8px; border-bottom: 1px solid var(--line); }
.chart > i { flex: 1; min-width: 3px; background: var(--accent); border-radius: 3px 3px 0 0; opacity: .85; display: block; }
.chart > i.zero { background: var(--cream-2); height: 3px; }
.chartaxis { display: flex; justify-content: space-between; font: 500 13px var(--sans); color: var(--taupe); margin-top: 6px; }

/* empty, loading and error states */
.empty { text-align: center; padding: 24px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty .art { width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.empty .art svg.i { width: 26px; height: 26px; }
.empty .etitle { margin: 0; font: 800 22px/1.2 var(--serif); letter-spacing: -.02em; }
.empty p { margin: 0; max-width: 52ch; }
.empty .actions { justify-content: center; margin-top: 8px; }
.skel { position: relative; overflow: hidden; background: var(--cream-2); border-radius: 10px; }
.skel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .7) 50%, transparent 80%); animation: shimmer 1.4s linear infinite; }
.skel.line { height: 14px; border-radius: 7px; } .skel.block { height: 140px; border-radius: 14px; } .skel.block.tall { height: 360px; }
.skel.thumb { aspect-ratio: 3 / 2; border-radius: 10px; }
.skel.w45 { width: 45%; } .skel.w70 { width: 70%; } .skel.w90 { width: 90%; }
.skelgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.skelcard { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }
.skelsplit { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; }
.loading { display: flex; flex-direction: column; gap: 16px; }
.loadnote { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--ink-2); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--accent-edge); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; display: inline-block; }
.spinner.light { border-color: rgba(0, 96, 240, .25); border-top-color: var(--accent); }

/* dialog and toast */
dialog.dlg { border: 0; padding: 0; border-radius: 18px; width: min(480px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(16, 24, 40, .3); color: var(--ink); }
dialog.dlg[open] { animation: popin .16s var(--ease); }
dialog.dlg::backdrop { background: rgba(16, 20, 28, .42); }
.dlg .dbody { padding: 24px 24px 8px; display: flex; flex-direction: column; gap: 10px; }
.dlg .dic { width: 42px; height: 42px; border-radius: 12px; background: var(--warn-soft); color: #9a6a00; display: flex; align-items: center; justify-content: center; }
.dlg .dic.blue { background: var(--accent-soft); color: var(--accent); }
.dlg h2 { margin: 0; font: 800 21px/1.2 var(--serif); letter-spacing: -.015em; }
.dlg p { margin: 0; color: var(--ink-2); font-size: 15px; }
.dlg ul { margin: 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); }
.dlg .dfoot { display: flex; gap: 8px; justify-content: flex-end; padding: 16px 24px 24px; flex-wrap: wrap; }
/* "Top up to keep going": a friendly modal, never an error (app.js topUp) */
.dlg .tu .tu-line { color: var(--ink); font-size: 16px; line-height: 1.5; }
.dlg .tu .tu-why { font-size: 14px; color: var(--ink-2); }
.dlg .tu-otherbtn { align-self: flex-start; font-size: 14px; }
.dlg .tu-other { display: flex; flex-direction: column; gap: 6px; }
.dlg .tu-amt { max-width: 180px; }
.dlg .tu-auto { margin-top: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--cream); font-size: 14px; }
.dlg .tu-err { color: var(--bad); font-size: 14px; font-weight: 600; }
@media (max-width: 520px) { .dlg .dfoot .btn { flex: 1 1 100%; justify-content: center; } .dlg .dfoot .btn.quiet { order: 3; } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 8px); opacity: 0; background: var(--ink); color: #fff; padding: 8px 8px 8px 14px; border-radius: 12px; font-size: 14px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, .28); z-index: 100; max-width: min(560px, calc(100vw - 32px)); display: flex; gap: 10px; align-items: center; transition: opacity .2s var(--ease), transform .2s var(--ease); }
.toast.in { opacity: 1; transform: translate(-50%, 0); }
.toast .tic { width: 24px; height: 24px; border-radius: 50%; background: var(--ok); display: flex; align-items: center; justify-content: center; flex: none; }
.toast.bad { background: #7d1a14; } .toast.bad .tic { background: rgba(255, 255, 255, .18); }
.toast .tmsg { flex: 1; min-width: 0; }
.toast .tclose { width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: rgba(255, 255, 255, .7); cursor: pointer; display: flex; align-items: center; justify-content: center; flex: none; }
.toast .tclose:hover, .toast .tclose:focus-visible { background: rgba(255, 255, 255, .12); color: #fff; outline: none; }

/* the work column's own breakpoints (it changes width with the divider, so these follow the column, not the window) */
@container work (max-width: 1080px) {
  .how .howsteps { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .howsteps li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 2px 14px; align-items: center; padding: 12px 44px 12px 14px; }
  .howsteps .hic { grid-row: 1 / span 2; }
  .howsteps .num { top: 50%; margin-top: -10px; }
  .stepper .stx .sl .lg { display: none; } .stepper .stx .sl .sh { display: inline; }
}
@container work (max-width: 980px) {
  .tbl.cards.wide thead { display: none; }
  .tbl.cards.wide, .tbl.cards.wide tbody, .tbl.cards.wide tr { display: block; width: 100%; }
  .tbl.cards.wide tr { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 4px 8px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 6px; margin-bottom: 8px; }
  .tbl.cards.wide td { display: block; border: 0; padding: 6px 8px; text-align: left !important; }
  .tbl.cards.wide td:first-child { grid-column: 1 / -1; }
  .tbl.cards.wide td[data-l]::before { content: attr(data-l); display: block; font: 600 13px var(--sans); color: var(--taupe); margin-bottom: 2px; }
  .tbl.cards.wide select.input { width: 100%; }
  .formsect { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
@container work (max-width: 760px) {
  .pdetail { grid-template-columns: minmax(0, 1fr); }
  .pdetail > .pleft { display: contents; }               /* stacked: the preview, then why it says this, then their page */
  .pdetail .preview { order: 1; } .pdetail > .panel { order: 2; } .pdetail .pagecard { order: 3; }
  .stepper .sc { display: none; }
}
@container work (max-width: 860px) {
  .setgrid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .subnav { position: static; flex-direction: row; flex-wrap: wrap; gap: 4px 16px; padding: 6px; }
  .subgroup { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 2px; }
  .subk { display: none; }
  .subgroup + .subgroup { border-left: 1px solid var(--line); padding-left: 8px; }
  .skelsplit { grid-template-columns: minmax(0, 1fr); }
}
@container work (max-width: 700px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding: 24px; }
  .heroart { display: none; }
  .stepper ol { padding: 4px; }
  .stepper .step { flex-direction: column; gap: 4px; padding: 8px 2px; text-align: center; }
  .stepper .stx { align-items: center; }
  .stepper .sl { font-size: 13px; }
  .ways { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container work (max-width: 640px) {
  .ptitle { font-size: 26px; }
  .form .row2, .form .row3 { grid-template-columns: minmax(0, 1fr); }
  .tbl.cards thead { display: none; }
  .tbl.cards, .tbl.cards tbody, .tbl.cards tr, .tbl.cards td { display: block; width: 100%; }
  .tbl.cards tr { border: 1px solid var(--line); border-radius: 12px; padding: 6px 4px; margin-bottom: 8px; }
  .tbl.cards td { border: 0; padding: 6px 10px; text-align: left !important; }
  .tbl.cards td[data-l]::before { content: attr(data-l); display: block; font: 600 13px var(--sans); color: var(--taupe); margin-bottom: 2px; }
  .leadcard { grid-template-columns: minmax(0, 1fr); }
  .leadcard .when { text-align: left; }
  .herotitle { font-size: 30px !important; }
  .card { padding: 20px; }
  .savebar { margin: 0 -20px -20px; padding: 12px 20px; }
  .ptools { justify-content: flex-start; }
  .toolbar .tbend { margin-left: 0; }
}
@container work (max-width: 460px) {
  .ptitle { font-size: 24px; }
  .tabs a, .tabs button { padding: 8px 10px; gap: 6px; }
  .tabs.line svg.i { display: none; }
  .tabs .lg { display: none; } .tabs .sh { display: inline; }
  .card { padding: 16px; }
  .savebar { margin: 0 -16px -16px; padding: 12px 16px; }
  .panel > .pbody { padding: 16px; }
  .pgrid, .ccards, .skelgrid { grid-template-columns: minmax(0, 1fr); }
  .minitiles b { font-size: 20px; }
  .search { max-width: none; flex-basis: 100%; }
  .stepper .dot { width: 26px; height: 26px; font-size: 13px; }
  .stepper .cur .dot { box-shadow: 0 0 0 3px var(--accent-soft); }
  .stepper .sl { font-size: 13px; }
  .ways button span:not(.on) { font-size: 13px; }
  .stage { padding: 10px; }
  .preview { padding: 8px; }
  .hero { padding: 20px; }
  .row.invite .rolef { flex: 1 1 120px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .ccard:hover, .pcard:hover, .startcard:hover { transform: none; }
}

/* ------------------------------------------- sign-in page: a normal scrolling page, the pitch left, two sample cards right */
body.signpage { min-height: 100vh; display: flex; flex-direction: column; }
.sign { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 470px) minmax(0, 1fr); gap: 48px;
  align-items: center; padding: 48px max(20px, env(safe-area-inset-right)) 32px max(20px, env(safe-area-inset-left)); }
.signcard { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 32px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 18px 40px rgba(16, 24, 40, .06); }
.signh { font: 800 37px/1.06 var(--serif); letter-spacing: -.028em; margin: 6px 0 14px; }
.signh em { color: var(--accent); font-style: normal; }
.signcard .muted { margin: 0 0 18px; font-size: 15.5px; }
.signcard .callout { margin: 0 0 16px; display: block; }
.signcard .form label { display: flex; flex-direction: column; gap: 6px; font: 600 14px var(--sans); color: var(--ink); }
.signcard .form .hint { font-size: 13px; color: var(--taupe); }
.signform { margin-top: 6px; }
.btn.big { width: 100%; justify-content: center; padding: 13px 18px; font-size: 16px; }
.signart { position: relative; min-height: 440px; }
.signart img { position: absolute; width: 78%; border-radius: 10px; box-shadow: 0 24px 60px rgba(16, 24, 40, .22); }
.signart .c1 { right: 0; top: 4%; transform: rotate(4deg); }
.signart .c2 { left: 2%; top: 26%; transform: rotate(-3deg); }
.signfoot { text-align: center; padding: 18px; font: 600 13px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--taupe); }
@media (max-width: 900px) {
  .sign { grid-template-columns: 1fr; gap: 28px; padding-top: 24px; }
  .signart { min-height: 0; aspect-ratio: 4 / 3; }
  .signh { font-size: 38px; }
  .signcard { padding: 24px; }
}
.signcard .small { margin: 14px 0 0; }

/* piece plug-ins (static/x-*.js) come after the preview when the piece page stacks on a phone */
.pdetail .xsec { order: 4; }
