/* Base design system ported from johnnyphung.com */
:root {
      --bg: #FFFFFF;
      --bg-subtle: #FAFAFB;
      --bg-sunken: #F5F6F8;
      --text: #15161A;
      --text-muted: #585C64;
      --text-faint: #5F6570;
      --border: #ECECF1;
      --border-strong: #E0E1E8;
      --accent: #4F46E5;
      --accent-hover: #4038C9;
      --accent-bright: #6366F1;
      --accent-soft: #EEEDFD;

      --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
      --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

      --shadow-xs: 0 1px 2px rgba(17,18,23,.06);
      --shadow-sm: 0 1px 3px rgba(17,18,23,.05), 0 1px 2px rgba(17,18,23,.03);
      --shadow-md: 0 12px 32px -12px rgba(17,18,23,.16);
      --shadow-lg: 0 24px 60px -16px rgba(17,18,23,.22);

      --r: 14px;
      --r-sm: 10px;
      --r-lg: 22px;
      --r-pill: 999px;

      --maxw: 1180px;
      --gutter: 40px;
    }

    *, *::before, *::after { box-sizing: border-box; }
    html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

    body {
      margin: 0;
      background: var(--bg);
      color: var(--text);
      font-family: var(--sans);
      font-size: 17px;
      line-height: 1.6;
      -webkit-font-smoothing: antialiased;
      text-rendering: optimizeLegibility;
    }

    h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; }
    p { margin: 0; }
    a { color: inherit; text-decoration: none; }
    img, svg, iframe { display: block; max-width: 100%; }

    .container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

    /* ---------- accessibility helpers ---------- */
    .vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

    .skip-link {
      position: absolute; left: 16px; top: -64px; z-index: 100;
      background: var(--text); color: #fff; padding: 12px 18px; border-radius: 10px;
      font-weight: 600; font-size: 15px; transition: top .18s ease;
    }
    .skip-link:focus { top: 16px; }

    a:focus-visible, button:focus-visible, iframe:focus-visible, select:focus-visible, .th-sort:focus-visible, .doc-table-wrap:focus-visible {
      outline: 3px solid var(--accent);
      outline-offset: 2px;
      border-radius: 6px;
    }

    /* ---------- shared bits ---------- */
    .kicker {
      display: inline-flex; align-items: center; gap: 9px;
      font-family: var(--mono); font-size: 12.5px; font-weight: 500;
      letter-spacing: 0.02em; color: var(--accent); text-transform: lowercase;
    }
    .kicker .idx { color: var(--text-faint); }
    .kicker::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }

    .eyebrow {
      font-family: var(--mono); font-size: 13px; font-weight: 500;
      letter-spacing: 0.01em; color: var(--accent);
    }

    .chip {
      display: inline-flex; align-items: center; gap: 7px;
      font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--text-muted);
      padding: 6px 11px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-pill);
    }

    .btn {
      display: inline-flex; align-items: center; justify-content: center; gap: 9px;
      min-height: 46px; padding: 0 20px; border-radius: var(--r-pill);
      font-size: 15px; font-weight: 600; line-height: 1; cursor: pointer;
      border: 1px solid transparent; transition: background .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
    }
    .btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
    .btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
    .btn-ghost { background: var(--bg); color: var(--text); border-color: var(--border-strong); }
    .btn-ghost:hover { border-color: var(--text); transform: translateY(-1px); }

    .arrow { width: 15px; height: 15px; flex: 0 0 auto; }

    /* ---------- header ---------- */
    .site-header {
      position: sticky; top: 0; z-index: 50;
      display: flex; align-items: center; justify-content: space-between; gap: 24px;
      flex-wrap: wrap;
      padding: 14px var(--gutter);
      background: rgba(255,255,255,0.78);
      backdrop-filter: saturate(180%) blur(16px);
      border-bottom: 1px solid var(--border);
    }
    .brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
    .brand .avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border-strong); }
    .nav { display: flex; align-items: center; justify-content:flex-end; flex-wrap:wrap; gap: 4px; flex:1 1 680px; }
    .nav a { font-size: 14.5px; font-weight: 500; color: var(--text-muted); padding: 9px 13px; border-radius: 9px; min-height: 24px; display: inline-flex; align-items: center; transition: color .15s ease, background .15s ease; }
    .nav a:hover { color: var(--text); background: var(--bg-sunken); }
    .nav a.nav-doc,
    .nav a.nav-doc:visited {
      max-width: 200px;
      color: var(--accent);
      font-family: var(--mono);
      font-size: 11.5px;
      font-weight: 600;
      line-height: 1.22;
      white-space: normal;
    }
    .nav a.nav-doc:hover,
    .nav a.nav-doc:focus-visible {
      color: var(--accent-hover);
      background: var(--accent-soft);
    }
    .nav .nav-cta { color: #fff; background: var(--accent); }
    .nav .nav-cta:hover { background: var(--accent-hover); color: #fff; }

    /* ---------- hero ---------- */
    .hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
    .hero::before {
      content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
      background-image: radial-gradient(circle at center, #E6E6EE 1px, transparent 1px);
      background-size: 24px 24px;
      -webkit-mask-image: radial-gradient(120% 80% at 70% 0%, #000 0%, transparent 70%);
      mask-image: radial-gradient(120% 80% at 70% 0%, #000 0%, transparent 70%);
      opacity: .7;
    }
    .hero::after {
      content: ""; position: absolute; top: -200px; right: -160px; width: 620px; height: 620px; z-index: 0;
      background: radial-gradient(circle, rgba(99,102,241,.16), rgba(99,102,241,0) 62%);
      pointer-events: none;
    }
    .hero-inner { position: relative; z-index: 1; padding: 92px 0 76px; display: flex; flex-direction: column; gap: 30px; align-items: flex-start; }
    .avail { display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--text-muted); padding: 7px 13px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-pill); box-shadow: var(--shadow-xs); }
    .avail .led { width: 7px; height: 7px; border-radius: 50%; background: #16A34A; box-shadow: 0 0 0 3px rgba(22,163,74,.16); }
    .hero h1 { font-size: clamp(46px, 7.4vw, 86px); letter-spacing: -0.04em; max-width: 16ch; }
    .hero h1 .grad {
      background: linear-gradient(100deg, var(--accent), var(--accent-bright) 55%, #8B5CF6);
      -webkit-background-clip: text; background-clip: text; color: transparent;
    }
    .hero-lead { font-size: clamp(19px, 2.3vw, 23px); line-height: 1.5; color: var(--text-muted); max-width: 60ch; font-weight: 450; }
    .hero-lead strong { color: var(--text); font-weight: 600; }
    .hero-chips { display: flex; flex-wrap: wrap; gap: 9px; }
    .hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
    .hero-note { font-size: 14px; color: var(--text-faint); }

    /* ---------- stat band ---------- */
    .stats { display: flex; flex-wrap: wrap; border: 1px solid var(--border); border-radius: var(--r); background: var(--bg); box-shadow: var(--shadow-sm); overflow: hidden; margin: 0 0 -1px; }
    .stat { flex: 1 1 0; min-width: 180px; padding: 26px 28px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
    .stat:last-child { border-right: 0; }
    .stat .num { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
    .stat .num .u { color: var(--accent); }
    .stat .cap { font-size: 13.5px; color: var(--text-muted); font-family: var(--mono); font-weight: 500; }
    .stats-wrap { position: relative; z-index: 2; margin-top: -40px; }

    /* ---------- sections ---------- */
    .section { padding: 96px 0; }
    .section.subtle { background: var(--bg-subtle); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
    section[id] { scroll-margin-top: 76px; }
    .sec-head { display: flex; flex-direction: column; gap: 18px; margin-bottom: 52px; }
    .sec-head.split { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
    .sec-head h2 { font-size: clamp(32px, 4.6vw, 46px); letter-spacing: -0.035em; }
    .sec-head .note { font-size: 16px; color: var(--text-muted); max-width: 420px; }

    .tag { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--text-muted); padding: 5px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 7px; }

    /* ---------- card grid ---------- */
    .card {
      display: flex; flex-direction: column; gap: 14px; padding: 28px;
      background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-xs);
      transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
    }
    .course-section-grid { display:grid; grid-template-columns:minmax(0, 1fr) minmax(280px, 360px); gap:28px; align-items:start; }
    .course-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:20px; min-width:0; }
    a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
    .card .cat { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--accent); }
    .card h3 { font-size: 24px; letter-spacing: -0.025em; }
    .card p { font-size: 15.5px; line-height: 1.62; color: var(--text-muted); flex: 1 1 auto; }
    .card .go { display: inline-flex; align-items: center; align-self:flex-end; gap: 7px; font-size: 14.5px; font-weight: 600; color: var(--accent); font-family: var(--mono); text-align:right; }
    .card .go.static { color: var(--text-faint); }
    .course-link-rail { position:sticky; top:96px; display:flex; flex-direction:column; gap:0; min-width:0; padding-left:22px; border-left:1px solid var(--border-strong); }
    .course-link-rail a { display:flex; align-items:baseline; justify-content:space-between; gap:18px; padding:11px 0; border-bottom:1px solid var(--border); color:var(--text); font-weight:650; font-size:14.5px; line-height:1.35; text-align:right; }
    .course-link-rail a:hover { color:var(--accent); }
    .course-link-rail a span:first-child { min-width:0; overflow-wrap:anywhere; }
    .course-link-arrow { flex:0 0 auto; color:var(--accent); font-family:var(--mono); }

    .cta-card { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 16px; padding: 36px; background: var(--accent-soft); border: 1px solid #DAD8FB; border-radius: var(--r); }
    .cta-card h3 { font-size: 24px; letter-spacing: -0.025em; line-height: 1.2; }
    .cta-card .go { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--accent); }

    /* ---------- narrative layouts ---------- */
    .about-body { display:grid; grid-template-columns:minmax(260px,.7fr) 1fr; gap:44px; align-items:start; }
    .about-statement { font-size:clamp(25px,3vw,34px); line-height:1.16; font-weight:800; letter-spacing:-0.02em; }
    .about-statement .em { color:var(--accent); }
    .about-col { display:flex; flex-direction:column; gap:18px; color:var(--text-muted); }
    .muted { color:var(--text-muted); }

    /* ---------- AI Foundry and research studio ---------- */
    .foundry-section { background:#FBFDFC; border-top:1px solid var(--border); border-bottom:1px solid var(--border); }
    .foundry-intro { display:flex; flex-direction:column; gap:34px; margin-bottom:52px; }
    .foundry-heading { display:flex; flex-direction:column; gap:18px; }
    .foundry-heading h2 { font-size:clamp(32px,4.6vw,46px); letter-spacing:-0.035em; max-width:28ch; }
    .foundry-lower { display:grid; grid-template-columns:minmax(280px,430px) minmax(360px,560px); gap:42px; align-items:start; }
    .foundry-copy { display:flex; flex-direction:column; align-items:flex-start; gap:14px; }
    .foundry-lower .note { font-size:16.5px; line-height:1.75; color:var(--text-muted); }
    .foundry-question {
      display:inline-flex; align-items:center; min-height:34px; padding:7px 11px;
      font-family:var(--mono); font-size:12.5px; font-weight:600; color:var(--accent);
      border:1px solid #DAD8FB; background:var(--accent-soft); border-radius:var(--r-sm);
    }
    .foundry-question:hover { color:var(--accent-hover); border-color:var(--accent); }
    .foundry-shot {
      appearance:none; width:100%; padding:0; margin:0; overflow:hidden; cursor:pointer;
      background:var(--bg); border:1px solid var(--border-strong); border-radius:var(--r);
      box-shadow:var(--shadow-md); aspect-ratio:1920 / 963; max-height:320px;
      transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
    }
    .foundry-shot:hover { transform:translateY(-2px); box-shadow:var(--shadow-lg); border-color:#C9CAD6; }
    .foundry-shot img { width:100%; height:100%; object-fit:cover; object-position:top left; }
    .image-dialog {
      width:min(1120px, calc(100vw - 32px)); max-height:calc(100vh - 32px);
      padding:0; border:0; border-radius:var(--r); background:var(--bg); box-shadow:var(--shadow-lg);
    }
    .image-dialog::backdrop { background:rgba(17,18,23,.74); backdrop-filter:blur(4px); }
    .image-dialog-inner { position:relative; padding:12px; }
    .image-dialog img { width:100%; max-height:calc(100vh - 64px); object-fit:contain; border-radius:10px; }
    .dialog-close {
      position:absolute; top:18px; right:18px; z-index:2; width:38px; height:38px;
      display:grid; place-items:center; padding:0; cursor:pointer;
      color:var(--text); background:rgba(255,255,255,.94); border:1px solid var(--border-strong);
      border-radius:var(--r-pill); box-shadow:var(--shadow-sm); font-size:24px; line-height:1;
    }
    .dialog-close:hover { background:var(--bg-sunken); }
    .foundry-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
    .foundry-card {
      display:flex; flex-direction:column; gap:12px; padding:24px;
      background:var(--bg); border:1px solid var(--border);
      border-radius:var(--r); box-shadow:var(--shadow-xs);
    }
    .foundry-card-k { font-family:var(--mono); font-size:12.5px; font-weight:600; color:var(--text); }
    .foundry-card p { color:var(--text-muted); font-size:15px; line-height:1.62; }
    .research-studio {
      display:grid; grid-template-columns:1fr .9fr; gap:34px; margin-top:24px; padding:30px;
      background:var(--bg); border:1px solid var(--border-strong); border-radius:var(--r); box-shadow:var(--shadow-sm);
    }
    .research-studio h3 { margin-top:18px; margin-bottom:14px; font-size:clamp(26px,3.4vw,38px); line-height:1.12; letter-spacing:-0.02em; }
    .research-studio p { color:var(--text-muted); }
    .research-list { display:flex; flex-direction:column; gap:14px; }
    .research-list h4 { margin:0; font-size:16px; }
    .research-list ul { margin:0; padding-left:20px; display:flex; flex-direction:column; gap:10px; color:var(--text-muted); font-size:15px; }
    .resource-links { display:flex; flex-wrap:wrap; gap:8px; margin-top:6px; }
    .resource-links a { font-family:var(--mono); font-size:12.5px; color:#0F766E; padding:7px 10px; border:1px solid #99F6E4; background:#F0FDFA; border-radius:var(--r-sm); }
    .resource-links a:hover { border-color:#0F766E; }

    .foundry-projects { background:#FBFDFC; border-top:1px solid var(--border); border-bottom:1px solid var(--border); }
    .project-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:18px; }
    .project-card { display:flex; flex-direction:column; gap:12px; padding:24px; background:var(--bg); border:1px solid var(--border); border-radius:var(--r); box-shadow:var(--shadow-xs); }
    .project-card h3 { font-size:21px; letter-spacing:-0.02em; line-height:1.18; }
    .project-card p { color:var(--text-muted); font-size:15px; line-height:1.6; }
    .project-card .project-k { font-family:var(--mono); font-size:12px; color:#0F766E; font-weight:600; }
    .project-card .evidence { padding-top:12px; border-top:1px solid var(--border); }
    .project-card .evidence strong { color:var(--text); }

    /* ---------- footer ---------- */
    .footer { background: var(--bg-sunken); border-top: 1px solid var(--border); padding: 88px 0 40px; }
    .footer .container { max-width:1480px; }
    .footer-top { display: grid; grid-template-columns: minmax(360px, 640px) minmax(480px, 1fr); gap: 34px 56px; align-items: start; }
    .footer-left { display:contents; }
    .footer-head { display: flex; flex-direction: column; gap: 22px; max-width: 640px; }
    .footer-head h2 { font-size: clamp(34px, 5vw, 54px); letter-spacing: -0.04em; line-height: 1.04; }
    .footer-head h2 .grad { background: linear-gradient(100deg, var(--accent), #8B5CF6); -webkit-background-clip: text; background-clip: text; color: transparent; }
    .footer-links { grid-column:1; grid-row:2; display: flex; flex-direction: column; gap: 6px; position:relative; }
    .footer-links a { position:relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-width: 260px; padding: 11px 16px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--bg); font-weight: 600; font-size: 15px; min-height: 24px; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
    .footer-links a:hover, .footer-links a.is-previewed { border-color: var(--accent); transform: translateX(2px); box-shadow:0 0 0 3px rgba(79,70,229,.10); }
    .footer-links a.is-previewed::after { content:""; position:absolute; left:calc(100% + 6px); top:50%; width:54px; height:1px; background:linear-gradient(90deg,var(--accent),rgba(79,70,229,0)); pointer-events:none; }
    .footer-links a .handle { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--text-muted); }
    .footer-course-panel { grid-column:2; grid-row:2; position:relative; overflow:hidden; padding:28px; background:var(--bg); border:1px solid var(--border-strong); border-radius:var(--r); box-shadow:var(--shadow-sm); }
    .footer-course-panel::before { content:""; position:absolute; left:0; top:0; bottom:0; width:4px; background:linear-gradient(180deg,var(--accent),#14B8A6,#F59E0B); }
    .footer-course-titleline { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-top:14px; margin-bottom:18px; }
    .footer-course-code { display:inline-flex; align-items:center; min-height:28px; padding:5px 10px; border-radius:var(--r-pill); background:var(--accent-soft); color:var(--accent); font-family:var(--mono); font-size:12.5px; font-weight:600; }
    .footer-course-open { font-family:var(--mono); font-size:12.5px; font-weight:600; color:var(--text-muted); }
    .footer-course-open:hover { color:var(--accent); }
    .footer-course-panel h3 { margin-bottom:10px; font-size:clamp(24px,3vw,32px); letter-spacing:-0.03em; line-height:1.12; }
    .footer-course-panel p { color:var(--text-muted); font-size:15px; line-height:1.55; }
    .footer-course-meta { margin-top:12px; font-family:var(--mono); font-size:12.5px; color:var(--text-faint); }
    .footer-course-branches { display:grid; grid-template-columns:1fr 1fr; gap:24px; margin-top:22px; padding-top:22px; border-top:1px solid var(--border); }
    .branch-label { display:block; margin-bottom:12px; font-family:var(--mono); font-size:12px; font-weight:600; color:var(--text); }
    .footer-course-branches ul, .footer-course-branches ol { margin:0; padding-left:18px; color:var(--text-muted); }
    .footer-course-branches li { margin-bottom:10px; font-size:14px; line-height:1.48; }
    .footer-course-branches li:last-child { margin-bottom:0; }
    .footer-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); }
    .footer-bar span { font-family: var(--mono); font-size: 13px; color: var(--text-faint); }

    /* ---------- responsive ---------- */
    @media (max-width: 1024px) {
      :root { --gutter: 32px; }
      .footer-top { grid-template-columns:1fr; }
      .footer-left { display:flex; flex-direction:column; gap:34px; }
      .footer-links, .footer-course-panel { grid-column:auto; grid-row:auto; }
      .footer-course-panel { max-width:760px; }
      .footer-links a.is-previewed::after { display:none; }
    }
    @media (max-width: 820px) {
      .nav .nav-link { display: none; }
      .sec-head.split { flex-direction: column; align-items: flex-start; }
      .stat { border-right: 0; border-bottom: 1px solid var(--border); }
      .stat:last-child { border-bottom: 0; }
    }
    @media (max-width: 540px) {
      :root { --gutter: 20px; }
      .section { padding: 64px 0; }
      .hero-inner { padding: 64px 0 56px; }
      .footer-course-titleline { align-items:flex-start; flex-direction:column; }
      .footer-course-branches { grid-template-columns:1fr; }
      .footer-links a { align-items:flex-start; flex-direction:column; gap:4px; }
      .lmi-table { min-width:100%; table-layout:fixed; font-size:12px; }
      .lmi-table th, .lmi-table td { padding:10px 7px; vertical-align:top; }
      .lmi-table th:first-child, .lmi-table td:first-child { width:38%; }
      .lmi-table th.num, .lmi-table td.num { text-align:left; }
      .th-sort { white-space:normal; line-height:1.25; }
    }

    @media (prefers-reduced-motion: reduce) {
      html { scroll-behavior: auto; }
      *, *::before, *::after { transition: none !important; animation: none !important; }
    }

/* ---------- program roadmap (landing) ---------- */
.roadmap { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.roadmap-sem { display:flex; flex-direction:column; gap:14px; padding:26px; background:var(--bg); border:1px solid var(--border); border-radius:var(--r); box-shadow:var(--shadow-xs); }
.roadmap-sem .n { font-family:var(--mono); font-size:12.5px; color:var(--accent); }
.roadmap-sem h3 { font-size:20px; letter-spacing:-0.02em; }
.roadmap-sem .sem-hours { font-family:var(--mono); font-size:13px; color:var(--text-faint); }
.roadmap-sem ul { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.roadmap-sem li a { display:flex; justify-content:space-between; gap:12px; padding:10px 12px; border:1px solid var(--border); border-radius:var(--r-sm); font-size:14.5px; font-weight:600; transition:border-color .15s ease, transform .15s ease; }
.roadmap-sem li a:hover { border-color:var(--text); transform:translateX(2px); }
.roadmap-sem li .code { font-family:var(--mono); color:var(--text-faint); font-weight:500; }

/* ---------- course hero + meta band ---------- */
.course-hero .back { font-family:var(--mono); font-size:13px; color:var(--text-muted); }
.meta-band { display:flex; flex-wrap:wrap; gap:0; border:1px solid var(--border); border-radius:var(--r); background:var(--bg); box-shadow:var(--shadow-sm); overflow:hidden; }
.meta-band .m { flex:1 1 0; min-width:150px; padding:18px 22px; border-right:1px solid var(--border); display:flex; flex-direction:column; gap:4px; }
.meta-band .m:last-child { border-right:0; }
.meta-band .m .k { font-family:var(--mono); font-size:12px; color:var(--text-faint); }
.meta-band .m .v { font-size:18px; font-weight:700; letter-spacing:-0.02em; }

/* ---------- canvas export download ---------- */
.canvas-export-section { padding:30px 0 0; }
.canvas-export-card {
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:24px;
  align-items:center;
  padding:28px;
  color:#fff;
  background:linear-gradient(135deg, #4C1D95 0%, #6D28D9 52%, #7C3AED 100%);
  border:1px solid #A78BFA;
  border-radius:var(--r);
  box-shadow:var(--shadow-md);
  overflow:hidden;
}
.canvas-export-copy { display:flex; flex-direction:column; gap:10px; min-width:0; }
.canvas-export-copy .kicker { color:rgba(255,255,255,.84); }
.canvas-export-copy .kicker .idx { color:rgba(255,255,255,.66); }
.canvas-export-copy .kicker::before { background:#E9D5FF; }
.canvas-export-copy h2 { font-size:clamp(24px,3vw,34px); letter-spacing:-0.03em; }
.canvas-export-copy p { max-width:56ch; color:rgba(255,255,255,.88); font-size:15.5px; line-height:1.6; }
.canvas-export-meta {
  font-family:var(--mono);
  font-size:12.5px;
  color:rgba(255,255,255,.72);
}
.canvas-export-link {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  min-height:48px;
  padding:0 20px;
  color:#4C1D95;
  background:#fff;
  border:1px solid rgba(255,255,255,.8);
  border-radius:var(--r-pill);
  box-shadow:var(--shadow-sm);
  font-size:15px;
  font-weight:750;
  white-space:nowrap;
  transition:transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.canvas-export-link:hover {
  transform:translateY(-1px);
  background:#F5F3FF;
  box-shadow:var(--shadow-md);
}

/* ---------- outcomes ---------- */
.outcomes-grid { display:grid; grid-template-columns:1fr 1fr; gap:40px; }
.outcomes-grid h3 { font-size:18px; margin-bottom:16px; letter-spacing:-0.02em; }
.outcomes-grid ol, .outcomes-grid ul { margin:0; padding-left:22px; display:flex; flex-direction:column; gap:12px; }
.outcomes-grid li { font-size:16px; line-height:1.6; color:var(--text-muted); }

/* ---------- 16-week schedule ---------- */
.sched-list { display:flex; flex-direction:column; }
.sched-row { display:grid; grid-template-columns:64px 1fr; gap:20px; padding:20px 16px; border-top:1px solid var(--border); }
.sched-row:hover { background:var(--bg-subtle); }
.sched-row .wk { font-family:var(--mono); font-size:13px; font-weight:600; color:var(--accent); }
.sched-row .body .t { font-size:17px; font-weight:600; letter-spacing:-0.01em; }
.sched-row .body .d { font-size:15px; line-height:1.55; color:var(--text-muted); margin-top:4px; }
.sched-row .flag { display:inline-block; margin-top:8px; font-family:var(--mono); font-size:11.5px; font-weight:600; padding:3px 9px; border-radius:var(--r-pill); }
.sched-row.is-midterm .flag { color:#9A3412; background:#FFF1E7; }
.sched-row.is-capstone .flag { color:#3730A3; background:var(--accent-soft); }

/* ---------- tools ---------- */
.tool-group { display:flex; flex-direction:column; gap:10px; padding:16px 0; border-top:1px solid var(--border); }
.tool-group .g { font-family:var(--mono); font-size:12.5px; color:var(--text-faint); }
.tool-group .tags { display:flex; flex-wrap:wrap; gap:8px; }

/* ---------- LMI dashboard ---------- */
.lmi-controls { display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin-bottom:20px; }
.lmi-controls select { max-width:100%; font-family:var(--sans); font-size:14px; padding:9px 12px; border:1px solid var(--border-strong); border-radius:var(--r-sm); background:var(--bg); color:var(--text); }
.live-badge { display:inline-flex; align-items:center; gap:8px; font-family:var(--mono); font-size:12.5px; font-weight:500; padding:7px 12px; border-radius:var(--r-pill); border:1px solid var(--border); }
.live-badge::before { content:""; width:8px; height:8px; border-radius:50%; }
.live-badge[data-state="snapshot"] { color:var(--text-muted); }
.live-badge[data-state="snapshot"]::before { background:var(--text-faint); }
.live-badge[data-state="live"] { color:#166534; background:#F0FDF4; border-color:#BBF7D0; }
.live-badge[data-state="live"]::before { background:#16A34A; box-shadow:0 0 0 3px rgba(22,163,74,.16); }
.lmi-table-wrap { overflow-x:auto; border:1px solid var(--border); border-radius:var(--r); background:var(--bg); box-shadow:var(--shadow-sm); }
.lmi-table { width:100%; border-collapse:collapse; font-size:15px; min-width:640px; }
.lmi-table caption { text-align:left; padding:16px 20px; font-family:var(--mono); font-size:12.5px; color:var(--text-faint); }
.lmi-table th, .lmi-table td { padding:14px 18px; text-align:left; border-top:1px solid var(--border); }
.lmi-table th[data-sort] { cursor:pointer; user-select:none; font-family:var(--mono); font-size:12.5px; font-weight:600; color:var(--text-muted); white-space:nowrap; }
.lmi-table th[data-sort]:hover { color:var(--text); }
.th-sort { border:0; background:transparent; padding:0; margin:0; font:inherit; color:inherit; cursor:pointer; text-align:inherit; }
.lmi-table th.num, .lmi-table td.num { text-align:right; font-variant-numeric:tabular-nums; }
.lmi-row { cursor:pointer; }
.lmi-row:hover { background:var(--bg-subtle); }
.lmi-row .occ { font-weight:600; letter-spacing:-0.01em; }
.lmi-row .soc { font-family:var(--mono); font-size:12px; color:var(--text-faint); }
.lmi-row .growth.up { color:#166534; font-weight:600; }
.lmi-row .growth.down { color:#B91C1C; font-weight:600; }
.wage-band { display:none; }
.wage-band.open { display:table-row; }
.wage-band td { background:var(--bg-sunken); padding:0; }
.wage-band .band-inner { padding:18px 20px; display:flex; flex-direction:column; gap:10px; }
.wage-band .bar { position:relative; height:10px; border-radius:var(--r-pill); background:linear-gradient(90deg,var(--accent-soft),var(--accent-bright)); }
.wage-band .ticks { display:flex; justify-content:space-between; font-family:var(--mono); font-size:12px; color:var(--text-muted); }

/* ---------- per-course careers widget ---------- */
.careers-widget { display:flex; flex-direction:column; gap:12px; padding:24px; background:var(--accent-soft); border:1px solid #DAD8FB; border-radius:var(--r); }
.careers-widget h3 { font-size:18px; letter-spacing:-0.02em; }
.careers-widget .roles { display:flex; flex-direction:column; gap:10px; }
.careers-widget .role { display:flex; justify-content:space-between; gap:16px; align-items:baseline; padding:10px 0; border-top:1px solid #DAD8FB; }
.careers-widget .role .r-t { font-weight:600; font-size:15px; }
.careers-widget .role .r-w { font-family:var(--mono); font-size:13.5px; color:var(--text-muted); white-space:nowrap; }
.careers-widget .note { font-size:13px; color:var(--text-muted); }

/* ---------- document pages ---------- */
.document-hero .hero-inner { padding:68px 0 58px; gap:22px; }
.document-hero .back,
.document-source-link {
  font-family:var(--mono); font-size:13px; color:var(--accent); font-weight:700;
  text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:3px;
}
.document-hero .back:hover,
.document-source-link:hover { color:var(--accent-hover); }
.document-hero h1 {
  max-width:22ch;
  font-size:clamp(34px,5vw,58px);
  line-height:1.08;
  letter-spacing:-0.035em;
}
.document-hero .hero-lead { max-width:62ch; font-size:18px; }
.document-container { max-width:1120px; }
.document-reader-guide {
  padding:42px 0;
  background:var(--bg);
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
}
.reader-guide {
  display:grid;
  grid-template-columns:minmax(220px,.42fr) 1fr;
  gap:34px;
  align-items:start;
}
.reader-guide-copy { display:flex; flex-direction:column; gap:12px; }
.reader-guide h2 { font-size:clamp(25px,3vw,34px); letter-spacing:-0.025em; line-height:1.12; }
.reader-points {
  margin:0;
  padding:0;
  list-style:none;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
}
.reader-points li {
  min-height:100%;
  padding:16px 18px;
  color:var(--text-muted);
  background:var(--bg-subtle);
  border:1px solid var(--border);
  border-left:4px solid var(--accent);
  border-radius:var(--r-sm);
  font-size:15px;
  line-height:1.58;
}
.document-section { padding-top:68px; }
.document-shell {
  display:grid;
  grid-template-columns:230px minmax(0, 72ch);
  gap:58px;
  align-items:start;
  justify-content:center;
  min-width:0;
}
.document-toc-panel { position:sticky; top:96px; align-self:start; min-width:0; }
.document-toc {
  border-left:3px solid var(--accent);
  padding-left:16px;
}
.document-toc h2 {
  margin:0 0 12px;
  font-family:var(--mono);
  font-size:12.5px;
  font-weight:700;
  color:var(--text);
  letter-spacing:0;
  text-transform:uppercase;
}
.document-toc ol {
  margin:0;
  padding:0;
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.document-toc a,
.document-toc a:visited {
  display:block;
  padding:6px 0;
  color:var(--accent);
  font-size:13.5px;
  font-weight:650;
  line-height:1.35;
  text-decoration:none;
  overflow-wrap:anywhere;
}
.document-toc a:hover,
.document-toc a:focus-visible {
  color:var(--accent-hover);
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:3px;
}
.document-article {
  display:flex;
  flex-direction:column;
  gap:18px;
  color:var(--text-muted);
  font-size:17px;
  line-height:1.78;
  min-width:0;
  max-width:100%;
}
.document-article h2,
.document-article h3,
.document-article h4,
.document-article h5,
.document-article h6 {
  color:var(--text);
  letter-spacing:-0.02em;
  line-height:1.18;
  scroll-margin-top:110px;
}
.document-article h2 {
  margin-top:40px;
  padding-top:30px;
  border-top:1px solid var(--border);
  font-size:clamp(26px,3vw,34px);
}
.document-article h2:first-child { margin-top:0; padding-top:0; border-top:0; }
.document-article h3 { margin-top:22px; font-size:22px; }
.document-article h4 { margin-top:16px; font-size:18px; }
.document-article p { color:var(--text-muted); max-width:72ch; overflow-wrap:anywhere; }
.document-article strong { color:var(--text); }
.document-article a,
.document-article a:visited {
  color:var(--accent);
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:3px;
}
.document-article a:hover { color:var(--accent-hover); }
.document-article ul,
.document-article ol {
  margin:0;
  padding-left:24px;
  display:flex;
  flex-direction:column;
  gap:9px;
}
.document-article li { padding-left:2px; max-width:72ch; overflow-wrap:anywhere; }
.document-article blockquote {
  margin:8px 0;
  padding:18px 20px;
  color:var(--text-muted);
  background:var(--bg-subtle);
  border-left:4px solid var(--accent);
  border-radius:0 var(--r-sm) var(--r-sm) 0;
}
.document-article code {
  font-family:var(--mono); font-size:.92em; color:var(--text);
  background:var(--bg-sunken); border:1px solid var(--border); border-radius:6px; padding:1px 5px;
}
.doc-table-wrap {
  overflow-x:auto;
  border:1px solid var(--border);
  border-radius:var(--r);
  background:var(--bg);
  box-shadow:var(--shadow-xs);
}
.doc-table { width:100%; min-width:720px; border-collapse:collapse; font-size:14px; line-height:1.5; }
.doc-table th,
.doc-table td {
  padding:12px 14px;
  text-align:left;
  vertical-align:top;
  border-top:1px solid var(--border);
  border-right:1px solid var(--border);
}
.doc-table th:last-child,
.doc-table td:last-child { border-right:0; }
.doc-table th {
  border-top:0;
  color:var(--text);
  background:var(--bg-subtle);
  font-family:var(--mono);
  font-size:12.5px;
  letter-spacing:0;
}
.doc-table td { color:var(--text-muted); }

/* ---------- responsive additions ---------- */
@media (max-width:820px){
  .site-header{align-items:flex-start; gap:12px;}
  .nav{flex:1 1 100%; justify-content:flex-start; gap:3px;}
  .nav a{padding:8px 10px; font-size:14px;}
  .nav a.nav-doc,
  .nav a.nav-doc:visited{
    display:inline-flex;
    max-width:168px;
    padding:7px 9px;
    font-size:11px;
    text-align:left;
  }
  .reader-guide{grid-template-columns:1fr;}
  .reader-points{grid-template-columns:1fr;}
  .document-shell{grid-template-columns:1fr; gap:32px; justify-content:stretch;}
  .document-toc-panel{position:static;}
  .roadmap{grid-template-columns:1fr;}
  .outcomes-grid{grid-template-columns:1fr;}
  .about-body{grid-template-columns:1fr;}
  .foundry-lower{grid-template-columns:1fr;}
  .foundry-grid{grid-template-columns:1fr;}
  .research-studio{grid-template-columns:1fr;}
  .project-grid{grid-template-columns:1fr;}
  .canvas-export-card{grid-template-columns:1fr; align-items:start;}
  .canvas-export-link{justify-self:start;}
      .course-section-grid{grid-template-columns:1fr;}
      .course-grid{grid-template-columns:1fr;}
      .course-link-rail{position:static; padding-left:0; padding-top:18px; border-left:0; border-top:1px solid var(--border-strong);}
    }

@media (max-width:540px){
  .nav a.nav-doc,
  .nav a.nav-doc:visited{
    flex:1 1 calc(50% - 4px);
    max-width:none;
    justify-content:center;
    text-align:center;
  }
  .lmi-controls select { width:100%; }
  .lmi-table { min-width:100%; table-layout:fixed; font-size:12px; }
  .lmi-table th, .lmi-table td { padding:10px 7px; vertical-align:top; }
  .lmi-table th:first-child, .lmi-table td:first-child { width:38%; }
  .lmi-table th.num, .lmi-table td.num { text-align:left; }
  .th-sort { white-space:normal; line-height:1.25; }
}
