/* Noba — nobaapp.com
   One stylesheet for every page. No external fonts, no JavaScript.
   Colours mirror the app (App/Sources/DesignSystem). */

:root {
  color-scheme: light dark;

  --bg: #FBF9F5;
  --ink: #1D1E28;
  --ink-secondary: #585661;
  --card: #F4EFE6;
  --line: #E6E1D8;
  --button-bg: #1D1E28;
  --button-ink: #FBF9F5;
  --focus: #1D1E28;
  --mark-bg: #FFE9A8;
  --mark-ink: #1D1E28;

  --serif: ui-serif, "New York", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --space-xs: 0.5rem;
  --space-s: 0.75rem;
  --space-m: 1rem;
  --space-l: 1.5rem;
  --space-xl: 2.5rem;
  --space-xxl: 4rem;

  --radius-card: 1.25rem;
  --radius-pill: 999px;
  --measure: 42rem;
  --wide: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141311;
    --ink: #F4F1EC;
    --ink-secondary: #BFBAB1;
    --card: #1F1D1A;
    --line: #37332D;
    --button-bg: #F4F1EC;
    --button-ink: #141311;
    --focus: #F4F1EC;
    --mark-bg: #5A4613;
    --mark-ink: #F4F1EC;
  }
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.1875rem; /* 19px */
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-m);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 1.6rem + 3.4vw, 3.75rem);
}

h2 {
  font-size: clamp(1.625rem, 1.35rem + 1.3vw, 2.25rem);
  margin-top: var(--space-xl);
}

h3 {
  font-size: 1.375rem;
  margin-top: var(--space-l);
  margin-bottom: var(--space-xs);
}

p,
ul,
ol,
dl {
  margin: 0 0 var(--space-m);
}

ul,
ol {
  padding-left: 1.4em;
}

li + li {
  margin-top: 0.4em;
}

strong {
  font-weight: 650;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

main:focus {
  outline: none;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--space-xl) 0;
}

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.prose {
  max-width: var(--measure);
}

main {
  display: block;
  padding-bottom: var(--space-xxl);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 10;
  padding: 0.75rem 1.25rem;
  background: var(--button-bg);
  color: var(--button-ink);
  border-radius: var(--radius-pill);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  min-height: 4.5rem;
}

.brand {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: -0.01em;
  padding: 0.25rem 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-s);
}

.header-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-size: 1.0625rem;
  font-weight: 600;
}

.header-nav a:hover {
  border-color: var(--ink);
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-pill);
  background: var(--button-bg);
  color: var(--button-ink);
  font-weight: 650;
  font-size: 1.125rem;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.button:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.button-secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  align-items: center;
  margin: var(--space-l) 0 var(--space-m);
}

/* ---------- Text helpers ---------- */

.eyebrow {
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  margin-bottom: var(--space-s);
}

.lead {
  font-size: clamp(1.25rem, 1.15rem + 0.5vw, 1.4375rem);
  line-height: 1.55;
  color: var(--ink);
  max-width: 38rem;
}

.muted {
  color: var(--ink-secondary);
}

.updated {
  color: var(--ink-secondary);
  font-size: 1.0625rem;
}

.placeholder {
  background: var(--mark-bg);
  color: var(--mark-ink);
  padding: 0 0.3em;
  border-radius: 4px;
  font-weight: 650;
}

/* ---------- Page header ---------- */

.page-head {
  padding: var(--space-xl) 0 var(--space-m);
}

.page-head h1 {
  margin-bottom: var(--space-s);
}

/* ---------- Cards ---------- */

.card {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: var(--space-l);
  margin: 0 0 var(--space-m);
}

.card > :last-child {
  margin-bottom: 0;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.card-outline {
  background: transparent;
  border: 1px solid var(--line);
}

.grid {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: 1fr;
  padding: 0;
  margin: 0 0 var(--space-m);
  list-style: none;
}

.grid > li {
  margin: 0;
}

@media (min-width: 44rem) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Landing ---------- */

.hero {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

@media (min-width: 44rem) {
  .hero {
    padding-top: var(--space-xxl);
  }
}

.hero h1 {
  max-width: 16ch;
  font-size: clamp(2.5rem, 1.6rem + 4.2vw, 4.25rem);
  line-height: 1.08;
}

.hero-note {
  color: var(--ink-secondary);
  font-size: 1.0625rem;
  max-width: 34rem;
}

.section {
  padding-top: var(--space-xl);
}

.section > h2:first-child {
  margin-top: 0;
}

.benefit h3 {
  margin-top: 0;
}

.benefit p {
  margin-bottom: 0;
}

.teacher {
  display: grid;
  gap: var(--space-m);
  padding: var(--space-xl) var(--space-l);
}

@media (min-width: 44rem) {
  .teacher {
    padding: var(--space-xxl) var(--space-xl);
  }
}

.teacher blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  line-height: 1.35;
}

.checklist {
  list-style: none;
  padding: 0;
}

.checklist li {
  position: relative;
  padding-left: 1.75rem;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.55em;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--ink);
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 3.25rem;
  min-height: 2.5rem;
}

.steps li + li {
  margin-top: var(--space-m);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--button-bg);
  color: var(--button-ink);
  font-weight: 700;
  font-size: 1.0625rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cta-band {
  margin-top: var(--space-xl);
  text-align: left;
}

/* ---------- Legal pages ---------- */

.toc {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--space-l);
  margin: var(--space-l) 0 var(--space-xl);
}

.toc h2 {
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  margin: 0 0 var(--space-s);
}

.toc ol {
  margin: 0;
}

.legal section > h2 {
  scroll-margin-top: var(--space-m);
  padding-top: var(--space-l);
  border-top: 1px solid var(--line);
}

.legal h3 {
  scroll-margin-top: var(--space-m);
}

.facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.15rem var(--space-l);
}

.facts dt {
  font-weight: 650;
  margin-top: var(--space-s);
}

.facts dt:first-child {
  margin-top: 0;
}

.facts dd {
  margin: 0;
}

@media (min-width: 40rem) {
  .facts {
    grid-template-columns: minmax(9rem, max-content) 1fr;
  }

  .facts dt,
  .facts dt:first-child {
    margin-top: 0;
  }
}

.basis {
  display: block;
  margin-top: var(--space-xs);
  color: var(--ink-secondary);
  font-size: 1.0625rem;
}

.basis strong {
  color: var(--ink);
}

.callout {
  border-left: 4px solid var(--ink);
  background: var(--card);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  padding: var(--space-l);
  margin: var(--space-l) 0;
}

.callout > :last-child {
  margin-bottom: 0;
}

/* ---------- FAQ ---------- */

.faq {
  border-top: 1px solid var(--line);
  margin-bottom: var(--space-l);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  min-height: 3.5rem;
  padding: var(--space-m) 0;
  font-weight: 650;
  font-size: 1.1875rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  font-weight: 400;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq .answer {
  padding: 0 0 var(--space-l);
}

.faq .answer > :last-child {
  margin-bottom: 0;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: var(--space-xl) 0 var(--space-xl);
  font-size: 1.125rem;
}

.footer-brand {
  font-family: var(--serif);
  font-size: 1.625rem;
  margin-bottom: var(--space-xs);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: var(--space-l) 0;
  display: grid;
  gap: var(--space-xs);
}

@media (min-width: 44rem) {
  .footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs) var(--space-l);
  }
}

.footer-links li + li {
  margin-top: 0;
}

.footer-links a {
  display: inline-block;
  padding: 0.35rem 0;
}

.footer-links a[aria-current="page"] {
  font-weight: 650;
}

.fine {
  color: var(--ink-secondary);
  font-size: 1.0625rem;
  margin-bottom: 0;
}

/* ---------- Motion & print ---------- */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media print {
  .site-header nav,
  .skip-link,
  .button-row,
  .toc {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .site-footer,
  .card,
  .callout {
    background: none;
  }

  a {
    color: #000;
  }
}
