/* Warm paper and forest green reflect the archive's furniture and hand tools. */
* { box-sizing: border-box; }
:root {
  --paper: #f4f1e9;
  --surface: #fffdf8;
  --ink: #243b32;
  --muted: #53635b;
  --line: #d4d9cd;
  --accent: #965336;
}
html { color: var(--ink); background: var(--paper); }
body { margin: 0; font-family: "Segoe UI", Arial, sans-serif; font-size: 18px; line-height: 1.7; overflow-wrap: anywhere; }
.container { padding-inline: clamp(20px, 4vw, 72px); }
a { color: #305b44; text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:visited { color: #586140; }
a:hover { color: var(--accent); text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; border-radius: 2px; }
::selection { color: var(--surface); background: #305b44; }
.skip-link { position: absolute; left: 20px; top: -100px; background: var(--surface); padding: 10px; z-index: 10; }
.skip-link:focus { top: 10px; }
#site-header { background: var(--surface); border-top: 6px solid var(--ink); border-bottom: 1px solid var(--line); padding-block: 26px 24px; }
#site-title { margin: 0 0 24px; font-size: clamp(24px, 2.4vw, 34px); font-weight: 750; letter-spacing: -.045em; line-height: 1.2; }
#site-title a { color: var(--ink); text-decoration: none; }
#site-title a::before { content: ""; display: inline-block; width: 20px; height: 25px; margin-right: 12px; vertical-align: -2px; border: 3px solid var(--accent); border-right-width: 8px; border-radius: 2px 12px 12px 2px; }
.nav, .nav ul { list-style: none; margin: 0; padding: 0; }
.nav { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px 32px; }
.nav > li { min-width: 0; }
.nav > li:has(ul) { flex: 1; }
.nav > li > a { display: inline-block; font-size: 15px; font-weight: 700; text-decoration: none; padding-bottom: 8px; border-bottom: 2px solid var(--accent); }
.nav ul { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; }
.nav ul a { font-size: 14px; color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--accent); text-decoration: underline; }
main { padding-block: clamp(36px, 5vw, 72px) 72px; }
h1, h2, h3 { color: var(--ink); font-weight: 650; letter-spacing: -.035em; }
h1 { font-size: clamp(32px, 3.5vw, 52px); line-height: 1.14; margin: 0 0 32px; padding-bottom: 28px; border-bottom: 1px solid var(--line); text-wrap: pretty; }
h2 { font-size: clamp(25px, 2.3vw, 34px); line-height: 1.25; margin: 40px 0 18px; }
h3 { font-size: 23px; line-height: 1.3; margin: 28px 0 12px; }
p { margin: 0 0 22px; }
ul, ol { padding-left: 26px; }
li { padding-left: 2px; }
.home > h1 { border-bottom: 0; border-left: 5px solid var(--accent); padding: 4px 0 4px 24px; }
.home > h2 { margin-top: 32px; }
.home > p { color: var(--muted); }
.section-index { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; border-top: 1px solid var(--line); margin-top: 56px; padding-top: 28px; }
.section-index > h2 { grid-column: 1 / -1; margin: 0 0 10px; }
.archive-card { position: relative; padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 5px 16px #243b3205; }
.archive-card::before { content: ""; display: block; width: 28px; height: 3px; background: var(--accent); margin-bottom: 24px; }
.archive-card:hover { border-color: #9ba996; }
.archive-card h3 { margin: 0 0 14px; font-size: 23px; }
.archive-card h3 a { text-decoration: none; }
.archive-card h3 a:hover { text-decoration: underline; }
.archive-card p { margin: 0; font-size: 16px; color: var(--muted); line-height: 1.65; }
.section-index > .guide-list { grid-column: 1 / -1; }
.guide-list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin: 0; padding: 0; }
.guide-list li { margin: 0; padding: 16px 0; border-bottom: 1px solid var(--line); }
.guide-list a { font-weight: 600; text-decoration: none; }
.guide-list a:hover { text-decoration: underline; }
.vw-kicker { font-size: 15px; font-weight: 600; letter-spacing: .02em; color: var(--accent); }
.article-photo { margin: 36px 0; }
/* The supplied 800px photo rendition limits upscaling; text uses the full layout. */
.article-photo img { display: block; width: auto; max-width: min(100%, 800px); height: auto; border-radius: 4px; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
td, th { border: 1px solid var(--line); padding: 14px; text-align: left; overflow-wrap: anywhere; }
th { background: #e6ebdf; }
.table-scroll { overflow-x: auto; }
footer { background: #e6ebdf; border-top: 1px solid #c7d0c0; padding-block: 32px 24px; font-size: 16px; }
footer a { color: var(--ink); }
footer details { margin: 24px 0; }
footer summary { cursor: pointer; font-weight: 650; padding-block: 8px; }
.bottom-footer { margin-top: 24px; padding-top: 20px; border-top: 1px solid #c7d0c0; font-size: 14px; color: var(--muted); }
@media (max-width: 1000px) {
  .section-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav { gap: 20px; }
}
@media (max-width: 640px) {
  body { font-size: 17px; line-height: 1.65; }
  #site-header { padding-block: 22px 20px; }
  #site-title { margin-bottom: 24px; }
  .nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 12px; }
  .nav > li:has(ul) { grid-column: 1 / -1; }
  .nav > li:nth-child(1) { grid-row: 1; grid-column: 1; }
  .nav > li:nth-child(4) { grid-row: 1; grid-column: 2; }
  .nav > li:nth-child(5) { grid-row: 1; grid-column: 3; }
  .nav ul { gap: 6px 16px; margin-top: 5px; }
  .nav a { padding-block: 3px; }
  main { padding-block: 36px 48px; }
  h1 { margin-bottom: 26px; padding-bottom: 22px; }
  .home > h1 { padding-left: 18px; }
  h2 { margin-top: 32px; }
  .section-index { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 40px; padding-top: 24px; }
  .archive-card { padding: 22px; }
  .guide-list { grid-template-columns: minmax(0, 1fr); }
  td, th { padding: 10px; }
}
