/* NexaHQ: one stylesheet for every page. Mobile first, light on data. */
:root {
  --paper: #faf7f1;
  --card: #ffffff;
  --ink: #12312a;
  --muted: #55665f;
  --line: #e3ddd1;
  --brand: #0e5e46;
  --brand-soft: #e3f1ea;
  --sun: #f4a62a;
  --sun-soft: #fdf0d9;
  --on-brand: #ffffff;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(18, 49, 42, 0.06), 0 8px 24px rgba(18, 49, 42, 0.06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1a17;
    --card: #16241f;
    --ink: #eef3ef;
    --muted: #a7b8b0;
    --line: #26372f;
    --brand: #3fb488;
    --brand-soft: #173a2e;
    --sun: #f4b045;
    --sun-soft: #3a2c12;
    --on-brand: #06231a;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1a17;
  --card: #16241f;
  --ink: #eef3ef;
  --muted: #a7b8b0;
  --line: #26372f;
  --brand: #3fb488;
  --brand-soft: #173a2e;
  --sun: #f4b045;
  --sun-soft: #3a2c12;
  --on-brand: #06231a;
  --shadow: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}
img, video, svg { max-width: 100%; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 7vw, 3.3rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 5vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
section { padding: 56px 0; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.center { text-align: center; }
.kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 10px;
}
.hl { color: var(--brand); }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.03em; }
.brand img { width: 36px; height: 36px; margin-right: 10px; }
.brand span { color: var(--brand); font-weight: 600; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.nav a:hover { color: var(--brand); }
.nav a.btn, .nav a.btn:hover { color: var(--on-brand); }
.nav .hide-sm { display: none; }
@media (min-width: 760px) { .nav .hide-sm { display: inline; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  border-radius: 999px; border: 2px solid var(--brand);
  background: var(--brand); color: var(--on-brand);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.sm { min-height: 40px; padding: 8px 16px; font-size: 0.92rem; }
.btn.block { width: 100%; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero */
.hero { padding: 48px 0 40px; }
.hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 620px; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.25fr 1fr; } }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-weight: 600; font-size: 0.95rem; }
.ticks li::before { content: "✓"; color: var(--brand); font-weight: 800; margin-right: 6px; }

/* Cards and grids */
.grid { display: grid; gap: 18px; }
@media (min-width: 760px) { .grid.two { grid-template-columns: repeat(2, 1fr); } .grid.three { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card h3 { margin-top: 4px; }
.card .btn { margin-top: 8px; }
.step-num {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand); font-weight: 800;
}
.tag {
  display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--sun-soft); color: var(--ink);
}
.band { background: var(--brand-soft); }
.stat { font-size: 2.2rem; font-weight: 800; color: var(--brand); line-height: 1; margin-bottom: 6px; }
.src { font-size: 0.8rem; color: var(--muted); }

/* Course cards */
.course { display: flex; flex-direction: column; }
.course .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.course ul { padding-left: 1.1em; margin: 0 0 14px; }
.course .grow { flex: 1; }

/* Video */
.clip {
  position: relative; width: 100%; max-width: 320px; aspect-ratio: 9 / 16;
  border-radius: 22px; overflow: hidden; background: #0b2a21; margin: 0 auto;
  box-shadow: 0 20px 50px rgba(14, 94, 70, 0.25);
}
.clip video { width: 100%; height: 100%; object-fit: cover; }

/* Pricing */
.prices { display: grid; gap: 18px; align-items: stretch; }
@media (min-width: 860px) { .prices { grid-template-columns: repeat(3, 1fr); } }
.price { display: flex; flex-direction: column; }
.price .amount { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin: 10px 0 4px; }
.price .amount small { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.price ul { list-style: none; padding: 0; margin: 16px 0 18px; flex: 1; }
.price li { padding: 6px 0 6px 26px; position: relative; }
.price li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 800; }
.price.featured { border: 2px solid var(--brand); position: relative; }
.price.featured .badge {
  position: absolute; top: -13px; left: 22px; background: var(--sun); color: #2b1d02;
  font-size: 0.78rem; font-weight: 800; padding: 4px 12px; border-radius: 999px;
}

/* Lists, FAQ, lessons */
.checks { list-style: none; padding: 0; }
.checks li { padding: 6px 0 6px 28px; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 800; }
.crosses li::before { content: "✕"; color: #c0492b; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 700; padding: 12px 0; list-style-position: outside; }
details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.module { border-left: 3px solid var(--brand); padding: 4px 0 4px 16px; margin-bottom: 18px; }
.module h3 { margin-bottom: 4px; }
.module p { margin: 0; color: var(--muted); }
.callout { border-radius: 14px; padding: 16px 18px; background: var(--sun-soft); margin: 18px 0; }
.callout.green { background: var(--brand-soft); }
.prompt {
  background: var(--card); border: 1px dashed var(--brand); border-radius: 12px; padding: 14px 16px;
  font-family: ui-monospace, Consolas, monospace; font-size: 0.9rem; white-space: pre-wrap; overflow-wrap: anywhere;
}
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.table-wrap { overflow-x: auto; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose ol, .prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
/* Wide tables in lessons scroll inside their own box instead of widening the page on a phone. */
.prose table { display: block; max-width: 100%; overflow-x: auto; }
.prose table th, .prose table td { white-space: normal; min-width: 7rem; }

/* App pages (sign-in, lessons, checkout, account) */
main.app { min-height: 60vh; }
main.app section { padding: 36px 0; }
.field { display: block; margin: 0 0 16px; }
.field span { display: block; font-weight: 700; margin-bottom: 6px; }
.field input[type="email"], .field input[type="text"] {
  width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
}
.field input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--brand); flex: none; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 18px 0; font-size: 0.9rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.notice { border-radius: 12px; padding: 12px 16px; margin: 0 0 18px; background: var(--brand-soft); }
.notice.warn { background: var(--sun-soft); }
.lessons { list-style: none; padding: 0; margin: 0; }
.lessons li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.lessons .num {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 0.9rem;
}
.lessons .done .num { background: var(--brand); color: var(--on-brand); }
.lessons .locked { opacity: 0.6; }
.lessons a { font-weight: 700; text-decoration: none; color: var(--ink); }
.lessons a:hover { color: var(--brand); }
.lessons p { margin: 2px 0 0; color: var(--muted); font-size: 0.93rem; }
.bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 8px 0 4px; }
.bar i { display: block; height: 100%; background: var(--brand); }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.admin td, .admin th { font-size: 0.9rem; }
.inline { display: inline; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 36px 0 48px; font-size: 0.93rem; }
footer .cols { display: grid; gap: 22px; }
@media (min-width: 760px) { footer .cols { grid-template-columns: 2fr 1fr 1fr; } }
footer a { color: var(--ink); text-decoration: none; display: block; padding: 3px 0; }
footer a:hover { color: var(--brand); }
footer h4 { margin: 0 0 8px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

/* Back buttons at the top of a page */
.btn.back { margin-bottom: 8px; }
