/*!
 * EliteHub design system - polish pass 2026-10-22
 * Presentation layer only: palette, rhythm, guides band, trust note,
 * and the guide article theme. Built on the existing green brand color.
 * Does not touch the speed-test engine, element IDs, or script order.
 */

/* ============ Tokens ============ */
:root{
  --eh-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --eh-green: #34d399;
  --eh-green-deep: #12805c;
  --eh-green-ink: #0c3b28;
  --eh-gold: #e8b93c;
  --eh-bg: #0a100c;
  --eh-bg-soft: #0e1611;
  --eh-card: #121c16;
  --eh-card-2: #16241c;
  --eh-text: #eef4ef;
  --eh-muted: #a9bcb1;
  --eh-faint: #82968b;
  --eh-line: rgba(255,255,255,.12);
  --eh-ring: rgba(52,211,153,.4);
  --eh-radius: 1rem;
  --eh-maxw: 64rem;
  --eh-shadow: 0 12px 32px rgba(0,0,0,.35);
}

/* ============ Base ============ */
html{ scroll-behavior: smooth; }
html, body{ overflow-x: clip; }
@supports not (overflow: clip){
  html, body{ overflow-x: hidden; }
}
img{ max-width: 100%; height: auto; }
:focus-visible{ outline: 2px solid var(--eh-green); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
}

/* ============ Homepage: guides band ============ */
#eh-guides-band{
  background: linear-gradient(135deg, hsl(165 45% 5%), hsl(170 40% 8%));
  color: hsl(45 30% 95%);
  padding: 3rem 1.25rem;
  border-top: 1px solid var(--eh-line);
  font-family: var(--eh-font);
}
.eh-band-inner{ max-width: var(--eh-maxw); margin: 0 auto; }
.eh-band-head h2{ font-size: 1.5rem; font-weight: 700; margin: 0 0 .5rem; color: #fff; }
.eh-band-head p{ color: var(--eh-muted); margin: 0 0 1.5rem; font-size: .95rem; }
#eh-guides-list{ list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.eh-guide-card a{
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.25rem;
  align-items: center;
  background: var(--eh-card);
  border: 1px solid var(--eh-line);
  border-radius: var(--eh-radius);
  padding: 1rem;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.eh-guide-card a:hover{
  transform: translateY(-2px);
  border-color: var(--eh-ring);
  box-shadow: var(--eh-shadow);
}
.eh-guide-card img{
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: .65rem;
  display: block;
  background: var(--eh-bg-soft);
}
.eh-guide-card-body{ display: block; }
.eh-guide-card-title{ display: block; color: var(--eh-gold); font-weight: 700; font-size: 1.05rem; margin-bottom: .4rem; }
.eh-guide-card a:hover .eh-guide-card-title{ text-decoration: underline; }
.eh-guide-card-desc{ display: block; color: var(--eh-muted); font-size: .9rem; line-height: 1.55; }

/* ============ Homepage: trust note (added by eh-design-addons) ============ */
#eh-trust-note{
  max-width: var(--eh-maxw);
  margin: 0 auto 2rem;
  padding: 0 1.25rem;
  color: var(--eh-muted);
  font-size: .88rem;
  line-height: 1.6;
  text-align: center;
  font-family: var(--eh-font);
}
#eh-trust-note strong{ color: var(--eh-text); }

/* ============ Guide article theme ============ */
.eh-guide{
  margin: 0;
  font-family: var(--eh-font);
  color: var(--eh-text);
  background: radial-gradient(1200px 600px at 50% -10%, hsl(165 40% 10%), var(--eh-bg));
  line-height: 1.7;
  min-height: 100vh;
}
.eh-wrap{ max-width: var(--eh-maxw); margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }
.eh-site-header{
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,16,12,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--eh-line);
}
.eh-site-header .eh-wrap{
  display: flex; align-items: center; justify-content: space-between;
  padding-top: .9rem; padding-bottom: .9rem;
}
.eh-logo{ color: #fff; font-weight: 800; font-size: 1.3rem; text-decoration: none; white-space: nowrap; }
.eh-nav{ display: flex; align-items: center; flex-wrap: wrap; }
.eh-nav a{
  color: var(--eh-muted); text-decoration: none; font-weight: 600; font-size: .92rem;
  margin-left: 1.4rem; padding: .25rem 0;
}
.eh-nav a:hover{ color: var(--eh-green); }
.eh-nav a[aria-current="page"]{ color: var(--eh-green); }
.eh-crumb{ padding-top: 1.25rem; font-size: .85rem; color: var(--eh-faint); }
.eh-crumb a{ color: var(--eh-green); text-decoration: none; }
.eh-crumb a:hover{ text-decoration: underline; }
.eh-article-wrap{ max-width: 46rem; }
.eh-article{
  background: var(--eh-card);
  border: 1px solid var(--eh-line);
  border-radius: var(--eh-radius);
  padding: 2.25rem;
  margin: 1.25rem auto 3rem;
  box-shadow: var(--eh-shadow);
}
.eh-article h1{ font-size: 2rem; line-height: 1.25; margin: 0 0 .6rem; color: #fff; letter-spacing: -.01em; }
.eh-byline{ color: var(--eh-faint); font-size: .9rem; margin: 0 0 1.4rem; }
.eh-article figure{ margin: 0 0 1.6rem; }
.eh-article figure img{ width: 100%; border-radius: .75rem; display: block; }
.eh-article figcaption{ font-size: .8rem; color: var(--eh-faint); margin-top: .5rem; text-align: center; }
.eh-article h2{ font-size: 1.4rem; margin: 2.2rem 0 .8rem; color: #fff; letter-spacing: -.01em; }
.eh-article p{ margin: 0 0 1rem; }
.eh-article a{ color: var(--eh-green); }
.eh-lede{ font-size: 1.12rem; }
.eh-toc{
  list-style: none; margin: 1.2rem 0; padding: 1rem 1.25rem;
  background: var(--eh-bg-soft); border: 1px solid var(--eh-line); border-radius: .75rem;
}
.eh-toc li{ margin: .35rem 0; }
.eh-toc a{ text-decoration: none; font-weight: 600; font-size: .95rem; }
.eh-toc a:hover{ text-decoration: underline; }
.eh-article ol, .eh-article ul.eh-list{ padding-left: 1.4rem; }
.eh-article li{ margin: .6rem 0; }
.eh-article li::marker{ color: var(--eh-green); }
.eh-tip{
  background: rgba(52,211,153,.08);
  border: 1px solid rgba(52,211,153,.3);
  border-radius: .75rem;
  padding: 1rem 1.2rem;
  margin: 1.4rem 0;
}
.eh-tip strong{ color: var(--eh-green); }
.eh-pull{
  font-size: 1.2rem;
  border-left: 4px solid var(--eh-gold);
  padding: .4rem 0 .4rem 1rem;
  margin: 1.6rem 0;
  font-style: italic;
}
.eh-article table{ width: 100%; border-collapse: collapse; margin: 1.4rem 0; font-size: .92rem; }
.eh-article th, .eh-article td{ text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--eh-line); vertical-align: top; }
.eh-article th{ background: var(--eh-bg-soft); color: #fff; }
.eh-table-wrap{ overflow-x: auto; }
.eh-cta-card{
  background: linear-gradient(135deg, hsl(165 45% 8%), hsl(170 40% 12%));
  border: 1px solid var(--eh-ring);
  border-radius: var(--eh-radius);
  padding: 2rem;
  text-align: center;
  margin: 2.4rem 0;
}
.eh-cta-card h2{ margin: 0 0 .6rem; font-size: 1.35rem; }
.eh-cta-card p{ color: var(--eh-muted); margin: 0 0 1.4rem; }
.eh-btn{
  display: inline-block;
  background: linear-gradient(135deg, var(--eh-green), var(--eh-gold));
  color: #06231a !important;
  font-weight: 700;
  padding: .85rem 2rem;
  border-radius: .75rem;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.eh-btn:hover{ transform: translateY(-1px); box-shadow: var(--eh-shadow); }
.eh-faq-item{ margin: 0 0 1.2rem; }
.eh-faq-item strong{ display: block; margin-bottom: .3rem; font-size: 1.02rem; color: #fff; }
.eh-related{
  background: var(--eh-bg-soft);
  border: 1px solid var(--eh-line);
  border-radius: .75rem;
  padding: 1.2rem 1.4rem;
  margin: 2rem 0 0;
}
.eh-related h2{ font-size: 1.1rem; margin: 0 0 .6rem; }
.eh-related ul{ list-style: none; padding: 0; margin: 0; }
.eh-related li{ margin: .4rem 0; }
.eh-site-footer{
  border-top: 1px solid var(--eh-line);
  padding: 2.5rem 0;
  background: var(--eh-bg-soft);
  font-family: var(--eh-font);
}
.eh-site-footer nav{ display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: 1rem 0; }
.eh-site-footer nav a{ color: var(--eh-muted); text-decoration: none; font-size: .9rem; }
.eh-site-footer nav a:hover{ color: var(--eh-green); }
.eh-footer-blurb{ color: var(--eh-faint); font-size: .9rem; max-width: 32rem; margin: .6rem 0 0; }
.eh-copy{ color: var(--eh-faint); font-size: .85rem; margin: 1.2rem 0 0; }

/* ============ Responsive ============ */
@media (max-width: 640px){
  .eh-guide-card a{ grid-template-columns: 1fr; }
  .eh-guide-card img{ aspect-ratio: 16/9; }
  #eh-guides-band{ padding: 2.25rem 1rem; }
  .eh-article{ padding: 1.4rem; }
  .eh-article h1{ font-size: 1.55rem; }
  .eh-nav a{ margin-left: .9rem; font-size: .82rem; }
  .eh-logo{ font-size: 1.1rem; }
  #eh-trust-note{ text-align: left; }
}
@media (prefers-reduced-motion: reduce){
  .eh-guide-card a, .eh-btn{ transition: none; }
  .eh-guide-card a:hover, .eh-btn:hover{ transform: none; }
}
/* ============ Homepage header/footer professional pass - 2026-10-31 ============ */
/* Scoped to #root so guide/article pages are untouched. Lightweight CSS only. */
#root header{border-bottom:1px solid rgba(52,211,153,.35)!important;}
#root header a[href="/"]{display:inline-flex!important;align-items:center!important;gap:.55rem!important;font-weight:800!important;letter-spacing:-.01em!important;text-decoration:none!important;}
#root header a[href="/"] svg{width:28px!important;height:28px!important;min-width:28px!important;color:#34d399!important;background:rgba(52,211,153,.12)!important;border:1px solid rgba(52,211,153,.35)!important;border-radius:.6rem!important;padding:4px!important;box-sizing:border-box!important;}
#root header nav[aria-label="Main"]{display:flex!important;align-items:center!important;gap:1.5rem!important;}
#root header nav[aria-label="Main"] a,#root header nav[aria-label="Main"] button{font-weight:600!important;}
#root footer{border-top:1px solid rgba(52,211,153,.35)!important;padding-top:2.5rem!important;padding-bottom:1.5rem!important;}
#root footer h3{font-size:1.05rem!important;font-weight:700!important;letter-spacing:-.01em!important;margin-bottom:.9rem!important;}
#root footer a:hover{color:#34d399!important;text-decoration:underline!important;}

/* ============ Homepage header brand - 2026-10-31, second pass ============ */
/* The React header/footer are divs, not header/footer elements, so target the brand link and Main nav directly. */
:has(> nav[aria-label="Main"]){border-bottom:1px solid rgba(52,211,153,.35)!important;}
a[href="/"]{display:inline-flex!important;align-items:center!important;gap:.55rem!important;font-weight:800!important;letter-spacing:-.01em!important;text-decoration:none!important;}
a[href="/"] svg{width:28px!important;height:28px!important;min-width:28px!important;color:#34d399!important;background:rgba(52,211,153,.12)!important;border:1px solid rgba(52,211,153,.35)!important;border-radius:.6rem!important;padding:4px!important;box-sizing:border-box!important;}
nav[aria-label="Main"]{display:flex!important;align-items:center!important;gap:1.5rem!important;}
nav[aria-label="Main"] a,nav[aria-label="Main"] button{font-weight:600!important;}

/* ============ Homepage header brand - 2026-10-31, third pass: stronger badge ============ */
a[href="/"] svg,a[href="/"] img{width:34px!important;height:34px!important;min-width:34px!important;color:#34d399!important;background:rgba(52,211,153,.20)!important;border:1px solid rgba(52,211,153,.60)!important;border-radius:.65rem!important;padding:5px!important;box-sizing:border-box!important;}

header .container > div.flex.items-center.gap-2:has(> a[href="/"]) > svg{display:none!important;}
header .container > div.flex.items-center.gap-2:has(> a[href="/"])::before{content:"";display:inline-block;flex:none;width:34px;height:34px;min-width:34px;background:url(/favicon.png) center/contain no-repeat;background-origin:content-box;background-color:rgba(52,211,153,.20);border:1px solid rgba(52,211,153,.60);border-radius:.65rem;padding:5px;box-sizing:border-box;}
div.flex.items-center.gap-2.mb-4:has(> span) > svg{display:none!important;}
div.flex.items-center.gap-2.mb-4:has(> span)::before{content:"";display:inline-block;flex:none;width:34px;height:34px;min-width:34px;background:url(/favicon.png) center/contain no-repeat;background-origin:content-box;background-color:rgba(52,211,153,.20);border:1px solid rgba(52,211,153,.60);border-radius:.65rem;padding:5px;box-sizing:border-box;}