/* Built to Hunt: site styles */

:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --text: #2a2622;
  --muted: #6b625a;
  --line: #e2d9cc;
  --accent: #8a5a2b;
  --accent-dark: #6b4420;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 42rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-dark); }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--surface);
  padding: 0.5rem 0.75rem;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* Header and navigation */

.site-head {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-head .wrap {
  max-width: 64rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.site-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.site-head ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  font-size: 0.95rem;
}
.site-head nav a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.site-head nav a:hover { color: var(--text); }
.site-head nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* Page content */

main.wrap { padding-top: 2.5rem; padding-bottom: 3rem; }

h1, h2, h3 {
  font-family: var(--serif);
  line-height: 1.2;
  color: var(--text);
}
h1 { font-size: 2.4rem; margin: 0.25rem 0 1rem; }
h2 { font-size: 1.5rem; margin: 2.25rem 0 0.5rem; color: var(--accent-dark); }

.page-head { margin-bottom: 1.5rem; }
.kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.lede { font-size: 1.2rem; color: var(--text); }

sup.cite { font-size: 0.7em; line-height: 0; }
sup.cite a { text-decoration: none; }
sup.cite a:hover { text-decoration: underline; }

/* Quick facts */

.facts dl {
  margin: 0.75rem 0 0;
  border-top: 1px solid var(--line);
}
.facts dl div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}
.facts dt { font-weight: 600; }
.facts dd { margin: 0; }

.toc { padding-left: 1.4rem; }
.toc li { margin: 0.25rem 0; }

/* Callouts */

.connection {
  margin: 2.5rem 0 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border-left: 3px solid var(--accent);
}
.connection-label,
.soon-label {
  margin: 0 0 0.25rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.connection p:last-child,
.soon p:last-child { margin-bottom: 0; }

.soon {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border: 1px dashed #c9bcaa;
  color: var(--muted);
}
.soon-label { color: var(--text); }

/* Image placeholders */

.placeholder { margin: 1.5rem 0; }
.placeholder-box {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  background: #f1ece4;
  border: 1px dashed #c9bcaa;
  color: var(--muted);
  font-size: 0.95rem;
}
figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Table */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.75rem 0.6rem 0;
  border-bottom: 1px solid var(--line);
}
th { font-weight: 600; border-bottom: 2px solid var(--text); }

/* References */

.refs { padding-left: 1.6rem; }
.refs li { margin: 0 0 0.85rem; overflow-wrap: anywhere; }
.refs li:target { background: #f3e7d6; }

.byline { color: var(--muted); }

/* Previous / next */

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.pager a {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.1rem;
}
.pager a span {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
}
.pager .next { text-align: right; margin-left: auto; }

/* Footer */

.site-foot {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}
.site-foot .wrap { max-width: 64rem; padding-top: 1.25rem; padding-bottom: 1.5rem; }

@media (max-width: 600px) {
  body { font-size: 1rem; }
  h1 { font-size: 1.9rem; }
  .lede { font-size: 1.1rem; }
  .facts dl div { grid-template-columns: 1fr; gap: 0; }
  table { font-size: 0.875rem; }
}

@media print {
  .site-head nav, .pager, .skip { display: none; }
  body { background: #fff; }
}
