/* UNC Courses MCP design system: tokens, then a few components.
   Soft gray canvas, white rounded cards, big bold type, muted secondary text.
   UNC colors are accents only: Carolina Blue #4B9CD3, Navy #13294B. */

/* ---------- Tokens ---------- */
:root {
  /* brand */
  --navy: #13294B;
  --blue: #4B9CD3;
  --link: #007FAE;
  --positive: #1F9D6B;

  /* surfaces + text (light) */
  --bg: #F2F3F3;          /* page canvas */
  --surface: #FFFFFF;     /* cards */
  --surface-2: #E6E8E9;   /* quiet buttons, wells, icon tiles */
  --line: #E1E3E4;        /* hairlines */
  --text: #0E1116;
  --muted: #6B7686;
  --on-primary: #FFFFFF;
  --primary: var(--navy);

  /* type */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --text-sm: 14px;
  --text-md: 17px;
  --text-lg: 20px;
  --text-xl: 28px;
  --text-display: clamp(40px, 9vw, 60px);

  /* space (4px grid) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* shape */
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgb(16 24 40 / 4%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C0F14;
    --surface: #161B22;
    --surface-2: #222934;
    --line: #262D38;
    --text: #F2F4F7;
    --muted: #97A3B4;
    --link: #7FC0EC;
    --primary: var(--blue);
    --on-primary: #0C0F14;
    --shadow: none;
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--text-md)/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-underline-offset: 2px; }
code { font: 0.9em var(--mono); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- Layout ---------- */
.page { max-width: 720px; margin: 0 auto; padding: var(--space-6) var(--space-4) var(--space-8); }
.stack > * + * { margin-top: var(--space-5); }
.section { margin-top: var(--space-7); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-4); }
.section-title { font-size: var(--text-lg); font-weight: 600; margin: 0; }

/* ---------- Text ---------- */
.eyebrow { font-size: var(--text-md); font-weight: 500; margin: 0 0 var(--space-3); }
.display { font-size: var(--text-display); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; margin: 0; }
.muted { color: var(--muted); }
.lede { color: var(--muted); font-size: var(--text-lg); margin: var(--space-3) 0 0; }

/* ---------- Brand bar (UNC signature; keep clear space >= 1/4 logo height) ---------- */
.brandbar { padding: var(--space-3) 0; margin-bottom: var(--space-6); }
.brandbar img { display: block; height: 44px; width: auto; max-width: 100%; }

/* ---------- Card ---------- */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow);
}
.card-hero { padding: var(--space-6) var(--space-5); }

/* ---------- Rows (label left, value right, hairline between) ---------- */
.rows { margin: var(--space-5) 0 0; padding: var(--space-2) 0 0; border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-3) 0; }
.row dt { color: var(--muted); }
.row dd { margin: 0; font-weight: 500; text-align: right; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--positive); margin-right: var(--space-2); vertical-align: middle; }

/* ---------- Field (read-only value with copy) ---------- */
.field { display: flex; align-items: center; gap: var(--space-2); background: var(--surface-2); border-radius: var(--radius-md); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4); }
.field input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: var(--text-md) var(--mono); padding: var(--space-2) 0; }
.field input:focus { outline: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 44px; padding: 0 var(--space-5);
  border: 0; border-radius: var(--radius-sm);
  font: 600 var(--text-md)/1 var(--font); text-decoration: none; cursor: pointer;
  transition: transform .08s ease, opacity .15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-quiet { background: var(--surface-2); color: var(--text); }
.btn-icon { width: 44px; padding: 0; border-radius: var(--radius-sm); }

/* ---------- Action tiles (big square button + label under it) ---------- */
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.action { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); color: var(--text); text-decoration: none; font-size: var(--text-md); text-align: center; background: none; border: 0; padding: 0; font-family: inherit; cursor: pointer; }
.action-tile { width: 100%; height: 76px; display: grid; place-items: center; border-radius: var(--radius-md); background: var(--surface-2); color: var(--text); transition: transform .08s ease; }
.action-primary .action-tile { background: var(--primary); color: var(--on-primary); }
.action:active .action-tile { transform: scale(0.97); }
.action svg { width: 26px; height: 26px; }

/* ---------- Step cards ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-3); list-style: none; margin: 0; padding: 0; }
.step { background: var(--surface); border-radius: var(--radius-lg); padding: var(--space-5); box-shadow: var(--shadow); }
.icon-tile { width: 48px; height: 48px; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--line); color: var(--blue); font-weight: 700; margin-bottom: var(--space-4); }
.step p { margin: 0; }
.step .muted { margin-top: var(--space-2); font-size: var(--text-sm); }

/* ---------- List (inside a card) ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: var(--space-3) 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; padding-top: 0; }
.list li:last-child { padding-bottom: 0; }

/* ---------- Footer ---------- */
.footer { margin-top: var(--space-7); color: var(--muted); font-size: var(--text-sm); }
.footer p { margin: 0 0 var(--space-2); }

@media (max-width: 420px) {
  .action-tile { height: 64px; }
  .action { font-size: var(--text-sm); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
