/* gurny.com — shared stylesheet for all pages (cover, register, vault, working life, start).
   Palette: ink / paper / brass. Fonts are self-hosted in /fonts (no third-party requests). */

/* ── Fonts ─────────────────────────────────────────────────── */
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(fonts/newsreader-latin-standard-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+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 200 800; font-display: swap;
  src: url(fonts/newsreader-latin-standard-italic.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(fonts/newsreader-latin-ext-standard-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 200 800; font-display: swap;
  src: url(fonts/newsreader-latin-ext-standard-italic.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@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");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@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");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/ibm-plex-mono-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(fonts/ibm-plex-mono-latin-ext-500-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* ── Tokens ────────────────────────────────────────────────── */
:root {
  --ink: #14161a;          /* deep blue-black */
  --ink-soft: #1d2026;     /* panels */
  --ink-line: #23262c;     /* table rules */
  --paper: #e8e2d5;        /* archive paper */
  --paper-dim: #b9b2a2;    /* secondary text, 7.7:1 on panels */
  --muted: #9a9ea6;        /* tertiary text, 6.1:1 */
  --faint: #8d9199;        /* gap notes, 5.2:1 */
  --gold: #c2a15c;         /* brass — accents, 7.4:1 */
  --gold-text: #ad9560;    /* brass for small running text, 5.6:1 */
  --gold-dim: #8a7443;     /* brass for borders only (not text) */
  --line: #3a3e46;
  --err: #d9736b;
  --c-base: #b58a3a; --c-bonus: #4f86d6; --c-tax: #c4564f; --c-div: #9a6fd0; --c-rest: #565b63;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --pad-x: clamp(1.2rem, 6vw, 5rem);
  --label: 0.75rem;        /* minimum size for anything meant to be read */
}

/* ── Base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { background: var(--ink); color: var(--paper); font-family: var(--serif); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
button, input { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
i.de, .de { font-style: italic; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: absolute; left: 1rem; top: -3rem; background: var(--gold); color: var(--ink); padding: 0.5rem 0.9rem; font-family: var(--mono); font-size: var(--label); letter-spacing: 0.1em; text-transform: uppercase; z-index: 100; }
.skip-link:focus { top: 1rem; text-decoration: none; }

/* ── Header / footer ───────────────────────────────────────── */
.site-header { padding: 1.8rem var(--pad-x) 0; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem 1.5rem; flex-wrap: wrap; }
.wordmark { font-size: 1rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--paper-dim); white-space: nowrap; }
.wordmark b { color: var(--paper); font-weight: 600; }
.wordmark a { color: inherit; }
.wordmark .sect { color: var(--paper-dim); }
.site-nav { display: flex; gap: 0.4rem 1.4rem; flex-wrap: wrap; font-family: var(--mono); font-size: var(--label); letter-spacing: 0.12em; text-transform: uppercase; }
.site-nav a { white-space: nowrap; color: var(--gold-text); }
.site-nav a[aria-current="page"] { color: var(--paper); border-bottom: 1px solid var(--gold-dim); }
@media (max-width: 480px) { .site-header .est { display: none; } }

.site-footer { margin-top: auto; border-top: 1px solid var(--line); padding: 1.4rem var(--pad-x) 2rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-size: 0.82rem; color: var(--paper-dim); }
.site-footer .mono { font-size: var(--label); letter-spacing: 0.06em; color: var(--muted); }

/* ── Layout ────────────────────────────────────────────────── */
.wrap { max-width: 64rem; width: 100%; margin: 0 auto; padding: 0 var(--pad-x) 4rem; }
.wrap-narrow { max-width: 46rem; }
.intro { margin: 2.6rem 0 1.4rem; max-width: 46rem; }
.intro h1, h1.display { font-weight: 400; font-size: clamp(1.75rem, 4vw, 2.6rem); line-height: 1.15; text-wrap: balance; }
h1 em, .display em { font-style: italic; color: var(--gold); }
.credo { margin-top: 1rem; color: var(--paper-dim); font-size: 1.05rem; max-width: 46rem; }
.credo a, .prose a { color: var(--gold); border-bottom: 1px solid var(--gold-dim); }
.credo a:hover, .prose a:hover { text-decoration: none; color: var(--paper); }
.prose p + p { margin-top: 0.8rem; }
.prose h3 { font-family: var(--sans); font-size: 1rem; font-weight: 600; margin: 1.6rem 0 0.4rem; }

h2.sect { font-family: var(--mono); font-weight: 500; font-size: var(--label); letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); border-bottom: 1px solid var(--line); padding-bottom: 0.5rem; margin: 2.8rem 0 1.2rem; scroll-margin-top: 4.2rem; }
.note { margin: 1.6rem 0; border: 1px dashed var(--gold-dim); padding: 0.75rem 1rem; font-family: var(--mono); font-size: var(--label); letter-spacing: 0.03em; line-height: 1.6; color: var(--gold-text); }
.note a { color: var(--gold); }
.note.serif { font-family: var(--serif); font-size: 0.95rem; letter-spacing: 0; color: var(--paper-dim); }

/* ── Chips, buttons, inputs ────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--paper-dim); border: 1px solid var(--line); background: none; padding: 0.42rem 0.8rem; cursor: pointer; transition: border-color .2s ease, color .2s ease; border-radius: 2px; }
.chip:hover { border-color: var(--gold-dim); color: var(--paper); }
.chip[aria-pressed="true"], .chip.active { border-color: var(--gold); color: var(--gold); }
.chip .n { color: var(--muted); margin-left: 0.35em; }
.btn { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.8rem 1.4rem; border: 1px solid var(--gold); color: var(--gold); background: none; font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; cursor: pointer; transition: background .25s ease, color .25s ease; border-radius: 2px; white-space: nowrap; }
.btn:hover { background: var(--gold); color: var(--ink); text-decoration: none; }
.btn.ghost { border-color: var(--line); color: var(--paper-dim); }
.btn.ghost:hover { background: var(--ink-soft); color: var(--paper); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.small { padding: 0.5rem 0.9rem; font-size: 0.72rem; }
input[type="password"], input[type="search"], input[type="text"] { background: var(--ink); border: 1px solid var(--line); color: var(--paper); font-family: var(--mono); font-size: 0.95rem; padding: 0.7rem 0.9rem; border-radius: 2px; min-width: 0; }
input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(194,161,92,0.25); }
input::placeholder { color: var(--muted); }
.field { display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: center; }
.field input { flex: 1; }
.msg { font-family: var(--mono); font-size: var(--label); margin-top: 0.8rem; color: var(--gold-text); min-height: 1.3em; line-height: 1.5; }
.msg.err { color: var(--err); }

/* ── Tiles & panels ────────────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1rem; }
.tile { border: 1px solid var(--line); background: var(--ink-soft); padding: 1.1rem 1.2rem; }
.tile .label { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper-dim); }
.tile .value { font-family: var(--sans); font-weight: 600; font-size: 1.9rem; margin-top: 0.35rem; line-height: 1.15; }
.tile .value.small { font-size: 1.4rem; }
.tile .sub { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); margin-top: 0.3rem; line-height: 1.5; }
.tile .sub.text { font-family: var(--serif); font-size: 0.92rem; color: var(--paper-dim); }  /* multi-line explanations: serif, not mono */
.tile.pending { border-style: dashed; opacity: 0.8; }
.panel { border: 1px solid var(--line); background: var(--ink-soft); padding: 1.3rem 1.4rem 1.5rem; }
.panel + .panel, .kpis + .panel, .panel + .kpis { margin-top: 1.2rem; }
.panel h3 { font-family: var(--sans); font-size: 1rem; font-weight: 600; }
.panel .sub { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; line-height: 1.55; }
.panel .sub.text { font-family: var(--serif); font-size: 0.95rem; color: var(--paper-dim); }
.panel .sub a { color: var(--gold); }

/* timeline rows (career / property / grandfather) */
.tl { margin-top: 0.9rem; font-size: 0.95rem; }
.tl-row { display: flex; gap: 1.1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.tl-row:last-child { border-bottom: 0; }
.tl-row .when { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); min-width: 6.5rem; padding-top: 0.2rem; flex-shrink: 0; }
@media (max-width: 480px) { .tl-row { flex-direction: column; gap: 0.15rem; } .tl-row .when { min-width: 0; } }

/* ── Document type icons ───────────────────────────────────── */
.ticon { width: 1.25rem; height: 1.25rem; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

/* ── Sticky in-page bar (register filters / chapter nav) ───── */
.stickybar { position: sticky; top: 0; z-index: 20; background: rgba(20,22,26,0.94); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); margin: 0 calc(-1 * var(--pad-x)); padding: 0.6rem var(--pad-x); }
.chapters { display: flex; gap: 0.3rem 1.2rem; flex-wrap: wrap; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; }
.chapters a { color: var(--muted); white-space: nowrap; padding: 0.2rem 0; border-bottom: 1px solid transparent; }
.chapters a:hover { color: var(--paper); text-decoration: none; }
.chapters a.current { color: var(--gold); border-bottom-color: var(--gold-dim); }
@media (max-width: 600px) { .chapters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 0.2rem; } .chapters::-webkit-scrollbar { display: none; } }

.totop { position: fixed; right: 1rem; bottom: 1rem; z-index: 30; width: 2.6rem; height: 2.6rem; border: 1px solid var(--line); background: var(--ink-soft); color: var(--gold); font-family: var(--mono); font-size: 1rem; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .25s ease; border-radius: 2px; }
.totop.show { opacity: 1; pointer-events: auto; }
.totop:hover { border-color: var(--gold); }

/* ── Tables ────────────────────────────────────────────────── */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tb-scroll { position: relative; }
.tb-scroll::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 3rem; background: linear-gradient(to right, transparent, var(--ink-soft)); pointer-events: none; transition: opacity .2s; }
.tb-scroll.tb-end::after { opacity: 0; }
table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 0.86rem; }
th { text-align: left; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--paper-dim); font-weight: 400; border-bottom: 1px solid var(--line); padding: 0.5rem 0.55rem; white-space: nowrap; }
td { border-bottom: 1px solid var(--ink-line); padding: 0.5rem 0.55rem; color: var(--paper); white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.src { color: var(--muted); font-size: 0.78rem; white-space: normal; min-width: 14rem; }
td.na { color: var(--faint); text-align: right; }
th.sticky, td.sticky { position: sticky; left: 0; background: var(--ink-soft); z-index: 1; box-shadow: 1px 0 0 var(--line); }

/* ── Footnotes ─────────────────────────────────────────────── */
.fn { font-size: 0.86rem; color: var(--muted); max-width: 52rem; margin-top: 2rem; padding-left: 0; list-style: none; counter-reset: fn; }
.fn li { position: relative; padding-left: 1.6rem; margin-top: 0.7rem; scroll-margin-top: 4.5rem; }
.fn li::before { counter-increment: fn; content: counter(fn); position: absolute; left: 0; top: 0.1rem; font-family: var(--mono); font-size: 0.72rem; color: var(--gold-text); }
.fn li:target { color: var(--paper-dim); }
.fn li:target::before { color: var(--gold); }
.fn .back { font-family: var(--mono); font-size: 0.7rem; margin-left: 0.4rem; }
a.fnref { font-family: var(--mono); font-size: 0.72em; vertical-align: super; line-height: 0; color: var(--gold); padding: 0 0.1em; }
a.fnref:hover { text-decoration: none; color: var(--paper); }

/* ── Print ─────────────────────────────────────────────────── */
@media print {
  :root { --ink: #fff; --ink-soft: #fff; --ink-line: #ddd; --paper: #111; --paper-dim: #333; --muted: #555; --faint: #777; --gold: #7a5c1e; --gold-text: #7a5c1e; --gold-dim: #b9a26f; --line: #bbb; }
  body { background: #fff; color: #111; font-size: 11pt; }
  .site-header, .stickybar, .totop, .skip-link, .site-nav, .noprint { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .panel, .tile { border: 1px solid #bbb; break-inside: avoid; background: #fff; }
  .tablewrap { overflow: visible; }
  table { font-size: 8.5pt; min-width: 0 !important; }
  td, th { white-space: normal; }
  .tablewrap.scrollable::after { display: none; }
  h2.sect { break-after: avoid; }
  a { color: inherit; }
  .print-head { display: block !important; font-family: var(--mono); font-size: 8pt; color: #555; border-bottom: 1px solid #bbb; padding-bottom: 4pt; margin-bottom: 12pt; }
  svg text { fill: #333 !important; }
}
.print-head { display: none; }
