/* ============================================================
   layout.css — global header (.gh), footer (.gf), breadcrumbs (.bc), page shell
   Shared layer — enqueue on EVERY page (WordPress: wp_enqueue_style global).
   ============================================================ */
.gh {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in oklab, var(--bg-elev) 90%, transparent);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 0.5px solid var(--line);
  }

.gh-inner {
    max-width: 1440px; margin: 0 auto;
    padding: 0 32px;
    height: 60px;
    display: flex; align-items: center; gap: 28px;
  }

.gh-logo {
    display: inline-flex; align-items: center; gap: 10px;
    text-decoration: none; color: var(--ink); flex-shrink: 0;
  }

.gh-logo-mark {
    width: 32px; height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--accent), color-mix(in oklab, var(--accent) 60%, var(--ok)));
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-mono); font-weight: 700; font-size: 16px;
    box-shadow: 0 4px 12px color-mix(in oklab, var(--accent) 32%, transparent),
                inset 0 1px 0 rgba(255,255,255,0.2);
    position: relative;
  }

.gh-logo-mark::after {
    content: ""; position: absolute; inset: 4px;
    border-radius: 6px;
    border: 1.5px solid rgba(255,255,255,0.18);
  }

.gh-logo-name {
    font-family: var(--font-display); font-size: 16px; font-weight: 700;
    letter-spacing: -0.01em; color: var(--ink);
  }

.gh-logo-name span { color: var(--accent); font-weight: 800; }

.gh-nav { display: flex; align-items: center; gap: 4px; flex: 1; }

.gh-nav a {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13.5px; font-weight: 500;
    color: var(--ink-2);
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
  }

.gh-nav a:hover { background: var(--bg-sunk); color: var(--ink); text-decoration: none; }

.gh-nav a.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }

.gh-nav a svg { width: 14px; height: 14px; }

.gh-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.gh-search { position: relative; width: 240px; }

.gh-search input {
    width: 100%; height: 34px;
    padding: 0 36px 0 12px;
    border: 0.5px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
    color: var(--ink);
    font: inherit; font-size: 13px;
    outline: none;
    transition: border-color .15s ease;
  }

.gh-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.gh-search svg {
    position: absolute; right: 12px; top: 50%;
    transform: translateY(-50%);
    width: 14px; height: 14px; color: var(--ink-3); pointer-events: none;
  }

.gh-search kbd {
    position: absolute; left: 8px; top: 50%;
    transform: translateY(-50%);
    background: var(--bg-sunk);
    border: 0.5px solid var(--line);
    border-radius: 4px;
    padding: 1px 6px;
    font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3);
  }

.gh-iconbtn {
    appearance: none; border: 0; cursor: pointer;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: transparent;
    color: var(--ink-2);
    display: inline-flex; align-items: center; justify-content: center;
    position: relative;
    transition: background .15s ease, color .15s ease;
  }

.gh-iconbtn:hover { background: var(--bg-sunk); color: var(--ink); }

.gh-iconbtn svg { width: 18px; height: 18px; }

.gh-streak {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px 6px 8px;
    border-radius: 999px;
    background: linear-gradient(90deg,
      color-mix(in oklab, #f5b91e 18%, var(--bg-elev)),
      var(--bg-elev) 80%);
    border: 0.5px solid color-mix(in oklab, #f5b91e 30%, var(--line));
    font-size: 12.5px; font-weight: 600; color: var(--ink);
  }

.gh-streak svg { width: 16px; height: 16px; color: #c89100; }

.gh-streak b { color: #8a6800; font-variant-numeric: tabular-nums; }

.gh-avatar {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 4px 4px 4px 10px;
    border-radius: 999px;
    border: 0.5px solid var(--line);
    background: var(--bg-elev);
    cursor: pointer; font: inherit;
    transition: background .15s ease;
  }

.gh-avatar:hover { background: var(--bg-sunk); border-color: color-mix(in oklab, var(--accent) 22%, var(--line)); }

.gh-avatar-pic {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f5b91e, #c75a3a);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 12.5px;
  }

.gh-avatar-text { display: flex; flex-direction: column; line-height: 1.2; padding-inline-end: 4px; }

.gh-avatar-name { font-size: 12.5px; font-weight: 600; color: var(--ink); }

.gh-avatar-role { font-size: 10.5px; color: var(--ink-3); }

.bc { background: var(--bg-elev); border-bottom: 0.5px solid var(--line-2); }

.bc-inner {
    max-width: 1440px; margin: 0 auto;
    padding: 14px 32px;
    display: flex; align-items: center; gap: 12px;
  }

.bc-path { flex: 1; display: flex; align-items: center; gap: 4px; }

.bc-item {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px; border-radius: 8px;
    text-decoration: none;
    font-size: 13px; color: var(--ink-2);
  }

.bc-item:hover { background: var(--bg-sunk); text-decoration: none; }

.bc-item .bc-tier {
    font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
    padding: 2px 7px; border-radius: 999px;
    background: var(--bg-sunk); color: var(--ink-3);
  }

.bc-item.current .bc-tier { background: var(--t-quiz-soft); color: var(--t-quiz); }

.bc-item.current { color: var(--ink); font-weight: 600; }

.bc-sep { color: var(--ink-4); width: 14px; height: 14px; }

.bc-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; color: var(--ink-3); font-size: 12.5px; }

.bc-actions .pip {
    padding: 3px 10px; border-radius: 999px;
    background: var(--bg-sunk); font-size: 11.5px; font-weight: 500; color: var(--ink-2);
  }

.gf { margin-top: 64px; background: var(--bg-elev); border-top: 0.5px solid var(--line); }

.gf-inner { max-width: 1440px; margin: 0 auto; padding: 48px 32px 32px; }

.gf-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(4, 1fr);
    gap: 40px; margin-bottom: 36px;
  }

.gf-brand p { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; margin: 12px 0 18px; max-width: 32ch; }

.gf-social { display: flex; gap: 6px; }

.gf-social a {
    width: 34px; height: 34px;
    border-radius: 9px;
    border: 0.5px solid var(--line);
    color: var(--ink-2);
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s ease, color .15s ease;
  }

.gf-social a:hover { background: var(--bg-sunk); color: var(--accent); }

.gf-social svg { width: 16px; height: 16px; }

.gf-col h4 {
    font-family: var(--font-display);
    font-size: 12px; font-weight: 600;
    letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--ink-3); margin: 0 0 14px;
  }

.gf-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }

.gf-col a { font-size: 13.5px; color: var(--ink-2); text-decoration: none; }

.gf-col a:hover { color: var(--ink); text-decoration: none; }

.gf-bottom {
    border-top: 0.5px solid var(--line-2);
    padding-top: 22px;
    display: flex; align-items: center; gap: 16px;
    font-size: 12px; color: var(--ink-3);
  }

.gf-bottom a { color: var(--ink-3); }

.gf-mentor {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 4px 10px; border-radius: 999px;
    background: var(--bg-sunk); color: var(--ink-2);
    font-size: 11.5px;
  }

.gf-mentor svg { width: 12px; height: 12px; color: var(--ok); }

.gh-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); flex-shrink: 0; }

.gh-actions { display: flex; align-items: center; gap: 6px; }

.gh-search input { width: 100%; height: 34px; padding: 0 36px 0 12px;
    border: 0.5px solid var(--line); border-radius: 999px;
    background: var(--bg); color: var(--ink); font: inherit; font-size: 13px; outline: none; }

.gh-avatar {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 4px 4px 4px 10px;
    border-radius: 999px; border: 0.5px solid var(--line); background: var(--bg-elev); cursor: pointer; }

.page { max-width: 1440px; margin: 0 auto; padding: 0 32px; }

.gf-col a { font-size: 13.5px; color: var(--ink-2); }

.gh-guest-cta { display: none; }

html[data-viewer="guest"] .gh-guest-cta {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    font: inherit; font-size: 13px; font-weight: 600;
    text-decoration: none;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
    white-space: nowrap;
  }

html[data-viewer="guest"] .gh-guest-cta.primary {
    background: var(--ink); color: var(--bg-elev);
    box-shadow: 0 4px 12px color-mix(in oklab, var(--ink) 18%, transparent);
  }

html[data-viewer="guest"] .gh-guest-cta.primary:hover { background: var(--ink-2); text-decoration: none; }

html[data-viewer="guest"] .gh-guest-cta.ghost {
    background: transparent;
    color: var(--ink-2);
    border: 0.5px solid var(--line);
  }

html[data-viewer="guest"] .gh-guest-cta.ghost:hover {
    background: var(--bg-sunk); color: var(--ink); text-decoration: none;
  }

.gh { position: sticky; top: 0; z-index: 50;
    background: color-mix(in oklab, var(--bg-elev) 90%, transparent);
    backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 0.5px solid var(--line); }

.gh-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }

.gh-logo-name { font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }

.gh-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
    border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }

.gh-search input { width: 100%; height: 34px; padding: 0 36px 0 12px;
    border: 0.5px solid var(--line); border-radius: 999px; background: var(--bg);
    font: inherit; font-size: 13px; outline: none; }

.gh-search svg { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--ink-3); }

.gh-iconbtn { appearance: none; border: 0; cursor: pointer;
    width: 36px; height: 36px; border-radius: 50%; background: transparent; color: var(--ink-2);
    display: inline-flex; align-items: center; justify-content: center; position: relative; }

.gh-streak { display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px 6px 8px; border-radius: 999px;
    background: linear-gradient(90deg, color-mix(in oklab, #f5b91e 18%, var(--bg-elev)), var(--bg-elev) 80%);
    border: 0.5px solid color-mix(in oklab, #f5b91e 30%, var(--line));
    font-size: 12.5px; font-weight: 600; }

.gh-avatar-name { font-size: 12.5px; font-weight: 600; }

.page { max-width: 1440px; margin: 0 auto; padding: 28px 32px 0; }

.gf-inner { max-width: 1440px; margin: 0 auto; padding: 32px 32px 22px;
    display: flex; align-items: center; gap: 18px; font-size: 12.5px; color: var(--ink-3); }

.gf-inner a { color: var(--ink-3); }

.gf-inner a:hover { color: var(--ink); text-decoration: none; }

.gf-inner b { color: var(--ink); font-weight: 600; }

html[data-viewer="guest"] .gh-guest-cta {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 999px;
    font-size: 13px; font-weight: 600;
    text-decoration: none; white-space: nowrap;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
  }

.gh-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
    border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--ink-2);
    transition: background .15s ease, color .15s ease; }

.gh-avatar:hover { background: var(--bg-sunk); }

.bc-item { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 8px; font-size: 13px; color: var(--ink-2); }

.bc-item .bc-tier { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
    padding: 2px 7px; border-radius: 999px; background: var(--track-soft); color: var(--track); }

.page { max-width: 1440px; margin: 0 auto; padding: 0 32px 24px; }

.gh-logo:hover { text-decoration: none; }

.gh-iconbtn .bdg {
    position: absolute; top: 6px; left: 6px; min-width: 16px; height: 16px;
    padding: 0 4px; border-radius: 999px; background: var(--warn); color: #fff;
    font-size: 9.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--bg-elev); line-height: 1; }

.gh-avatar:hover { background: var(--bg-sunk); border-color: color-mix(in oklab, var(--accent) 22%, var(--line)); text-decoration: none; }

html[data-viewer="guest"] .gh-guest-cta.primary:hover { background: var(--accent); text-decoration: none; }

html[data-viewer="guest"] .gh-avatar,
  html[data-viewer="guest"] .gh-streak,
  html[data-viewer="guest"] .gh-iconbtn:has(.bdg) { display: none !important; }

.gf-inner { max-width: 1280px; margin: 0 auto; padding: 48px 32px 32px; }

.gf-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 40px; margin-bottom: 36px; }

.gf-brand-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }

.gf-brand-logo .mark {
    width: 32px; height: 32px; border-radius: 9px;
    background: linear-gradient(135deg, var(--accent), color-mix(in oklab, var(--accent) 60%, var(--ok)));
    color: #fff; display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-mono); font-weight: 700; font-size: 16px; }

.gf-brand-logo .name { font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }

.gf-brand-logo .name span { color: var(--accent); font-weight: 800; }

.gf-brand p { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; margin: 12px 0 0; max-width: 34ch; }

.gf-bottom { max-width: 1280px; margin: 0 auto; padding: 22px 32px; border-top: 0.5px solid var(--line-2); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }

.gf-bottom .gf-spacer { flex: 1; }

.gf-bottom a { color: var(--ink-3); text-decoration: none; }

.gf-bottom a:hover { color: var(--ink); }

/* Header/footer inner + page content all use the EXPORT's centered band widths
   (.gh-inner/.page = 1440, footer/catalog where the export narrows them) — the
   bars stay full-width via .gh/.gf backgrounds; only the inner content is inset.
   No custom width override here (reverted to match the export design). */

/* ============================================================
   CRITICAL: WordPress body_class() adds `page` to <body> on every Page,
   so our content rule `.page { max-width:1440; margin:0 auto; padding:0 32px }`
   was ALSO matching <body> and constraining the WHOLE page to a 1440 band.
   (The static export had no class on <body>, so this never happened there.)
   Neutralize it on the body only — the body stays full-width; the real content
   `div.page` (inside #site-main) keeps its centered band.
   ============================================================ */
body.page { max-width: none; margin: 0; padding: 0; }

/* Content layout: every `.page` content area uses the SAME centered 1280 band as
   the course single (`.crs`), so all inner pages (paths/courses/live catalogs,
   single-path, etc.) share one consistent width. Scoped to `#site-main .page` so
   it beats the per-page bands AND so the HOME (which has no `.page` — it uses
   full-width sections + .wrap) is untouched, keeping its backgrounds edge-to-edge. */
#site-main .page { max-width: 1280px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }
