/* ═══════════════════════════════════════════════════
   resources.css — Shared styles for M1 Builder resource pages
   ═══════════════════════════════════════════════════ */

:root {
  --bg: #0f0d0b;
  --s1: #171310;
  --s2: #1f1a15;
  --s3: #26201a;
  --border: #3a2e24;
  --border2: #4a3c30;
  --accent: #cc4800;
  --a2: #e05500;
  --text: #ede8e2;
  --muted: #96908a;
  --dim: #756f69;
  --green: #2ecc7a;
  --yellow: #f5b731;
  --r: 4px;
  --content-max: 760px;
  --page-max: 1100px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.75;
}

/* ── GRAIN OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.6;
  will-change: transform;
}

/* ── NAV ── */
nav:not(.toc) {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(15, 13, 11, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 58px;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 0 2rem;
}

.nav-logo {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .02em;
  color: var(--text);
  text-decoration: none;
}
.nav-logo em { color: var(--accent); font-style: normal; }
.nav-logo { margin-right: auto; }

.nav-r { display: flex; align-items: center; gap: 1rem; }
.nav-link {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: .85rem;
  letter-spacing: .01em;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link.active { color: var(--accent); }

/* ── NAV DROPDOWNS ── */
/* padding-bottom + negative margin extends the wrapper's hover area down 12px
   to bridge the gap to the menu without affecting layout. */
.nav-dropdown { position: relative; padding-bottom: 12px; margin-bottom: -12px; }
.nav-dropdown-trigger { cursor: pointer; user-select: none; }
.nav-dropdown-trigger::after { content: ' ▾'; font-size: .65em; opacity: .5; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 13, 11, 0.97);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .5rem 0;
  min-width: 200px;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: .55rem 1.1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .84rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color .12s, background .12s;
}
.nav-dropdown-menu a:hover { color: var(--text); background: rgba(255,255,255,.05); }

/* ── NAV HAMBURGER ── */
.nav-hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 1.3rem;
  padding: .25rem .55rem;
  cursor: pointer;
  line-height: 1;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
  align-items: center;
}

/* ── BUTTONS ── */
.btn {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: .88rem;
  letter-spacing: .01em;
  padding: .55rem 1.25rem;
  border-radius: var(--r);
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  transition: all .15s;
  white-space: nowrap;
  min-height: 44px;
}
.btn-o { background: var(--accent); color: #fff; }
.btn-o:hover { background: var(--a2); transform: translateY(-1px); }
.btn-g { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-g:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { font-size: .8rem; padding: .35rem .9rem; }
.btn-lg { font-size: .95rem; padding: .7rem 2rem; }

/* ── PAGE HERO ── */
.page-hero {
  padding: 6.5rem 0 3.5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 480px;
  background: linear-gradient(135deg, transparent 40%, rgba(204, 72, 0, .04) 100%);
  pointer-events: none;
  z-index: 0;
}
.page-hero-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}
@media (min-width: 769px) {
  main:has(.content-wrap) .page-hero-inner {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 0 4rem;
  }
  main:has(.content-wrap) .page-hero-inner > * {
    grid-column: 2;
  }
}

/* ── BREADCRUMB ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  color: var(--dim);
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); text-decoration: none; transition: color .15s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--dim); }

/* ── PAGE HERO LABEL ── */
.page-label {
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .65rem;
}
.page-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent);
}

.page-hero h1 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin-bottom: 1rem;
}
.page-hero h1 em { color: var(--accent); font-style: normal; }

.page-sub {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 620px;
  margin-bottom: 1rem;
}
.page-byline {
  font-size: .82rem;
  color: var(--muted);
  letter-spacing: .02em;
  margin-bottom: 2rem;
  opacity: .85;
}
.page-byline a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color .15s;
}
.page-byline a:hover { border-bottom-color: var(--accent); }

/* ── TL;DR BOX ── */
.tldr {
  background: var(--s1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r);
  padding: 1.25rem 1.5rem;
  margin-bottom: 0;
  max-width: 620px;
}
.tldr-label {
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .65rem;
}
.tldr ul { padding-left: 1.2rem; }
.tldr li {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: .3rem;
}
.tldr li:last-child { margin-bottom: 0; }
.tldr li strong { color: var(--text); }
.tldr a { color: var(--accent); text-decoration: none; }
.tldr a:hover { text-decoration: underline; }

/* ── CONTENT LAYOUT ── */
.content-wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 3.5rem 2rem;
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 4rem;
  align-items: start;
}

/* ── TABLE OF CONTENTS ── */
.toc {
  position: sticky;
  top: 76px;
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.1rem 1.25rem;
}
.toc-title {
  font-weight: 700;
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: .75rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--border);
}
.toc ol { padding-left: 0; list-style: none; }
.toc li { counter-increment: toc-counter; }
.toc a {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  color: var(--muted);
  text-decoration: none;
  padding: .3rem 0;
  font-size: .8rem;
  line-height: 1.4;
  border-bottom: 1px solid rgba(58,46,36,.5);
  transition: color .15s;
}
.toc a:last-of-type { border-bottom: none; }
.toc a:hover { color: var(--accent); }
.toc a::before {
  content: counter(toc-counter);
  font-size: .65rem;
  color: var(--dim);
  min-width: 14px;
  font-weight: 600;
}

/* ── PROSE CONTENT ── */
.prose { max-width: var(--content-max); }

.prose h2 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -.01em;
  line-height: 1.2;
  margin-top: 3rem;
  margin-bottom: .9rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 80px;
}
.prose h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }

.prose h3 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -.005em;
  margin-top: 1.75rem;
  margin-bottom: .6rem;
  color: var(--text);
  scroll-margin-top: 80px;
}

.prose p {
  color: var(--muted);
  margin-bottom: 1.1rem;
  font-size: .97rem;
}
.prose p strong { color: var(--text); font-weight: 600; }

.prose ul, .prose ol {
  padding-left: 1.4rem;
  margin-bottom: 1.1rem;
}
.prose li {
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: .4rem;
  line-height: 1.6;
}
.prose li strong { color: var(--text); }

.prose a:not(.btn) { color: var(--accent); text-decoration: none; }
.prose a:not(.btn):hover { text-decoration: underline; }

/* ── PLACEHOLDER BLOCK ── */
.placeholder-block {
  background: var(--s2);
  border: 1px dashed var(--border2);
  border-radius: var(--r);
  padding: 1.5rem;
  margin: 1.25rem 0;
  font-size: .85rem;
  color: var(--dim);
  font-style: italic;
}
.placeholder-block strong {
  display: block;
  font-style: normal;
  color: var(--muted);
  margin-bottom: .4rem;
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ── INFO BOX ── */
.info-box {
  background: var(--s2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.1rem 1.4rem;
  margin: 1.25rem 0;
  font-size: .9rem;
  color: var(--muted);
  display: flex;
  gap: .75rem;
}
.info-box-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.info-box p { margin: 0; }

/* ── WARNING BOX ── */
.warn-box {
  background: rgba(245,183,49,.05);
  border: 1px solid rgba(245,183,49,.2);
  border-radius: var(--r);
  padding: 1rem 1.3rem;
  margin: 1.25rem 0;
  font-size: .88rem;
  color: var(--muted);
  display: flex;
  gap: .7rem;
}
.warn-box .warn-icon { color: var(--yellow); flex-shrink: 0; margin-top: 1px; }

/* ── GEAR CARDS ── */
.gear-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}
.gear-card {
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
  position: relative;
  transition: border-color .15s;
}
.gear-card:hover { border-color: var(--border2); }
.gear-card.featured { border-color: var(--accent); }
.gear-card.featured::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--a2));
  border-radius: 6px 6px 0 0;
}
.gear-badge {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  padding: 2px 7px;
  border-radius: 3px;
  margin-bottom: .7rem;
}
.gear-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: .5rem;
  line-height: 1.3;
}
.gear-specs {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: .75rem;
}
.gear-spec {
  font-size: .72rem;
  background: var(--s2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 7px;
  color: var(--muted);
  font-weight: 500;
}
.gear-desc {
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: .85rem;
}
.gear-verdict {
  font-size: .82rem;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 1rem;
}
.gear-price {
  font-size: .78rem;
  color: var(--dim);
  margin-bottom: .6rem;
}

/* ── COMPARISON TABLE ── */
.compare-wrap { overflow-x: auto; margin: 1.25rem 0; }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.compare-table th {
  background: var(--s2);
  border: 1px solid var(--border);
  padding: .65rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .03em;
  color: var(--muted);
}
.compare-table th:first-child { color: var(--text); }
.compare-table td {
  border: 1px solid var(--border);
  padding: .6rem 1rem;
  color: var(--muted);
  vertical-align: top;
  line-height: 1.5;
}
.compare-table tr:hover td { background: var(--s2); }
.compare-table .good { color: var(--green); font-weight: 600; }
.compare-table .bad { color: #e55; }
.compare-table .ok { color: var(--yellow); }

/* ── RELATED GUIDES ── */
.related-guides {
  margin: 2rem 0 0;
  padding: 1.25rem 1.5rem;
  background: var(--s2);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}
.related-guides-title {
  grid-column: 1 / -1;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--dim);
  margin-bottom: .25rem;
}
.rg-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .7rem .85rem;
  background: var(--s3);
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  transition: background .15s;
  min-height: 44px;
}
.rg-link:hover { background: var(--border); }
.rg-link span { color: var(--accent); }

/* ── CTA HEADING (non-semantic) ── */
.cta-heading {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.15;
  text-transform: uppercase;
}
.cta-heading em { font-style: normal; color: var(--accent); }

/* ── OPTION CARDS (Ordering Guide) ── */
.option-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin: 1.25rem 0;
}
.option-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1.25rem;
  background: var(--s2);
  gap: 1rem;
}
.option-header h3 { margin: 0; font-size: .97rem; }
.option-body { padding: 1.25rem; }
.option-body p { font-size: .88rem; }
.option-body p:last-child { margin-bottom: 0; }
.option-body .compare-wrap { margin-bottom: 1rem; }
.option-body .info-box { margin-top: 1rem; }
.verdict {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .25rem .65rem;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-block;
}
.verdict-tune { background: #1a3d2a; color: var(--green); }
.verdict-diy { background: #3d2210; color: var(--a2); }
.verdict-either { background: #3d3010; color: var(--yellow); }

/* ── STEP LIST (HowTo) ── */
.step-list { counter-reset: steps; margin: 1.25rem 0; }
.step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
  counter-increment: steps;
}
.step-num {
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .88rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.step-body h3 { margin-top: 0; margin-bottom: .4rem; font-size: .97rem; }
.step-body p { margin-bottom: 0; font-size: .88rem; }

/* ── FAQ SECTION ── */
.faq-section {
  border-top: 1px solid var(--border);
  padding: 3.5rem 2rem;
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}
.faq-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 4rem;
  align-items: start;
}
.faq-sidebar .section-label {
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.faq-sidebar .section-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--accent);
}
.faq-sidebar h2 {
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -.01em;
  line-height: 1.2;
  margin-bottom: .75rem;
}
.faq-sidebar p { font-size: .85rem; color: var(--muted); }

details.faq-item {
  border-bottom: 1px solid var(--border);
}
details.faq-item:last-child { border-bottom: none; }
summary.faq-q {
  font-weight: 600;
  font-size: .95rem;
  padding: 1rem 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--text);
  transition: color .15s;
}
summary.faq-q:hover { color: var(--accent); }
summary.faq-q::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--dim);
  flex-shrink: 0;
  transition: transform .2s;
  font-weight: 400;
}
details[open] summary.faq-q::after { transform: rotate(45deg); color: var(--accent); }
.faq-a {
  padding-bottom: 1rem;
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.7;
}
.faq-a p { margin-bottom: .6rem; }
.faq-a p:last-child { margin-bottom: 0; }
.faq-a strong { color: var(--text); }
.faq-a a { color: var(--accent); text-decoration: none; }
.faq-a a:hover { text-decoration: underline; }

/* ── RESOURCE CTA ── */
.resource-cta {
  background: var(--s1);
  border-top: 1px solid var(--border);
  padding: 3.5rem 2rem;
  text-align: center;
  content-visibility: auto;
  contain-intrinsic-size: auto 400px;
}
.resource-cta-inner { max-width: 560px; margin: 0 auto; }
.resource-cta .page-label { justify-content: center; }
.resource-cta h2 {
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -.02em;
  line-height: 1.1;
  margin-bottom: .75rem;
}
.resource-cta h2 em { color: var(--accent); font-style: normal; }
.resource-cta p { color: var(--muted); font-size: .95rem; margin-bottom: 1.75rem; }
.cta-btns { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
  flex-wrap: wrap;
  max-width: 100%;
  content-visibility: auto;
  contain-intrinsic-size: auto 120px;
}
footer > div:first-child { flex: 0 1 auto; min-width: 0; }
footer > .footer-links { flex: 1 1 480px; justify-content: flex-end; }
footer > .footer-note { flex: 1 1 100%; padding-top: 1rem; border-top: 1px solid var(--border); margin-top: .5rem; }
.footer-logo {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .02em;
  color: var(--text);
  text-decoration: none;
}
.footer-logo em { color: var(--accent); font-style: normal; }
.footer-note { font-size: .75rem; color: var(--dim); margin-top: .35rem; line-height: 1.5; }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.footer-link {
  font-size: .8rem;
  color: var(--dim);
  text-decoration: none;
  transition: color .15s;
  padding: .5rem 0;
  display: inline-flex;
  align-items: center;
}
.footer-link:hover { color: var(--muted); }

/* ── SITE SEARCH ── */
.nav-search-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: .88rem;
  padding: .45rem .65rem;
  cursor: pointer;
  line-height: 1;
  min-height: 44px;
  transition: color .15s, border-color .15s;
  display: flex;
  align-items: center;
  gap: .35rem;
}
.nav-search-btn:hover { color: var(--text); border-color: var(--border2); }
.nav-search-btn svg { width: 15px; height: 15px; }
.nav-search-btn kbd {
  font-family: 'DM Sans', sans-serif;
  font-size: .65rem;
  background: var(--s2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--dim);
  font-weight: 500;
}

.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
  align-items: flex-start;
  justify-content: center;
  padding-top: min(20vh, 160px);
}
.search-overlay.open { display: flex; }
.search-modal {
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 92%;
  max-width: 560px;
  box-shadow: 0 16px 64px rgba(0,0,0,.5);
  overflow: hidden;
}
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 1.1rem;
  border-bottom: 1px solid var(--border);
}
.search-input-wrap svg { width: 18px; height: 18px; color: var(--dim); flex-shrink: 0; }
.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 400;
}
.search-input::placeholder { color: var(--dim); }
.search-results { max-height: 360px; overflow-y: auto; }
.search-results:empty { display: none; }
.search-result {
  display: block;
  padding: .75rem 1.1rem;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.search-result:last-child { border-bottom: none; }
.search-result:hover, .search-result.active { background: var(--s2); }
.search-result-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .15rem;
}
.search-result-desc {
  font-size: .78rem;
  color: var(--dim);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.search-empty {
  padding: 2rem 1.1rem;
  text-align: center;
  color: var(--dim);
  font-size: .88rem;
}
.search-footer {
  padding: .5rem 1.1rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .7rem;
  color: var(--dim);
}
.search-footer kbd {
  font-family: 'DM Sans', sans-serif;
  font-size: .62rem;
  background: var(--s2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--dim);
}

/* ── SCROLL REVEAL ── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* ── MOBILE ── */
@media (max-width: 768px) {
  nav:not(.toc) { padding: 0 1.25rem; flex-wrap: wrap; height: auto; min-height: 58px; }
  .nav-hamburger { display: block; }
  .nav-search-btn kbd { display: none; }
  .nav-r {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem 0 1rem;
    border-top: 1px solid var(--border);
    order: 4;
  }
  .nav-r.open { display: flex; }
  .nav-r .nav-link,
  .nav-r .nav-dropdown-trigger { display: block; padding: .75rem 0; font-size: .92rem; min-height: 44px; }
  .nav-r .btn { margin-top: .5rem; text-align: center; justify-content: center; }
  .nav-dropdown-menu {
    position: static;
    transform: none;
    display: none;
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 0 0 .25rem 1rem;
    min-width: 0;
  }
  .nav-dropdown.open .nav-dropdown-menu { display: block; }
  .nav-dropdown:hover .nav-dropdown-menu { display: none; }
  .nav-dropdown.open:hover .nav-dropdown-menu { display: block; }
  .nav-dropdown-menu a { padding: .65rem 0; font-size: .88rem; min-height: 44px; display: flex; align-items: center; }

  .page-hero { padding: 5.5rem 1.25rem 2.5rem; }

  .content-wrap {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 2rem 1.25rem;
  }
  .toc { display: none; }

  .faq-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .gear-grid { grid-template-columns: 1fr; }

  footer { flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1.75rem 1.25rem; }
}

@media (max-width: 480px) {
  .page-hero h1 { font-size: 1.75rem; }
  .faq-section { padding: 2.5rem 1.25rem; }
  .resource-cta { padding: 2.5rem 1.25rem; }
  .option-header { flex-wrap: wrap; padding: .75rem 1rem; }
  .option-body { padding: 1rem; }
  .related-guides { grid-template-columns: 1fr; }
  .gear-spec { font-size: .78rem; padding: 3px 8px; }
  .compare-table th, .compare-table td { padding: .5rem .6rem; font-size: .8rem; }
}

/* ---------- Polish: focus, hover, selection ---------- */

::selection { background: var(--accent); color: #fff; }

a, button, summary, input, select, textarea, [tabindex] { outline: none; }

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

a { transition: color .15s ease, opacity .15s ease; }
a:hover { opacity: .85; }

a[class*="-link"]:hover,
.nav-link:hover,
.footer-link:hover,
.breadcrumb a:hover { text-decoration-thickness: 2px; text-underline-offset: 3px; }

.gear-card,
.guide-card,
.related-guide,
.faq-item {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.gear-card:hover,
.guide-card:hover,
.related-guide:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}

button, .btn { transition: background .15s ease, color .15s ease, transform .12s ease, box-shadow .15s ease; }
button:hover:not(:disabled), .btn:hover { transform: translateY(-1px); }
button:active:not(:disabled), .btn:active { transform: translateY(0); }

details summary { cursor: pointer; transition: color .15s ease; }
details[open] summary { color: var(--text); }

img { transition: opacity .2s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
