/* ==========================================================================
   STYLE: HOUSE  —  Ringmast4r // Academy, set to Desktop\STYLE SOP.md
   (Net Works Site Style SOP). Deliberately NOT the store's look: no display
   face, no playbill frames, a different accent so the two sites read apart.
   White ground, fixed house neutrals, ONE accent (Slate Teal preset),
   system sans + mono, SOP type scale, borders over shadows, 3–4px radii,
   "//" wordmark with dimmed slashes, no emojis.

   Layout pattern B (header bar with a bottom rule) over the LMS pages.
   Uses the "standard" markup (cards, catalog table, filter chips, progress);
   the init script fixes ACAD_STYLE='standard' + ACAD_LOOK='house' and sets
   data-theme on <html> (light unless the visitor saved dark).
   This file owns the palette; style.css carries no colours of its own.
   ========================================================================== */

/* --- 1. Tokens (SOP block; neutrals fixed, accent = Slate Teal) ---------- */
:root {
  color-scheme: light;

  /* neutrals (do not change) */
  --bg: #ffffff;        --bg-alt: #fafafa;
  --text: #1a1a1a;      --text-muted: #666666;
  --border: #e5e5e5;    --border-strong: #d0d0d0;
  --code-bg: #f4f4f4;   --table-header: #f8f8f8;  --table-stripe: #fbfbfb;

  /* accent (the ONE per-project choice): Slate Teal */
  --accent: #1f6f78;
  --accent-weak: #1f6f7814;
  --accent-ink: #ffffff;

  /* semantic */
  --ok: #2f6b4f;  --warn: #a86a12;  --danger: #8a2b2b;
  --callout-bg: #fffaea;  --callout-rule: #d4a017;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: "SF Mono", Monaco, Menlo, Consolas, monospace;
  --radius: 4px;
  --shadow: none;
  --lms-max: 1180px;
  --lms-radius: 4px;

  /* legacy aliases: style.css and older page styles still use these names */
  --bg-card: var(--bg-alt);  --bg-hover: var(--code-bg);  --bg-input: var(--bg);
  --primary: var(--accent);  --primary-dim: var(--accent); --primary-bg: var(--accent-weak);
  --border-glow: var(--accent-weak);
  --text-dim: var(--text-muted);  --text-bright: var(--text);
  --warning: var(--warn);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #131313;      --bg-alt: #1a1a1a;
    --text: #ededed;    --text-muted: #9a9a9a;
    --border: #2b2b2b;  --border-strong: #3a3a3a;
    --code-bg: #1e1e1e; --table-header: #1c1c1c; --table-stripe: #171717;
    --accent: #57bcc6;  --accent-weak: #57bcc61f; --accent-ink: #131313;
    --ok: #66b48c;  --warn: #e0a94a;  --danger: #d98a8a;
    --callout-bg: #26200e;  --callout-rule: #d4a017;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131313;      --bg-alt: #1a1a1a;
  --text: #ededed;    --text-muted: #9a9a9a;
  --border: #2b2b2b;  --border-strong: #3a3a3a;
  --code-bg: #1e1e1e; --table-header: #1c1c1c; --table-stripe: #171717;
  --accent: #57bcc6;  --accent-weak: #57bcc61f; --accent-ink: #131313;
  --ok: #66b48c;  --warn: #e0a94a;  --danger: #d98a8a;
  --callout-bg: #26200e;  --callout-rule: #d4a017;
}
:root[data-theme="light"] { color-scheme: light; }

/* --- 2. Base: undo the terminal defaults of style.css ------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); font-size: 15px; line-height: 1.6; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4, h5 { font-family: var(--font-sans); color: var(--text); margin: 0 0 12px; line-height: 1.2; }
h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.5px; }
h2 { font-size: 24px; font-weight: 700; padding-bottom: 8px; border-bottom: 2px solid var(--border-strong); }
h3 { font-size: 18px; font-weight: 600; }
h4 { font-size: 15px; font-weight: 600; }
h5, .kicker, .lms-eyebrow { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin: 0 0 8px; }
p { margin: 0 0 14px; }
code, kbd { font-family: var(--font-mono); font-size: 13px; background: var(--code-bg); padding: 2px 6px; border-radius: 3px; }
pre { font-family: var(--font-mono); font-size: 13px; background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; overflow-x: auto; }
.lms-wrap { max-width: var(--lms-max); margin: 0 auto; padding: 0 24px; }
.lms-section { padding: 40px 0; }
.lms-section + .lms-section { border-top: 1px solid var(--border); }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Tables (house spec) */
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { background: var(--table-header); font-weight: 600; font-size: 13px; white-space: nowrap; text-align: left; }
th, td { padding: 10px 14px; border: 1px solid var(--border); vertical-align: top; }
tbody tr:nth-child(even) { background: var(--table-stripe); }

/* Badges, notes, cards (house spec) */
.badge { display: inline-block; padding: 3px 9px; border-radius: 3px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; background: var(--accent); color: var(--accent-ink); }
.badge.ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border-strong); }
.note { background: var(--bg-alt); border-left: 3px solid var(--border-strong); border-radius: 0 4px 4px 0; padding: 14px 18px; margin: 0 0 20px; }
.note.primary { border-left-color: var(--accent); }
.callout { background: var(--callout-bg); border-left: 3px solid var(--callout-rule); border-radius: 0 4px 4px 0; padding: 14px 18px; margin: 0 0 20px; }
.card, .f-item { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }

/* --- 3. Header bar (pattern B): "//" wordmark, bottom rule --------------- */
.nav { position: sticky; top: 0; z-index: 100; background: var(--bg); backdrop-filter: none; border-bottom: 1px solid var(--text); padding: 0 24px; }
.nav-inner { max-width: 1400px; height: 64px; gap: 24px; }
.nav-brand { font-family: var(--font-sans); font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: -0.2px; white-space: nowrap; flex-shrink: 0; display: inline-flex; align-items: baseline; gap: 8px; }
.nav-brand:hover { text-decoration: none; color: var(--text); }
.nav-brand span { font-family: var(--font-sans); font-size: 17px; font-weight: 700; color: var(--text); }
.nav-brand span::before { content: "// "; font-family: var(--font-mono); font-weight: 400; color: var(--text-muted); }
.nav-links { gap: 4px; flex-wrap: nowrap; }
.nav-links li { white-space: nowrap; }
.nav-links a { display: inline-block; padding: 6px 10px; border-radius: 3px; color: var(--text-muted); font-size: 14px; font-weight: 500; white-space: nowrap; }
.nav-links a:hover { color: var(--text); background: var(--bg-alt); text-decoration: none; }
.nav-links a.active { color: var(--accent); background: var(--accent-weak); }
.nav-links .nav-ext a { color: var(--text-muted); font-size: 13px; }
.nav-links .nav-ext a:hover { color: var(--text); }
.nav-links .nav-ext-first { margin-left: 4px; padding-left: 14px; border-left: 1px solid var(--border-strong); }
.nav-auth { gap: 10px; flex-shrink: 0; }
.nav-auth .btn, .nav-auth .btn-sm { white-space: nowrap; }
.nav-auth span { font-size: 1rem !important; }
.hamburger { color: var(--text); background: var(--bg); border: 1px solid var(--border-strong); border-radius: 3px; width: 38px; height: 34px; font-size: 1.1rem; line-height: 1; }
.hamburger:hover { border-color: var(--text-muted); }

/* --- 4. Buttons and inputs ---------------------------------------------- */
.btn { font-family: var(--font-sans); font-size: 14px; font-weight: 600; border-radius: 3px; padding: 9px 18px; border: 1px solid var(--border-strong); background: var(--bg); color: var(--text); box-shadow: none; }
.btn:hover { border-color: var(--text-muted); box-shadow: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn-secondary { background: var(--bg); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--text-muted); background: var(--bg-alt); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 13px 26px; font-size: 15px; }
.lms-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 600; font-family: inherit; padding: 11px 20px; border-radius: 3px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); text-decoration: none; cursor: pointer; width: 100%; }
.lms-btn:hover { background: var(--text); border-color: var(--text); color: var(--bg); text-decoration: none; }
.lms-btn.ghost { background: var(--bg); color: var(--text); border-color: var(--border-strong); }
.lms-btn.ghost:hover { background: var(--bg-alt); border-color: var(--text-muted); color: var(--text); }
.lms-btn.auto { width: auto; }
.lms-btn[disabled] { opacity: .5; pointer-events: none; }
.form-input, textarea, select, input[type="text"], input[type="email"], input[type="password"], input[type="search"] { background: var(--bg); border: 1px solid var(--border-strong); border-radius: 3px; color: var(--text); font: inherit; font-size: 15px; box-shadow: none; }
.form-input:hover, textarea:hover, select:hover { border-color: var(--text-muted); }
.form-input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--border-strong); box-shadow: none; }
.form-group label { font-family: var(--font-sans); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }

/* --- 5. Section headings, mastheads, breadcrumbs ------------------------ */
.lms-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; padding-bottom: 8px; border-bottom: 2px solid var(--border-strong); }
.lms-head h2 { font-size: 24px; font-weight: 700; margin: 0; padding: 0; border: 0; }
.lms-head p { margin: 6px 0 0; font-size: 14px; color: var(--text-muted); }
.lms-head .lms-more { font-size: 13px; color: var(--accent); white-space: nowrap; }
.lms-masthead { padding: 40px 0 28px; border-bottom: 1px solid var(--border-strong); }
.lms-masthead h1 { margin: 0 0 10px; }
.lms-masthead p { font-size: 16px; color: var(--text-muted); max-width: 68ch; margin: 0; line-height: 1.6; }
.lms-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.lms-crumbs a { color: var(--text-muted); }
.lms-crumbs a:hover { color: var(--accent); }
.lms-crumbs .sep { opacity: .5; }

/* Home hero: SOP scale, stat counters as a mono <dl> (pattern B) */
.hero { padding: 44px 0 32px; border-bottom: 1px solid var(--border-strong); }
.hero .kicker { margin-bottom: 10px; }
.hero h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.15; margin: 0 0 12px; max-width: 24ch; }
.hero h1 em { font-style: normal; }
.hero .lede { font-size: 17px; color: var(--text-muted); max-width: 68ch; margin: 0 0 22px; line-height: 1.6; }
.hero .hh-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.home-stats { display: flex; flex-wrap: wrap; gap: 8px 36px; margin: 28px 0 0; padding-top: 18px; border-top: 1px solid var(--border); }
.home-stats > div { min-width: 90px; }
.home-stats dt { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.home-stats dd { margin: 2px 0 0; font-family: var(--font-mono); font-size: 22px; font-weight: 600; color: var(--text); }

/* --- 6. Chips, pills, codes --------------------------------------------- */
.course-code { display: inline-block; font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .5px; color: var(--text-muted); background: var(--bg); border: 1px solid var(--border-strong); border-radius: 3px; padding: 2px 7px; white-space: nowrap; }
.course-code.plain { color: var(--text-muted); }
.lms-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; border: 1px solid var(--border-strong); border-radius: 3px; padding: 2px 8px; color: var(--text-muted); white-space: nowrap; }
.lms-pill.solid { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.lms-pill.free { border-color: var(--accent); color: var(--accent); }
.lms-pill.locked { opacity: .7; }
.lms-metarow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.filter-bar .fb-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-right: 4px; min-width: 76px; }
.chip { font-family: inherit; font-size: 13px; font-weight: 500; border: 1px solid var(--border-strong); background: var(--bg); color: var(--text-muted); border-radius: 3px; padding: 6px 12px; cursor: pointer; }
.chip:hover { border-color: var(--text-muted); color: var(--text); }
.chip.on { background: var(--accent-weak); border-color: var(--accent); color: var(--accent); }
.view-toggle { display: flex; margin-left: auto; border: 1px solid var(--border-strong); border-radius: 3px; overflow: hidden; }
.view-toggle button { font-family: inherit; font-size: 13px; font-weight: 500; padding: 6px 14px; border: 0; cursor: pointer; background: var(--bg); color: var(--text-muted); }
.view-toggle button + button { border-left: 1px solid var(--border-strong); }
.view-toggle button:hover { color: var(--text); }
.view-toggle button.on { background: var(--accent); color: var(--accent-ink); }

/* --- 7. Progress, resume card ------------------------------------------- */
.bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .4s ease; }
.bar-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-top: 6px; font-family: var(--font-mono); }
.bar.slim { height: 4px; }
.progress-bar { background: var(--border); border-radius: 3px; }
.progress-fill { background: var(--accent); }
.progress-text { font-family: var(--font-mono); color: var(--text-muted); }
.resume-card { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; background: var(--bg-alt); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 0 4px 4px 0; padding: 18px 22px; }
.resume-card .rc-code { margin-bottom: 8px; }
.resume-card .rc-title { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.resume-card .rc-where { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.resume-card .rc-bar { max-width: 460px; }

/* --- 8. Topics and course cards ----------------------------------------- */
.dept { margin-bottom: 36px; }
.dept-head { display: flex; align-items: baseline; gap: 12px; padding-bottom: 8px; margin-bottom: 16px; border-bottom: 2px solid var(--border-strong); }
.dept-head h3 { font-size: 18px; font-weight: 600; margin: 0; }
.dept-head .dept-count { font-size: 12px; color: var(--text-muted); margin-left: auto; white-space: nowrap; font-family: var(--font-mono); }
.dept-desc { font-size: 14px; color: var(--text-muted); margin: -6px 0 16px; max-width: 74ch; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.course-card { display: flex; flex-direction: column; background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; }
.course-card:hover { border-color: var(--text-muted); text-decoration: none; }
.course-card .cc-thumb { height: 110px; background: var(--bg); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.course-card .cc-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.course-card .cc-thumb .cc-mark { font-family: var(--font-mono); font-size: 18px; font-weight: 600; color: var(--text-muted); letter-spacing: 1px; }
.course-card .cc-body { padding: 16px 18px; display: flex; flex-direction: column; flex: 1; gap: 8px; }
.course-card .cc-title { font-size: 16px; font-weight: 600; color: var(--text); line-height: 1.35; }
.course-card .cc-desc { font-size: 14px; color: var(--text-muted); line-height: 1.55; flex: 1; }
.course-card .cc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.course-card .cc-price { font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: var(--text); }
.course-card .cc-price.free { color: var(--accent); }
.course-card .cc-stat { font-size: 12px; color: var(--text-muted); }
.course-card .cc-prereq { font-size: 12px; color: var(--text-muted); }
.course-card .cc-prereq b { font-weight: 600; color: var(--text); }

/* Catalog table (registrar view) uses the house table spec */
.catalog-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.catalog-table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--text); background: var(--table-header); padding: 10px 14px; border: 1px solid var(--border); white-space: nowrap; text-transform: none; letter-spacing: 0; }
.catalog-table td { padding: 12px 14px; border: 1px solid var(--border); vertical-align: top; }
.catalog-table tbody tr:nth-child(even) td { background: var(--table-stripe); }
.catalog-table tr:hover td { background: var(--code-bg); }
.catalog-table .ct-title { font-weight: 600; color: var(--text); }
.catalog-table .ct-title:hover { color: var(--accent); }
.catalog-table .ct-sub { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.catalog-table .num { text-align: right; white-space: nowrap; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* --- 9. Course page ----------------------------------------------------- */
.syllabus { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; padding: 28px 0 56px; }
.syllabus-main { min-width: 0; }
.syl-number { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 1px; color: var(--text-muted); }
.syl-title { font-size: 32px; font-weight: 700; letter-spacing: -0.5px; margin: 8px 0 12px; }
.syl-lede { font-size: 16px; color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; max-width: 68ch; }
.syl-block { padding: 26px 0; border-top: 1px solid var(--border); }
.syl-block > h3 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin: 0 0 14px; }
.syl-prose { font-size: 15px; line-height: 1.7; color: var(--text); max-width: 74ch; }
.syl-prose p { margin: 0 0 14px; }
.outcomes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.outcomes li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; font-size: 15px; line-height: 1.55; }
.outcomes li svg { width: 14px; height: 14px; margin-top: 4px; color: var(--accent); flex-shrink: 0; }
.oc-num { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); font-weight: 600; margin-top: 3px; }
.outline { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.outline-mod + .outline-mod { border-top: 1px solid var(--border); }
.outline-mod > summary { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; list-style: none; background: var(--bg-alt); font-size: 14px; font-weight: 600; color: var(--text); }
.outline-mod > summary::-webkit-details-marker { display: none; }
.outline-mod > summary .om-num { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); font-weight: 600; }
.outline-mod > summary .om-count { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--text-muted); white-space: nowrap; font-family: var(--font-mono); }
.outline-mod > summary .om-chev { transition: transform .2s; color: var(--text-muted); display: flex; }
.outline-mod[open] > summary .om-chev { transform: rotate(90deg); }
.outline-lesson { display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 44px; font-size: 14px; color: var(--text); border-top: 1px solid var(--border); background: var(--bg); }
.outline-lesson .ol-dur { margin-left: auto; font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }
.outline-lesson .ol-icon { color: var(--text-muted); display: flex; }
.syllabus-rail { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 16px; }
.rail-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-alt); overflow: hidden; outline: 0; }
.rail-card .rc-head { padding: 18px 20px; border-bottom: 1px solid var(--border); }
.rail-card .rc-head .rc-kicker { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 4px; }
.rail-card .rc-price { font-family: var(--font-mono); font-size: 28px; font-weight: 600; color: var(--text); letter-spacing: 0; }
.rail-card .rc-price.free { color: var(--accent); }
.rail-card .rc-note { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.rail-card .rc-body { padding: 18px 20px; }
.facts { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.facts li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.facts li:last-child { border-bottom: 0; }
.facts .f-key { color: var(--text-muted); }
.facts .f-val { color: var(--text); font-weight: 600; text-align: right; }
.facts .f-val a { color: var(--accent); }
.prereq-note { display: flex; gap: 10px; align-items: flex-start; background: var(--callout-bg); border: 0; border-left: 3px solid var(--callout-rule); border-radius: 0 4px 4px 0; padding: 12px 14px; font-size: 13px; color: var(--text); line-height: 1.55; }
.prereq-note svg { width: 14px; height: 14px; color: var(--callout-rule); flex-shrink: 0; margin-top: 3px; }
.prereq-note a { color: var(--accent); font-weight: 600; }
.prereq-note.met { background: var(--bg-alt); border-left-color: var(--ok); }
.prereq-note.met svg { color: var(--ok); }
.coupon-box { display: flex; gap: 6px; }
.coupon-box input { flex: 1; min-width: 0; font-family: var(--font-mono); text-transform: uppercase; font-size: 13px; padding: 8px 10px; }
.coupon-box .btn { white-space: nowrap; }
.coupon-result.success { color: var(--ok); }
.coupon-result.error { color: var(--danger); }

/* --- 10. Learning paths, record, certificates --------------------------- */
.program-list { display: grid; gap: 20px; }
.program { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-alt); overflow: hidden; }
.program-head { padding: 20px 22px; border-bottom: 1px solid var(--border); }
.program-head h3 { font-size: 18px; font-weight: 600; margin: 8px 0 8px; }
.program-head p { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin: 0; max-width: 74ch; }
.program-body { padding: 16px 22px 20px; background: var(--bg); }
.ladder { list-style: none; margin: 0; padding: 0; }
.ladder li { display: grid; grid-template-columns: 26px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; position: relative; }
.ladder li + li { border-top: 1px solid var(--border); }
.ladder .rung { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border-strong); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--text-muted); background: var(--bg); }
.ladder li.done .rung { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ladder .l-title { font-size: 15px; font-weight: 600; color: var(--text); }
.ladder .l-title:hover { color: var(--accent); }
.ladder .l-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.ladder .l-right { font-size: 13px; color: var(--text); text-align: right; white-space: nowrap; font-family: var(--font-mono); }
.summary-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 32px; }
.summary-cell { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; background: var(--bg-alt); }
.summary-cell .sc-val { font-family: var(--font-mono); font-size: 22px; font-weight: 600; color: var(--text); }
.summary-cell .sc-key { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-top: 4px; }
.status-tag { display: inline-block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; border-radius: 3px; padding: 3px 8px; white-space: nowrap; border: 1px solid var(--border-strong); color: var(--text-muted); }
.status-tag.complete { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.status-tag.in_progress { border-color: var(--accent); color: var(--accent); }
.record-table { width: 100%; border-collapse: collapse; }
.record-table th { background: var(--table-header); font-weight: 600; font-size: 13px; text-align: left; padding: 10px 14px; border: 1px solid var(--border); }
.record-table td { padding: 10px 14px; border: 1px solid var(--border); vertical-align: top; font-size: 14px; }
.record-table tbody tr:nth-child(even) td { background: var(--table-stripe); }
.record-table .rt-num { font-family: var(--font-mono); font-size: 12px; white-space: nowrap; }
.record-table .rt-title { font-weight: 600; color: var(--text); }
.record-table .rt-sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.record-table .num { text-align: right; white-space: nowrap; font-family: var(--font-mono); }
.cert-row { display: flex; align-items: baseline; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.cert-row:last-child { border-bottom: 0; }
.cert-row .cr-num { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.cert-row .cr-date { margin-left: auto; font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }
.cert-row a { color: var(--accent); font-size: 13px; }

/* --- 11. Classroom ------------------------------------------------------ */
.course-layout { background: var(--bg); }
.course-sidebar { background: var(--bg-alt); border-right: 1px solid var(--border-strong); }
.course-sidebar h2 { font-size: 16px; font-weight: 600; line-height: 1.4; border: 0; padding: 0 20px; }
.module-title { font-family: var(--font-sans); font-size: 12px; font-weight: 600; letter-spacing: 1px; color: var(--text-muted); }
.lesson-item { font-size: 14px; }
.lesson-item:hover { background: var(--code-bg); }
.lesson-item.active { background: var(--accent-weak); color: var(--accent); border-left: 3px solid var(--accent); }
.lesson-check { border-color: var(--border-strong); }
.lesson-item.completed .lesson-check { border-color: var(--accent); background: var(--accent-weak); color: var(--accent); }
.course-content h1, .lesson-heading h1 { font-size: 28px; letter-spacing: -0.4px; }
.lesson-heading { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.lesson-heading .lh-where { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 8px; }
.lesson-body h2 { font-family: var(--font-sans); color: var(--text); border-bottom: 2px solid var(--border-strong); }
.lesson-body h3 { font-family: var(--font-sans); color: var(--text); }
.lesson-body code { color: var(--text); background: var(--code-bg); border-color: var(--border); }
.lesson-body pre { background: var(--code-bg); border-color: var(--border); border-radius: var(--radius); }
.lesson-body blockquote { background: var(--callout-bg); border-left: 3px solid var(--callout-rule); color: var(--text); }
.lesson-body th { background: var(--table-header); font-family: var(--font-sans); color: var(--text); text-transform: none; letter-spacing: 0; }
.lesson-body a { color: var(--accent); }
.lesson-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); }
.lesson-nav a { display: flex; align-items: center; gap: 8px; max-width: 46%; font-size: 13px; color: var(--text); border: 1px solid var(--border-strong); border-radius: 3px; padding: 10px 14px; }
.lesson-nav a:hover { border-color: var(--text-muted); text-decoration: none; }
.lesson-nav a .ln-dir { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); display: block; }
.lesson-nav a .ln-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.lesson-nav a.next { margin-left: auto; text-align: right; }
.lesson-nav .ln-spacer { flex: 1; }
.notes-textarea { background: var(--bg); border-color: var(--border-strong); border-radius: 3px; }
.notes-status.saved { color: var(--ok); }

/* --- 12. Shared components from style.css, re-specified ----------------- */
.auth-card, .price-box, .purchase-card, .review-card, .outline-module, .stat-card, .badge-card { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: none; }
.auth-card h1 { font-family: var(--font-sans); font-size: 24px; }
.auth-card .subtitle { color: var(--text-muted); }
.alert { border-radius: 0 4px 4px 0; border: 0; border-left: 3px solid var(--border-strong); background: var(--bg-alt); color: var(--text); }
.alert-error { border-left-color: var(--danger); color: var(--danger); }
.alert-success { border-left-color: var(--ok); color: var(--ok); }
.filter-btn { font-family: inherit; border-radius: 3px; }
.toast { background: var(--bg); border: 1px solid var(--text); border-left: 3px solid var(--accent); border-radius: var(--radius); box-shadow: none; }
.toast-icon, .toast-title { color: var(--accent); font-family: var(--font-sans); }
.settings-panel { background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: none; }
.settings-panel h4 { font-family: var(--font-sans); }
.toggle-switch.active { background: var(--accent); }
.spinner { border-color: var(--border-strong); border-top-color: var(--accent); }
.loading-spinner .loading-text { font-family: var(--font-sans); }
.lms-empty { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 40px 24px; text-align: center; background: var(--bg-alt); }
.lms-empty h3 { font-size: 18px; margin: 0 0 8px; }
.lms-empty p { font-size: 14px; color: var(--text-muted); margin: 0 auto 18px; max-width: 46ch; line-height: 1.6; }
.dash-tab, .forum-tab { font-family: inherit; }
.dash-tab.active, .forum-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.legal h1, .legal h2 { font-family: var(--font-sans); }
.profile-avatar { border: 1px solid var(--border-strong); background: var(--bg-alt); }
.badge-card.earned { border-color: var(--accent); }
.product-detail { max-width: none; margin: 0; padding: 32px 0 0; }
.product-detail h1, .course-content h1, .acad-hero h1, .catalog-label, .section-header h2, .hero h1 { font-family: var(--font-sans); }
.footer { border-top: 1px solid var(--text); margin-top: 64px; padding: 32px 24px 40px; color: var(--text-muted); font-size: 13px; text-align: left; }
.footer p { max-width: 1400px; margin: 0 auto; }
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--text); }

/* --- 12b. Composition: the parts that make it feel designed ------------- */
/* grid paper: hairlines in the border colour, no colour, technical-drawing feel */
.grid-paper { background-color: var(--bg); background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 24px 24px; background-position: -1px -1px; }

/* hero: two columns, copy left, "start here" panel right */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 48px; align-items: stretch; padding: 48px 0 40px; border-bottom: 1px solid var(--border-strong); }
.hero { text-align: left; max-width: none; margin: 0; }
.hero-copy { max-width: 60ch; }
.hero .lede { margin-left: 0; margin-right: 0; }
.hero-aside .ha-head { gap: 12px; }
.hero-aside .ha-head .kicker { white-space: nowrap; }
.hero-aside .ha-head .mono { font-size: 11px; text-align: right; }
.program-head .course-code, .dept-head .course-code { justify-self: start; display: inline-block; }
.hero h1 { font-size: clamp(32px, 3.6vw, 44px); letter-spacing: -0.8px; line-height: 1.1; max-width: 16ch; }
.hero .lede { font-size: 17px; }
.hero-aside { border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.hero-aside .ha-head { padding: 14px 18px; border-bottom: 1px solid var(--border-strong); background: var(--bg-alt); display: flex; justify-content: space-between; align-items: baseline; }
.hero-aside .ha-head .kicker { margin: 0; }
.hero-aside .ha-head .mono { font-size: 12px; color: var(--text-muted); }
.hero-aside .ha-body { padding: 18px; flex: 1; }
.hero-aside .ha-course { display: block; padding: 14px 16px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg); color: inherit; }
.hero-aside .ha-course:hover { border-color: var(--text); text-decoration: none; }
.hero-aside .ha-course .hc-code { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px; color: var(--text-muted); }
.hero-aside .ha-course .hc-title { font-size: 17px; font-weight: 700; margin: 4px 0 2px; }
.hero-aside .ha-course .hc-sub { font-size: 13px; color: var(--text-muted); }
.hero-aside .ha-course .hc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 13px; }
.hero-aside .ha-course .hc-foot .free { font-family: var(--font-mono); font-weight: 600; color: var(--accent); }
.hero-aside .ha-list { list-style: none; margin: 14px 0 0; padding: 0; }
.hero-aside .ha-list li { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13px; }
.hero-aside .ha-list li .n { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); min-width: 18px; }
.hero-aside .ha-list li a { color: var(--text); font-weight: 600; }
.hero-aside .ha-list li .m { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* stat strip with dividers */
.home-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 28px 0 0; padding: 0; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; }
.home-stats > div { min-width: 0; padding: 12px 16px; border-right: 1px solid var(--border); background: var(--bg-alt); }
.home-stats > div:last-child { border-right: 0; }
.home-stats dd { font-size: 20px; }

/* section index numbers */
.lms-head .idx { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--text-muted); margin-right: 12px; letter-spacing: 1px; }

/* topics: sidebar-plus-grid */
.dept { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px 40px; padding: 28px 0; margin: 0; border-top: 1px solid var(--border); }
.dept:first-of-type { border-top: 0; padding-top: 8px; }
.dept-side { position: sticky; top: 84px; align-self: start; }
.dept-head { display: block; padding: 0; margin: 0 0 8px; border: 0; }
.dept-head .course-code { margin-bottom: 8px; }
.dept-head h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }
.dept-head .dept-count { display: block; margin: 6px 0 0; }
.dept-desc { margin: 8px 0 0; font-size: 14px; }
.dept .course-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* course cards: monogram tile on grid paper, accent rule on hover */
.course-card { border-top: 2px solid var(--border-strong); background: var(--bg); }
.course-card:hover { border-color: var(--border-strong); border-top-color: var(--accent); }
.course-card .cc-thumb { height: 104px; background-color: var(--bg-alt); background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 20px 20px; }
.course-card .cc-thumb .cc-mark { font-size: 24px; font-weight: 700; color: var(--text); background: var(--bg); padding: 4px 12px; border: 1px solid var(--border-strong); border-radius: 3px; letter-spacing: 1px; }
.course-card .cc-body { gap: 7px; }
.course-card .cc-title { font-size: 17px; }

/* learning paths as a track: rail line through the rungs */
.program { background: var(--bg); }
.program-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: start; }
.program-head .course-code { grid-column: 1; }
.program-head h3 { grid-column: 1; font-size: 20px; letter-spacing: -0.3px; }
.program-head p { grid-column: 1; }
.program-head .prog-stats { grid-column: 2; grid-row: 1 / span 3; display: grid; gap: 6px; text-align: right; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.program-head .prog-stats b { display: block; font-size: 16px; color: var(--text); font-weight: 600; }
.ladder { position: relative; }
.ladder::before { content: ''; position: absolute; left: 12px; top: 20px; bottom: 20px; border-left: 1px solid var(--border-strong); }
.ladder li { position: relative; }
.ladder .rung { position: relative; z-index: 1; }
.ladder li.done + li .rung { border-color: var(--accent); }
.program-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 22px; border-top: 1px solid var(--border); background: var(--bg-alt); font-size: 13px; color: var(--text-muted); }
.program-foot .mono { color: var(--text); }

/* course page rail: what's included */
.included { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--border); display: grid; gap: 8px; font-size: 13px; }
.included li { display: flex; align-items: center; gap: 10px; color: var(--text); }
.included li svg { width: 15px; height: 15px; color: var(--text-muted); flex: none; }

/* richer footer (rendered by app.js on every page) */
.footer-inner { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.4fr) 1fr 1fr; gap: 24px 40px; }
.footer-inner .fw { font-size: 16px; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.footer-inner .fw .sl { font-family: var(--font-mono); font-weight: 400; color: var(--text-muted); }
.footer-inner p { margin: 0 0 8px; max-width: 44ch; }
.footer-inner h5 { margin-bottom: 8px; }
.footer-inner ul { list-style: none; margin: 0; padding: 0; }
.footer-inner li { padding: 3px 0; }
.footer-inner .fine { grid-column: 1 / -1; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 12px; }

/* --- 13. Responsive (collapses to one column at 900px per SOP) ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 24px; }
  .dept { grid-template-columns: 1fr; gap: 16px; }
  .dept-side { position: static; }
  .program-head { grid-template-columns: 1fr; }
  .program-head .prog-stats { grid-column: 1; grid-row: auto; text-align: left; grid-template-columns: repeat(3, auto); justify-content: start; gap: 18px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .home-stats { grid-template-columns: repeat(2, 1fr); }
  .home-stats > div:nth-child(2) { border-right: 0; }
  .home-stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}
@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .nav-links { display: none; }
  .hamburger { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; }
  .nav-inner { gap: 12px; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--text); padding: 12px 24px 16px; gap: 2px; z-index: 99; }
  .nav-links.open li { width: 100%; }
  .nav-links.open a { font-size: 15px; padding: 10px 8px; display: block; }
  .nav-links.open .nav-ext-first { margin-left: 0; padding-left: 8px; border-left: 0; padding-top: 12px; margin-top: 6px; border-top: 1px solid var(--border); }
  .syllabus { grid-template-columns: 1fr; gap: 28px; }
  .syllabus-rail { position: static; }
  .resume-card { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav { padding: 0 14px; }
  .nav-brand, .nav-brand span { font-size: 15px; }
  .nav-brand span { display: inline !important; }
  .nav-auth { gap: 6px; }
  .nav-auth .btn-sm { padding: 6px 10px; font-size: 12px; }
  .nav-auth span { display: none !important; }        /* search / bell / gear icons live in the menu on phones */
  .lms-wrap { padding: 0 16px; }
  .hero { padding: 28px 0 22px; }
  .hero h1 { font-size: 28px; }
  .hero .hh-actions .lms-btn { width: 100%; }
  .home-stats { gap: 8px 22px; }
  .course-grid { grid-template-columns: 1fr; }
  .catalog-table thead, .record-table thead { display: none; }
  .catalog-table tr, .record-table tr { display: block; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 10px; }
  .catalog-table td, .record-table td { display: block; border: 0; padding: 3px 0; }
  .catalog-table .num, .record-table .num { text-align: left; }
  .filter-bar .fb-label { min-width: 0; flex-basis: 100%; }
  .view-toggle { margin-left: 0; }
  .lesson-nav { flex-direction: column; align-items: stretch; }
  .lesson-nav a { max-width: none; }
  .lesson-nav a.next { text-align: left; }
  .footer { padding: 24px 16px 32px; }
  html, body { overflow-x: hidden; }
}
@media (hover: none) and (pointer: coarse) {
  .chip, .lms-btn, .btn, .view-toggle button { min-height: 40px; }
  .footer a, .lms-crumbs a { display: inline-block; padding: 8px 0; }
}
