/* =========================================================
   Your IT Tutor — Online IT Education Platform
   ---------------------------------------------------------
   Design: Clean, sharp, high-contrast.
           White canvas, deep black, electric green accents.
           Professional, direct, results-driven.
========================================================= */

/* -------- Fonts -------- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700;9..144,800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* -------- Design tokens -------- */
:root {
  --white: #ffffff;
  --ivory: #ffffff;
  --ivory-2: #f3f4f6;
  --paper: #ffffff;
  --ink: #0a0a0a;
  --ink-soft: #1a1a2e;
  --navy: #0a0a0a;
  --navy-deep: #000000;
  --charcoal: #1a1a2e;
  --muted: #5b6479;
  --rule: #e2e8f0;
  --rule-soft: #edf2f7;
  --green: #00FF00;
  --grey: #D3D3D3
  --green-deep: #00cc00;
  --green-soft: #ccffcc;
  --green-dim: rgba(0, 255, 0, 0.12);
  --teal: #00aa44;
  --red: #cc2200;
  --shadow: 0 1px 2px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 2px 4px rgba(0,0,0,0.08), 0 24px 48px rgba(0,0,0,0.12);

  --serif: 'Fraunces', 'Iowan Old Style', 'Palatino', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  --container: 1240px;
  --container-narrow: 960px;
  --sidebar: 280px;
  --radius: 6px;
  --radius-lg: 14px;
}

/* -------- Reset -------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--green-deep); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* -------- Typography -------- */
h1, h2, h3, h4, h5 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2.2rem, 4.2vw, 3.6rem); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.25rem); letter-spacing: -0.02em; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; font-family: var(--sans); font-weight: 600; letter-spacing: -0.005em; }
p  { margin: 0 0 1.1em; color: var(--ink-soft); }
p.lede {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink-soft);
  font-weight: 500;
}
.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green-deep);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--green);
  vertical-align: middle;
  margin-right: 12px;
  transform: translateY(-2px);
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 28px; }
.section { padding: 96px 0; }
.section-sm { padding: 56px 0; }
.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* ====== HEADER / NAV ====== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 32px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-weight: 700; font-size: 1.35rem; color: var(--ink); letter-spacing: -0.02em; flex-shrink: 0; }
.brand-mark {
  width: 70px; height: 70px; border-radius: 8px;
  background: var(--ink); color: var(--green);
  display: grid; place-items: center;
  font-family: var(--sans); font-weight: 900; font-size: .85rem; letter-spacing: -.02em;
  border: 2px solid var(--white);
}


.brand-text small { display: block; font-family: var(--sans); font-size: .7rem; font-weight: 500; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; line-height: 1; margin-top: 3px; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: inline-block; padding: 8px 13px; font-size: .9rem; font-weight: 500; color: var(--ink-soft); border-radius: var(--radius); transition: all .2s ease; }
.nav-links a:hover { color: var(--ink); background: var(--ivory-2); }
.nav-links a.active { color: var(--ink); background: var(--ivory-2); }
.nav-cta { background: var(--ink) !important; color: var(--green) !important; padding: 10px 20px !important; font-weight: 700 !important; border: 2px solid var(--green) !important; }
.nav-cta:hover { background: var(--green) !important; color: var(--ink) !important; }
.nav-toggle { display: inline-flex; width: 42px; height: 42px; border-radius: var(--radius); align-items: center; justify-content: center; color: var(--ink); }
.nav-toggle svg { width: 22px; height: 22px; }
.nav-links {
  position: fixed; inset: 72px 0 auto 0;
  flex-direction: column; align-items: stretch; gap: 4px;
  padding: 16px 28px 28px; background: var(--white);
  border-bottom: 1px solid var(--rule);
  max-height: calc(100vh - 72px); overflow-y: auto;
  transform: translateY(-110%); transition: transform .3s ease;
  box-shadow: var(--shadow-lg);
}
.nav-links.open { transform: translateY(0); }
.nav-links a { padding: 12px 14px; font-size: 1rem; }

/* Tablet/desktop: full horizontal nav, toggle no longer needed */
@media (min-width: 1100px) {
  .nav-toggle { display: none; }
  .nav-links {
    position: static;
    flex-direction: row; align-items: center; gap: 4px;
    padding: 0; background: transparent; border-bottom: none;
    max-height: none; overflow: visible;
    transform: none; transition: none; box-shadow: none;
  }
  .nav-links a { padding: 8px 13px; font-size: .9rem; }
}

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px;
  font-family: var(--sans); font-size: .95rem; font-weight: 600; letter-spacing: .01em;
  border-radius: var(--radius); border: 2px solid transparent;
  transition: all .22s ease; line-height: 1; white-space: nowrap;
}
.btn-primary { background: var(--ink); color: var(--green); border-color: var(--ink); }
.btn-primary:hover { background: var(--green); color: var(--ink); border-color: var(--green); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--white); }
.btn-green { background: var(--green); color: var(--ink); border-color: var(--green); font-weight: 700; }
.btn-green:hover { background: var(--green-deep); border-color: var(--green-deep); color: var(--ink); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn svg { width: 16px; height: 16px; }

/* ====== HERO ====== */
.hero { position: relative; padding: 84px 0 96px; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 85% 10%, rgba(0, 255, 0, 0.06), transparent 50%),
    radial-gradient(ellipse at 10% 90%, rgba(0, 0, 0, 0.04), transparent 50%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; position: relative; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 1.02; margin-bottom: 1.1rem; }
.hero h1 em { font-style: italic; color: var(--green-deep); font-weight: 500; }
.hero .lede { max-width: 540px; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 2.5rem; }
.hero-meta { display: flex; gap: 36px; padding-top: 28px; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.hero-meta div strong { display: block; font-family: var(--serif); font-size: 1.9rem; font-weight: 700; color: var(--ink); line-height: 1; margin-bottom: 6px; }
.hero-meta div span { font-size: .82rem; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }

.hero-visual { position: relative; aspect-ratio: 4/4; max-width: 460px; margin: 0 auto; background: var(--ink); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-lg); overflow: hidden; border: 2px solid var(--green); }
.hero-visual::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 80% 10%, rgba(0,255,0,0.10), transparent 55%); }
.hv-dots { display: flex; gap: 7px; margin-bottom: 22px; position: relative; }
.hv-dots span { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.18); }
.hv-dots span:first-child { background: #e0967f; }
.hv-dots span:nth-child(2) { background: #e7d3ad; }
.hv-dots span:nth-child(3) { background: #00FF00; }
.hv-code { font-family: var(--mono); font-size: .86rem; line-height: 1.75; color: #e8e8e8; position: relative; }
.hv-code .k { color: #00FF00; }
.hv-code .s { color: #99ffcc; }
.hv-code .c { color: #6a7a6a; font-style: italic; }
.hv-code .f { color: #d3a9ff; }
.hv-badge { position: absolute; bottom: 28px; right: 28px; background: var(--green); color: var(--ink); padding: 10px 14px; border-radius: var(--radius); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.15fr 1fr; gap: 80px; } .hero-visual { max-width: none; margin: 0; aspect-ratio: 4/5; } }

/* ====== PAGE HEADER ====== */
.page-header { padding: 80px 0 64px; border-bottom: 1px solid var(--rule); background: var(--white); }
.page-header h1 { margin-bottom: .5rem; }
.page-header .lede { max-width: 680px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .85rem; color: var(--muted); margin-bottom: 1.5rem; font-weight: 500; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--ink); }
.breadcrumbs span.sep { opacity: .5; }
.breadcrumbs .current { color: var(--ink); }

/* ====== CARDS ====== */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 24px; }
.card { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 32px; transition: all .25s ease; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--green); }
.card-icon { width: 48px; height: 48px; border-radius: var(--radius); background: var(--white); display: grid; place-items: center; margin-bottom: 20px; color: var(--grey); }
.card-icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: .6rem; }
.card p { flex: 1; }
.card-link { margin-top: 18px; display: inline-flex; align-items: center; gap: 6px; color: var(--green-deep); font-weight: 600; font-size: .92rem; }
.card-link:hover { color: var(--ink); gap: 10px; }
.card-link::after { content: '→'; }
.card-icon i {
  font-size: 24px;
  color: currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ====== COURSE CARDS ====== */
.course-card { position: relative; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 36px 32px; overflow: hidden; transition: all .25s ease; display: flex; flex-direction: column; }
.course-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--green); }
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--green); }
.course-card .course-mark { width: 60px; height: 60px; border-radius: 12px; background: var(--white); color: var(--black); display: grid; place-items: center; margin-bottom: 22px; }
.course-card .course-mark svg { width: 28px; height: 28px; }
.course-card h3 { font-size: 1.4rem; margin-bottom: .4rem; }
.course-card .subtitle { font-size: .82rem; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 1rem; font-weight: 600; }
.course-card p { flex: 1; margin-bottom: 1.25rem; }
.course-stats { display: flex; gap: 20px; font-size: .85rem; color: var(--muted); margin-bottom: 1.25rem; padding-top: 1rem; border-top: 1px dashed var(--rule); flex-wrap: wrap; }
.course-stats strong { color: var(--ink); font-weight: 600; }
.course-price { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--ink); margin-bottom: .25rem; }
.course-price-note { font-size: .78rem; color: var(--muted); margin-bottom: 1.25rem; }
.course-mark i {
  font-size: 24px;
  color: currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ====== SECTION HEAD ====== */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 48px; flex-wrap: wrap; }
.section-head .sh-text { max-width: 640px; }
.section-head h2 { margin-bottom: .5rem; }
.section-head p { margin: 0; color: var(--muted); }

/* ====== EDITORIAL ====== */
.editorial { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: start; }
.editorial-aside h2 { margin-bottom: 0; }
.editorial-body p { font-size: 1.05rem; line-height: 1.7; }
.editorial-body blockquote { margin: 28px 0; padding-left: 24px; border-left: 3px solid var(--green); font-family: var(--serif); font-size: 1.3rem; line-height: 1.5; color: var(--ink); font-style: italic; font-weight: 500; }
@media (min-width: 860px) { .editorial { grid-template-columns: 1fr 1.3fr; gap: 80px; } }

/* ====== VALUES GRID ====== */
.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius-lg); overflow: hidden; }
.value { background: var(--paper); padding: 36px 28px; }
.value-num { font-family: var(--serif); font-size: 1.1rem; color: var(--green-deep); font-weight: 600; margin-bottom: 16px; display: block; }
.value h4 { font-family: var(--serif); font-size: 1.25rem; margin-bottom: .5rem; }
.value p { margin: 0; font-size: .94rem; color: var(--muted); }

/* ====== TRACKS ====== */
.tracks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 0; border: 1px solid var(--rule); border-radius: var(--radius-lg); overflow: hidden; background: var(--paper); }
.track { padding: 36px 32px; border-bottom: 1px solid var(--rule); transition: background .2s ease; }
.track:last-child { border-bottom: none; }
.track:hover { background: var(--ivory-2); }
.track-num { display: inline-block; font-family: var(--serif); font-weight: 700; font-size: 1.1rem; color: var(--green-deep); margin-bottom: 12px; }
.track h4 { font-family: var(--serif); font-size: 1.35rem; margin-bottom: .5rem; }
.track p { font-size: .94rem; color: var(--muted); margin-bottom: 1rem; }
.track-link { color: var(--ink); font-weight: 600; font-size: .9rem; display: inline-flex; gap: 6px; }
.track-link::after { content: '→'; transition: transform .2s ease; }
.track-link:hover::after { transform: translateX(4px); }
@media (min-width: 860px) { .track { border-right: 1px solid var(--rule); border-bottom: none; } .track:last-child { border-right: none; } }

/* ====== LESSON LAYOUT ====== */
.lesson-layout { display: grid; grid-template-columns: 1fr; gap: 28px; padding: 48px 0 96px; align-items: start; }
.lesson-sidebar { position: static; max-height: none; overflow-y: auto; padding: 20px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-lg); scrollbar-width: thin; }
.lesson-sidebar::-webkit-scrollbar { width: 4px; }
.lesson-sidebar::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 2px; }
.sidebar-title { font-family: var(--serif); font-weight: 700; font-size: 1rem; color: var(--ink); letter-spacing: .04em; text-transform: uppercase; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--rule); }
.sidebar-search { width: 100%; padding: 10px 14px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); font-size: .9rem; color: var(--ink); margin-bottom: 16px; font-family: inherit; }
.sidebar-search:focus { outline: none; border-color: var(--ink); }
.sidebar-group { font-size: .72rem; font-weight: 700; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; margin: 20px 0 8px; }
.sidebar-list { list-style: none; padding: 0; margin: 0; }
.sidebar-list li { margin: 0; }
.sidebar-list a { display: block; padding: 7px 12px; margin: 1px 0; font-size: .9rem; color: var(--ink-soft); border-radius: var(--radius); border-left: 2px solid transparent; transition: all .15s ease; }
.sidebar-list a:hover { color: var(--ink); background: var(--ivory-2); }
.sidebar-list a.current { color: var(--ink); background: var(--green-dim); border-left-color: var(--green); font-weight: 600; }
.sidebar-list.hidden-by-search li.hidden { display: none; }

.lesson-main { max-width: 760px; min-width: 0; }
.lesson-main h1 { font-size: clamp(2rem, 3.5vw, 2.8rem); margin-bottom: .5rem; }
.lesson-main h2 { font-size: 1.6rem; margin: 2.5rem 0 1rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.lesson-main h2:first-of-type { border-top: none; padding-top: 0; }
.lesson-main h3 { font-family: var(--sans); font-size: 1.1rem; font-weight: 600; margin: 2rem 0 .75rem; }
.lesson-main p, .lesson-main li { font-size: 1.02rem; line-height: 1.75; }
.lesson-main ul, .lesson-main ol { padding-left: 1.3rem; margin: 0 0 1.2rem; }
.lesson-main li { margin-bottom: .4rem; color: var(--ink-soft); }
.lesson-main strong { color: var(--ink); font-weight: 600; }
.lesson-main code:not(pre code) { font-family: var(--mono); font-size: .9em; background: var(--ivory-2); color: var(--ink); padding: 2px 7px; border-radius: 4px; border: 1px solid var(--rule-soft); }
.lesson-eyebrow { display: flex; gap: 10px; align-items: center; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--green-deep); font-weight: 600; margin-bottom: 1rem; }
.lesson-eyebrow span { color: var(--muted); }
.lesson-lede { font-family: var(--serif); font-size: 1.2rem; line-height: 1.55; color: var(--ink-soft); font-weight: 500; margin: 1rem 0 2rem; }

/* ====== CODE ====== */
.code-block { position: relative; background: #0a0a0a; border-radius: var(--radius-lg); margin: 1.5rem 0 1.8rem; overflow: hidden; box-shadow: var(--shadow); border: 1px solid #1a1a1a; }
.code-block-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: rgba(255,255,255,.04); border-bottom: 1px solid rgba(255,255,255,.06); }
.code-lang { font-family: var(--mono); font-size: .72rem; color: #00FF00; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.code-copy { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: #888; padding: 5px 10px; border-radius: 4px; transition: all .15s ease; font-family: var(--sans); font-weight: 500; }
.code-copy:hover { color: #fff; background: rgba(255,255,255,.06); }
.code-copy svg { width: 14px; height: 14px; }
.code-copy.copied { color: #00FF00; }
.code-block pre { margin: 0; padding: 20px 20px 22px; overflow-x: auto; font-family: var(--mono); font-size: .88rem; line-height: 1.7; color: #e8e8e8; }
.code-block pre code { font-family: inherit; color: inherit; }

.tok-kw  { color: #00FF00; }
.tok-str { color: #99ffcc; }
.tok-num { color: #e7d3ad; }
.tok-com { color: #556655; font-style: italic; }
.tok-fn  { color: #d3a9ff; }
.tok-ty  { color: #a3d1ff; }

.syntax-box { background: var(--ivory-2); border-left: 3px solid var(--green); padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; font-family: var(--mono); font-size: .92rem; color: var(--ink); margin: 1rem 0 1.5rem; overflow-x: auto; white-space: pre; }

/* ====== CALLOUTS ====== */
.callout { display: flex; gap: 14px; padding: 18px 22px; border-radius: var(--radius-lg); margin: 1.5rem 0; border: 1px solid; font-size: .96rem; line-height: 1.6; }
.callout-icon { flex-shrink: 0; width: 22px; height: 22px; margin-top: 2px; }
.callout h4 { margin: 0 0 4px; font-size: .95rem; font-weight: 700; letter-spacing: .02em; }
.callout p { margin: 0; color: inherit; font-size: inherit; }
.callout-tip { background: #efffef; border-color: #99ffbb; color: #1a4a1a; }
.callout-tip h4 { color: #1a4a1a; }
.callout-warn { background: #fff8e5; border-color: #ffd980; color: #5a4800; }
.callout-warn h4 { color: #5a4800; }
.callout-note { background: #f3f4f6; border-color: #d1d5db; color: #1a1a2e; }
.callout-note h4 { color: #1a1a2e; }

/* ====== PRACTICE / QUIZ ====== */
.practice { background: var(--paper); border: 1px solid var(--rule); border-left: 4px solid var(--green); border-radius: var(--radius-lg); padding: 26px 28px; margin: 2rem 0; }
.practice h3 { font-family: var(--sans); font-size: 1rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green-deep); margin: 0 0 10px; }

.quiz { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 28px 30px; margin: 2.5rem 0 1rem; }
.quiz h3 { font-family: var(--sans); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--green-deep); font-weight: 700; margin-bottom: 8px; }
.quiz-question { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; color: var(--ink); margin-bottom: 1rem; line-height: 1.4; }
.quiz-options { list-style: none; padding: 0; margin: 0 0 1rem; }
.quiz-options li { margin: 0 0 8px; }
.quiz-option { display: block; width: 100%; padding: 12px 16px; text-align: left; background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius); font-size: .96rem; color: var(--ink-soft); font-family: inherit; transition: all .15s ease; cursor: pointer; }
.quiz-option:hover { border-color: var(--ink); color: var(--ink); }
.quiz-option.correct { background: #efffef; border-color: #00cc44; color: #1a4a1a; }
.quiz-option.wrong { background: #fff0f0; border-color: #cc4444; color: #5a0000; }
.quiz-option.disabled { cursor: default; pointer-events: none; }
.quiz-feedback { margin-top: 12px; padding: 12px 16px; background: var(--ivory-2); border-radius: var(--radius); font-size: .94rem; color: var(--ink-soft); display: none; }
.quiz-feedback.show { display: block; }

/* ====== LESSON NAV ====== */
.lesson-nav { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 3rem 0 1rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
.lesson-nav a { display: flex; flex-direction: column; gap: 4px; padding: 20px 24px; border: 1px solid var(--rule); border-radius: var(--radius-lg); transition: all .2s ease; background: var(--paper); }
.lesson-nav a:hover { border-color: var(--green); transform: translateY(-1px); box-shadow: var(--shadow); }
.lesson-nav a.next { text-align: right; align-items: flex-end; }
.lesson-nav a.disabled { opacity: .35; pointer-events: none; }
.lesson-nav small { font-size: .75rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.lesson-nav strong { font-family: var(--serif); font-size: 1.1rem; color: var(--ink); font-weight: 600; }
@media (min-width: 640px) { .lesson-nav { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) {
  .lesson-layout { grid-template-columns: var(--sidebar) 1fr; gap: 56px; }
  .lesson-sidebar { position: sticky; top: 96px; max-height: calc(100vh - 112px); background: none; border: none; border-radius: 0; padding: 0 12px 0 0; }
}

/* ====== HUB ====== */
.hub-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 20px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-lg); margin-bottom: 40px; }
.hub-search { flex: 1; min-width: 240px; padding: 12px 16px; border: 1px solid var(--rule); border-radius: var(--radius); font-family: inherit; font-size: .95rem; background: var(--white); }
.hub-search:focus { outline: none; border-color: var(--ink); background: var(--paper); }
.filter-chip { padding: 8px 16px; border: 1px solid var(--rule); border-radius: 100px; background: var(--white); font-size: .85rem; color: var(--ink-soft); font-weight: 500; cursor: pointer; transition: all .15s ease; }
.filter-chip:hover { border-color: var(--ink); color: var(--ink); }
.filter-chip.active { background: var(--ink); color: var(--green); border-color: var(--ink); }

/* ====== TEAM ====== */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.team-card { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-lg); overflow: hidden; }
.team-photo { aspect-ratio: 4/5; background: var(--ink); display: grid; place-items: center; color: var(--green); font-family: var(--serif); font-size: 3rem; font-weight: 600; }
.team-body { padding: 20px 24px 24px; }
.team-body h4 { font-family: var(--serif); font-size: 1.15rem; margin-bottom: 2px; }
.team-body .role { font-size: .85rem; color: var(--green-deep); font-weight: 600; letter-spacing: .04em; margin-bottom: 8px; text-transform: uppercase; }
.team-body p { font-size: .92rem; margin: 0; color: var(--muted); }

/* ====== FORMS ====== */
.form-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: .82rem; font-weight: 600; color: var(--ink); letter-spacing: .02em; }
.form-field input, .form-field select, .form-field textarea { padding: 12px 14px; font-family: inherit; font-size: .95rem; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); transition: border-color .15s ease; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--green); }
.form-field textarea { min-height: 140px; resize: vertical; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } }

/* ====== FAQ ====== */
.faq { border-top: 1px solid var(--rule); }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-q { display: flex; justify-content: space-between; align-items: center; gap: 20px; width: 100%; padding: 24px 0; font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--ink); text-align: left; cursor: pointer; }
.faq-q::after { content: '+'; font-family: var(--sans); font-size: 1.5rem; color: var(--green-deep); font-weight: 300; transition: transform .2s ease; }
.faq-item.open .faq-q::after { content: '−'; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease; color: var(--ink-soft); }
.faq-item.open .faq-a { max-height: 500px; padding-bottom: 24px; }

/* ====== NEWSLETTER ====== */
.newsletter { background: var(--ink); color: var(--white); padding: 72px 0; position: relative; overflow: hidden; }
.newsletter::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 85% 50%, rgba(0, 255, 0, 0.08), transparent 55%); }
.newsletter .container { position: relative; }
.newsletter-grid { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
.newsletter h2 { color: var(--white); margin-bottom: .5rem; }
.newsletter p { color: #aaaaaa; margin: 0; }
.newsletter em { font-family: var(--serif); font-style: italic; color: var(--green); font-weight: 500; }
.newsletter-form { display: flex; flex-wrap: wrap; gap: 8px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); padding: 6px; border-radius: var(--radius-lg); }
.newsletter-form input { flex: 1 1 200px; padding: 14px 18px; background: transparent; border: none; color: var(--white); font-family: inherit; font-size: .95rem; }
.newsletter-form input::placeholder { color: rgba(255,255,255,.4); }
.newsletter-form input:focus { outline: none; }
.newsletter-form button { flex: 1 1 auto; background: var(--green); color: var(--ink); padding: 14px 24px; border-radius: 8px; font-weight: 700; font-size: .92rem; transition: background .2s ease; }
.newsletter-form button:hover { background: var(--green-deep); }
@media (min-width: 860px) { .newsletter-grid { grid-template-columns: 1.2fr 1fr; gap: 56px; } }

/* ====== FOOTER ====== */
.site-footer { background: var(--ink); color: #aaaaaa; padding: 72px 0 28px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand .brand-mark { background: var(--ink); color: var(--green); border: 2px solid var(--brand-mark); }
.footer-brand .brand { color: var(--white); }
.footer-brand .brand-text small { color: #666; }
.footer-brand p { margin-top: 16px; color: #888; line-height: 1.65; max-width: 320px; font-size: .9rem; }
.footer-col h5 { font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--white); margin: 0 0 18px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 0 0 10px; }
.footer-col a { color: #aaaaaa; }
.footer-col a:hover { color: var(--green); }
.footer-contact p { margin: 0 0 10px; color: #aaaaaa; }
.footer-contact strong { color: var(--white); font-weight: 500; }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.06); color: var(--white); transition: all .2s ease; }
.footer-social a:hover { background: var(--green); color: var(--ink); }
.footer-social svg { width: 16px; height: 16px; }
.footer-meta { padding-top: 28px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; color: #555; font-size: .84rem; }
.footer-meta a { color: #555; }
.footer-meta a:hover { color: var(--green); }
@media (min-width: 521px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (min-width: 861px) { .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); gap: 56px; } .footer-brand { grid-column: auto; } }

/* ====== UTILITY ====== */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.muted { color: var(--muted); }
.green { color: var(--green-deep); }
.divider { height: 1px; background: var(--rule); margin: 48px 0; border: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media print {
  .site-header, .site-footer, .newsletter, .lesson-sidebar, .lesson-nav { 
    display: none !important; 
  }
}

/* ====== MOBILE HEADER CONTAINMENT FIX ====== */

/* 1. Prevent the header wrapper from overflowing the viewport */
.site-header {
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

/* 2. Restrict container width and reduce side padding on mobile */
.site-header .container {
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
  box-sizing: border-box;
}

/* 3. Force the flex nav bar to respect screen boundaries */
.nav {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important; /* Allows nav to shrink below intrinsic content size */
  gap: 8px !important;
  box-sizing: border-box;
}

/* 4. Allow all items inside .nav to shrink gracefully */
.nav > * {
  min-width: 0 !important;
  max-width: 100% !important;
}

/* 5. Prevent text inside header items from forcing extra width */
.nav *, .site-header * {
  box-sizing: border-box;
}

/* ====== GLOBAL MOBILE CONTAINMENT ====== */
html, body {
  overflow-x: hidden;
  width: 100%;
}

.brand {
  min-width: 0 !important;
}

/* Ensure the mark centers and clips the image */
.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* Clips image to match border-radius */
}

/* Scaling the logo inside the container */
.brand-img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Keeps image proportions intact */
  display: block;
}

.brand-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.nav-toggle {
  flex-shrink: 0 !important;
}

/* ====== MOBILE BREAKPOINTS ====== */
@media (max-width: 600px) {
  .section { padding: 48px 0; }
  .section-sm { padding: 32px 0; }
  .hero { padding: 48px 0 64px; }
  .page-header { padding: 48px 0 32px; }
  
  .card, .course-card, .value, .track {
    padding: 24px 20px;
  }

  .container, .container-narrow { 
    padding-left: 16px !important; 
    padding-right: 16px !important; 
  }

  .nav-toggle {
    display: inline-flex !important;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 100%;
    left: -16px;
    right: -16px;
    background: var(--white);
    padding: 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  }

  .nav-links.open {
    display: flex;
  }
}