/* V2 — Market Paper: admin. Tokens in tokens.css. Designed at 1440, usable at 768. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--desk); color: var(--text); font: 400 15px/1.45 var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .3; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .47 0 0 0 0 .36 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--moss); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.display { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; line-height: .86; letter-spacing: .02em; margin: 0; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.mask { display: block; overflow: hidden; padding-bottom: .05em; }
.mask > span { display: block; }
.muted { color: var(--muted); }

.sticker { display: inline-grid; place-items: center; text-align: center; width: var(--s, 40px); height: var(--s, 40px); border-radius: 50%; background: var(--bg, var(--leaf)); color: var(--fg, var(--ink));
  font-family: var(--font-display); font-weight: 700; font-size: calc(var(--s, 40px) * .38); line-height: .85; text-transform: uppercase; box-shadow: 0 1px 0 #ffffff80 inset, 0 2px 5px #1B2A2330; rotate: var(--r, -8deg); flex: none; }
.sticker--sun { --bg: var(--sun); } .sticker--clay { --bg: var(--clay); --fg: var(--sheet); } .sticker--sheet { --bg: var(--sheet); } .sticker--ink { --bg: var(--ink); --fg: var(--paper); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 500; white-space: nowrap; transition: background .2s, translate .2s; }
.btn:hover { background: var(--moss); }
.btn:active { translate: 0 1px; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--kraft { background: var(--kraft); color: var(--ink); }
.btn--kraft:hover { background: var(--kraft-deep); color: var(--sheet); }
.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn svg { width: 16px; height: 16px; }

/* ---------- Shell: sidebar with index tabs ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 22px 0 18px 18px; border-right: 1.5px solid var(--ink); background: var(--desk); z-index: 30; }
.side__logo { display: flex; align-items: center; gap: 10px; padding-right: 18px; }
.side__logo img { height: 42px; }
.side__logo span { font: 500 10px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.side__store { margin-right: 18px; position: relative; }
.store-ticket { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: var(--sheet); box-shadow: var(--shadow); text-align: left; }
.store-ticket b { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: .9; text-transform: uppercase; display: block; }
.store-ticket small { font: 500 11px var(--font-mono); color: var(--muted); }
.store-ticket svg { width: 16px; height: 16px; margin-left: auto; }
.store-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 50; background: var(--sheet); border-radius: 8px; box-shadow: var(--shadow-lift); padding: 6px; display: none; }
.store-list.open { display: block; }
.store-list button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 6px; text-align: left; font-size: 14px; }
.store-list button:hover { background: var(--paper); }
.store-list small { margin-left: auto; font: 500 10px var(--font-mono); color: var(--muted); text-transform: uppercase; }
.dotst { width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); flex: none; }
.dotst--busy { background: var(--sun); } .dotst--paused { background: var(--clay); }
.navtabs { display: grid; gap: 4px; }
.navtab { position: relative; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 12px 0 0 12px; background: var(--kraft-soft); font-weight: 500; font-size: 15px; color: color-mix(in oklab, var(--ink) 78%, transparent); translate: 8px 0; transition: translate .3s var(--ease-out), background .3s, color .3s; }
.navtab:hover { translate: 3px 0; }
.navtab.active { background: var(--paper); color: var(--ink); translate: 1.5px 0; box-shadow: inset 0 0 0 1.5px var(--ink); clip-path: inset(0 2px 0 0); }
.navtab svg { width: 18px; height: 18px; }
.navtab .badge { margin-left: auto; margin-right: 6px; min-width: 22px; height: 22px; border-radius: 50%; background: var(--clay); color: var(--sheet); font: 700 11px var(--font-mono); display: inline-grid; place-items: center; rotate: -8deg; }
.navtab .badge[data-zero="true"] { display: none; }
.side__foot { margin-top: auto; margin-right: 18px; display: grid; gap: 10px; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; background: var(--sheet); box-shadow: var(--shadow); }
.me__av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--kraft); font-weight: 600; font-size: 13px; flex: none; }
.me b { display: block; font-weight: 500; font-size: 14px; }
.me small { font: 500 10px var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.me button { margin-left: auto; font: 500 10px var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.me button:hover { color: var(--clay-ink); }
.clock { font: 500 12px var(--font-mono); color: var(--muted); display: flex; align-items: center; gap: 8px; }
.clock i { width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); animation: live 2s infinite; }
@keyframes live { 50% { opacity: .3; } }
.main { min-width: 0; padding: 22px 32px 60px; }

/* ---------- Page head + ledger strip ---------- */
.head { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.head__title { font-size: clamp(56px, 6vw, 100px); }
.head__tools { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ledger { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); background: var(--sheet); box-shadow: var(--shadow); border-radius: 6px; margin-bottom: 18px; }
.ledger__cell { position: relative; padding: 16px 18px; border-left: 1.5px dashed var(--line-strong); }
.ledger__cell:first-child { border-left: 0; }
.ledger__v { font: 500 28px var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ledger__l { font: 500 10px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ledger__cell .sticker { position: absolute; top: 10px; right: 12px; --s: 46px; font-size: 14px; }

/* ---------- Sheets & grid ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.sheet { position: relative; background: var(--sheet); border-radius: 6px; box-shadow: var(--shadow); padding: 18px 20px; min-width: 0; }
.sheet--paper { background: var(--paper); }
.sheet--kraft { background: var(--kraft); }
.sheet__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sheet__title { font-size: 34px; }
.sheet__tools { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-7 { grid-column: span 7; } .span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; } .span-3 { grid-column: span 3; }
.ruled { background-image: repeating-linear-gradient(180deg, transparent 0 39px, color-mix(in oklab, var(--sky) 35%, transparent) 39px 40px); }

/* Kitchens as mini tickets */
.kitchens { display: grid; gap: 10px; }
.kt { display: grid; grid-template-columns: 1fr auto; align-items: stretch; background: var(--desk); border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line); }
.kt__main { padding: 10px 12px; }
.kt__name { font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: .9; text-transform: uppercase; }
.kt__meta { font: 500 11px var(--font-mono); color: var(--muted); display: flex; gap: 10px; align-items: center; margin-top: 4px; text-transform: uppercase; letter-spacing: .04em; }
.kt__stub { width: 96px; border-left: 2px dashed var(--line-strong); display: grid; place-items: center; text-align: center; padding: 8px; gap: 4px; }
.kt__stub b { font: 500 22px var(--font-mono); display: block; line-height: 1; }
.kt__stub button { font: 600 10px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; border-radius: 4px; background: var(--ink); color: var(--paper); }
.kt[data-status="paused"] { opacity: .75; }
.kt[data-status="paused"] .kt__stub button { background: var(--clay); }

/* Sold-out board */
.so { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.so__item { position: relative; background: var(--paper); border-radius: 10px; padding: 8px 8px 10px; text-align: center; }
.so__item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; filter: grayscale(.85); opacity: .7; }
.so__item .sticker { position: absolute; top: 6px; left: 6px; --s: 48px; font-size: 13px; }
.so__name { font-size: 13px; font-weight: 500; margin-top: 4px; }
.so__when { font: 500 10px var(--font-mono); color: var(--muted); text-transform: uppercase; }
.so__item .btn { margin-top: 6px; }

/* Notebook activity */
.notes { display: grid; }
.note { display: grid; grid-template-columns: 46px 1fr; gap: 10px; min-height: 40px; align-items: start; padding-top: 10px; font-size: 13px; line-height: 1.45; }
.note__t { font: 500 11px var(--font-mono); color: var(--muted); padding-top: 2px; }
.note b { font-weight: 600; }
.diff-old { color: var(--clay-ink); text-decoration: line-through; font-family: var(--font-mono); }
.diff-new { color: var(--leaf-ink); font-family: var(--font-mono); font-weight: 600; }

/* Mini rail preview */
.mini-rail { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 14px 4px 6px; border-top: 4px solid var(--ink); position: relative; }
.mini-rail::-webkit-scrollbar { display: none; }
.mini-slip { flex: 0 0 150px; background: var(--sheet); box-shadow: var(--shadow); padding: 10px; border-radius: 0 0 4px 4px; rotate: var(--rot, 0deg); position: relative; font: 400 11px var(--font-mono); }
.mini-slip::before { content: ""; position: absolute; top: -18px; left: 50%; width: 18px; height: 14px; margin-left: -9px; border-radius: 3px; background: var(--kraft-deep); }
.mini-slip b { font-family: var(--font-display); font-weight: 700; font-size: 26px; display: block; line-height: .9; }

/* ---------- The rail (orders) ---------- */
.board-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--sheet); box-shadow: var(--shadow); font-size: 13px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.chip svg { width: 14px; height: 14px; }
.spike { margin-left: auto; display: flex; align-items: center; gap: 10px; font: 500 12px var(--font-mono); text-transform: uppercase; letter-spacing: .06em; }
.spike__pin { position: relative; width: 34px; height: 44px; }
.spike__pin::before { content: ""; position: absolute; left: 16px; top: 0; width: 2px; height: 36px; background: var(--ink); }
.spike__pin::after { content: ""; position: absolute; left: 4px; bottom: 0; width: 26px; height: 8px; border-radius: 4px; background: var(--ink); }
.spike b { font: 600 26px var(--font-mono); }
.rail { position: relative; margin-top: 26px; }
.rail__head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.rail__head .display { font-size: 38px; }
.rail__head .label { margin-left: auto; }
.rail__bar { height: 10px; border-radius: 5px; background: linear-gradient(180deg, #4b5a52, #1B2A23 60%, #0f1a14); box-shadow: 0 3px 6px #1B2A2340; position: relative; z-index: 2; }
.rail__row { display: flex; gap: 14px; align-items: flex-start; overflow-x: auto; padding: 0 8px 22px; min-height: 160px; scrollbar-width: thin; }
.rail__empty { font: 500 12px var(--font-mono); color: var(--faint); padding: 28px 8px; text-transform: uppercase; letter-spacing: .08em; }
.slip { --tint: var(--sheet); flex: 0 0 236px; position: relative; margin-top: -4px; padding: 22px 14px 12px; background: var(--tint); box-shadow: var(--shadow); border-radius: 0 0 6px 6px; rotate: var(--rot, 0deg); transform-origin: 50% 0;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 12px 100%; mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 12px 100%; font-family: var(--font-mono); font-size: 12px; }
.slip::before { content: ""; position: absolute; top: 0; left: 50%; width: 30px; height: 16px; margin-left: -15px; border-radius: 0 0 4px 4px; background: linear-gradient(180deg, #8f969a, #5d6467); }
.slip[data-state="new"] { --tint: #FFF6D6; }
.slip[data-state="preparing"] { --tint: #FBE6DA; }
.slip[data-state="ready"] { --tint: #EAF2D6; }
.slip__top { display: flex; align-items: center; gap: 6px; }
.slip__no { font-family: var(--font-display); font-weight: 700; font-size: 34px; line-height: .85; }
.slip__time { margin-left: auto; font-weight: 600; padding: 2px 6px; border-radius: 3px; background: color-mix(in oklab, var(--ink) 10%, transparent); }
.slip__time--late { background: var(--ink); color: var(--sun); }
.slip__who { margin: 4px 0 6px; display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.slip__who svg { width: 12px; height: 12px; vertical-align: -2px; }
.slip ul { list-style: none; margin: 0; padding: 8px 0; border-top: 1.5px dashed var(--line-strong); border-bottom: 1.5px dashed var(--line-strong); display: grid; gap: 3px; }
.slip li { display: grid; grid-template-columns: 26px 1fr; }
.slip .mod { grid-column: 2; font-size: 11px; color: var(--muted); }
.slip .mod--out { color: var(--clay-ink); font-weight: 600; text-transform: uppercase; }
.slip__flag { margin-top: 8px; padding: 6px 8px; border: 2px solid var(--clay-ink); border-radius: 4px; color: var(--clay-ink); font-weight: 600; text-transform: uppercase; font-size: 11px; rotate: -1.5deg; }
.slip__foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.slip__foot b { font-weight: 600; }
.slip__act { margin-left: auto; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--ink); color: var(--paper); font: 500 12px var(--font-body); display: inline-flex; align-items: center; gap: 6px; }
.slip__act:hover { background: var(--moss); }
.slip__act svg { width: 13px; height: 13px; }

/* ---------- Price list (menu) ---------- */
.tabs-h { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1.5px solid var(--ink); padding: 0 4px; }
.tabs-h::-webkit-scrollbar { display: none; }
.tabs-h button { flex: none; height: 38px; padding: 0 14px; border-radius: 10px 10px 0 0; background: var(--kraft-soft); font-size: 14px; font-weight: 500; translate: 0 4px; transition: translate .3s var(--ease-out), background .3s; }
.tabs-h button:hover { translate: 0 1px; }
.tabs-h button[aria-selected="true"] { background: var(--sheet); translate: 0 1.5px; box-shadow: inset 0 0 0 1.5px var(--ink); clip-path: inset(0 0 2px 0); }
.pricelist { background: var(--sheet); box-shadow: var(--shadow); border-radius: 0 0 6px 6px; padding: 8px 20px 18px; }
.pl-head { display: grid; grid-template-columns: 56px 1fr auto 200px; gap: 16px; padding: 12px 0 8px; font: 500 10px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom: 1.5px solid var(--ink); }
.pl-head span:last-child { text-align: right; }
.pl-row { display: grid; grid-template-columns: 56px 1fr auto 200px; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--line-strong); cursor: pointer; transition: background .2s; }
.pl-row:hover { background: color-mix(in oklab, var(--paper) 55%, transparent); }
.pl-row img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--paper); }
.pl-name { display: flex; align-items: baseline; gap: 8px; font-weight: 500; font-size: 15px; }
.pl-name .dots { flex: 1; border-bottom: 2px dotted var(--line-strong); translate: 0 -4px; min-width: 20px; }
.pl-sub { font: 400 11px var(--font-mono); color: var(--muted); margin-top: 3px; }
.pl-sub .al { color: var(--clay-ink); }
.pl-price { font: 500 16px var(--font-mono); display: flex; align-items: center; gap: 6px; }
.pl-price svg { width: 12px; height: 12px; color: var(--muted); }
.avail { display: flex; gap: 8px; justify-content: flex-end; }
.av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 700 15px var(--font-display); text-transform: uppercase; box-shadow: 0 2px 5px #1B2A2328; transition: background .25s, color .25s, rotate .3s; rotate: -6deg; }
.av[data-v="on"] { background: var(--leaf); }
.av[data-v="off"] { background: var(--desk); color: var(--faint); box-shadow: inset 0 0 0 1.5px var(--line-strong); rotate: 0deg; }
.av[data-v="snoozed"] { background: var(--sun); }
.pl-legend { display: flex; gap: 14px; align-items: center; font: 500 11px var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 12px; }
.pl-legend .av { width: 22px; height: 22px; font-size: 0; }

/* Spec sheet drawer */
.scrim { position: fixed; inset: 0; z-index: 60; background: #1B2A2350; backdrop-filter: blur(2px); opacity: 0; pointer-events: none; }
.scrim.open { pointer-events: auto; }
.drawer { position: fixed; z-index: 70; top: 0; right: 0; bottom: 0; width: min(620px, 100%); background: var(--sheet); box-shadow: -20px 0 60px #1B2A2335; display: flex; flex-direction: column; visibility: hidden; }
.drawer__head { display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1.5px solid var(--ink); }
.drawer__body { flex: 1; overflow-y: auto; padding: 20px 22px 32px; display: grid; gap: 22px; align-content: start; }
.drawer__foot { display: flex; gap: 10px; padding: 14px 22px; border-top: 1.5px dashed var(--line-strong); align-items: center; }
.ed-hero { display: grid; grid-template-columns: 140px 1fr; gap: 18px; align-items: center; }
.ed-hero img { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; background: var(--paper); }
.field { display: grid; gap: 4px; }
.field > span { font: 500 10px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.field > span svg { width: 11px; height: 11px; }
.input { min-height: 44px; padding: 8px 2px; border: 0; border-bottom: 1.5px solid var(--ink); background: transparent; width: 100%; }
.input:focus { outline: none; border-bottom-color: var(--leaf-ink); background: color-mix(in oklab, var(--leaf) 8%, transparent); }
.input[readonly] { border-bottom-style: dashed; color: var(--muted); font-family: var(--font-mono); }
textarea.input { resize: vertical; min-height: 76px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sec-title { font-size: 28px; margin-bottom: 10px; }
.stick-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.stick-pick button { height: 32px; padding: 0 12px; border-radius: 999px; font-size: 12px; background: var(--desk); box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--muted); }
.stick-pick button[aria-pressed="true"] { background: var(--clay); color: var(--sheet); box-shadow: 0 2px 5px #1B2A2330; rotate: -3deg; font-weight: 600; }
.stick-pick--diet button[aria-pressed="true"] { background: var(--leaf); color: var(--ink); }
.ownership { position: relative; padding: 14px 16px 14px 44px; background: var(--kraft); border-radius: 6px 14px 14px 6px; font-size: 13px; }
.ownership::before { content: ""; position: absolute; left: 14px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--sheet); box-shadow: inset 0 0 0 2px var(--kraft-deep); }
.mg { border: 1.5px dashed var(--line-strong); border-radius: 6px; padding: 10px 12px; display: grid; gap: 4px; }
.mg__head { display: flex; align-items: center; gap: 8px; }
.mg__head b { font-weight: 500; }
.mg__rule { margin-left: auto; font: 500 11px var(--font-mono); color: var(--muted); }
.mg__opts { font: 400 12px var(--font-mono); color: var(--muted); }
.mg__opts .al { color: var(--clay-ink); }
.sa { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line-strong); }
.sa__name { font-weight: 500; }
.sa__meta { font: 400 11px var(--font-mono); color: var(--muted); }

/* ---------- Reports ---------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid-line { stroke: var(--line); stroke-dasharray: 2 4; }
.chart .axis-label { font: 500 10px var(--font-mono); fill: var(--muted); }
.chart .bar { fill: var(--leaf-ink); }
.chart .line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart .line--cur { stroke: var(--leaf-ink); }
.chart .line--prev { stroke: var(--kraft-deep); stroke-dasharray: 4 5; }
.chart .area { fill: url(#areaFade); }
.chart .area-stop-a { stop-color: #91B054; stop-opacity: .35; }
.chart .area-stop-b { stop-color: #91B054; stop-opacity: 0; }
.chart .hit { fill: transparent; }
.chart .cross { stroke: var(--line-strong); }
.chart .marker { fill: var(--leaf-ink); stroke: var(--sheet); stroke-width: 2; }
.tip { position: absolute; z-index: 5; pointer-events: none; min-width: 150px; padding: 10px 12px; border-radius: 4px; background: var(--ink); color: var(--paper); font: 400 12px var(--font-mono); box-shadow: var(--shadow-lift); opacity: 0; translate: -50% calc(-100% - 12px); transition: opacity .15s; }
.tip b { font-weight: 600; }
.tip .row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tip .sw { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }
.tip .sw--cur { background: var(--leaf); } .tip .sw--prev { background: var(--kraft); }
.tip__muted { opacity: .7; }
.tip__delta.up { color: var(--leaf); } .tip__delta.down { color: var(--sun); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font: 500 11px var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.legend i.dash { background: repeating-linear-gradient(90deg, var(--kraft-deep) 0 4px, transparent 4px 8px); }
.mixbar { display: flex; gap: 2px; height: 46px; border-radius: 6px; overflow: hidden; margin: 6px 0 14px; }
.mixbar b { height: 100%; width: 0; display: grid; place-items: center; font: 600 12px var(--font-mono); color: var(--sheet); }
.mixlist { display: grid; gap: 8px; }
.mixlist div { display: grid; grid-template-columns: 14px 1fr auto auto; gap: 10px; align-items: center; font-size: 14px; }
.mixlist i { width: 12px; height: 12px; border-radius: 3px; }
.mixlist .mono { font-size: 13px; }
.mixlist small { font: 500 11px var(--font-mono); color: var(--muted); min-width: 70px; text-align: right; }
.stamps { display: grid; gap: 6px; font: 500 10px var(--font-mono); color: var(--muted); }
.stamps__row { display: grid; grid-template-columns: 34px repeat(10, 1fr); gap: 6px; align-items: center; }
.stamps__cell { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; }
.stamps__cell i { display: block; width: calc(20% + var(--v) * 80%); aspect-ratio: 1; border-radius: 50%; background: color-mix(in oklab, var(--leaf-ink) calc(25% + var(--v) * 75%), var(--kraft-soft)); }
.stamps__cell:hover i { outline: 2px solid var(--ink); outline-offset: 2px; }
.stamps__head { display: grid; grid-template-columns: 34px repeat(10, 1fr); gap: 6px; text-align: center; }
.dishrow { display: grid; grid-template-columns: 22px 44px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line-strong); }
.dishrow:last-child { border-bottom: 0; }
.dishrow img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--paper); }
.dishrow .rank { font: 700 22px var(--font-display); color: var(--muted); }
.dishrow .bar { height: 6px; border-radius: 3px; background: var(--leaf-ink); width: 0; margin-top: 5px; }
.dishrow .v { text-align: right; font: 500 13px var(--font-mono); }
.dishrow .v small { display: block; color: var(--muted); font-size: 11px; }
table.books { width: 100%; border-collapse: collapse; font: 400 13px var(--font-mono); }
.books th { text-align: left; font-weight: 500; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 10px; border-bottom: 1.5px solid var(--ink); }
.books td { padding: 12px 10px; border-bottom: 1px dashed var(--line-strong); }
.books .r { text-align: right; }
.books td:first-child { font: 700 24px var(--font-display); text-transform: uppercase; }

/* ---------- Team ---------- */
.tabs-team { display: flex; gap: 4px; border-bottom: 1.5px solid var(--ink); margin-bottom: 20px; }
.tabs-team button { height: 40px; padding: 0 16px; border-radius: 10px 10px 0 0; background: var(--kraft-soft); font-size: 14px; font-weight: 500; translate: 0 4px; }
.tabs-team button[aria-selected="true"] { background: var(--desk); translate: 0 1.5px; box-shadow: inset 0 0 0 1.5px var(--ink); clip-path: inset(0 0 2px 0); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 58px 18px; padding-top: 34px; }
.badge-card { position: relative; background: var(--sheet); border-radius: 12px; box-shadow: var(--shadow); padding: 34px 16px 16px; text-align: center; display: grid; gap: 8px; justify-items: center; rotate: var(--rot, 0deg); transform-origin: 50% -30px; }
.badge-card::before { content: ""; position: absolute; top: 12px; left: 50%; width: 36px; height: 8px; margin-left: -18px; border-radius: 4px; background: var(--desk); box-shadow: inset 0 1px 2px #1B2A2340; }
.badge-card::after { content: ""; position: absolute; top: -34px; left: 50%; width: 14px; height: 48px; margin-left: -7px; background: var(--moss); border-radius: 3px; z-index: -1; }
.badge-card__av { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); font: 700 30px var(--font-display); }
.badge-card__name { font: 700 30px var(--font-display); text-transform: uppercase; line-height: .9; }
.badge-card__mail { font: 400 11px var(--font-mono); color: var(--muted); }
.badge-card__scopes { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.scope { font: 500 11px var(--font-mono); padding: 4px 8px; border-radius: 4px; background: var(--paper); }
.scope b { font-weight: 600; }
.scope--global { background: color-mix(in oklab, var(--leaf) 30%, transparent); }
.scope--off { background: color-mix(in oklab, var(--clay) 25%, transparent); color: var(--clay-ink); }
.badge-card__foot { display: flex; gap: 8px; align-items: center; font: 500 10px var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.badge-card__foot .mfa { padding: 3px 7px; border-radius: 3px; background: var(--ink); color: var(--paper); }
.badge-card__foot .mfa--none { background: var(--sun); color: var(--ink); }
.badge-card--off { opacity: .6; }
.gcards { display: grid; gap: 8px; align-content: start; align-self: start; }
.gcard { display: grid; grid-template-columns: 1fr auto; text-align: left; padding: 12px 14px; border-radius: 6px; background: var(--paper); transition: background .2s, translate .25s var(--ease-out); }
.gcard:hover { translate: 4px 0; }
.gcard[aria-current="true"] { background: var(--ink); color: var(--paper); }
.gcard b { font-weight: 500; display: flex; align-items: center; gap: 6px; }
.gcard b svg { width: 12px; height: 12px; }
.gcard small { font: 400 11px var(--font-mono); opacity: .7; }
.gcard .n { font: 600 14px var(--font-mono); align-self: center; }
.perm-sec { padding: 6px 0 14px; }
.perm-sec__h { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1.5px solid var(--ink); }
.perm-sec__h b { font: 700 26px var(--font-display); text-transform: uppercase; }
.perm-key { font: 400 11px var(--font-mono); color: var(--muted); }
.perm-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--line-strong); }
.perm-row__l { font-size: 14px; }
.limit { font: 600 10px var(--font-mono); padding: 2px 6px; border-radius: 3px; background: var(--sun); margin-left: 6px; text-transform: uppercase; }
.stampset { display: inline-flex; gap: 6px; }
.stampset button { width: 62px; height: 30px; border-radius: 4px; font: 700 15px var(--font-display); text-transform: uppercase; letter-spacing: .04em; color: var(--faint); box-shadow: inset 0 0 0 1.5px var(--line); }
.stampset button[aria-pressed="true"][data-tri="allow"] { color: var(--leaf-ink); box-shadow: inset 0 0 0 2.5px var(--leaf-ink); rotate: -4deg; background: color-mix(in oklab, var(--leaf) 12%, transparent); }
.stampset button[aria-pressed="true"][data-tri="deny"] { color: var(--clay-ink); box-shadow: inset 0 0 0 2.5px var(--clay-ink); rotate: 3deg; background: color-mix(in oklab, var(--clay) 12%, transparent); }
.stampset button[aria-pressed="true"][data-tri="inherit"] { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.eff-tag { position: relative; background: var(--kraft); border-radius: 6px 6px 16px 16px; padding: 28px 16px 16px; box-shadow: var(--shadow); }
.eff-tag::before { content: ""; position: absolute; top: 10px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--desk); box-shadow: inset 0 0 0 2px var(--kraft-deep); }
.eff-tag select { width: 100%; height: 40px; padding: 0 10px; border-radius: 6px; border: 0; background: var(--sheet); font-size: 14px; }
.eff { display: grid; gap: 6px; margin-top: 12px; }
.eff div { display: grid; grid-template-columns: 58px 1fr; gap: 8px; align-items: start; padding: 8px 10px; border-radius: 6px; background: var(--sheet); font-size: 13px; }
.eff .st { font: 700 15px var(--font-display); text-transform: uppercase; text-align: center; border-radius: 4px; padding: 2px 0; }
.eff .st--allow { color: var(--leaf-ink); box-shadow: inset 0 0 0 2px var(--leaf-ink); rotate: -3deg; }
.eff .st--deny { color: var(--clay-ink); box-shadow: inset 0 0 0 2px var(--clay-ink); rotate: 3deg; }
.eff small { display: block; font: 400 11px var(--font-mono); color: var(--muted); }
.typed { font-family: var(--font-mono); font-size: 13px; }
.typed__row { display: grid; grid-template-columns: 90px 1fr auto; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--line-strong); align-items: start; }
.typed__t { color: var(--muted); }
.typed__what b { font-weight: 600; }
.typed__ctx { color: var(--muted); font-size: 11px; margin-top: 3px; }
.typed__diff { display: inline-flex; gap: 8px; margin-top: 6px; padding: 3px 8px; background: var(--paper); border-radius: 3px; }
.typed__hash { color: var(--faint); font-size: 11px; }
.typed__kind { display: inline-block; margin-right: 6px; padding: 1px 5px; border-radius: 3px; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; background: var(--paper); }
.typed__kind--money { background: var(--sun); } .typed__kind--menu { background: color-mix(in oklab, var(--leaf) 40%, transparent); }
.typed__kind--access { background: color-mix(in oklab, var(--sky) 45%, transparent); } .typed__kind--danger { background: var(--clay); color: var(--sheet); }
.typed__kind--integration { background: var(--kraft-soft); }
.verified { display: inline-grid; place-items: center; text-align: center; width: 110px; height: 110px; border-radius: 50%; border: 3px double var(--leaf-ink); color: var(--leaf-ink); font: 700 20px/0.9 var(--font-display); text-transform: uppercase; rotate: -12deg; }
.verified small { display: block; font: 500 9px var(--font-mono); letter-spacing: .08em; }

/* ---------- Sign-in ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login__card { position: relative; width: min(460px, 100%); background: var(--sheet); box-shadow: var(--shadow-lift); border-radius: 14px; padding: 36px 30px 28px; display: grid; gap: 16px; rotate: -.6deg; }
.login__card::before { content: ""; position: absolute; top: 14px; left: 50%; width: 44px; height: 9px; margin-left: -22px; border-radius: 5px; background: var(--desk); box-shadow: inset 0 1px 2px #1B2A2340; }
.login__card::after { content: ""; position: absolute; top: -60px; left: 50%; width: 16px; height: 74px; margin-left: -8px; background: var(--moss); border-radius: 3px; z-index: -1; }
.login__stamp { position: absolute; top: 30px; right: -26px; width: 116px; height: 116px; border-radius: 50%; border: 3px double var(--clay-ink); color: var(--clay-ink); display: grid; place-items: center; text-align: center; font: 700 22px/0.88 var(--font-display); text-transform: uppercase; rotate: 14deg; background: color-mix(in oklab, var(--sheet) 70%, transparent); }
.login__stamp small { display: block; font: 500 9px var(--font-mono); letter-spacing: .1em; }
.login__logo { height: 56px; justify-self: start; }
.login__title { font-size: 64px; }
.login__card p { margin: 0; color: var(--muted); }
.login__card .btn { height: 48px; font-size: 15px; }
.login__or { display: flex; align-items: center; gap: 10px; font: 500 10px var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.login__or::before, .login__or::after { content: ""; flex: 1; border-top: 1.5px dashed var(--line-strong); }
.login__note { font: 400 11px var(--font-mono); color: var(--muted); padding: 10px 12px; border-radius: 6px; background: var(--paper); }
.login__back { justify-self: start; font: 500 11px var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.mfa-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mfa-tabs button { height: 40px; border-radius: 999px; font-size: 14px; font-weight: 500; box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--muted); }
.mfa-tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.pk { display: grid; justify-items: center; gap: 10px; padding: 6px 0; text-align: center; }
.pk__btn { position: relative; width: 126px; height: 126px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); color: var(--leaf-ink); }
.pk__btn svg.fp { width: 62px; height: 62px; }
.pk__btn svg.fp path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.pk__ring { position: absolute; inset: -6px; border-radius: 50%; border: 2px dashed var(--leaf-ink); opacity: .6; }
.pk__scan { position: absolute; left: 24%; right: 24%; height: 3px; top: 30%; border-radius: 2px; background: var(--clay); opacity: 0; }
.pk__btn.ok { background: var(--leaf); color: var(--ink); }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.otp input { height: 58px; text-align: center; font: 500 24px var(--font-mono); border: 1.5px dashed var(--line-strong); border-radius: 6px; background: var(--desk); width: 100%; }
.otp input:focus { outline: none; border: 1.5px solid var(--ink); }
.otp input.ok { background: var(--leaf); border: 1.5px solid var(--leaf); rotate: -2deg; }
.otp-meta { display: flex; align-items: center; gap: 8px; font: 400 11px var(--font-mono); color: var(--muted); }
.otp-ring { width: 20px; height: 20px; transform: rotate(-90deg); }
.otp-ring circle { fill: none; stroke-width: 3; }
.otp-ring .bg { stroke: var(--line); } .otp-ring .fg { stroke: var(--leaf-ink); stroke-linecap: round; }
.check-row { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.check-row input { width: 16px; height: 16px; accent-color: var(--moss); }

.toast { position: fixed; z-index: 90; right: 24px; bottom: 24px; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: 8px; background: var(--ink); color: var(--paper); font-size: 14px; box-shadow: var(--shadow-lift); opacity: 0; pointer-events: none; }
.toast b { font-weight: 600; }
.toast__no { font: 700 30px var(--font-display); line-height: .8; }

@media (max-width: 1200px) {
  .span-8, .span-7, .span-6, .span-5, .span-4 { grid-column: span 12; }
  .span-3 { grid-column: span 6; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: sticky; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 14px; border-right: 0; border-bottom: 1.5px solid var(--ink); gap: 10px; }
  .side__logo span, .side__foot { display: none; }
  .side__store { margin: 0; flex: 1; }
  .navtabs { display: flex; overflow-x: auto; width: 100%; }
  .navtab { flex: none; border-radius: 10px 10px 0 0; translate: 0 4px; height: 40px; }
  .navtab.active { clip-path: inset(0 0 2px 0); translate: 0 1.5px; }
  .main { padding: 16px; }
  .ledger { grid-template-columns: repeat(2, 1fr); }
  .pl-head, .pl-row { grid-template-columns: 48px 1fr auto; }
  .pl-head span:last-child, .pl-row .avail { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
