/* ══════════════════════════════════════════════════════
   Estima Learn — Shared stylesheet for all /learn pages
   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: 24px; 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;
  transition: background 0.18s !important;
}
.nav-cta:hover { background: var(--amber-d) !important; }

/* ── Page hero ────────────────────────────────────────── */
.learn-hero {
  padding: 110px 24px 60px;
  max-width: 820px;
  margin: 0 auto;
  border-bottom: 1px solid var(--b1);
}
.learn-eyebrow {
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.learn-eyebrow::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--amber);
}
.learn-h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--white);
}
.learn-lead {
  font-size: 1rem;
  color: var(--concrete);
  max-width: 640px;
  line-height: 1.75;
  margin-bottom: 24px;
}
.learn-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: var(--muted2);
}
.learn-meta span { display: flex; align-items: center; gap: 5px; }

/* ── Summary box (plain English) ─────────────────────── */
.summary-box {
  background: linear-gradient(135deg, rgba(56,189,248,0.06), rgba(56,189,248,0.02));
  border: 1px solid rgba(56,189,248,0.18);
  border-left: 3px solid var(--steel);
  border-radius: var(--rl);
  padding: 20px 24px;
  margin: 32px 0;
}
.summary-box-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 8px;
}
.summary-box p {
  font-size: 0.88rem;
  color: var(--concrete);
  line-height: 1.7;
}

/* ── Main content layout ──────────────────────────────── */
.learn-layout {
  max-width: 1060px;
  margin: 0 auto;
  padding: 52px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 52px;
  align-items: start;
}

/* ── Article body ─────────────────────────────────────── */
.learn-article h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  margin: 40px 0 12px;
  padding-top: 8px;
  border-top: 1px solid var(--b1);
  letter-spacing: -0.02em;
}
.learn-article h2:first-child { margin-top: 0; border-top: none; }
.learn-article h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--concrete);
  margin: 24px 0 8px;
}
.learn-article p {
  font-size: 0.9rem;
  color: var(--concrete);
  line-height: 1.8;
  margin-bottom: 14px;
}
.learn-article ul, .learn-article ol {
  margin: 10px 0 16px 20px;
}
.learn-article li {
  font-size: 0.88rem;
  color: var(--concrete);
  line-height: 1.75;
  margin-bottom: 6px;
}
.learn-article strong { color: var(--white); font-weight: 500; }

/* ── Cost table ───────────────────────────────────────── */
.cost-table-wrap {
  overflow-x: auto;
  margin: 20px 0 28px;
  border-radius: var(--rl);
  border: 1px solid var(--b1);
}
.cost-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 480px;
}
.cost-table thead tr {
  background: var(--s2);
}
.cost-table th {
  padding: 10px 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;
}
.cost-table td {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(42,42,48,0.5);
  color: var(--concrete);
  vertical-align: top;
}
.cost-table tr:last-child td { border-bottom: none; }
.cost-table td:first-child { color: var(--white); font-weight: 400; }
.cost-table tbody tr:hover { background: rgba(255,255,255,0.02); }

/* ── Callout / tip boxes ──────────────────────────────── */
.callout {
  border-radius: var(--r);
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 0.85rem;
  line-height: 1.7;
}
.callout-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.callout.tip {
  background: rgba(34,197,94,0.06);
  border: 1px solid rgba(34,197,94,0.2);
  color: var(--concrete);
}
.callout.tip .callout-label { color: var(--green); }
.callout.warning {
  background: rgba(245,158,11,0.06);
  border: 1px solid rgba(245,158,11,0.2);
  color: var(--concrete);
}
.callout.warning .callout-label { color: var(--amber); }
.callout.info {
  background: rgba(56,189,248,0.05);
  border: 1px solid rgba(56,189,248,0.18);
  color: var(--concrete);
}
.callout.info .callout-label { color: var(--steel); }

/* ── Code references / standards ─────────────────────── */
.standards-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0 24px;
}
.standard-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: var(--r);
  font-size: 0.82rem;
}
.standard-code {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--amber);
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
.standard-desc { color: var(--concrete); line-height: 1.5; }
.standard-desc a { font-size: 0.75rem; }

/* ── FAQ ──────────────────────────────────────────────── */
.faq-list { margin: 16px 0; }
.faq-item {
  border: 1px solid var(--b1);
  border-radius: var(--r);
  margin-bottom: 8px;
  overflow: hidden;
}
.faq-q {
  width: 100%;
  text-align: left;
  padding: 14px 18px;
  background: var(--s1);
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 400;
  cursor: pointer;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: background 0.18s;
}
.faq-q:hover { background: var(--s2); }
.faq-q svg { flex-shrink: 0; color: var(--amber); transition: transform 0.2s; }
.faq-item.open .faq-q svg { transform: rotate(180deg); }
.faq-a {
  display: none;
  padding: 0 18px 14px;
  font-size: 0.85rem;
  color: var(--concrete);
  line-height: 1.75;
  background: var(--s1);
  border-top: 1px solid var(--b1);
}
.faq-item.open .faq-a { display: block; }

/* ── CTA box ──────────────────────────────────────────── */
.learn-cta {
  background: linear-gradient(135deg, rgba(245,158,11,0.1), rgba(245,158,11,0.04));
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: var(--rx);
  padding: 28px 28px;
  margin: 40px 0;
  text-align: center;
}
.learn-cta h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}
.learn-cta p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 18px;
}
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--amber);
  color: #000;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--r);
  text-decoration: none;
  transition: background 0.18s;
}
.btn-cta:hover { background: var(--amber-d); color: #000; text-decoration: none; }

/* ── Sidebar ──────────────────────────────────────────── */
.learn-sidebar { position: sticky; top: 78px; }
.sidebar-card {
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: var(--rl);
  overflow: hidden;
  margin-bottom: 16px;
}
.sidebar-head {
  padding: 12px 16px;
  background: var(--s2);
  border-bottom: 1px solid var(--b1);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.sidebar-body { padding: 14px 16px; }
.toc-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.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); }

.guide-links { display: flex; flex-direction: column; gap: 4px; }
.guide-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-size: 0.78rem;
  color: var(--muted);
  border-radius: 6px;
  transition: all 0.15s;
  text-decoration: none;
}
.guide-link:hover { color: var(--white); background: var(--s2); text-decoration: none; }
.guide-link.active { color: var(--amber); }

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

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