/* ST4B — Stock Trading for Beginners */

:root {
  --bg: #f7f8f5;
  --surface: #ffffff;
  --surface-2: #eef1ec;
  --ink: #14201b;
  --ink-2: #4a5852;
  --line: #dde3dc;
  --brand: #0f6b4f;
  --brand-ink: #ffffff;
  --brand-soft: #e1f0e9;
  --accent: #c8862a;
  --danger: #b4412f;
  --shadow: 0 1px 2px rgba(20, 32, 27, .06), 0 8px 24px rgba(20, 32, 27, .06);
  --radius: 14px;
  --max: 1140px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1513;
    --surface: #161e1b;
    --surface-2: #1c2622;
    --ink: #e8eeea;
    --ink-2: #a3b0aa;
    --line: #2a3530;
    --brand: #3fb98a;
    --brand-ink: #08130e;
    --brand-soft: #173128;
    --accent: #e0a650;
    --danger: #e0715f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1513;
  --surface: #161e1b;
  --surface-2: #1c2622;
  --ink: #e8eeea;
  --ink-2: #a3b0aa;
  --line: #2a3530;
  --brand: #3fb98a;
  --brand-ink: #08130e;
  --brand-soft: #173128;
  --accent: #e0a650;
  --danger: #e0715f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--brand); }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 88px 0; }
.section--alt { background: var(--surface-2); }
.section__head { max-width: 680px; margin-bottom: 44px; }
.section__head p { color: var(--ink-2); font-size: 1.08rem; }
.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 10px;
}
.muted { color: var(--ink-2); }
.small { font-size: .88rem; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--brand-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 10px; border: 1.5px solid transparent;
  font: inherit; font-weight: 650; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: var(--brand-ink); }
.btn--primary:hover { filter: brightness(1.08); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink-2); }
.btn--block { width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.1rem; }
.logo__mark { width: 34px; height: 34px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; }
.logo__mark svg { width: 20px; height: 20px; }
.logo small { display: block; font-weight: 500; font-size: .72rem; color: var(--ink-2); letter-spacing: .02em; }
.nav__links { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav__links a { color: var(--ink); text-decoration: none; font-weight: 550; font-size: .96rem; }
.nav__links a:hover { color: var(--brand); }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer;
}
.icon-btn svg { width: 18px; height: 18px; }
.nav__toggle { display: none; }

@media (max-width: 900px) {
  .nav__toggle { display: grid; }
  .nav__links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 8px 20px 16px; display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links li a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav__cta { display: none; }
}

/* Hero */
.hero { padding: 72px 0 80px; }
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero__lead { font-size: 1.18rem; color: var(--ink-2); max-width: 560px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; }
.hero__points { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 0; color: var(--ink-2); font-size: .95rem; }
.hero__points li { display: flex; align-items: center; gap: 7px; }
.hero__points svg { width: 18px; height: 18px; color: var(--brand); flex: none; }

.hero-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 24px; box-shadow: var(--shadow);
}
.hero-card__top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.hero-card__label { font-size: .82rem; color: var(--ink-2); }
.hero-card__badge { font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); }
.hero-card__title { font-weight: 750; font-size: 1.15rem; margin-bottom: 14px; }
.hero-card svg.chart { width: 100%; height: auto; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .price { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--brand); opacity: .1; }
.chart .stop { stroke: var(--danger); stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart .target { stroke: var(--brand); stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart .entry { stroke: var(--ink-2); stroke-width: 1.5; }
.chart text { font-size: 11px; font-weight: 600; font-family: inherit; }
.chart .t-stop { fill: var(--danger); }
.chart .t-target { fill: var(--brand); }
.chart .t-entry { fill: var(--ink-2); }
.hero-card__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.stat { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.stat b { display: block; font-size: 1.05rem; }
.stat span { font-size: .78rem; color: var(--ink-2); }

@media (max-width: 900px) {
  .hero { padding: 48px 0 56px; }
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
}

/* Cards / grids */
.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid--3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px;
}
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--ink-2); }
.card__icon {
  width: 44px; height: 44px; border-radius: 11px; background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; margin-bottom: 16px;
}
.card__icon svg { width: 22px; height: 22px; }

/* Curriculum */
.modules { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: mod; }
.module {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.module summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; gap: 18px;
  align-items: center; padding: 20px 24px;
}
.module summary::-webkit-details-marker { display: none; }
.module__num {
  counter-increment: mod; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2);
  display: grid; place-items: center; font-weight: 800; color: var(--brand);
}
.module__num::before { content: counter(mod, decimal-leading-zero); font-size: .95rem; }
.module__title { font-weight: 700; font-size: 1.08rem; }
.module__meta { display: block; font-size: .85rem; color: var(--ink-2); font-weight: 500; }
.module__chev { width: 20px; height: 20px; color: var(--ink-2); transition: transform .2s ease; }
.module[open] .module__chev { transform: rotate(180deg); }
.module__body { padding: 0 24px 22px 82px; color: var(--ink-2); }
.module__body ul { margin: 0; padding-left: 18px; }
.module__body li { margin-bottom: 4px; }
@media (max-width: 640px) {
  .module summary { padding: 16px; gap: 12px; }
  .module__body { padding: 0 16px 18px 16px; }
}

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li { position: relative; padding-top: 52px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 0; left: 0; width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800;
}
.steps p { color: var(--ink-2); margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Calculator */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.calc__form { padding: 30px; display: grid; gap: 16px; }
.calc__result { padding: 30px; background: var(--brand-soft); display: flex; flex-direction: column; gap: 16px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field .hint { font-size: .8rem; color: var(--ink-2); margin-top: 4px; }
.input-wrap { position: relative; }
.input-wrap span { position: absolute; top: 50%; transform: translateY(-50%); color: var(--ink-2); font-size: .95rem; pointer-events: none; }
.input-wrap .pre { left: 14px; }
.input-wrap .post { right: 14px; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 14px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.input-wrap .has-pre { padding-left: 28px; }
.input-wrap .has-post { padding-right: 34px; }
.result-big { font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 800; line-height: 1; color: var(--brand); }
.result-rows { display: grid; gap: 8px; }
.result-row { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid color-mix(in srgb, var(--brand) 18%, transparent); padding-bottom: 8px; font-size: .95rem; }
.result-row b { font-variant-numeric: tabular-nums; }
.calc__note { font-size: .85rem; color: var(--ink-2); margin: 0; }
.calc__warn { font-size: .88rem; color: var(--danger); font-weight: 600; margin: 0; min-height: 1.2em; }
@media (max-width: 800px) { .calc { grid-template-columns: 1fr; } .calc__form, .calc__result { padding: 22px; } }

/* Glossary */
.glossary__search { max-width: 420px; margin-bottom: 24px; }
.glossary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.term { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.term dt { font-weight: 700; margin-bottom: 4px; }
.term dd { margin: 0; color: var(--ink-2); font-size: .95rem; }
.term[hidden] { display: none; }
.glossary__empty { color: var(--ink-2); }
@media (max-width: 700px) { .glossary { grid-template-columns: 1fr; } }

/* Pricing */
.plan { display: flex; flex-direction: column; }
.plan--featured { border: 2px solid var(--brand); position: relative; }
.plan__tag { position: absolute; top: -12px; left: 24px; background: var(--brand); color: var(--brand-ink); font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.plan__price { font-size: 2.2rem; font-weight: 800; margin: 6px 0 2px; }
.plan__price small { font-size: .95rem; font-weight: 500; color: var(--ink-2); }
.plan ul { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 10px; flex: 1; }
.plan li { display: flex; gap: 10px; color: var(--ink-2); font-size: .96rem; }
.plan li svg { width: 18px; height: 18px; color: var(--brand); flex: none; margin-top: 4px; }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 22px; }
.faq summary { cursor: pointer; font-weight: 650; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--brand); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-2); margin: 0 0 18px; }

/* CTA band + forms */
.cta-band { background: var(--brand); color: var(--brand-ink); border-radius: 22px; padding: 48px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center; }
.cta-band h2 { color: inherit; }
.cta-band p { opacity: .9; margin: 0; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form input { flex: 1 1 220px; border-color: transparent; }
.cta-band .btn { background: var(--ink); color: var(--bg); }
.form-status { font-size: .9rem; margin-top: 10px; min-height: 1.3em; }
@media (max-width: 800px) { .cta-band { grid-template-columns: 1fr; padding: 30px 22px; } }

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: var(--shadow); display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } .form-card { padding: 22px; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); }
.check input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--brand); }
.session-options { display: grid; gap: 10px; }
.session-option { display: flex; gap: 12px; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 16px; cursor: pointer; }
.session-option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.session-option input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.session-option b { display: block; }
.session-option span { font-size: .88rem; color: var(--ink-2); }
.success { text-align: center; padding: 20px 0; }
.success .card__icon { margin: 0 auto 16px; }

/* Disclaimer + footer */
.disclaimer { border-left: 4px solid var(--accent); background: var(--surface); padding: 18px 22px; border-radius: 0 12px 12px 0; font-size: .92rem; color: var(--ink-2); }
.disclaimer b { color: var(--ink); }

.site-footer { border-top: 1px solid var(--line); padding: 56px 0 32px; font-size: .94rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer__grid h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.footer__grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer__grid a { color: var(--ink); text-decoration: none; }
.footer__grid a:hover { color: var(--brand); }
.footer__legal { border-top: 1px solid var(--line); padding-top: 24px; color: var(--ink-2); font-size: .82rem; }
@media (max-width: 800px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer__grid { grid-template-columns: 1fr; } }

.page-hero { padding: 56px 0 24px; }
.two-col { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; gap: 32px; } }
.list-check { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; }
.list-check li { display: flex; gap: 10px; }
.list-check svg { width: 20px; height: 20px; color: var(--brand); flex: none; margin-top: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* YouTube band */
.yt-band {
  display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px;
}
.yt-band h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.yt-band p { margin: 0; }
.yt-band__icon { width: 64px; height: 64px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.yt-band__icon svg { width: 34px; height: 34px; }
@media (max-width: 800px) { .yt-band { grid-template-columns: 1fr; padding: 24px; gap: 18px; } }
