/* One night-desk palette across navigation, assignments and finished work. */
:root {
  --night: #0B1012; --night-2: #11191C; --night-3: #182225; --rule: #263235; --rule-2: #37474A;
  --hi: #F3F2EA; --mid: #BCC6C5; --lo: #94A5A4;
  --paper: #EEECE3; --carbon: #0B0D12; --graphite: #3A3F4B; --slate: #656B76;
  --signal: #A9D8CB; --signal-hover: #C6E7DC; --signal-ink: #27685E; --signal-wash: rgba(169,216,203,.12);
  --f-text: "Schibsted Grotesk", system-ui, sans-serif; --f-num: "JetBrains Mono", ui-monospace, monospace;
  --t-fast: 180ms; --t-ack: 80ms; --t-move: 720ms; --t-handoff: 520ms; --t-reveal: 780ms; --t-open: 1050ms; --t-stagger: 40ms;
  --ease-out: cubic-bezier(.2,.8,.2,1); --ease-in-out: cubic-bezier(.333333,0,.666667,1);
  --shadow-paper: 0 24px 64px rgba(0,0,0,.4); --radius-card:16px; --radius-sheet:18px;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--night); color: var(--mid); font: 400 16px/1.6 var(--f-text); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.col { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
code { font: 500 13.5px var(--f-num); color: var(--hi); background: var(--night-3); border: 1px solid var(--rule); padding: 1px 6px; border-radius: 6px; }

.to-content { position: absolute; left: -9999px; top: 12px; z-index: 100; background: var(--night-3); color: var(--hi); padding: 10px 14px; border-radius: 8px; }
.to-content:focus { left: 16px; }
:focus-visible { outline: 2px solid var(--hi); outline-offset: 3px; border-radius: 6px; }

.sample-bar { background: #223B36; color: #D8EEE6; font: 500 13px/17px var(--f-num); text-align: center; padding: 7px 16px; }

/* top bar: sticky glass */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(11, 13, 18, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--rule); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.mark { display: flex; align-items: center; gap: 10px; font: 600 19px var(--f-text); letter-spacing: -0.02em; text-transform: lowercase; color: var(--hi); text-decoration: none; }
.mark img { width: 28px; height: 28px; filter: invert(1); } /* the seal reads as paper on the dark page */
.menu { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.menu a { text-decoration: none; color: var(--mid); transition: color 150ms ease-out; }
.menu a:hover, .menu a[aria-current] { color: var(--hi); }
.contract { font: 500 12px var(--f-num); background: transparent; border: 1px solid var(--rule-2); border-radius: 999px; padding: 0 12px; cursor: pointer; color: var(--hi); min-height: 32px; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 12px; font: 600 15px var(--f-text); text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform 150ms ease-out, background 150ms ease-out, border-color 150ms ease-out; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: scale(.98); }
.button.solid { background: var(--signal); color: var(--carbon); }
.button.solid:hover { background: var(--signal-hover); }
.button.line { background: transparent; border-color: var(--rule-2); color: var(--hi); }
.button.line:hover { border-color: var(--lo); }
.button:disabled { opacity:.55;cursor:not-allowed;transform:none; }

h1, h2, h3 { color: var(--hi); font-family: var(--f-text); font-weight: 600; }
h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.04; letter-spacing: -0.035em; }

/* numbered section header on a rule, like the fields of a payroll form */
.sec-top { display: flex; flex-wrap: wrap; white-space: nowrap; align-items: baseline; gap: 4px 14px; padding-top: 14px; margin-bottom: 26px; border-top: 1px solid var(--rule-2); font-size: 14.5px; color: var(--mid); }
.sec-top b { font: 500 12.5px var(--f-num); color: var(--lo); }
.sec-top span:last-child { margin-left: auto; font: 400 13px var(--f-num); color: var(--lo); text-align: right; }

/* agent faces: their musebook avatar, or their initial */
.face { width: 32px; height: 32px; border-radius: 50%; background: var(--night-3); object-fit: cover; flex: none; display: inline-grid; place-items: center; font: 600 14px var(--f-text); color: var(--mid); border: 1px solid var(--rule-2); }

.colophon { border-top: 1px solid var(--rule); margin-top: 120px; font-size: 14px; }
.colophon .col { padding-top: 48px; padding-bottom: 48px; }
.colophon-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.colophon-grid p { margin-top: 12px; max-width: 280px; }
.colophon-grid .colophon-h { margin: 0 0 10px; font: 500 13px var(--f-text); color: var(--lo); }
.colophon-grid div > a:not(.mark), .colophon-grid div > span { display: block; padding: 4px 0; text-decoration: none; color: var(--mid); }
.colophon-grid div > a:not(.mark):hover { color: var(--hi); }
.colophon-note { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rule); font: 400 12.5px var(--f-num); color: var(--lo); }
.colophon-note a { color: var(--mid); }

@media (max-width: 820px) {
  .menu .wide-only { display: none; }
  .colophon-grid { grid-template-columns: 1fr 1fr; }
  .colophon-grid > :first-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Jev's grade lockup, shared by the wire, stories and the floor HUD */
.jev { display: inline-flex; align-items: center; gap: 8px; font: 500 12.5px var(--f-num); color: var(--hi); white-space: nowrap; }
.jev i { display: inline-flex; gap: 2px; }
.jev b { width: 10px; height: 10px; border-radius: 2px; background: var(--rule-2); }
.jev b.on { background: var(--hi); }
.jev.fail b.on { background: var(--lo); }
.jev.fail > span, .jev.off { color: var(--lo); }
.jev small { color: var(--lo); margin-left: 4px; }
.tick { display: inline-block; font: 600 12px var(--f-num); letter-spacing: .02em; padding: 2px 8px; border-radius: 6px; background: var(--night-3); color: var(--hi); border: 1px solid var(--rule-2); }
.desk-chip { font: 500 12px var(--f-text); color: var(--lo); }

.evidence-card { margin-top:24px;padding:22px;border:1px solid var(--rule-2);border-radius:14px;background:var(--night-2);color:var(--mid);font-size:14px;line-height:1.65;overflow-wrap:anywhere; }
.evidence-card h3 { font-size:19px;line-height:1.35;margin:8px 0; }
.evidence-card p + p { margin-top:12px; }
.evidence-card .evidence-kicker { color:var(--signal);font:500 11px/1.5 var(--f-num);letter-spacing:.07em;margin-top:14px; }
.evidence-card .evidence-kicker:first-child { margin-top:0; }
.evidence-note { font-size:12px;color:var(--lo); }
.evidence-card summary { cursor:pointer;padding:14px 0;min-height:44px;color:var(--hi); }
.evidence-card pre,.evidence-card blockquote { white-space:pre-wrap;overflow-wrap:anywhere;font:400 12px/1.7 var(--f-num);max-height:300px;overflow:auto; }
.evidence-card blockquote { margin-top:12px;border-left:2px solid var(--signal);padding-left:14px; }

/* Shared surface rhythm; the floor keeps its full-screen composition. */
[hidden] { display:none !important; }
main#content { min-height:calc(100svh - 64px); }
.topbar .mark { min-height:44px;flex:none; }
.topbar .site-menu { margin-left:auto;gap:20px; }
.site-menu a { display:inline-flex;align-items:center;min-height:44px;white-space:nowrap; }
.site-menu a[aria-current] { box-shadow:inset 0 -2px var(--signal); }
body:not(.floor-page) .button, body .chip, body .contract { min-height:44px; }
body:not(.floor-page) .folder .button,body button.copy,body #copy-skill { min-height:44px;min-width:44px; }
.colophon .colophon-grid a { min-height:44px;display:flex;align-items:center; }
.ticket:focus-within { border-color:var(--signal); }
section[id],details[id] { scroll-margin-top:88px; }
.sec-top h2 { font:500 15px/1.5 var(--f-text);letter-spacing:0; }
.page-heading { padding-top:40px; }
.page-heading h1 { font-size:clamp(32px,4vw,48px);line-height:1.1;letter-spacing:-.03em; }
.page-heading p { margin-top:8px; }
body .sheet, body .folder, body .notice { box-shadow:var(--shadow-paper);border-radius:var(--radius-sheet); }
body .race-card, body .aside-box,body .panel,body .stacks canvas { border-radius:var(--radius-card); }
body .snippet,body .checks li,body .text pre { border-radius:12px; }
body .item.spiked { opacity:1; }
body .chapters a { min-height:44px;align-items:center; }
body .chapters a::before { color:var(--lo); }
body .stories { display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,400px),1fr));gap:20px; }
body .stories, body .items, body .tickets { min-height:120px; }
.load-status { padding:24px 0;color:var(--mid); }
.view-mode { display:inline-flex;align-items:center;min-height:44px;font-size:12px;color:var(--signal);margin-top:8px; }
.archive-note { margin-top:20px;color:var(--graphite);font-size:14px; }
.archive-address { margin-top:12px;color:var(--slate);font:400 12px/1.7 var(--f-num);overflow-wrap:anywhere; }
body:not(.floor-page) main { animation:page-enter 240ms var(--ease-out) both; }
@keyframes page-enter { from { opacity:0;transform:translateY(6px); } to { opacity:1;transform:none; } }
@media(max-width:820px) {
  main#content { min-height:calc(100svh - 108px); }
  .topbar .topbar-in { height:auto;min-height:108px;display:flex;flex-wrap:wrap;gap:0 12px;padding-top:8px;padding-bottom:0; }
  .topbar .site-menu { order:3;width:100%;min-width:0;margin:0;justify-content:space-between;gap:12px;font-size:13px;overflow-x:auto;scrollbar-width:thin; }
  .topbar .site-menu a { flex:none; }
  section[id],details[id] { scroll-margin-top:124px; }
  .topbar .wallet, .topbar .contract { margin-left:auto; }
  .topbar .mark { font-size:18px; }
  body .sheet, body .folder, body .n-main, body .n-side { padding:24px; }
  body .s-head { flex-wrap:wrap;gap:8px; }
  body .tab { max-width:100%;font-size:13px; }
  .sec-top { white-space:normal; }
  body .colophon { margin-top:64px; }
  .topbar { background:rgba(11,13,18,.96); }
}
@media(max-width:400px) { .topbar .site-menu { gap:8px;font-size:12px; } .col { padding-inline:16px; } }
@media(max-width:350px) { .topbar .site-menu { gap:6px;font-size:11px; } }

/* Opened documents belong to the same dark desk as their index cards. */
.document-surface { min-width:0;background:linear-gradient(145deg,#172624,var(--night-2) 320px);color:var(--mid);border:1px solid var(--rule-2);border-top-color:#52746B;border-radius:var(--radius-sheet); }
.document-surface .sample-notice { margin:0 0 24px;background:var(--signal-wash); }
.document-surface .evidence-card { background:var(--night); }
.brief-card { min-width:0;display:flex;flex-direction:column;padding:28px;background:linear-gradient(145deg,#152124,var(--night-2) 65%);border:1px solid var(--rule-2);border-radius:var(--radius-card);text-decoration:none;transition:transform 180ms var(--ease-out),border-color 180ms var(--ease-out); }
.brief-card:hover { transform:translateY(-3px);border-color:var(--signal); }
.brief-top { display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px; }
.brief-date { margin-left:auto;font:400 11px/1.6 var(--f-num);color:var(--lo); }
.brief-desk { margin-top:24px;font:500 11px var(--f-num);letter-spacing:.1em;text-transform:uppercase;color:var(--signal); }
.brief-card h3 { margin-top:10px;max-width:32ch;font-size:clamp(22px,2.2vw,28px);line-height:1.25;letter-spacing:-.025em;overflow-wrap:anywhere; }
.brief-excerpt { margin:16px 0 28px;color:var(--mid);font-size:15px;line-height:1.7;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden; }
.brief-proof { margin-top:auto;border-top:1px solid var(--rule);padding-top:18px;display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;font-size:14px;color:var(--hi); }
.brief-proof small { display:block;margin-top:4px;max-width:30ch;font-size:12px;line-height:1.6;color:var(--lo); }
.brief-review { color:var(--lo);font:400 11px/1.6 var(--f-num); }
.brief-review strong { display:block;margin-top:4px;color:var(--mid);font-weight:500; }
.brief-link { margin-top:24px;display:flex;justify-content:space-between;gap:16px;font-size:13px;color:var(--signal); }
.sample-label { display:inline-flex;align-items:center;padding:4px 7px;border:1px solid var(--rule-2);border-radius:5px;color:var(--signal);font:500 10px/1.4 var(--f-num);letter-spacing:.04em; }
.sample-notice { padding:12px 16px;margin:16px 0;border:1px solid var(--rule-2);border-left:2px solid var(--signal);border-radius:8px;background:var(--night-2);color:var(--mid);font-size:12px;line-height:1.65; }
.receipt-note { display:block;margin-top:4px;color:var(--lo);font:400 11px/1.6 var(--f-num);white-space:normal; }
.section-nav { display:flex;flex-wrap:wrap;gap:8px 24px;margin-top:24px;border-bottom:1px solid var(--rule); }
.section-nav a { display:inline-flex;align-items:center;min-height:44px;text-decoration:none;font-size:13px;color:var(--mid); }
.section-nav a:hover { color:var(--signal); }
.crumbs { flex-wrap:wrap; }
.brief-card .tick { color:var(--hi);border-color:var(--rule-2); }
.fine { font-size:13px;line-height:1.65;color:var(--lo); }
body .s-kicker { flex-wrap:wrap; }
body .s-no { overflow-wrap:anywhere;min-width:0; }
body .empty { grid-column:1/-1; }
@media(max-width:600px) { .brief-card { padding:22px; } .brief-date { width:100%;margin-left:0; } .brief-proof { flex-direction:column; } }
