/* Bib system stylesheet — Jocote palette, anti-sheen, print-friendly
   Used by all rendered Bibs. Update once, all Bibs reflow. */

:root {
  --bg:        #1c1712;
  --bg-soft:   #28201a;
  --bg-card:   #221b15;
  --text:      #e8ddd0;
  --text-mute: #b8a89c;
  --orange:    #e07830;
  --maroon:    #c84040;
  --teal:      #40c0a8;
  --gold:      #c8a048;
  --green:     #5a9a50;
  --blue:      #4888c8;
  --rule:      #4a3a2c;
}

* { box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  font-family: "Crimson Text", "Source Serif Pro", Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.bib {
  max-width: 780px;
  margin: 0 auto;
  padding: 60px 40px 120px;
}

/* Header block */
.bib-head {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 28px;
  margin-bottom: 36px;
}

.bib-eyebrow {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.bib-title {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--orange);
  margin: 0 0 12px;
  line-height: 1.05;
}

.bib-meta {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: 0.04em;
}

.bib-meta span + span::before {
  content: "·";
  margin: 0 10px;
  color: var(--rule);
}

.bib-lede {
  font-style: italic;
  color: var(--text-mute);
  font-size: 18px;
  margin: 24px 0 0;
}

/* Section headers */
h2 {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--teal);
  margin: 64px 0 20px;
  padding-bottom: 8px;
  border-bottom: 1px dotted var(--rule);
  letter-spacing: -0.005em;
}

h3 {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--gold);
  margin: 36px 0 12px;
  letter-spacing: 0.01em;
}

h4 {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--orange);
  margin: 24px 0 8px;
}

/* Body text */
p { margin: 0 0 16px; }

p strong, li strong {
  color: var(--text);
  font-weight: 600;
}

em { color: var(--text-mute); }

a {
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px dotted var(--teal);
}

a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* Lists */
ul, ol { padding-left: 24px; margin: 0 0 20px; }
li { margin-bottom: 6px; }

/* Callouts */
.warn {
  border-left: 3px solid var(--maroon);
  background: rgba(200, 64, 64, 0.06);
  padding: 14px 20px;
  margin: 20px 0;
  border-radius: 0 4px 4px 0;
}
.warn strong { color: var(--maroon); }

.note {
  border-left: 3px solid var(--teal);
  background: rgba(64, 192, 168, 0.06);
  padding: 14px 20px;
  margin: 20px 0;
  border-radius: 0 4px 4px 0;
}
.note strong { color: var(--teal); }

.key {
  border-left: 3px solid var(--gold);
  background: rgba(200, 160, 72, 0.06);
  padding: 14px 20px;
  margin: 20px 0;
  border-radius: 0 4px 4px 0;
}
.key strong { color: var(--gold); }

/* Noodle-type cards */
.types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  margin: 24px 0;
}
.type-card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 22px 24px;
}
.type-card h3 { margin-top: 0; color: var(--orange); font-size: 17px; }
.type-card .swatch {
  display: block;
  margin-bottom: 14px;
  height: 60px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
  font-family: "Inter", system-ui, sans-serif;
}
th {
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--gold);
}
td {
  padding: 12px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  color: var(--text);
}
tr:nth-child(even) td { background: var(--bg-soft); }

/* Images */
figure {
  margin: 32px 0;
  padding: 0;
}
figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  filter: saturate(0.9) contrast(1.02);
}
figcaption {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 12px;
  color: var(--text-mute);
  text-align: center;
  margin-top: 8px;
  letter-spacing: 0.04em;
}

.hero img { aspect-ratio: 16/9; object-fit: cover; }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0;
}
.gallery figure { margin: 0; }
.gallery img { aspect-ratio: 1/1; object-fit: cover; }

/* Cross-refs */
.xref {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mute);
  background: var(--bg-soft);
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid var(--rule);
}

/* Horizontal rule */
hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 48px 0;
}

/* Footer */
.bib-foot {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: 0.04em;
}

/* SVG noodle illustration */
svg.noodle-strands {
  display: block;
  width: 100%;
  height: 100%;
}

/* Print */
@media print {
  html, body { background: white; color: black; font-size: 11pt; }
  .bib { padding: 0; max-width: 100%; }
  h2 { color: #b04020; border-bottom-color: #888; }
  h3 { color: #806020; }
  h4 { color: #b04020; }
  .bib-title { color: #b04020; font-size: 28pt; }
  .bib-eyebrow, .bib-meta { color: #555; }
  a { color: #205070; border-bottom: none; }
  .type-card { border-color: #888; background: #f8f4ee; }
  th { color: #805020; border-bottom-color: #805020; }
  td { border-bottom-color: #ccc; color: #222; }
  tr:nth-child(even) td { background: #f4efe8; }
  .warn { background: #fbeaea; }
  .note { background: #eafaf6; }
  .key { background: #faf3df; }
  figure img { filter: none; }
}

/* Small screens */
@media (max-width: 640px) {
  .bib { padding: 32px 18px 60px; }
  .bib-title { font-size: 32px; }
  .gallery { grid-template-columns: 1fr 1fr; }
}
