
:root {
  --paper: #f4efe6;
  --paper-deep: #e7e0d2;
  --ink: #1c1915;
  --ink-soft: #5c564c;
  --line: #d4cbb8;
  --primary: #2f5d4f;
  --primary-fg: #f7f3ea;
  --clay: #8b5e3c;
  --clay-soft: #efe4d6;
  --card: #fbf8f2;
  --warn: #8a5a12;
  --warn-soft: #f6ead4;
  --bad: #8a3030;
  --bad-soft: #f6e4e0;
  --ok: #2f5d4f;
  --ok-soft: #dce6df;
  --display: "Newsreader", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16.5px; line-height: 1.55; min-height: 100dvh; }
body.discreet .money, body.discreet [data-money] { filter: blur(6px); }
body.discreet .money:focus, body.discreet [data-money]:focus { filter: none; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--clay); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: white; padding: 0.5rem 0.8rem; z-index: 50; }
.skip:focus { left: 0.5rem; top: 0.5rem; }
.shell { display: flex; min-height: 100dvh; }
.sidebar { width: 16.75rem; flex-shrink: 0; background: var(--paper-deep); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100dvh; overflow-y: auto; display: none; }
@media (min-width: 960px) { .sidebar { display: flex; flex-direction: column; } }
.brand { padding: 1.2rem 1.1rem 0.9rem; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; display: block; }
.brand strong { display: block; font-family: var(--display); font-size: 1.35rem; font-weight: 500; color: var(--primary); }
.brand span { display: block; font-size: 0.75rem; color: var(--ink-soft); margin-top: 0.2rem; }
.nav .nav-label { margin: 0.85rem 1rem 0.15rem; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); }
.nav a, .nav button.navlink { display: flex; align-items: center; gap: 0.55rem; min-height: 2.5rem; padding: 0.25rem 1rem; text-decoration: none; color: var(--ink); border: 0; border-left: 3px solid transparent; background: transparent; width: 100%; text-align: left; font: inherit; cursor: pointer; }
.nav a:hover, .nav button.navlink:hover { background: var(--paper); }
.nav a.is-current { background: var(--ok-soft); color: var(--primary); border-left-color: var(--primary); }
.nav .n { font-family: var(--mono); font-size: 0.68rem; width: 1.35rem; color: var(--ink-soft); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 1rem; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 90%, white); position: sticky; top: 0; z-index: 5; }
.menu-btn, .exit-btn { display: inline-flex; min-height: 2.75rem; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 2px; cursor: pointer; font: inherit; padding: 0 0.75rem; }
@media (min-width: 960px) { .menu-btn { display: none; } }
.crumb { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-soft); }
.crumb b { font-family: var(--display); font-size: 1.05rem; font-weight: 500; color: var(--ink); margin-left: 0.4rem; }
.content { flex: 1; width: 100%; max-width: 48rem; margin: 0 auto; padding: 1.4rem 1.1rem 6.5rem; }
h1 { font-family: var(--display); font-weight: 500; font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.18; margin: 0 0 0.6rem; }
h2 { font-family: var(--display); font-weight: 500; font-size: 1.32rem; margin: 1.6rem 0 0.45rem; }
h3 { font-size: 1rem; margin: 1rem 0 0.3rem; }
.lede { color: var(--ink-soft); margin: 0 0 1rem; }
.grid { display: grid; gap: 0.7rem; }
@media (min-width: 680px) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: 1fr 1fr 1fr; } }
.card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 2px; padding: 0.9rem 1rem; text-decoration: none; color: inherit; }
a.card:hover { border-color: color-mix(in srgb, var(--primary) 50%, var(--line)); }
.card h2, .card h3 { margin: 0 0 0.2rem; font-family: var(--sans); font-size: 0.98rem; font-weight: 600; }
.card p, .muted { color: var(--ink-soft); font-size: 0.9rem; margin: 0; }
.note, .warn, .bad, .okbox { display: flex; gap: 0.6rem; align-items: flex-start; border: 1px solid var(--line); padding: 0.85rem 0.95rem; margin: 1rem 0; font-size: 0.92rem; }
.note { background: var(--clay-soft); }
.warn { background: var(--warn-soft); }
.bad { background: var(--bad-soft); }
.okbox { background: var(--ok-soft); }
.tag { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.03em; text-transform: uppercase; }
.tag.ok { color: var(--ok); }
.tag.warn { color: var(--warn); }
.tag.bad { color: var(--bad); }
.footer { position: sticky; bottom: 0; border-top: 1px solid var(--line); background: var(--paper-deep); padding: 0.6rem 1rem; font-size: 0.72rem; color: var(--ink-soft); text-align: center; }
label.field { display: block; margin: 0 0 0.8rem; font-size: 0.92rem; }
label.field span { display: block; margin-bottom: 0.25rem; }
select, input[type="text"], input[type="number"], input[type="date"], textarea { width: 100%; min-height: 2.6rem; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; padding: 0.35rem 0.55rem; border-radius: 2px; }
textarea { min-height: 5rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0.4rem 0.95rem; border-radius: 2px; border: 1px solid transparent; background: var(--primary); color: var(--primary-fg); font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; }
.btn:hover { background: #254a3f; color: var(--primary-fg); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: transparent; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.8rem 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.84rem; background: var(--card); }
th, td { border: 1px solid var(--line); padding: 0.45rem 0.5rem; text-align: left; vertical-align: top; }
th { background: var(--paper-deep); font-weight: 500; }
.scroll { overflow-x: auto; margin: 0.6rem 0 1rem; }
.check { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0.5rem 0; }
.check input { margin-top: 0.35rem; }
details.card { padding: 0; }
details.card summary { cursor: pointer; padding: 0.85rem 1rem; font-weight: 600; list-style: none; }
details.card summary::-webkit-details-marker { display: none; }
details.card .inner { padding: 0 1rem 0.9rem; color: var(--ink-soft); font-size: 0.92rem; }
.drawer { display: none; position: fixed; inset: 0; z-index: 20; }
.drawer.is-open { display: block; }
.drawer .scrim { position: absolute; inset: 0; background: #14181273; }
.drawer .panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(18rem, 88vw); background: var(--paper-deep); border-right: 1px solid var(--line); overflow-y: auto; }
.focus-ring:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media print { .sidebar, .top, .footer, .menu-btn, .drawer, .exit-btn { display: none !important; } .content { max-width: none; } body { background: white; } }
