/* RevGrow Courses. KRC design language: see the "Foundations" board on the
   design canvas. Fonts load from Google Fonts in layout.js. */
:root {
  --navy: #1e3a5f;
  --navy-hover: #162d4a;
  --ink: #1e2a4a;
  --chosen: #3f6aa1;
  --mist: #dfe7f1;
  --mist-line: #c9d5e4;
  --surface: #f7f7f8;
  --white: #ffffff;
  --text: #111111;
  --text-2: #555555;
  --text-body: #333333;
  --line: #e0e0e0;
  --done: #2d8a4e;
  --done-bg: #e3f2e8;
  --done-text: #1f6b3b;
  --grant-bg: #f8ecd4;
  --grant-text: #7a4e05;
  --error: #b42318;
  --sans: 'DM Sans', system-ui, -apple-system, sans-serif;
  --mono: 'DM Mono', ui-monospace, Menlo, monospace;
  --serif: 'Libre Baskerville', Georgia, serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--surface); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.5; }
a { color: var(--navy); }
a:hover { color: var(--navy-hover); }
h1, h2, h3 { margin: 0; }
p { margin: 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.site-header .wrap, .site-header .wrap-wide { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand-name { font-family: var(--serif); font-size: 20px; color: var(--ink); }
.brand-tag { font-family: var(--mono); font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--chosen); }
.site-nav { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; font-size: 15px; font-weight: 500; }
.site-nav a { text-decoration: none; color: var(--text-2); }
.site-nav a.on { color: var(--navy); border-bottom: 2px solid var(--navy); padding-bottom: 4px; }
.linklike { background: none; border: none; padding: 0; font: inherit; color: var(--text-2); cursor: pointer; }
.admin-header { background: var(--ink); border-bottom: none; }
.admin-header .brand-name, .admin-header .site-nav a.on { color: var(--white); border-color: var(--white); }
.admin-header .brand-tag, .admin-header .site-nav a, .admin-header .linklike { color: var(--mist); }

/* Type helpers */
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--chosen); }
.kicker.muted { color: var(--text-2); }
.serif { font-family: var(--serif); color: var(--ink); font-weight: 700; }
.muted { color: var(--text-2); }
.small { font-size: 14px; }
.tiny { font-size: 13px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 24px; border-radius: 10px; border: none; background: var(--navy); color: var(--white); font: 600 15px var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--navy-hover); color: var(--white); }
.btn-outline { background: var(--white); color: var(--navy); border: 1.5px solid var(--navy); }
.btn-outline:hover { background: var(--mist); color: var(--navy); }
.btn-light { background: var(--white); color: var(--ink); }
.btn-light:hover { background: var(--mist); color: var(--ink); }
.btn-block { width: 100%; height: 52px; font-size: 16px; }
.btn:disabled { opacity: 0.6; cursor: default; }

/* Pills */
.pill { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 14px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill-done { background: var(--done-bg); color: var(--done-text); }
.pill-progress { background: var(--mist); color: var(--navy); }
.pill-grant { background: var(--grant-bg); color: var(--grant-text); }
.pill-soon { background: var(--surface); color: var(--text-2); border: 1px solid var(--line); }

/* Progress bar */
.bar { height: 8px; border-radius: 4px; background: var(--mist); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--chosen); border-radius: 4px; }
.bar.on-mist { background: var(--white); height: 10px; }

/* Cards and panels */
.card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; }
.pad { padding: 28px; }
.pad-lg { padding: 32px; }
.panel-mist { background: var(--mist); border-radius: 16px; }
.stack { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; } .gap-40 { gap: 40px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.page { padding-top: 40px; padding-bottom: 64px; }
.section-label { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-2); }

/* Catalog */
.course-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.course-card { overflow: hidden; display: flex; flex-direction: column; }
.course-card-top { background: var(--mist); padding: 28px 28px 24px; display: flex; flex-direction: column; gap: 8px; }
.course-card-top .kicker { color: var(--navy); }
.course-card-title { font-family: var(--serif); font-size: 28px; color: var(--ink); }
.course-card-body { padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 16px; }
.offer-row { padding: 24px 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.price { font-size: 22px; font-weight: 700; }
.banner-ink { background: var(--ink); color: var(--white); border-radius: 16px; padding: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.banner-ink p { color: var(--mist); }
.banner-ink img { width: 84px; height: auto; border-radius: 4px; }

/* Course home */
.hero-mist { background: var(--mist); }
.hero-mist .wrap { padding-top: 40px; padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-end; justify-content: space-between; }
.two-col { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.two-col > .main { flex: 999 1 560px; min-width: 0; }
.two-col > .side { flex: 1 1 300px; }
.step { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; padding: 20px 24px; text-decoration: none; color: inherit; }
.step.next { border: 2px solid var(--navy); }
.step.soon { background: transparent; border: 1.5px dashed var(--mist-line); }
.step-text { flex: 1 1 280px; display: flex; flex-direction: column; gap: 4px; }
.step-title { font-size: 17px; font-weight: 600; }
.dot { flex: none; width: 40px; height: 40px; border-radius: 20px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.dot-done { background: var(--done); color: var(--white); }
.dot-next { background: var(--navy); color: var(--white); }
.dot-todo { border: 2px solid var(--mist-line); color: var(--text-2); }
.dot-star { background: var(--mist); color: var(--navy); }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 30px; color: var(--navy); }
.stat span { font-size: 13px; line-height: 1.3; color: var(--text-2); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

/* Lesson */
.lesson-nav { flex: 1 1 240px; padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.lesson-nav a, .lesson-nav span.navitem { display: flex; gap: 10px; align-items: center; min-height: 44px; padding: 0 8px; border-radius: 8px; text-decoration: none; color: var(--text-2); font-size: 14px; }
.lesson-nav a[aria-current] { background: var(--mist); color: var(--navy); font-weight: 600; }
.lesson-nav span.navitem { opacity: 0.6; }
.mini { flex: none; width: 22px; height: 22px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.mini-done { background: var(--done); color: var(--white); }
.mini-on { background: var(--navy); color: var(--white); }
.mini-todo { border: 1.5px solid var(--mist-line); }
.lesson-main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.lesson-title { font-size: 34px; line-height: 1.2; font-weight: 700; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; background: var(--ink); display: flex; align-items: center; justify-content: center; }
.video .play { width: 76px; height: 76px; border-radius: 38px; border: none; background: var(--white); display: flex; align-items: center; justify-content: center; }
.video .label { position: absolute; left: 20px; bottom: 16px; font-size: 14px; color: var(--mist); }
.prose { font-size: 16px; line-height: 1.7; color: var(--text-body); }
.prose > * + * { margin-top: 14px; }
.prose h2 { font-size: 22px; color: var(--text); margin-top: 24px; }
.prose h3 { font-size: 18px; color: var(--text); margin-top: 20px; }
/* A `>` line in lesson markdown is the step's key takeaway: a shaded box
   inside the lesson card, same size as the body text, just weighted. */
.prose blockquote { margin: 20px 0; padding: 16px 20px; background: var(--mist); border-radius: 10px; font-size: 16px; font-weight: 600; line-height: 1.55; color: var(--ink); }
.prose blockquote p { margin: 0; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 6px; }
.sources { font-size: 13px; color: var(--text-2); }

/* Forms */
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
input[type=text], input[type=email], input[type=search], input[type=number], select, textarea {
  font: 400 15px var(--sans); color: var(--text); border: 1px solid #cccccc; border-radius: 8px; padding: 0 12px; height: 44px; background: var(--white); width: 100%;
}
textarea { height: auto; min-height: 96px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid var(--chosen); outline-offset: 1px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.fields .full { grid-column: 1 / -1; }
.check { display: flex; gap: 12px; align-items: center; min-height: 44px; font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--navy); flex: none; }
.table-wrap { overflow-x: auto; }
table.sheet { width: 100%; border-collapse: collapse; min-width: 560px; }
table.sheet th { text-align: left; font-size: 13px; font-weight: 600; color: var(--text-2); padding: 6px 8px; }
table.sheet td { padding: 4px; }
table.sheet td input { height: 40px; }
table.sheet td.score { width: 64px; }
table.sheet td.score input { width: 56px; padding: 0 6px; text-align: center; }
table.sheet td.num { width: 44px; text-align: center; color: var(--text-2); font-size: 13px; }
.example { background: var(--surface); border-radius: 10px; padding: 16px; font-size: 14px; line-height: 1.55; color: var(--text-body); }
.table-full { background: var(--done-bg); color: var(--done-text); border-radius: 10px; padding: 16px 20px; font-size: 15px; line-height: 1.55; }
[hidden] { display: none !important; }
.prompt-text.flash { animation: flash 0.6s ease-out; }
@keyframes flash { from { background: #fff6d6; } to { background: var(--white); } }
@media (prefers-reduced-motion: reduce) { .prompt-text.flash { animation: none; } }
.save-state { font-size: 13px; color: var(--text-2); min-height: 20px; }
.prompt-text { background: var(--white); border-radius: 10px; padding: 20px; font-family: var(--mono); font-size: 14px; line-height: 1.65; color: var(--ink); white-space: pre-wrap; }
.notice { border-radius: 10px; padding: 14px 16px; font-size: 15px; }
.notice-ok { background: var(--done-bg); color: var(--done-text); }
.notice-err { background: #fde8e7; color: var(--error); }

/* Admin table */
table.list { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; color: var(--text-2); font-size: 13px; font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.list td { padding: 14px 12px; border-bottom: 1px solid #eeeff1; vertical-align: top; }
fieldset { margin: 0; padding: 0; border: none; }
legend { font-size: 14px; font-weight: 600; padding: 0 0 6px; }

.center-card { max-width: 480px; margin: 64px auto; }

@media print {
  .site-header, .lesson-nav, .video, .no-print { display: none !important; }
  body { background: #fff; }
  .card { border: none; }
}
