﻿/* VidyaShift design system, applied to Faculty AI Readiness.
   Source: VidyaShift Brand Guidelines v2.2 (September 2026). Ramps sampled from the guideline swatches.
   Governing instruction: keep most pages light - white or #F2F2F2, Navy structure, one Green outcome,
   a single Purple mark of emphasis. Full-bleed Navy only on covers and section dividers. */

:root {
  color-scheme: light;

  /* Brand ramps - the 700 step is the official brand hex */
  --navy-050: #f0f4f9; --navy-100: #dfe7f1; --navy-200: #b6c6dc; --navy-300: #7c97be;
  --navy-500: #325c99; --navy-600: #22457a; --navy-700: #18335e; --navy-800: #122647; --navy-900: #0c1b33;
  --green-100: #e4f2e9; --green-200: #c6e5d0; --green-300: #9bcfac; --green-500: #5fae77;
  --green-600: #48925f; --green-700: #36754a; --green-800: #265336; --green-900: #1c3e27;
  --purple-100: #f5e6f2; --purple-200: #e4bedd; --purple-300: #cb86bf; --purple-500: #a82d95;
  --purple-600: #8b1478; --purple-700: #6d0a5d; --purple-800: #560848; --purple-900: #400636;
  --grey: #f2f2f2; --black: #222222; --disabled-bg: #e6e6e6; --disabled-ink: #8a8a8a; --row-hover: #f9f9f9;

  /* Roles */
  --page: #ffffff; --surface: #ffffff; --surface-2: var(--grey); --surface-3: var(--navy-050);
  --ink: var(--black); --ink-2: #4a5462; --muted: #667080;
  --hairline: #e3e8ef; --structure: var(--navy-700); --accent: var(--navy-700); --accent-ink: #ffffff;
  --emphasis: var(--purple-700); --outcome: var(--green-700);
  --bar: var(--navy-600); --track: var(--navy-050);

  /* Status - Success/Info/Attention are brand; Warning/Critical are documented additions */
  --success-fg: #265336; --success-bg: #e4f2e9;
  --info-fg: #18335e; --info-bg: #dfe7f1;
  --attention-fg: #560848; --attention-bg: #f5e6f2;
  --warning-fg: #7a4a00; --warning-bg: #fbf0dc;
  --critical-fg: #8a1420; --critical-bg: #fbe7e7;

  /* Spacing ladder (4px), radii (small on purpose), motion */
  --s4: 4px; --s8: 8px; --s12: 12px; --s16: 16px; --s24: 24px; --s32: 32px; --s48: 48px; --s64: 64px; --s96: 96px;
  --r2: 2px; --r4: 4px; --r8: 8px; --r12: 12px; --r-pill: 999px;
  --t-state: 140ms; --t-enter: 220ms; --t-chain: 420ms; --ease: cubic-bezier(.2, .6, .2, 1);
  --shadow-lift: 0 1px 2px rgba(24, 51, 94, .08), 0 8px 24px rgba(24, 51, 94, .10);

  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-deva: "Noto Sans Devanagari", "Nirmala UI", "Mangal", sans-serif;
  --max: 1200px; --gutter: var(--s32);
}

/* Dark mode is not defined by the guidelines - documented ADDITION, built from the Navy ramp so the
   brand's structure survives: Navy-900 page, Navy-800 surfaces, solid white body text (never faded). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: var(--navy-900); --surface: var(--navy-800); --surface-2: #162d52; --surface-3: #162d52;
    --ink: #ffffff; --ink-2: #c8d3e4; --muted: #9fb0c8;
    --hairline: rgba(255, 255, 255, .16); --structure: #ffffff;
    --accent: #ffffff; --accent-ink: var(--navy-900);
    --emphasis: var(--purple-300); --outcome: var(--green-300);
    --bar: var(--navy-300); --track: rgba(255, 255, 255, .12);
    --success-fg: #c6e5d0; --success-bg: #1c3e27;
    --info-fg: #dfe7f1; --info-bg: #162d52;
    --attention-fg: #e4bedd; --attention-bg: #400636;
    --warning-fg: #fbf0dc; --warning-bg: #4a2c00;
    --critical-fg: #fbe7e7; --critical-bg: #5a0d15;
    --disabled-bg: #223b63; --disabled-ink: #8798b3; --row-hover: #162d52;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: var(--navy-900); --surface: var(--navy-800); --surface-2: #162d52; --surface-3: #162d52;
  --ink: #ffffff; --ink-2: #c8d3e4; --muted: #9fb0c8;
  --hairline: rgba(255, 255, 255, .16); --structure: #ffffff;
  --accent: #ffffff; --accent-ink: var(--navy-900);
  --emphasis: var(--purple-300); --outcome: var(--green-300);
  --bar: var(--navy-300); --track: rgba(255, 255, 255, .12);
  --success-fg: #c6e5d0; --success-bg: #1c3e27;
  --info-fg: #dfe7f1; --info-bg: #162d52;
  --attention-fg: #e4bedd; --attention-bg: #400636;
  --warning-fg: #fbf0dc; --warning-bg: #4a2c00;
  --critical-fg: #fbe7e7; --critical-bg: #5a0d15;
  --disabled-bg: #223b63; --disabled-ink: #8798b3; --row-hover: #162d52;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Fluid base: 15px on a small phone up to 17px on a large screen, on the 4px ladder's terms */
body { margin: 0; background: var(--page); color: var(--ink); font: 400 clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem)/1.55 var(--font);
  padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
body:lang(hi) { font-family: var(--font-deva); }
body.large-text { font-size: 19px; }
img { max-width: 100%; }
[hidden] { display: none !important; }

a { color: var(--structure); text-underline-offset: 3px; transition: color var(--t-state) var(--ease); }
a:hover { color: var(--emphasis); }                      /* Navy → Royal Purple is the brand link affordance */
h1, h2, h3 { line-height: 1.18; letter-spacing: -0.01em; margin: 0 0 var(--s12); }
h1 { font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2rem); font-weight: 700; margin-top: var(--s8); }
h2 { font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.25rem); font-weight: 600; margin-top: var(--s32); }
.card h2, .card h3 { margin-top: 0; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 var(--s12); }
:focus-visible { outline: 2px solid var(--emphasis); outline-offset: 2px; }
h1:focus { outline: none; }
::selection { background: var(--navy-100); color: var(--navy-900); }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--s16); }
@media (min-width: 900px) { .wrap { padding-inline: var(--gutter); } }
.skip { position: absolute; left: -9999px; top: 0; background: var(--navy-700); color: #fff; padding: var(--s8) var(--s12); z-index: 10; }
.skip:focus { left: var(--s8); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.lead { font-size: 1.0625rem; color: var(--ink-2); max-width: 68ch; }
.card p, .stage-card p { max-width: 68ch; }
.error { color: var(--critical-fg); font-weight: 600; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.75rem; font-weight: 700; color: var(--outcome); margin: 0 0 var(--s4); }

/* Icons: stroke only, 2px, inherit the colour role of their context */
.ico { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico-24 { width: 24px; height: 24px; }
.ico-16 { width: 16px; height: 16px; stroke-width: 2.25; }

/* Header - white ground, Navy structure */
.site-header { background: var(--surface); border-bottom: 1px solid var(--hairline); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s12); padding-block: var(--s12); flex-wrap: wrap; }
.brand { display: flex; align-items: baseline; gap: var(--s8); text-decoration: none; flex-wrap: wrap; }
.wordmark { font-weight: 800; font-size: 1.125rem; letter-spacing: -0.02em; color: var(--structure); font-family: var(--font); }
.wordmark .shift { color: var(--outcome); }
.product-name { font-weight: 500; font-size: 0.95rem; color: var(--ink-2); border-left: 1px solid var(--hairline); padding-left: var(--s8); }
.lang-toggle { display: inline-flex; border: 1px solid var(--navy-200); border-radius: var(--r-pill); overflow: hidden; }
.lang-toggle button { font: 500 0.875rem var(--font); border: 0; background: transparent; color: var(--ink-2); padding: var(--s8) var(--s16); cursor: pointer; min-height: 40px; transition: background var(--t-state) var(--ease); }
.lang-toggle button:hover { background: var(--navy-050); }
.lang-toggle button[aria-pressed="true"] { background: var(--navy-700); color: #fff; }
  :root[data-theme="dark"] .lang-toggle button[aria-pressed="true"] { background: #fff; color: var(--navy-900); }
.nav { display: flex; flex-wrap: wrap; gap: var(--s4); padding-block: 0 var(--s8); }
.nav a { white-space: nowrap; text-decoration: none; color: var(--ink-2); padding: var(--s8) var(--s12); border-radius: var(--r4); font-size: 0.9375rem; font-weight: 500; transition: background var(--t-state) var(--ease), color var(--t-state) var(--ease); }
.nav a:hover { background: var(--navy-050); color: var(--structure); }
.nav a[aria-current="page"] { background: var(--navy-700); color: #fff; }
  :root[data-theme="dark"] .nav a:hover { background: var(--surface-2); }
  :root[data-theme="dark"] .nav a[aria-current="page"] { background: #fff; color: var(--navy-900); }
.banner { margin-top: var(--s16); }
main { padding-block: var(--s24) var(--s64); }
.site-footer { padding-block: var(--s32); border-top: 1px solid var(--hairline); display: flex; flex-wrap: wrap; gap: var(--s8) var(--s24); justify-content: space-between; }

/* Cards: 1px hairline, 8px corners, 24px padding. A role is signalled by a 4px TOP bar, never a left border. */
.card { position: relative; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r8); padding: var(--s24); margin-bottom: var(--s16); }
.card-role::before { content: ""; position: absolute; inset: -1px -1px auto -1px; height: 4px; border-radius: var(--r8) var(--r8) 0 0; }
.card-navy::before { background: var(--navy-700); }
.card-green::before { background: var(--green-700); }
.card-purple::before { background: var(--purple-700); }
.card-role { padding-top: calc(var(--s24) + 4px); }
.empty { text-align: center; padding: var(--s48) var(--s24); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 var(--s24); }
.actions, .toolbar { display: flex; flex-wrap: wrap; gap: var(--s12); align-items: center; margin: var(--s16) 0; }

/* Controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s8); font: 600 1rem var(--font); min-height: 44px;
  padding: var(--s8) var(--s24); border-radius: var(--r4); border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background var(--t-state) var(--ease), color var(--t-state) var(--ease), transform var(--t-state) var(--ease), border-color var(--t-state) var(--ease); }
.btn:lang(hi) { font-family: var(--font-deva); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--navy-800); color: #fff; }
.btn-primary:active { background: var(--navy-900); transform: scale(0.985); }
  :root[data-theme="dark"] .btn-primary:hover { background: var(--navy-050); color: var(--navy-900); }
.btn-secondary { background: var(--surface); color: var(--structure); border-color: var(--navy-200); }
.btn-secondary:hover { background: var(--navy-050); }
.btn-secondary:active { background: var(--navy-100); transform: scale(0.985); }
  :root[data-theme="dark"] .btn-secondary { border-color: rgba(255,255,255,.3); color: #fff; }
  :root[data-theme="dark"] .btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--structure); }
.btn-ghost:hover { background: var(--navy-050); color: var(--emphasis); }
  :root[data-theme="dark"] .btn-ghost { color: #fff; }
  :root[data-theme="dark"] .btn-ghost:hover { background: var(--surface-2); color: #fff; }
.btn-danger { background: var(--critical-fg); color: #fff; }
.btn-danger:hover { background: #6d1019; }
.btn-small { min-height: 36px; padding: var(--s4) var(--s12); font-size: 0.875rem; }
.btn:disabled { background: var(--disabled-bg); color: var(--disabled-ink); border-color: transparent; cursor: not-allowed; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.badge { display: inline-flex; align-items: center; gap: var(--s4); font-size: 0.75rem; font-weight: 600; padding: var(--s4) var(--s12); border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); }
.badge-safety { background: var(--attention-bg); color: var(--attention-fg); }
.badge-warn { background: var(--warning-bg); color: var(--warning-fg); }
.chip { display: inline-flex; align-items: center; font-size: 0.75rem; font-weight: 600; padding: 2px var(--s8); border-radius: var(--r-pill); background: var(--navy-050); color: var(--navy-700); }
  :root[data-theme="dark"] .chip { background: var(--surface-2); color: #fff; }

/* Cover: full-bleed Navy is permitted on covers and section dividers only */
.cover { background: var(--navy-700); color: #fff; border-radius: var(--r12); padding: var(--s48) var(--s32); margin-bottom: var(--s32); position: relative; overflow: hidden; }
.cover h1 { color: #fff; font-size: clamp(1.75rem, 4vw, 2.5rem); max-width: 22ch; }
.cover .lead { color: rgba(255, 255, 255, .88); }
.cover .rule { width: 56px; height: 4px; background: var(--green-500); border-radius: var(--r2); margin: var(--s16) 0; }
.cover .btn-primary { background: #fff; color: var(--navy-900); }
.cover .btn-primary:hover { background: var(--navy-050); }
.cover .btn-secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.cover .btn-secondary:hover { background: rgba(255, 255, 255, .1); }
.cover .eyebrow { color: var(--green-300); }

.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s12); counter-reset: s; }
.steps li { counter-increment: s; margin: 0; }
.steps li h3::before { content: counter(s, decimal-leading-zero); color: var(--outcome); font-weight: 700; margin-right: var(--s8); }
.steps p { margin: 0; color: var(--ink-2); font-size: 0.9375rem; }
.checks { padding-left: 0; list-style: none; margin: 0; }
.checks li { display: flex; gap: var(--s8); align-items: flex-start; margin: var(--s8) 0; }
.checks .ico { color: var(--outcome); margin-top: 3px; }
.dim-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--s12); }
.dim-card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r8); padding: var(--s16); }
.dim-card .code { font-size: 0.75rem; color: var(--muted); display: block; font-weight: 500; }
.dim-card strong { display: block; margin-top: 2px; }
.dim-card p { margin: var(--s4) 0 0; font-size: 0.875rem; color: var(--ink-2); }

/* Forms */
.form fieldset { border: 1px solid var(--hairline); border-radius: var(--r8); margin: var(--s16) 0; padding: var(--s12) var(--s16); }
.form legend { font-weight: 600; padding: 0 var(--s4); }
.field { display: flex; flex-direction: column; gap: var(--s4); margin: var(--s12) 0; }
.field label { font-weight: 500; font-size: 0.9375rem; }
input, select, textarea { font: 400 1rem var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--navy-200); border-radius: var(--r4); padding: 10px 12px; min-height: 44px; width: 100%; transition: border-color var(--t-state) var(--ease); }
input:lang(hi), textarea:lang(hi), select:lang(hi) { font-family: var(--font-deva); }
:root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea,
input:hover, select:hover, textarea:hover { border-color: var(--navy-300); }
textarea { resize: vertical; line-height: 1.55; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; flex: none; margin: 2px 0 0; accent-color: var(--navy-700); }
.check { display: flex; gap: var(--s12); align-items: flex-start; margin: var(--s8) 0; }
.inline-field { display: inline-flex; align-items: center; gap: var(--s8); font-weight: 500; }
.inline-field input, .inline-field select { width: auto; }

/* Assessment */
.progress { height: 4px; background: var(--track); border-radius: var(--r-pill); overflow: hidden; margin: var(--s8) 0; }
.progress span { display: block; height: 100%; background: var(--bar); transition: width var(--t-enter) var(--ease); }
.counter { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s8); color: var(--ink-2); font-size: 0.9375rem; }
.stem { font-size: 1.0625rem; font-weight: 600; margin-top: 0; }
.options { border: 0; padding: 0; margin: 0; }
.option { display: flex; gap: var(--s12); align-items: flex-start; padding: var(--s12) var(--s16); border: 1px solid var(--hairline); border-radius: var(--r4); margin: var(--s8) 0; cursor: pointer;
  transition: background var(--t-state) var(--ease), border-color var(--t-state) var(--ease); }
.option:hover { background: var(--row-hover); border-color: var(--navy-200); }
.option:has(input:checked) { border-color: var(--navy-700); background: var(--navy-050); }
  :root[data-theme="dark"] .option:has(input:checked) { background: var(--surface-2); border-color: #fff; }
.exhibit { margin: 0 0 var(--s16); border: 1px solid var(--hairline); border-radius: var(--r8); padding: var(--s16); background: var(--surface-2); }
.exhibit figcaption { font-size: 0.75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em; }
.exhibit pre { white-space: pre-wrap; font: 400 0.9375rem/1.55 var(--font); margin: var(--s8) 0 0; }
.nav-buttons { display: flex; justify-content: space-between; gap: var(--s12); align-items: center; margin-top: var(--s24); }

/* Bars: Navy ramp for magnitude, a single Purple mark for the threshold */
.bars { display: flex; flex-direction: column; gap: var(--s12); }
.bar-row { display: grid; grid-template-columns: minmax(120px, 34%) 1fr 3.5em; gap: var(--s12); align-items: center; }
.bar-label { font-size: 0.875rem; color: var(--ink-2); }
.bar-track { position: relative; height: 16px; background: var(--track); border-radius: 0 var(--r4) var(--r4) 0; }
.bar-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--bar); border-radius: 0 var(--r4) var(--r4) 0; transition: width var(--t-enter) var(--ease); }
.threshold { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--emphasis); }
.bar-value { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; font-size: 0.875rem; }
@media (max-width: 560px) { .bar-row { grid-template-columns: 1fr 3em; } .bar-label { grid-column: 1 / -1; } }

/* Status blocks: tinted ground + 4px top bar, always icon + label */
.status { display: flex; gap: var(--s12); align-items: flex-start; margin: 0 0 var(--s8); padding: var(--s12) var(--s16); border-radius: var(--r4); position: relative; overflow: hidden; background: var(--surface-2); color: var(--ink); }
.status::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--navy-700); }
.status .ico { margin-top: 2px; }
.status-good { background: var(--success-bg); color: var(--success-fg); }
.status-good::before { background: var(--green-700); }
.status-warn { background: var(--warning-bg); color: var(--warning-fg); }
.status-warn::before { background: #c07c10; }
.status-info, .notice { background: var(--info-bg); color: var(--info-fg); }
.status-info::before { background: var(--navy-700); }
.status-neutral { background: var(--surface-2); color: var(--ink-2); }
.notice { display: flex; gap: var(--s12); align-items: flex-start; padding: var(--s12) var(--s16); border-radius: var(--r4); position: relative; overflow: hidden; margin: 0 0 var(--s12); }
.notice::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--navy-700); }
.status ul { margin: var(--s4) 0 0; padding-left: 1.1em; }
.status-row { display: grid; gap: var(--s8); margin-bottom: var(--s24); }

/* Passport */
.passport-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s24); align-items: flex-end; margin-bottom: var(--s16); }
.passport-head h1 { margin: 2px 0 var(--s4); }
.hero-figure { display: flex; align-items: center; gap: var(--s12); }
.hero-num { font-size: 3.5rem; font-weight: 700; line-height: 1; letter-spacing: -0.02em; color: var(--structure); }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: var(--s8) 0; border-top: 1px solid var(--hairline); }
ul.plain li:first-child { border-top: 0; padding-top: 0; }
.plan { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s12); }
.plan > div { background: var(--surface-2); border-radius: var(--r8); padding: var(--s16); }
.plan ul { margin: 0; padding-left: 1.2em; }
details.card summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: var(--s12); }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.875rem; }
th, td { text-align: left; padding: var(--s8) var(--s12); border-bottom: 1px solid var(--hairline); font-variant-numeric: tabular-nums; }
th { color: var(--ink-2); font-weight: 600; }
tbody tr:hover { background: var(--row-hover); }
td.below { font-weight: 700; color: var(--warning-fg); }
.tick { color: var(--outcome); }
.cross { color: var(--critical-fg); }
.answers li { padding: var(--s8) 0; display: flex; gap: var(--s8); align-items: flex-start; }
.answers .opt-correct { color: var(--success-fg); font-weight: 600; }
.answers .opt-chosen { color: var(--critical-fg); }

/* Stat tiles and Bloom bands */
.stats, .bands { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s12); margin-bottom: var(--s16); }
.stat, .bands > div { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r8); padding: var(--s16); display: flex; flex-direction: column; gap: 2px; }
.bands > div { background: var(--surface-2); border-color: transparent; }
.stat-label { font-size: 0.8125rem; color: var(--ink-2); font-weight: 500; }
.stat-value { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.01em; }
.bands .small-value { font-size: 1rem; }
.point { border-left: 0; padding: var(--s12) var(--s16); margin-top: var(--s16); background: var(--attention-bg); color: var(--attention-fg); border-radius: var(--r4); position: relative; overflow: hidden; }
.point::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--purple-700); }

/* The chain: Navy nodes, 2px Purple connectors, Green terminal node (the brand's one expressive motif) */
.cycle { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s8); padding: 0; margin: var(--s16) 0 var(--s24); }
.cycle-step { flex: 1 1 116px; position: relative; }
.cycle-step > * { display: flex; align-items: center; gap: var(--s8); width: 100%; text-align: left; font: 500 0.875rem var(--font); color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r4); padding: var(--s8) var(--s12); min-height: 44px;
  transition: border-color var(--t-state) var(--ease), background var(--t-state) var(--ease), color var(--t-state) var(--ease); }
.cycle-step > *:lang(hi) { font-family: var(--font-deva); }
.cycle-stepper .cycle-step > button { cursor: pointer; }
.cycle-stepper .cycle-step > button:hover { background: var(--row-hover); border-color: var(--navy-300); }
.cycle-step::after { content: ""; position: absolute; right: calc(var(--s8) * -1); top: 50%; width: var(--s8); height: 2px; background: var(--purple-700); }
.cycle-step:last-child::after { display: none; }
.cycle-n { flex: none; width: 24px; height: 24px; border-radius: var(--r-pill); background: var(--navy-700); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; }
.cycle-step:last-child .cycle-n { background: var(--green-700); }
.cycle-step.is-done .cycle-n { background: var(--green-700); }
.cycle-step.is-here > * { border-color: var(--navy-700); background: var(--navy-050); color: var(--ink); }
  :root[data-theme="dark"] .cycle-step.is-here > * { background: var(--surface-2); border-color: #fff; }
.cycle-name { font-weight: 600; }
.cycle-why li { padding: var(--s4) 0; font-size: 0.9375rem; }
@media (prefers-reduced-motion: no-preference) {
  .cycle-reveal .cycle-step { opacity: 0; animation: chainIn var(--t-chain) var(--ease) forwards; }
  .cycle-reveal .cycle-step:nth-child(1) { animation-delay: 0ms; } .cycle-reveal .cycle-step:nth-child(2) { animation-delay: 60ms; }
  .cycle-reveal .cycle-step:nth-child(3) { animation-delay: 120ms; } .cycle-reveal .cycle-step:nth-child(4) { animation-delay: 180ms; }
  .cycle-reveal .cycle-step:nth-child(5) { animation-delay: 240ms; } .cycle-reveal .cycle-step:nth-child(6) { animation-delay: 300ms; }
  .cycle-reveal .cycle-step:nth-child(7) { animation-delay: 360ms; } .cycle-reveal .cycle-step:nth-child(8) { animation-delay: 420ms; }
}
@keyframes chainIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Learning */
.stage-card .why { margin-top: calc(var(--s4) * -1); }
.stage-actions { display: flex; gap: var(--s8); flex-wrap: wrap; justify-content: flex-end; }
.contrast { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s12); }
.contrast-card { border: 1px solid var(--hairline); border-radius: var(--r8); padding: var(--s16); background: var(--surface); position: relative; overflow: hidden; }
.contrast-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; }
.contrast-card.weak::before { background: #c07c10; }
.contrast-card.strong::before { background: var(--green-700); }
.contrast-card h3 { display: flex; align-items: center; gap: var(--s8); margin-bottom: var(--s8); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.14em; }
.contrast-card.weak h3 { color: var(--warning-fg); }
.contrast-card.strong h3 { color: var(--success-fg); }
.contrast-card p { margin: 0; }
.attempt { margin: 0 0 var(--s16); padding: var(--s12) var(--s16); background: var(--surface-2); border-radius: var(--r4); white-space: pre-wrap; }
.criteria { margin-bottom: var(--s16); }
.model { background: var(--surface-2); border-radius: var(--r8); padding: var(--s12) var(--s16); margin-bottom: var(--s16); }
.model summary { font-weight: 600; cursor: pointer; }
.model p { margin: var(--s8) 0 0; }
.outcomes { margin-bottom: var(--s16); }
.outcomes li { display: flex; gap: var(--s8); align-items: baseline; flex-wrap: wrap; }
.unit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--s12); }
.unit-card { display: flex; flex-direction: column; gap: var(--s4); text-decoration: none; color: var(--ink); margin: 0;
  transition: border-color var(--t-state) var(--ease), box-shadow var(--t-state) var(--ease), background var(--t-state) var(--ease); }
.unit-card:hover { border-color: var(--navy-300); background: var(--row-hover); color: var(--ink); }
.meter { display: block; height: 4px; background: var(--track); border-radius: var(--r-pill); overflow: hidden; margin-top: var(--s4); }
.meter span { display: block; height: 100%; background: var(--green-700); transition: width var(--t-enter) var(--ease); }
.stages { list-style: none; padding: 0; }

/* Coach */
.log { max-height: 55vh; min-height: 140px; overflow-y: auto; display: flex; flex-direction: column; gap: var(--s12); margin-bottom: var(--s16); }
.msg { padding: var(--s12) var(--s16); border-radius: var(--r8); max-width: 88%; }
.msg.me { align-self: flex-end; background: var(--navy-700); color: #fff; }
  :root[data-theme="dark"] .msg.me { background: #fff; color: var(--navy-900); }
.msg.bot { align-self: flex-start; background: var(--surface-2); }
.msg .badge { margin-bottom: var(--s8); }
.ask { display: flex; gap: var(--s8); }

/* ---------------------------------------------------------------
   Device adaptation
   Phone < 640 Â· tablet 640-899 Â· desktop 900+ Â· plus input type,
   orientation, notch safe areas, contrast, forced colours and data saver.
   --------------------------------------------------------------- */

/* Phone: the eight nav items become a disclosure instead of three wrapped rows */
.header-controls { display: flex; align-items: center; gap: var(--s8); }
.nav-toggle { display: inline-flex; align-items: center; gap: var(--s8); font: 600 0.9375rem var(--font); min-height: 44px;
  padding: var(--s8) var(--s16); border-radius: var(--r4); border: 1px solid var(--navy-200); background: var(--surface); color: var(--structure); cursor: pointer; }
.nav-toggle:hover { background: var(--navy-050); }
  :root[data-theme="dark"] .nav-toggle { border-color: rgba(255, 255, 255, .3); color: #fff; }
.nav[data-open="false"] { display: none; }
.nav[data-open="true"] { flex-direction: column; align-items: stretch; padding-bottom: var(--s16); }
.nav[data-open="true"] a { padding: var(--s12) var(--s16); border-radius: var(--r4); }

@media (min-width: 640px) {
  .nav-toggle { display: none; }
  .nav, .nav[data-open="false"], .nav[data-open="true"] { display: flex; flex-direction: row; align-items: center; }
  .card { padding: var(--s24); }
}

/* Tablet and up: give the reading column room, let paired blocks sit side by side */
@media (min-width: 900px) {
  .status-row { grid-template-columns: 1fr 1fr; }
  .passport-head { flex-wrap: nowrap; }
  .hero-num { font-size: 4rem; }
  .cover { padding: var(--s64) var(--s48); }
}

/* Desktop: the cycle stepper becomes a rail beside the stage, so the stage never scrolls out of reach */
@media (min-width: 1040px) {
  .unit-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--s24); align-items: start; }
  .unit-layout .cycle { flex-direction: column; margin: 0; position: sticky; top: 132px; }
  .unit-layout .cycle-step { flex: none; }
  .unit-layout .cycle-step::after { right: auto; left: 24px; top: auto; bottom: calc(var(--s8) * -1); width: 2px; height: var(--s8); }
  .unit-layout .stage-card { margin: 0; }
}

/* Phone: tighter grounds, full-width actions, less vertical padding on the cover */
@media (max-width: 639px) {
  .cover { padding: var(--s32) var(--s24); border-radius: var(--r8); }
  .card { padding: var(--s16); }
  .card-role { padding-top: calc(var(--s16) + 4px); }
  main { padding-block: var(--s16) var(--s48); }
  .actions .btn, .nav-buttons .btn, .stage-actions .btn { flex: 1 1 100%; }
  .nav-buttons { flex-wrap: wrap; }
  .stats, .bands { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .plan { grid-template-columns: 1fr; }
  h2 { margin-top: var(--s24); }
}

/* Short landscape (a phone turned sideways): reclaim vertical space */
@media (max-height: 520px) and (orientation: landscape) {
  .site-header { position: static; }
  .cover { padding-block: var(--s24); }
  .log { max-height: 40vh; }
}

/* Touch devices: bigger targets, and no reliance on hover to reveal anything */
@media (pointer: coarse) {
  .btn, .nav a, .option, .cycle-step > *, .lang-toggle button { min-height: 48px; }
  .option { padding: var(--s16); }
  input, select, textarea { min-height: 48px; font-size: 1rem; } /* 16px+ stops iOS zooming on focus */
  table th, table td { padding: var(--s12); }
}

/* Fine pointer: allow denser tables, since precision clicking is available */
@media (pointer: fine) and (min-width: 900px) {
  table { font-size: 0.875rem; }
}

/* Notched phones: keep the sticky header and footer clear of the system UI */
.site-header { padding-top: env(safe-area-inset-top); }
.site-footer { padding-bottom: calc(var(--s32) + env(safe-area-inset-bottom)); }

/* High contrast and forced colours: never lose meaning that colour was carrying */
@media (prefers-contrast: more) {
  :root { --hairline: var(--navy-300); --muted: var(--ink-2); }
  .card, .option, .unit-card { border-width: 2px; }
}
@media (forced-colors: active) {
  .bar-fill, .meter span, .progress span, .cycle-n { forced-color-adjust: none; background: Highlight; }
  .card, .option, .status, .notice { border: 1px solid CanvasText; }
  .ico { forced-color-adjust: auto; }
}

/* Data saver: the brand's chain reveal and other motion are the first things to go */
@media (prefers-reduced-data: reduce) {
  .cycle-reveal .cycle-step { opacity: 1; animation: none; }
}
body.save-data .cycle-reveal .cycle-step { opacity: 1; animation: none; }
body.save-data * { transition: none !important; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; } }

@media print {
  .no-print, .site-header, .site-footer, .banner { display: none !important; }
  body { background: #fff; color: #000; }
  .card { break-inside: avoid; border-color: #ccc; }
  details { display: block; }
  details > * { display: block; }
}

/* The same component overrides for viewers on system-dark, who carry no data-theme stamp.
   These must stay inside the media query: unguarded, :not([data-theme="light"]) also matches in light mode. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lang-toggle button[aria-pressed="true"] { background: #fff; color: var(--navy-900); }
  :root:not([data-theme="light"]) .nav a:hover { background: var(--surface-2); }
  :root:not([data-theme="light"]) .nav a[aria-current="page"] { background: #fff; color: var(--navy-900); }
  :root:not([data-theme="light"]) .btn-primary:hover { background: var(--navy-050); color: var(--navy-900); }
  :root:not([data-theme="light"]) .btn-secondary { border-color: rgba(255,255,255,.3); color: #fff; }
  :root:not([data-theme="light"]) .btn-secondary:hover { background: var(--surface-2); }
  :root:not([data-theme="light"]) .btn-ghost { color: #fff; }
  :root:not([data-theme="light"]) .btn-ghost:hover { background: var(--surface-2); color: #fff; }
  :root:not([data-theme="light"]) .chip { background: var(--surface-2); color: #fff; }
  :root:not([data-theme="light"]) input, :root:not([data-theme="light"]) select, :root:not([data-theme="light"]) textarea { border-color: rgba(255,255,255,.25); }
  :root:not([data-theme="light"]) .option:has(input:checked) { background: var(--surface-2); border-color: #fff; }
  :root:not([data-theme="light"]) .cycle-step.is-here > * { background: var(--surface-2); border-color: #fff; }
  :root:not([data-theme="light"]) .msg.me { background: #fff; color: var(--navy-900); }
  :root:not([data-theme="light"]) .nav-toggle { border-color: rgba(255, 255, 255, .3); color: #fff; }
}

/* ---- Subject taxonomy picker (profile): level -> discipline -> subject -> specialisation ---- */
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 var(--s16); margin: var(--s8) 0; }
.check-list.inline-checks { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.check-list .check { margin: var(--s4) 0; font-size: 0.9375rem; }

details.pick { border: 1px solid var(--hairline); border-radius: var(--r4); padding: var(--s8) var(--s12); margin: var(--s8) 0; background: var(--surface); }
details.pick > summary { cursor: pointer; font-weight: 600; padding: var(--s4) 0; min-height: 32px; }
details.pick > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
details.pick[open] > summary { border-bottom: 1px solid var(--hairline); margin-bottom: var(--s8); }

.add-row { display: flex; gap: var(--s8); align-items: center; margin-top: var(--s8); flex-wrap: wrap; }
.add-row input { flex: 1 1 200px; width: auto; }

.chips { display: flex; flex-wrap: wrap; gap: var(--s8); list-style: none; padding: 0; margin: 0 0 var(--s12); }
.chips .chip { gap: var(--s4); padding: var(--s4) var(--s4) var(--s4) var(--s12); font-size: 0.8125rem; }
.chip-x { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 1rem; line-height: 1;
          padding: 0 var(--s4); min-height: 24px; border-radius: var(--r-pill); }
.chip-x:hover { background: rgba(0, 0, 0, .12); }
.chips-empty { margin: 0 0 var(--s12); }

.results { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow-y: auto; margin-bottom: var(--s12); }
.results:empty { display: none; }
button.result { text-align: left; border: 1px solid var(--hairline); border-radius: var(--r4); background: var(--surface);
                color: var(--ink); font: 500 0.9375rem var(--font); padding: var(--s8) var(--s12); cursor: pointer; min-height: 40px; }
button.result:hover { background: var(--surface-3); }
button.result:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chip-x:hover { background: rgba(255, 255, 255, .18); }
}
:root[data-theme="dark"] .chip-x:hover { background: rgba(255, 255, 255, .18); }

/* ---- Longitudinal journey: uncertainty bands, change bars, event timeline ---- */
.bar-track .band { position: absolute; top: 0; bottom: 0; background: var(--bar); opacity: .22; border-radius: var(--r4); pointer-events: none; }
.bar-fill.bar-down { background: var(--warning-fg, #a15c00); }

ol.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item { display: grid; grid-template-columns: 11rem 9rem 1fr; gap: var(--s8) var(--s12); align-items: baseline;
           padding: var(--s8) 0; border-bottom: 1px solid var(--hairline); }
.tl-item:last-child { border-bottom: 0; }
.tl-kind { justify-self: start; }
.tl-ctx { grid-column: 3; }
@media (max-width: 640px) {
  .tl-item { grid-template-columns: 1fr; gap: var(--s4); }
  .tl-ctx { grid-column: 1; }
}
