/* OneNine Finance: tokens and shared parts.
   Colours and type are taken from oneninenordic.com (2026-10-12): slate #2E3A46, navy #0B1620,
   ink #15110D, paper #FAF8F4, cream #FEF6DC, butter #FFF4C2 / #FFEFAE, peach #FFEAD9,
   sage #E0E8D5, dusty blue #9EAFC1, warm orange #CB6700 / #F8A13F.
   Fonts: Instrument Serif (display), Inter Tight (text), JetBrains Mono (one kicker). All OFL, self hosted. */

@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/instrument-serif-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/instrument-serif-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(../fonts/instrument-serif-latin-400-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(../fonts/instrument-serif-latin-ext-400-italic.woff2) format("woff2");
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
/* The serif's 1 reads as an l ("911k" looked like "9llk"), so its digits come from Instrument Sans. Declared after the
   serif's own faces, so for 0 to 9 this one wins (28 Oct 2026). */
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/instrument-sans-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0030-0039; size-adjust: 88%; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(../fonts/instrument-sans-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0030-0039; size-adjust: 88%; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(../fonts/instrument-sans-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(../fonts/instrument-sans-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 300; font-display: swap;
  src: url(../fonts/inter-latin-300-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 300; font-display: swap;
  src: url(../fonts/inter-latin-ext-300-normal.woff2) format("woff2");
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(../fonts/inter-tight-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(../fonts/inter-tight-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); }

:root {
  --slate: #2E3A46;
  --slate-2: #3A4856;
  --navy: #0B1620;
  --ink: #15110D;
  --ink-2: #534B45;          /* brand muted text: 8.6:1 on white */
  --ink-3: #6E655E;          /* quieter, still 5.6:1 on white */
  --paper: #FAF8F4;
  --cream: #FEF6DC;
  --white: #FFFFFF;
  --butter: #FFF4C2;
  --butter-2: #FFEFAE;
  --peach: #FFEAD9;
  --sage: #E0E8D5;
  --dusty: #9EAFC1;
  --dusty-soft: #D8E0E8;
  --orange: #CB6700;
  --orange-text: #9E4F00;    /* orange for small text: 5.9:1 on white, 5.3:1 on butter, 4.7:1 on sage */
  --glow: #F8A13F;
  --line: rgba(26, 21, 18, .14);
  --hair: rgba(26, 21, 18, .08);
  --ok: #2F6B47;
  --ok-bg: #E0E8D5;
  --warn: #8F4C00;
  --warn-bg: #FFF2CC;
  --bad: #B3232A;
  --bad-bg: #FBE3E1;

  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* One type scale, one set of corners (13 Nov 2026, docs/UI-REVIEW-2026-11-13.md). Every font size and radius in
     app.css, v2.css and v3.css names one of these; a new rule does too. --t-tick is for the text inside charts only. */
  --t-tick: 11px; --t-xs: 12px; --t-sm: 13px; --t-base: 14px; --t-md: 15px; --t-lg: 16px; --t-xl: 18px;
  --t-2xl: 22px; --t-3xl: 28px; --t-4xl: 34px;
  --r-xs: 4px; --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-pill: 999px;

  --radius: 12px;
  --radius-s: 8px;
  --gutter: clamp(16px, 5vw, 64px);
  --maxw: 1200px;
  --shadow-elevated: 0 30px 80px -30px rgba(0, 0, 0, .6);   /* brand token, hero card only */
  --ease: cubic-bezier(.22, 1, .36, 1);                       /* ease out quint */

  /* z scale */
  --z-sticky: 20; --z-menu: 30; --z-toast: 40;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--sans); font-size: 1rem; line-height: 1.6; color: var(--ink);
  background: var(--white); font-feature-settings: "ss01", "cv11"; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.num, td.n, .tabular { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
.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; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--butter); color: var(--ink); padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .65rem 1.25rem;
  border-radius: 999px; border: 1px solid transparent; font-weight: 500; font-size: .95rem; line-height: 1.2; text-decoration: none;
  cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease); white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; transition: transform .25s var(--ease); }
.btn:hover svg.arrow { transform: translateX(3px); }
.btn-butter { background: var(--butter); color: var(--ink); }
.btn-butter:hover { background: var(--white); }
.btn-ink { background: var(--ink); color: var(--white); }
.btn-ink:hover { background: var(--slate); }
.btn-slate { background: var(--slate); color: var(--white); }
.btn-slate:hover { background: var(--navy); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.on-dark .btn-ghost { color: var(--white); border-color: rgba(255, 255, 255, .32); }
.on-dark .btn-ghost:hover { border-color: var(--white); background: rgba(255, 255, 255, .06); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-sm { min-height: 36px; padding: .45rem .9rem; font-size: .875rem; }

/* forms */
.field { display: grid; gap: .35rem; }
.field label, .label { font-size: .875rem; font-weight: 500; color: var(--ink); }
.field .hint { font-size: .8125rem; color: var(--ink-2); }
.field .err { font-size: .8125rem; color: var(--bad); }
.input, select.input, textarea.input { width: 100%; min-height: 44px; padding: .6rem .8rem; border: 1px solid var(--line);
  border-radius: var(--radius-s); background: var(--white); transition: border-color .15s, box-shadow .15s; }
.input:hover { border-color: rgba(26, 21, 18, .28); }
.input:focus { outline: none; border-color: var(--slate); box-shadow: 0 0 0 3px rgba(203, 103, 0, .22); }
.input[aria-invalid="true"] { border-color: var(--bad); }
textarea.input { min-height: 110px; resize: vertical; }
.input::placeholder { color: var(--ink-3); }

/* chips */
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem;
  font-weight: 500; line-height: 1.5; white-space: nowrap; }
.chip-ok { background: var(--ok-bg); color: var(--ok); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.chip-bad { background: var(--bad-bg); color: var(--bad); }
.chip-quiet { background: rgba(46, 58, 70, .07); color: var(--slate); }
.chip-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.notice { padding: .8rem 1rem; border-radius: var(--radius-s); font-size: .9rem; }
.notice-bad { background: var(--bad-bg); color: var(--bad); }
.notice-warn { background: var(--warn-bg); color: var(--warn); }
.notice-ok { background: var(--ok-bg); color: var(--ok); }
.notice-quiet { background: var(--paper); color: var(--ink-2); border: 1px solid var(--hair); }

/* the brand wave mark, always cropped by an edge */
.wave { position: absolute; pointer-events: none; user-select: none; height: auto; z-index: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; }
}

/* The message box (5 November 2026, static/js/dock.js): every warning and failure of a page, bottom right, in one
   design. A blue box with a yellow edge; moved aside it leaves a tab at the screen's edge until the message is gone. */
:root { --dock-bg: var(--slate); --dock-ink: #FFFFFF; --dock-line: #F2C230; --dock-link: #FFE27A; }
.oi-docked { display: none !important; }
.oi-dock-holder { display: contents; }
.oi-dock { position: fixed; z-index: 70; right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: min(400px, calc(100vw - 32px)); transition: transform .35s var(--ease, ease); }
.oi-dock.has-fab { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
.oi-dock[hidden] { display: none; }
.oi-dock-card { position: relative; background: var(--dock-bg); color: var(--dock-ink); border: 2px solid var(--dock-line); border-radius: 14px;
  box-shadow: 0 10px 30px rgba(11, 22, 32, .28); padding: 14px 42px 14px 14px; max-height: min(60vh, 520px); overflow: auto; }
.oi-dock-list { display: grid; gap: 12px; }
.oi-dock-item { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; line-height: 1.45; }
.oi-dock-item[hidden] { display: none; }
.oi-dock-item + .oi-dock-item:not([hidden]) { border-top: 1px solid rgba(255, 255, 255, .16); padding-top: 12px; }
.oi-dock-i { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .8rem; margin-top: 1px; }
.oi-dock-item.is-bad .oi-dock-i { background: #F7C9CB; color: var(--bad); }
.oi-dock-item.is-bad .oi-dock-i::after { content: "!"; }
.oi-dock-item.is-warn .oi-dock-i { background: var(--dock-line); color: var(--slate); }
.oi-dock-item.is-warn .oi-dock-i::after { content: "!"; }
.oi-dock-item.is-info .oi-dock-i { background: var(--dusty-soft); color: var(--slate); }
.oi-dock-item.is-info .oi-dock-i::after { content: "i"; }
.oi-dock-item.is-ok .oi-dock-i { background: var(--ok-bg); color: var(--ok); }
.oi-dock-item.is-ok .oi-dock-i::after { content: "✓"; }
.oi-dock-body { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.oi-dock-body p, .oi-dock-body form { margin: 0; }
.oi-dock-body > * + * { margin-top: 6px; }
.oi-dock .oi-dock-body a, .oi-dock .oi-dock-body a:visited { color: var(--dock-link) !important; text-decoration: underline; font-weight: 600; }
.oi-dock-body b, .oi-dock-body strong { color: #fff; }
.oi-dock-body .btn { background: #fff; color: var(--slate); border-color: #fff; }
.oi-dock-body .btn-ghost, .oi-dock-body .linkish { background: transparent; color: var(--dock-link); border-color: rgba(255, 255, 255, .4); }
.oi-dock-body .muted, .oi-dock-body .small { color: rgba(255, 255, 255, .78); }
.oi-dock-x { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; }
.oi-dock-x svg { width: 16px; height: 16px; }
.oi-dock-x:hover, .oi-dock-x:focus-visible { background: rgba(255, 255, 255, .24); }
.oi-dock-tab { position: absolute; top: 12px; left: -46px; width: 46px; min-height: 46px; border: 2px solid var(--dock-line); border-right: 0;
  border-radius: 12px 0 0 12px; background: var(--dock-bg); color: #fff; cursor: pointer; display: none; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; padding: 6px 0; box-shadow: -4px 6px 16px rgba(11, 22, 32, .22); }
.oi-dock-tab-i { width: 20px; height: 20px; border-radius: 50%; background: var(--dock-line); color: var(--slate); font-weight: 700; font-size: .78rem; display: grid; place-items: center; }
.oi-dock-tab-n { font-size: .78rem; font-weight: 600; }
.oi-dock.is-tucked { transform: translateX(calc(100% + 20px + env(safe-area-inset-right, 0px))); }
.oi-dock.is-tucked .oi-dock-tab { display: flex; }
@media (max-width: 560px) { .oi-dock { right: 12px; width: calc(100vw - 24px); } .oi-dock.is-tucked { transform: translateX(calc(100% + 12px)); } }
@media (prefers-reduced-motion: reduce) { .oi-dock { transition: none; } }
.oi-dock-body details > summary { cursor: pointer; }
.oi-dock-body details > summary::marker { color: rgba(255, 255, 255, .7); }
@media (max-width: 720px) { .oi-dock-card { max-height: 38vh; } }
