@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  --font-ui: "Instrument Sans", "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --light-background: #f4f3ee;
  --light-paper: #fffefa;
  --light-ink: #162926;
  --light-muted: #53635e;
  --light-line: #dcded4;
  --light-green: #14544b;
  --light-sage: #e3eeea;
  --bg: var(--light-background);
  --paper: var(--light-paper);
  --ink: var(--light-ink);
  --muted: var(--light-muted);
  --line: var(--light-line);
  --green: var(--light-green);
  --sage: var(--light-sage);
  --subtle: #f0f3ed;
  --lead: #edf3e9;
  --radius: 12px;
  --surface-top: #ffffff;
  --surface-bottom: #fcfdfb;
  --control-surface: #ffffff;
  --edge-highlight: #ffffff;
  --wash: #ebf1ed;
  --canvas: #eeece4;
  --edition-accent: #975a2d;
  --editorial-rule: #b98251;
  --button-edge: #ffffff38;
  --action-bottom: #174530;
  --shadow-small: 0 1px 2px #14291c05, 0 4px 12px -6px #14291c12;
  --shadow-raised: 0 2px 4px #14291c06, 0 14px 32px -16px #14291c32;
  --shadow-overlay: 0 12px 32px #14291c18, 0 40px 100px -28px #14291c55;
  --shadow-focus: 0 0 0 3px var(--sage);
  --radius-panel: 14px;
  --radius-control: 8px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --motion-fast: 160ms;
  --motion-panel: 220ms;
}
:root[data-theme="dark"] {
  --bg: #101c1c;
  --paper: #172725;
  --ink: #eff1e9;
  --muted: #b2c3bc;
  --line: #354945;
  --green: #a7d9c8;
  --sage: #28443e;
  --subtle: #223027;
  --lead: #26392b;
  --surface-top: #20322e;
  --surface-bottom: #172725;
  --control-surface: #142320;
  --edge-highlight: #ffffff0d;
  --wash: #233833;
  --canvas: #172421;
  --edition-accent: #f0bc82;
  --editorial-rule: #b78052;
  --button-edge: #ffffff46;
  --action-bottom: #95c5b6;
  --shadow-small: 0 1px 2px #0002, 0 4px 12px -6px #0005;
  --shadow-raised: 0 2px 4px #0003, 0 14px 32px -16px #0009;
  --shadow-overlay: 0 12px 32px #0004, 0 40px 100px -28px #000a;
}
body { font-family: var(--font-ui); -webkit-font-smoothing: antialiased; }
body { font-optical-sizing: auto; }
button, input, select, textarea { font-family: inherit; }
input, select, textarea { color: var(--ink); background-color: var(--control-surface); }
input::placeholder, textarea::placeholder { color: var(--placeholder); opacity: 1; }
button, summary, a { text-underline-offset: .2em; }
button:disabled, select:disabled, fieldset:disabled :is(input, textarea, button) { cursor: not-allowed; }
:is(button, a)[aria-busy="true"] { cursor: progress; }
::selection { background: var(--sage); color: var(--ink); }
:is(input, textarea, select) { transition: border-color var(--motion-fast), background-color var(--motion-fast); }
:is(input, textarea, select):not(:disabled):hover { border-color: var(--accent-line); }
:is(input, textarea, select):focus-visible { border-color: var(--focus); }
:is(input, textarea):user-invalid { border-color: var(--error); }
.button, .cmd-pill, .theme-select, .dialog-close {
  transition: background-color var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast), transform var(--motion-fast) var(--ease-out);
}
.button { border-radius: var(--radius-control); letter-spacing: -.015em; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.button.primary { background: linear-gradient(180deg, var(--green), var(--action-bottom)); box-shadow: inset 0 1px 0 var(--button-edge), 0 2px 5px #14291c17; }
.button.primary:not(:disabled):hover { background: var(--action-hover); }
.button.secondary { background: var(--paper); box-shadow: var(--shadow-small); }
.button:disabled { box-shadow: none; }
.segmented { box-shadow: inset 0 1px 2px #14291c06; }
.segmented button { transition: background-color var(--motion-fast), color var(--motion-fast); }
.segmented button[aria-pressed="true"] { box-shadow: var(--shadow-small), 0 0 0 1px var(--line); }
.site-header { background: var(--paper); box-shadow: 0 1px 8px #14291c05; }
@supports (backdrop-filter: blur(12px)) {
  .site-header { background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(12px); }
}
.site-header .brand { letter-spacing: -.055em; }
.site-header .brand-icon { border-radius: 8px; transition: transform 240ms var(--ease-out); }
.site-header .site-nav a { transition: color var(--motion-fast), border-color var(--motion-fast); }
.site-header .site-nav a:hover { text-decoration: none; border-bottom-color: var(--accent-line); }
.site-header .site-nav a[aria-current="page"] { border-bottom-color: var(--green); }
.site-tools .theme-select { width: auto; background-color: var(--control-surface); font-size: 12px; }
.site-header .site-nav > a { position: relative; padding-inline: 2px; }
.site-header .site-nav a[aria-current="page"] { color: var(--green); }
.site-header :is(.brand-name, .site-nav a) { font-weight: 650; }
.site-header .brand-icon { box-shadow: 0 1px 0 #ffffff48, 0 3px 9px #132c3129; }
.site-header { border-bottom-color: var(--line); }
.site-footer { border-top-color: var(--line); }
.text-button { transition: color var(--motion-fast), background-color var(--motion-fast); }
.text-button:hover { color: var(--green); }
.eyebrow { color: var(--green); }
.site-footer { position: relative; }
.site-footer::before { content: ""; position: absolute; inset: -1px 0 auto auto; width: 38px; height: 2px; background: var(--accent-line); }
.site-footer a { text-underline-offset: 4px; }
.site-footer p { margin: 0; }
.skip { color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-raised); }
:is(dialog[open], .saved-views-panel, .source-popover) { box-shadow: var(--shadow-overlay); }
dialog[open]:not(.dossier-drawer) { animation: surface-enter var(--motion-panel) var(--ease-out); }
summary { list-style-position: inside; }
summary::marker { color: var(--muted); font-size: .8em; }
details[open] > summary::marker { color: var(--green); }
@media (hover: hover) and (pointer: fine) {
  .site-header .brand:hover .brand-icon { transform: perspective(400px) rotateY(-10deg) rotateZ(-3deg) translateY(-1px); }
  .button:not(:disabled):hover { transform: translateY(-1px); }
  :is(.button, .cmd-pill, .dialog-close):not(:disabled):active { transform: translateY(1px); }
}
/* Motion communicates a newly opened surface, without scroll listeners or loops. */
@keyframes surface-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes drawer-enter {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}
@media (max-width: 760px) {
  :is(input:not([type="checkbox"], [type="radio"]), textarea, select) { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .site-header .brand .brand-icon, .button, .reading .story { transform: none !important; }
}
@media (forced-colors: active) {
  .button, .segmented button[aria-pressed="true"] { border: 1px solid ButtonText; }
  :is(button, a):is([aria-pressed="true"], [aria-current="page"]) { outline: 1px solid Highlight; }
}
