:root {
  --font-serif: "Instrument Serif";
  --font-sans: "Geist";
  --bg: #F8F6F1;
  --bg-2: rgba(23, 23, 23, 0.035);
  --bg-3: rgba(23, 23, 23, 0.06);
  --page-glow: none;
  --fg: #171717;
  --muted: #706D68;
  --card-bg: rgba(23, 23, 23, 0.03);
  --card-border: #DAD6CF;
  --card-shadow: none;
  --separator: #DAD6CF;
  --field-bg: #FFFFFF;
  --field-border: #CDC8BF;
  --focus: #171717;
  --accent: #171717;
  --accent-hover: #000000;
  --on-accent: #F8F6F1;
  --accent-soft: rgba(23, 23, 23, 0.08);
  --link-line: rgba(23, 23, 23, 0.3);
  --portrait-paper: #F8F6F1;
  --measure: 40rem;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #080808;
    --bg-2: rgba(240, 238, 233, 0.05);
    --bg-3: rgba(240, 238, 233, 0.09);
    --page-glow: none;
    --fg: #F0EEE9;
    --muted: #A8A49E;
    --card-bg: rgba(240, 238, 233, 0.04);
    --card-border: #373735;
    --card-shadow: none;
    --separator: #373735;
    --field-bg: #080808;
    --field-border: #4A4946;
    --focus: #F0EEE9;
    --accent: #F0EEE9;
    --accent-hover: #D1CEC7;
    --on-accent: #080808;
    --accent-soft: rgba(240, 238, 233, 0.12);
    --link-line: rgba(240, 238, 233, 0.36);
    --portrait-paper: #F8F6F1;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #080808;
  --bg-2: rgba(240, 238, 233, 0.05);
  --bg-3: rgba(240, 238, 233, 0.09);
  --page-glow: none;
  --fg: #F0EEE9;
  --muted: #A8A49E;
  --card-bg: rgba(240, 238, 233, 0.04);
  --card-border: #373735;
  --card-shadow: none;
  --separator: #373735;
  --field-bg: #080808;
  --field-border: #4A4946;
  --focus: #F0EEE9;
  --accent: #F0EEE9;
  --accent-hover: #D1CEC7;
  --on-accent: #080808;
  --accent-soft: rgba(240, 238, 233, 0.12);
  --link-line: rgba(240, 238, 233, 0.36);
  --portrait-paper: #F8F6F1;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
::selection { background: var(--accent-soft); color: var(--fg); }
body {
  margin: 0; min-height: 100svh;
  background: var(--bg); background-image: var(--page-glow); background-repeat: no-repeat;
  color: var(--fg);
  font-family: var(--font-sans), ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem; line-height: 1.6;
  font-feature-settings: "kern", "liga", "calt";
}
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; text-decoration-color: var(--link-line); transition: text-decoration-color .12s ease, color .12s ease; }
a:hover { text-decoration-color: var(--fg); }
:root[data-theme="dark"] a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2 { font-family: var(--font-serif), Georgia, "Times New Roman", serif; font-weight: 400; font-synthesis: none; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: 1.5rem; line-height: 1.15; }
.meta { color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.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; }

.frame { max-width: calc(var(--measure) + 32px); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 28px 8px; }
.site-name { font-family: var(--font-serif), Georgia, serif; font-size: 1.625rem; line-height: 1; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { padding: 6px 10px; white-space: nowrap; color: var(--muted); font-size: .875rem; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .35em; }
.site-nav a:hover { color: var(--fg); text-decoration-color: var(--fg); }

/* paper · ink: the two modes, named */
.mode { display: flex; align-items: baseline; gap: 6px; margin-left: 14px; font-size: .875rem; color: var(--muted); white-space: nowrap; }
.mode button { padding: 6px 0; border: 0; background: none; font: inherit; color: var(--muted); cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .35em; }
.mode button:hover { color: var(--fg); }
.mode button[aria-pressed="true"] { color: var(--fg); text-decoration-color: var(--fg); cursor: default; }
html.theming, html.theming * { transition: background-color .35s ease, color .35s ease, border-color .35s ease, text-decoration-color .35s ease !important; }

main { padding-block: 28px 0; }

/* The moving portrait goes here. Until then, an empty square of the same size. */
.portrait-wrap { display: flex; justify-content: center; margin: -8px 0 12px; }
.portrait { display: block; width: min(460px, 100%); height: auto; aspect-ratio: 1; }



.bio p { margin: 0 0 1.1em; font-size: 1rem; line-height: 1.75; }

.section { margin-top: 48px; }
.section > h2 { margin: 0 0 14px; }
.section-text { margin: 0; font-size: 1rem; line-height: 1.75; }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.link-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; font-size: 1rem; }
.link-list .meta { white-space: nowrap; flex: none; }

.subscribe { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--fg); }
.subscribe h2 { margin: 0 0 6px; }
.subscribe p { margin: 0 0 16px; color: var(--muted); font-size: .9375rem; line-height: 1.65; }
.subscribe-form { display: flex; flex-wrap: wrap; gap: 8px; }
.subscribe-form input[type="email"] { flex: 1 1 220px; min-width: 0; height: 40px; padding: 0 16px; border: 1px solid var(--field-border); border-radius: 2px; background: var(--field-bg); color: var(--fg); font: inherit; font-size: .875rem; }
.subscribe-form input[type="email"]:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--accent-soft); }
.subscribe-form button { height: 40px; padding: 0 18px; border: 0; border-radius: 2px; background: var(--accent); color: var(--on-accent); font: 500 .875rem/1 var(--font-sans), system-ui, sans-serif; cursor: pointer; }
.subscribe-form button:hover { background: var(--accent-hover); }

.site-footer { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; margin-top: 72px; padding-block: 20px 40px; border-top: 1px solid var(--separator); color: var(--muted); font-size: .8125rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--fg); }

@media (max-width: 47.99rem) {
  .site-header { padding-block: 20px 4px; }
  .site-header { flex-wrap: wrap; row-gap: 2px; }
  .site-nav { margin-left: -6px; }
  .site-nav a { padding: 6px 6px; }
  .mode { margin-left: 6px; }
  .site-nav .nav-wide { display: none; }
  .link-list li { flex-direction: column; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* Article pages */
.article-head { display: grid; gap: 14px; margin-bottom: 28px; }
.article-head h1 { margin: 0; font-size: 2.8rem; line-height: 1.05; }
.prose { font-size: 1rem; line-height: 1.75; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul { margin: 0 0 1.25em; }
.prose h2 { margin: 2em 0 .6em; font-size: 1.75rem; line-height: 1.15; }
.prose ul { padding-left: 1.4em; }
.prose li { margin: .45em 0; }
.prose li::marker { color: var(--muted); }
.prose strong { font-weight: 600; }
.more { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--separator); color: var(--muted); font-size: .8125rem; line-height: 2; }
.more a { color: var(--muted); }
.more a:hover { color: var(--fg); }
@media (max-width: 47.99rem) {
  .article-head h1 { font-size: 2.25rem; }
}

/* Field kit */
.kit-intro { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.kit-tools { display: grid; gap: 12px; margin: 8px 0 20px; }
.kit-filter { display: flex; align-items: baseline; gap: 8px; color: var(--muted); font-size: .875rem; }
.kit-filter button { padding: 4px 0; border: 0; background: none; font: inherit; color: var(--muted); cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .35em; }
.kit-filter button:hover { color: var(--fg); }
.kit-filter button[aria-pressed="true"] { color: var(--fg); text-decoration-color: var(--fg); }
.kit-search { width: 100%; height: 42px; padding: 0 14px; border: 1px solid var(--field-border); border-radius: 2px; background: var(--field-bg); color: var(--fg); font: inherit; font-size: .9375rem; }
.kit-search::placeholder { color: var(--muted); }
.kit-search:focus { outline: none; border-color: var(--focus); }
.kit-count { margin: 0; }
.kit-list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--separator); }
.kit-item { padding: 20px 0 18px; border-top: 1px solid var(--separator); }
.kit-item[hidden] { display: none; }
.kit-item .meta { margin: 0 0 4px; }
.kit-item h2 { margin: 0 0 8px; font-size: 1.375rem; line-height: 1.2; }
.kit-item p { margin: 0; font-size: .9375rem; line-height: 1.7; }
.kit-item .kit-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 10px; font-size: .875rem; }
.kit-empty { margin: 20px 0 0; color: var(--muted); }
.more-link { display: inline-block; margin-top: 16px; font-size: .9375rem; }
.article-head .meta { margin: 0; }
.article-head .dek { margin: 0; font-family: var(--font-serif), Georgia, serif; font-style: italic; font-size: 1.375rem; line-height: 1.3; color: var(--muted); }

/* Field notes: numbered essays */
.essay-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; }
.essay-list .meta { margin: 0 0 2px; letter-spacing: .02em; }
.essay-title { font-family: var(--font-serif), Georgia, serif; font-size: 1.5rem; line-height: 1.2; text-decoration: none; }
.essay-title:hover { text-decoration: underline; text-decoration-color: var(--fg); }
.essay-q { margin: 4px 0 0; color: var(--muted); font-size: .9375rem; line-height: 1.6; }


/* Wall of Winners */
.winners-intro { margin: 0 0 28px; font-size: 1rem; line-height: 1.75; }
.winners { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 24px 20px; }
.winners a { display: grid; gap: 8px; text-decoration: none; font-size: .9375rem; line-height: 1.45; }
.winners a:hover span { text-decoration: underline; text-decoration-color: var(--fg); }
.winners img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 2px; background: var(--bg-2); }
