/* ============================================================
   Learn Hub stylesheet, built on the brand tokens from
   /architecture/design-tokens.json. Compatible with the existing
   site's main.css. Scoped via .page-learn-hub on <body>.
   ============================================================ */

/* Tokens (also defined in main.css for sticky-nav but redeclared
   here so this file can be served standalone if needed) */
:root {
  --lh-brand: #3eb74f;
  --lh-brand-light: #5cd968;
  --lh-brand-dark: #2a8a3c;
  --lh-bg: #0a0a0a;
  --lh-bg-elev: #131313;
  --lh-bg-muted: rgba(255,255,255,0.04);
  --lh-bg-subtle: rgba(255,255,255,0.02);
  --lh-text: #ffffff;
  --lh-text-high: rgba(255,255,255,0.85);
  --lh-text-muted: rgba(255,255,255,0.65);
  --lh-text-low: rgba(255,255,255,0.45);
  --lh-stroke: rgba(255,255,255,0.08);
  --lh-stroke-strong: rgba(255,255,255,0.15);
  --lh-g-blue: #4285F4;
  --lh-g-red: #EA4335;
  --lh-g-yellow: #FBBC05;
  --lh-g-green: #34A853;
  --lh-ai: #A78BFA;
  --lh-amber: #f5a524;
  --lh-display: 'Gotham','Plus Jakarta Sans',-apple-system,sans-serif;
  --lh-body: 'Plus Jakarta Sans',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}

/* Body base */
body.page-learn-hub { background: var(--lh-bg); color: var(--lh-text); font-family: var(--lh-body); -webkit-font-smoothing: antialiased; }

/* ============================================================
   Container + spacing
   ============================================================ */
.lh-container { max-width: 880px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .lh-container { padding: 0 32px; } }

/* ============================================================
   Typography
   ============================================================ */
.lh-h1 { font-family: var(--lh-display); font-weight: 700; letter-spacing: 0; line-height: 1.1; font-size: clamp(2rem, 5vw, 3.5rem); color: #fff; margin: 0 0 16px; }
.lh-h2 { font-family: var(--lh-display); font-weight: 700; letter-spacing: 0; line-height: 1.2; font-size: clamp(1.5rem, 3vw, 2.25rem); color: #fff; margin: 48px 0 16px; scroll-margin-top: 80px; }
.lh-h3 { font-family: var(--lh-display); font-weight: 700; letter-spacing: 0; line-height: 1.3; font-size: 1.25rem; color: #fff; margin: 32px 0 12px; }
.lh-dek { color: var(--lh-text-muted); font-size: 1.25rem; line-height: 1.5; margin: 0 0 24px; max-width: 720px; }
.lh-eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--lh-brand); font-family: var(--lh-display); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 16px; }
.lh-eyebrow__sep { opacity: 0.4; }

.lh-body { font-size: 1.0625rem; line-height: 1.75; color: var(--lh-text); }
.lh-body p { margin: 0 0 24px; }
.lh-body strong { color: #fff; font-weight: 700; }
.lh-body em { color: var(--lh-text-high); font-style: italic; }
.lh-body a { color: var(--lh-brand); text-decoration: none; border-bottom: 1px solid rgba(62,183,79,0.35); transition: border-color .2s, color .2s; }
.lh-body a:hover { color: var(--lh-brand-light); border-bottom-color: var(--lh-brand-light); }
.lh-body a.term-xref { color: var(--lh-brand); text-decoration: none; border-bottom: 1px dashed rgba(62,183,79,0.45); }
.lh-body a.term-xref:hover { border-bottom-style: solid; }
.lh-body ul, .lh-body ol { margin: 0 0 24px; padding-left: 22px; }
.lh-body li { margin-bottom: 10px; }
.lh-body code { font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size: 0.92em; background: rgba(255,255,255,0.06); padding: 2px 6px; border-radius: 4px; color: var(--lh-brand-light); }
.lh-body pre { background: var(--lh-bg-elev); border: 1px solid var(--lh-stroke); border-radius: 8px; padding: 16px; overflow-x: auto; margin: 0 0 24px; }
.lh-body pre code { background: none; padding: 0; color: var(--lh-text-high); font-size: 0.92em; }
.lh-body blockquote { margin: 0 0 24px; padding: 16px 20px; border-left: 3px solid var(--lh-brand); background: rgba(62,183,79,0.04); color: var(--lh-text-high); font-style: italic; }
.lh-body table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 0.95rem; }
.lh-body th, .lh-body td { padding: 12px 16px; border-bottom: 1px solid var(--lh-stroke); text-align: left; }
.lh-body th { color: var(--lh-text); font-weight: 700; background: var(--lh-bg-muted); }
.lh-body td { color: var(--lh-text-high); }

/* ============================================================
   Breadcrumb
   ============================================================ */
.lh-breadcrumb { padding: 16px 0; border-bottom: 1px solid var(--lh-stroke); }
.lh-breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; max-width: 880px; margin: 0 auto; padding: 0 24px; }
.lh-breadcrumb li { color: var(--lh-text-low); font-size: 0.875rem; display: flex; align-items: center; gap: 8px; }
.lh-breadcrumb li:not(:last-child)::after { content: "/"; color: var(--lh-text-low); margin-left: 8px; }
.lh-breadcrumb a { color: var(--lh-text-muted); text-decoration: none; }
.lh-breadcrumb a:hover { color: var(--lh-brand); }
.lh-breadcrumb li[aria-current="page"] { color: var(--lh-text); font-weight: 500; }

/* ============================================================
   Article header
   ============================================================ */
.lh-article { padding: 48px 0 80px; }
.lh-article__head { margin-bottom: 32px; }

/* Byline */
.lh-byline { display: flex; align-items: center; gap: 14px; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--lh-stroke); }
.lh-byline__avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--lh-brand); }
.lh-byline__text { font-size: 0.875rem; color: var(--lh-text-muted); line-height: 1.5; }
.lh-byline__text > div:first-child { color: var(--lh-text); }
.lh-byline__role { color: var(--lh-text-low); }
.lh-byline__meta { font-size: 0.8125rem; color: var(--lh-text-low); margin-top: 4px; }

/* ============================================================
   TL;DR highlighter block, signature white-on-dark
   ============================================================ */
.lh-tldr { background: #ffffff; color: #0a0a0a; padding: 22px 26px; border-radius: 12px; margin: 0 0 40px; font-family: var(--lh-display); }
.lh-tldr__label { font-size: 0.625rem; font-weight: 800; letter-spacing: 0.22em; color: #2a8a3c; text-transform: uppercase; margin-bottom: 8px; }
.lh-tldr__body { font-size: 1.0625rem; line-height: 1.55; font-weight: 600; color: #0a0a0a; }
.lh-tldr__body p { margin: 0 0 10px; }
.lh-tldr__body p:last-child { margin: 0; }

/* ============================================================
   TOC
   ============================================================ */
.lh-toc { background: var(--lh-bg-muted); border: 1px solid var(--lh-stroke); border-radius: 12px; padding: 20px 24px; margin: 0 0 40px; }
.lh-toc__label { font-size: 0.625rem; font-weight: 800; letter-spacing: 0.18em; color: var(--lh-brand); text-transform: uppercase; margin-bottom: 12px; }
.lh-toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.lh-toc li { counter-increment: toc; margin-bottom: 6px; font-size: 0.9375rem; }
.lh-toc li::before { content: counter(toc, decimal-leading-zero); color: var(--lh-text-low); font-family: ui-monospace,monospace; margin-right: 12px; font-size: 0.8125rem; }
.lh-toc a { color: var(--lh-text-high); text-decoration: none; border-bottom: 1px solid transparent; }
.lh-toc a:hover { color: var(--lh-brand); border-bottom-color: var(--lh-brand); }

/* ============================================================
   Do / Don't comparison
   ============================================================ */
.lh-do-dont { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 32px; }
@media (max-width: 640px) { .lh-do-dont { grid-template-columns: 1fr; } }
.lh-do, .lh-dont { padding: 18px 20px; border-radius: 12px; }
.lh-do { border: 1px solid rgba(62,183,79,0.30); background: rgba(62,183,79,0.04); }
.lh-dont { border: 1px solid rgba(239,68,68,0.30); background: rgba(239,68,68,0.04); }
.lh-do__label, .lh-dont__label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.625rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 8px; }
.lh-do__label { color: var(--lh-brand); }
.lh-dont__label { color: #ef4444; }

/* ============================================================
   Stat callout
   ============================================================ */
.lh-stat { display: inline-block; padding: 20px 28px; background: var(--lh-bg-muted); border: 1px solid var(--lh-stroke); border-radius: 12px; margin: 0 0 32px; }
.lh-stat__value { font-family: var(--lh-display); font-size: 3rem; font-weight: 800; line-height: 1; color: var(--lh-brand); letter-spacing: -0.02em; }
.lh-stat__label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--lh-text-low); margin-top: 8px; }

/* ============================================================
   FAQ, collapsible
   ============================================================ */
.lh-faq { margin-top: 64px; padding-top: 48px; border-top: 1px solid var(--lh-stroke); }
.lh-faq__items details { border: 1px solid var(--lh-stroke); background: var(--lh-bg-muted); border-radius: 12px; margin-bottom: 8px; padding: 0; }
.lh-faq__items summary { cursor: pointer; padding: 18px 22px; font-family: var(--lh-display); font-weight: 700; font-size: 1.0625rem; color: #fff; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.lh-faq__items summary::-webkit-details-marker { display: none; }
.lh-faq__items summary::after { content: "+"; font-size: 1.5rem; color: var(--lh-brand); font-weight: 300; }
.lh-faq__items details[open] summary::after { content: "−"; }
.lh-faq__items details > div { padding: 0 22px 22px; color: var(--lh-text-high); font-size: 1rem; line-height: 1.65; }

/* ============================================================
   Related cards
   ============================================================ */
.lh-related { margin-top: 64px; padding-top: 48px; border-top: 1px solid var(--lh-stroke); }
.lh-related__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 640px) { .lh-related__grid { grid-template-columns: 1fr; } }
.lh-related__card { display: block; padding: 18px 20px; background: var(--lh-bg-muted); border: 1px solid var(--lh-stroke); border-radius: 12px; text-decoration: none; transition: background .2s, border-color .2s, transform .2s; color: inherit; }
.lh-related__card:hover { background: rgba(255,255,255,0.06); border-color: var(--lh-brand); transform: translateY(-1px); text-decoration: none; }
.lh-related__cat { font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--lh-brand); margin-bottom: 6px; font-weight: 700; }
.lh-related__title { font-family: var(--lh-display); font-weight: 700; color: #fff; font-size: 1rem; margin: 0; }

/* ============================================================
   End-of-article CTA (audit only)
   ============================================================ */
.lh-cta { margin-top: 64px; padding: 48px 32px; background: linear-gradient(135deg, rgba(62,183,79,0.08), rgba(62,183,79,0.02)); border: 1px solid rgba(62,183,79,0.30); border-radius: 16px; text-align: center; }
.lh-cta__eyebrow { color: var(--lh-brand); font-size: 0.625rem; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 12px; }
.lh-cta__h { font-family: var(--lh-display); font-weight: 700; color: #fff; font-size: clamp(1.5rem, 3vw, 2.25rem); margin: 0 0 16px; letter-spacing: 0; line-height: 1.2; }
.lh-cta__body { color: var(--lh-text-muted); margin: 0 0 24px; max-width: 560px; margin-left: auto; margin-right: auto; }
.lh-cta__btn { display: inline-flex; align-items: center; gap: 8px; background: var(--lh-brand); color: #000; padding: 16px 32px; border-radius: 999px; font-family: var(--lh-display); font-weight: 800; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.1em; text-decoration: none; transition: background .2s, transform .2s, box-shadow .2s; }
.lh-cta__btn:hover { background: var(--lh-brand-light); transform: translateY(-1px); box-shadow: 0 12px 32px rgba(62,183,79,0.30); }
.lh-cta__phone { margin: 16px 0 0; font-size: 0.875rem; color: var(--lh-text-muted); }
.lh-cta__phone a { color: #fff; text-decoration: none; font-weight: 700; }
.lh-cta__phone a:hover { color: var(--lh-brand); }

/* ============================================================
   Slide-out menu (matches sitewide pattern)
   ============================================================ */
.lh-menu-overlay { position: fixed; inset: 0; z-index: 1040; background: rgba(0,0,0,0.6); opacity: 0; pointer-events: none; transition: opacity .3s; }
.lh-menu-overlay--open { opacity: 1; pointer-events: auto; }
.lh-menu { position: fixed; top: 0; right: 0; z-index: 1050; height: 100%; width: 100%; max-width: 400px; background: #0a0a0a; box-shadow: -10px 0 40px rgba(0,0,0,0.5); border-left: 1px solid var(--lh-stroke); transform: translateX(100%); transition: transform .3s ease-out; color: #fff; }
.lh-menu--open { transform: translateX(0); }
.lh-menu__inner { display: flex; flex-direction: column; height: 100%; }
.lh-menu__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--lh-stroke); }
.lh-menu__brand img { height: 40px; }
.lh-menu__close { background: none; border: none; color: rgba(255,255,255,0.6); font-size: 24px; padding: 8px; border-radius: 50%; cursor: pointer; transition: background .2s, color .2s; }
.lh-menu__close:hover { background: rgba(255,255,255,0.1); color: #fff; }
.lh-menu__nav { flex: 1; overflow-y: auto; padding: 24px; }
.lh-menu__group { margin-bottom: 32px; }
.lh-menu__group-label { font-size: 0.625rem; font-weight: 700; letter-spacing: 0.18em; color: var(--lh-brand); text-transform: uppercase; margin-bottom: 8px; }
.lh-menu__group ul { list-style: none; padding: 0; margin: 0; }
.lh-menu__group li { margin: 0; }
.lh-menu__group a { display: block; padding: 8px 0; color: rgba(255,255,255,0.85); text-decoration: none; font-size: 1.0625rem; font-weight: 500; transition: color .2s; }
.lh-menu__group a:hover, .lh-menu__primary { color: var(--lh-brand); }

/* ============================================================
   Pillar-specific styles
   ============================================================ */
.lh-pillar-hero { padding: 48px 0 32px; }
.lh-chapter-index { margin-top: 64px; padding-top: 48px; border-top: 1px solid var(--lh-stroke); }
.lh-chapters { list-style: none; padding: 0; margin: 0; counter-reset: chap; display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 768px) { .lh-chapters { grid-template-columns: 1fr 1fr; } }
.lh-chapters > li { counter-increment: chap; margin: 0; }
.lh-chapters a {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 16px;
    padding: 18px 20px;
    background: var(--lh-bg-muted);
    border: 1px solid var(--lh-stroke);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: background .2s, border-color .2s, transform .2s;
}
.lh-chapters a:hover {
    background: rgba(255,255,255,0.06);
    border-color: var(--lh-brand);
    transform: translateY(-1px);
}
.lh-chapters .ch-no {
    font-family: ui-monospace,SFMono-Regular,monospace;
    font-size: 1.5rem;
    color: var(--lh-brand);
    font-weight: 700;
}
.lh-chapters .ch-title {
    font-family: var(--lh-display);
    font-weight: 700;
    color: #fff;
    font-size: 1.0625rem;
    line-height: 1.3;
    margin: 0 0 4px;
}
.lh-chapters .ch-dek {
    font-size: 0.875rem;
    color: var(--lh-text-muted);
    line-height: 1.5;
    margin: 0;
}

/* Footer override (uses existing styles) */
.lh-footer { background: var(--lh-bg-elev); padding: 60px 0 40px; border-top: 1px solid var(--lh-stroke); }

/* ===========================================================
   Phase-0 SVG icons (60-icon sprite)
   Referenced via <svg class="lh-icon"><use href="/assets/icons/learn-hub/sprite.svg#icon-NAME"></svg>
   Icons are currentColor; sized via the parent context.
   =========================================================== */
.lh-icon {
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
    flex-shrink: 0;
}
/* Icon inside related-card (sits at top-left, brand green) */
.lh-related__card { position: relative; }
.lh-related__icon {
    width: 32px;
    height: 32px;
    color: var(--lh-brand);
    margin-bottom: 12px;
    display: block;
    transition: color .2s ease, transform .2s ease;
}
.lh-related__card:hover .lh-related__icon {
    color: var(--lh-brand-light);
    transform: translateY(-2px);
}
/* Chapter card layout override: 3-col grid [number] [text body] [icon].
   This supersedes the earlier 2-col grid on `.lh-chapters a` so titles + deks
   don't collapse into the narrow number column when an icon is present. */
.lh-chapters a {
    grid-template-columns: 48px 1fr 48px;
    grid-template-rows: auto auto;
    column-gap: 16px;
    row-gap: 2px;
    align-items: start;
}
.lh-chapters .ch-no {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
}
.lh-chapters .ch-title {
    grid-column: 2;
    grid-row: 1;
}
.lh-chapters .ch-dek {
    grid-column: 2;
    grid-row: 2;
}
.lh-chapter__icon {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
    justify-self: end;
    width: 40px;
    height: 40px;
    color: var(--lh-brand);
    opacity: 0.6;
    transition: opacity .2s ease, transform .2s ease;
    position: static;
    top: auto;
    right: auto;
}
.lh-chapters a:hover .lh-chapter__icon {
    opacity: 1;
    transform: translateY(-2px);
}
@media (max-width: 640px) {
    .lh-chapters a { grid-template-columns: 40px 1fr 36px; column-gap: 12px; padding: 14px 16px; }
    .lh-chapter__icon { width: 32px; height: 32px; }
    .lh-related__icon { width: 28px; height: 28px; margin-bottom: 10px; }
}

/* Hub index "coming soon" / "shipping now" pill */
.lh-soon {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--lh-bg);
    background: var(--lh-brand);
    border-radius: 999px;
    vertical-align: 2px;
    line-height: 1.5;
}
