/* ============================================================
   BH Academy — Blue Human design system
   Institutional, sober and editorial: a humanitarian / human-rights training campus.
   · Palette: navy #0A1E33, Blue Human blue, ocean #006C95 (ref. hrci.bluehuman.org)
   · TWK Everett for display (titles, figures, wordmark) · IBM Plex Sans for UI/body
   · White pages, hairline rules, minimal radii, no glows, no decorative motion
   ============================================================ */

@font-face { font-family: "TWK Everett"; src: url("/fonts/TWKEverett-Light.otf") format("opentype"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "TWK Everett"; src: url("/fonts/TWKEverett-Regular.otf") format("opentype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "TWK Everett"; src: url("/fonts/TWKEverett-RegularItalic.otf") format("opentype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "TWK Everett"; src: url("/fonts/TWKEverett-Medium.otf") format("opentype"); font-weight: 500 600; font-style: normal; font-display: swap; }
@font-face { font-family: "TWK Everett"; src: url("/fonts/TWKEverett-MediumItalic.otf") format("opentype"); font-weight: 500 600; font-style: italic; font-display: swap; }
@font-face { font-family: "TWK Everett"; src: url("/fonts/TWKEverett-Bold.otf") format("opentype"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* Blue Human palette */
  --bh-navy: #0A1E33;
  --bh-ink: #15283B;
  --bh-blue: #3E98FF;      /* Blue Human light blue (logo "academy", isotype) */
  --bh-cyan: #00A3E0;
  --bh-ocean: #006C95;
  --bh-sky: #9BDCF5;
  --bh-slate: #5B6874;
  --bh-mist: #8896A3;

  /* Accent scale (kept for inline styles; overridable by tweaks) */
  --primary-50: #EEF5F9;
  --primary-100: #D6E7F0;
  --primary-200: #A9CDE0;
  --primary-300: #6FAAC8;
  --primary-400: #2F86AF;
  --primary-500: #006C95;
  --primary-600: #005A7D;
  --primary-700: #004A67;
  --primary-800: #003A51;
  --primary-900: #0A1E33;

  --emphasis: #A86B00;
  --emphasis-soft: #F7F0E3;
  --contrast: #B3261E;
  --contrast-soft: #F8EAE9;
  --success: #2E6B3F;
  --success-soft: #E8F0EA;

  /* Neutrals */
  --bg: #FFFFFF;
  --bg-elev: #FFFFFF;
  --surface: #F6F7F8;
  --surface-2: #EDEFF2;
  --border: #DDE2E7;
  --border-strong: #C3CBD3;
  --text: #2B3A49;
  --text-strong: var(--bh-navy);
  --text-muted: var(--bh-slate);
  --text-subtle: var(--bh-mist);

  --inverse-bg: var(--bh-navy);
  --inverse-muted: rgba(255,255,255,.72);

  /* Type */
  --font-display: "TWK Everett", "IBM Plex Sans", Arial, sans-serif;
  --font-sans: "IBM Plex Sans", Arial, sans-serif;
  --font-serif: var(--font-display); /* legacy alias: display uses only */
  --font-mono: "IBM Plex Mono", "SF Mono", monospace;

  /* Density */
  --row-h: 44px;
  --card-pad: 24px;
  --input-h: 42px;
  --btn-h: 40px;
  --btn-px: 18px;

  /* Geometry — restrained */
  --r-xs: 2px;
  --r-sm: 3px;
  --r-md: 4px;
  --r-lg: 4px;
  --r-xl: 6px;
  --r-2xl: 6px;
  --r-full: 9999px;

  --shadow-xs: none;
  --shadow-sm: none;
  --shadow-md: 0 1px 2px rgba(10,30,51,.06);
  --shadow-lg: 0 8px 24px rgba(10,30,51,.12);
  --ring: 0 0 0 3px rgba(0,108,149,.22);

  --topbar-h: 58px;
  --content-max: 1240px;
}

[data-density="compact"] {
  --row-h: 36px;
  --card-pad: 16px;
  --input-h: 36px;
  --btn-h: 34px;
  --btn-px: 14px;
}

[data-theme="dark"] {
  --bg: #08182A;
  --bg-elev: #0C2034;
  --surface: #0F253B;
  --surface-2: #142D46;
  --border: rgba(255,255,255,.10);
  --border-strong: rgba(255,255,255,.2);
  --text: #D3DCE5;
  --text-strong: #FFFFFF;
  --text-muted: #9AABBB;
  --text-subtle: #70859A;
  --primary-50: rgba(155,220,245,.08);
  --emphasis-soft: rgba(168,107,0,.18);
  --contrast-soft: rgba(179,38,30,.2);
  --success-soft: rgba(46,107,63,.25);
  --inverse-bg: #06121F;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
::selection { background: rgba(0,108,149,.18); }
:focus-visible { outline: 2px solid var(--bh-ocean); outline-offset: 2px; }

/* ===== Typography =====
   Display (TWK Everett) only for h1–h3, figures and the wordmark. */
.gs-h1, .gs-h2, .gs-h3, .gs-display {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text-strong);
  margin: 0;
  text-wrap: balance;
}
.gs-h1 { font-size: 44px; letter-spacing: -0.025em; line-height: 1.08; }
.gs-h2 { font-size: 32px; letter-spacing: -0.02em; line-height: 1.12; }
.gs-h3 { font-size: 23px; letter-spacing: -0.015em; line-height: 1.2; }
.gs-h4 { font-size: 17px; font-weight: 600; line-height: 1.35; color: var(--text-strong); margin: 0; }
.gs-h5 { font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--text-strong); margin: 0; }
.gs-h6 { font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--text-strong); margin: 0; }
.gs-text { font-size: 15px; color: var(--text); margin: 0; }
.gs-text-sm { font-size: 14px; color: var(--text); margin: 0; }
.gs-text-xs { font-size: 12.5px; color: var(--text); margin: 0; }
.gs-text-lg { font-size: 17px; color: var(--text); margin: 0; line-height: 1.6; }
.gs-text-muted { color: var(--text-muted); }
.gs-text-subtle { color: var(--text-subtle); }
.gs-serif, .gs-display-font { font-family: var(--font-display); letter-spacing: -0.015em; }

/* Section label — plain text, no ornament */
.page-eyebrow, .bh-overline {
  display: block;
  font-size: 13px; font-weight: 600;
  color: var(--bh-ocean);
  margin-bottom: 12px;
}
[data-theme="dark"] .page-eyebrow { color: var(--bh-sky); }
.page-eyebrow svg { display: none; }
.bh-overline--inverse { color: var(--bh-sky); }

/* ===== Button ===== */
.gs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--btn-h);
  padding: 0 var(--btn-px);
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
  user-select: none;
}
.gs-btn[disabled] { opacity: .45; cursor: not-allowed; }

.gs-btn--solid { background: var(--bh-navy); color: #fff; }
.gs-btn--solid:hover:not([disabled]) { background: #1C3550; }
[data-theme="dark"] .gs-btn--solid { background: #fff; color: var(--bh-navy); }
[data-theme="dark"] .gs-btn--solid:hover:not([disabled]) { background: var(--bh-sky); }

.gs-btn--outline, .gs-btn--secondary { background: var(--bg-elev); color: var(--text-strong); border-color: var(--border-strong); }
.gs-btn--outline:hover:not([disabled]), .gs-btn--secondary:hover:not([disabled]) { border-color: var(--text-strong); }
[data-theme="dark"] .gs-btn--outline { background: transparent; }

.gs-btn--ghost { background: transparent; color: var(--text-strong); }
.gs-btn--ghost:hover:not([disabled]) { background: var(--surface); }

.gs-btn--link {
  background: transparent; color: var(--bh-ocean);
  padding: 0; height: auto; font-weight: 500; border-radius: 0;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px;
}
[data-theme="dark"] .gs-btn--link { color: var(--bh-sky); }
.gs-btn--link:hover:not([disabled]) { text-decoration-color: currentColor; }

.gs-btn--neutral { background: var(--text-strong); color: var(--bg-elev); }
.gs-btn--accent { background: var(--bh-ocean); color: #fff; }
.gs-btn--accent:hover:not([disabled]) { background: #005A7D; }
.gs-btn--inverse { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.gs-btn--inverse:hover:not([disabled]) { border-color: #fff; }

.gs-btn--sm { height: 34px; padding: 0 12px; font-size: 13px; }
.gs-btn--lg { height: 48px; padding: 0 24px; font-size: 15px; }
.gs-btn--xl { height: 54px; padding: 0 28px; font-size: 16px; }
.gs-btn--icon { width: var(--btn-h); padding: 0; }
.gs-btn--icon.gs-btn--sm { width: 34px; }
.gs-btn--block { width: 100%; }

/* ===== Inputs ===== */
.gs-input, .gs-input-wrap, .gs-textarea, .gs-select {
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  transition: border-color .15s, box-shadow .15s;
}
.gs-input {
  display: inline-flex; align-items: center; gap: 8px;
  height: var(--input-h); width: 100%; padding: 0 12px;
  font-size: 14px; font-family: inherit;
}
.gs-input::placeholder { color: var(--text-subtle); }
.gs-input:focus, .gs-textarea:focus, .gs-select:focus { outline: none; border-color: var(--bh-ocean); box-shadow: var(--ring); }
.gs-input-wrap {
  position: relative; display: flex; align-items: center;
  height: var(--input-h); padding: 0 12px; gap: 10px;
}
.gs-input-wrap:focus-within { border-color: var(--bh-ocean); box-shadow: var(--ring); }
.gs-input-wrap .gs-input-bare {
  flex: 1; min-width: 0; height: 100%; border: none; outline: none; background: transparent; color: var(--text);
  font-family: inherit; font-size: 14px;
}
.gs-input-wrap .gs-input-bare:focus-visible { outline: none; }
.gs-input-wrap .gs-input-bare::placeholder { color: var(--text-subtle); }
.gs-textarea { width: 100%; min-height: 96px; padding: 12px; resize: vertical; font: 14px/1.6 var(--font-sans); }

/* ===== Label / FormControl ===== */
.gs-formctl { display: flex; flex-direction: column; gap: 6px; }
.gs-label { font-size: 13px; font-weight: 600; color: var(--text-strong); }
.gs-help { font-size: 12px; color: var(--text-muted); }
.gs-error { font-size: 12px; color: var(--contrast); }

/* ===== Card ===== */
.gs-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--card-pad);
}
.gs-card--flush { padding: 0; overflow: hidden; }
/* Plain content sections read as ruled editorial blocks, not boxes.
   Panels that carry their own background/padding/border (or images) stay boxed. */
.gs-card:not(.gs-card--flush):not([style*="background"]):not([style*="padding"]):not([style*="border"]) {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--bh-navy);
  border-radius: 0;
  padding: 18px 0 0;
}
[data-theme="dark"] .gs-card:not(.gs-card--flush):not([style*="background"]):not([style*="padding"]):not([style*="border"]) { border-top-color: rgba(255,255,255,.5); }
.gs-card--hover { transition: border-color .15s; }
.gs-card--hover:hover { border-color: var(--border-strong); }
.gs-card--inverse { background: var(--inverse-bg); border-color: transparent; color: #fff; }
.gs-divider { height: 1px; background: var(--border); border: none; margin: 0; flex-shrink: 0; }
.gs-divider-v { width: 1px; background: var(--border); align-self: stretch; }

/* ===== Avatar ===== */
.gs-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--r-full);
  background: var(--bh-ocean); color: #fff;
  font-size: 13px; font-weight: 600; overflow: hidden;
  flex-shrink: 0;
}
.gs-avatar--xs { width: 24px; height: 24px; font-size: 10px; }
.gs-avatar--sm { width: 30px; height: 30px; font-size: 11px; }
.gs-avatar--md { width: 36px; height: 36px; font-size: 13px; }
.gs-avatar--lg { width: 48px; height: 48px; font-size: 16px; }
.gs-avatar--xl { width: 64px; height: 64px; font-size: 22px; }
.gs-avatar--2xl { width: 96px; height: 96px; font-size: 32px; font-family: var(--font-display); font-weight: 500; }
.gs-avatar img { width: 100%; height: 100%; object-fit: cover; }
.gs-avatar-group { display: inline-flex; }
.gs-avatar-group .gs-avatar { box-shadow: 0 0 0 2px var(--bg-elev); margin-left: -8px; }
.gs-avatar-group .gs-avatar:first-child { margin-left: 0; }

/* ===== Badge — quiet labels ===== */
.gs-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: var(--r-sm);
  font-size: 12px; font-weight: 500; line-height: 1.5;
  background: var(--surface-2); color: var(--text-strong);
  white-space: nowrap;
}
.gs-badge--primary { background: var(--primary-50); color: var(--bh-ocean); }
[data-theme="dark"] .gs-badge--primary { color: var(--bh-sky); }
.gs-badge--emphasis { background: var(--emphasis-soft); color: var(--emphasis); }
.gs-badge--contrast { background: var(--contrast-soft); color: var(--contrast); }
.gs-badge--success { background: var(--success-soft); color: var(--success); }
[data-theme="dark"] .gs-badge--success { color: #8CC79B; }
.gs-badge--outline { background: transparent; box-shadow: inset 0 0 0 1px var(--border-strong); color: var(--text-muted); }
.gs-badge--solid { background: var(--bh-ocean); color: #fff; }
.gs-badge--neutral { background: var(--surface-2); color: var(--text-strong); }
.gs-badge--lg { padding: 3px 10px; }

/* Labels over photography */
.photo .gs-badge { background: #fff; color: var(--bh-navy); }
.photo .gs-badge--success { background: var(--success); color: #fff; }

/* ===== Progress ===== */
.gs-progress {
  width: 100%; height: 4px; background: var(--surface-2);
  border-radius: 2px; overflow: hidden;
}
.gs-progress--lg { height: 6px; }
.gs-progress-fill { height: 100%; background: var(--bh-ocean); border-radius: inherit; transition: width .3s ease; }
[data-theme="dark"] .gs-progress-fill { background: var(--bh-sky); }
.gs-progress-fill--emphasis { background: var(--bh-navy); }
.gs-progress-fill--success { background: var(--success); }

/* ===== Tabs — underline ===== */
.gs-tabs { display: flex; flex-direction: column; }
.gs-tabs-list {
  display: flex; gap: 8px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
}
.gs-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 4px; margin-right: 16px;
  background: transparent; border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--text-muted);
  font-size: 14px; font-weight: 500;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.gs-tab:hover { color: var(--text-strong); }
.gs-tab[data-active="true"] { color: var(--text-strong); border-bottom-color: var(--bh-navy); }
[data-theme="dark"] .gs-tab[data-active="true"] { border-bottom-color: #fff; }
.gs-tab svg { display: none; }
.gs-tab .gs-badge--outline { padding: 0 6px; font-size: 11px; }

/* ===== Accordion — ruled list ===== */
.gs-accordion { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.gs-accordion-item { border-bottom: 1px solid var(--border); }
.gs-accordion-trigger {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 18px 0;
  background: transparent; border: none;
  text-align: left; color: var(--text-strong);
  font-size: 15px; font-weight: 600;
  gap: 12px;
}
.gs-accordion-trigger:hover { color: var(--bh-ocean); }
.gs-accordion-content { padding: 0 0 18px; color: var(--text); }
.gs-accordion-chevron { transition: transform .2s; color: var(--text-muted); flex-shrink: 0; }
.gs-accordion-trigger[aria-expanded="true"] .gs-accordion-chevron { transform: rotate(180deg); }

/* ===== Checkbox ===== */
.gs-checkbox { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.gs-checkbox input { position: absolute; opacity: 0; pointer-events: none; }
.gs-checkbox-box {
  width: 16px; height: 16px; border: 1px solid var(--border-strong);
  border-radius: 2px; background: var(--bg-elev);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; flex-shrink: 0;
}
.gs-checkbox:hover .gs-checkbox-box { border-color: var(--text-strong); }
.gs-checkbox input:checked + .gs-checkbox-box { background: var(--bh-navy); border-color: var(--bh-navy); }
.gs-checkbox input:focus-visible + .gs-checkbox-box { outline: 2px solid var(--bh-ocean); outline-offset: 2px; }
.gs-checkbox-label { font-size: 14px; color: var(--text); }

/* ===== Radio ===== */
.gs-radio { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.gs-radio input { position: absolute; opacity: 0; pointer-events: none; }
.gs-radio-dot {
  width: 16px; height: 16px; border: 1px solid var(--border-strong);
  border-radius: 50%; background: var(--bg-elev);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.gs-radio-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.gs-radio input:checked + .gs-radio-dot { border-color: var(--bh-navy); }
.gs-radio input:checked + .gs-radio-dot::after { background: var(--bh-navy); }

/* ===== Switch ===== */
.gs-switch { position: relative; display: inline-block; width: 36px; height: 20px; }
.gs-switch input { opacity: 0; width: 0; height: 0; }
.gs-switch-track { position: absolute; cursor: pointer; inset: 0; background: var(--border-strong); border-radius: 10px; transition: background .15s; }
.gs-switch-track::before {
  content: ""; position: absolute; height: 16px; width: 16px;
  left: 2px; bottom: 2px; background: #fff; border-radius: 50%; transition: transform .2s;
}
.gs-switch input:checked + .gs-switch-track { background: var(--bh-navy); }
.gs-switch input:checked + .gs-switch-track::before { transform: translateX(16px); }

/* ===== Select ===== */
.gs-select {
  height: var(--input-h);
  padding: 0 34px 0 12px;
  background: var(--bg-elev) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235B6874' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 12px center;
  font: 14px var(--font-sans);
  appearance: none;
}

/* ===== Alert ===== */
.gs-alert {
  display: flex; gap: 12px;
  padding: 14px 16px;
  border-left: 3px solid var(--bh-ocean);
  background: var(--surface);
  color: var(--text-strong);
}
.gs-alert--emphasis { border-left-color: var(--emphasis); }
.gs-alert--contrast { border-left-color: var(--contrast); }

/* ===== Menu ===== */
.gs-menu {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  padding: 6px 0;
  min-width: 220px;
}
.gs-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}
.gs-menu-item:hover { background: var(--surface); color: var(--text-strong); }
.gs-menu-item--danger { color: var(--contrast); }
.gs-menu-sep { height: 1px; background: var(--border); margin: 6px 0; }

/* ============================================================
   Wordmark — reproduces the official Blue Human Academy logo.
   Metrics measured against the original artwork (scale with font-size):
   isotype 0.78em tall (slightly larger than the artwork, by request), 0.2em gap · "blue human" TWK Everett Bold ·
   "academy" TWK Everett Regular in #3E98FF · tracking -0.062em
   ============================================================ */
.bh-logo {
  display: inline-block; white-space: nowrap; line-height: 1;
  color: var(--bh-navy);
}
.bh-logo-mark {
  display: inline-block; height: .78em; width: auto; max-width: none;
  vertical-align: .003em; margin-right: .2em;
}
.bh-logo-word { font-family: var(--font-display); letter-spacing: -.062em; }
.bh-logo-word b { font-weight: 700; }
.bh-logo-word .bh-logo-w2 { margin-left: .19em; }
.bh-logo-word .bh-logo-w3 { margin-left: .17em; font-weight: 400; color: #3E98FF; }
.bh-logo--inverse { color: #fff; }
[data-theme="dark"] .bh-logo { color: #fff; }

/* ============================================================
   App shell — solid navy bar, white content
   ============================================================ */
.app-shell { min-height: 100vh; background: var(--bg); display: flex; flex-direction: column; }
.app-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }

.bh-appbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--inverse-bg);
  color: #fff;
}
.bh-appbar-inner {
  max-width: var(--content-max); margin: 0 auto;
  height: var(--topbar-h);
  padding: 0 32px;
  display: flex; align-items: center; gap: 40px;
}
.bh-brand { display: inline-flex; align-items: center; flex-shrink: 0; font-size: 21px; }

.bh-nav { display: flex; align-items: stretch; align-self: stretch; gap: 28px; flex: 1; min-width: 0; }
.bh-nav-item {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500;
  color: rgba(255,255,255,.72);
  border-bottom: 2px solid transparent;
  border-top: 2px solid transparent;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.bh-nav-item svg { display: none; }
.bh-nav-item:hover { color: #fff; }
.bh-nav-item[data-active="true"] { color: #fff; border-bottom-color: #fff; }
.bh-nav-count { font-size: 12px; font-weight: 500; color: rgba(255,255,255,.55); }
.bh-nav-count::before { content: "("; } .bh-nav-count::after { content: ")"; }

.bh-appbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.bh-search {
  display: flex; align-items: center; gap: 8px;
  height: 36px; width: 240px; padding: 0 10px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: #fff;
}
.bh-search:focus-within { border-color: rgba(255,255,255,.5); }
.bh-search input {
  flex: 1; min-width: 0; height: 100%; border: none; outline: none; background: transparent;
  color: #fff; font: 13px var(--font-sans);
}
.bh-search input:focus-visible { outline: none; }
.bh-search input::placeholder { color: rgba(255,255,255,.5); }
.bh-search kbd { display: none; }
.bh-icon-btn {
  position: relative;
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: var(--r-md);
  background: transparent; border: none; color: rgba(255,255,255,.8);
}
.bh-icon-btn:hover { color: #fff; background: rgba(255,255,255,.06); }
.bh-icon-btn .bh-dot { position: absolute; top: 8px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--bh-sky); }
.bh-user {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none; color: #fff;
  padding: 3px 6px 3px 3px; height: 40px; border-radius: var(--r-md);
}
.bh-user:hover { background: rgba(255,255,255,.06); }
.bh-user .gs-avatar { background: #fff; color: var(--bh-navy); }

/* Breadcrumbs */
.bh-crumbs { border-bottom: 1px solid var(--border); }
.bh-crumbs-inner {
  max-width: var(--content-max); margin: 0 auto;
  padding: 12px 32px;
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-muted); min-width: 0;
}
.bh-crumbs a:hover { color: var(--text-strong); text-decoration: underline; text-underline-offset: 3px; }
.bh-crumbs strong { color: var(--text-strong); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.app-content { padding: 40px 32px 80px; max-width: var(--content-max); width: 100%; margin: 0 auto; }

.bh-footer { background: var(--surface); border-top: 1px solid var(--border); }
.bh-footer-inner {
  max-width: var(--content-max); margin: 0 auto; padding: 28px 32px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-muted);
}

/* ===== Stat tile ===== */
.gs-stat {
  border-top: 1px solid var(--bh-navy);
  padding: 16px 0 0;
  display: flex; flex-direction: column; gap: 4px;
}
[data-theme="dark"] .gs-stat { border-top-color: rgba(255,255,255,.5); }
.gs-stat > .flex > span:last-child { display: none; }
.gs-stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; order: 2; }
.gs-stat-value { font-family: var(--font-display); font-size: 48px; font-weight: 400; color: var(--text-strong); letter-spacing: -0.035em; line-height: 1; font-variant-numeric: tabular-nums; order: 1; margin-bottom: 6px; }
.gs-stat-meta { order: 3; }
.gs-stat-meta { font-size: 13px; color: var(--text-muted); }

/* ===== Photo ===== */
.photo {
  background-color: var(--surface-2);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
.photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,30,51,.45), rgba(10,30,51,0) 45%);
  pointer-events: none;
}
.photo--plain::after { display: none; }

/* ===== Editorial page intro (replaces hero bands) ===== */
.bh-intro {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; align-items: end;
  padding-bottom: 36px; margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.bh-intro--single { grid-template-columns: minmax(0, 1fr); }
.bh-intro-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(34px, 4vw, 52px); line-height: 1.06; letter-spacing: -0.03em;
  color: var(--text-strong); margin: 0 0 16px; text-wrap: balance;
}
.bh-intro-lead { font-size: 17px; line-height: 1.6; color: var(--text-muted); max-width: 620px; margin: 0; }
.bh-intro-figure {
  aspect-ratio: 4 / 3; border-radius: var(--r-md);
  background-size: cover; background-position: center;
  background-color: var(--surface-2);
}
.bh-intro-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }

/* Full-bleed navy band variant (HRCI): breaks out of the content column */
.bh-intro--band {
  position: relative;
  margin: -40px calc(50% - 50vw) 48px;
  padding: 64px max(32px, calc(50vw - var(--content-max) / 2 + 32px)) 64px;
  background: var(--bh-navy);
  border-bottom: 0;
  align-items: center;
  color: #fff;
}
.bh-intro--band .bh-overline { color: var(--bh-sky); }
.bh-intro--band .bh-intro-title { color: #fff; }
.bh-intro--band .bh-intro-lead { color: rgba(255,255,255,.75); }
.bh-intro--band .gs-input-wrap { border-color: transparent; }
.bh-intro--band .gs-input-wrap .gs-input-bare { color: var(--bh-navy); }
.bh-intro--band .gs-input-wrap { background: #fff; }
.bh-intro--band .bh-intro-figure { border-radius: var(--r-xs); }

/* ===== Utilities ===== */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-1 { flex: 1; min-width: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.items-baseline { align-items: baseline; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.wrap { flex-wrap: wrap; }
.grow { flex-grow: 1; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; } .mt-5 { margin-top: 20px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }

/* ===== Page header ===== */
.page-header { margin-bottom: 40px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }

/* ===== Grids ===== */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }

/* ===== Course card — editorial ===== */
.course-card {
  display: flex; flex-direction: column;
  cursor: pointer;
}
.course-card .photo { aspect-ratio: 3/2; border-radius: var(--r-xs); transition: opacity .2s; }
.course-card:hover .photo { opacity: .92; }
.course-card-body { padding: 18px 0 0; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.course-card-kicker {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  font-size: 13px; font-weight: 600; color: var(--bh-ocean);
}
[data-theme="dark"] .course-card-kicker { color: var(--bh-sky); }
.course-card-status { font-weight: 500; color: var(--text-muted); }
.course-card-title {
  font-family: var(--font-display); font-size: 22px; font-weight: 500;
  letter-spacing: -0.018em; line-height: 1.2; color: var(--text-strong);
  text-wrap: balance;
}
.course-card:hover .course-card-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.course-card-summary {
  margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--text-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.course-card-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted);
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border);
}
.course-card-author { font-size: 13px; color: var(--text-strong); }
.grid-3 > .course-card, .grid-4 > .course-card { margin-bottom: 16px; }

/* ===== Lesson list row ===== */
.lesson-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
}
.lesson-row:hover { background: var(--surface); }
.lesson-row[data-locked="true"] { cursor: not-allowed; opacity: .6; }
.lesson-row[data-locked="true"]:hover { background: transparent; }
.lesson-row[data-active="true"], .lesson-row[data-state="current"] { background: var(--primary-50); }
.lesson-row-num {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600;
  background: var(--surface-2); color: var(--text-muted); flex-shrink: 0;
}
.lesson-row[data-state="done"] .lesson-row-num { background: var(--bh-navy); color: #fff; }
.lesson-row[data-state="current"] .lesson-row-num { background: var(--bh-ocean); color: #fff; }
.lesson-row-title { font-size: 14px; font-weight: 500; color: var(--text); }
.lesson-row-meta { font-size: 12px; color: var(--text-muted); }

.gs-kbd {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 1px 6px; border-radius: var(--r-xs);
  border: 1px solid var(--border);
  font: 11px var(--font-sans); color: var(--text-muted);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border: 3px solid var(--bg); border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

/* Horizontal dividers inside a row (e.g. "o con email") take the free space */
.flex.items-center > .gs-divider { flex: 1; width: auto; }

/* ===== Responsive ===== */
@media (max-width: 1180px) {
  .bh-search { display: none; }
}
@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .bh-appbar-inner { padding: 0 16px; gap: 20px; }
  .bh-nav { overflow-x: auto; scrollbar-width: none; gap: 20px; }
  .app-content { padding: 28px 16px 56px; }
  .bh-crumbs-inner, .bh-footer-inner { padding-left: 16px; padding-right: 16px; }
  .bh-intro { grid-template-columns: minmax(0,1fr); gap: 24px; }
  .gs-h1 { font-size: 34px; }
  .app-content [style*="grid-template-columns"]:not([style*="repeat("]) { grid-template-columns: minmax(0,1fr) !important; }
  .app-content [style*="position: sticky"] { position: static !important; }
  .app-content .photo:not([style*="aspect-ratio"]) { min-height: 200px; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0,1fr); }
  .bh-brand { font-size: 18px; }
  .bh-logo-word .bh-logo-w3 { display: none; }
}

.app-shell { overflow-x: clip; }
@media (max-width: 980px) { .bh-intro--band { margin-top: -28px; padding: 40px 16px; } }
.bh-intro--single { border-bottom: 0; padding-bottom: 8px; margin-bottom: 32px; }

/* ============================================================
   Landing hero — app-bar navy, sized to its content, people
   illustration full width along the bottom (nothing over it).
   Background motion: slow concentric rings in the navy area only.
   ============================================================ */
.bh-landing {
  position: relative;
  margin: -40px calc(50% - 50vw) 56px;
  background: var(--inverse-bg); color: #fff;
  /* Never taller than the visible screen below the app bar */
  display: flex; flex-direction: column;
  max-height: calc(100vh - var(--topbar-h));
  max-height: calc(100svh - var(--topbar-h));
}
.bh-landing-top { position: relative; isolation: isolate; overflow: hidden; flex: 0 0 auto; }
.bh-landing-inner {
  position: relative; z-index: 1;
  width: 100%; max-width: var(--content-max); margin: 0 auto;
  padding: 64px 32px 44px;
}
.bh-landing-copy { max-width: 640px; }
.bh-landing-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.bh-landing-btn-primary { background: #fff; color: var(--bh-navy); }
.bh-landing-btn-primary:hover { background: var(--bh-sky); }
.bh-landing-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(32px, 3.4vw, 46px); line-height: 1.08; letter-spacing: -0.028em;
  margin: 0 0 18px; color: #fff; text-wrap: balance;
}
.bh-landing-title em { font-style: italic; color: var(--bh-blue); }
.bh-landing-lead { font-size: 16.5px; line-height: 1.6; color: rgba(255,255,255,.75); max-width: 560px; margin: 0; }

/* Rings — very slow, low contrast, confined to the navy area */
.bh-landing-rings { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.bh-ring {
  fill: none; stroke: rgba(255,255,255,.07); stroke-width: 1;
  transform-box: view-box; transform-origin: 760px 980px;
  animation: bh-orbit 140s linear infinite;
}
.bh-ring--1 { stroke: rgba(62,152,255,.16); animation-duration: 200s; animation-direction: reverse; }
.bh-ring--2 { stroke: rgba(255,255,255,.05); animation-duration: 260s; }
@keyframes bh-orbit { to { transform: rotate(360deg); } }


/* Illustration — full width, flush to the bottom edge, no overlays */
/* Shrinks (cropping the lower edge) when the screen is short, so the hero fits */
.bh-landing-people-wrap { flex: 0 1 auto; min-height: 96px; overflow: hidden; }
.bh-landing-people { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center top; }

@media (prefers-reduced-motion: reduce) { .bh-ring { animation: none; } }
@media (max-width: 980px) {
  .bh-landing { margin-top: -28px; }
  .bh-landing-inner { padding: 44px 16px 32px; }
}
@media (max-width: 640px) {
  .bh-landing-actions .gs-btn { flex: 1 1 100%; }
}

/* ===== Mi espacio (page-dashboard.jsx) ===== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ps-strong { color: var(--text-strong); font-weight: 600; }
.ps-panel { margin-top: 28px; }
.ps-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.ps-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ps-loading { display: flex; align-items: center; color: var(--text-muted); font-size: 14px; padding: 24px 0; }
.ps-alert { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 20px; border-left: 3px solid var(--emphasis); background: var(--surface); font-size: 14px; color: var(--text); }
.ps-note { font-size: 14px; max-width: 720px; }

.ps-continue { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 210px; }
.ps-continue .photo { display: grid; place-items: center; }
.ps-play { position: relative; z-index: 1; width: 60px; height: 60px; border-radius: 50%; border: none; background: var(--bh-navy); color: #fff; display: grid; place-items: center; }
.ps-play:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.ps-continue-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; }

.ps-rows { display: flex; flex-direction: column; }
.ps-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--border); }
.ps-row:first-child { border-top: none; padding-top: 0; }
.ps-row:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.ps-thumb { width: 56px; height: 56px; flex-shrink: 0; border-radius: var(--r-md); background: var(--surface-2) center/cover no-repeat; }
.ps-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ps-row-body strong { font-size: 14px; color: var(--text-strong); font-weight: 600; }
.ps-row-meta { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-row-progress { display: flex; align-items: center; gap: 10px; }
.ps-row-progress .gs-progress { flex: 1; }
.ps-row-progress b { font-size: 12px; font-weight: 600; color: var(--text-strong); min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.ps-row-progress--lg { margin: 6px 0 2px; max-width: 520px; }
.ps-row-chev { color: var(--text-subtle); flex-shrink: 0; }

.ps-mini { display: flex; align-items: flex-start; gap: 12px; padding: 2px 0; }
.ps-mini-icon { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; background: var(--primary-50); color: var(--bh-ocean); display: grid; place-items: center; }
[data-theme="dark"] .ps-mini-icon { color: var(--bh-sky); }
.ps-mini-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--text-muted); }
.ps-mini-body strong { font-size: 14px; font-weight: 600; color: var(--text-strong); }
.ps-mini:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.ps-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text); }

.ps-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; margin-bottom: 32px; }
.ps-empty-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--primary-50); color: var(--bh-ocean); display: grid; place-items: center; }
.ps-empty .gs-btn { margin-top: 8px; }
.ps-section { margin-top: 40px; }

.ps-filter { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 20px; border: 1px solid var(--border); border-radius: var(--r-full); background: var(--bg-elev); }
.ps-filter button { border: none; background: transparent; padding: 6px 14px; border-radius: var(--r-full); font-size: 13px; color: var(--text-muted); }
.ps-filter button[data-active="true"] { background: var(--bh-navy); color: #fff; }
[data-theme="dark"] .ps-filter button[data-active="true"] { background: #fff; color: var(--bh-navy); }

.ps-course-top { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: 24px; padding: 20px; align-items: start; }
.ps-course-photo { aspect-ratio: 4 / 3; border-radius: var(--r-md); background: var(--surface-2) center/cover no-repeat; }
.ps-course-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ps-course-actions { display: flex; flex-direction: column; gap: 8px; }
.ps-units { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.ps-units li { display: flex; align-items: center; gap: 10px; padding: 12px 20px; font-size: 13px; border-bottom: 1px solid var(--border); margin-bottom: -1px; }
.ps-unit-n { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--text-muted); }
.ps-units li[data-done="true"] .ps-unit-n { background: var(--bh-ocean); color: #fff; }
.ps-unit-title { flex: 1; min-width: 0; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-unit-count { color: var(--text-muted); font-variant-numeric: tabular-nums; }

.ps-grades-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px; border-bottom: 1px solid var(--border); }
.ps-grade-kpis { display: flex; gap: 28px; }
.ps-grade-kpis div { display: flex; flex-direction: column; gap: 2px; }
.ps-grade-kpis span { font-size: 12px; color: var(--text-muted); }
.ps-grade-kpis b { font-family: var(--font-display); font-size: 22px; font-weight: 500; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.ps-grade { display: grid; grid-template-columns: minmax(0, 2.4fr) 110px 80px 130px 110px; gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--border); font-size: 14px; }
.ps-grade:last-child { border-bottom: none; }
.ps-grade--head { font-size: 12px; font-weight: 600; color: var(--text-muted); background: var(--surface); padding-top: 10px; padding-bottom: 10px; }
.ps-grade[data-final="true"] { background: var(--primary-50); }
.ps-grade-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ps-grade-name strong { color: var(--text-strong); font-weight: 600; }
.ps-grade-name span { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-grade-score { display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.ps-grade-score b { color: var(--text-strong); font-weight: 600; }
.ps-grade-score span, .ps-dim { font-size: 12px; color: var(--text-muted); }
.ps-grade-tries { font-variant-numeric: tabular-nums; color: var(--text-muted); }
.ps-grade-action { text-align: right; }

.ps-notes-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.ps-search { width: 320px; max-width: 100%; }
.ps-notebook-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.ps-notebook-head .ps-thumb { width: 44px; height: 44px; }
.ps-notebook-body { padding: 20px 24px; }
.ps-doc { position: relative; max-height: 280px; overflow: hidden; font-size: 15px; line-height: 1.7; color: var(--text); overflow-wrap: anywhere; }
.ps-doc::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 72px; background: linear-gradient(to bottom, transparent, var(--bg-elev)); pointer-events: none; }
.ps-doc[data-expanded="true"] { max-height: none; }
.ps-doc[data-expanded="true"]::after { display: none; }
.ps-doc > :first-child { margin-top: 0; }
.ps-doc p { margin: 0 0 10px; }
.ps-doc h2, .ps-doc h3, .ps-doc h4, .ps-doc h5 { font-family: var(--font-display); font-weight: 500; color: var(--text-strong); margin: 18px 0 8px; line-height: 1.25; }
.ps-doc h2 { font-size: 21px; } .ps-doc h3 { font-size: 18px; } .ps-doc h4, .ps-doc h5 { font-size: 16px; }
.ps-doc ul, .ps-doc ol { margin: 0 0 10px; padding-left: 22px; }
.ps-doc blockquote { margin: 0 0 12px; padding: 4px 0 4px 14px; border-left: 3px solid var(--bh-ocean); color: var(--text-muted); }
.ps-doc pre { margin: 0 0 12px; padding: 12px 14px; background: var(--surface); border-radius: var(--r-md); overflow-x: auto; font-size: 13px; }
.ps-doc code { font-family: var(--font-mono); font-size: .9em; }
.ps-doc hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.ps-doc a { color: var(--bh-ocean); text-decoration: underline; }
[data-theme="dark"] .ps-doc a { color: var(--bh-sky); }
.ps-doc mark { background: var(--h, var(--emphasis-soft)); color: inherit; padding: 0 1px; }
[data-theme="dark"] .ps-doc mark { background: color-mix(in srgb, var(--h, #f7f0e3) 22%, transparent); }
.ps-color { color: var(--c); }
[data-theme="dark"] .ps-color { color: inherit; } /* the light palette is unreadable on navy */
.ps-cited { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border); font-size: 12px; }
.ps-cited > span { font-weight: 600; color: var(--text-muted); margin-right: 4px; }
.ps-cited a { padding: 2px 8px; border-radius: var(--r-sm); background: var(--primary-50); color: var(--bh-ocean); }
[data-theme="dark"] .ps-cited a { color: var(--bh-sky); }
.ps-cited a:hover { text-decoration: underline; }
.ps-inline-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.ps-doc .ps-tasks { list-style: none; padding-left: 0; }
.ps-tasks li { display: flex; gap: 10px; align-items: flex-start; }
.ps-tasks li > div > p { margin-bottom: 4px; }
.ps-task-box { width: 16px; height: 16px; margin-top: 5px; flex-shrink: 0; border: 1px solid var(--border-strong); border-radius: 2px; display: grid; place-items: center; }
.ps-tasks li[data-checked="true"] .ps-task-box { background: var(--bh-navy); border-color: var(--bh-navy); color: #fff; }
.ps-tasks li[data-checked="true"] > div { color: var(--text-muted); text-decoration: line-through; }
.ps-table { overflow-x: auto; margin: 0 0 12px; }
.ps-table table { border-collapse: collapse; font-size: 14px; }
.ps-table th, .ps-table td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; vertical-align: top; }
.ps-table th { background: var(--surface); }
.ps-table p { margin: 0; }
.ps-more { margin-top: 10px; border: none; background: none; padding: 0; font-size: 14px; font-weight: 500; color: var(--bh-ocean); }
[data-theme="dark"] .ps-more { color: var(--bh-sky); }

/* ===== Perfil y certificados (page-personal.jsx) ===== */
.pf-head { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding-bottom: 32px; margin-bottom: 8px; }
.pf-head-body { flex: 1; min-width: 240px; }
.pf-head .bh-overline { margin-bottom: 6px; }
.pf-name { font-family: var(--font-display); font-weight: 500; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.08; letter-spacing: -0.025em; color: var(--text-strong); margin: 0 0 6px; }
.pf-figure { display: flex; flex-direction: column; gap: 4px; }
.pf-figure b { font-family: var(--font-display); font-size: 30px; font-weight: 500; color: var(--text-strong); font-variant-numeric: tabular-nums; line-height: 1.1; }
.pf-figure span { font-size: 13px; color: var(--text-muted); }
.pf-info { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.pf-info dt { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.pf-info dd { margin: 2px 0 0; font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.pf-form { display: flex; flex-direction: column; gap: 18px; max-width: 640px; }
.pf-cert { position: relative; aspect-ratio: 1.6; padding: 32px 28px; background: var(--inverse-bg); color: #fff; }
.pf-cert-title { font-family: var(--font-display); font-size: 22px; font-weight: 500; line-height: 1.2; margin: 10px 0 14px; }
.pf-cert-foot { position: absolute; bottom: 20px; left: 28px; right: 28px; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; font-size: 10px; color: rgba(255,255,255,.7); }
.pf-cert-pending { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; min-height: 280px; border-style: dashed; }
@media (max-width: 640px) {
  .pf-cert { aspect-ratio: auto; min-height: 260px; padding-bottom: 72px; }
}

/* ===== Notebook tools (notebook-tools.jsx) ===== */
.ps-notes-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ps-notebook-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ps-notebook-foot { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 10px; }
.ps-notebook-foot .ps-more { margin-top: 0; }
.nb-export { position: relative; display: inline-block; }
.nb-export-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 120; min-width: 260px; display: flex; flex-direction: column; }
.nb-export-item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 9px 16px; border: none; background: none; text-align: left; color: var(--text); }
.nb-export-item strong { font-size: 14px; font-weight: 600; color: var(--text-strong); }
.nb-export-item span { font-size: 12px; color: var(--text-muted); }
.nb-export-item:hover, .nb-export-item:focus-visible { background: var(--surface); outline: none; }

.nb-dialog { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; background: var(--bg); }
.nb-dialog-bar { display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 10px 24px; background: var(--inverse-bg); color: #fff; flex-wrap: wrap; }
.nb-dialog-back { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px 0 6px; border: 1px solid rgba(255,255,255,.3); border-radius: var(--r-md); background: transparent; color: #fff; font-size: 14px; font-weight: 500; }
.nb-dialog-back:hover { border-color: #fff; }
.nb-dialog-back:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.nb-dialog-title { flex: 1; min-width: 0; }
.nb-dialog-title h2 { margin: 0; font-size: 16px; font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-dialog-title span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: rgba(255,255,255,.7); }
.nb-dialog-actions { display: flex; align-items: center; gap: 8px; }
.nb-dialog-actions .gs-btn--outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.nb-dialog-actions .gs-btn--outline:hover:not([disabled]) { border-color: #fff; }
.nb-dialog-frame { flex: 1; width: 100%; border: 0; background: var(--bg); }
@media (max-width: 640px) {
  .nb-dialog-bar { padding: 10px 16px; gap: 10px; }
  .nb-dialog-back span, .nb-hide-sm { display: none; }
  .nb-dialog-title { order: 3; flex-basis: 100%; }
  .nb-dialog-actions { margin-left: auto; }
  .nb-export-menu { right: auto; left: 0; }
  .nb-dialog-actions .nb-export-menu { left: auto; right: 0; }
}

/* ===== Course badge (e.g. /images/BHIDDHH-480.webp) ===== */
.course-badge { display: block; object-fit: contain; pointer-events: none; }
.course-badge--card { position: absolute; left: 12px; bottom: 12px; z-index: 1; width: 64px; height: 64px; filter: drop-shadow(0 2px 6px rgba(10,30,51,.35)); }
.course-badge--hero { float: right; width: 120px; height: 120px; margin: 0 0 12px 24px; }
.ps-course-photo { position: relative; }
.ps-thumb--badge { object-fit: contain; background: transparent; border-radius: 0; }
.pf-cert-badge { position: absolute; top: 24px; right: 24px; width: 96px; height: 96px; object-fit: contain; }
.pf-badge-locked { width: 88px; height: 88px; object-fit: contain; filter: grayscale(1); opacity: .45; }
@media (max-width: 640px) {
  .course-badge--hero { width: 84px; height: 84px; margin-left: 16px; }
  .pf-cert-badge { width: 64px; height: 64px; top: 20px; right: 20px; }
}

.ps-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 20px; font-size: 14px; font-weight: 500; color: var(--bh-ocean); }
[data-theme="dark"] .ps-back { color: var(--bh-sky); }
.ps-back:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 980px) {
  .ps-cols { grid-template-columns: minmax(0, 1fr); }
  .ps-course-top { grid-template-columns: 120px minmax(0, 1fr); }
  .ps-course-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .ps-grade { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .ps-grade--head { display: none; }
  .ps-grade-name { grid-column: 1 / -1; }
  .ps-grade-tries::before { content: "Intentos "; }
  .ps-grade-tries, .ps-grade-action { text-align: right; }
}
@media (max-width: 640px) {
  .ps-continue { grid-template-columns: minmax(0, 1fr); }
  .ps-continue .photo { min-height: 160px; }
  .ps-course-top { grid-template-columns: minmax(0, 1fr); }
  .ps-course-photo { display: none; }
  .ps-grade-kpis { gap: 20px; }
}

/* Certificate request (completed course, certificate not issued yet) */
.pf-cert-request { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-height: 280px; }
.pf-cert-request-badge { width: 88px; height: 88px; object-fit: contain; margin-bottom: 4px; }
.pf-cert-request a { color: var(--bh-ocean); font-weight: 500; }
