/* ============================================================
   TIG GUIDE LIBRARY — shared shell + component library
   Linked by every /sites/guide-*.html page. Edit here once,
   every live guide picks it up on next load — no per-file edits.
   ============================================================ */

:root {
  --c-primary: #1a5f5b;
  --c-mid:     #3aa89f;
  --c-accent:  #e6f7f5;
  --c-bg:      #f8faf9;
  --c-white:   #ffffff;
  --c-text:    #111827;
  --c-muted:   #6B7280;
  --c-border:  #E5E7EB;
  --c-warn:    #dc2626;
  --max-w:     1160px;
  --r:         10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--c-text);
  background: var(--c-bg);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button { font: inherit; }

/* ── Real site nav + footer (matches other TIG pages) ── */
.nav { background: #fff; border-bottom: 1px solid var(--c-border); }
.nav-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 28px; height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-logo img { height: 40px; width: auto; display: block; }
.nav-burger { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--c-text); margin: 5px 0; border-radius: 2px; }
.nav-drawer { display: none; position: fixed; inset: 68px 0 0 0; background: #fff; z-index: 199; padding: 24px; transform: translateX(100%); transition: transform .28s ease; overflow-y: auto; }
.nav-drawer ul { list-style: none; }
.nav-drawer ul li a { display: block; padding: 16px 0; font-size: 18px; font-weight: 700; color: var(--c-text); text-decoration: none; border-bottom: 1px solid var(--c-border); }
.nav-drawer.open { transform: translateX(0); }

footer { background: var(--c-primary); padding: 60px 28px 32px; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; }
.footer-top { display: flex; justify-content: space-between; gap: 48px; margin-bottom: 48px; flex-wrap: wrap; }
.footer-brand img { height: 40px; width: auto; display: block; margin-bottom: 14px; filter: brightness(0) invert(1); opacity: .85; }
.footer-brand p { font-size: 13px; color: rgba(255,255,255,.38); max-width: 325px; line-height: 1.4; font-style: italic; }
.footer-cols { display: flex; gap: 52px; flex-wrap: wrap; }
.footer-col h4 { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.6); margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14px; color: rgba(255,255,255,.38); text-decoration: none; transition: color .15s; }
.footer-col a:hover { color: rgba(255,255,255,.8); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 22px; font-size: 13px; color: rgba(255,255,255,.25); text-align: center; }

.btn {
  border: 1.5px solid var(--c-border);
  border-radius: 100px;
  padding: 9px 16px;
  cursor: pointer;
  font-weight: 700;
  font-size: .84rem;
  background: #fff;
  color: var(--c-text);
  transition: border-color .15s, background .15s;
}
.btn:hover { border-color: var(--c-primary); background: var(--c-accent); }
.btn.primary { background: var(--c-primary); border-color: var(--c-primary); color: white; }
.btn.primary:hover { background: var(--c-mid); border-color: var(--c-mid); }

/* ── Page frame + typography ── */
main { width: min(1120px, calc(100% - 28px)); margin: 26px auto 70px; }

.category-badge {
  display: inline-flex;
  align-items: center;
  color: var(--c-primary);
  background: var(--c-accent);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 7px 15px;
  border-radius: 100px;
  margin-bottom: 4px;
}

.hero { display: grid; gap: 24px; align-items: stretch; margin-top: 14px; }

h1, h2, h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 0;
  color: var(--c-text);
}

h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-optical-sizing: auto;
  font-weight: 600;
  letter-spacing: -.01em;
  font-size: clamp(2rem, 5.2vw, 3.1rem);
  max-width: 720px;
  margin-top: 14px;
}

h2 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); }

.lede {
  color: var(--c-muted);
  font-size: clamp(1rem, 3.8vw, 1.2rem);
  max-width: 720px;
  margin: 18px 0 0;
}

.section { padding-top: 40px; border-top: 1px solid var(--c-border); margin-top: 40px; }
.section:first-of-type { border-top: none; margin-top: 0; padding-top: 24px; }

.section-head { display: grid; gap: 9px; margin-bottom: 20px; }

.eyebrow {
  color: var(--c-primary);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 800;
  font-size: .74rem;
}

.section-copy { color: var(--c-muted); max-width: 720px; margin: 0; }

.note {
  border-left: 4px solid var(--c-mid);
  background: var(--c-accent);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 15px 18px;
  margin-top: 16px;
  color: var(--c-primary);
  font-weight: 500;
  font-size: .9rem;
}

.food-sub { color: var(--c-muted); font-size: .83rem; }

.mistakes { display: grid; gap: 10px; }
.mistake {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--c-bg);
  border-left: 3px solid var(--c-warn);
  border-radius: 0 var(--r) var(--r) 0;
}
.x { color: var(--c-warn); font-weight: 800; font-size: 1.2rem; line-height: 1; }

/* ============================================================
   COMPONENT LIBRARY — pick 3+ different shapes per guide,
   do not reuse the same combination guide after guide.
   ============================================================ */

/* Accordion grid of expandable cards */
.temp-grid { display: grid; gap: 12px; }
.temp-card {
  background: #fff;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r);
  overflow: hidden;
  transition: box-shadow .15s, border-color .15s;
}
.temp-card:hover { border-color: var(--c-mid); box-shadow: 0 6px 24px rgba(0,0,0,.06); }
.temp-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  cursor: pointer;
  list-style: none;
}
.temp-summary::-webkit-details-marker { display: none; }
.food-name { font-weight: 700; }
.degree {
  color: var(--c-primary);
  background: var(--c-accent);
  font-weight: 800;
  font-size: 1rem;
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 100px;
}
.temp-body { border-top: 1px solid var(--c-border); padding: 16px; background: var(--c-bg); font-size: .94rem; color: #1f2937; }
.temp-body strong { color: var(--c-primary); }

/* Boxed 3-card grid (pair with .process or .flow below) */
.carry-grid { display: grid; gap: 14px; }
.carry-card { padding: 20px; background: #fff; border: 1.5px solid var(--c-border); border-radius: 16px; }
.carry-number {
  font-size: clamp(1.6rem, 6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1;
  background: linear-gradient(90deg, var(--c-primary), var(--c-mid));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.carry-card h3 { font-size: 1.25rem; margin-top: 9px; }
.carry-card p { color: var(--c-muted); margin-bottom: 0; }

/* Connected 3-step boxed sequence */
.process { display: grid; gap: 12px; margin-top: 18px; }
.process-step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  align-items: center;
  background: #fff;
  border: 1.5px solid var(--c-border);
  color: var(--c-text);
  padding: 14px;
  border-radius: var(--r);
}
.step-no {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--c-primary); background: var(--c-accent); font-weight: 800;
}

/* Connected dot-and-arrow flow (lighter alternative to .process) */
.flow { display: flex; align-items: flex-start; gap: 6px; margin-top: 26px; flex-wrap: wrap; }
.flow-step { flex: 1 1 140px; text-align: center; }
.flow-dot { display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--c-mid); margin: 0 auto 10px; }
.flow-step b { display: block; font-size: .95rem; }
.flow-step small { color: var(--c-muted); font-size: .8rem; }
.flow-arrow { flex: 0 0 auto; color: var(--c-border); font-size: 1.3rem; margin-top: 1px; }

/* 5-cell color-block spectrum chart */
.doneness-wrap { overflow-x: auto; padding-bottom: 8px; }
.doneness {
  min-width: 720px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--c-border);
}
.doneness > div { padding: 18px 14px; min-height: 170px; display: flex; flex-direction: column; justify-content: space-between; }
.doneness > div { border-right: 1px solid rgba(255,255,255,.18); }
.doneness > div:last-child { border-right: none; }
.doneness > div:nth-child(1) { background: var(--c-accent); color: var(--c-text); }
.doneness > div:nth-child(2) { background: #b9e6df; color: var(--c-text); }
.doneness > div:nth-child(3) { background: var(--c-mid); color: white; }
.doneness > div:nth-child(4) { background: #237f78; color: white; }
.doneness > div:nth-child(5) { background: var(--c-primary); color: white; }
.doneness-name { font-size: 1.15rem; font-weight: 800; }
.doneness-temp { font-weight: 700; font-size: 1.05rem; }

/* Ranked horizontal bar list */
.rank-list { display: grid; gap: 10px; }
.rank-row {
  background: #fff;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r);
  overflow: hidden;
  transition: box-shadow .15s, border-color .15s;
}
.rank-row:hover { border-color: var(--c-mid); box-shadow: 0 6px 24px rgba(0,0,0,.06); }
.rank-summary { display: grid; gap: 8px; padding: 14px 16px; cursor: pointer; list-style: none; }
.rank-summary::-webkit-details-marker { display: none; }
.rank-top-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.rank-name { font-weight: 700; font-size: .95rem; }
.rank-value { font-family: 'Fraunces', Georgia, serif; font-weight: 600; color: var(--c-primary); white-space: nowrap; font-size: 1.05rem; }
.rank-bar-track { display: block; height: 9px; background: var(--c-bg); border-radius: 999px; overflow: hidden; }
.rank-bar-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--c-mid), var(--c-primary)); border-radius: 999px; }
.rank-body { border-top: 1px solid var(--c-border); padding: 12px 16px 14px; background: var(--c-bg); font-size: .9rem; color: #1f2937; }
.rank-body strong { color: var(--c-primary); }

/* Banded ruler scale + text columns */
.scale-bar { display: flex; border-radius: 16px; overflow: hidden; margin-top: 4px; }
.scale-seg { flex: 1; padding: 16px 10px; text-align: center; }
.scale-seg span { display: block; font-weight: 800; font-size: 1rem; }
.scale-seg small { display: block; opacity: .82; font-size: .76rem; margin-top: 2px; }
.scale-notes { display: grid; gap: 16px; margin-top: 20px; }
.scale-notes div { border-top: 1px solid var(--c-border); padding-top: 12px; }
.scale-notes b { display: block; margin-bottom: 4px; color: var(--c-primary); font-size: .96rem; }
.scale-notes p { margin: 0; color: var(--c-muted); font-size: .9rem; }

/* Plain striped list */
.task-list { border: 1px solid var(--c-border); border-radius: 16px; overflow: hidden; }
.task-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; }
.task-row:nth-child(odd) { background: #fff; }
.task-row:nth-child(even) { background: var(--c-bg); }
.task-name { font-weight: 800; color: var(--c-primary); font-size: .95rem; }
.task-detail { color: var(--c-muted); font-size: .85rem; text-align: right; }

/* ============================================================
   HERO / SHARE CARD — the .quick-ref structure is fixed;
   color comes ONLY from one tier class: tier-dark, tier-middle,
   or tier-light, assigned by the tool per guide (rotation).
   ============================================================ */

.quick-ref-shell { display: grid; justify-items: center; gap: 16px; }

.quick-ref {
  width: 100%;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 20px 46px rgba(15,50,47,.28);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.quick-ref-top { max-width: 720px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-top: 16px; }
.stat-tile { border-radius: 14px; padding: 12px 8px; text-align: center; }
.stat-label { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; line-height: 1.25; }
.stat-value { display: block; font-family: 'Fraunces', Georgia, serif; font-size: 1.55rem; font-weight: 600; margin-top: 4px; }

.mini-label { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin: 18px 0 8px; }

.doneness-bar { height: 10px; border-radius: 999px; background: linear-gradient(90deg, #eec3ad, #cf8b64, #a95c3b, #7c3826, #4a1f15); }
.doneness-ticks { display: flex; justify-content: space-between; gap: 4px; margin-top: 8px; }
.doneness-ticks span { flex: 1; text-align: center; font-size: .78rem; font-weight: 600; letter-spacing: .01em; line-height: 1.3; }
.doneness-ticks b { display: block; font-family: 'Fraunces', Georgia, serif; font-size: .95rem; font-weight: 600; margin-top: 2px; }

.quick-ref-callout { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 14px; border-radius: 0 14px 14px 0; padding: 14px 16px; border-left: 3px solid; }
.callout-stat { font-family: 'Fraunces', Georgia, serif; font-size: 2rem; font-weight: 600; line-height: 1; flex: 0 0 auto; }
.quick-ref-callout p { flex: 1 1 200px; margin: 0; font-size: .85rem; line-height: 1.5; }

/* Stacked 1-2-3 tips -- alternative to stat-grid when the topic is better served by
   a few sentences of real guidance than by bare numbers. */
.quick-ref-stack { display: grid; gap: 10px; margin-top: 16px; }
.quick-ref-tip { display: flex; align-items: flex-start; gap: 12px; border-radius: 14px; padding: 12px 14px; }
.tip-no { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .8rem; }
.quick-ref-tip div { flex: 1 1 auto; }
.quick-ref-tip b { display: block; font-size: .85rem; margin-bottom: 2px; }
.quick-ref-tip p { margin: 0; font-size: .85rem; line-height: 1.5; }

.quick-ref-footer { display: flex; justify-content: flex-end; margin-top: 18px; padding-top: 14px; border-top: 1px solid; }
.quick-ref-footer img { height: 26px; width: auto; }

/* Tier: DARK */
.tier-dark { background: linear-gradient(160deg, #1a5f5b, #0e3d3a); color: white; }
.tier-dark h1 { color: white; }
.tier-dark .stat-tile { background: rgba(255,255,255,.09); }
.tier-dark .stat-label { color: rgba(255,255,255,.7); }
.tier-dark .mini-label { color: #a6ede2; }
.tier-dark .doneness-ticks span { color: rgba(255,255,255,.8); }
.tier-dark .doneness-ticks b { color: white; }
.tier-dark .quick-ref-callout { background: rgba(255,255,255,.09); border-left-color: #a6ede2; }
.tier-dark .callout-stat { color: #a6ede2; }
.tier-dark .quick-ref-callout p { color: rgba(255,255,255,.88); }
.tier-dark .quick-ref-tip { background: rgba(255,255,255,.09); }
.tier-dark .tip-no { background: rgba(255,255,255,.18); color: #a6ede2; }
.tier-dark .quick-ref-tip b { color: white; }
.tier-dark .quick-ref-tip p { color: rgba(255,255,255,.8); }
.tier-dark .quick-ref-footer { border-top-color: rgba(255,255,255,.16); }
.tier-dark .quick-ref-footer img { filter: brightness(0) invert(1); opacity: .85; }

/* Tier: MIDDLE */
.tier-middle { background: linear-gradient(160deg, #2f8a81, #17544e); color: white; }
.tier-middle h1 { color: white; }
.tier-middle .stat-tile { background: rgba(255,255,255,.09); }
.tier-middle .stat-label { color: rgba(255,255,255,.7); }
.tier-middle .mini-label { color: #a6ede2; }
.tier-middle .doneness-ticks span { color: rgba(255,255,255,.8); }
.tier-middle .doneness-ticks b { color: white; }
.tier-middle .quick-ref-callout { background: rgba(255,255,255,.09); border-left-color: #a6ede2; }
.tier-middle .callout-stat { color: #a6ede2; }
.tier-middle .quick-ref-callout p { color: rgba(255,255,255,.88); }
.tier-middle .quick-ref-tip { background: rgba(255,255,255,.09); }
.tier-middle .tip-no { background: rgba(255,255,255,.18); color: #a6ede2; }
.tier-middle .quick-ref-tip b { color: white; }
.tier-middle .quick-ref-tip p { color: rgba(255,255,255,.8); }
.tier-middle .quick-ref-footer { border-top-color: rgba(255,255,255,.16); }
.tier-middle .quick-ref-footer img { filter: brightness(0) invert(1); opacity: .85; }

/* Tier: LIGHT */
.tier-light { background: linear-gradient(160deg, #eef9f7, #cdece6); color: var(--c-text); box-shadow: 0 20px 46px rgba(15,50,47,.14); }
.tier-light .stat-tile { background: rgba(255,255,255,.65); border: 1px solid rgba(26,95,91,.1); }
.tier-light .stat-label { color: var(--c-muted); }
.tier-light .stat-value { color: var(--c-primary); }
.tier-light .mini-label { color: var(--c-primary); }
.tier-light .doneness-ticks span { color: var(--c-muted); }
.tier-light .doneness-ticks b { color: var(--c-primary); }
.tier-light .quick-ref-callout { background: rgba(255,255,255,.55); border-left-color: var(--c-primary); }
.tier-light .callout-stat { color: var(--c-primary); }
.tier-light .quick-ref-callout p { color: #1f2937; }
.tier-light .quick-ref-tip { background: rgba(255,255,255,.65); border: 1px solid rgba(26,95,91,.1); }
.tier-light .tip-no { background: var(--c-accent); color: var(--c-primary); }
.tier-light .quick-ref-tip b { color: var(--c-primary); }
.tier-light .quick-ref-tip p { color: #1f2937; }
.tier-light .quick-ref-footer { border-top-color: rgba(26,95,91,.14); }
.tier-light .quick-ref-footer img { opacity: .9; }

/* ── Share section + sources ── */
.share { text-align: center; padding: 54px 12px 10px; }
.share h2 { font-size: 1.9rem; }
.share p { color: var(--c-muted); }
.share-buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.sources { margin-top: 60px; padding-top: 24px; border-top: 1px solid var(--c-border); color: var(--c-muted); font-size: .82rem; }
.sources a { color: var(--c-primary); text-decoration: underline; text-underline-offset: 2px; }

/* ============================================================
   Responsive + print
   ============================================================ */

@media (min-width: 760px) {
  main { margin-top: 46px; }
  .temp-grid { grid-template-columns: 1fr 1fr; }
  .carry-grid { grid-template-columns: repeat(3, 1fr); }
  .process { grid-template-columns: repeat(3, 1fr); }
  .process-step { grid-template-columns: 1fr; align-content: start; }
  .flow { flex-wrap: nowrap; }
  .mistakes { grid-template-columns: 1fr 1fr; }
  .rank-summary { grid-template-columns: 220px 1fr auto; align-items: center; }
  .rank-top-row { display: contents; }
  .rank-bar-track { order: 2; }
  .scale-notes { grid-template-columns: repeat(3, 1fr); }
  .scale-notes div { border-top: none; padding-top: 0; }
  .quick-ref { padding: 32px; }
  .stat-grid { grid-template-columns: repeat(6, 1fr); }
}

@media (max-width: 640px) {
  .nav-burger { display: block; } .nav-drawer { display: block; }
}

@media (max-width: 520px) {
  .btn { padding: 8px 12px; font-size: .82rem; }
}

@media print {
  @page { size: letter; margin: .38in; }
  body { background: white; font-size: 10pt; }
  .nav, .nav-drawer, .share, .lede, .note, footer { display: none !important; }
  main { width: 100%; margin: 0; }
  h1 { font-size: 27pt; }
  .section { padding-top: 18px; break-inside: avoid; }
  h2 { font-size: 18pt; }
  .section-copy { font-size: 9pt; }

  .temp-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .temp-card { box-shadow: none; break-inside: avoid; }
  .temp-summary { padding: 8px; }
  .degree { font-size: .9rem; padding: 4px 10px; }
  .temp-body { display: none; }

  .carry-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .carry-card { padding: 10px; }
  .carry-number { font-size: 22pt; }
  .process { grid-template-columns: repeat(3, 1fr); }
  .flow { flex-wrap: nowrap; }

  .doneness { min-width: 0; }
  .doneness > div { min-height: 105px; padding: 8px; }
  .doneness-name { font-size: 11pt; }

  .rank-row { box-shadow: none; break-inside: avoid; }
  .rank-summary { padding: 8px; }
  .rank-value { font-size: .9rem; }
  .rank-body { display: none; }

  .scale-notes { grid-template-columns: repeat(3, 1fr); }

  .mistakes { grid-template-columns: 1fr 1fr; }
  .mistake { padding: 8px; }

  .quick-ref { box-shadow: none; padding: 22px; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }

  /* Generic: works for any guide's section ids automatically, no per-guide list needed */
  body.print-card-only .section,
  body.print-card-only .sources { display: none !important; }
}
