/* ============================================================
   RV Power Geek — Unified Design System
   Technical RV power authority. Navy / graphite / electrical amber.
   Mobile-first. Site-wide changes belong HERE, never per-page.
   ============================================================ */

:root {
  --navy:       #10243a;
  --navy-deep:  #0b1a2b;
  --ink:        #1f2d3a;
  --muted:      #55636e;
  --graphite:   #3a4652;
  --amber:      #e07b14;
  --amber-dark: #b85f08;
  --amber-pale: #fdf1e2;
  --green:      #3f7a5a;
  --green-pale: #eef5f1;
  --red:        #a33a2a;
  --paper:      #ffffff;
  --bg:         #f6f6f4;
  --surface:    #eeeeea;
  --line:       #dcdcd6;
  --max-width:  1140px;
  --radius:     8px;
  --radius-sm:  5px;
  --gutter:     28px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
button, select, input, textarea { font: inherit; }
button, a, select { touch-action: manipulation; }
button { cursor: pointer; }
a { color: var(--amber-dark); text-underline-offset: 4px; text-decoration: none; }
a:hover { color: var(--amber); text-decoration: underline; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--amber); outline-offset: 3px;
}
table { border-collapse: collapse; width: 100%; }

/* --- Typography --- */
h1, h2, h3, h4 { color: var(--navy); line-height: 1.18; letter-spacing: -.025em; }
h1 { font-size: clamp(30px, 4.3vw, 50px); margin: 10px 0 20px; max-width: 820px; }
h2 { font-size: clamp(25px, 3vw, 33px); margin: 0 0 14px; }
h3 { font-size: clamp(19px, 2.4vw, 23px); margin: 10px 0 10px; }
h4 { font-size: 17px; margin: 8px 0 8px; }
p  { margin: 0 0 18px; }
ul, ol { margin: 0 0 18px 22px; }
li { margin-bottom: 7px; }
.kicker {
  font-size: 12px; letter-spacing: .14em; font-weight: 750;
  color: var(--amber-dark); text-transform: uppercase;
  display: block; margin-bottom: 6px;
}
.lede { font-size: 1.12rem; color: var(--graphite); max-width: 760px; }
.small { font-size: 14px; color: var(--muted); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }

/* --- Layout --- */
.wrap { max-width: var(--max-width); margin: auto; padding: 0 var(--gutter); }
section { padding: 52px 0; }
section.tight { padding: 34px 0; }
.alt-bg { background: var(--surface); }

/* ==============================
   HEADER / NAV
   ============================== */
.site-head {
  background: var(--navy);
  border-bottom: 3px solid var(--amber);
  position: sticky; top: 0; z-index: 200;
}
.head-inner {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 64px; gap: 18px; padding: 10px var(--gutter);
  flex-wrap: wrap; max-width: var(--max-width); margin: auto;
}
.logo {
  font-size: 1.3rem; font-weight: 900; color: #fff;
  letter-spacing: -.5px; text-decoration: none; white-space: nowrap; flex-shrink: 0;
}
.logo:hover { color: #fff; text-decoration: none; }
.logo span { color: var(--amber); }
.nav-toggle {
  display: none; background: transparent; border: 1px solid rgba(255,255,255,.35);
  color: #fff; font-size: 20px; line-height: 1; padding: 6px 11px; border-radius: var(--radius-sm);
}
.main-nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.main-nav a, .nav-dropdown > a {
  color: rgba(255,255,255,.86); font-size: 13.5px; font-weight: 600;
  padding: 8px 10px; border-radius: 4px; text-decoration: none;
  transition: background .15s, color .15s;
}
.main-nav a:hover, .nav-dropdown > a:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.nav-dropdown { position: relative; }
.dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0;
  background: var(--navy); border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius); min-width: 248px; padding: 7px 0;
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
}
.dropdown-menu a { display: block; padding: 9px 16px; border-radius: 0; font-weight: 500; }
.nav-dropdown:hover .dropdown-menu, .nav-dropdown:focus-within .dropdown-menu { display: block; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; width: 100%; flex-direction: column; align-items: stretch;
    gap: 0; padding: 8px 0 12px; border-top: 1px solid rgba(255,255,255,.14); margin-top: 10px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 11px 4px; font-size: 15px; }
  .dropdown-menu { display: block; position: static; border: 0; box-shadow: none; background: transparent; padding: 0 0 6px 14px; min-width: 0; }
  .dropdown-menu a { padding: 8px 4px; font-size: 14px; color: rgba(255,255,255,.7); }
}

/* ==============================
   HERO
   ============================== */
.hero { background: var(--navy); color: #fff; padding: 62px 0 58px; }
.hero .wrap { padding: 0 var(--gutter); }
.hero h1 { color: #fff; }
.hero .kicker { color: var(--amber); }
.hero p { color: rgba(255,255,255,.84); font-size: 1.12rem; max-width: 680px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* compact text band for guides/hubs/articles */
.hero-compact { background: var(--navy); color: #fff; padding: 40px 0 36px; }
.hero-compact .wrap { padding: 0 var(--gutter); }
.hero-compact h1 { color: #fff; margin: 6px 0 12px; }
.hero-compact .kicker { color: var(--amber); }
.hero-compact p { color: rgba(255,255,255,.82); max-width: 720px; margin: 0; }

/* ==============================
   BUTTONS
   ============================== */
.btn {
  display: inline-block; padding: 13px 22px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 15px; text-decoration: none; border: 2px solid transparent;
  transition: background .15s, border-color .15s, color .15s, transform .08s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--amber); color: #201202; border-color: var(--amber); }
.btn-primary:hover { background: var(--amber-dark); border-color: var(--amber-dark); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; border-color: #fff; }
.btn-solid { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-solid:hover { background: var(--navy-deep); color: #fff; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ==============================
   CARD GRIDS
   ============================== */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(212px, 1fr)); }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column;
}
.card h3 { margin-top: 0; }
.card p { color: var(--graphite); font-size: 15px; }
.card .card-foot { margin-top: auto; padding-top: 12px; }
a.card { text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s, transform .12s; }
a.card:hover {
  border-color: var(--amber); box-shadow: 0 8px 22px rgba(16,36,58,.10);
  transform: translateY(-2px); text-decoration: none;
}
a.card:hover h3 { color: var(--amber-dark); }
.card-icon { font-size: 13px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--amber-dark); margin-bottom: 8px; }

/* hub tiles */
.hub-tile { border-left: 4px solid var(--amber); }

/* ==============================
   ARTICLE BODY
   ============================== */
.article { display: grid; grid-template-columns: minmax(0,1fr) 290px; gap: 42px; align-items: start; }
@media (max-width: 960px) { .article { grid-template-columns: 1fr; gap: 26px; } }
.article-body { max-width: 760px; }
.article-body h2 { margin-top: 38px; padding-top: 4px; }
.article-body h3 { margin-top: 26px; }
.article-body table { margin: 22px 0; font-size: 15px; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.article-body th { background: var(--surface); color: var(--navy); font-weight: 700; }
.article-body tbody tr:nth-child(even) { background: #fafaf8; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.sidebar { position: sticky; top: 90px; font-size: 15px; }
.sidebar-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.sidebar-box h4 { margin-top: 0; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.toc { list-style: none; margin: 0; }
.toc li { margin-bottom: 8px; }
.toc a { color: var(--ink); font-weight: 500; }

/* callouts */
.note, .warn, .spec-note {
  border-radius: var(--radius); padding: 16px 18px; margin: 22px 0; font-size: 15.5px;
  border-left: 4px solid var(--navy); background: var(--surface);
}
.note p:last-child, .warn p:last-child, .spec-note p:last-child { margin-bottom: 0; }
.warn { border-left-color: var(--red); background: #fbf0ee; }
.spec-note { border-left-color: var(--green); background: var(--green-pale); }

/* source / claim labels */
.claim-type {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; padding: 2px 7px; border-radius: 3px; vertical-align: middle;
}
.claim-mfr   { background: #e5edf5; color: #10243a; }
.claim-code  { background: #fbe6e2; color: #7d2a1d; }
.claim-prac  { background: var(--surface); color: var(--graphite); }
.claim-edit  { background: var(--amber-pale); color: var(--amber-dark); }

/* ==============================
   PRODUCT CARD
   ============================== */
.product-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 20px; margin: 22px 0;
}
@media (max-width: 620px) { .product-card { grid-template-columns: 1fr; } }
.product-card img { border-radius: var(--radius-sm); margin: auto; }
.product-card h3 { margin-top: 0; }
.product-meta { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.price-line { font-weight: 700; color: var(--navy); }
.price-fallback { font-weight: 600; color: var(--muted); }
.spec-list { list-style: none; margin: 0 0 14px; font-size: 15px; }
.spec-list li { margin-bottom: 5px; }
.spec-list b { color: var(--navy); }
.editorial-score {
  display: inline-flex; align-items: baseline; gap: 6px;
  background: var(--navy); color: #fff; border-radius: var(--radius-sm);
  padding: 5px 11px; font-weight: 800; font-size: 15px; text-decoration: none;
}
.editorial-score:hover { background: var(--navy-deep); color: #fff; text-decoration: none; }
.editorial-score small { font-weight: 600; opacity: .8; font-size: 11px; }

/* ==============================
   TOOLS / CALCULATORS
   ============================== */
.calc { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; min-width: 0; }
.field label { font-weight: 650; font-size: 14px; color: var(--navy); }
.field input, .field select {
  padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); width: 100%;
  min-width: 0; max-width: 100%; box-sizing: border-box; font-size: 16px;
}
.field input:focus-visible, .field select:focus-visible, .calc button:focus-visible {
  outline: 3px solid var(--amber); outline-offset: 2px;
}
.field .hint { font-size: 12.5px; color: var(--muted); }
.calc-out {
  margin-top: 22px; padding: 20px; border-radius: var(--radius);
  background: var(--navy); color: #fff;
}
.calc-out.pending { background: var(--surface); color: var(--graphite); }
.calc-out h3 { color: #fff; margin-top: 0; }
.calc-out.pending h3 { color: var(--navy); }
.calc-result-num { font-size: clamp(30px, 5vw, 44px); font-weight: 900; line-height: 1.1; color: var(--amber); }
.calc-out ul { margin: 12px 0 0 20px; }
.calc-out li { color: rgba(255,255,255,.9); }
.calc-rows { list-style: none; margin: 14px 0 0; font-size: 15px; }
.calc-rows li { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.16); }
.calc-rows li:last-child { border-bottom: 0; }
.calc { overflow-wrap: anywhere; }
.load-row { display: grid; grid-template-columns: minmax(0,1fr) 96px 78px 44px; gap: 10px; align-items: end; margin-bottom: 10px; }
/* 50 A load rows carry an extra leg selector, which needs more room than the
   surge-multiplier field it sits in on the other calculators. */
.load-row-leg { grid-template-columns: minmax(0,1fr) 96px 104px 44px; }
.load-row .btn { min-height: 44px; padding-left: 0; padding-right: 0; }
@media (max-width: 720px) {
  .load-row, .load-row-leg { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .load-row > .field:first-child { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .load-row, .load-row-leg { grid-template-columns: minmax(0,1fr); }
  .load-row > .field:first-child { grid-column: auto; }
}
@media (max-width: 620px) { .calc { padding: 16px; } }
.assumptions { font-size: 14px; color: var(--muted); margin-top: 18px; }
.assumptions summary { cursor: pointer; font-weight: 650; color: var(--navy); }
.assumptions ul { margin-top: 10px; }

/* ==============================
   BREADCRUMBS
   ============================== */
.crumbs { font-size: 13.5px; color: var(--muted); padding: 14px 0 0; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--amber-dark); }
.crumbs span { margin: 0 6px; opacity: .6; }

/* ==============================
   DISCLOSURE
   ============================== */
.disclosure {
  font-size: 13.5px; color: var(--muted); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 14px; margin: 0 0 24px;
}
.disclosure p { margin: 0; }

/* ==============================
   FOOTER
   ============================== */
.site-foot { background: var(--navy-deep); color: rgba(255,255,255,.72); padding: 46px 0 26px; margin-top: 10px; font-size: 14.5px; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); gap: 28px; }
.site-foot h4 { color: #fff; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px; }
.site-foot a { color: rgba(255,255,255,.72); display: block; padding: 4px 0; }
.site-foot a:hover { color: var(--amber); text-decoration: none; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: 30px; padding-top: 18px; font-size: 13px; color: rgba(255,255,255,.55); }
.foot-bottom p { margin-bottom: 8px; }

/* ==============================
   UTILITIES
   ============================== */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: 14px; }
.badge {
  display: inline-block; font-size: 12px; font-weight: 750; letter-spacing: .06em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 3px;
  background: var(--amber-pale); color: var(--amber-dark);
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.pulse { animation: rvpg-pulse 1.1s ease-out 2; }
@keyframes rvpg-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(224,123,20,.55); }
  100% { box-shadow: 0 0 0 16px rgba(224,123,20,0); }
}
