/* ─────────────────────────────────────────────
   NICPrep — Direction A design system
   Editorial-SaaS · Fraunces serif + Inter body
   Shared across every page.
   ───────────────────────────────────────────── */

:root {
  /* Ground */
  --bg: #fbf7f4;
  --card: #ffffff;
  --cream: #f4ebe2;

  /* Ink */
  --ink: #1c1410;
  --ink-2: #5a4e48;
  --ink-3: #8a7d75;

  /* Rose accent */
  --rose: #b8264a;
  --rose-ink: #8a0f33;
  --rose-soft: #f8dde4;
  --rose-tint: #fbeaed;

  /* Utility */
  --line: #ece4dd;
  --line-soft: #f4ece4;
  --sage: #5e7558;
  --gold: #b8905a;
  --good: #2d6a4f;
  --good-bg: #e8f1ea;
  --warn: #a05a30;
  --warn-bg: #fbeedf;

  /* Type */
  --display: 'Fraunces', 'Instrument Serif', Georgia, serif;
  --body: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* Elevation */
  --shadow-sm: 0 2px 8px rgba(40, 20, 30, 0.04);
  --shadow-md: 0 14px 36px -18px rgba(60, 30, 40, 0.18);
  --shadow-lg: 0 30px 60px -30px rgba(40, 20, 30, 0.20);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
}

/* ────── Reset ────── */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; }
p { margin: 0; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ────── Utilities ────── */

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 40px; }
.wrap-narrow { max-width: 880px; margin: 0 auto; padding: 0 40px; }
.wrap-tight { max-width: 680px; margin: 0 auto; padding: 0 40px; }

.mono {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.5px;
  color: var(--ink-3); text-transform: uppercase;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--rose-soft); color: var(--rose-ink);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.4px;
  text-transform: uppercase; font-weight: 600;
}
.eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 999px;
  background: var(--rose);
}
.eyebrow.dark { background: var(--ink); color: #fbf7f4; }

/* ────── Buttons ────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 600; letter-spacing: 0.1px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .14s ease, background .14s ease, border-color .14s ease, color .14s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-rose { background: var(--rose); color: #fff; }
.btn-rose:hover { background: var(--rose-ink); }
.btn-secondary { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--ink-3); background: var(--card); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { color: var(--ink); border-color: var(--ink-3); }
.btn-lg { padding: 14px 24px; font-size: 14.5px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ────── Nav ────── */

.nav {
  position: sticky; top: 0; z-index: 40;
  height: 68px;
  background: rgba(251, 247, 244, 0.85);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 40px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 6px; background: var(--rose);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 700; font-size: 15px;
}
.brand-wordmark {
  font-family: var(--display); font-weight: 600; font-size: 19px;
  letter-spacing: -0.3px; color: var(--ink);
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-size: 14px; color: var(--ink-2); font-weight: 500;
  transition: color .14s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); font-weight: 600; }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.nav-cta a.login { font-size: 14px; color: var(--ink-2); font-weight: 500; }
.hamburger {
  display: none; width: 40px; height: 40px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card);
  align-items: center; justify-content: center;
}

/* ────── Footer ────── */

.footer {
  border-top: 1px solid var(--line);
  background: var(--bg); padding: 48px 0 32px;
  margin-top: 80px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px;
}
.footer-col h4 {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--ink-3); font-weight: 600;
  margin-bottom: 14px;
}
.footer-col a {
  display: block; font-size: 13.5px; color: var(--ink-2);
  padding: 4px 0;
}
.footer-col a:hover { color: var(--ink); }
.footer-desc {
  font-size: 13px; color: var(--ink-3); line-height: 1.6;
  margin-top: 12px; max-width: 280px;
}
.footer-bottom {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--ink-3);
}
.footer-bottom .legal { display: flex; gap: 20px; }

/* ────── Cards / section primitives ────── */

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 28px;
}
.card-soft {
  background: var(--rose-tint); border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg); padding: 28px;
}
.divider { height: 1px; background: var(--line); margin: 48px 0; }

.section { padding: 72px 0; border-bottom: 1px solid var(--line); }
.section-title {
  font-size: clamp(32px, 4vw, 44px); font-family: var(--display);
  letter-spacing: -0.04em; line-height: 1.05; color: var(--ink);
  margin-top: 14px; text-wrap: balance;
}
.section-lede {
  font-size: 17px; color: var(--ink-2); line-height: 1.6;
  margin-top: 14px; max-width: 640px; text-wrap: pretty;
}

/* ────── Forms ────── */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label {
  font-size: 12.5px; font-weight: 600; color: var(--ink); letter-spacing: 0.1px;
}
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink);
  font-family: var(--body); font-size: 14px;
  outline: none; transition: border-color .14s, box-shadow .14s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px var(--rose-soft);
}
.field textarea { resize: vertical; min-height: 110px; }
.feedback { padding: 12px 14px; border-radius: 10px; font-size: 13.5px; margin-top: 10px; }
.feedback.good { background: var(--good-bg); color: var(--good); }
.feedback.bad { background: var(--warn-bg); color: var(--warn); }

/* ────── Status pills ────── */

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  font-family: var(--mono); letter-spacing: 0.3px;
  text-transform: uppercase;
}
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.rose { background: var(--rose-soft); color: var(--rose-ink); }
.pill.muted { background: var(--line-soft); color: var(--ink-3); }

/* ────── Responsive ────── */

@media (max-width: 900px) {
  .wrap, .wrap-narrow, .wrap-tight { padding: 0 24px; }
  .nav-inner { padding: 0 24px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
  .section { padding: 48px 0; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .nav-cta a.login { display: none; }
}

/* ────── Print ────── */
@media print {
  .nav, .footer { display: none; }
}

/* ── Test + flashcard title treatment ── */
.test-title .modality-name,
.deck-header-title .modality-name {
  font-style: italic;
  color: var(--rose);
  font-weight: 500;
}
