/* ─────────────────────────────────────────────────────────────
   XpertiseNow Executive Learning — Component Stylesheet
   Direction: Hybrid Scholarly

   Depends on: tokens.css (must be loaded first)

   Class naming: BEM-ish, namespaced with `xn-` to avoid collision
   with Tailwind / app frameworks Eddie may layer on top.
   ───────────────────────────────────────────────────────────── */

/* ============================================================
   01 · App shell
   ============================================================ */
.xn-page          { min-height: 100vh; background: var(--bg); }
.xn-container     { max-width: var(--content); margin: 0 auto; padding: var(--s-8) var(--s-8) var(--s-10); }
.xn-container--wide   { max-width: var(--content-wide); }
.xn-container--narrow { max-width: var(--content-narrow); }

/* Top navigation bar (Course Home) */
.xn-topnav {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.xn-topnav__inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: var(--s-5) var(--s-8);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.xn-topnav__brand {
  display: flex; align-items: center; gap: var(--s-3);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.005em;
}
.xn-topnav__nav {
  display: flex; gap: var(--s-7); align-items: center;
}
.xn-topnav__link {
  font-size: var(--t-meta);
  color: var(--muted);
  text-decoration: none;
}
.xn-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--t-caption);
  font-weight: 600;
}

/* ============================================================
   02 · Eyebrows, chips, badges
   ============================================================ */
.xn-eyebrow {
  font-size: var(--t-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.xn-eyebrow--muted { color: var(--muted); }

.xn-chip {
  display: inline-block;
  font-size: var(--t-micro);
  padding: 3px 8px;
  border-radius: var(--r-sm);
  background: var(--navy-soft);
  color: var(--navy);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.xn-chip--accent  { background: var(--accent-soft);  color: var(--accent); }
.xn-chip--inverse { background: rgba(255,255,255,0.1); color: #fff; }

/* ============================================================
   03 · Typography utilities
   ============================================================ */
.xn-display-1 { font-family: var(--serif); font-size: var(--t-display-1); line-height: var(--lh-tight); font-weight: 400; letter-spacing: var(--ls-display); margin: 0; }
.xn-display-2 { font-family: var(--serif); font-size: var(--t-display-2); line-height: var(--lh-tight); font-weight: 400; letter-spacing: var(--ls-h); margin: 0; }
.xn-h1        { font-family: var(--serif); font-size: var(--t-h1); line-height: var(--lh-snug); font-weight: 400; margin: 0; }
.xn-h2        { font-family: var(--serif); font-size: var(--t-h2); line-height: var(--lh-snug); font-weight: 400; margin: 0; }
.xn-h3        { font-family: var(--serif); font-size: var(--t-h3); line-height: var(--lh-snug); font-weight: 400; margin: 0; }
.xn-h4        { font-family: var(--serif); font-size: var(--t-h4); font-weight: 400; margin: 0; }
.xn-lead      { font-size: var(--t-lead); color: var(--muted); font-style: italic; line-height: var(--lh-normal); margin: 0 0 var(--s-7); }
.xn-prose-body { font-size: var(--t-body); line-height: var(--lh-loose); color: var(--ink); }
.xn-prose-body p { margin: 0 0 var(--s-5); }
.xn-prose-body em.accent,
.xn-accent-em { color: var(--accent); font-style: italic; }
.xn-meta      { font-size: var(--t-meta); color: var(--muted); }
.xn-caption   { font-size: var(--t-caption); color: var(--muted); }
.xn-mute      { color: var(--muted); }

/* ============================================================
   04 · Buttons
   ============================================================ */
.xn-btn {
  font-family: var(--sans);
  font-size: 12.5px;
  padding: 11px 22px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 120ms ease, color 120ms ease;
}
.xn-btn--primary {
  background: var(--accent);
  color: var(--navy);
  border-color: var(--accent);
  font-weight: 700;
}
.xn-btn--primary:hover { filter: brightness(0.96); }

.xn-btn--secondary {
  background: var(--navy);
  color: #fff;
}
.xn-btn--secondary:hover { background: #1c2c3d; }

.xn-btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}
.xn-btn--ghost:hover { color: var(--ink); border-color: var(--ink-2); }

.xn-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================================
   05 · Cards
   ============================================================ */
.xn-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: var(--s-6);
}
.xn-card--soft   { background: var(--card); border-color: var(--line-soft); }
.xn-card--navy   { background: var(--navy); color: #fff; border: none; padding: var(--s-7) 38px; border-radius: var(--r-2xl); }
.xn-card--hero   { background: var(--navy); color: #fff; border: none; padding: 48px 52px; border-radius: var(--r-3xl); }
.xn-card--accent { background: var(--accent-soft); border-color: var(--accent); border-left: 3px solid var(--accent); }

/* ============================================================
   06 · Progress strip
   ============================================================ */
.xn-progress {
  display: flex; gap: var(--s-3); align-items: center;
}
.xn-progress__bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
  overflow: hidden;
}
.xn-progress__bar--light { background: rgba(255,255,255,0.12); }
.xn-progress__bar--dark  { background: var(--navy-soft); }
.xn-progress__fill {
  height: 100%;
  background: var(--accent);
}

/* ============================================================
   07 · Stats strip (meta row on Course Overview / Home)
   ============================================================ */
.xn-stats {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), 1fr);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.xn-stat {
  padding: var(--s-5) var(--s-6);
  border-right: 1px solid var(--line);
}
.xn-stat:last-child { border-right: none; }
.xn-stat__label {
  font-size: var(--t-micro);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: var(--s-1);
}
.xn-stat__value {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
}
.xn-stat__value--lg { font-size: 26px; }

/* ============================================================
   08 · Pull quote / blockquote
   ============================================================ */
.xn-quote {
  margin: var(--s-2) 0 var(--s-7);
  padding: var(--s-5) var(--s-6);
  border-left: 3px solid var(--accent);
  background: var(--card);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.4;
  font-style: italic;
  color: var(--ink);
}

/* ============================================================
   09 · Inline learning-objective banner
   ============================================================ */
.xn-lo {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  padding: 14px 18px;
  background: var(--card);
  border-radius: var(--r-lg);
  margin-bottom: var(--s-7);
}
.xn-lo__label {
  font-size: var(--t-micro);
  letter-spacing: var(--ls-eyebrow-sm);
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}
.xn-lo__text {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.5;
}

/* ============================================================
   10 · "Note for executives" callout (sand-on-ochre)
   ============================================================ */
.xn-callout {
  background: var(--note-bg);
  border: 1px solid var(--accent);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-lg);
  padding: 14px 18px;
  margin: var(--s-5) 0;
}
.xn-callout__label {
  font-size: var(--t-micro);
  letter-spacing: var(--ls-eyebrow-sm);
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 6px;
}
.xn-callout__body {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink);
}

/* ============================================================
   11 · Breadcrumb
   ============================================================ */
.xn-breadcrumb {
  font-size: var(--t-caption);
  color: var(--muted);
  margin-bottom: var(--s-7);
}
.xn-breadcrumb__sep { margin: 0 var(--s-2); color: var(--faint); }
.xn-breadcrumb__current { color: var(--ink); font-weight: 500; }

/* ============================================================
   12 · Lesson layout (sidebar + reading column)
   ============================================================ */
.xn-lesson {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}
.xn-sidebar {
  width: 280px;
  background: var(--navy);
  color: #fff;
  flex-shrink: 0;
}
.xn-sidebar__header {
  padding: 22px 22px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.xn-sidebar__brand {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.25;
}
.xn-sidebar__progress {
  padding: 14px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.xn-sidebar__progress-meta {
  display: flex; justify-content: space-between;
  font-size: 10.5px; color: rgba(255,255,255,0.5);
  margin-bottom: 6px; letter-spacing: 0.04em;
}
.xn-sidebar__progress-bar {
  height: 3px; background: rgba(255,255,255,0.1);
  border-radius: 2px; display: flex; gap: 1px;
}
.xn-sidebar__seg { flex: 1; border-radius: 1px; }
.xn-sidebar__seg--done    { background: var(--accent); }
.xn-sidebar__seg--current { background: #fff; }
.xn-sidebar__seg--todo    { background: transparent; }

.xn-sidebar__group { padding: var(--s-4) 0 6px; }
.xn-sidebar__group-label {
  font-size: 9px; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  font-weight: 700;
  padding: 0 22px var(--s-3);
}
.xn-sidebar__item {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 7px 22px;
  border-left: 2px solid transparent;
  cursor: pointer;
  font-size: 12.5px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
}
.xn-sidebar__item--done    { color: rgba(255,255,255,0.5); }
.xn-sidebar__item--active  {
  border-left-color: var(--accent);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-weight: 600;
}
.xn-sidebar__item-num {
  font-size: 10.5px;
  font-weight: 700;
  min-width: 22px;
  color: rgba(255,255,255,0.35);
}
.xn-sidebar__item--active .xn-sidebar__item-num { color: var(--accent); }
.xn-sidebar__item-check { font-size: 10px; color: var(--accent); }

.xn-lesson__main {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.xn-lesson__topbar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: var(--s-3) var(--s-7);
  display: flex; justify-content: space-between; align-items: center;
}
.xn-lesson__body {
  max-width: var(--content-narrow);
  width: 100%;
  margin: 0 auto;
  padding: var(--s-9) var(--s-9) var(--s-10);
}

/* ============================================================
   13 · Syllabus units (Course Overview)
   ============================================================ */
.xn-unit {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  margin-bottom: var(--s-4);
  overflow: hidden;
}
.xn-unit__head {
  padding: 18px 26px;
  border-bottom: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; align-items: center;
}
.xn-unit__numeral {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--accent);
  font-weight: 400;
  font-style: italic;
}
.xn-unit__title { font-family: var(--serif); font-size: 20px; font-weight: 400; }
.xn-unit__lo {
  font-size: var(--t-eyebrow);
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 2px;
}
.xn-activity {
  display: grid;
  grid-template-columns: 54px 110px 1fr 100px;
  gap: var(--s-4);
  padding: var(--s-3) 26px;
  border-bottom: 1px solid var(--line-soft);
  align-items: center;
}
.xn-activity:last-child { border-bottom: none; }
.xn-activity--active { background: var(--accent-soft); }
.xn-activity__num   { font-size: var(--t-meta); font-weight: 600; color: var(--muted); }
.xn-activity--active .xn-activity__num { color: var(--accent); }
.xn-activity__title { font-size: var(--t-body-sm); color: var(--ink); }
.xn-activity--active .xn-activity__title { font-weight: 600; }
.xn-activity__state { text-align: right; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.xn-activity__state--done    { color: var(--navy); }
.xn-activity__state--current { color: var(--accent); }

/* ============================================================
   14 · Block frame (used by all six block sample pages)
   The chip color signals block type.
   ============================================================ */
.xn-block {
  max-width: var(--content-narrow);
  margin: 0 auto;
  padding: var(--s-8) var(--s-8) var(--s-10);
}
.xn-block__header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: var(--s-4);
  margin-bottom: var(--s-5);
  border-bottom: 1px solid var(--line);
}
.xn-block__chip {
  display: inline-block;
  font-size: var(--t-micro);
  padding: 4px 10px;
  border-radius: var(--r-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--navy);
}
.xn-block__chip--instruction { background: var(--block-instruction); }
.xn-block__chip--case        { background: var(--block-case); }
.xn-block__chip--discussion  { background: var(--block-discussion); color: var(--navy); }
.xn-block__chip--assessment  { background: var(--block-assessment); color: var(--navy); }
.xn-block__chip--reflection  { background: var(--block-reflection); }
.xn-block__chip--reference   { background: var(--block-reference); }
.xn-block__time {
  font-size: var(--t-caption);
  color: var(--muted);
  font-weight: 500;
}

/* Discussion-block six-element strip */
.xn-disc-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--s-2);
  margin: var(--s-5) 0;
}
.xn-disc-strip__step {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: var(--s-3);
  font-size: 11px;
  color: var(--muted);
}
.xn-disc-strip__step strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
  margin-bottom: 2px;
}

/* Assessment / Production: brief + workspace */
.xn-brief {
  background: var(--card);
  border-left: 3px solid var(--accent);
  padding: var(--s-5);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  margin-bottom: var(--s-5);
}
.xn-brief__label {
  font-size: var(--t-micro);
  letter-spacing: var(--ls-eyebrow-sm);
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: var(--s-2);
}

.xn-workspace {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  min-height: 240px;
}
.xn-workspace textarea {
  width: 100%;
  min-height: 200px;
  border: none;
  outline: none;
  resize: vertical;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: transparent;
}

/* Reference list */
.xn-ref-list { display: flex; flex-direction: column; gap: var(--s-3); }
.xn-ref-item {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: var(--s-4);
  padding: var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
  align-items: center;
}
.xn-ref-item__tag {
  font-size: var(--t-micro);
  letter-spacing: var(--ls-eyebrow-sm);
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}
.xn-ref-item__title { font-weight: 600; color: var(--ink); }
.xn-ref-item__meta  { font-size: var(--t-caption); color: var(--muted); margin-top: 2px; }
