/* =============================================================================
   night-desk.css - Argus Accounting's look.

   Two layers:
     1. NIGHT DESK, the core shared with Argus Sales: the near-black desk with
        a blue glow top-left, a brass glow top-right and the 14px pinstripe,
        glass panels, brass actions, steel accents, Inter Tight with thin
        tabular numerals.
     2. ACCOUNTING'S MARKET LAYER, from the approved mock-ups (2026-10-22):
        the finance tape, quote tiles, the hero card with its range bar, mint
        up / coral down - ALWAYS with ▲▼, never colour alone - dense tables with
        mono header labels and negatives in parentheses.

   PAPER is the light reading and printing surface: data-surface="paper" on
   any element turns everything inside it into ink on a white sheet, and
   @media print always prints Paper.

   Every component reads the semantic tokens (--text, --panel, --line ...), so
   the Paper scope only has to redefine those. Colour values are copied from
   the mock-ups exactly; do not "tidy" them.
   ============================================================================= */

/* ── fonts: self-hosted (CSP font-src 'self'), latin subset, see fonts/FONTS.md ── */
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 200; font-display: swap;
  src: url('fonts/inter-tight-latin-200-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 300; font-display: swap;
  src: url('fonts/inter-tight-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/inter-tight-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('fonts/inter-tight-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('fonts/inter-tight-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); }

/* ── tokens ─────────────────────────────────────────────────────────────────── */
:root {
  color-scheme: dark;

  /* Night Desk core (shared with Argus Sales) */
  --nd-base: #0E1013;
  --nd-text: #EEF0F4;
  --nd-muted: #9198A6;
  --nd-soft: #AEB4C2;
  --nd-soft-2: #D3D7E0;
  --nd-brass: #D8BC82;
  --nd-brass-deep: #C9A45C;
  --nd-brass-tint: #E8D3A8;
  --nd-ink: #0E1013;
  --nd-steel: #4A6EAA;
  --nd-steel-hi: #6E93D6;
  --nd-steel-tint: #B7C9EE;
  --nd-glass: rgba(255,255,255,0.045);
  --nd-glass-rail: rgba(255,255,255,0.05);
  --nd-line: rgba(255,255,255,0.10);
  --nd-line-strong: rgba(255,255,255,0.12);
  --nd-line-soft: rgba(255,255,255,0.07);
  --nd-row: rgba(255,255,255,0.06);
  --nd-pop: #1C1F25;
  --nd-sheet: #171A20;
  --nd-bar: rgba(28,31,37,0.92);
  --nd-glow-blue: rgba(74,110,170,0.28);
  --nd-glow-brass: rgba(201,164,92,0.15);
  --nd-glow-mint: rgba(47,163,138,0.08);
  --nd-pinstripe: repeating-linear-gradient(90deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 14px);
  --nd-active: linear-gradient(135deg, #4A6EAA, #C9A45C);

  /* Accounting's market layer */
  --up: #2FA38A;          /* mint: candles, dots */
  --up-text: #9FE3D2;     /* mint text tint on chips */
  --up-tape: #5FCDB4;     /* mint on the tape */
  --up-bg: rgba(47,163,138,0.16);
  --down: #DE7148;        /* coral */
  --down-text: #F5B39A;
  --down-tape: #F0906C;
  --down-bg: rgba(222,113,72,0.16);
  --warn: #F0B866;        /* amber */
  --warn-text: #F5CF95;
  --warn-bg: rgba(240,184,102,0.16);
  --flat-bg: rgba(255,255,255,0.08);
  --flat-text: #AEB4C2;
  --chart-gold: #B98A35;
  --chart-steel: #6E93D6;

  /* Argus brand (DESIGN.md) - navy is for actions on light surfaces */
  --argus-navy: #1F2747;
  --argus-dark: #1F2937;

  /* Paper */
  --paper-sheet: #FFFFFF;
  --paper-edge: #E3E6EC;
  --paper-ink: #1F2937;
  --paper-head: #1F2747;
  --paper-muted: #5B6272;
  --paper-rule: #DADDE4;
  --paper-strong: #1F2747;
  --paper-accent: #8A6A2E;

  /* type */
  --font-sans: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  /* radii */
  --r-panel: 30px;
  --r-tile: 26px;
  --r-card: 24px;
  --r-field: 16px;
  --r-pill: 999px;

  /* ── semantic tokens: components read only these ── */
  --text: var(--nd-text);
  --heading: var(--nd-text);
  --muted: var(--nd-muted);
  --soft: var(--nd-soft);
  --soft-2: var(--nd-soft-2);
  --accent: var(--nd-brass);          /* links */
  --accent-hover: #FFFFFF;
  --panel: var(--nd-glass);
  --line: var(--nd-line);
  --line-strong: var(--nd-line-strong);
  --line-soft: var(--nd-line-soft);
  --row-line: var(--nd-row);
  --btn-primary-bg: var(--nd-brass);
  --btn-primary-ink: var(--nd-ink);
  --btn-line: rgba(255,255,255,0.16);
  --seg-bg: rgba(255,255,255,0.05);
  --seg-on-bg: #EEF0F4;
  --seg-on-ink: #0E1013;
  --seg-off-ink: var(--nd-soft);
  --chip-bg: rgba(14,16,19,0.35);
  --hero-bg: linear-gradient(160deg, rgba(74,110,170,0.30), rgba(201,164,92,0.12));
  --hero-line: rgba(216,188,130,0.28);
  --pill-bg: rgba(255,255,255,0.08);
  --pill-ink: #AEB4C2;
  --pill-brass-bg: rgba(216,188,130,0.18);
  --pill-brass-ink: #E8D3A8;
  --pill-steel-bg: rgba(110,147,214,0.18);
  --pill-steel-ink: #B7C9EE;
  --pill-mint-bg: rgba(47,163,138,0.18);
  --pill-mint-ink: #9FE3D2;
  --pill-amber-bg: rgba(240,184,102,0.16);
  --pill-amber-ink: #F5CF95;
  --pill-coral-bg: rgba(222,113,72,0.16);
  --pill-coral-ink: #F5B39A;
  --input-bg: rgba(255,255,255,0.05);
  --input-line: rgba(255,255,255,0.18);
  --focus: #D8BC82;
  --neg-text: inherit;
}

/* ── Paper: ink on a white sheet. Redefines the semantic tokens only. ─────── */
[data-surface="paper"] {
  color-scheme: light;
  --text: var(--paper-ink);
  --heading: var(--paper-head);
  --muted: var(--paper-muted);
  --soft: var(--paper-muted);
  --soft-2: var(--paper-ink);
  --accent: var(--paper-accent);
  --accent-hover: var(--paper-head);
  --panel: #FFFFFF;
  --line: var(--paper-edge);
  --line-strong: #C9CED8;
  --line-soft: var(--paper-rule);
  --row-line: #E8EAEF;
  --btn-primary-bg: var(--argus-navy);
  --btn-primary-ink: #FFFFFF;
  --btn-line: #C9CED8;
  --seg-bg: #F1F2F5;
  --seg-on-bg: var(--argus-navy);
  --seg-on-ink: #FFFFFF;
  --seg-off-ink: var(--paper-muted);
  --chip-bg: #F4F5F8;
  --hero-bg: linear-gradient(160deg, #EEF1F8, #F8F3E8);
  --hero-line: var(--paper-rule);
  --pill-bg: #EEF0F4;
  --pill-ink: #3B4252;
  --pill-brass-bg: #F3EAD6;
  --pill-brass-ink: #6B5222;
  --pill-steel-bg: #E4EAF6;
  --pill-steel-ink: #2E4A7E;
  --pill-mint-bg: #DDF2EC;
  --pill-mint-ink: #1D6B5A;
  --pill-amber-bg: #FBEBD2;
  --pill-amber-ink: #7A5212;
  --pill-coral-bg: #FBE3D9;
  --pill-coral-ink: #9A3F1B;
  --up-text: #1D6B5A;
  --up-bg: #DDF2EC;
  --down-text: #9A3F1B;
  --down-bg: #FBE3D9;
  --flat-bg: #EEF0F4;
  --flat-text: #3B4252;
  --input-bg: #FFFFFF;
  --input-line: #C9CED8;
  --focus: var(--argus-navy);
  color: var(--text);
}

/* ── base ───────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-sans);
  font-feature-settings: 'tnum' 1;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  line-height: 1.45;
  background-color: var(--nd-base);
  background-image:
    radial-gradient(900px 560px at 10% 0%, var(--nd-glow-blue), transparent 65%),
    radial-gradient(800px 520px at 95% 12%, var(--nd-glow-brass), transparent 62%),
    radial-gradient(900px 600px at 80% 100%, var(--nd-glow-mint), transparent 70%),
    var(--nd-pinstripe);
  background-attachment: fixed;
}
body.is-phone {
  background-image:
    radial-gradient(420px 360px at 10% 0%, rgba(74,110,170,0.30), transparent 70%),
    radial-gradient(380px 320px at 100% 18%, rgba(201,164,92,0.15), transparent 70%),
    radial-gradient(420px 360px at 90% 100%, rgba(47,163,138,0.10), transparent 70%);
}
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { color: var(--heading); }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.soft { color: var(--soft); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

/* visible focus everywhere */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.rail-item:focus-visible, .btn:focus-visible, .seg button:focus-visible, .pnav a:focus-visible { border-radius: 16px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  padding: 10px 16px; border-radius: 12px; background: var(--nd-brass); color: var(--nd-ink);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ── the test-site band ─────────────────────────────────────────────────────── */
.env-band {
  display: flex; flex-wrap: wrap; justify-content: center; text-align: center; gap: 10px; padding: 5px 12px;
  background: repeating-linear-gradient(135deg, #3B2A5E 0 12px, #2C1F48 12px 24px);
  color: #E9DDFF; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
}
.env-band.is-demo { background: repeating-linear-gradient(135deg, #2A3242 0 12px, #20283A 12px 24px); color: #D3D7E0; }

/* ── the finance tape ───────────────────────────────────────────────────────── */
.tape {
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.25);
  white-space: nowrap; overflow: hidden;
  padding: 9px 0;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em;
  color: var(--nd-muted);
}
.tape-track { display: inline-flex; animation: tape-run 60s linear infinite; }
.tape:hover .tape-track, .tape:focus-within .tape-track { animation-play-state: paused; }
.tape-item { padding-left: 26px; }
.tape-sym { color: var(--nd-text); }
.tape-up { color: var(--up-tape); }
.tape-down { color: var(--down-tape); }
.tape-flat { color: var(--nd-brass); }
@keyframes tape-run { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── the desk layout ────────────────────────────────────────────────────────── */
.desk { display: flex; flex-wrap: wrap; }
.rail {
  flex: 0 0 auto; align-self: flex-start;
  position: sticky; top: 16px;
  margin: 24px 0 24px 24px; padding: 18px 12px;
  border-radius: var(--r-panel);
  background: var(--nd-glass-rail); border: 1px solid var(--nd-line);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.rail-mark { display: grid; place-items: center; width: 48px; margin-bottom: 12px; color: #FFFFFF; }
.rail-item {
  width: 48px; height: 48px; border-radius: 16px;
  display: grid; place-items: center;
  color: var(--nd-soft); text-decoration: none;
  position: relative;
}
.rail-item:hover { background: rgba(255,255,255,0.06); color: var(--nd-text); }
.rail-item[aria-current="page"] { background: var(--nd-active); color: var(--nd-ink); }
.rail-sep { width: 28px; height: 1px; background: var(--nd-line); margin: 4px 0; }
/* the label, shown beside the icon on hover and keyboard focus */
.rail-item .rail-tip {
  position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%);
  padding: 6px 10px; border-radius: 10px; background: var(--nd-pop); border: 1px solid rgba(255,255,255,0.14);
  color: var(--nd-text); font-size: 13px; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 120ms ease; z-index: 20;
}
.rail-item:hover .rail-tip, .rail-item:focus-visible .rail-tip { opacity: 1; }
/* "Waiting for me": the count on the Overview item (amber, never a direction colour) */
.rail-badge {
  position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--warn); color: #1B1406; font: 600 11px/20px var(--font-mono); text-align: center;
  box-shadow: 0 0 0 2px var(--nd-base); pointer-events: none;
}

.main {
  flex: 999 1 560px; min-width: 0;
  padding: 28px 32px 32px;
  display: flex; flex-direction: column; gap: 20px;
}
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.eyebrow { margin: 0 0 6px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; color: var(--nd-brass); }
[data-surface="paper"] .eyebrow { color: var(--paper-accent); }
.page-title { margin: 0; font-size: 34px; font-weight: 400; letter-spacing: -0.02em; }
.page-sub { margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.page-sub strong { color: var(--text); font-weight: 400; }
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.crumbs [aria-current] { color: var(--text); }

/* the surface a screen is drawn on: Night (the desk itself) or Paper (a sheet) */
.surface { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.surface[data-surface="paper"] {
  background: var(--paper-sheet); border: 1px solid var(--paper-edge);
  border-radius: 18px; padding: 36px 40px 26px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}
.paper-only { display: none; }
[data-surface="paper"] .paper-only { display: flex; }
[data-surface="paper"] .night-only { display: none; }
.paper-foot {
  justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-top: 14px; border-top: 1px solid var(--paper-rule); font-size: 12px; color: var(--paper-muted);
}
.powered { display: inline-flex; align-items: center; gap: 8px; }
.powered img { height: 14px; width: auto; }

.app-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  margin: 0; padding-top: 6px; font-size: 12px; color: var(--nd-muted);
}

/* ── panels ─────────────────────────────────────────────────────────────────── */
.panel {
  border-radius: var(--r-panel); padding: 22px 24px;
  background: var(--panel); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 14px; min-width: 0;
}
.panel-list { padding: 8px 24px 10px; gap: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.panel-list > .panel-head { padding: 16px 0 8px; }
.panel-title { margin: 0; font-size: 16px; font-weight: 500; }
.panel-note { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.mono-title { margin: 0; font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: 0.12em; color: var(--soft-2); }
.row { display: flex; flex-wrap: wrap; gap: 16px; }
.grow-2 { flex: 2 1 560px; min-width: 0; }
.grow-1 { flex: 1 1 300px; min-width: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }

/* ── hero (the one big number per screen) ──────────────────────────────────── */
.hero {
  border-radius: var(--r-panel); padding: 26px 28px;
  background: var(--hero-bg); border: 1px solid var(--hero-line);
  display: flex; flex-direction: column; gap: 16px; min-width: 0;
}
.hero-figure-row { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.hero-figure { font-size: 76px; line-height: 1; font-weight: 200; letter-spacing: -0.04em; overflow-wrap: anywhere; }
.live-dot { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--soft-2); }
.live-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--up); }
.live-dot.is-off::before { background: var(--nd-muted); }
.range { display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
.range-bar {
  position: relative; height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, rgba(222,113,72,0.55), rgba(255,255,255,0.12) 50%, rgba(47,163,138,0.55));
}
[data-surface="paper"] .range-bar { background: linear-gradient(90deg, rgba(222,113,72,0.45), #E3E6EC 50%, rgba(47,163,138,0.45)); }
.range-mark { position: absolute; top: -5px; width: 3px; height: 16px; border-radius: 2px; background: var(--text); transform: translateX(-50%); }
.range-ends { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 12px; color: var(--soft); }
.balances { display: flex; flex-wrap: wrap; gap: 10px; font-size: 14px; }
.balance-chip { padding: 8px 14px; border-radius: 999px; background: var(--chip-bg); border: 1px solid var(--line-strong); }
.balance-chip b { color: var(--heading); font-weight: 500; }

/* ── chips (moves) and pills (status) ──────────────────────────────────────── */
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.chip-lg { font-size: 15px; padding: 6px 12px; }
.chip-sq { border-radius: 8px; padding: 3px 8px; }
.chip.is-up { background: var(--up-bg); color: var(--up-text); }
.chip.is-down { background: var(--down-bg); color: var(--down-text); }
.chip.is-flat { background: var(--flat-bg); color: var(--flat-text); }
.pill {
  display: inline-block; min-width: 82px; text-align: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em;
  padding: 5px 10px; border-radius: 8px; background: var(--pill-bg); color: var(--pill-ink); white-space: nowrap;
}
.pill-sm { min-width: 0; padding: 3px 8px; }
.pill-brass { background: var(--pill-brass-bg); color: var(--pill-brass-ink); }
.pill-steel { background: var(--pill-steel-bg); color: var(--pill-steel-ink); }
.pill-mint { background: var(--pill-mint-bg); color: var(--pill-mint-ink); }
.pill-amber { background: var(--pill-amber-bg); color: var(--pill-amber-ink); }
.pill-coral { background: var(--pill-coral-bg); color: var(--pill-coral-ink); }

/* ── quote tiles ───────────────────────────────────────────────────────────── */
.quote {
  border-radius: var(--r-tile); padding: 18px 20px;
  background: var(--panel); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
}
.quote-top, .quote-mid { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.quote-mid { align-items: flex-end; gap: 10px; }
.quote-sym { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--soft); }
.quote-last { font-size: 32px; font-weight: 200; letter-spacing: -0.03em; }
.quote-note { font-size: 13px; color: var(--muted); }
.spark path { fill: none; stroke: var(--chart-steel); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ── ring gauge ────────────────────────────────────────────────────────────── */
.ring-card { border-radius: var(--r-panel); padding: 24px; background: var(--panel); border: 1px solid var(--line); display: flex; align-items: center; gap: 20px; min-width: 0; }
.ring-card svg { flex-shrink: 0; }
.ring-card .ring-text { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--soft); }
.ring-card .ring-text h2 { margin: 0; font-size: 16px; font-weight: 500; }
.ring-track { stroke: rgba(255,255,255,0.08); }
[data-surface="paper"] .ring-track { stroke: #E8EAEF; }
.ring-big { font-family: var(--font-sans); fill: var(--text); }
.ring-small { font-family: var(--font-mono); fill: var(--muted); }

/* ── lists (watchlist, needs-you) ──────────────────────────────────────────── */
.watch-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px;
  padding: 11px 0; border-top: 1px solid var(--line-soft); text-decoration: none; color: var(--text);
}
.watch-row:hover { color: var(--text); background: rgba(255,255,255,0.02); }
.watch-sym { font-family: var(--font-mono); font-size: 13px; }
.watch-name { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.watch-last { font-size: 15px; text-align: right; }
.watch-row .chip { min-width: 74px; justify-content: center; }
.need-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.need-what { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.need-what > span:first-child { font-size: 15px; }
.need-meta { font-size: 13px; color: var(--muted); }

/* ── buttons ───────────────────────────────────────────────────────────────── */
.btn {
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; background: transparent; color: var(--text);
}
.btn-primary { background: var(--btn-primary-bg); color: var(--btn-primary-ink); border-color: var(--btn-primary-bg); font-weight: 600; }
.btn-primary:hover { filter: brightness(1.06); color: var(--btn-primary-ink); }
.btn-secondary { border-color: var(--btn-line); color: var(--text); }
.btn-secondary:hover { background: rgba(255,255,255,0.05); color: var(--text); }
[data-surface="paper"] .btn-secondary:hover { background: #F4F5F8; }
.btn-quiet { border-color: var(--line-strong); background: rgba(255,255,255,0.05); }
.btn-danger { border-color: rgba(222,113,72,0.55); color: var(--down-text); }
.btn-block { width: 100%; }
.btn-lg { min-height: 50px; font-size: 15px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
  border: 1px solid var(--line-strong); background: transparent; color: var(--text);
  display: grid; place-items: center; cursor: pointer;
}
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }
.link-btn:hover { color: var(--accent-hover); }

/* the entity switcher */
.switcher { position: relative; }
.switcher-btn {
  min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: rgba(255,255,255,0.05); color: var(--text);
  display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; max-width: 340px;
}
.switcher-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 280px; max-width: 360px;
  padding: 8px; border-radius: 20px; background: var(--nd-pop); border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5); color: var(--nd-text);
}
.menu-group { padding: 8px 10px 4px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--nd-muted); }
.menu-item {
  width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 12px; background: transparent;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; cursor: pointer; color: var(--nd-text);
}
.menu-item:hover, .menu-item:focus-visible { background: rgba(255,255,255,0.07); }
.menu-item[aria-checked="true"] { color: var(--nd-brass); }
.menu-item small { color: var(--nd-muted); font-size: 12px; }

/* ── segmented toggle ──────────────────────────────────────────────────────── */
.seg {
  display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px;
  background: var(--seg-bg); border: 1px solid var(--line); font-size: 14px;
}
.seg button {
  min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px;
  background: transparent; color: var(--seg-off-ink); font-weight: 500; cursor: pointer;
}
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--seg-on-bg); color: var(--seg-on-ink); }
.seg-sm { font-size: 13px; }
.seg-sm button { min-height: 34px; }
/* coarse pointers get the full 44px target */
@media (pointer: coarse) { .seg button { min-height: 44px; } }

/* ── data table ────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; font-weight: 500; color: var(--muted);
  white-space: nowrap; position: sticky; top: 0; background: transparent;
}
.table td { padding: 12px 10px; border-bottom: 1px solid var(--row-line); vertical-align: top; }
.table th.num, .table td.num { text-align: right; }
.table td.code { font-family: var(--font-mono); font-size: 13px; color: var(--soft); }
.table td .sub { display: block; font-size: 12px; color: var(--muted); }
.table tr.is-off td { color: var(--muted); }
.neg { color: var(--neg-text); }
.table-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.table-actions .btn { min-height: 40px; padding: 0 14px; font-size: 13px; }
@media (pointer: coarse) { .table-actions .btn { min-height: 44px; } }

/* ── the shared list (screens/list.js): sort, resize, the side panel ───────── */
.list-tools { margin-bottom: 12px; }
.list-search .input { min-width: 240px; }
.list-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.list-body.has-side { grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); }
@media (max-width: 1100px) { .list-body.has-side { grid-template-columns: minmax(0, 1fr); } }
.list-table { table-layout: fixed; width: max-content; min-width: 100%; }
.list-table th { position: relative; padding-right: 16px; }
.list-table td { overflow: hidden; text-overflow: ellipsis; }
.list-sort { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; display: inline-flex; gap: 6px; align-items: center;
  max-width: 100%; overflow: hidden; font: inherit; letter-spacing: inherit; color: inherit; text-align: left; }
.list-sort:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.list-arrow { color: var(--accent); }
.list-grip { position: absolute; top: 6px; bottom: 6px; right: 0; width: 10px; cursor: col-resize; border-right: 1px solid var(--line); touch-action: none; }
.list-grip:hover, .list-grip:focus-visible { border-right: 2px solid var(--accent); outline: none; }
.list-table tr.is-picked td { background: var(--seg-bg); }
.list-pick { text-align: left; }
.list-side { position: sticky; top: 12px; }
.list-nav { display: flex; align-items: center; gap: 6px; justify-content: flex-end; margin-bottom: 8px; }
.list-nav .mono { margin-right: auto; font-size: 12px; color: var(--muted); }
.list-none { padding: 16px 10px; }

/* ── candle chart ──────────────────────────────────────────────────────────── */
.chart-box { position: relative; }
.chart-box svg { display: block; overflow: visible; width: 100%; height: auto; }
.chart-grid { stroke: rgba(255,255,255,0.07); }
[data-surface="paper"] .chart-grid { stroke: #E8EAEF; }
.chart-label { font-family: var(--font-mono); font-size: 11px; fill: var(--muted); }
.chart-band { fill: rgba(255,255,255,0.05); }
[data-surface="paper"] .chart-band { fill: #F1F2F5; }
.candle-up { stroke: var(--up); fill: #15171B; }
[data-surface="paper"] .candle-up { fill: #FFFFFF; }
.candle-down { stroke: var(--down); fill: var(--down); }
.chart-tip {
  position: absolute; top: 0; transform: translate(-50%, -105%); pointer-events: none;
  padding: 9px 12px; border-radius: 12px; background: var(--nd-pop); border: 1px solid rgba(255,255,255,0.14);
  font-family: var(--font-mono); font-size: 12px; white-space: nowrap; color: var(--nd-text);
  display: grid; grid-template-columns: auto auto; column-gap: 14px; row-gap: 2px;
}
.chart-tip .tip-head { grid-column: 1 / 3; color: var(--nd-muted); }
.chart-tip[hidden] { display: none; }

/* ── treasury: cash cards, the forecast's closing-cash line and its table ───── */
.cash-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 12px; }
.cash-card { border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cash-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cash-name { font-weight: 500; color: var(--heading); min-width: 0; overflow-wrap: anywhere; }
.cash-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--muted); }
.cash-value { font-size: 26px; font-weight: 600; color: var(--heading); }
.cash-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; margin: 2px 0 0; font-size: 13px; }
.cash-dl dt { color: var(--muted); }
.cash-dl dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.cash-note { margin: 4px 0 0; font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
/* the chart keeps a readable size: on a narrow screen it scrolls inside its card, like the tables */
.fc-scroll { overflow-x: auto; padding-top: 4px; }
.fc-chart { min-width: 640px; }
.fc-line { fill: none; stroke: var(--chart-steel); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.fc-floor { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 6 5; }
.fc-cross { stroke: var(--line-strong); stroke-width: 1; }
.fc-dot { fill: var(--chart-steel); stroke: #15171B; stroke-width: 2; }
.fc-dot.is-below { fill: var(--down); }
[data-surface="paper"] .fc-dot { stroke: #FFFFFF; }
.fc-label { font-family: var(--font-sans); font-size: 12px; fill: var(--text); }
.fc-strong { font-weight: 600; fill: var(--heading); }
.fc-muted { fill: var(--muted); }
.fc-down { fill: var(--down-text); font-weight: 500; }
.fc-hit { fill: transparent; cursor: crosshair; }
.fc-hit:focus { outline: none; }
.fc-hit:focus-visible { fill: rgba(255,255,255,0.04); }
.fc-tip { top: 0; }
.fc-tip b { font-weight: 600; text-align: right; }
.fc-tip .fc-tip-below { color: var(--down-text); }
.fc-table th, .fc-table td { white-space: nowrap; }
.fc-table thead th .sub { display: block; margin-top: 2px; }
.fc-table td.fc-below { color: var(--down-text); }
.fc-table .link-btn { min-height: 0; font-size: inherit; font-weight: 400; }
.table tr.is-past td { color: var(--muted); }
/* a customer statement: a document to print and send */
.stmt-sheet { border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stmt-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--line-strong); }
.stmt-company { margin: 0; font-size: 20px; font-weight: 600; color: var(--heading); }
.stmt-sub { margin: 2px 0 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.stmt-meta { display: grid; grid-template-columns: auto auto; gap: 2px 14px; margin: 0; font-size: 13px; }
.stmt-meta dt { color: var(--muted); }
.stmt-meta dd { margin: 0; text-align: right; }
.stmt-to { display: flex; flex-direction: column; gap: 2px; }
.stmt-to b { font-size: 16px; font-weight: 600; color: var(--heading); }
.stmt-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--muted); }
.stmt-table tr.stmt-forward td { font-style: italic; }
.stmt-aging { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.stmt-box { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stmt-box .fig { font-size: 15px; font-weight: 500; color: var(--heading); overflow-wrap: anywhere; }
.stmt-due { border: 2px solid var(--accent); }
.stmt-due .fig { font-size: 18px; font-weight: 600; }
.stmt-foot { margin: 0; font-size: 12px; color: var(--muted); }
@media (max-width: 720px) {
  .stmt-sheet { padding: 16px; }
  .stmt-aging { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media print {
  .stmt-sheet { border: 0; padding: 0; }
  .stmt-aging { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  [data-screen]:has(.stmt-sheet) .page-head { display: none; }
}
/* the go-live checklist */
.golive-row td:first-child { width: 132px; }
.limits-preview tr.is-set td { color: var(--muted); }
/* entry review: flag chips (toggles), the score, the flags in words */
.chip-btn { border: 1px solid var(--btn-line); background: transparent; color: var(--text); border-radius: var(--r-pill); padding: 6px 12px; font: inherit; font-size: 13px; min-height: 36px; cursor: pointer; }
.chip-btn[aria-pressed="true"] { background: var(--seg-on-bg); color: var(--seg-on-ink); border-color: var(--seg-on-bg); }
.chip-btn:disabled { opacity: 0.45; cursor: default; }
@media (pointer: coarse) { .chip-btn { min-height: 44px; } }
.risk-score { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: var(--r-pill); background: var(--pill-amber-bg); color: var(--pill-amber-ink); font-weight: 600; }
.table tr.is-off .risk-score { background: var(--pill-bg); color: var(--pill-ink); }
.risk-table .link-btn.mono { white-space: nowrap; }
.risk-flags { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; min-width: 240px; }
.risk-flags li { display: flex; flex-direction: column; }
.risk-flags b { font-weight: 500; color: var(--heading); }
.risk-flags span { font-size: 12px; color: var(--muted); }
/* the change logs: each field that moved, from → to */
.change-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 13px; min-width: 220px; }
.change-lines b { font-weight: 500; color: var(--heading); }
/* the control register's owner pickers */
.select.sox-owner { min-width: 170px; }
[data-sox] td.mono, [data-sox-register] td.mono { white-space: nowrap; }
/* an allocation's share: to · percent */
.line-row.alloc-row { grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.8fr) auto; }
/* flux review: flagged rows first, marked by a brass rule and a FLAGGED pill (never colour alone) */
.fx-table tr.is-flagged td { background: rgba(240,184,102,0.06); }
.fx-table tr.is-flagged td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
[data-surface="paper"] .fx-table tr.is-flagged td { background: #FDF6EA; }
.fx-table td.fx-move { white-space: nowrap; }
.fx-why { min-width: 260px; }
.fx-why .fx-box { width: 100%; min-height: 64px; margin-top: 6px; padding: 8px 10px; resize: vertical; font: inherit; font-size: 13px; }
.fx-why .fx-text { display: block; margin-top: 4px; font-size: 13px; }
/* Waiting for me: the count by kind (each a filter), over-limit rows marked by a brass rule and the words */
.wl-kinds { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 18px 10px; }
.wl-kinds .chip-btn b { font-family: var(--font-mono); font-weight: 600; margin-left: 4px; }
.wl-table tr.is-over td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.wl-table td .table-actions { justify-content: flex-end; }
.wl-table [data-wl-nolink] { font-size: 13px; white-space: nowrap; }
/* collections: a notice's invoices, one per line; the run on screen marked in the runs table (and by aria-current) */
.dun-invoices { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 13px; min-width: 260px; }
.table tr.is-current td { background: rgba(255,255,255,0.04); }
.table tr.is-current td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
[data-surface="paper"] .table tr.is-current td { background: #F4F1EA; }
/* payment runs: what each vendor payment pays (bills, parts of bills, credits netted); the proposal's per-vendor subtotal */
.pay-docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 13px; min-width: 220px; }
.table tr.vendor-sub td { border-top: 0; padding-top: 2px; }
.table tr.vendor-sub td.num { font-weight: 600; color: var(--heading); }
.table tr.is-credit td { color: var(--muted); }
/* the move from QuickBooks: the drop zone, the problems in words, the month grid */
.qb-drop { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 18px; border: 1.5px dashed var(--line-strong); border-radius: 18px; cursor: pointer; color: var(--text); }
.qb-drop.is-over { border-color: var(--accent); background: rgba(255,255,255,0.04); }
.qb-drop .input { flex: 1 1 260px; min-width: 0; }
.qb-problems { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; }
.qb-grid td { white-space: nowrap; }
/* journal imports: an entry's heading row, the lines with problems (a brass rule plus the words), the column map */
.import-table tr.import-entry th { text-align: left; font-weight: 500; color: var(--heading); background: var(--line-soft); padding-top: 10px; padding-bottom: 10px; }
.import-table tr.import-entry th .sub { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 2px; }
.import-table tr.import-entry .link-btn { min-height: 0; font-size: 13px; }
.import-table tr.has-problems td { background: rgba(240,184,102,0.06); }
.import-table tr.has-problems td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
[data-surface="paper"] .import-table tr.has-problems td { background: #FDF6EA; }
.import-problems { margin: 0; padding-left: 16px; display: grid; gap: 3px; font-size: 13px; min-width: 240px; color: var(--text); }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }

/* ── lifecycle stepper ─────────────────────────────────────────────────────── */
.stepper { display: flex; flex-wrap: wrap; gap: 0; list-style: none; margin: 0; padding: 0; counter-reset: step; }
.stepper li {
  display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 0; font-size: 13px; color: var(--muted);
}
.stepper li::before {
  counter-increment: step; content: counter(step);
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 11px; border: 1px solid var(--line-strong); color: var(--soft);
}
.stepper li:not(:last-child)::after { content: ''; width: 22px; height: 1px; background: var(--line-strong); margin-left: 6px; }
.stepper li.is-done { color: var(--text); }
.stepper li.is-done::before { content: '✓'; background: var(--up-bg); border-color: transparent; color: var(--up-text); }
.stepper li[aria-current="step"] { color: var(--heading); font-weight: 500; }
.stepper li[aria-current="step"]::before { background: var(--nd-active); color: var(--nd-ink); border-color: transparent; }

/* ── alerts ────────────────────────────────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-radius: 16px; font-size: 14px;
  background: var(--pill-steel-bg); color: var(--pill-steel-ink); border: 1px solid transparent;
}
.alert svg { flex-shrink: 0; margin-top: 1px; }
.alert-info { background: var(--pill-steel-bg); color: var(--pill-steel-ink); }
.alert-warn { background: var(--warn-bg); color: var(--warn-text); border-color: rgba(240,184,102,0.35); }
[data-surface="paper"] .alert-warn { color: var(--pill-amber-ink); background: var(--pill-amber-bg); }
.alert-error { background: var(--down-bg); color: var(--down-text); border-color: rgba(222,113,72,0.4); }
.alert-success { background: var(--up-bg); color: var(--up-text); }
.alert p { margin: 0; }

/* ── forms ─────────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.field-label { color: var(--soft); font-size: 13px; }
.input, .select {
  min-height: 48px; padding: 0 16px; border-radius: var(--r-field);
  border: 1px solid var(--input-line); background: var(--input-bg); color: var(--text); font-size: 15px; width: 100%;
}
.select { appearance: auto; }
.select option { background: var(--nd-pop); color: var(--nd-text); }
.input-code { font-family: var(--font-mono); font-size: 22px; letter-spacing: 0.3em; min-height: 52px; }
.input:focus-visible, .select:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; }
.check { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 8px 0; font-size: 14px; color: var(--text); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: #D8BC82; flex-shrink: 0; }
.check small { display: block; color: var(--muted); font-size: 12px; }
.form-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.form-row > .field { flex: 1 1 240px; }
.hint { font-size: 12px; color: var(--muted); margin: 0; }

/* ── empty state ───────────────────────────────────────────────────────────── */
.empty {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 8px 0; max-width: 720px;
}
.empty-icon { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; background: rgba(255,255,255,0.06); color: var(--nd-brass); }
[data-surface="paper"] .empty-icon { background: #F1F2F5; color: var(--paper-accent); }
.empty-title { margin: 0; font-size: 20px; font-weight: 500; }
.empty-text { margin: 0; color: var(--muted); font-size: 15px; }
.empty .pill { min-width: 0; }
.coming-list { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.coming-list li { display: flex; gap: 10px; align-items: baseline; font-size: 14px; color: var(--soft); }
.coming-list li::before { content: '—'; color: var(--accent); }
.blank-figure { font-size: 40px; font-weight: 200; letter-spacing: -0.03em; color: var(--muted); }

/* ── dialog (desk) and bottom sheet (phone) ────────────────────────────────── */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(5,6,8,0.62); display: grid; place-items: center; padding: 16px; }
.scrim-sheet { display: flex; flex-direction: column; justify-content: flex-end; padding: 0; }
.dialog, .sheet {
  width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  border-radius: 28px; padding: 18px 20px 20px; background: var(--nd-sheet); border: 1px solid rgba(255,255,255,0.12);
  display: flex; flex-direction: column; gap: 14px; color: var(--nd-text);
}
.sheet { width: auto; margin: 0 8px 8px; max-height: 88vh; }
.layer-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.layer-title { margin: 0; font-size: 17px; font-weight: 500; color: var(--nd-text); }
.layer-body { display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: var(--nd-soft); }
.layer-actions { display: flex; gap: 8px; }
.layer-actions .btn { flex: 1; min-height: 50px; font-size: 15px; }

/* ── toasts ────────────────────────────────────────────────────────────────── */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; width: min(480px, calc(100% - 32px)); }
.toast { padding: 12px 16px; border-radius: 16px; background: var(--nd-pop); border: 1px solid rgba(255,255,255,0.14); color: var(--nd-text); font-size: 14px; box-shadow: 0 12px 30px rgba(0,0,0,0.4); }
.toast-error { border-color: rgba(222,113,72,0.5); }
.toast-success { border-color: rgba(47,163,138,0.5); }
body.is-phone .toasts { bottom: 110px; }

/* ── sign-in ───────────────────────────────────────────────────────────────── */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.signin-card {
  width: min(460px, 100%); border-radius: var(--r-panel); padding: 30px 30px 26px;
  background: rgba(255,255,255,0.045); border: 1px solid var(--nd-line);
  display: flex; flex-direction: column; gap: 16px;
}
.signin-brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.signin-brand .logo { height: 22px; width: auto; }
.signin-motion { width: 112px; height: 112px; border-radius: 28px; overflow: hidden; align-self: center; background: #0E1013; display: grid; place-items: center; }
.signin-motion canvas { width: 100% !important; height: 100% !important; }
.signin-title { margin: 0; font-size: 26px; font-weight: 400; letter-spacing: -0.02em; }
.signin-text { margin: 0; color: var(--nd-soft); font-size: 14px; }
.signin form { display: flex; flex-direction: column; gap: 14px; }
.signin-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.qr { align-self: center; width: 200px; height: 200px; padding: 10px; border-radius: 18px; background: #FFFFFF; }
.qr img { width: 100%; height: 100%; display: block; }
.secret { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em; word-break: break-all; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,0.05); color: var(--nd-soft-2); }
.signin-foot { margin: 0; font-size: 12px; color: var(--nd-muted); text-align: center; }

/* ── settings ──────────────────────────────────────────────────────────────── */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--seg-bg); border: 1px solid var(--line); }
.tabs a { min-height: 40px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center; text-decoration: none; color: var(--seg-off-ink); font-size: 14px; font-weight: 500; }
.tabs a[aria-current="page"] { background: var(--seg-on-bg); color: var(--seg-on-ink); }
.who { display: flex; flex-direction: column; }
.who b { font-weight: 500; color: var(--text); }
.who span { font-size: 12px; color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── the books screens (Payables, Receivables, Assets, Consolidation, Reconcile) ── */
.tabs { flex-wrap: wrap; max-width: 100%; align-self: flex-start; border-radius: 22px; }
.fig { font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.toolbar .field { flex: 0 1 auto; min-width: 0; max-width: 100%; }
.toolbar .select, .toolbar .input { max-width: 100%; }
.toolbar .seg { flex-wrap: wrap; max-width: 100%; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.kpi {
  border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 16px;
  background: var(--panel); display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.kpi-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--muted); }
.kpi-value { font-family: var(--font-mono); font-size: 20px; color: var(--heading); overflow-wrap: anywhere; }
.kpi-note { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.table tfoot td { border-top: 1px solid var(--line); border-bottom: 0; font-weight: 500; color: var(--heading); }
.table td .sub + .sub { margin-top: 2px; }
.table td.is-mark { color: var(--accent); }
.table-wide { min-width: 1100px; }
.table-tall { max-height: 480px; overflow-y: auto; }
.prep { display: block; margin-top: 4px; font-size: 13px; color: var(--soft); }
.prep b { color: var(--text); font-weight: 500; }
.prep .sub { display: block; font-size: 12px; color: var(--warn-text); margin-top: 2px; }
[data-surface="paper"] .prep .sub { color: var(--paper-accent); }
.up-text { color: var(--up-text); }
.down-text { color: var(--down-text); }
[data-surface="paper"] .up-text { color: #1F7A66; }
[data-surface="paper"] .down-text { color: #B4532E; }
.dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; font-size: 14px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; color: var(--text); }
.btn[data-gated] { cursor: not-allowed; }
.dialog.dialog-wide { width: min(860px, 100%); }
.lines-set { border: 1px solid rgba(255,255,255,0.10); border-radius: 18px; padding: 10px 12px 12px; margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.lines-set legend { padding: 0 6px; }
.line-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr) minmax(0, 1.5fr) auto; gap: 8px; align-items: end; }
.line-row.has-tax { grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr) minmax(0, 1.4fr) auto auto; }
.line-row .check { min-height: 44px; align-items: center; }
/* a purchase order line: description · kind · account · quantity · unit price */
.line-row.po-row { grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.8fr) minmax(0, 1.4fr) minmax(0, 0.7fr) minmax(0, 0.8fr) auto; }
/* a recurring entry's line: account · ledger · debit · credit · memo */
.line-row.rec-row { grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.9fr) minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1.2fr) auto; }
.lines-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.pick-wrap { max-height: 320px; overflow-y: auto; }
.input-amt { width: 130px; text-align: right; }
/* settlements: what each side posts; the consolidation check's list */
.table-compact th, .table-compact td { padding: 8px 8px; font-size: 13px; }
.post-sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 12px; }
.post-side { border: 1px solid var(--line); border-radius: 18px; padding: 10px 10px 4px; min-width: 0; }
.post-side-title { margin: 0 0 4px; font-size: 14px; font-weight: 500; color: var(--heading); }
.post-side-title .sub { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.check-list { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; }
/* budgets: the month-by-account grid and budget vs actual */
.table tbody th { position: static; }
.table-grid th, .table-grid td { padding: 6px 6px; }
.table-grid .grid-cell { width: 112px; min-height: 40px; padding: 0 8px; font-size: 13px; text-align: right; border-radius: 10px; }
.table th.grid-acct { text-align: left; font-family: var(--font-sans); font-size: 13px; letter-spacing: 0; font-weight: 400; color: var(--text); white-space: nowrap; }
.table th.grid-acct .grid-mark { font-size: 12px; margin-left: 6px; }
.table th.grid-acct .sub { display: block; }
/* "Intercompany…" on every row is noise: shown on the row in hand (always on touch screens) */
@media (hover: hover) {
  .table-grid tr .grid-mark[data-ic-mark] { opacity: 0; }
  .table-grid tr:hover .grid-mark[data-ic-mark], .table-grid tr:focus-within .grid-mark[data-ic-mark] { opacity: 1; }
}
.table th.grid-acct .pill { margin-left: 4px; vertical-align: 1px; }
.table tr.grid-group th { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--accent); padding-top: 14px; }
.table tr.is-total td, .table tr.is-total th { border-top: 1px solid var(--line); font-weight: 500; color: var(--heading); }
.table td.fav { white-space: nowrap; font-size: 13px; }
.table td.fav.up-text { color: var(--up-text); }
.table td.fav.down-text { color: var(--down-text); }
[data-surface="paper"] .table td.fav.up-text { color: #1F7A66; }
[data-surface="paper"] .table td.fav.down-text { color: #B4532E; }
@media (max-width: 720px) {
  .line-row, .line-row.has-tax, .line-row.po-row, .line-row.rec-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .line-row.alloc-row { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) auto; }
  .dl { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .dl dd { margin-bottom: 8px; }
  .kpis { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .kpi-value { font-size: 17px; }
}

/* ── statements: a financial statement - lines, accounts indented under them,
   subtotals ruled above and bold, totals double-ruled; wide ones scroll in their card ── */
.fs-table th[scope="row"] { font-family: var(--font-sans); font-size: 14px; letter-spacing: 0; font-weight: 400; color: var(--text); white-space: normal; min-width: 200px; }
.fs-table th, .fs-table td { padding: 8px 10px; }
.fs-table.has-cmp, .fs-table.has-bud { min-width: 860px; }
.fs-table.has-cmp.has-bud { min-width: 1180px; }
.fs-table tr.fs-account th[scope="row"] { padding-left: 34px; font-size: 13px; color: var(--soft); }
.fs-table tr.fs-account td { font-size: 12px; color: var(--soft); }
.fs-table tr.fs-account th, .fs-table tr.fs-account td { padding-top: 5px; padding-bottom: 5px; border-bottom-color: transparent; }
.fs-table tr.fs-subtotal th, .fs-table tr.fs-subtotal td, .fs-table tr.fs-total th, .fs-table tr.fs-total td { font-weight: 600; color: var(--heading); }
.fs-table tr.fs-subtotal td.num, .fs-table tr.fs-total td.num { border-top: 1px solid var(--soft); }
.fs-table tr.fs-total td.num { border-bottom: 3px double var(--soft); }
.fs-table tr.fs-section th { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); padding-top: 18px; border-bottom: 0; }
.fs-table td.fs-dir { white-space: nowrap; font-size: 12px; }
.fs-table td.fs-dir .fig { font-size: 12px; }
.fs-table td.fs-dir.up-text { color: var(--up-text); }
.fs-table td.fs-dir.down-text { color: var(--down-text); }
[data-surface="paper"] .fs-table td.fs-dir.up-text { color: #1F7A66; }
[data-surface="paper"] .fs-table td.fs-dir.down-text { color: #B4532E; }
.fs-checks { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fs-detail { min-height: 48px; align-items: center; padding: 0; }
.chip-warn { background: var(--pill-amber-bg); color: var(--pill-amber-ink); text-decoration: none; margin-left: 8px; vertical-align: 1px; font-weight: 500; }
.chip-warn:hover { color: var(--pill-amber-ink); text-decoration: underline; }

/* ── the consolidating worksheet: a column per company, then the eliminations and the consolidated figure ── */
.ws-table { min-width: 720px; }
.ws-table th.ws-elim, .ws-table td.ws-elim { background: rgba(216,188,130,0.06); color: var(--accent); }
.ws-table th.ws-con, .ws-table td.ws-con { border-left: 1px solid var(--line-strong); }
[data-surface="paper"] .ws-table th.ws-elim, [data-surface="paper"] .ws-table td.ws-elim { background: #FBF7EE; color: var(--paper-accent); }

/* ── non-GAAP: the sign of each adjustment, and the DRAFT mark ── */
.ng-sign { font-family: var(--font-mono); color: var(--muted); }
.draft-wrap { position: relative; overflow: hidden; }
.draft-mark {
  position: absolute; z-index: 0; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-18deg);
  font-family: var(--font-mono); font-size: clamp(48px, 12vw, 120px); font-weight: 500; letter-spacing: 0.2em;
  color: rgba(240,184,102,0.13); border: 6px solid rgba(240,184,102,0.13); border-radius: 18px; padding: 0 24px;
  pointer-events: none; user-select: none; white-space: nowrap;
}
.draft-wrap > *:not(.draft-mark) { position: relative; z-index: 1; }
[data-surface="paper"] .draft-mark { color: rgba(180,83,46,0.12); border-color: rgba(180,83,46,0.12); }
@media print { .draft-mark { color: rgba(180,83,46,0.18); border-color: rgba(180,83,46,0.18); } }

/* ── the Reports hub ── */
.report-list { display: flex; flex-direction: column; }
.report-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 56px; padding: 12px 4px;
  border-top: 1px solid var(--row-line); color: var(--text); text-decoration: none;
}
.report-row:first-child { border-top: 0; }
.report-row:hover { color: var(--text); background: rgba(255,255,255,0.03); }
[data-surface="paper"] .report-row:hover { background: #F7F8FA; }
.report-row svg { flex-shrink: 0; color: var(--muted); }
.report-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.report-name { font-weight: 500; }
.report-desc { font-size: 13px; color: var(--muted); }

/* ── a request past its due date: the date in coral, with the OVERDUE word beside it ── */
.table tr.is-late td.code { color: var(--down-text); }
[data-surface="paper"] .table tr.is-late td.code { color: #B4532E; }

/* ── the ownership method choice ── */
.method-choice { align-items: flex-start; }
.method-choice span { display: flex; flex-direction: column; gap: 2px; }
.method-choice small { display: block; font-size: 12px; color: var(--muted); }

/* ── a side sheet (the journal entry behind an inquiry line): from the right, full height ── */
.scrim.scrim-side { place-items: stretch end; padding: 0; }
.dialog.side-sheet { width: min(620px, 100%); max-height: 100vh; height: 100vh; border-radius: 28px 0 0 28px; }
@media (max-width: 720px) {
  .dialog.side-sheet { border-radius: 0; }
  .ws-table { min-width: 560px; }
}
@media (max-width: 720px) {
  /* narrow: the table takes the width its figures need, the line names wrap,
     and the first amount shows beside them; the rest scrolls inside the card */
  .fs-table, .fs-table.has-cmp, .fs-table.has-bud, .fs-table.has-cmp.has-bud { width: auto; min-width: 100%; }
  .fs-table th[scope="row"] { min-width: 150px; max-width: 180px; font-size: 13px; }
  .fs-table tr.fs-account th[scope="row"] { padding-left: 20px; }
  .fs-table .chip-warn { margin: 4px 0 0; }
}

/* ── the phone shell ───────────────────────────────────────────────────────── */
.phone { min-height: 100vh; display: flex; flex-direction: column; width: 100%; max-width: 560px; margin: 0 auto; overflow-x: hidden; }
.phone-scroll > * { min-width: 0; }
body.is-phone { overflow-x: hidden; }
.phone-scroll { flex: 1 1 auto; padding: 22px 16px 120px; display: flex; flex-direction: column; gap: 14px; }
.phone-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 4px; }
.phone-head.is-end { align-items: flex-end; }
.phone-kicker { margin: 0; font-size: 13px; color: var(--nd-muted); }
.phone-title { margin: 2px 0 0; font-size: 26px; font-weight: 400; letter-spacing: -0.02em; }
.phone-bell { position: relative; width: 44px; height: 44px; border-radius: 15px; border: 1px solid var(--nd-line-strong); background: rgba(255,255,255,0.05); color: var(--nd-text); display: grid; place-items: center; }
.phone-bell .dot { position: absolute; top: 8px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--nd-brass); border: 2px solid var(--nd-base); }
.phone-tape {
  white-space: nowrap; overflow: hidden; font-family: var(--font-mono); font-size: 11px; color: var(--nd-muted);
  padding: 7px 4px; border-top: 1px solid var(--nd-line-soft); border-bottom: 1px solid var(--nd-line-soft);
}
.phone-hero {
  border-radius: var(--r-tile); padding: 18px;
  background: linear-gradient(160deg, rgba(74,110,170,0.32), rgba(201,164,92,0.14)); border: 1px solid rgba(216,188,130,0.28);
  display: flex; flex-direction: column; gap: 10px;
}
.phone-hero .mono-title { font-size: 11px; }
.phone-hero .hero-figure { font-size: 44px; }
.phone-hero .chip { align-self: flex-start; font-size: 13px; padding: 5px 10px; }
.phone-hero .range-ends { font-size: 11px; }
.phone-panel { border-radius: var(--r-tile); padding: 4px 16px; background: var(--nd-glass); border: 1px solid var(--nd-line); }
.phone-panel h2 { margin: 14px 0 4px; font-size: 15px; font-weight: 500; }
.phone-panel.is-padded { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.pquote { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 11px 0; border-top: 1px solid var(--nd-line-soft); }
.pquote-sym { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--nd-soft); }
.pquote .chip { justify-self: end; font-size: 11px; border-radius: 8px; padding: 3px 8px; }
.pquote-last { font-size: 22px; font-weight: 300; letter-spacing: -0.02em; }
.pquote-note { justify-self: end; font-size: 12px; color: var(--nd-muted); }
.phone-cta {
  display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 22px; min-height: 64px;
  background: rgba(216,188,130,0.12); border: 1px solid rgba(216,188,130,0.40); text-decoration: none; color: var(--nd-text);
}
.phone-cta:hover { color: var(--nd-text); }
.phone-cta .count { width: 40px; height: 40px; flex-shrink: 0; border-radius: 13px; display: grid; place-items: center; background: var(--nd-brass); color: var(--nd-ink); font-weight: 600; }
.phone-cta .what { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.phone-cta .what span:last-child { font-size: 13px; color: var(--nd-soft); }
.phone-note { margin: 0 4px; font-size: 12px; color: var(--nd-muted); }
.acard { border-radius: var(--r-card); padding: 16px; background: var(--nd-glass); border: 1px solid var(--nd-line); display: flex; flex-direction: column; gap: 10px; }
.acard.is-done { border-color: rgba(47,163,138,0.40); }
.acard-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; }
.acard-kind { letter-spacing: 0.1em; color: var(--nd-soft); }
.acard-ref { color: var(--nd-brass); }
.acard-mid { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.acard-title { font-size: 17px; font-weight: 500; }
.acard-amount { font-size: 22px; font-weight: 300; letter-spacing: -0.02em; white-space: nowrap; }
.acard-meta { font-size: 13px; color: var(--nd-muted); }
.acard-check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--up-text); }
.acard-actions { display: flex; gap: 8px; }
.acard-actions .btn { flex: 1; min-height: 46px; font-size: 15px; }
.acard-done { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; border-radius: 14px; background: rgba(47,163,138,0.14); color: var(--up-text); font-size: 14px; font-weight: 500; }
.more-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 0; border-top: 1px solid var(--nd-line-soft); color: var(--nd-text); text-decoration: none; background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; text-align: left; cursor: pointer; font-size: 15px; }
.more-row:first-of-type { border-top: 0; }
.more-row .grow { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.more-row small { color: var(--nd-muted); font-size: 12px; }

.pnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  max-width: 536px; margin: 0 auto 22px; width: calc(100% - 24px);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center;
  padding: 8px; border-radius: 26px; background: var(--nd-bar); border: 1px solid var(--nd-line);
  font-size: 11px; backdrop-filter: blur(12px);
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
}
.pnav a { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 48px; justify-content: center; color: var(--nd-muted); text-decoration: none; }
.pnav a[aria-current="page"] { color: var(--nd-brass); font-weight: 600; }
.pnav a.pnav-centre {
  justify-self: center; width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center;
  background: linear-gradient(135deg, #6E93D6, #D8BC82); color: var(--nd-ink);
}
.pnav a.pnav-centre[aria-current="page"] { outline: 2px solid var(--nd-brass); outline-offset: 2px; }

/* ── narrow desk windows (a desk made narrow keeps the desk layout) ──────── */
@media (max-width: 720px) {
  .rail { position: static; flex-direction: row; flex-wrap: wrap; margin: 16px 16px 0; width: calc(100% - 32px); justify-content: center; }
  .rail-mark { margin: 0 8px 0 0; width: auto; }
  .rail-item .rail-tip { display: none; }
  /* the candle tip stays inside the chart's card: pinned to its right edge, above the chart */
  .chart-tip { left: auto !important; right: 0; transform: translateY(-105%); }
  .main { padding: 20px 16px 28px; }
  .hero-figure { font-size: 52px; }
  .surface[data-surface="paper"] { padding: 24px 18px 18px; }
}

/* ── motion ────────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .tape-track { animation: none; }
}

/* ── print: always Paper ───────────────────────────────────────────────────── */
@media print {
  @page { margin: 14mm 12mm; }
  :root {
    --text: var(--paper-ink); --heading: var(--paper-head); --muted: var(--paper-muted); --soft: var(--paper-muted);
    --soft-2: var(--paper-ink); --accent: var(--paper-accent); --panel: #FFFFFF; --line: var(--paper-edge);
    --line-strong: #C9CED8; --line-soft: var(--paper-rule); --row-line: #E8EAEF; --hero-bg: #FFFFFF; --hero-line: var(--paper-rule);
    --chip-bg: #FFFFFF; --pill-bg: #EEF0F4; --pill-ink: #3B4252; --up-text: #1D6B5A; --up-bg: #DDF2EC;
    --down-text: #9A3F1B; --down-bg: #FBE3D9; --flat-bg: #EEF0F4; --flat-text: #3B4252;
    --pill-brass-bg: #F3EAD6; --pill-brass-ink: #6B5222; --pill-steel-bg: #E4EAF6; --pill-steel-ink: #2E4A7E;
    --pill-mint-bg: #DDF2EC; --pill-mint-ink: #1D6B5A; --pill-amber-bg: #FBEBD2; --pill-amber-ink: #7A5212;
    --pill-coral-bg: #FBE3D9; --pill-coral-ink: #9A3F1B;
    color-scheme: light;
  }
  body { background: #FFFFFF !important; color: var(--paper-ink); }
  .tape, .rail, .env-band, .page-actions, .app-foot, .skip-link, .toasts, .pnav, .no-print, .scrim, .menu { display: none !important; }
  .desk { display: block; }
  .main { padding: 0; }
  .surface, .surface[data-surface="paper"] { background: #FFFFFF; border: 0; box-shadow: none; padding: 0; color: var(--paper-ink); }
  .panel, .quote, .hero, .ring-card { break-inside: avoid; }
  .eyebrow { color: var(--paper-accent); }
  .paper-only { display: flex !important; }
  .night-only { display: none !important; }
  a { color: var(--paper-ink); text-decoration: none; }
}
