:root {
  color-scheme: light;
  --bg: #f6f6f2;
  --surface: #e9ede6;
  --ink: #1e2820;
  --muted: #515e53;
  --accent: #214936;
  --accent-ink: #fff;
  --line: #b7c3b7;
  --face: system-ui, -apple-system, sans-serif;
  --display: var(--face);
  --radius: 8px;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 20px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.58 var(--face); }
[hidden] { display: none !important; }
a { color: inherit; }
a:hover { text-decoration-thickness: 2px; }
a, button, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button, summary, select { cursor: pointer; }
h1, h2, p, figure, ul, ol { margin: 0; }
h1, h2 { font-family: var(--display); line-height: 1.03; text-wrap: balance; }
h1 { max-width: 15ch; font-size: clamp(2.65rem, 6.7vw, 6rem); letter-spacing: -.062em; font-weight: 660; }
h2 { font-size: clamp(1.75rem, 3.3vw, 3rem); letter-spacing: -.045em; }
p { max-width: 66ch; }
img { display: block; max-width: 100%; height: auto; }
small, figcaption, .muted { color: var(--muted); }
small, figcaption { font-size: .88rem; }
figcaption { padding-top: 8px; }
.wrap { width: min(100% - 72px, 1232px); margin-inline: auto; }
.top { min-height: 86px; display: flex; align-items: center; gap: 28px; }
.wordmark { display: inline-flex; gap: 10px; align-items: center; font-weight: 740; font-size: 1.13rem; white-space: nowrap; text-decoration: none; }
.mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); font-size: 1rem; }
.top nav { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 4px 22px; margin-left: auto; }
.top nav a { text-decoration: none; min-height: 44px; display: inline-grid; align-items: center; font-size: .92rem; }
.top nav a:hover { text-decoration: underline; }
.primary, .outline, .switch button {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  width: fit-content; padding: 8px 18px; border: 0; border-radius: var(--radius);
  text-decoration: none; font-weight: 620;
  transition: transform .15s ease, opacity .15s ease;
}
.primary { background: var(--accent); color: var(--accent-ink); }
.outline, .switch button { background: var(--surface); color: var(--ink); }
.primary:hover, .outline:hover, .switch button:hover { opacity: .83; }
.primary:active, .outline:active, .switch button:active { transform: translateY(2px); }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.27rem); margin-top: 22px; max-width: 43ch; }
.lead + .primary { margin-top: 25px; }
.cover { width: 100%; height: 100%; object-fit: cover; }
.section, .text-section { padding-block: clamp(40px, 7vw, 88px); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 28px; }
.text-section { display: grid; grid-template-columns: 1fr 1.4fr; align-items: start; gap: 24px 44px; }
.text-section p { max-width: 53ch; }
.switch { display: flex; flex-wrap: wrap; gap: 8px; }
.switch button { font-size: .9rem; }
.switch button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.entry { padding: 0 16px; margin-bottom: 6px; background: var(--surface); border-radius: var(--radius); }
.entry summary {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  gap: 14px; min-height: 69px; padding: 12px 0; list-style: none;
}
.entry summary::-webkit-details-marker { display: none; }
.entry summary > span:last-child { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .9rem; }
.entry summary > span:last-child::after { content: "+"; display: inline-block; width: 1em; margin-left: 12px; color: var(--accent); font-weight: 750; }
.entry[open] summary > span:last-child::after { content: "−"; }
.entry summary:hover strong { text-decoration: underline; }
.entry strong { font-size: 1.04rem; font-weight: 650; }
.entry small { display: block; margin-top: 2px; }
.entry p { padding: 0 0 18px; }
.select-label, .search-label, dialog label, .editor > label { display: grid; gap: 7px; font-weight: 630; }
.select-label { margin-top: 24px; width: min(100%, 265px); }
input:not([type="checkbox"]), select, textarea {
  min-height: 44px; width: 100%; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 8px 12px;
}
input[type="checkbox"] { accent-color: var(--accent); }
textarea { resize: vertical; }
.foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; padding-block: 24px 32px; font-size: .88rem; color: var(--muted); }
.foot strong { color: var(--ink); }
.foot a { margin-left: auto; min-height: 44px; display: inline-grid; align-items: center; }
dialog {
  width: min(100% - 32px, 450px); max-height: calc(100% - 32px); overflow: auto;
  padding: 28px; border: 0; border-radius: 12px; color: var(--ink); background: var(--bg);
}
dialog::backdrop { background: #121714b0; }
dialog form { display: grid; gap: 16px; }
dialog form > p { color: var(--muted); }
dialog .primary { width: 100%; }
dialog .error { color: #8f2731; }
.close { margin-left: auto; border: 0; width: 44px; height: 44px; background: var(--surface); border-radius: var(--radius); font-size: 1.4rem; line-height: 1; }

.entry { min-width: 0; }
.checklist label, .editor-options label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }

@media (max-width: 720px) {
  .wrap { width: calc(100% - 32px); }
  .top { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-height: 0; padding-block: 12px; gap: 5px 12px; }
  .top nav { grid-row: 2; grid-column: 1 / -1; justify-content: flex-start; margin-left: 0; gap: 0 16px; }
  .top > .outline { grid-row: 1; grid-column: 2; }
  .wordmark { white-space: normal; }
  .text-section { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .entry summary { gap: 8px; }
  .entry summary > span:last-child::after { margin-left: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}
