/* Skalia · Private Office (final2) — light and modern. Warm white, crisp ink, brass as a quiet accent, soft depth. */
:root {
  --bg: #f5f4f1; --bg-2: #efeee9;
  --surface: #ffffff; --surface-2: #fbfaf8; --surface-3: #f3f2ee;
  --line: rgba(22, 24, 29, .07); --line-2: rgba(22, 24, 29, .11); --line-3: rgba(22, 24, 29, .2);
  --text: #16181c; --text-2: #4a4e56; --text-3: #7f838b; --text-4: #aeb1b7;
  --brass: #a37a3c; --brass-hi: #86622c; --brass-lo: #d8c29a; --brass-soft: #f6efe2; --brass-glow: rgba(163, 122, 60, .14);
  --ink: #17191d; --ink-2: #2a2d33;
  --paper: #ffffff; --paper-2: #fbfaf8; --paper-ink: #1d1f23; --paper-ink-2: #6b6f77; --paper-line: rgba(22, 24, 29, .09);
  --sage: #3f8a69; --sage-d: #2f6e53; --sage-soft: #e8f3ed;
  --rust: #c2553b; --rust-d: #a2432c; --rust-soft: #fbede8;
  --amber: #b5812c; --slate: #56789a; --slate-soft: #eaf0f6; --violet: #7a68b0;
  --sh-1: 0 1px 2px rgba(18, 20, 26, .04), 0 1px 1px rgba(18, 20, 26, .02);
  --sh-2: 0 1px 2px rgba(18, 20, 26, .04), 0 12px 32px -14px rgba(18, 20, 26, .16);
  --sh-3: 0 2px 6px rgba(18, 20, 26, .05), 0 28px 70px -24px rgba(18, 20, 26, .26);
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.22, .8, .24, 1); --ease-io: cubic-bezier(.65, 0, .35, 1);
  --bar-h: 58px; --gut: 40px; --spine: 46px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow: hidden; font-feature-settings: 'cv11', 'ss01'; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
kbd { font: 500 10px/1 var(--mono); padding: 3px 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; color: var(--text-3); margin-left: 8px; background: var(--surface); }
a { color: inherit; }
::selection { background: rgba(163, 122, 60, .22); }
.serif { font-family: var(--serif); }
.mono { font-family: var(--mono); }
.eyebrow { font: 600 10.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.eyebrow.brass { color: var(--brass); }
.muted { color: var(--text-3); }
[hidden] { display: none !important; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(22, 24, 29, .12); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ambient: a soft daylight wash from above */
.lamp { position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(1200px 520px at 50% -220px, rgba(163, 122, 60, .09), transparent 70%), radial-gradient(900px 600px at 100% 110%, rgba(86, 120, 154, .06), transparent 70%), var(--bg); }

/* ---------------------------------------------------------------- top bar */
#bar { position: fixed; top: 0; left: 0; right: 0; height: var(--bar-h); z-index: 40; display: flex; align-items: center; gap: 26px; padding: 0 20px 0 var(--gut);
  background: rgba(255, 255, 255, .78); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--brass); }
.brand .wm { font: 600 12px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--text); }
.brand .nm { font: italic 400 17px/1 var(--serif); color: var(--brass-hi); padding-left: 12px; border-left: 1px solid var(--line-2); }
.rooms { display: flex; gap: 2px; margin-left: 10px; padding: 3px; border-radius: 999px; background: var(--surface-3); }
.room { padding: 6px 14px; border-radius: 999px; color: var(--text-3); font-size: 13px; font-weight: 500; transition: color .2s, background .2s, box-shadow .2s; }
.room:hover { color: var(--text); }
.room.on { color: var(--text); background: var(--surface); box-shadow: var(--sh-1), 0 0 0 1px var(--line); }
.tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.session-pill { display: flex; align-items: center; gap: 9px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-3); font-size: 12.5px; transition: border-color .2s; }
.session-pill:hover { border-color: var(--line-3); color: var(--text); }
.session-pill b { color: var(--text); font-weight: 600; }
.session-pill .clock { width: 14px; height: 14px; border-radius: 50%; border: 1.2px solid var(--brass); position: relative; }
.session-pill .clock::after { content: ''; position: absolute; left: 5.4px; top: 2px; width: 1.2px; height: 4.5px; background: var(--brass); }
.btn-brass { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-weight: 500; font-size: 13px; color: #fff;
  background: var(--ink); box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 6px 16px -8px rgba(18, 20, 26, .5); transition: background .2s, transform .2s; }
.btn-brass:hover { background: var(--ink-2); }
.btn-brass:active { transform: translateY(1px); }
.btn-brass kbd { color: rgba(255, 255, 255, .7); border-color: rgba(255, 255, 255, .22); background: transparent; }
.dot-brass { width: 6px; height: 6px; border-radius: 50%; background: #e2bf7c; box-shadow: 0 0 0 3px rgba(226, 191, 124, .22); }
.askbtn { display: flex; align-items: center; gap: 9px; padding: 8px 12px 8px 14px; border-radius: 999px; background: var(--surface-3); border: 1px solid transparent; color: var(--text-3); font-size: 13px; min-width: 176px; transition: all .2s; }
.askbtn:hover { color: var(--text); background: var(--surface); border-color: var(--line-2); }
.askbtn kbd { margin-left: auto; }
.icon-btn { padding: 6px; }
.icon-btn kbd { margin: 0; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 600 11px/1 var(--sans); letter-spacing: .05em; color: var(--brass-hi); background: var(--brass-soft); border: 1px solid rgba(163, 122, 60, .25); }

/* ---------------------------------------------------------------- views */
#view { position: fixed; inset: var(--bar-h) 0 0 0; overflow: auto; z-index: 2; outline: none; }
.page { max-width: 1340px; margin: 0 auto; padding: 36px var(--gut) 120px; animation: pagein .45s var(--ease) both; }
@keyframes pagein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* home header */
.hello { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; margin-bottom: 34px; }
.hello h1 { font: 400 44px/1.05 var(--serif); letter-spacing: -.018em; color: var(--text); }
.hello h1 em { font-style: italic; color: var(--brass); font-weight: 400; }
.hello p { margin-top: 12px; color: var(--text-2); font: 400 16px/1.55 var(--sans); max-width: 620px; }
.hello p b { color: var(--text); font-weight: 600; }
.date-line { font: 600 10.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 14px; }
.sessions { display: flex; gap: 10px; }
.sess { width: 168px; padding: 14px 15px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-align: left; transition: border-color .2s, box-shadow .2s, transform .2s; position: relative; box-shadow: var(--sh-1); }
.sess:hover { box-shadow: var(--sh-2); transform: translateY(-1px); }
.sess .t { display: flex; justify-content: space-between; align-items: baseline; }
.sess .t span:first-child { font: 600 14px/1 var(--sans); color: var(--text); }
.sess .t span:last-child { font: 500 11px/1 var(--mono); color: var(--text-3); }
.sess .m { margin-top: 9px; font-size: 12px; color: var(--text-3); }
.sess .go { margin-top: 10px; font-size: 12px; font-weight: 500; color: var(--brass); }
.sess.next { border-color: rgba(163, 122, 60, .35); box-shadow: 0 0 0 3px var(--brass-glow), var(--sh-1); }
.sess.next .m { color: var(--text-2); }
.sess.done .t span:first-child { color: var(--text-3); }
.sess.done .go { color: var(--sage); }

/* section tabs */
.cabinet-tabs { display: flex; align-items: center; gap: 4px; margin-bottom: 26px; position: sticky; top: 0; z-index: 5; padding: 10px 0; background: var(--bg); box-shadow: 0 1px 0 var(--line); }
.ctab { position: relative; padding: 7px 14px; color: var(--text-3); font-size: 13.5px; font-weight: 500; display: flex; align-items: baseline; gap: 8px; border-radius: 999px; transition: color .2s, background .2s; }
.ctab:hover { color: var(--text); background: rgba(22, 24, 29, .04); }
.ctab .n { font: 500 11px/1 var(--mono); color: var(--text-4); }
.ctab.on { color: var(--text); background: var(--surface); box-shadow: var(--sh-1), 0 0 0 1px var(--line); }
.ctab.on .n { color: var(--brass); }
.cab-tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.seg { display: flex; padding: 3px; border-radius: 999px; background: var(--surface-3); }
.seg button { padding: 5px 11px; border-radius: 999px; font-size: 12px; color: var(--text-3); font-weight: 500; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--sh-1); }

.shelf-h { display: flex; align-items: baseline; gap: 12px; margin: 6px 0 14px; }
.shelf-h h3 { font: 500 19px/1 var(--serif); color: var(--text); letter-spacing: -.005em; }
.shelf-h span { color: var(--text-3); font-size: 12.5px; }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(282px, 1fr)); gap: 16px; margin-bottom: 40px; }

/* ---------------------------------------------------------------- deal cards (replace the paper folders) */
.dcard { position: relative; display: flex; flex-direction: column; text-align: left; width: 100%; min-height: 198px; padding: 16px 18px 15px; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--sh-1); transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; overflow: hidden; }
.dcard::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 2px; background: transparent; }
.dcard.k-you::before { background: linear-gradient(90deg, var(--rust), rgba(194, 85, 59, .2)); }
.dcard.k-work::before { background: linear-gradient(90deg, var(--sage), rgba(63, 138, 105, .15)); }
.dcard:hover, .dcard:focus-visible { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line-2); outline: none; }
.dcard:focus-visible { box-shadow: 0 0 0 3px var(--brass-glow), var(--sh-2); }
.dcard.opening { transform: scale(.985); opacity: .7; transition: transform .16s, opacity .16s; }
.c-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.c-eye { font: 500 10.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { flex: none; display: inline-flex; align-items: center; gap: 6px; font: 600 10.5px/1 var(--sans); padding: 5px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text-3); }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.p-you { background: var(--rust-soft); color: var(--rust-d); }
.pill.p-work { background: var(--sage-soft); color: var(--sage-d); }
.pill.p-work i { animation: blink 1.4s infinite; }
.f-name { font: 500 21px/1.12 var(--serif); letter-spacing: -.01em; color: var(--text); }
.f-meta { margin-top: 4px; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.c-next { margin-top: 12px; font-size: 13px; line-height: 1.45; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c-reason { margin-top: 12px; font: italic 400 14.5px/1.4 var(--serif); color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.c-foot { margin-top: auto; padding-top: 16px; }
.c-go { position: absolute; right: 16px; bottom: 13px; font-size: 14px; color: var(--text-4); opacity: 0; transform: translateX(-4px); transition: all .25s var(--ease); }
.dcard:hover .c-go { opacity: 1; transform: none; color: var(--brass); }
.prog { display: flex; gap: 3px; }
.prog i { flex: 1; height: 4px; border-radius: 4px; background: var(--surface-3); }
.prog i.cleared { background: var(--brass-lo); }
.prog i.waiting { background: var(--rust); }
.prog i.preparing { background: linear-gradient(90deg, var(--sage) 0 40%, rgba(63, 138, 105, .25) 40%); background-size: 200% 100%; animation: prep 1.6s linear infinite; }
.prog i.skipped { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.prog i.cur { height: 6px; margin-top: -1px; }
@keyframes prep { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.prog-l { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11.5px; color: var(--text-3); padding-right: 22px; }
.prog-l b { color: var(--text); font-weight: 600; }
.prog-l .n { font: 500 10.5px/1.4 var(--mono); color: var(--text-4); }
.dcard.passed .f-name { color: var(--text-2); }
.camp-stats { display: flex; gap: 18px; margin-top: 12px; font-size: 11px; color: var(--text-3); }
.camp-stats b { display: block; font: 500 18px/1.1 var(--serif); color: var(--text); }

/* passed: negative space */
.negative-note { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin: -6px 0 28px; }
.negative-note div { padding: 14px 16px; border-radius: 14px; border: 1px dashed var(--line-3); color: var(--text-3); font-size: 12.5px; background: rgba(255, 255, 255, .5); }
.negative-note b { display: block; font: 500 20px/1.1 var(--serif); color: var(--text); margin-bottom: 4px; }

/* ---------------------------------------------------------------- deal */
.deal { position: absolute; inset: 0; display: flex; flex-direction: column; animation: dealin .45s var(--ease) both; }
@keyframes dealin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.deal-head { padding: 18px var(--gut) 0; display: grid; grid-template-columns: 1fr auto; gap: 22px; align-items: end; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); font-size: 12.5px; font-weight: 500; padding: 4px 10px 4px 6px; margin-right: 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); transition: all .2s; }
.back:hover { color: var(--text); border-color: var(--line-2); }
.deal-title .top { display: flex; align-items: center; margin-bottom: 4px; }
.deal-title .code { font: 500 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--brass); }
.deal-title h1 { font: 400 36px/1.05 var(--serif); margin-top: 10px; letter-spacing: -.018em; }
.deal-title .facts { margin-top: 8px; color: var(--text-3); font-size: 12.5px; display: flex; gap: 0; flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
.deal-title .facts span + span::before { content: '·'; margin: 0 9px; color: var(--text-4); }
.deal-title .facts b { color: var(--text-2); font-weight: 500; }
.deal-actions { display: flex; gap: 8px; margin-bottom: 4px; }
.ghost-btn { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font-size: 12.5px; font-weight: 500; transition: all .2s; box-shadow: var(--sh-1); }
.ghost-btn:hover { color: var(--text); border-color: var(--line-3); }
.ghost-btn.sm { padding: 5px 10px; font-size: 12px; }

/* stage-name rail */
.stage-rail { margin: 20px var(--gut) 0; display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
.sr { text-align: left; padding: 8px 2px 0; border-top: 2px solid var(--line-2); color: var(--text-4); font-size: 11.5px; font-weight: 500; line-height: 1.25; transition: color .2s, border-color .2s; position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr small { display: block; font: 600 9.5px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; color: var(--text-4); }
.sr.cleared { border-color: var(--brass-lo); color: var(--text-2); }
.sr.cleared small { color: var(--brass); }
.sr.waiting { border-color: var(--rust); color: var(--text); }
.sr.waiting small { color: var(--rust); }
.sr.preparing { border-color: var(--sage); color: var(--text); }
.sr.preparing small { color: var(--sage); }
.sr.skipped { text-decoration: line-through; text-decoration-color: var(--line-3); }
.sr.focus::after { content: ''; position: absolute; left: 0; right: 0; top: -2px; height: 2px; background: var(--ink); }
.sr.focus { color: var(--text); }
.sr:hover { color: var(--text); }

/* the moving stages: one open stage, the others as slim columns */
.gates { flex: 1; min-height: 0; margin-top: 8px; display: flex; gap: 6px; padding: 14px var(--gut) 72px; overflow-x: auto; overflow-y: hidden; scroll-behavior: smooth; align-items: stretch; }
.gates::-webkit-scrollbar { height: 8px; }
.spine { flex: none; width: var(--spine); border-radius: 12px; position: relative; cursor: pointer; transition: background .25s, box-shadow .25s, transform .25s;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--sh-1); display: flex; flex-direction: column; align-items: center; padding: 12px 0 12px; }
.spine:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line-2), var(--sh-2); }
.spine .sp-name { writing-mode: vertical-rl; transform: rotate(180deg); font: 500 12.5px/1 var(--sans); letter-spacing: .01em; color: var(--text-2); margin-top: 12px; white-space: nowrap; }
.spine .sp-st { font: 500 9.5px/1 var(--mono); letter-spacing: .04em; writing-mode: vertical-rl; transform: rotate(180deg); margin-top: auto; color: var(--text-4); white-space: nowrap; }
.spine .sp-mark { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; border: 1.2px solid var(--line-3); color: var(--text-3); flex: none; }
.spine.cleared { background: var(--surface-2); }
.spine.cleared .sp-mark { border-color: var(--brass); background: var(--brass); color: #fff; }
.spine.cleared .sp-st { color: var(--brass); }
.spine.waiting { box-shadow: inset 0 0 0 1px rgba(194, 85, 59, .35), var(--sh-1); }
.spine.waiting .sp-mark { border-color: var(--rust); background: var(--rust-soft); }
.spine.waiting .sp-mark::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--rust); }
.spine.waiting .sp-st { color: var(--rust); }
.spine.preparing .sp-mark { border-color: var(--sage); border-top-color: transparent; animation: spin 1.1s linear infinite; }
.spine.preparing .sp-st { color: var(--sage); }
.spine.future { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.spine.future .sp-name { color: var(--text-4); }
.spine.future .sp-mark { border-style: dashed; border-color: var(--line-3); }
.spine.skipped { background: transparent; box-shadow: inset 0 0 0 1px var(--line); opacity: .6; }

.gate { flex: 1 1 auto; min-width: 680px; border-radius: 18px; position: relative; display: flex; flex-direction: column;
  background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--sh-3); animation: gatein .45s var(--ease) both; overflow: hidden; }
@keyframes gatein { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.gate::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--line-2); }
.gate.waiting::before { background: linear-gradient(90deg, var(--rust), #e39a7f 60%, transparent); }
.gate.cleared::before { background: linear-gradient(90deg, var(--brass), var(--brass-lo) 60%, transparent); }
.gate.preparing::before { background: linear-gradient(90deg, var(--sage), #9fd0b8 60%, transparent); }
.gate-h { display: flex; align-items: center; gap: 16px; padding: 20px 26px 16px; border-bottom: 1px solid var(--line); }
.gate-h .gnum { font: 500 10.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.gate-h h2 { font: 400 26px/1.05 var(--serif); margin-top: 7px; letter-spacing: -.012em; }
.gstatus { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; padding: 6px 11px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); }
.gstatus i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.gstatus.cleared { color: var(--brass-hi); background: var(--brass-soft); }
.gstatus.cleared i { background: var(--brass); }
.gstatus.waiting { color: var(--rust-d); background: var(--rust-soft); }
.gstatus.waiting i { background: var(--rust); box-shadow: 0 0 0 3px rgba(194, 85, 59, .16); }
.gstatus.preparing { color: var(--sage-d); background: var(--sage-soft); }
.gstatus.preparing i { background: var(--sage); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.gnav { display: flex; gap: 4px; }
.gnav button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--text-2); display: grid; place-items: center; background: var(--surface); }
.gnav button:hover { color: var(--text); border-color: var(--line-3); }

.gate-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.1fr 1fr; overflow: hidden; }
.gcol { padding: 22px 26px 24px; overflow-y: auto; min-height: 0; }
.gcol + .gcol { border-left: 1px solid var(--line); background: var(--surface-2); }
.gsec + .gsec { margin-top: 24px; }
.gsec > .eyebrow { margin-bottom: 11px; display: flex; justify-content: space-between; align-items: center; }

/* documents in a stage: crisp tiles, no paper */
.docs-stack { display: grid; gap: 8px; }
.docs-stack.two { grid-template-columns: 1fr 1fr; }
.paper-card { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; text-align: left; width: 100%; padding: 11px 12px; border-radius: 12px; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); box-shadow: var(--sh-1); transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; }
.paper-card:hover { transform: translateY(-1px); box-shadow: var(--sh-2); border-color: var(--line-2); }
.paper-card .thumb { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--slate); background: var(--slate-soft); }
.paper-card.red .thumb { color: var(--rust); background: var(--rust-soft); }
.paper-card .pt { font: 500 13.5px/1.3 var(--sans); color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.paper-card .pm { font-size: 11.5px; color: var(--text-3); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.paper-card .open { font-size: 12px; color: var(--text-4); }
.docs-stack.two .paper-card .open { display: none; }
.docs-stack.two .paper-card { grid-template-columns: 36px 1fr; }
.tagp { display: inline-block; font: 600 9.5px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; padding: 3px 6px; border-radius: 5px; margin-left: 6px; vertical-align: 1px; }
.tagp.needs-you { background: var(--rust-soft); color: var(--rust-d); }
.tagp.draft { background: var(--surface-3); color: var(--text-3); }
.tagp.final { background: var(--sage-soft); color: var(--sage-d); }

/* decision block */
.decision { border-radius: 14px; padding: 18px 18px 16px; background: linear-gradient(180deg, #fffdf9, var(--surface)); box-shadow: 0 0 0 1px rgba(163, 122, 60, .22), var(--sh-1); }
.decision .q { font: 400 21px/1.25 var(--serif); color: var(--text); letter-spacing: -.008em; }
.decision .rec { margin-top: 10px; color: var(--text-2); font-size: 13px; }
.decision .rec b { color: var(--brass-hi); font-weight: 600; }
.choice { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; margin-top: 14px; }
.ch { text-align: left; padding: 10px 12px 11px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface); transition: all .2s; position: relative; }
.ch b { display: block; font: 600 14.5px/1.1 var(--sans); }
.ch span { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 4px; line-height: 1.3; }
.ch kbd { position: absolute; top: 8px; right: 8px; margin: 0; }
.ch:hover { border-color: var(--line-3); box-shadow: var(--sh-1); }
.ch.yes { background: var(--ink); border-color: var(--ink); color: #fff; }
.ch.yes:hover { background: var(--ink-2); }
.ch.yes span { color: rgba(255, 255, 255, .68); }
.ch.yes kbd { background: transparent; color: rgba(255, 255, 255, .6); border-color: rgba(255, 255, 255, .25); }
.ch.no b { color: var(--rust-d); }
.dec-links { display: flex; gap: 14px; margin-top: 12px; font-size: 12.5px; }
.dec-links button { color: var(--text-3); font-weight: 500; }
.dec-links button:hover { color: var(--text); }
.why-box { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 13px; }
.why-box ul { margin: 8px 0 0 16px; }
.why-box li { margin: 3px 0; }
.why-box .tacit { margin-top: 10px; font: italic 400 14px/1.4 var(--serif); color: var(--brass-hi); }
.pass-row { margin-top: 12px; display: flex; gap: 8px; }
.pass-row input { flex: 1; padding: 9px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-2); outline: none; }
.pass-row input:focus { border-color: var(--brass); box-shadow: 0 0 0 3px var(--brass-glow); }
.btn-sm { padding: 8px 13px; border-radius: 9px; background: var(--surface-3); font-size: 12.5px; font-weight: 500; color: var(--text); }
.btn-sm:hover { background: #e9e8e3; }
.btn-sm.rust { background: var(--rust-soft); color: var(--rust-d); }
.cleared-card { border-radius: 14px; padding: 16px 18px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--sh-1); display: flex; gap: 14px; align-items: center; }
.seal { width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-size: 16px; background: linear-gradient(160deg, #c39a58, var(--brass)); box-shadow: 0 0 0 4px var(--brass-soft); }
.seal.muted-seal { background: var(--surface-3); color: var(--text-3); box-shadow: 0 0 0 4px var(--surface-2); }
.cleared-card .ct { font: 500 16px/1.3 var(--serif); }
.cleared-card .cm { color: var(--text-3); font-size: 12.5px; margin-top: 3px; }
.cleared-card .undo { margin-left: auto; font-size: 12px; color: var(--text-3); }
.cleared-card .undo:hover { color: var(--text); }

/* Skalia's work */
.work { display: grid; gap: 2px; }
.wk { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; font-size: 13px; color: var(--text-2); }
.wk .wi { width: 15px; height: 15px; border-radius: 50%; border: 1.2px solid var(--line-3); position: relative; }
.wk.done .wi { background: var(--sage); border-color: var(--sage); }
.wk.done .wi::after { content: ''; position: absolute; left: 4.3px; top: 1.8px; width: 3px; height: 6px; border: solid #fff; border-width: 0 1.4px 1.4px 0; transform: rotate(45deg); }
.wk.run .wi { border-color: var(--sage); border-top-color: transparent; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.wk.run { color: var(--text); }
.wk.todo { color: var(--text-4); }
.wk .wp { font: 500 10.5px/1 var(--mono); color: var(--text-4); }
.wbar { height: 3px; background: var(--surface-3); border-radius: 3px; margin-top: 10px; overflow: hidden; }
.wbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--sage-d), var(--sage)); border-radius: 3px; transition: width .5s var(--ease); }

/* history */
.hist { position: relative; padding-left: 16px; }
.hist::before { content: ''; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: var(--line-2); }
.hi { position: relative; padding: 5px 0 9px; font-size: 12.5px; color: var(--text-2); }
.hi::before { content: ''; position: absolute; left: -15.5px; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--surface); border: 1.2px solid var(--line-3); }
.hi.k-decision::before { background: var(--brass); border-color: var(--brass); }
.hi.k-phone::before, .hi.k-call::before, .hi.k-note::before { background: var(--slate); border-color: var(--slate); }
.hi .hw { font: 500 10.5px/1 var(--mono); color: var(--text-3); display: block; margin-bottom: 3px; }
.hi .hw b { color: var(--text-2); font-weight: 600; font-family: var(--sans); }
.chip-phone { display: inline-flex; align-items: center; gap: 5px; font: 500 10px/1 var(--sans); color: var(--slate); background: var(--slate-soft); padding: 3px 7px; border-radius: 999px; vertical-align: 1px; }
.note-add { display: flex; gap: 8px; margin-top: 8px; }
.note-add input { flex: 1; padding: 8px 11px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-2); outline: none; font-size: 12.5px; }
.note-add input:focus { border-color: var(--brass); box-shadow: 0 0 0 3px var(--brass-glow); }

/* clearing a gate: a quiet bar lifts */
.toll { position: absolute; left: 26px; right: 26px; top: 76px; height: 8px; z-index: 4; pointer-events: none; transform-origin: 0 50%; border-radius: 4px;
  background: repeating-linear-gradient(135deg, var(--brass) 0 10px, #f0e3c9 10px 20px); box-shadow: 0 6px 16px -6px rgba(18, 20, 26, .3); }
.toll.lift { animation: lift 1.1s var(--ease) forwards; }
@keyframes lift { 0% { transform: rotate(0); opacity: 1; } 60% { transform: rotate(-78deg); opacity: 1; } 100% { transform: rotate(-82deg); opacity: 0; } }
.gate.clearing { box-shadow: 0 0 0 1px rgba(163, 122, 60, .5), 0 0 0 6px var(--brass-glow), var(--sh-3); transition: box-shadow .6s; }
.spine.just { animation: justc 2.4s var(--ease) both; }
@keyframes justc { 0% { box-shadow: inset 0 0 0 1px var(--brass), 0 0 0 6px var(--brass-glow); background: var(--brass-soft); } 100% { box-shadow: inset 0 0 0 1px var(--line), var(--sh-1); } }
.spine.just .sp-mark { animation: sealpop .8s var(--ease) both; }
@keyframes sealpop { 0% { transform: scale(1.7); } 100% { transform: none; } }

.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kv div { padding: 11px 12px; border-radius: 11px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.kv b { display: block; font: 500 20px/1.1 var(--serif); color: var(--text); }
.kv span { font-size: 11px; color: var(--text-3); }

/* ---------------------------------------------------------------- Next up drawer (One Thing) */
.drawer { position: fixed; left: 50%; bottom: 12px; z-index: 30; width: 640px; transform: translate(-50%, calc(100% - 50px)); transition: transform .5s var(--ease); }
.drawer.open { transform: translate(-50%, 0); }
.drawer.hide { transform: translate(-50%, 130%); }
.dr-handle { width: 100%; height: 50px; display: flex; align-items: center; gap: 12px; padding: 0 18px 0 16px; border-radius: 16px; text-align: left;
  background: rgba(255, 255, 255, .86); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); box-shadow: 0 0 0 1px var(--line-2), var(--sh-3); }
.drawer.open .dr-handle { border-radius: 16px 16px 0 0; box-shadow: 0 0 0 1px var(--line-2); }
.dr-handle .pull { width: 8px; height: 8px; border-radius: 50%; background: var(--rust); box-shadow: 0 0 0 4px var(--rust-soft); flex: none; }
.dr-handle .lbl { font: 600 10.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); flex: none; }
.dr-handle .txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 500 13.5px/1 var(--sans); color: var(--text); }
.dr-handle .cnt { font: 500 11px/1 var(--mono); color: var(--text-3); flex: none; }
.dr-handle .chev { color: var(--text-3); transition: transform .4s; }
.drawer.open .dr-handle .chev { transform: rotate(180deg); }
.drawer:not(.open) .dr-body { opacity: 0; pointer-events: none; }
.dr-body { transition: opacity .25s; background: var(--surface); box-shadow: 0 0 0 1px var(--line-2), var(--sh-3); border-radius: 0 0 16px 16px; padding: 18px 22px 20px; max-height: 70vh; overflow: auto; }
.dr-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.dr-foot { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.dr-list { margin-top: 14px; display: grid; gap: 2px; }
.dr-li { display: grid; grid-template-columns: 120px 1fr auto; gap: 12px; padding: 8px 8px; border-radius: 9px; font-size: 12.5px; color: var(--text-2); text-align: left; align-items: baseline; }
.dr-li:hover { background: var(--surface-3); color: var(--text); }
.dr-li .d { font: 600 11px/1.2 var(--sans); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-li .s { font: 500 10.5px/1 var(--mono); color: var(--text-4); }

/* ---------------------------------------------------------------- overlays (focus, doc, help) */
#overlay > * { position: fixed; inset: 0; z-index: 70; }
.ov-bg { background: rgba(28, 30, 36, .28); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fade .3s both; }
@keyframes fade { from { opacity: 0; } }

/* Focus session */
.focus { background: radial-gradient(1200px 600px at 50% -10%, rgba(163, 122, 60, .1), transparent 65%), var(--bg); display: flex; flex-direction: column; animation: fade .35s both; }
.fo-top { display: flex; align-items: center; gap: 18px; padding: 18px 32px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .6); }
.fo-top .ttl { font: italic 400 18px/1 var(--serif); color: var(--brass-hi); }
.fo-top .sub { color: var(--text-3); font-size: 12.5px; }
.fo-tabs { display: flex; gap: 2px; margin-left: 24px; padding: 3px; border-radius: 999px; background: var(--surface-3); }
.fo-tabs button { padding: 6px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--text-3); }
.fo-tabs button.on { color: var(--text); background: var(--surface); box-shadow: var(--sh-1); }
.fo-tabs button .n { font: 500 10.5px/1 var(--mono); margin-left: 6px; color: var(--text-4); }
.fo-close { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 12.5px; }
.fo-close:hover { color: var(--text); }
.fo-main { flex: 1; min-height: 0; overflow: auto; display: flex; justify-content: center; padding: 10px 32px 60px; }
.fo-card { width: 760px; max-width: 100%; margin: auto 0; animation: cardin .45s var(--ease) both; background: var(--surface); border-radius: 22px; padding: 34px 38px 30px; box-shadow: 0 0 0 1px var(--line), var(--sh-3); }
@keyframes cardin { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
.fo-card.out { animation: cardout .3s var(--ease-io) forwards; }
@keyframes cardout { to { opacity: 0; transform: translateX(-36px); } }
.fo-prog { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.fo-dots { display: flex; gap: 5px; }
.fo-dots i { width: 22px; height: 3px; border-radius: 2px; background: var(--surface-3); }
.fo-dots i.d { background: var(--brass-lo); }
.fo-dots i.c { background: var(--ink); }
.fo-deal { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.fo-deal .eyebrow b { color: var(--text-2); font-weight: 600; }
.fo-q { font: 400 40px/1.12 var(--serif); letter-spacing: -.018em; }
.fo-rec { margin-top: 20px; }
.fo-rec p { font-size: 16px; color: var(--text-2); margin-top: 8px; line-height: 1.5; }
.fo-choice { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 12px; margin-top: 28px; }
.fo-choice .ch { padding: 18px; border-radius: 16px; min-height: 92px; }
.fo-choice .ch b { font: 500 22px/1.1 var(--serif); }
.fo-choice .ch span { font-size: 12.5px; margin-top: 8px; }
.fo-links { display: flex; justify-content: center; gap: 26px; margin-top: 22px; }
.fo-links button { color: var(--text-3); font-size: 13.5px; padding: 4px 2px; border-bottom: 1px solid transparent; }
.fo-links button:hover { color: var(--text); border-bottom-color: var(--line-3); }
.fo-why { margin-top: 24px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; padding-top: 22px; border-top: 1px solid var(--line); animation: fade .3s; }
.fo-why ul { list-style: none; display: grid; gap: 9px; }
.fo-why li { padding-left: 16px; position: relative; color: var(--text-2); font-size: 14px; }
.fo-why li::before { content: ''; position: absolute; left: 0; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--brass); }
.fo-why .tac { font: italic 400 16px/1.45 var(--serif); color: var(--brass-hi); }
.fo-why .cons { margin-top: 14px; font-size: 13px; color: var(--text-3); }
.fo-done { text-align: center; margin: auto; max-width: 640px; animation: cardin .5s var(--ease) both; }
.fo-done h2 { font: 400 42px/1.1 var(--serif); margin-top: 18px; letter-spacing: -.015em; }
.fo-done p { color: var(--text-2); font-size: 16px; margin-top: 12px; }
.fo-done .seal { margin: 0 auto; width: 60px; height: 60px; font-size: 22px; }
.done-list { margin-top: 30px; text-align: left; display: grid; gap: 6px; }
.done-li { display: grid; grid-template-columns: 22px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--sh-1); font-size: 13px; }
.done-li .x { font: 500 10px/1 var(--mono); padding: 3px 5px; border-radius: 4px; text-align: center; }
.done-li .x.A { background: var(--sage-soft); color: var(--sage-d); }
.done-li .x.E { background: var(--brass-soft); color: var(--brass-hi); }
.done-li .x.X { background: var(--rust-soft); color: var(--rust-d); }
.done-li .w { color: var(--text-3); font-size: 12px; }
.done-li button { color: var(--text-3); font-size: 12px; }
.done-li button:hover { color: var(--text); }
.edit-box { margin-top: 18px; animation: fade .25s; }
.edit-box textarea, .edit-box input { width: 100%; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); outline: none; resize: vertical; min-height: 54px; font-size: 14px; }
.edit-box textarea:focus, .edit-box input:focus { border-color: var(--brass); box-shadow: 0 0 0 3px var(--brass-glow); }
.edit-box .row { display: flex; gap: 8px; margin-top: 10px; justify-content: flex-end; align-items: center; }
.edit-box .row .hint { margin-right: auto; color: var(--text-3); font-size: 12px; }
.opt-list { display: grid; gap: 6px; margin-top: 12px; }
.opt { text-align: left; padding: 10px 13px; border-radius: 10px; border: 1px solid var(--line-2); font-size: 13px; color: var(--text-2); background: var(--surface); }
.opt:hover, .opt.on { border-color: var(--brass); color: var(--text); background: var(--brass-soft); }
.opt b { color: var(--text); font-weight: 600; }

/* backlog */
.backlog { width: 980px; max-width: 100%; margin: 0 auto; animation: fade .3s; }
.bl-h { display: flex; align-items: baseline; gap: 16px; margin: 10px 0 22px; }
.bl-h h2 { font: 400 32px/1 var(--serif); letter-spacing: -.015em; }
.bl-h .seg { margin-left: auto; }
.bl-group { margin-bottom: 22px; }
.bl-group h4 { font: 600 10.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; display: flex; gap: 10px; }
.bl-group h4 b { color: var(--text-2); font-weight: 600; }
.bl-row { display: grid; grid-template-columns: 8px 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 12px; transition: background .2s, box-shadow .2s; }
.bl-row:hover { background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--sh-1); }
.bl-row .pr { width: 7px; height: 7px; border-radius: 50%; background: var(--text-4); }
.bl-row .pr.p1 { background: var(--rust); }
.bl-row .pr.p2 { background: var(--amber); }
.bl-row .pr.p3 { background: var(--brass-lo); }
.bl-row .t { font: 500 14.5px/1.35 var(--sans); color: var(--text); }
.bl-row .m { font-size: 12px; color: var(--text-3); margin-top: 3px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bl-row .acts { display: flex; gap: 4px; opacity: .6; transition: opacity .2s; }
.bl-row:hover .acts { opacity: 1; }
.bl-row .acts button { padding: 6px 10px; border-radius: 8px; font-size: 12px; color: var(--text-2); }
.bl-row .acts button:hover { background: var(--surface-3); color: var(--text); }
.bl-row .acts button.go { color: var(--brass-hi); font-weight: 600; }
.tag-s { font: 500 10px/1 var(--sans); padding: 3px 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-3); }
.tag-s.snz { color: var(--brass-hi); background: var(--brass-soft); }
.tag-s.prop { color: var(--violet); background: #efecf7; }

/* ---------------------------------------------------------------- Ask Skalia panel */
.ask { position: fixed; top: calc(var(--bar-h) + 10px); right: 10px; bottom: 10px; width: 440px; z-index: 50; border-radius: 18px; display: flex; flex-direction: column;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 0 0 1px var(--line-2), var(--sh-3); animation: askin .4s var(--ease) both; }
@keyframes askin { from { opacity: 0; transform: translateX(26px); } }
.ask-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px 14px; border-bottom: 1px solid var(--line); }
.ask-h .t { font: 500 18px/1 var(--serif); }
.ask-h .ctx { font-size: 11.5px; color: var(--text-2); padding: 4px 9px; border-radius: 999px; background: var(--surface-3); }
.ask-h .x { margin-left: auto; color: var(--text-3); padding: 4px; }
.ask-h .x:hover { color: var(--text); }
.ask-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 18px; }
.msg-me { align-self: flex-end; max-width: 85%; padding: 10px 14px; border-radius: 16px 16px 4px 16px; background: var(--ink); color: #fff; font-size: 13.5px; }
.msg-sk { font: 400 14px/1.6 var(--sans); color: var(--text); }
.msg-sk .who { font: 600 10px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--brass); margin-bottom: 7px; display: block; }
.cites { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cite { font: 500 11px/1 var(--sans); padding: 6px 9px; border-radius: 999px; background: var(--brass-soft); color: var(--brass-hi); display: inline-flex; gap: 6px; align-items: center; }
.cite:hover { background: #efe3cc; }
.cite i { font-style: normal; color: var(--text-3); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.proposal { margin-top: 12px; padding: 12px 14px; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(122, 104, 176, .25); background: #f6f4fb; font: 13px/1.45 var(--sans); color: var(--text-2); }
.proposal b { color: var(--text); font-weight: 600; }
.proposal .row { display: flex; gap: 8px; margin-top: 10px; }
.ask-sugg { display: grid; gap: 6px; }
.ask-sugg button { text-align: left; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; color: var(--text-2); }
.ask-sugg button:hover { color: var(--text); border-color: var(--line-3); }
.ask-in { padding: 12px; border-top: 1px solid var(--line); }
.ask-in form { display: flex; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--sh-1); }
.ask-in form:focus-within { border-color: var(--brass); box-shadow: 0 0 0 3px var(--brass-glow); }
.ask-in input { flex: 1; background: none; border: 0; outline: none; font-size: 14px; }
.ask-in button { padding: 7px 12px; border-radius: 9px; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 500; }
.caret::after { content: '▍'; color: var(--brass); animation: blink .9s infinite; margin-left: 1px; }

/* ---------------------------------------------------------------- Document module */
.docm { background: var(--bg); display: grid; grid-template-rows: auto 1fr; animation: fade .35s both; }
.dm-top { display: flex; align-items: center; gap: 14px; padding: 14px 24px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .8); }
.dm-top .t { font: 500 18px/1 var(--serif); }
.dm-top .m { color: var(--text-3); font-size: 12px; }
.dm-top .r { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.dm-grid { display: grid; grid-template-columns: 250px 1fr 340px; min-height: 0; }
.dm-toc { border-right: 1px solid var(--line); padding: 22px 14px 22px 22px; overflow-y: auto; }
.dm-toc .eyebrow { margin-bottom: 12px; }
.toc-i { display: flex; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 9px; font-size: 13px; color: var(--text-2); align-items: baseline; }
.toc-i:hover { background: rgba(22, 24, 29, .04); color: var(--text); }
.toc-i.on { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--line), var(--sh-1); }
.toc-i .no { font: 500 10.5px/1 var(--mono); color: var(--text-4); width: 18px; flex: none; }
.toc-i .vo { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--rust); flex: none; align-self: center; }
.toc-i .vo.ok { background: var(--sage); }
.dm-desk { overflow-y: auto; padding: 32px 40px 100px; }
.sheet { width: 720px; max-width: 100%; margin: 0 auto; background: var(--paper); color: var(--paper-ink); border-radius: 14px; padding: 60px 68px 76px; box-shadow: 0 0 0 1px var(--line), var(--sh-3); position: relative; }
.sheet .s-eyebrow { font: 600 10px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--paper-ink-2); display: flex; justify-content: space-between; }
.sheet h1 { font: 400 34px/1.1 var(--serif); margin: 24px 0 8px; letter-spacing: -.015em; }
.sheet .s-sub { font: italic 400 16px/1.4 var(--serif); color: var(--paper-ink-2); padding-bottom: 24px; border-bottom: 1px solid var(--paper-line); }
.sheet section { padding: 24px 0 4px; scroll-margin-top: 30px; position: relative; }
.sheet h2 { font: 500 19px/1.25 var(--serif); margin-bottom: 10px; display: flex; gap: 12px; align-items: baseline; }
.sheet h2 .no { font: 500 11px/1 var(--mono); color: var(--paper-ink-2); }
.sheet p { font: 400 16px/1.65 var(--serif); margin-bottom: 12px; color: #2a2c31; }
.sheet section.on h2 { color: #000; }
.sheet .voice { margin: 6px -18px 10px; padding: 14px 18px 16px; border-radius: 12px; background: var(--rust-soft); box-shadow: inset 3px 0 0 var(--rust); }
.sheet .voice.ok { background: var(--sage-soft); box-shadow: inset 3px 0 0 var(--sage); }
.sheet .voice .vl { font: 600 9.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--rust-d); margin-bottom: 9px; }
.sheet .voice.ok .vl { color: var(--sage-d); }
.sheet .voice textarea { width: 100%; min-height: 64px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; color: var(--paper-ink); font: 400 15px/1.5 var(--serif); outline: none; resize: vertical; }
.sheet .voice textarea:focus { border-color: var(--rust); }
.sheet .voice .vrow { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.sheet .voice .vrow span { font-size: 11.5px; color: var(--paper-ink-2); margin-right: auto; font-family: var(--sans); }
.pbtn { padding: 7px 12px; border-radius: 8px; font: 500 12px/1 var(--sans); background: var(--ink); color: #fff; }
.pbtn:hover { background: var(--ink-2); }
.pbtn.lite { background: var(--surface-3); color: var(--paper-ink); }
.sheet .rough { font: 400 13px/1.4 var(--sans); color: var(--paper-ink-2); margin-top: 8px; }
.sheet ins { text-decoration: none; background: var(--sage-soft); color: var(--sage-d); border-bottom: 1px solid rgba(63, 138, 105, .45); }
.sheet del { color: var(--rust-d); text-decoration-color: rgba(194, 85, 59, .7); }
.chg { position: relative; }
.chg-tools { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: 1px; }
.chg-tools button { font: 600 10px/1 var(--sans); padding: 3px 6px; border-radius: 5px; background: var(--surface-3); color: var(--paper-ink-2); }
.chg-tools button:hover { background: #e7e6e1; color: var(--paper-ink); }
.chg.accepted del, .chg.rejected ins { display: none; }
.chg.accepted ins, .chg.rejected del { background: none; border: 0; color: inherit; text-decoration: none; }
.chg.accepted .chg-tools, .chg.rejected .chg-tools { display: none; }
.chg-note { display: block; font: 400 12px/1.4 var(--sans); color: var(--paper-ink-2); margin: 4px 0 0; }
.sheet table { width: 100%; border-collapse: collapse; margin: 10px 0 16px; font: 13px/1.4 var(--sans); }
.sheet th { text-align: left; font: 600 10px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--paper-ink-2); padding: 8px; border-bottom: 1px solid var(--paper-line); }
.sheet td { padding: 8px; border-bottom: 1px solid var(--paper-line); }
.sheet td.n, .sheet th.n { text-align: right; font-variant-numeric: tabular-nums; }
.dm-side { border-left: 1px solid var(--line); overflow-y: auto; padding: 22px 22px 40px; }
.dm-side .gsec + .gsec { margin-top: 24px; }
.sk-note { padding: 12px 14px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; color: var(--text-2); }
.gcol + .gcol .sk-note { background: var(--surface); }
.sk-note + .sk-note { margin-top: 8px; }
.sk-note b { color: var(--text); font-weight: 600; }
.src { display: flex; gap: 10px; padding: 7px 0; font-size: 12.5px; color: var(--text-2); border-bottom: 1px solid var(--line); text-align: left; }
.src i { font: 500 10px/1.6 var(--mono); color: var(--text-4); font-style: normal; flex: none; }

/* ---------------------------------------------------------------- Reports */
.rp-head { display: flex; align-items: end; gap: 24px; margin-bottom: 20px; }
.rp-head h1 { font: 400 40px/1.05 var(--serif); letter-spacing: -.018em; }
.rp-head p { color: var(--text-2); font: 400 15px/1.5 var(--sans); margin-top: 8px; }
.rp-head .r { margin-left: auto; display: flex; gap: 8px; }
.rp-tabs { display: inline-flex; gap: 2px; margin-bottom: 18px; padding: 3px; border-radius: 999px; background: var(--surface-3); }
.rp-tabs button { padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--text-3); }
.rp-tabs button.on { color: var(--text); background: var(--surface); box-shadow: var(--sh-1); }
.report { background: var(--surface); color: var(--paper-ink); border-radius: 18px; padding: 36px 40px 42px; box-shadow: 0 0 0 1px var(--line), var(--sh-2); }
.report .r-h { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 1px solid var(--line-3); padding-bottom: 14px; margin-bottom: 6px; }
.report h2 { font: 400 25px/1.1 var(--serif); }
.report .r-h span { font: 600 10.5px/1.4 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--paper-ink-2); text-align: right; }
.report table { width: 100%; border-collapse: collapse; font: 12.5px/1.35 var(--sans); }
.report th { text-align: left; font: 600 9.5px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--paper-ink-2); padding: 12px 10px 9px; border-bottom: 1px solid var(--paper-line); cursor: pointer; white-space: nowrap; }
.report th:hover { color: var(--paper-ink); }
.report td { padding: 10px; border-bottom: 1px solid var(--paper-line); vertical-align: top; }
.report td.n, .report th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.report td:nth-child(6) { white-space: nowrap; }
.report tr:hover td { background: var(--surface-2); }
.report td .nm { font: 600 13.5px/1.25 var(--sans); }
.report td .sm { font-size: 11px; color: var(--paper-ink-2); }
.report tfoot td { font-weight: 600; border-top: 1px solid var(--line-3); border-bottom: 0; }
.report .r-note { margin-top: 18px; font-size: 11.5px; color: var(--paper-ink-2); }
.pill-st { font: 600 9.5px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; padding: 4px 6px; border-radius: 5px; background: var(--surface-3); color: var(--paper-ink-2); white-space: nowrap; }
.pill-st.you { background: var(--rust-soft); color: var(--rust-d); }
.pill-st.work { background: var(--sage-soft); color: var(--sage-d); }
.r-rail { display: flex; gap: 2px; width: 120px; margin-top: 4px; }
.r-rail i { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-3); }
.r-rail i.cleared { background: var(--brass-lo); }
.r-rail i.waiting { background: var(--rust); }
.r-rail i.preparing { background: var(--sage); }
.best { background: var(--sage-soft); }

/* ---------------------------------------------------------------- popovers, help, toasts */
.pop { position: fixed; z-index: 55; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line-2), var(--sh-3); animation: fade .2s; }
.phone-pop { top: calc(var(--bar-h) + 6px); right: 70px; width: 370px; padding: 16px 16px 12px; }
.pp-li { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); text-align: left; width: 100%; }
.pp-li .w { font: 500 10.5px/1 var(--mono); color: var(--text-4); }
.pp-li:hover { color: var(--text); }
.help { display: grid; place-items: center; }
.help-card { width: 640px; border-radius: 20px; padding: 28px 30px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--sh-3); position: relative; animation: cardin .35s var(--ease); }
.help-card h3 { font: 400 26px/1 var(--serif); margin-bottom: 18px; }
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 30px; }
.help-grid div { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.help-grid kbd { margin: 0 0 0 4px; }
.help-foot { margin-top: 22px; display: flex; gap: 10px; align-items: center; }
.help-foot p { color: var(--text-3); font-size: 12px; margin-right: auto; }
#toasts { position: fixed; bottom: 78px; right: 22px; z-index: 90; display: grid; gap: 8px; justify-items: end; }
.toast { max-width: 380px; padding: 11px 16px; border-radius: 14px; background: var(--ink); color: #f4f4f2; font-size: 13px; box-shadow: var(--sh-3); animation: toastin .35s var(--ease) both; display: flex; gap: 12px; align-items: center; }
.toast span[style] { color: rgba(255, 255, 255, .6) !important; }
.toast.out { animation: toastout .3s forwards; }
.toast button { color: #e2bf7c; font-size: 12.5px; flex: none; font-weight: 500; }
.toast .ti { width: 6px; height: 6px; border-radius: 50%; background: #e2bf7c; flex: none; }
@keyframes toastin { from { opacity: 0; transform: translateY(10px); } }
@keyframes toastout { to { opacity: 0; transform: translateY(6px); } }

/* ---------------------------------------------------------------- ledger */
.ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; margin-bottom: 40px; padding: 6px 18px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--sh-1); }
.lg-row { display: grid; grid-template-columns: 96px 150px 1fr; gap: 12px; text-align: left; padding: 11px 4px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); align-items: baseline; }
.lg-row:nth-child(-n+2) { border-top: 0; }
.lg-row:hover { color: var(--text); }
.lg-at { font: 500 10.5px/1.3 var(--mono); color: var(--text-4); }
.lg-d { font: 600 12.5px/1.25 var(--sans); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-t { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lg-w { display: none; }

/* decision inside narrow side panels */
.dm-side .choice, .dr-side .choice { grid-template-columns: 1fr; gap: 6px; }
.dm-side .ch { display: flex; align-items: baseline; gap: 10px; padding: 9px 40px 9px 12px; }
.dm-side .ch span { margin-top: 0; }
.dm-side .dec-links span { display: none; }
.dm-side .decision .q { font-size: 19px; }

/* ---------------------------------------------------------------- smaller laptop */
@media (max-width: 1340px) {
  :root { --gut: 28px; --spine: 42px; }
  .hello h1 { font-size: 38px; }
  .sess { width: 150px; }
  .askbtn { min-width: 0; }
  .gate { min-width: 620px; }
  .fo-q { font-size: 34px; }
  .dm-grid { grid-template-columns: 220px 1fr 300px; }
  .sheet { padding: 50px 52px 66px; }
  .shelf { grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); gap: 14px; }
  .lg-row { grid-template-columns: 88px 120px 1fr; }
  .spine .sp-name { font-size: 12px; }
}
@media (max-height: 820px) {
  .stage-rail { margin-top: 14px; }
  .deal-head { padding-top: 14px; }
  .deal-title h1 { font-size: 32px; }
  .gates { padding-top: 10px; }
}

/* ---------------------------------------------------------------- print (reports) */
@media print {
  body { background: #fff; overflow: visible; }
  #bar, .lamp, #drawer, #ask, #toasts, .rp-head .r, .rp-tabs, #sk-pill { display: none !important; }
  #view { position: static; overflow: visible; }
  .page { padding: 0; max-width: none; animation: none; }
  .report { box-shadow: none; padding: 0; background: #fff; }
}
