/* IFHE FacultyGrow stylesheet.
   Warm academic palette: deep teal ink, saffron accent, paper background.
   System fonts only, so nothing extra downloads on slow connections. */

:root {
  --brand: #0f6b7a;
  --brand-deep: #0f3d4a;
  --brand-soft: #e3f1f3;
  --accent: #e36414;
  --accent-soft: #fdeee3;
  --ink: #1b2a30;
  --ink-2: #3e4f56;
  --muted: #66767d;
  --paper: #faf7f2;
  --card: #ffffff;
  --line: #e6e1d8;
  --track: #ece7de;
  --ok: #2f9e66;
  --warn: #b7791f;
  --bad: #c2417a;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 61, 74, 0.06), 0 4px 16px rgba(15, 61, 74, 0.06);
  --shadow-lg: 0 10px 40px rgba(15, 61, 74, 0.18);
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', 'Helvetica Neue', Arial, sans-serif;
  --sidebar: 252px;
  --topbar: 62px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--paper); line-height: 1.5; font-size: 15px; }
h1, h2, h3 { font-family: var(--serif); color: var(--brand-deep); line-height: 1.2; margin: 0 0 0.4em; font-weight: 700; }
h1 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 0.7em; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-deep); }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
blockquote { margin: 0.6rem 0; padding: 0.6rem 0.9rem; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; font-size: 0.93rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--brand-deep); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.block { display: block; }
.warn-text { color: var(--warn); font-weight: 600; }
.icon { width: 18px; height: 18px; flex: none; vertical-align: -3px; }

/* ---------- boot ---------- */
.boot { min-height: 100vh; display: grid; place-content: center; text-align: center; color: var(--muted); gap: 12px; }
.boot-logo { width: 56px; height: 56px; margin: auto; border-radius: 16px; background: conic-gradient(from 200deg, var(--brand), var(--accent), var(--brand)); animation: spin 1.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--brand-deep); font-weight: 600; font-size: 0.92rem; cursor: pointer; text-decoration: none; line-height: 1.2; transition: background 0.15s, border-color 0.15s, transform 0.05s; white-space: nowrap; }
.btn:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-deep); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 11px; font-size: 0.84rem; }
.btn.big { padding: 12px 22px; font-size: 1rem; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.on { color: var(--bad); border-color: var(--bad); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer; position: relative; text-decoration: none; }
.icon-btn:hover { background: var(--brand-soft); color: var(--brand-deep); }
.icon-btn.small { width: 30px; height: 30px; }
.icon-btn[disabled] { opacity: 0.4; }
.link { font-weight: 600; font-size: 0.88rem; text-decoration: none; }
.chip-btn { border: 1px dashed var(--brand); background: var(--brand-soft); color: var(--brand-deep); border-radius: 999px; padding: 5px 11px; font-size: 0.82rem; cursor: pointer; text-align: left; }
.chip-btn:hover { background: #d3e9ed; }

/* ---------- layout ---------- */
.layout { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) 1fr; grid-template-rows: var(--topbar) 1fr; grid-template-areas: 'top top' 'side main'; }
.topbar { grid-area: top; position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 0 18px; background: rgba(250, 247, 242, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.menu-btn { display: none; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brand-deep); min-width: calc(var(--sidebar) - 36px); }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; flex: none; background: radial-gradient(circle at 30% 70%, var(--accent) 0 22%, transparent 23%), radial-gradient(circle at 62% 40%, #ffd8a8 0 14%, transparent 15%), linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.12); }
.brand-mark.big { width: 54px; height: 54px; border-radius: 15px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--serif); font-size: 1.15rem; }
.brand-text small { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; }
.top-search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; color: var(--muted); }
.top-search input { border: 0 !important; outline: 0; box-shadow: none !important; background: transparent; padding: 9px 0; width: 100%; }
.top-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.bell .dot { position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 0.68rem; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.me-chip { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 12px 3px 3px; cursor: pointer; }
.me-chip:hover { border-color: var(--brand); }
.me-text { display: flex; flex-direction: column; text-align: left; line-height: 1.15; }
.me-text strong { font-size: 0.85rem; }
.me-text small { font-size: 0.72rem; color: var(--muted); }

.sidebar { grid-area: side; position: sticky; top: var(--topbar); height: calc(100vh - var(--topbar)); overflow-y: auto; padding: 14px 12px 40px; border-right: 1px solid var(--line); background: var(--paper); }
.nav-group { margin-bottom: 14px; }
.nav-group.role { background: var(--brand-soft); border-radius: var(--radius); padding: 8px 6px; }
.nav-title { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 10px 4px; font-weight: 700; }
.sidebar a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-size: 0.9rem; }
.sidebar a:hover { background: #f0ebe2; color: var(--brand-deep); }
.sidebar a.active { background: var(--brand); color: #fff; }
.sidebar a.active .icon { color: #fff; }
.nav-count { margin-left: auto; background: var(--accent); color: #fff; border-radius: 9px; font-size: 0.7rem; padding: 0 6px; font-weight: 700; }
.nav-callout { background: linear-gradient(135deg, #fff4e8, #fde3cf) !important; border: 1px solid #f5c9a5; margin-bottom: 14px; color: var(--ink) !important; }
.nav-callout span { display: flex; flex-direction: column; line-height: 1.2; }
.nav-callout small { color: var(--muted); }
.scrim { display: none; }
.main { grid-area: main; min-width: 0; padding: 26px clamp(16px, 3vw, 40px) 60px; max-width: 1320px; width: 100%; outline: none; }
.main.public { margin: 0 auto; }
.public-shell { min-height: 100vh; }
.public-head { padding: 14px 24px; border-bottom: 1px solid var(--line); background: #fff; }

/* ---------- page head ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head.hero { background: linear-gradient(120deg, var(--brand-deep), var(--brand)); color: #fff; padding: 26px 28px; border-radius: 20px; position: relative; overflow: hidden; }
.page-head.hero::after { content: ''; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(227, 100, 20, 0.55), transparent 70%); }
.page-head.hero h1, .page-head.hero .lede, .page-head.hero .kicker { color: #fff; position: relative; z-index: 1; }
.page-head.hero .page-actions { position: relative; z-index: 1; }
.page-head > div:first-child { max-width: 760px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kicker { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.74rem; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.lede { color: var(--ink-2); font-size: 1.02rem; margin: 0; }
.crumbs { font-size: 0.84rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a { text-decoration: none; }
.section-title { margin: 26px 0 12px; display: flex; align-items: center; gap: 8px; }

/* ---------- grid ---------- */
.grid { display: grid; gap: 18px; margin-bottom: 18px; }
.grid.tight { gap: 12px; margin-bottom: 8px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.stack-sm { display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; align-items: center; flex-wrap: wrap; }
.row.gap { gap: 10px; }
.row.small-gap { gap: 6px; }
.row.between { justify-content: space-between; gap: 10px; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.card + .card { margin-top: 0; }
section.card { margin-bottom: 18px; }
.stack > section.card, .grid > section.card { margin-bottom: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.05rem; }
.card-head h2 .icon { color: var(--accent); }
.card > h2 { display: flex; align-items: center; gap: 8px; }
.card > h2 .icon { color: var(--accent); }
.empty { text-align: center; padding: 22px 10px; color: var(--muted); }
.empty .icon { width: 30px; height: 30px; color: var(--brand); opacity: 0.6; }
.empty p { margin: 8px 0 12px; }
.callout { background: var(--brand-soft); border-radius: var(--radius-sm); padding: 10px 14px; margin: 10px 0; font-size: 0.92rem; display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.callout.warn { background: #fff4e0; }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius); background: linear-gradient(90deg, #fff4e8, #fde3cf); border: 1px solid #f5c9a5; color: var(--ink); text-decoration: none; margin-bottom: 18px; }
.banner span { flex: 1; }
.banner .icon { color: var(--accent); }
.banner.ok { background: #e6f5ec; border-color: #b9e0c9; }
.banner.ok .icon { color: var(--ok); }

/* ---------- stats ---------- */
.stats-row { align-items: stretch; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.stat-label { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; margin: 0 0 4px; }
.stat-value { font-family: var(--serif); font-size: 1.65rem; color: var(--brand-deep); font-weight: 700; line-height: 1.1; }
.stat-sub { font-size: 0.8rem; color: var(--muted); }
.stat-card { display: flex; align-items: center; gap: 14px; }
.stat-card.col { flex-direction: column; align-items: stretch; gap: 8px; justify-content: center; }
.stat-big { font-family: var(--serif); font-size: 1.9rem; color: var(--brand-deep); font-weight: 700; margin: 0; line-height: 1; }
.stat-big small { font-size: 0.9rem; color: var(--muted); font-family: var(--sans); font-weight: 400; }
.suggest-tag { display: inline-block; font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.06em; background: #fff4e0; color: var(--warn); border: 1px solid #f1d7a6; border-radius: 6px; padding: 0 5px; vertical-align: 2px; font-weight: 700; cursor: help; }
.terms { display: flex; gap: 6px; flex-wrap: wrap; }
.term { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; background: var(--track); color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.term.on { background: var(--accent-soft); color: var(--accent); }
.term.now { outline: 2px solid var(--brand); outline-offset: 1px; }
.badge-row { display: flex; gap: 6px; flex-wrap: wrap; }
.mini-badge { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #ffe2c7, #ffc48f); color: #8a3d00; }

/* ---------- chips and status ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 0.74rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #f1ede6; color: var(--ink-2); white-space: nowrap; line-height: 1.5; }
.chip .icon { width: 13px; height: 13px; }
.chip.mode, .chip.domain, .chip.school { background: color-mix(in srgb, var(--c) 13%, white); color: color-mix(in srgb, var(--c) 80%, black); }
.chip.school { margin-right: 3px; }
.chip.school.all { background: #ebe7df; }
.chip.level { background: #fff; border: 1px solid var(--line); }
.chip.flag { background: #f3eefb; color: #5b3a9a; }
.chip.flag.mandated { background: #fde8ef; color: #9b2453; }
.chip.flag.ftf { background: #fff0e3; color: #a54400; }
.chip.flag.cross { background: #e6f4f1; color: #136050; }
.chip.flag.well { background: #eef6e8; color: #3d6b1e; }
.chip.flag.voice { background: #e9f0ff; color: #2747a8; }
.chip-line { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.status { display: inline-flex; align-items: center; gap: 4px; font-size: 0.76rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.status .icon { width: 14px; height: 14px; }
.status.ok { background: #e3f4ea; color: #1e7a4b; }
.status.done { background: #e6f2f4; color: var(--brand-deep); }
.status.warn { background: #fff1d9; color: #8a5a0b; }
.status.mute { background: #efece6; color: var(--muted); }
.status.info { background: #e9f0ff; color: #2747a8; }
.status.brand { background: var(--accent-soft); color: #a54400; }
.status.big { font-size: 0.95rem; padding: 8px 14px; }
.tag { font-size: 0.75rem; background: #f3efe8; border-radius: 6px; padding: 2px 7px; color: var(--ink-2); }
.tag-line { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.match-pill { font-size: 0.72rem; font-weight: 700; color: var(--ok); background: #e3f4ea; border-radius: 999px; padding: 1px 7px; }

/* ---------- avatars and people ---------- */
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; background: color-mix(in srgb, var(--c) 18%, white); color: color-mix(in srgb, var(--c) 85%, black); font-weight: 700; font-size: 0.8rem; border: 2px solid #fff; box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 30%, white); }
.avatar.sm { width: 28px; height: 28px; font-size: 0.7rem; }
.avatar.lg { width: 48px; height: 48px; font-size: 1rem; }
.avatar.xl { width: 84px; height: 84px; font-size: 1.6rem; }
.person { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.person > span:not(.avatar) { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.person small { color: var(--muted); font-size: 0.78rem; }
.avatar-cloud { display: flex; flex-wrap: wrap; gap: 4px; }

/* ---------- offerings ---------- */
.offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.offer-grid.two { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.offer-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 300px); gap: 16px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x proximity; }
.offer-row > * { scroll-snap-align: start; }
.offer { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 15px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s; min-width: 0; }
.offer:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #cfdcdf; }
.offer.mandated { border-left: 4px solid var(--bad); }
.offer.wellbeing { border-left: 4px solid #6aa84f; }
.offer-link { position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); }
.offer .raise, .comm .raise { position: relative; z-index: 2; align-self: flex-start; }
.offer-top { display: flex; flex-wrap: wrap; gap: 4px; }
.offer h3 { margin: 6px 0 4px; font-size: 1rem; }
.offer-meta { display: flex; gap: 6px; align-items: flex-start; font-size: 0.82rem; color: var(--muted); margin: 0; }
.offer-meta .icon { width: 15px; height: 15px; margin-top: 2px; }
.offer-reason { font-size: 0.8rem; color: var(--accent); margin: 4px 0 0; display: flex; gap: 5px; align-items: flex-start; }
.offer-reason .icon { width: 15px; height: 15px; margin-top: 2px; }
.offer-foot { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.8rem; color: var(--muted); }
.shelf { margin-bottom: 18px; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.shelf-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.shelf-head h2 .icon { color: var(--accent); }

.offer-hero { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 20px; background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--c); border-radius: 20px; padding: 24px; margin-bottom: 18px; box-shadow: var(--shadow); }
.offer-hero h1 { margin-top: 6px; }
.need-hit { background: #e3f4ea; color: #1e7a4b; border-radius: 9px; padding: 8px 12px; display: inline-flex; gap: 6px; align-items: center; }
.cta-line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.offer-facts { background: var(--paper); border-radius: var(--radius); padding: 14px 16px; }
.offer-facts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 9px 12px; font-size: 0.9rem; }
.offer-facts dt { color: var(--muted); display: flex; gap: 6px; align-items: center; font-weight: 600; }
.offer-facts dd { margin: 0; }
.lesson-list { list-style: none; padding: 0; margin: 0; }
.lesson-list li { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.lesson-list li span { flex: 1; }
.lesson-list li.done .icon { color: var(--ok); }
.fac { padding: 6px 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.quotes { list-style: none; padding: 0; margin: 8px 0; }
.quotes li { padding: 8px 12px; background: var(--paper); border-radius: 9px; margin-bottom: 6px; font-size: 0.9rem; font-style: italic; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; min-width: 0; }
.field-label { font-weight: 700; font-size: 0.84rem; color: var(--ink-2); display: block; margin-bottom: 4px; }
.field.big .field-label { font-size: 1rem; font-family: var(--serif); color: var(--brand-deep); }
.hint { font-size: 0.78rem; color: var(--muted); }
input[type=text], input[type=search], input[type=email], input[type=number], input[type=date], input[type=datetime-local], input[type=password], input:not([type]), select, textarea {
  width: 100%; border: 1px solid #d8d2c7; border-radius: var(--radius-sm); padding: 9px 11px; background: #fff; transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea { resize: vertical; }
input[type=file] { font-size: 0.85rem; }
.check-line { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; cursor: pointer; }
.check-line input { width: 17px; height: 17px; accent-color: var(--brand); flex: none; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; border: 0; padding: 0; margin: 0 0 12px; }
.checks-col { justify-content: center; gap: 10px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.inline-form input:not([type=checkbox]):not([type=hidden]) { flex: 1; min-width: 140px; width: auto; }
.code-input { font-size: 1.6rem; letter-spacing: 0.3em; text-transform: uppercase; text-align: center; font-family: ui-monospace, Menlo, Consolas, monospace; }
.demo-hint { margin-top: 12px; font-size: 0.85rem; color: var(--muted); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }
.stars { display: flex; gap: 6px; flex-wrap: wrap; }
.stars label { cursor: pointer; }
.stars input { position: absolute; opacity: 0; }
.stars span { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-weight: 700; color: var(--muted); }
.stars input:checked + span { background: var(--accent); color: #fff; border-color: var(--accent); }
.stars input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.switch { position: relative; display: inline-block; width: 48px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span:first-of-type { position: absolute; inset: 0; background: #d5cfc4; border-radius: 999px; transition: 0.2s; cursor: pointer; }
.switch span:first-of-type::after { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: 0.2s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--accent); }

/* ---------- filters and tabs ---------- */
.filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.filter-search { display: flex; align-items: center; gap: 8px; border: 1px solid #d8d2c7; border-radius: 999px; padding: 0 14px; color: var(--muted); background: #fff; }
.filter-search input { border: 0 !important; box-shadow: none !important; padding: 10px 0; }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filter-row select { width: auto; flex: 1 1 150px; }
.filter-row.toggles { gap: 16px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs.scroll { flex-wrap: nowrap; overflow-x: auto; }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 0.9rem; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--brand-deep); }
.tabs a.active { color: var(--brand-deep); border-bottom-color: var(--c, var(--accent)); }
.count { background: var(--track); border-radius: 9px; padding: 0 7px; font-size: 0.75rem; }
.seg { display: inline-flex; background: #efeae1; border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg a { padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-size: 0.85rem; font-weight: 600; }
.seg a.active { background: #fff; color: var(--brand-deep); box-shadow: var(--shadow); }
.seg.small a { padding: 4px 10px; font-size: 0.8rem; }

/* ---------- tables and lists ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th, .table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; background: #fbf9f5; }
.table tbody tr:hover { background: #fcfaf6; }
.table.compact th, .table.compact td { padding: 6px 8px; }
.table tr.inactive { opacity: 0.55; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list li > div { min-width: 0; flex: 1; }
.list li small { display: block; color: var(--muted); font-size: 0.8rem; }
.list li .meter { flex: 0 0 110px; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 5px 0; }
.plain.checks li { display: flex; gap: 6px; align-items: center; }
.steps-mini { padding-left: 18px; margin: 0; font-size: 0.9rem; }
.steps-mini li { margin-bottom: 6px; }

/* ---------- meter ---------- */
.meter { height: 10px; border-radius: 999px; background: var(--track); overflow: hidden; margin: 6px 0; }
.meter.small { height: 6px; min-width: 70px; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #1e95a6); border-radius: 999px; }

/* ---------- charts ---------- */
.chart { margin: 0; }
.chart svg { width: 100%; height: auto; display: block; }
.chart-label { font-size: 11px; fill: var(--ink-2); font-weight: 600; }
.chart-tick { font-size: 10px; fill: var(--muted); }
.ring { flex: none; }
.ring-value { font-family: var(--serif); font-size: 30px; font-weight: 700; fill: var(--brand-deep); }
.ring-sub { font-size: 11px; fill: var(--muted); }
.radar svg { max-width: 440px; margin: auto; }
.radar .chart-label { font-size: 15px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.78rem; color: var(--muted); margin-top: 6px; justify-content: center; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.hbars { display: flex; flex-direction: column; gap: 7px; }
.hbar { display: grid; grid-template-columns: minmax(80px, 34%) 1fr auto; gap: 10px; align-items: center; font-size: 0.85rem; }
.hbar-label { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { position: relative; height: 12px; background: var(--track); border-radius: 999px; }
.hbar-fill { display: block; height: 100%; border-radius: 999px; }
.hbar-target { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--accent); }
.hbar-value { font-weight: 700; min-width: 2.5em; text-align: right; font-variant-numeric: tabular-nums; }
.hbar-value small { color: var(--muted); font-weight: 400; }
.stacked { display: flex; flex-direction: column; gap: 6px; }
.stacked-row { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
.stacked-row .hbar-label:empty { padding: 0; }
.stacked-track { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--track); }
.stacked-track span { display: block; height: 100%; }
.stacked .legend { justify-content: flex-start; }
.heatmap { display: grid; gap: 3px; font-size: 0.78rem; overflow-x: auto; }
.hm-col { text-align: center; color: var(--muted); font-weight: 700; }
.hm-row { color: var(--ink-2); white-space: nowrap; padding-right: 6px; align-self: center; }
.hm-cell { aspect-ratio: 1.6; display: grid; place-items: center; border-radius: 5px; font-weight: 700; min-height: 26px; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.login-hero { background: linear-gradient(160deg, var(--brand-deep) 0%, #145665 60%, #1d6f7e 100%); color: #e8f2f3; padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; gap: 22px; position: relative; overflow: hidden; }
.login-hero::before { content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%; right: -160px; bottom: -160px; background: radial-gradient(circle, rgba(227, 100, 20, 0.5), transparent 70%); }
.login-brand { display: flex; align-items: center; gap: 16px; position: relative; }
.login-brand h1 { color: #fff; font-size: clamp(2.2rem, 4vw, 3.2rem); margin: 0; }
.login-brand .kicker { color: #ffc89d; }
.login-lede { font-family: var(--serif); font-size: clamp(1.1rem, 1.7vw, 1.35rem); line-height: 1.45; color: #fff; max-width: 34ch; position: relative; }
.login-hero .muted { color: #b9d3d7; position: relative; }
.cycle-strip { display: flex; flex-wrap: wrap; gap: 8px; position: relative; }
.cycle-strip span { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px; padding: 5px 12px 5px 5px; font-size: 0.85rem; display: inline-flex; gap: 7px; align-items: center; }
.cycle-strip b { background: var(--accent); color: #fff; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 0.75rem; }
.school-strip { display: flex; gap: 6px; flex-wrap: wrap; position: relative; }
.school-strip span { border-radius: 8px; padding: 4px 10px; font-weight: 700; font-size: 0.8rem; background: color-mix(in srgb, var(--c) 35%, transparent); color: #fff; border: 1px solid color-mix(in srgb, var(--c) 70%, white); }
.login-panel { padding: clamp(24px, 4vw, 56px); overflow-y: auto; }
.persona-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 18px; }
.persona { display: flex; gap: 12px; align-items: flex-start; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer; box-shadow: var(--shadow); transition: transform 0.12s, border-color 0.12s; }
.persona:hover { border-color: var(--brand); transform: translateY(-2px); }
.persona-text { display: flex; flex-direction: column; gap: 2px; }
.persona-role { font-size: 0.78rem; font-weight: 700; color: var(--accent); }
.persona small { color: var(--muted); font-size: 0.8rem; line-height: 1.35; margin-top: 3px; }
.sso-note { margin-top: 18px; display: flex; gap: 6px; align-items: center; }

/* ---------- home ---------- */
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.hello h1 { margin-bottom: 4px; }
.hello-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cycle { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cycle li { position: relative; }
.cycle li + li::before { content: ''; position: absolute; left: 0; top: 18%; bottom: 18%; width: 1px; background: var(--line); }
.cycle a { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 14px; text-decoration: none; color: var(--ink-2); height: 100%; }
.cycle a:hover { background: var(--paper); }
.cycle-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--track); font-weight: 700; color: var(--muted); font-size: 0.85rem; }
.cycle-num .icon { width: 16px; height: 16px; }
.cycle li.done .cycle-num { background: var(--brand); color: #fff; }
.cycle li.current { background: var(--accent-soft); }
.cycle li.current .cycle-num { background: var(--accent); color: #fff; box-shadow: 0 0 0 4px rgba(227, 100, 20, 0.2); }
.cycle-label { font-weight: 700; color: var(--brand-deep); font-size: 0.9rem; }
.cycle small { font-size: 0.74rem; color: var(--muted); line-height: 1.3; }
.agenda { list-style: none; padding: 0; margin: 0; }
.agenda-item { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.agenda-item:last-child { border-bottom: 0; }
.date-block { flex: none; width: 46px; text-align: center; background: var(--brand-soft); border-radius: 10px; padding: 4px 0; line-height: 1.1; }
.date-block b { display: block; font-family: var(--serif); font-size: 1.25rem; color: var(--brand-deep); }
.date-block small { font-size: 0.7rem; text-transform: uppercase; color: var(--brand); font-weight: 700; }
.agenda-main { flex: 1; min-width: 0; }
.agenda-main a { text-decoration: none; }
.agenda-main small { display: block; color: var(--muted); font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; }
.private-note { font-size: 0.8rem; color: var(--muted); display: flex; gap: 6px; align-items: center; margin: 8px 0 0; }

/* ---------- checklist ---------- */
.checklist { list-style: none; padding: 0; margin: 10px 0 0; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.checklist li div { display: flex; flex-direction: column; }
.checklist li small { color: var(--muted); }
.checklist li.done a { color: var(--muted); text-decoration: line-through; }
.check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--brand); background: #fff; color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.checklist li.done .check { background: var(--brand); }
.check[disabled] { cursor: default; border-style: dashed; }
.checklist li.done .check[disabled] { border-style: solid; }

/* ---------- notifications ---------- */
.notes { list-style: none; margin: 0; padding: 0; }
.notes li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.notes li > div { flex: 1; }
.notes li p { margin: 2px 0; font-size: 0.9rem; color: var(--ink-2); }
.notes li small { color: var(--muted); }
.notes li.unread strong::after { content: ''; display: inline-block; width: 8px; height: 8px; background: var(--accent); border-radius: 50%; margin-left: 6px; vertical-align: 2px; }
.note-icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }

/* ---------- self assessment ---------- */
.assess-form { display: flex; flex-direction: column; gap: 14px; }
.domain-block { border-top: 4px solid var(--c); }
.domain-block legend { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; color: var(--brand-deep); display: flex; align-items: center; gap: 8px; float: left; width: 100%; margin-bottom: 8px; }
.domain-block legend + * { clear: both; }
.dnum { background: var(--c); color: #fff; border-radius: 7px; font-family: var(--sans); font-size: 0.75rem; padding: 2px 7px; }
.descriptors { font-size: 0.85rem; margin-bottom: 8px; color: var(--muted); }
.descriptors dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 8px 0; }
.descriptors dt { font-weight: 700; color: var(--ink-2); }
.descriptors dd { margin: 0; }
.rate-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.rate-row p { margin: 0; }
.rate { display: flex; gap: 4px; flex-wrap: wrap; }
.rate label { cursor: pointer; }
.rate input { position: absolute; opacity: 0; }
.rate span { display: inline-block; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.8rem; font-weight: 600; color: var(--muted); background: #fff; }
.rate input:checked + span { background: var(--c, var(--brand)); color: #fff; border-color: var(--c, var(--brand)); }
.rate input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.gaps li small { line-height: 1.35; }

/* ---------- needs ---------- */
.need-form textarea { font-size: 1.02rem; }
.need-preview { min-height: 6px; margin: -4px 0 10px; }
.need-preview ul li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chips-line { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 16px; }
.mode-picker { margin-bottom: 14px; }
.mode-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mode-card { cursor: pointer; }
.mode-card input { position: absolute; opacity: 0; }
.mode-card > span { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; height: 100%; background: #fff; transition: 0.12s; }
.mode-card .icon { color: var(--c); }
.mode-card strong { font-size: 0.9rem; }
.mode-card small { color: var(--muted); font-size: 0.76rem; }
.mode-card input:checked + span { border-color: var(--c); background: color-mix(in srgb, var(--c) 9%, white); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, white); }
.mode-card input:focus-visible + span { outline: 3px solid var(--accent); }
.needs-table td { font-size: 0.88rem; }
.next-cell .meter { max-width: 120px; }
.match-list { list-style: none; padding: 0; margin: 10px 0; }
.match-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.match-list li small { display: block; color: var(--muted); font-size: 0.8rem; margin: 2px 0 4px; }

/* ---------- plan ---------- */
.goals { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.goal { display: grid; grid-template-columns: auto minmax(0, 1fr) 140px auto; gap: 8px; align-items: center; }
.comment { padding: 10px 0; border-bottom: 1px solid var(--line); }
.comment p { margin: 6px 0 2px; font-size: 0.9rem; }
.comment small { color: var(--muted); }

/* ---------- calendar ---------- */
.cal-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.cal-bar h2 { margin: 0; min-width: 130px; text-align: center; }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.78rem; color: var(--muted); margin-bottom: 8px; }
.cal-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--line); gap: 1px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.cal-head { background: #fbf9f5; padding: 7px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: var(--muted); text-align: center; }
.cal-cell { background: #fff; min-height: 104px; padding: 5px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-cell.empty { background: #faf8f4; }
.cal-cell.weekend { background: #fdfcf9; }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-num { font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.cal-cell.today .cal-num { color: var(--accent); }
.cal-ev { display: block; font-size: 0.7rem; line-height: 1.25; padding: 2px 5px; border-radius: 5px; background: color-mix(in srgb, var(--c) 14%, white); border-left: 3px solid var(--c); color: var(--ink); text-decoration: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-ev.fac { background: var(--accent-soft); border-left-color: var(--accent); font-weight: 700; }
.cal-more { font-size: 0.7rem; color: var(--muted); }

/* ---------- player ---------- */
.player { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start; }
.player-nav { position: sticky; top: calc(var(--topbar) + 16px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.player-nav ol { list-style: none; padding: 0; margin: 10px 0; }
.player-nav li a { display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; align-items: center; padding: 8px; border-radius: 9px; text-decoration: none; color: var(--ink-2); font-size: 0.88rem; }
.player-nav li a:hover { background: var(--paper); }
.player-nav li.current a { background: var(--brand-soft); color: var(--brand-deep); font-weight: 700; }
.player-nav li.done .icon { color: var(--ok); }
.player-nav li small { color: var(--muted); font-size: 0.74rem; }
.player-nav .num { width: 22px; height: 22px; border-radius: 50%; background: var(--track); display: grid; place-items: center; font-size: 0.75rem; font-weight: 700; }
.player-main { padding: 26px clamp(18px, 3vw, 36px); }
.lesson-body { font-size: 1.02rem; line-height: 1.65; max-width: 70ch; }
.lesson-body .table { font-size: 0.92rem; margin: 10px 0; }
.lesson-actions { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.video-ph { aspect-ratio: 16 / 7; border-radius: var(--radius); background: repeating-linear-gradient(135deg, #e7eef0, #e7eef0 12px, #eef3f4 12px, #eef3f4 24px); display: grid; place-content: center; text-align: center; color: var(--brand); margin-bottom: 16px; }
.video-ph .icon { width: 44px; height: 44px; margin: auto; }
.video-ph.small { aspect-ratio: 16 / 5; }
.video-ph p { color: var(--muted); font-size: 0.85rem; margin: 6px 0 0; }
.quiz-q { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 12px; }
.quiz-q legend { font-weight: 700; padding: 0 4px; }
.opt { display: flex; gap: 8px; align-items: center; padding: 6px 4px; cursor: pointer; border-radius: 7px; }
.opt:hover { background: var(--paper); }
.opt input { accent-color: var(--brand); }

/* ---------- my learning and paths ---------- */
.learn-list { display: flex; flex-direction: column; gap: 10px; }
.learn-item { display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.learn-main { flex: 1; min-width: 0; }
.learn-main h3 { margin: 4px 0; }
.learn-main h3 a { text-decoration: none; }
.learn-cta { flex: none; }
.path-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 18px; }
.path { display: flex; flex-direction: column; gap: 6px; }
.path-icon { width: 34px; height: 34px; color: var(--accent); }
.path-steps { list-style: none; padding: 0; margin: 6px 0 0; }
.path-steps li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 0.88rem; }
.path-steps li small { color: var(--muted); font-size: 0.75rem; }
.path-steps li.done .icon { color: var(--ok); }
.path-steps li.active .icon { color: var(--accent); }
.dot-step { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--muted); margin-left: 4px; }

/* ---------- companion ---------- */
.companion { display: flex; flex-direction: column; gap: 12px; padding: 0; overflow: hidden; }
.chat { height: min(56vh, 560px); overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; background: linear-gradient(#fff, #fcfaf6); }
.bubble { max-width: 82%; padding: 11px 15px; border-radius: 16px; font-size: 0.94rem; line-height: 1.5; }
.bubble p:last-child { margin-bottom: 0; }
.bubble.me { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 5px; }
.bubble.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 5px; box-shadow: var(--shadow); }
.bubble.bot .muted { color: var(--muted); }
.bubble.typing { display: flex; gap: 5px; padding: 14px 16px; }
.bubble.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.bubble.typing span:nth-child(2) { animation-delay: 0.2s; }
.bubble.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 50% { opacity: 0.25; } }
.bubble ol.draft { padding-left: 18px; }
.draft-box { background: var(--paper); border-radius: 10px; padding: 10px 14px; margin: 8px 0; }
.suggest-row { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 18px; }
.chat-form { display: flex; gap: 8px; padding: 12px 18px 18px; border-top: 1px solid var(--line); }
.chat-form input { border-radius: 999px; padding: 11px 16px; }

/* ---------- demand pool ---------- */
.cluster-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; margin-bottom: 18px; }
.cluster { display: flex; flex-direction: column; gap: 8px; }
.cluster.ready { border-color: #b9e0c9; box-shadow: 0 0 0 3px #e3f4ea, var(--shadow); }
.cluster-head { display: flex; justify-content: space-between; gap: 12px; }
.cluster-head h3 { margin-top: 6px; }
.cluster-count { text-align: center; flex: none; }
.cluster-count b { display: block; font-family: var(--serif); font-size: 2rem; color: var(--brand-deep); line-height: 1; }
.cluster-count small { color: var(--muted); font-size: 0.75rem; }
.cluster-facts p { margin: 0; }

/* ---------- people ---------- */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 18px; }
.people-grid.compact { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.person-card { display: flex; flex-direction: column; gap: 6px; }
.people-grid.compact .person-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; }
.person-card .row { margin-top: auto; }
.me-card { background: var(--paper); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 12px; }
.role-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }

/* ---------- communities ---------- */
.comm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 18px; }
.comm { position: relative; border-top: 4px solid var(--c); display: flex; flex-direction: column; gap: 4px; }
.post { display: flex; flex-direction: column; gap: 4px; }
.post-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.post-head small { color: var(--muted); }
.post h3 { margin-top: 6px; }
.post-actions { display: flex; gap: 10px; align-items: center; padding-bottom: 6px; }
.resource { background: var(--paper); border-radius: 8px; padding: 6px 10px; font-size: 0.86rem; display: inline-flex; gap: 6px; align-items: center; align-self: flex-start; }
.reply { display: flex; gap: 10px; padding: 8px 0 0 12px; border-left: 2px solid var(--line); margin-left: 6px; }
.reply p { margin: 2px 0; font-size: 0.9rem; }
.reply-form { display: flex; gap: 8px; margin-top: 8px; }

/* ---------- mentoring ---------- */
.pair { display: flex; flex-direction: column; gap: 8px; }
.pair details { background: var(--paper); border-radius: 10px; padding: 8px 12px; }
.pair summary { cursor: pointer; font-weight: 600; }
.log { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--brand-soft); }
.log li { padding: 4px 0 8px 12px; position: relative; }
.log li::before { content: ''; position: absolute; left: -6px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.log li.muted::before { display: none; }
.log p { margin: 2px 0; font-size: 0.9rem; }
.log small { color: var(--muted); }

/* ---------- fridays ---------- */
.library { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.lib-item { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); }
.lib-item:hover { border-color: var(--brand); }
.lib-thumb { width: 56px; height: 56px; border-radius: 12px; background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: #fff; display: grid; place-items: center; flex: none; }
.lib-item span:last-child { display: flex; flex-direction: column; }
.lib-item small { color: var(--muted); }

/* ---------- portfolio and apply ---------- */
.apply-list { display: flex; flex-direction: column; gap: 12px; }
.apply.done { background: #fbfdfb; }
.apply.skipped { opacity: 0.6; }
.apply.focus { box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); border-color: var(--accent); }
.share-card { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; background: linear-gradient(120deg, #fff, var(--brand-soft)); }
.share-card h2 { display: flex; gap: 8px; align-items: center; }
.reflection { margin-top: 12px; }

/* ---------- badges ---------- */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.badge-grid.small { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.badge-tile { text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 10px; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.badge-grid.small .badge-tile small { display: none; }
.badge-medal { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #fff1df, #ffb978 70%, #e36414); color: #6a2b00; box-shadow: 0 3px 0 #c5520e, inset 0 -3px 0 rgba(0, 0, 0, 0.1); margin-bottom: 6px; }
.badge-medal .icon { width: 26px; height: 26px; }
.badge-tile small { color: var(--muted); font-size: 0.75rem; line-height: 1.3; }
.badge-tile.locked { opacity: 0.55; }
.badge-tile.locked .badge-medal { background: #ece7de; color: var(--muted); box-shadow: none; }
.stack-card.complete { border-color: #b9e0c9; }
.cert-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.cert-item { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); }
.cert-item .icon { width: 30px; height: 30px; color: var(--accent); }
.cert-item span { display: flex; flex-direction: column; }
.cert-item small { color: var(--muted); }

/* ---------- certificate ---------- */
.certificate { background: #fff; max-width: 900px; margin: 18px auto; padding: 18px; box-shadow: var(--shadow-lg); border-radius: 6px; }
.cert-border { border: 2px solid var(--brand-deep); outline: 6px solid var(--brand-soft); outline-offset: -12px; padding: 44px 40px; text-align: center; background: radial-gradient(circle at 50% 0, #fffaf3, #fff 60%); }
.cert-head { display: flex; gap: 14px; justify-content: center; align-items: center; text-align: left; margin-bottom: 18px; }
.cert-head p { margin: 0; font-family: var(--serif); color: var(--brand-deep); font-weight: 700; }
.cert-head p.small { font-family: var(--sans); color: var(--muted); font-weight: 400; }
.cert-kicker { text-transform: uppercase; letter-spacing: 0.25em; color: var(--accent); font-weight: 700; font-size: 0.85rem; }
.certificate h1 { font-size: 2.3rem; margin: 6px 0; }
.certificate h2 { font-size: 1.4rem; margin: 6px 0; }
.cert-foot { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 28px; gap: 14px; }
.sig { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 160px; }
.sig span { width: 160px; border-bottom: 1px solid var(--ink-2); height: 30px; }
.sig small { color: var(--muted); }
.cert-note { margin-top: 16px; }
.qr { display: block; }
.qr-box { text-align: center; }
.qr-box .qr { margin: 0 auto; border-radius: 8px; border: 1px solid var(--line); }
.code-big { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.8rem; letter-spacing: 0.25em; font-weight: 700; color: var(--brand-deep); margin: 10px 0 4px; }
.qr-full { text-align: center; }
.qr-full .qr { margin: auto; width: min(360px, 80vw); height: auto; }

/* ---------- verify and public portfolio ---------- */
.verify { max-width: 560px; margin: 40px auto; }
.verify.ok { border-top: 5px solid var(--ok); }
.verify.ok h1 { color: var(--ok); }
.verify.bad { border-top: 5px solid var(--bad); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; }
.portfolio-public { max-width: 1100px; margin: 0 auto; }
.pp-head { display: flex; gap: 20px; align-items: center; margin-bottom: 22px; flex-wrap: wrap; }
.pp-ev { padding: 8px 0; border-bottom: 1px solid var(--line); }
.pp-ev p { margin: 4px 0 0; font-size: 0.9rem; }

/* ---------- labs ---------- */
.lab-steps { margin-bottom: 18px; }
.lab-steps ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.lab-steps li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; }
.lab-steps b { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.lab-note h3 { margin-top: 10px; }
.challenge h2 { margin-top: 6px; }
.challenge-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.ch-school { display: flex; flex-direction: column; gap: 2px; }
.ch-school strong { color: var(--c); }
.ch-school small { color: var(--muted); }
.countdown { background: rgba(255, 255, 255, 0.14); border-radius: 14px; padding: 10px 16px; color: #fff; text-align: center; }
.countdown b { display: block; font-family: var(--serif); font-size: 2rem; line-height: 1; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--accent-soft); }
.timeline li { position: relative; padding: 2px 0 14px 16px; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.timeline small { color: var(--accent); font-weight: 700; }
.timeline p { margin: 2px 0 0; }
.immersion h3 { margin-top: 6px; }

/* ---------- approvals, reports, admin ---------- */
.approval { padding: 14px 0; border-bottom: 1px solid var(--line); }
.approval:last-child { border-bottom: 0; }
.approval h3 { margin-top: 8px; }
.report-card { display: flex; flex-direction: column; gap: 6px; }
.report-card h3 { display: flex; gap: 8px; align-items: center; }
.report-doc { max-width: 900px; margin: 18px auto; padding: 36px clamp(18px, 4vw, 48px); }
.report-doc h2 { margin-top: 22px; }
.ready-val { font-weight: 700; min-width: 3em; text-align: right; }
.integ { display: flex; gap: 14px; align-items: flex-start; }
.integ-icon { width: 30px; height: 30px; color: var(--brand); }
pre.error { white-space: pre-wrap; font-size: 0.8rem; background: #fff3f3; padding: 12px; border-radius: 8px; }

/* ---------- modal and toast ---------- */
#modal-root { display: none; }
#modal-root.open { display: block; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 30, 36, 0.45); z-index: 60; animation: fade 0.15s; }
.modal { position: fixed; z-index: 61; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow-y: auto; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); animation: pop 0.18s ease-out; }
.modal.wide { width: min(780px, calc(100vw - 24px)); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
.modal-head h2 { margin: 0; }
.modal-body { padding: 18px 20px 22px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -46%); } }
.toast-region { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(560px, calc(100vw - 24px)); }
.toast { background: var(--brand-deep); color: #fff; padding: 11px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 0.92rem; animation: pop2 0.2s ease-out; transition: opacity 0.5s, transform 0.5s; }
.toast.ok { background: #1e6e47; }
.toast.err { background: #9b2453; }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes pop2 { from { opacity: 0; transform: translateY(10px); } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .challenge-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; grid-template-areas: 'top' 'main'; }
  .menu-btn { display: inline-grid; }
  .brand { min-width: 0; }
  .sidebar { position: fixed; top: var(--topbar); left: 0; bottom: 0; width: min(300px, 86vw); height: auto; z-index: 40; background: var(--paper); transform: translateX(-102%); transition: transform 0.22s ease; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: var(--topbar) 0 0 0; background: rgba(15, 30, 36, 0.35); z-index: 35; }
  .g-2, .g-2-1, .g-3 { grid-template-columns: 1fr; }
  .offer-hero { grid-template-columns: 1fr; }
  .player { grid-template-columns: 1fr; }
  .player-nav { position: static; }
  .login { grid-template-columns: 1fr; }
  .cycle { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cycle li:nth-child(4)::before { display: none; }
  .lab-steps ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cluster-list { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .top-search { display: none; }
  .me-text { display: none; }
  .me-chip { padding: 3px; }
  .brand-text small { display: none; }
  .main { padding: 18px 14px 50px; }
  .g-4 { grid-template-columns: 1fr 1fr; }
  .mode-cards { grid-template-columns: 1fr 1fr; }
  .cycle { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cycle li::before { display: none; }
  .rate-row { grid-template-columns: 1fr; }
  .goal { grid-template-columns: auto minmax(0, 1fr) auto; }
  .goal select { grid-column: 2 / 3; }
  .cal-cell { min-height: 64px; }
  .cal-ev { font-size: 0; height: 8px; padding: 0; }
  .challenge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hbar { grid-template-columns: minmax(70px, 38%) 1fr auto; }
  .bubble { max-width: 92%; }
  .stat-card { flex-direction: column; align-items: flex-start; }
  .cert-border { padding: 24px 16px; }
  .cert-foot { flex-direction: column; align-items: center; }
  .learn-item { flex-direction: column; align-items: stretch; }
}

/* ---------- print (certificates, reports) ---------- */
@media print {
  .topbar, .sidebar, .no-print, .toast-region, .crumbs, .page-actions .btn { display: none !important; }
  .layout { display: block; }
  .main { padding: 0; max-width: none; }
  body { background: #fff; }
  .card, .certificate { box-shadow: none; }
  .certificate { margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
