/* ══════════════════════════════════════════════════════
   Estima Insights — Shared stylesheet
   CSS variables mirror index.html exactly.
   ══════════════════════════════════════════════════════ */

:root {
  --black:   #09090B;
  --s1:      #111113;
  --s2:      #18181B;
  --s3:      #222226;
  --b1:      #2A2A30;
  --b2:      #3A3A42;
  --white:   #F4F4F5;
  --muted:   #71717A;
  --muted2:  #52525B;
  --concrete:#A1A1AA;
  --amber:   #F59E0B;
  --amber-d: #D97706;
  --steel:   #38BDF8;
  --steel-d: #0284C7;
  --green:   #22C55E;
  --red:     #EF4444;
  --r:       8px;
  --rl:      14px;
  --rx:      20px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--black);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--steel); text-decoration: none; }
a:hover { color: var(--amber); text-decoration: underline; }

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(9,9,11,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--b1);
}
.nav-logo { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.1rem; color: var(--white); text-decoration: none; }
.nav-logo span { color: var(--amber); }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { font-size: 0.8rem; color: var(--muted); text-decoration: none; transition: color 0.18s; }
.nav-links a:hover, .nav-links a.active { color: var(--white); text-decoration: none; }
.nav-cta { padding: 6px 14px; background: var(--amber); color: #000 !important; border-radius: var(--r); font-weight: 600; font-size: 0.78rem !important; }
.nav-cta:hover { background: var(--amber-d) !important; }

/* ── Article hero ── */
.article-hero {
  padding: 100px 24px 52px;
  max-width: 820px;
  margin: 0 auto;
  border-bottom: 1px solid var(--b1);
}
.article-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 16px;
}
.article-eyebrow::before { content: ''; display: inline-block; width: 24px; height: 2px; background: var(--amber); }
.article-h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: 20px;
  color: var(--white);
}
.article-lead {
  font-size: 1.05rem;
  color: var(--concrete);
  max-width: 660px;
  line-height: 1.75;
  margin-bottom: 28px;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.72rem;
  color: var(--muted2);
  padding-top: 20px;
  border-top: 1px solid var(--b1);
}
.article-meta span { display: flex; align-items: center; gap: 5px; }
.article-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tag-amber { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.25); color: var(--amber); }
.tag-steel { background: rgba(56,189,248,0.08); border: 1px solid rgba(56,189,248,0.2); color: var(--steel); }
.tag-green { background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.2); color: var(--green); }

/* ── Layout ── */
.article-layout {
  max-width: 1060px;
  margin: 0 auto;
  padding: 56px 24px 100px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 56px;
  align-items: start;
}

/* ── Article body ── */
.article-body { min-width: 0; }
.article-body h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
  margin: 52px 0 14px;
  padding-top: 10px;
  border-top: 1px solid var(--b1);
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.article-body h2:first-child { margin-top: 0; border-top: none; }
.article-body h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--concrete);
  margin: 28px 0 10px;
  letter-spacing: -0.01em;
}
.article-body p {
  font-size: 0.95rem;
  color: var(--concrete);
  line-height: 1.85;
  margin-bottom: 18px;
}
.article-body ul, .article-body ol {
  margin: 10px 0 20px 22px;
}
.article-body li {
  font-size: 0.92rem;
  color: var(--concrete);
  line-height: 1.8;
  margin-bottom: 8px;
}
.article-body strong { color: var(--white); font-weight: 500; }
.article-body em { color: var(--amber); font-style: normal; font-weight: 400; }

/* ── Pull quote ── */
.pull-quote {
  border-left: 3px solid var(--amber);
  padding: 16px 24px;
  margin: 32px 0;
  background: rgba(245,158,11,0.04);
  border-radius: 0 var(--r) var(--r) 0;
}
.pull-quote p {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  color: var(--white) !important;
  line-height: 1.55 !important;
  margin: 0 !important;
}

/* ── Data table ── */
.data-table-wrap {
  overflow-x: auto;
  margin: 24px 0 32px;
  border-radius: var(--rl);
  border: 1px solid var(--b1);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  min-width: 500px;
}
.data-table thead tr { background: var(--s2); }
.data-table th {
  padding: 11px 16px;
  text-align: left;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--b1);
  white-space: nowrap;
}
.data-table td {
  padding: 11px 16px;
  border-bottom: 1px solid rgba(42,42,48,0.5);
  color: var(--concrete);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table td:first-child { color: var(--white); font-weight: 400; }
.data-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.data-table .hi { color: var(--green); font-weight: 500; }
.data-table .lo { color: var(--red); font-weight: 500; }
.data-table .mid { color: var(--amber); font-weight: 500; }

/* ── Callout boxes ── */
.callout {
  border-radius: var(--r);
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 0.88rem;
  line-height: 1.75;
}
.callout-label {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.callout.insight { background: rgba(56,189,248,0.05); border: 1px solid rgba(56,189,248,0.18); color: var(--concrete); }
.callout.insight .callout-label { color: var(--steel); }
.callout.fact { background: rgba(245,158,11,0.05); border: 1px solid rgba(245,158,11,0.18); color: var(--concrete); }
.callout.fact .callout-label { color: var(--amber); }
.callout.warning { background: rgba(239,68,68,0.05); border: 1px solid rgba(239,68,68,0.18); color: var(--concrete); }
.callout.warning .callout-label { color: var(--red); }

/* ── CTA ── */
.article-cta {
  background: linear-gradient(135deg, rgba(245,158,11,0.1), rgba(245,158,11,0.03));
  border: 1px solid rgba(245,158,11,0.22);
  border-radius: var(--rx);
  padding: 32px;
  margin: 48px 0;
  text-align: center;
}
.article-cta h3 { font-family: 'Syne', sans-serif; font-size: 1.15rem; font-weight: 800; color: var(--white); margin-bottom: 8px; }
.article-cta p { font-size: 0.88rem; color: var(--muted); margin-bottom: 20px; }
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  background: var(--amber);
  color: #000;
  font-weight: 700;
  font-size: 0.88rem;
  border-radius: var(--r);
  text-decoration: none;
  transition: background 0.18s;
}
.btn-cta:hover { background: var(--amber-d); color: #000; text-decoration: none; }

/* ── Sidebar ── */
.article-sidebar { position: sticky; top: 78px; }
.sidebar-card {
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: var(--rl);
  overflow: hidden;
  margin-bottom: 14px;
}
.sidebar-head {
  padding: 11px 16px;
  background: var(--s2);
  border-bottom: 1px solid var(--b1);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.sidebar-body { padding: 12px 14px; }
.toc-list { list-style: none; display: flex; flex-direction: column; gap: 1px; }
.toc-list a { display: block; padding: 5px 8px; font-size: 0.78rem; color: var(--muted); border-radius: 5px; transition: all 0.15s; text-decoration: none; }
.toc-list a:hover { color: var(--white); background: var(--s2); text-decoration: none; }
.toc-list a.active { color: var(--amber); background: rgba(245,158,11,0.07); }
.related-list { display: flex; flex-direction: column; gap: 3px; }
.related-link { display: block; padding: 7px 10px; font-size: 0.78rem; color: var(--muted); border-radius: 6px; transition: all 0.15s; text-decoration: none; line-height: 1.45; }
.related-link:hover { color: var(--white); background: var(--s2); text-decoration: none; }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--b1);
  padding: 32px 24px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted2);
}
.site-footer a { color: var(--muted); margin: 0 9px; text-decoration: none; }
.site-footer a:hover { color: var(--white); }

/* ── Hub page cards ── */
.hub-hero {
  padding: 110px 24px 60px;
  max-width: 820px;
  margin: 0 auto;
  border-bottom: 1px solid var(--b1);
}
.hub-eyebrow {
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hub-eyebrow::before { content: ''; display: inline-block; width: 24px; height: 2px; background: var(--amber); }
.hub-h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}
.hub-lead { font-size: 1rem; color: var(--concrete); max-width: 600px; line-height: 1.75; }
.hub-main { max-width: 1060px; margin: 0 auto; padding: 52px 24px 100px; }
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 60px;
}
.hub-card {
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: var(--rx);
  padding: 26px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.hub-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--amber), var(--steel));
  opacity: 0;
  transition: opacity 0.2s;
}
.hub-card:hover { border-color: rgba(245,158,11,0.4); transform: translateY(-2px); text-decoration: none; }
.hub-card:hover::before { opacity: 1; }
.hub-card-tag { display: flex; gap: 6px; flex-wrap: wrap; }
.hub-card-title { font-family: 'Syne', sans-serif; font-size: 1.05rem; font-weight: 700; color: var(--white); line-height: 1.3; }
.hub-card-desc { font-size: 0.83rem; color: var(--muted); line-height: 1.65; flex: 1; }
.hub-card-meta { display: flex; align-items: center; justify-content: space-between; font-size: 0.7rem; color: var(--muted2); padding-top: 8px; border-top: 1px solid var(--b1); }
.hub-card-read { color: var(--amber); font-weight: 600; font-size: 0.75rem; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; gap: 40px; }
  .article-sidebar { position: static; }
}
@media (max-width: 600px) {
  .nav { padding: 0 16px; }
  .nav-links { gap: 14px; }
  .article-hero { padding: 88px 16px 40px; }
  .article-layout { padding: 32px 16px 60px; }
  .hub-hero { padding: 88px 16px 40px; }
  .hub-main { padding: 32px 16px 60px; }
  .hub-grid { grid-template-columns: 1fr; }
}
