/* The Human Ascent: shared styles.
   Palette: cool paper and navy ink; the night sky only appears in the home hero.
   Type: Archivo (wide for the name and headings, normal width for interface text), Source Serif 4 for reading text. */
:root {
  --paper: #eef1f5;
  --panel: #f8fafc;
  --text: #0f1b2d;
  --text-2: #44526a;
  --text-3: #6b778c;
  --line: #d3d9e2;
  --line-2: #e3e8ef;
  --wash: rgba(15, 27, 45, 0.05);
  --sky-top: #070e22;
  --sky-mid: #18284f;
  --sky-low: #5d719a;
  --on-sky: #f2f5fa;
  --on-sky-2: #b9c4d8;
  --dem: #2a78d6;
  --aut: #eda100;
  --col: #eb6834;
  --oth: #898781;
  --ui: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --measure: 66ch;
  --wide: 1180px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0b1220; --panel: #121b2c; --text: #e6ecf5; --text-2: #a9b4c6; --text-3: #7d899c;
    --line: #243047; --line-2: #1a2436; --wash: rgba(230, 236, 245, 0.06);
    --sky-top: #02040a; --sky-mid: #0a1430; --sky-low: #24365e;
    --dem: #3987e5; --aut: #c98500; --col: #d95926; --oth: #7d899c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0b1220; --panel: #121b2c; --text: #e6ecf5; --text-2: #a9b4c6; --text-3: #7d899c;
  --line: #243047; --line-2: #1a2436; --wash: rgba(230, 236, 245, 0.06);
  --sky-top: #02040a; --sky-mid: #0a1430; --sky-low: #24365e;
  --dem: #3987e5; --aut: #c98500; --col: #d95926; --oth: #7d899c;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.site { margin: 0; background: var(--paper); color: var(--text); font-family: var(--ui); font-size: 16px; line-height: 1.5; }
.site a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.site a:hover { text-decoration-thickness: 2px; }
.site :focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: var(--panel); color: var(--text); padding: 8px 12px; }

/* Site header */
.site-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px 28px; flex-wrap: wrap;
  max-width: var(--wide); margin: 0 auto; padding: 22px 20px 0;
}
.wordmark {
  font-family: var(--ui); font-stretch: 125%; font-weight: 760; font-size: 15px; letter-spacing: 0.04em;
  text-transform: uppercase; text-decoration: none; white-space: nowrap;
}
.site a.wordmark { text-decoration: none; }
.site-nav { display: flex; gap: 6px 22px; flex-wrap: wrap; font-size: 15px; }
.site-nav a { text-decoration: none; color: var(--text-2); padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--text); border-bottom-color: var(--line); }
.site-nav a[aria-current="page"] { color: var(--text); border-bottom-color: currentColor; }
.home .site-head { position: absolute; left: 0; right: 0; top: 0; z-index: 3; }
.home .site-head, .home .site-nav a { color: var(--on-sky-2); }
.home .wordmark { color: var(--on-sky); }
.home .site-nav a:hover { color: var(--on-sky); border-bottom-color: rgba(255, 255, 255, 0.35); }

/* Page frame for inner pages */
.page { max-width: var(--wide); margin: 0 auto; padding: 40px 20px 72px; }
.page-title {
  font-family: var(--ui); font-stretch: 125%; font-weight: 780; text-transform: uppercase; letter-spacing: 0.01em;
  font-size: clamp(30px, 5vw, 52px); line-height: 1; margin: 0 0 14px; text-wrap: balance;
}
.page-lede { font-family: var(--serif); font-size: 20px; line-height: 1.5; color: var(--text-2); max-width: var(--measure); margin: 0 0 32px; }

/* Reading text */
.prose { font-family: var(--serif); font-size: 18px; line-height: 1.62; max-width: var(--measure); }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose li { margin: 0 0 0.4em; }
.prose h2 { font-family: var(--ui); font-stretch: 112%; font-weight: 700; font-size: 24px; line-height: 1.2; margin: 2em 0 0.6em; }
.prose h3 { font-family: var(--ui); font-weight: 650; font-size: 18px; margin: 1.6em 0 0.4em; }
.prose dl { margin: 0 0 1em; }
.prose dt { font-family: var(--ui); font-weight: 650; font-size: 16px; margin-top: 0.9em; }
.prose dd { margin: 0.15em 0 0; }
.prose code { font-size: 0.9em; background: var(--wash); padding: 0.05em 0.3em; border-radius: 3px; }
.figures { font-variant-numeric: tabular-nums; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); }
.site-foot .in { max-width: var(--wide); margin: 0 auto; padding: 22px 20px 40px; display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; font-size: 14px; color: var(--text-3); }
.site-foot p { margin: 0; }

/* Home: hero */
.hero {
  position: relative; overflow: hidden; color: var(--on-sky);
  min-height: clamp(600px, 92vh, 860px);
  background: linear-gradient(to bottom, var(--sky-top) 0%, var(--sky-mid) 48%, var(--sky-low) 100%);
  display: grid; grid-template-rows: 1fr auto;
}
.hero .stars { position: absolute; inset: 0 0 35% 0; width: 100%; height: 65%; }
.hero .stars circle { fill: #fff; }
.hero-text { position: relative; z-index: 2; max-width: var(--wide); width: 100%; margin: 0 auto; padding: 120px 20px 0; }
.hero-title {
  margin: 0; font-family: var(--ui); font-stretch: 125%; font-weight: 800; text-transform: uppercase;
  font-size: clamp(46px, min(10.5vw, 15vh), 140px); line-height: 0.86; letter-spacing: -0.005em;
}
.hero-title span { display: block; }
.hero-sub { margin: 26px 0 0; max-width: 34ch; font-family: var(--serif); font-size: clamp(18px, 2vw, 22px); line-height: 1.45; color: var(--on-sky-2); }
.hero-links { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 24px; font-size: 16px; }
.hero-links a { color: var(--on-sky); }
.mountain { position: relative; height: clamp(250px, 46vh, 420px); margin-top: -40px; }
.mountain svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mountain .ground { fill: var(--paper); }
.mountain .ridge { fill: none; stroke: var(--on-sky); stroke-width: 1.5; stroke-opacity: 0.9; }
.peak-label {
  position: absolute; transform: translate(-100%, -100%); padding: 0 10px 6px 0; z-index: 2;
  font-size: 13px; line-height: 1.25; color: var(--on-sky); text-align: right; white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, 0.55);
}
.peak-label .y { display: block; color: var(--on-sky-2); font-variant-numeric: tabular-nums; }
.peak-label.right { transform: translate(0, -100%); text-align: left; border-right: 0; border-left: 1px solid rgba(255, 255, 255, 0.55); padding: 0 0 6px 10px; }
.time-axis { position: absolute; left: 0; right: 0; bottom: 0; height: 26px; z-index: 2; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.time-axis span { position: absolute; bottom: 6px; transform: translateX(-50%); white-space: nowrap; }
.time-axis span.first { transform: none; margin-left: 16px; }
.time-axis span.last { transform: translateX(-100%); margin-left: -16px; }

/* Home: sections */
.band { max-width: var(--wide); margin: 0 auto; padding: 64px 20px 0; }
.band:last-of-type { padding-bottom: 72px; }
.band h2 { font-family: var(--ui); font-stretch: 118%; font-weight: 760; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.08; margin: 0 0 16px; max-width: 26ch; text-wrap: balance; }
.band .prose { margin-bottom: 0; }
.intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 24px 64px; align-items: start; }
.intro .count-list { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; font-variant-numeric: tabular-nums; }
.intro .count-list li { display: grid; grid-template-columns: 9ch minmax(0, 1fr); gap: 16px; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.intro .count-list b { font-stretch: 112%; font-weight: 720; font-size: 22px; text-align: right; }
.intro .count-list span { color: var(--text-2); }

/* Share chart */
.share { margin-top: 26px; }
.share-head { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin-bottom: 12px; font-size: 14px; color: var(--text-2); }
.share-head .key { display: inline-flex; align-items: center; gap: 8px; }
.share-head .key i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.share-card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 10px 8px; }
.share svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.share .ax text { fill: var(--text-3); font-size: 12px; font-family: var(--ui); font-variant-numeric: tabular-nums; }
.share .ax line { stroke: var(--line); }
.share .band-lbl { font-family: var(--ui); font-size: 13px; font-weight: 600; fill: #fff; }
.share .band-lbl.dark { fill: #10192a; }
.share .cross { stroke: var(--text); stroke-width: 1; pointer-events: none; }
.share-tip {
  position: absolute; pointer-events: none; z-index: 3; background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; font-size: 13px; min-width: 190px; box-shadow: 0 8px 24px rgba(5, 10, 25, 0.16);
}
.share-tip .t { color: var(--text-3); margin-bottom: 4px; }
.share-tip .r { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; font-variant-numeric: tabular-nums; }
.share-tip .r i { width: 10px; height: 10px; border-radius: 2px; }
.share-note { margin: 12px 0 0; font-size: 14px; color: var(--text-3); max-width: 80ch; }
details.numbers { margin-top: 10px; font-size: 14px; }
details.numbers summary { cursor: pointer; color: var(--text-2); }
.num-table { border-collapse: collapse; margin-top: 10px; font-size: 13px; font-variant-numeric: tabular-nums; }
.num-table th, .num-table td { padding: 4px 12px 4px 0; text-align: right; border-bottom: 1px solid var(--line-2); }
.num-table th:first-child, .num-table td:first-child { text-align: left; }

/* Timeline list (home: first and furthest) */
.dated { list-style: none; margin: 18px 0 0; padding: 0; max-width: var(--measure); }
.dated li { display: grid; grid-template-columns: 4.5ch minmax(0, 1fr); gap: 18px; padding: 12px 0; border-top: 1px solid var(--line); font-family: var(--serif); font-size: 18px; }
.dated li:last-child { border-bottom: 1px solid var(--line); }
.dated .yr { font-family: var(--ui); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Forms shared by Browse and Data */
.field { display: grid; gap: 5px; font-size: 14px; color: var(--text-2); min-width: 0; }
.site select, .site input[type="search"] {
  font: inherit; font-size: 15px; color: var(--text); background: var(--panel); border: 1px solid var(--line);
  border-radius: 7px; padding: 0 10px; height: 40px; min-width: 0; max-width: 100%;
}
.site button.plain {
  font: inherit; font-size: 15px; color: var(--text); background: var(--panel); border: 1px solid var(--line);
  border-radius: 7px; padding: 8px 14px; cursor: pointer;
}
.site button.plain:hover { background: var(--wash); }

/* Browse */
.filters { display: grid; grid-template-columns: minmax(180px, 1.1fr) minmax(200px, 1.5fr) minmax(140px, 0.8fr) minmax(150px, 0.8fr); gap: 12px 16px; align-items: end; }
.result-count { margin: 18px 0 0; color: var(--text-2); font-size: 15px; min-height: 1.5em; }
.quick { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 12px 0 0; font-size: 15px; }
.entries { list-style: none; margin: 16px 0 0; padding: 0; }
.entry { display: grid; grid-template-columns: 8.5ch minmax(0, 1fr); gap: 4px 22px; padding: 18px 0; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.entry:target, .entry.hit { background: linear-gradient(to right, var(--wash), transparent 70%); }
.entry .when { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 15px; line-height: 1.5; }
.entry .when small { display: block; font-weight: 400; color: var(--text-3); font-size: 13px; }
.entry h3 { margin: 0; font-size: 18px; line-height: 1.35; font-weight: 650; }
.entry h3 a { text-decoration: none; }
.entry h3 a:hover { text-decoration: underline; }
.entry .desc { margin: 6px 0 0; font-family: var(--serif); font-size: 17px; line-height: 1.55; max-width: 72ch; color: var(--text); }
.entry .meta { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: var(--text-2); }
.entry .meta .gov { display: inline-flex; align-items: center; gap: 7px; }
.entry .meta .gov i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.entry .people { margin: 6px 0 0; font-size: 14px; color: var(--text-2); }
.entry details { margin-top: 10px; font-size: 14px; }
.entry summary { cursor: pointer; color: var(--text-2); }
.entry summary:hover { color: var(--text); }
.srcs { margin: 8px 0 0; padding-left: 1.4em; display: grid; gap: 8px; max-width: 80ch; }
.srcs li { font-family: var(--serif); font-size: 15px; line-height: 1.5; }
.srcs .lvl { font-family: var(--ui); font-size: 13px; font-weight: 650; color: var(--text-2); margin-right: 6px; }
.srcs .chk { font-family: var(--ui); font-size: 12px; color: var(--text-3); margin-left: 6px; }
.disagree { margin: 8px 0 0; font-size: 14px; color: var(--text-2); max-width: 80ch; }
.more { margin: 22px 0 0; }
.empty { margin: 28px 0 0; padding: 22px 0; border-top: 1px solid var(--line); color: var(--text-2); font-family: var(--serif); font-size: 18px; max-width: var(--measure); }

/* Data */
.files { border-collapse: collapse; width: 100%; max-width: 980px; margin: 8px 0 8px; font-size: 15px; }
.files th, .files td { text-align: left; vertical-align: top; padding: 12px 18px 12px 0; border-bottom: 1px solid var(--line); }
.files th { font-weight: 600; color: var(--text-2); font-size: 14px; }
.files td.size { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text-2); }
.files td:first-child { font-weight: 600; }
.cols { display: grid; grid-template-columns: minmax(150px, 0.32fr) minmax(0, 1fr); gap: 0 24px; max-width: 980px; margin: 8px 0 0; font-size: 15px; }
.cols dt { padding: 9px 0; border-top: 1px solid var(--line-2); font-weight: 600; overflow-wrap: anywhere; }
.cols dd { margin: 0; padding: 9px 0; border-top: 1px solid var(--line-2); color: var(--text-2); }

/* 404 */
.lost { min-height: 50vh; }

@media (min-width: 720px) {
  .hero { display: block; min-height: clamp(660px, 100svh, 940px); }
  .hero-text { padding-top: clamp(88px, 13vh, 140px); }
  .hero-sub { margin-top: 20px; }
  .mountain { position: absolute; left: 0; right: 0; bottom: 0; height: 58%; margin: 0; }
}
@media (max-width: 1180px) { .peak-label.wide-only { display: none; } }
@media (max-width: 860px) {
  .intro { grid-template-columns: minmax(0, 1fr); }
  .filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .filters .field.q { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .site-head { padding: 16px 16px 0; }
  .page { padding: 28px 16px 56px; }
  .hero-text { padding: 104px 16px 0; }
  .band { padding: 48px 16px 0; }
  .site-foot .in { padding: 20px 16px 36px; }
  .prose { font-size: 17px; }
  .entry { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .entry .when small { display: inline; margin-left: 8px; }
  .filters { grid-template-columns: minmax(0, 1fr); }
  .peak-label.opt { display: none; }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .cols dd { border-top: 0; padding-top: 0; }
  .time-axis span.mid { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
