:root {
  --bg: #f7f3ec;
  --surface: #ffffff;
  --surface-2: #fbf8f2;
  --text: #2b2118;
  --muted: #6f6052;
  --primary: #b45309;       /* chestnut / amber */
  --primary-dark: #92400e;
  --primary-soft: #fdf2e3;
  --green: #2f6f4f;          /* barn green */
  --green-soft: #e6f1ea;
  --border: #e6dccd;
  --shadow: 0 1px 3px rgba(60, 40, 20, .08), 0 6px 24px rgba(60, 40, 20, .06);

  --cat-none: #2f6f4f;
  --cat-sheet: #2b8a8a;
  --cat-light: #d8a127;
  --cat-mid: #d97916;
  --cat-heavy: #9a3412;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 16px; }

a { color: var(--primary-dark); }

/* Header */
.page-header { padding: 22px 0 10px; text-align: center; }
.site-title { font-size: 1.5rem; font-weight: 800; margin: 0; }
.site-title a { color: var(--text); text-decoration: none; }
.site-title i { color: var(--primary); }
.tagline { color: var(--muted); margin: 6px 0 0; font-size: .98rem; }

/* Nav */
.mini-nav {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
  padding: 10px 0; margin-bottom: 8px;
}
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; min-height: 44px; border-radius: 10px;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem;
  background: var(--surface); border: 1px solid var(--border);
}
.nav-link:hover, .nav-link.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }
.nav-dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: 100%; left: 0; z-index: 30;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow); padding: 6px; min-width: 210px;
  display: none; flex-direction: column; gap: 2px; margin-top: 4px;
}
.nav-dropdown:hover .dropdown-menu, .nav-dropdown:focus-within .dropdown-menu { display: flex; }
.dropdown-menu a {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; min-height: 44px;
  border-radius: 8px; text-decoration: none; color: var(--text); font-weight: 500;
}
.dropdown-menu a:hover, .dropdown-menu a.active { background: var(--primary-soft); color: var(--primary-dark); }
.dropdown-arrow { font-size: .9em; }

/* Tool */
.home-main { display: block; }
.tool {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 22px 18px; box-shadow: var(--shadow); margin-bottom: 22px;
}
.tool h1 { font-size: 1.6rem; margin: 0 0 8px; }
.tool-intro { color: var(--muted); margin: 0 0 18px; }

.tool-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
/* grid/flex items default to min-width:auto and refuse to shrink below content → mobile overflow */
.tool-grid > * { min-width: 0; }
.temp-row { min-width: 0; }

.control-block { border: none; padding: 0; margin: 0 0 16px; }
.control-block legend, .control-block > label {
  font-weight: 700; font-size: .95rem; padding: 0; margin-bottom: 8px; display: block;
}
.control-help { color: var(--muted); font-size: .85rem; margin: 8px 0 0; }

.temp-row { display: flex; gap: 10px; align-items: stretch; }
#temp {
  flex: 1; font-size: 1.6rem; font-weight: 700; text-align: center;
  padding: 10px; min-height: 56px; border: 2px solid var(--border); border-radius: 12px;
  background: var(--surface-2); color: var(--text);
}
#temp:focus { outline: 3px solid var(--primary-soft); border-color: var(--primary); }

.unit-toggle { display: flex; border: 2px solid var(--border); border-radius: 12px; overflow: hidden; }
.unit-btn {
  border: none; background: var(--surface-2); color: var(--muted);
  font-weight: 700; font-size: 1rem; padding: 0 16px; min-width: 52px; min-height: 56px; cursor: pointer;
}
.unit-btn.active { background: var(--primary); color: #fff; }

#temp-slider { width: 100%; margin-top: 14px; height: 44px; accent-color: var(--primary); }

.radio-row, .check-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; }
.radio-pill, .check-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 14px; min-height: 46px; border: 2px solid var(--border); border-radius: 12px;
  background: var(--surface-2); cursor: pointer; font-weight: 500; font-size: .95rem; flex: 1 1 auto;
}
.radio-pill input, .check-pill input { width: 20px; height: 20px; accent-color: var(--primary); margin: 0; }
.radio-pill:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; }
.check-pill:has(input:checked) { border-color: var(--green); background: var(--green-soft); color: var(--green); font-weight: 700; }
.radio-pill:focus-within, .check-pill:focus-within { outline: 3px solid var(--primary-soft); }

/* Result */
.result-wrap { position: sticky; top: 10px; }
.result-card {
  border-radius: 16px; padding: 22px; text-align: center; color: #fff;
  background: var(--cat-light); display: flex; flex-direction: column; gap: 4px;
  box-shadow: var(--shadow); transition: background .25s ease;
}
.result-card.cat-none { background: var(--cat-none); }
.result-card.cat-sheet { background: var(--cat-sheet); }
.result-card.cat-light { background: var(--cat-light); }
.result-card.cat-mid { background: var(--cat-mid); }
.result-card.cat-heavy { background: var(--cat-heavy); }
.result-card.result-empty { background: var(--muted); }
.result-label { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; opacity: .9; font-weight: 600; }
.result-name { font-size: 2rem; font-weight: 800; line-height: 1.15; }
.result-fill { font-size: 1rem; opacity: .95; font-weight: 600; }
.result-neck {
  margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  background: rgba(255,255,255,.22); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: .9rem;
}
.result-rationale { margin: 10px 0 0; font-size: .98rem; opacity: .97; }

.affiliate-dynamic { margin-top: 12px; text-align: center; }
.affiliate-dynamic a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  padding: 10px 16px; border-radius: 10px; background: var(--primary-soft);
  color: var(--primary-dark); text-decoration: none; font-weight: 700; border: 1px solid var(--border);
}
.affiliate-dynamic a:hover { background: #fbe6cd; }

/* Share bar */
.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.share-label { font-weight: 700; color: var(--muted); font-size: .9rem; }
.share-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px;
  padding: 8px 13px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); text-decoration: none; font-weight: 600; font-size: .9rem; cursor: pointer;
}
.share-btn:hover { border-color: var(--primary); color: var(--primary-dark); }

/* Content sections */
.content-section {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 22px 20px; margin-bottom: 18px;
}
.content-section h2 { font-size: 1.35rem; margin: 0 0 12px; }
.content-section h3 { font-size: 1.08rem; margin: 18px 0 6px; }
.content-section p { margin: 0 0 12px; }
.content-section.callout { background: var(--green-soft); border-color: #cfe3d6; }
.reason-list, .tips-list { padding-left: 20px; margin: 0 0 12px; }
.reason-list li, .tips-list li { margin-bottom: 8px; }

/* Chart */
.chart-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
.chart-table { width: 100%; border-collapse: collapse; min-width: 520px; font-size: .92rem; }
.chart-table th, .chart-table td { padding: 11px 10px; text-align: center; border: 1px solid var(--border); }
.chart-table thead th { background: var(--primary); color: #fff; font-weight: 700; }
.chart-table tbody th { background: var(--surface-2); text-align: left; font-weight: 700; white-space: nowrap; }
.chart-table td { background: var(--surface); }
.chart-table td.match { background: var(--primary); color: #fff; font-weight: 800; box-shadow: inset 0 0 0 2px var(--primary-dark); }
.chart-key { font-size: .88rem; color: var(--muted); margin-top: 12px; }

/* Gear grid */
.gear-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 12px; }
.gear-card {
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2);
  text-decoration: none; color: var(--text); font-weight: 600;
}
.gear-card i { color: var(--primary); font-size: 1.2rem; }
.gear-card:hover { border-color: var(--primary); background: var(--primary-soft); }
.gear-note { font-size: .82rem; color: var(--muted); font-style: italic; }

/* FAQ */
.faq-item { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; overflow: hidden; background: var(--surface-2); }
.faq-question {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; cursor: pointer; font-weight: 700; min-height: 52px;
}
.faq-question i { transition: transform .2s ease; color: var(--primary); }
.faq-item.open .faq-question i { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-item.open .faq-answer { max-height: 600px; }
.faq-answer p { padding: 0 16px 14px; margin: 0; color: var(--muted); }
.faq-more { font-size: .92rem; margin-top: 8px; }

/* Use-case pages */
.use-case-container { padding-bottom: 10px; }
.use-case-hero {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 26px 22px; text-align: center; box-shadow: var(--shadow); margin-bottom: 16px;
}
.use-case-hero h1 { font-size: 1.7rem; margin: 0 0 10px; }
.hero-subtitle { color: var(--muted); font-size: 1.05rem; margin: 0 0 18px; }
.cta-button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 50px;
  padding: 13px 24px; border-radius: 12px; background: var(--primary); color: #fff;
  text-decoration: none; font-weight: 700; font-size: 1.02rem;
}
.cta-button:hover { background: var(--primary-dark); }
.use-case-section { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px 20px; margin-bottom: 16px; }
.use-case-section h2 { font-size: 1.3rem; margin: 0 0 12px; }
.benefit-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 16px 0; }
.benefit-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.benefit-card i { font-size: 1.6rem; color: var(--primary); }
.benefit-card h3 { margin: 8px 0 4px; font-size: 1.05rem; }
.benefit-card p { margin: 0; color: var(--muted); font-size: .95rem; }

.recommended-gear ul { padding-left: 18px; }
.recommended-gear li { margin-bottom: 8px; }

.cta-section { background: var(--green-soft); border: 1px solid #cfe3d6; border-radius: 16px; padding: 24px; text-align: center; margin-bottom: 16px; }
.cta-section h2 { margin: 0 0 8px; }

.cross-links { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 18px; }
.cross-link-card {
  display: flex; align-items: center; gap: 12px; padding: 16px; min-height: 56px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: var(--text);
}
.cross-link-card:hover { border-color: var(--primary); }
.cross-link-card i { font-size: 1.5rem; color: var(--primary); }
.cross-link-card h4 { margin: 0; font-size: 1rem; }
.cross-link-card p { margin: 2px 0 0; color: var(--muted); font-size: .88rem; }

/* Legal / simple pages */
.doc-page { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 26px 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.doc-page h1 { font-size: 1.7rem; margin: 0 0 6px; }
.doc-page h2 { font-size: 1.2rem; margin: 22px 0 8px; }
.doc-page p, .doc-page li { color: var(--text); }
.doc-meta { color: var(--muted); font-size: .9rem; margin-bottom: 18px; }
.doc-page ul { padding-left: 20px; }
.doc-page li { margin-bottom: 7px; }

/* Ad */
.ad-section { margin: 18px 0; text-align: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 26px; padding-top: 26px; }
.footer-content { display: grid; grid-template-columns: 1fr; gap: 22px; margin-bottom: 22px; }
.footer-logo { font-weight: 800; font-size: 1.1rem; display: inline-flex; align-items: center; gap: 6px; }
.footer-logo i { color: var(--primary); }
.footer-brand p { color: var(--muted); font-size: .92rem; margin: 8px 0 0; }
.footer-links h4 { margin: 0 0 10px; font-size: .95rem; }
.footer-links a { display: block; color: var(--muted); text-decoration: none; padding: 5px 0; min-height: 32px; }
.footer-links a:hover { color: var(--primary-dark); }
.footer-bottom { border-top: 1px solid var(--border); padding: 18px 0 30px; text-align: center; color: var(--muted); font-size: .88rem; }
.footer-legal-links { font-weight: 600; }
.footer-legal-links a { color: var(--text); text-decoration: none; }
.footer-legal-links a:hover { color: var(--primary-dark); }
.affiliate-disclosure { font-size: .82rem; margin-top: 6px; }

/* 404 */
.error-page { text-align: center; padding: 50px 20px; }
.error-page h1 { font-size: 3rem; margin: 0; color: var(--primary); }

/* Responsive */
@media (min-width: 720px) {
  body { font-size: 18px; }
  .tool-grid { grid-template-columns: 1.3fr 1fr; align-items: start; }
  .tool h1 { font-size: 1.9rem; }
  .benefit-grid { grid-template-columns: 1fr 1fr 1fr; }
  .cross-links { grid-template-columns: 1fr 1fr 1fr; }
  .footer-content { grid-template-columns: 2fr 1fr 1fr; }
  .gear-grid { grid-template-columns: 1fr 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---- Legal disclaimer modal (shows on every page load) ---- */
.disclaimer-overlay { display:none; position:fixed; inset:0; z-index:9999;
  background:rgba(28,25,23,.74); align-items:center; justify-content:center; padding:20px; overflow:auto; }
.disclaimer-overlay.show { display:flex; }
.disclaimer-card { background:#fff; max-width:540px; width:100%; border-radius:16px;
  padding:28px 26px; box-shadow:0 24px 64px rgba(0,0,0,.4); border-top:6px solid var(--accent,#b45309); }
.disclaimer-card h2 { margin:0 0 14px; font-size:1.35rem; color:#1c1917; line-height:1.25; }
.disclaimer-body p { margin:0 0 12px; color:#44403c; font-size:.95rem; line-height:1.55; }
.disclaimer-body strong { color:#1c1917; }
.disclaimer-accept { display:block; width:100%; margin-top:6px; padding:15px 18px; font-size:1rem;
  font-weight:700; color:#fff; background:var(--accent,#b45309); border:none; border-radius:12px;
  cursor:pointer; min-height:50px; }
.disclaimer-accept:hover { filter:brightness(1.06); }
.disclaimer-foot { margin:14px 0 0; font-size:.8rem; color:#78716c; text-align:center; }
.disclaimer-foot a { color:var(--accent,#b45309); }
body.disclaimer-open { overflow:hidden; }
