/* Binderloop app. Calm and flat: navy surfaces, one blue for the main action and the current place, hairlines instead of boxes.
   Same colours and fonts as the landing page (Schibsted Grotesk titles, Instrument Sans text, DM Mono for numbers). See .bw/REVISION.md. */
:root {
  --bg: #0a0e1a; --card: #0f1424; --card2: #151b2e; --surface: #151b2e;
  --ink: #eef1fa; --muted: #8f9ab5; --line: rgb(255 255 255 / .08); --line2: rgb(255 255 255 / .15);
  --fill: rgb(255 255 255 / .04); --hover: rgb(255 255 255 / .06); --field: #0b101e;
  --accent: #3b6bff; --accent-ink: #fff; --accent-soft: rgb(59 107 255 / .15); --sky: #8fb4ff;
  --ok: #5fd0a0; --ok-soft: rgb(95 208 160 / .13); --warn: #f2b45a; --warn-soft: rgb(242 180 90 / .12); --bad: #ff8d85; --bad-soft: rgb(255 141 133 / .13);
  --foil: linear-gradient(135deg, #f6c453 0, #ff7a59 38%, #3dbfb0 70%, #c8e86b 100%);
  --side-bg: radial-gradient(130% 34% at 50% 108%, rgb(47 107 255 / .38), transparent 70%), linear-gradient(180deg, #070b19 0%, #08102b 62%, #0a1750 100%); --col-glow: radial-gradient(72% 340px at 82% -60px, rgb(47 107 255 / .3), transparent 72%);
  --scrim: rgb(4 7 15 / .7); --sheet-bg: #0f1424; --toast-bg: #eef1fa; --toast-ink: #0a0e1a;
  --font: "Instrument Sans", system-ui, sans-serif; --display: "Schibsted Grotesk", "Instrument Sans", system-ui, sans-serif; --mono: "DM Mono", ui-monospace, Menlo, Consolas, monospace;
  --r-lg: 14px; --r-md: 10px; --r-sm: 8px; --side-w: 264px; --nav-h: 62px;
  --sab: env(safe-area-inset-bottom, 0px); --sat: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
[data-theme="light"] {
  --side-bg: #ffffff; --col-glow: radial-gradient(72% 300px at 82% -60px, rgb(59 107 255 / .12), transparent 72%);
  --bg: #f4f6fb; --card: #ffffff; --card2: #eef1f8; --surface: #e8ecf5; --ink: #0d1328; --muted: #5a6580; --line: rgb(13 19 40 / .1); --line2: rgb(13 19 40 / .18);
  --fill: rgb(13 19 40 / .035); --hover: rgb(13 19 40 / .05); --field: #ffffff; --accent-soft: rgb(59 107 255 / .1); --sky: #2a52e6;
  --ok: #1f8a5b; --ok-soft: rgb(31 138 91 / .12); --warn: #94590f; --warn-soft: rgb(148 89 15 / .12); --bad: #c4301a; --bad-soft: rgb(196 48 26 / .1);
  --scrim: rgb(13 19 40 / .4); --sheet-bg: #ffffff; --toast-bg: #0d1328; --toast-ink: #eef1fa; color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--font); -webkit-text-size-adjust: 100%; }
body { min-height: 100svh; overscroll-behavior-y: none; }
::selection { background: rgb(59 107 255 / .5); color: #fff; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--sky); text-decoration: none; } a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
kbd { font: 500 11.5px/1 var(--mono); padding: 3px 6px; border-radius: 5px; background: var(--fill); border: 1px solid var(--line); color: var(--muted); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 1fr; min-height: 100svh; }
.shell > div, main { min-width: 0; }
.col { background: var(--col-glow) no-repeat, var(--bg); }
.side { display: none; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 4px; padding: calc(8px + var(--sat)) 14px 8px; background: var(--bg); border-bottom: 1px solid var(--line); }
.brand { font: 600 19px/1 var(--display); letter-spacing: -.025em; display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none !important; }
.brand b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--accent); font-size: 0; }
.brand b::before { content: ""; width: 8px; height: 12px; border-radius: 2px; background: #fff; transform: rotate(8deg); }
.top .sp { flex: 1; }
main { padding: 20px 16px calc(var(--nav-h) + var(--sab) + 32px); max-width: 1080px; width: 100%; margin: 0 auto; }
main:focus { outline: none; }
.tabs { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + var(--sab)); padding-bottom: var(--sab); display: grid; grid-template-columns: repeat(5, 1fr); background: var(--bg); border-top: 1px solid var(--line); }
.tabs a, .tabs button { display: grid; place-items: center; align-content: center; gap: 3px; color: var(--muted); text-decoration: none !important; font: 500 11.5px/1 var(--font); min-height: 48px; border: 0; background: transparent; }
.tabs a[aria-current="page"] { color: var(--ink); } .tabs a[aria-current="page"] svg { color: var(--accent); }
.tabs a.fab span.ring { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--accent); color: #fff; margin-top: -18px; box-shadow: 0 0 0 4px var(--bg); }
.tabs a.fab:active span.ring { transform: scale(.95); }
.i.dots { stroke-width: 3.2; }
@media (min-width: 900px) {
  .shell { grid-template-columns: var(--side-w) 1fr; }
  .side { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100svh; padding: 18px 12px 12px; border-right: 1px solid var(--line); background: var(--side-bg); overflow: hidden; }
  .side__s { flex: 1; min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 2px; margin: 0 -4px; padding: 0 4px; }
  .top { display: none; } .tabs { display: none; }
  main { padding: 32px 44px 80px; }
}

/* ---------- sidebar ---------- */
.side .brand { margin: 2px 8px 12px; font-size: 20px; }
.kbar { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0 8px 0 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--fill); color: var(--muted); text-align: left; margin-bottom: 8px; }
.kbar:hover { background: var(--hover); } .kbar span { flex: 1; font-size: 14px; }
.nl { display: flex; align-items: center; gap: 10px; padding: 0 10px; min-height: 36px; border-radius: 8px; color: var(--ink); font-weight: 500; text-decoration: none !important; }
.nl:hover { background: var(--hover); } .nl[aria-current="page"] { background: var(--accent-soft); }
.nl svg, .fi svg { color: var(--muted); } .nl[aria-current="page"] svg { color: var(--accent); }
.loop__t { font: 500 12px/1 var(--font); color: var(--muted); padding: 16px 10px 6px; }
.loop { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.st { display: block; }
.st__h { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; font: 600 14.5px/1.2 var(--display); }
.st__h:hover { background: var(--hover); }
.st__n { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line2); color: var(--muted); font: 500 11px/1 var(--mono); flex: none; }
.st.active .st__n { background: var(--accent); border-color: var(--accent); color: #fff; }
.st__t { flex: 1; } .st__c { display: flex; align-items: center; gap: 6px; color: var(--muted); font: 400 12.5px/1 var(--mono); }
.st__c svg { width: 15px; height: 15px; transition: transform .2s; } .st[data-open="1"] .st__c svg { transform: rotate(180deg); }
.st__i { display: none; } .st[data-open="1"] .st__i { display: block; }
.st__i > ul { list-style: none; margin: 0 0 6px 19px; padding: 0 0 0 11px; border-left: 1px solid var(--line); display: grid; gap: 1px; }
.fi { display: flex; align-items: center; gap: 9px; min-height: 32px; padding: 0 8px; border-radius: 7px; color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none !important; border: 0; background: transparent; width: 100%; text-align: left; }
.fi:hover { background: var(--hover); color: var(--ink); } .fi:hover svg { color: var(--ink); }
.fi[aria-current="page"] { color: var(--ink); background: var(--accent-soft); } .fi[aria-current="page"] svg { color: var(--accent); }
.fi svg { width: 16px; height: 16px; }
.fi .lk { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font: 500 11.5px/1 var(--font); color: var(--warn); } .fi .lk svg { width: 11px; height: 11px; color: var(--warn); }
.bdg { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--hover); color: var(--ink); font: 500 11.5px/1 var(--mono); }
.bdg.warn { background: var(--warn-soft); color: var(--warn); }
.sidefoot { flex: none; display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-height: 780px) { .fi { min-height: 29px; } .st__h { min-height: 33px; } .side .brand { margin-bottom: 6px; } .loop__t { padding-top: 10px; } .sidefoot { gap: 6px; padding-top: 8px; } }
.planbox { display: grid; gap: 8px; padding: 2px 8px; }
.planbox .row { gap: 8px; } .planbox .pn { font-weight: 600; } .planbox .mt { font-size: 12.5px; color: var(--muted); }
.planbox .lnk { margin-left: auto; font-size: 13px; font-weight: 600; background: none; border: 0; color: var(--sky); padding: 0; }
.acct { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.acct .av { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--card2); font: 600 12px/1 var(--display); text-transform: uppercase; flex: none; }
.acct .em { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- type + layout atoms ---------- */
.h1 { font: 600 clamp(26px, 3vw, 32px)/1.15 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.h2 { font: 600 17px/1.3 var(--display); letter-spacing: -.01em; }
.h3 { font: 600 15px/1.3 var(--display); }
.lead { color: var(--muted); max-width: 60ch; text-wrap: pretty; }
.eyebrow { display: none; }
.head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 0 0 24px; }
.head > div:first-child { flex: 1; min-width: 220px; display: grid; gap: 6px; }
.head > .row.wrap { display: flex; flex: 0 0 auto; min-width: 0; gap: 8px; justify-content: flex-end; }
.stack { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.row { display: flex; align-items: center; gap: 12px; } .row.wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }
.grid2 { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.grid4 { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); } @media (min-width: 700px) { .grid4 { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.card.flat { background: transparent; }
.card > .h2, .card > .h3 { margin-bottom: 10px; }
.stat { display: grid; gap: 4px; }
.stat .v { font: 600 26px/1.1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: 13px; }
.delta { font: 500 12.5px/1 var(--mono); } .up { color: var(--ok); } .down { color: var(--bad); }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--hover); font: 500 12px/1 var(--font); white-space: nowrap; color: var(--muted); }
.chip.ok { background: var(--ok-soft); color: var(--ok); } .chip.warn { background: var(--warn-soft); color: var(--warn); } .chip.acc { background: var(--accent-soft); color: var(--sky); } .chip.bad { background: var(--bad-soft); color: var(--bad); }
.foil { background: var(--foil); color: #1c1608 !important; }

/* ---------- buttons + fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--r-md); border: 1px solid var(--line2); background: transparent; font: 600 14px/1 var(--font); text-decoration: none !important; color: var(--ink); transition: background .15s, border-color .15s; }
.btn:hover { background: var(--hover); } .btn:active { transform: translateY(1px); }
.btn.pri { background: linear-gradient(180deg, #4f7bff, #3b6bff); border-color: #3b6bff; color: #fff; box-shadow: 0 10px 26px -12px rgb(59 107 255 / .9); } .btn.pri:hover { background: #4f7bff; }
.btn.sm { min-height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn.ghost { border-color: transparent; } .btn.danger { color: var(--bad); }
.btn[disabled] { opacity: .4; pointer-events: none; }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; border: 0; background: transparent; color: var(--ink); } .icon-btn:hover { background: var(--hover); }
.field { display: grid; gap: 6px; }
.field > label, .lab { font-size: 13px; font-weight: 500; color: var(--muted); }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=search], input[type=date], select, textarea { min-height: 40px; width: 100%; padding: 0 12px; border-radius: var(--r-md); border: 1px solid var(--line2); background: var(--field); font-size: 15px; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(59 107 255 / .25); }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f9ab5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
select option { background: #0f1424; color: #eef1fa; } [data-theme="light"] select option { background: #fff; color: #0d1328; }
textarea { padding: 10px 12px; min-height: 96px; resize: vertical; }
input[type=range] { width: 100%; accent-color: var(--accent); min-height: 30px; } input[type=checkbox] { accent-color: var(--accent); width: 17px; height: 17px; } input[type=file] { color: var(--muted); }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--fill); border: 1px solid var(--line); gap: 2px; }
.seg button { min-height: 32px; padding: 0 13px; border: 0; border-radius: 7px; background: transparent; font: 600 13.5px/1 var(--font); color: var(--muted); white-space: nowrap; transition: background .15s, color .15s; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"], .seg button.on { background: var(--card2); color: var(--ink); box-shadow: 0 0 0 1px var(--line2); }
.seg.scroll { overflow-x: auto; max-width: 100%; scrollbar-width: none; } .seg.scroll::-webkit-scrollbar { display: none; }
.seg.sm button { padding: 0 10px; min-height: 28px; font-size: 12.5px; }
.tgl { position: relative; width: 44px; height: 26px; border-radius: 99px; border: 0; background: var(--line2); flex: none; transition: background .2s; }
.tgl::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.tgl[aria-checked="true"] { background: var(--accent); } .tgl[aria-checked="true"]::after { transform: translateX(18px); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line2); border-radius: 9px; overflow: hidden; }
.stepper button { width: 32px; height: 32px; border: 0; background: transparent; } .stepper button:hover { background: var(--hover); } .stepper span { min-width: 30px; text-align: center; font-family: var(--mono); }

/* ---------- list rows: separated by hairlines, not boxed ---------- */
.list { display: grid; gap: 0; }
.item { text-decoration: none !important; color: inherit; display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 10px 6px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; text-align: left; width: 100%; }
.list > :last-child { border-bottom: 0; }
button.item:hover, a.item:hover { background: var(--hover); }
.item.sel { background: var(--accent-soft); }
.item.dim { opacity: .45; }
.thumb { width: 44px; height: 61px; border-radius: 5px; background: var(--card2); border: 1px solid var(--line); display: grid; place-items: center; font-size: 11px; color: var(--muted); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--card2); }
.item .t { font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.item .s { color: var(--muted); font-size: 13.5px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 3px; }
.item .p { text-align: right; font: 500 14.5px/1.2 var(--mono); display: grid; gap: 3px; justify-items: end; }
.item .p small { color: var(--muted); font-weight: 400; font-size: 12px; }
.empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 48px 20px; color: var(--muted); border: 1px dashed var(--line2); border-radius: var(--r-lg); }
.empty .h2 { color: var(--ink); } .empty > svg.i { width: 32px; height: 32px; }

/* ---------- home ---------- */
.figs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fig { padding: 18px 18px 18px 0; display: grid; gap: 4px; } .fig + .fig { padding-left: 18px; border-left: 1px solid var(--line); }
.fig .v { font: 600 30px/1.05 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; } .fig .l { font-size: 13px; color: var(--muted); } .fig .d { font: 400 12.5px/1.3 var(--mono); color: var(--muted); }
.cols { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.todo { display: grid; gap: 0; }
.todo a, .todo button { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); text-decoration: none !important; text-align: left; }
.todo > :last-child { border-bottom: 0; } .todo a:hover, .todo button:hover { background: var(--hover); }
.todo b { font-weight: 600; } .todo small { display: block; color: var(--muted); font-size: 13px; } .todo svg { color: var(--muted); }
.upsell { display: grid; gap: 12px; padding: 18px; border-radius: var(--r-lg); border: 1px solid var(--line2); background: var(--card); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; } .checks li { display: flex; gap: 10px; align-items: center; font-size: 14px; } .checks svg { color: var(--ok); width: 16px; height: 16px; }
.sparkline { width: 100%; height: 56px; display: block; }

/* ---------- binder grid (stock) ---------- */
.cgrid { display: grid; gap: 18px 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.cc { position: relative; display: grid; gap: 6px; padding: 0; border: 0; background: transparent; text-align: left; color: inherit; align-content: start; }
.cc__i { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 63/88; background: var(--card2); box-shadow: 0 0 0 1px var(--line); transition: box-shadow .15s; }
.cc:hover .cc__i { box-shadow: 0 0 0 2px var(--line2); }
.cc__i img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc.sel .cc__i { box-shadow: 0 0 0 3px var(--accent); }
.cc__q { position: absolute; top: 6px; right: 6px; background: rgb(10 14 26 / .85); color: #fff; font: 500 11.5px/1 var(--mono); padding: 4px 6px; border-radius: 5px; }
.cc__f, .cc__ch { display: none; }
.cc .t { font-weight: 600; font-size: 13.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cc .s { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; line-height: 1.3; color: var(--muted); }
.cc .s b { color: var(--ink); font: 500 12.5px/1.3 var(--mono); }
.cc .m { display: flex; gap: 4px; flex-wrap: wrap; }

/* ---------- scan ---------- */
.cam { position: relative; border-radius: var(--r-lg); overflow: hidden; background: #05080f; aspect-ratio: 3/4; max-height: 64svh; width: 100%; display: grid; place-items: center; color: #fff; }
.cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam .guide { position: absolute; left: 50%; top: 50%; height: 78%; aspect-ratio: 63/88; transform: translate(-50%, -50%); border: 2px solid rgb(255 255 255 / .9); border-radius: 12px; box-shadow: 0 0 0 999px rgb(4 7 15 / .55); transition: border-color .2s; }
.cam .guide::before { content: ""; position: absolute; left: 6%; right: 6%; top: 3%; height: 10%; border: 1.5px dashed rgb(255 255 255 / .6); border-radius: 6px; }
.cam .ctl { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 16px; align-items: center; }
.shutter { width: 66px; height: 66px; border-radius: 50%; border: 4px solid #fff; background: rgb(255 255 255 / .22); } .shutter:active { background: #fff; }
.cam .btn { background: rgb(0 0 0 / .45); color: #fff; border-color: rgb(255 255 255 / .3); } .cam .btn[aria-pressed="true"] { background: #fff; color: #0b1020; }
.cam--auto { max-height: 74svh; }
.cam__n { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgb(0 0 0 / .6); color: #fff; border-radius: 99px; padding: 6px 11px; font: 500 12px/1 var(--mono); } .cam__n:empty { display: none; }
.cam__st { position: absolute; top: 12px; left: 12px; right: 84px; z-index: 2; background: rgb(0 0 0 / .62); color: #fff; border-radius: 10px; padding: 8px 12px; font-size: 14px; font-weight: 500; } .cam__st:empty { display: none; }
.cam[data-st="hold"] .guide { border-color: #ffd166; } .cam[data-st="captured"] .guide, .cam[data-st="present"] .guide { border-color: #46d38a; }
.cam__last { position: absolute; left: 12px; right: 12px; bottom: 96px; z-index: 2; display: none; align-items: center; gap: 10px; background: rgb(0 0 0 / .75); border-radius: 12px; padding: 8px 10px; color: #fff; font-size: 14px; }
.cam__last.on { display: flex; } .cam__last .thumb { width: 36px; height: 50px; flex: none; } .cam__last .muted { color: rgb(255 255 255 / .72); }
.cam__fin { position: absolute; left: 12px; top: 56px; z-index: 3; border: 0; border-radius: 99px; padding: 7px 12px; font: 600 12.5px/1 var(--font); color: #fff; background: rgb(0 0 0 / .6); cursor: pointer; } .cam__fin.on { background: var(--accent); }
.item.q { grid-template-columns: 44px minmax(0, 1fr) auto auto; row-gap: 10px; } .item.q .icon-btn { width: 34px; height: 34px; }
.qctl { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
select.mini { width: auto; min-height: 32px; padding: 0 28px 0 10px; font-size: 13.5px; border-radius: 8px; background-position: right 8px center; }
.defs { padding: 0; } .defs__h { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 0 18px; border: 0; background: transparent; text-align: left; font-weight: 600; } .defs__b { padding: 0 18px 18px; }
.item.q.ask { background: var(--warn-soft); border-radius: 10px; border-bottom: 0; margin: 4px 0; padding: 12px; }
.ask__b { grid-column: 1 / -1; display: grid; gap: 10px; padding-top: 6px; } .ask__row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ask__c { display: grid; gap: 4px; justify-items: center; width: 80px; font-size: 12px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 5px; color: var(--ink); }
.ask__c:hover { border-color: var(--line2); } .ask__c img { width: 100%; aspect-ratio: 63/88; object-fit: cover; border-radius: 5px; }
.ask__c[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pct { font: 500 14px/1 var(--mono); }
.bigcard { width: 100px; flex: none; } .bigcard img { width: 100%; aspect-ratio: 63/88; object-fit: cover; border-radius: 7px; border: 1px solid var(--line); display: block; background: var(--card2); }
.imgcard { width: 56px; flex: none; } .imgcard img { width: 100%; aspect-ratio: 63/88; object-fit: cover; border-radius: 5px; border: 1px solid var(--line); display: block; background: var(--card2); }

/* ---------- action bar, sheets, toast ---------- */
.bar { position: sticky; bottom: calc(var(--nav-h) + var(--sab) + 10px); z-index: 10; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 12px 10px 16px; border-radius: var(--r-lg); background: var(--card2); border: 1px solid var(--line2); box-shadow: 0 16px 40px -16px rgb(0 0 0 / .7); margin-top: 16px; }
@media (min-width: 900px) { .bar { bottom: 20px; } }
.prog { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; } .prog i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }
.meter { height: 5px; border-radius: 99px; background: var(--line2); overflow: hidden; } .meter i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--accent); animation: sp .7s linear infinite; flex: none; }
@keyframes sp { to { transform: rotate(360deg); } }
.scrim { position: fixed; inset: 0; z-index: 50; background: var(--scrim); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; max-height: 92svh; overflow: auto; background: var(--sheet-bg); border: 1px solid var(--line2); border-bottom: 0; border-radius: 18px 18px 0 0; padding: 20px 18px calc(24px + var(--sab)); display: grid; gap: 16px; animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(16px); opacity: 0; } }
@media (min-width: 700px) { .scrim { align-items: center; } .sheet { border-radius: 18px; border-bottom: 1px solid var(--line2); } }
.sheet .grab { width: 36px; height: 4px; border-radius: 4px; background: var(--line2); margin: -8px auto 0; }
#toast { position: fixed; z-index: 70; left: 50%; bottom: calc(var(--nav-h) + var(--sab) + 16px); transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100% - 32px); }
.toast { background: var(--toast-bg); color: var(--toast-ink); padding: 10px 16px; border-radius: 10px; font: 600 14px/1.2 var(--font); animation: up .2s ease-out; }
@media (min-width: 900px) { #toast { bottom: 24px; } }

/* ---------- command bar + more sheet ---------- */
.pal { position: fixed; inset: 0; z-index: 80; background: var(--scrim); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.pal__b { width: min(600px, 100%); max-height: 70svh; display: grid; grid-template-rows: auto 1fr auto; border-radius: 14px; background: var(--card); border: 1px solid var(--line2); box-shadow: 0 40px 100px -30px rgb(0 0 0 / .9); overflow: hidden; }
.pal__i { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); } .pal__i svg { color: var(--muted); }
.pal__i input { border: 0 !important; background: transparent !important; box-shadow: none !important; min-height: 52px; font-size: 16px; padding: 0; }
.pal__l { overflow-y: auto; padding: 6px; display: grid; align-content: start; gap: 1px; }
.pal__g { font: 500 12px/1 var(--font); color: var(--muted); padding: 10px 10px 5px; }
.pal__r { display: flex; align-items: center; gap: 12px; min-height: 38px; padding: 0 10px; border-radius: 8px; border: 0; background: transparent; width: 100%; text-align: left; color: var(--ink); }
.pal__r svg { color: var(--muted); } .pal__r small { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.pal__r[aria-selected="true"] { background: var(--accent-soft); } .pal__r[aria-selected="true"] svg { color: var(--accent); }
.pal__r .thumb { width: 22px; height: 31px; }
.pal__f { display: flex; gap: 14px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.more { display: grid; gap: 12px; }

/* ---------- tables + misc ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font: 500 12.5px/1 var(--font); color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line2); }
.tbl td { padding: 11px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; } .tbl td.r, .tbl th.r { text-align: right; font-family: var(--mono); }
.scrollx { overflow-x: auto; }
.pre { white-space: pre-wrap; font: 400 13.5px/1.6 var(--mono); background: var(--field); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; max-height: 260px; overflow: auto; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 15px; } .kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; font-family: var(--mono); }
.note { font-size: 14px; color: var(--muted); text-wrap: pretty; }
.warnbox { padding: 11px 14px; border-radius: var(--r-md); background: var(--warn-soft); color: var(--warn); font-size: 14px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
.tilegrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; } @media (min-width: 700px) { .tilegrid { grid-template-columns: repeat(4, 1fr); } }
.tile { display: grid; gap: 6px; align-content: start; justify-items: start; padding: 16px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); text-decoration: none !important; color: var(--ink); text-align: left; }
.tile:hover { border-color: var(--line2); } .tile .i { color: var(--muted); } .tile small { color: var(--muted); font-size: 14px; }
.tip { background: var(--accent-soft); border-color: transparent; }
.use { padding: 14px 16px; display: grid; gap: 10px; }
.plist { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px; font-size: 14px; }
.ann { background: var(--accent-soft); border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; } .ann.warn { background: var(--warn-soft); color: var(--warn); }
.gate { min-height: 100svh; display: grid; place-items: center; padding: 20px; }
.gate__c { width: min(420px, 100%); display: grid; gap: 12px; padding: 26px; } .gate__c .brand { margin-bottom: 6px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 8px; } .skip:focus { left: 12px; }

@media (max-width: 899px) { .head { margin-bottom: 18px; } }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } .head > .row.wrap { flex-wrap: nowrap; width: 100%; } .head > .row.wrap .btn { flex: 1; min-width: 0; padding-inline: 10px; } .card { padding: 14px; } .fig .v { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } .spin { animation: sp 2s linear infinite !important; } }

/* landing-page hero on Home */
.hero { position: relative; display: grid; gap: 20px; grid-template-columns: 1fr; padding: clamp(20px, 3vw, 32px); border-radius: 20px; color: #fff; overflow: hidden; background: radial-gradient(80% 90% at 50% 120%, rgb(47 107 255 / .55), transparent 70%), linear-gradient(165deg, #0a1233 0%, #0c1a52 55%, #1636a8 100%); border: 1px solid rgb(255 255 255 / .1); }
@media (min-width: 820px) { .hero { grid-template-columns: 1.1fr 1fr; align-items: center; } }
.hero__t { display: grid; gap: 6px; justify-items: start; }
.hero__l { font-size: 14px; color: rgb(255 255 255 / .7); font-weight: 500; }
.hero__v { font: 650 clamp(44px, 6vw, 72px)/1 var(--display); letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.hero__s { font-size: 14px; color: rgb(255 255 255 / .7); }
.hero__g { min-width: 0; color: #8fb4ff; } .hero__g .sparkline { height: 96px; }
.hero .btn:not(.pri) { background: rgb(255 255 255 / .1); border-color: rgb(255 255 255 / .22); color: #fff; } .hero .btn:not(.pri):hover { background: rgb(255 255 255 / .18); }
[data-theme="light"] .hero { background: radial-gradient(80% 90% at 50% 120%, rgb(59 107 255 / .45), transparent 70%), linear-gradient(165deg, #0a1233 0%, #0c1a52 55%, #1636a8 100%); }
@media (max-width: 560px) { .fig { padding: 14px 10px 14px 0; } .fig + .fig { padding-left: 10px; } .fig .v { font-size: 22px; } .fig .d, .fig .l { font-size: 12px; } }
.hero .sparkline polyline { stroke: #a9c4ff; }

/* sidebar v3: steps as labels, items always visible, nothing wider than the column */
.side > *, .side__s > * { min-width: 0; }
.side__s { grid-template-columns: minmax(0, 1fr); }
.sidefoot { grid-template-columns: minmax(0, 1fr); }
.loop { display: grid; gap: 0; }
.st { display: block; padding: 0; }
.st__lab { display: flex; align-items: center; gap: 8px; padding: 14px 10px 5px; font: 500 12px/1 var(--font); color: var(--muted); }
.st__lab .st__n { width: 16px; height: 16px; font-size: 10px; }
.st > ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; border: 0; }
.fi { min-height: 34px; color: #c3cbe3; } [data-theme="light"] .fi { color: #394260; }
.fi .bdg { margin-left: auto; }
.fi .lk + .bdg { margin-left: 8px; }
.planbox .row { min-width: 0; }
.acct .em { min-width: 0; }
.fi { min-height: 32px; } .st__lab { padding: 12px 10px 4px; }
.side__s::-webkit-scrollbar { width: 6px; } .side__s::-webkit-scrollbar-button { display: none; height: 0; } .side__s::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 3px; } .side__s::-webkit-scrollbar-track { background: transparent; }
