/* =========================================================
   What How Why

   Light PathwayPro chrome: paper, ink, gold. Each module brings
   its app's own colour as --accent, and that colour only ever
   appears on the app's tile, the player header and its mock
   screens, so the real app and its training look related.
   ========================================================= */

:root {
  --ink: #253238;
  --ink-2: #3a4a52;
  --ink-3: #56666e;
  --muted: #7a878d;
  --paper: #f6f4ef;
  --card: #ffffff;
  --card-2: #f0ede6;
  --line: #e2ddd3;
  --line-2: #ece8e0;

  --gold: #cca300;
  --gold-deep: #8f7300;
  --gold-soft: rgba(204,163,0,.13);
  --terra: #c76639;
  --terra-deep: #a24e26;
  --terra-soft: rgba(199,102,57,.13);
  --sage: #a2b4b4;
  --sage-deep: #3f7d78;
  --sage-soft: rgba(63,125,120,.12);
  --ok: #2f8a5b;
  --ok-soft: rgba(47,138,91,.12);
  --bad: #c43d3d;
  --bad-soft: rgba(196,61,61,.1);
  --info: #2e6fa8;
  --info-soft: rgba(46,111,168,.1);

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --display: "Montserrat", var(--font);

  --top-h: 62px;
  --side-w: 236px;
  --accent: var(--ink);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
.hidden { display: none !important; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .9em; background: var(--card-2); padding: 1px 5px; border-radius: 5px; }
.link { color: var(--gold-deep); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.link:hover { text-decoration: underline; }
.grow { flex: 1; min-width: 0; }
.hrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hrow.center { justify-content: center; }

.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; flex: none; }
.ic-sm { width: 15px; height: 15px; stroke-width: 2; }
.ic-lg { width: 30px; height: 30px; stroke-width: 1.6; }
.ic-xl { width: 46px; height: 46px; stroke-width: 1.4; }

/* ---------- Wordmark ---------- */
.wordmark { display: inline-flex; align-items: center; font-family: var(--display); font-weight: 900; letter-spacing: -.035em; font-size: 19px; line-height: 1; white-space: nowrap; }
.wm-pathway { color: transparent; -webkit-text-stroke: 1.2px var(--ink-3); paint-order: stroke fill; }
.wm-pro { color: var(--ink); }
.wm-tm { display: inline-grid; place-items: center; width: .58em; height: .58em; margin: 0 .04em; border: .055em solid var(--ink); border-radius: 99px; color: var(--ink); font-size: .62em; font-weight: 800; letter-spacing: -.04em; align-self: flex-start; transform: translateY(-.14em); }
.wm-tm span { font-size: .52em; transform: translateY(-.02em); }
.wm-app { color: var(--gold-deep); letter-spacing: -.02em; margin-left: .22em; }
.wordmark-lg { font-size: 28px; }

/* ---------- Buttons, inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 16px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font-weight: 700; font-size: 14px; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { border-color: #cfc8ba; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #1a2428; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger.ghost { background: transparent; color: var(--bad); border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--card-2); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.btn.lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 13px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .4; pointer-events: none; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.input {
  width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid #d6d0c4; background: #fff; font-size: 15px;
}
textarea.input { resize: vertical; min-height: 84px; }
.input:focus { outline: 2px solid var(--gold); outline-offset: -1px; border-color: var(--gold); }
.input[readonly] { background: var(--card-2); color: var(--ink-3); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- Pills, tags ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--card-2); color: var(--ink-3); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.gold { background: var(--gold-soft); color: var(--gold-deep); }
.pill.terra { background: var(--terra-soft); color: var(--terra-deep); }
.pill.info { background: var(--info-soft); color: var(--info); }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; background: var(--gold-soft); color: var(--gold-deep); }
.tag.plain { background: var(--card-2); color: var(--ink-3); }

.pill-status { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--card-2); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.pill-status i { width: 8px; height: 8px; border-radius: 99px; background: var(--muted); }
.pill-status.live i { background: var(--sage-deep); box-shadow: 0 0 0 3px var(--sage-soft); }
.pill-status.waiting i { background: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.pill-status.alone i { background: var(--terra); }

.avatar { width: 34px; height: 34px; border-radius: 99px; background: var(--ink); color: #fff; display: inline-grid; place-items: center; font-size: 12.5px; font-weight: 800; flex: none; }
.avatar.sm { width: 30px; height: 30px; font-size: 11.5px; background: var(--card-2); color: var(--ink-2); }
.avatar.lg { width: 52px; height: 52px; font-size: 18px; }

.app-tile { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--accent); color: #fff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.12); }
.app-tile .ic { width: 22px; height: 22px; }
.app-tile.sm { width: 34px; height: 34px; border-radius: 10px; }
.app-tile.sm .ic { width: 18px; height: 18px; }
.app-tile.xs { width: 24px; height: 24px; border-radius: 7px; }
.app-tile.xs .ic { width: 14px; height: 14px; stroke-width: 2; }
.app-tile.lg { width: 60px; height: 60px; border-radius: 16px; }
.app-tile.lg .ic { width: 30px; height: 30px; }

/* ---------- Shell ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 20px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.user-btn { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); }
.user-btn .avatar { width: 30px; height: 30px; font-size: 11px; }
.user-name { font-weight: 600; font-size: 14px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.preview-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 20px; background: var(--gold-soft); color: var(--gold-deep); font-size: 13.5px; font-weight: 600; border-bottom: 1px solid rgba(204,163,0,.25); }
.preview-strip select { border: 1px solid rgba(143,115,0,.35); border-radius: 8px; padding: 4px 8px; background: #fff; font-weight: 600; color: var(--ink); }

.body { display: flex; min-height: calc(100vh - var(--top-h)); }
.side {
  width: var(--side-w); flex: none; padding: 18px 12px; border-right: 1px solid var(--line);
  position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px; background: var(--paper);
}
.nav-link { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px; font-weight: 600; color: var(--ink-2); font-size: 14.5px; }
.nav-link:hover { background: var(--card-2); }
.nav-link.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 0 var(--line), 0 0 0 1px var(--line); }
.nav-link.on .ic { color: var(--gold-deep); }
.nav-head { margin: 18px 12px 6px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.side-foot { margin-top: auto; padding: 14px 12px 4px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.side-foot-title { font-family: var(--display); font-weight: 900; color: var(--gold-deep); letter-spacing: -.02em; margin-bottom: 4px; }
main { flex: 1; min-width: 0; outline: none; }
.bottomnav { display: none; }

.page { max-width: 1120px; margin: 0 auto; padding: 32px 28px 80px; }
.page.wide { max-width: 1320px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head > div:first-child { flex: 1; min-width: 260px; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 6px; }
h1 { font-family: var(--display); font-weight: 900; font-size: 32px; letter-spacing: -.03em; line-height: 1.12; }
h2 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: 16px; font-weight: 800; }
h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 14px 0 6px; }
.lede { color: var(--ink-3); font-size: 16px; margin-top: 8px; max-width: 720px; }
.big { font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); font-weight: 600; font-size: 14px; margin-bottom: 14px; }
.back:hover { color: var(--ink); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }

.empty { display: flex; gap: 16px; align-items: center; padding: 28px; border: 1.5px dashed var(--line); border-radius: var(--r-lg); color: var(--ink-3); background: rgba(255,255,255,.5); }
.empty .ic { color: var(--gold-deep); }
.empty a { color: var(--gold-deep); font-weight: 700; }

.banner { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 14px; margin-bottom: 16px; background: var(--info-soft); color: var(--info); font-weight: 600; font-size: 14.5px; }
.banner.bad { background: var(--bad-soft); color: var(--bad); }
.banner.terra { background: var(--terra-soft); color: var(--terra-deep); }
.banner .btn { margin-left: auto; }

/* ---------- Home ---------- */
.hero { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: end; padding: 30px; border-radius: 26px; margin-bottom: 30px;
  background: radial-gradient(120% 140% at 0% 0%, #fff 0%, #fbf8f0 55%, #f3ecd9 100%); border: 1px solid var(--line); }
.hero h1 { font-size: 36px; max-width: 640px; }
.hero-stats { display: flex; gap: 10px; }
.stat { min-width: 108px; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.stat-num { font-family: var(--display); font-size: 30px; font-weight: 900; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-top: 6px; }
.stat.gold .stat-num { color: var(--gold-deep); }
.stat.terra .stat-num { color: var(--terra); }
.stat.ok .stat-num { color: var(--ok); }
.stat.bad .stat-num { color: var(--bad); }
.stat-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 20px; }

.block { margin-bottom: 34px; }
.block-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.block-head h2 { display: flex; align-items: center; gap: 10px; }
.block-head h2 .ic { color: var(--gold-deep); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.mod-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); transition: transform .15s, box-shadow .15s, border-color .15s; overflow: hidden; }
.mod-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--accent); }
.mod-card:hover { transform: translateY(-2px); box-shadow: 0 18px 30px -22px rgba(30,40,45,.45); border-color: #d6cfbf; }
.mod-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mod-card-app { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mod-card-title { font-size: 18px; font-weight: 800; letter-spacing: -.01em; line-height: 1.3; }
.mod-card-tag { font-size: 14px; color: var(--ink-3); line-height: 1.45; }
.mod-card-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.mod-card-cta { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 14px; color: var(--ink); }
.mod-card-note { display: flex; gap: 7px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; background: var(--card-2); border-radius: 11px; font-size: 13px; color: var(--ink-2); }
.card-due { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.card-due.bad { color: var(--bad); }

.ring .ring-bg { fill: none; stroke: var(--line-2); stroke-width: 5; }
.ring .ring-fg { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset .5s; }
.ring text { font-size: 12px; font-weight: 800; fill: var(--ink-2); font-family: var(--font); }

.update-list { display: flex; flex-direction: column; gap: 8px; }
.update-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--terra); }
.update-row:hover { border-color: #d6cfbf; border-left-color: var(--terra); }
.update-row-app { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.update-row-title { font-weight: 800; }

.cert-strip, .cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; }
.cert-chip { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.cert-chip:hover { border-color: #d6cfbf; }
.cert-chip-title { font-weight: 800; }

/* ---------- Catalogue ---------- */
.filters { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); min-width: 260px; color: var(--muted); }
.search input { border: 0; outline: 0; background: none; flex: 1; color: var(--ink); }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--card-2); border-radius: 12px; flex-wrap: wrap; }
.seg button { padding: 7px 12px; border-radius: 9px; font-weight: 700; font-size: 13px; color: var(--ink-3); }
.seg .on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; }
.cat-card { display: flex; gap: 16px; padding: 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s; }
.cat-card:hover { border-color: #d6cfbf; box-shadow: 0 14px 26px -22px rgba(30,40,45,.5); }
.cat-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; align-items: center; }

/* ---------- Player ---------- */
.player-head { margin-bottom: 22px; }
.player-title { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 20px; }
.player-title h1 { font-size: 30px; }
.player-status { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.stepper { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.step { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 13px; color: var(--ink-3); min-width: 0; }
.step:hover { background: var(--card-2); }
.step.on { background: var(--ink); color: #fff; }
.step-dot { width: 28px; height: 28px; border-radius: 99px; display: grid; place-items: center; flex: none; font-weight: 800; font-size: 13px; background: var(--card-2); color: var(--ink-2); }
.step.on .step-dot { background: rgba(255,255,255,.18); color: #fff; }
.step.done .step-dot { background: var(--ok); color: #fff; }
.step.locked { opacity: .55; }
.step-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.step-text b { font-size: 14.5px; }
.step-text span { font-size: 12px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.part-label { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.part-next { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 22px; flex-wrap: wrap; }

.what { display: flex; flex-direction: column; gap: 16px; }
.what-summary { border-left: 5px solid var(--accent); }
.what-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; }
.what-grid h3, .what .card h3 { margin-bottom: 12px; }
.ticks { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks li .ic { margin-top: 3px; color: var(--ok); }
.ticks li.todo .ic { color: var(--muted); }
.ticks a { color: var(--gold-deep); font-weight: 700; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin-bottom: 14px; }
.facts dt { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.facts dd { font-size: 14.5px; color: var(--ink-2); }
.terms { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.terms > div { padding: 12px 14px; background: var(--card-2); border-radius: 12px; }
.terms dt { font-weight: 800; }
.terms dd { font-size: 14px; color: var(--ink-3); }

.how-top { margin-bottom: 14px; }
.sim-title { margin-bottom: 12px; }
.sim-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.sim-tab { display: flex; align-items: center; gap: 9px; padding: 7px 14px 7px 7px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); font-weight: 700; font-size: 14px; color: var(--ink-2); }
.sim-tab.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); color: var(--ink); }
.sim-tab.done .step-dot { background: var(--ok); color: #fff; }

.sim { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.sim-stage { min-width: 0; }
.sim-coach { position: sticky; top: calc(var(--top-h) + 16px); display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 20px 40px -32px rgba(30,40,45,.5); }
.coach-head { display: flex; align-items: center; gap: 10px; }
.coach-count { font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--gold-deep); white-space: nowrap; }
.coach-bar { flex: 1; height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.coach-bar span { display: block; height: 100%; background: var(--gold); border-radius: 99px; transition: width .4s; }
.coach-say { font-size: 17px; line-height: 1.5; font-weight: 500; color: var(--ink); }
.coach-say b { font-weight: 800; }
.coach-done { padding: 12px 14px; border-radius: 14px; background: var(--ok-soft); color: #1f5e3d; font-size: 14px; line-height: 1.5; }
.coach-done.flash { animation: flash .6s ease; }
@keyframes flash { 0% { transform: scale(.98); opacity: .4; } 100% { transform: none; opacity: 1; } }
.coach-done-label { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; margin-bottom: 4px; }
.coach-hint { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--gold-soft); color: var(--gold-deep); font-size: 13.5px; font-weight: 600; }
.coach-hint .ic { margin-top: 2px; }
.coach-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.coach-tip { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.coach-finish { display: flex; gap: 12px; align-items: center; color: var(--ok); }
.coach-finish div { color: var(--ink); }
.coach-trail { border-top: 1px solid var(--line-2); padding-top: 12px; }
.coach-trail-label { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.coach-trail-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.trail-arrow { color: var(--muted); }
.trail-chip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; border: 1px solid transparent; }

/* Node kinds, shared by chips and the diagram */
.k-you     { --k: #8f7300; --kb: #fbf3d6; }
.k-app     { --k: var(--accent); --kb: color-mix(in srgb, var(--accent) 12%, white); }
.k-system  { --k: #2e6fa8; --kb: #e4eef7; }
.k-people  { --k: #3f7d78; --kb: #e2efed; }
.k-outcome { --k: #a24e26; --kb: #f7e7de; }
.trail-chip { background: var(--kb); color: var(--k); }
button.trail-chip:hover { border-color: var(--k); }

/* ---------- Why ---------- */
.why .big { margin-bottom: 10px; }
.flow-card { padding: 18px; margin: 14px 0 22px; }
.flow-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.flow-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.legend { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; background: var(--kb); border: 2px solid var(--k); }
.flow-canvas { position: relative; }
.flow-svg { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.flow-lanes { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 64px; }
.note-line { display: flex; align-items: center; gap: 6px; }
.note-line .ic { color: var(--ok); }
.flow-lane { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.flow-lane-head { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.flow-lane-nodes { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 8px 0; }
.flow-node {
  position: relative; z-index: 1; text-align: left; display: flex; flex-direction: column; gap: 2px;
  padding: 11px 13px; border-radius: 14px; background: var(--card); border: 2px solid var(--line);
  transition: border-color .25s, background .25s, box-shadow .25s, transform .15s;
}
.flow-node:hover { transform: translateY(-1px); border-color: var(--k); }
.flow-node-label { font-weight: 800; font-size: 14px; line-height: 1.3; color: var(--ink); }
.flow-node-sub { font-size: 12px; color: var(--muted); line-height: 1.3; }
.flow-node.lit { background: var(--kb); border-color: var(--k); }
.flow-node.lit .flow-node-label { color: var(--k); }
.flow-node.sel { box-shadow: 0 0 0 4px color-mix(in srgb, var(--k) 25%, transparent); }
.flow-edge { fill: none; stroke: #cfc8ba; stroke-width: 2; }
.flow-edge.on { stroke: var(--gold); stroke-width: 2.6; stroke-dasharray: 7 6; animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -26; } }
.flow-arrowhead { fill: #b8b0a0; }
.flow-edge-label { font-size: 11.5px; font-weight: 700; fill: var(--muted); paint-order: stroke; stroke: var(--card); stroke-width: 4px; stroke-linejoin: round; }
.flow-edge-label.on { fill: var(--gold-deep); }
.flow-detail { margin-top: 18px; min-height: 96px; }
.flow-detail-empty { display: flex; align-items: center; gap: 12px; padding: 18px; border-radius: 14px; background: var(--card-2); color: var(--ink-3); font-weight: 600; }
.flow-detail-card { padding: 18px 20px; border-radius: 16px; background: var(--kb); border-left: 5px solid var(--k); animation: flash .4s ease; }
.flow-detail-card h3 { font-size: 19px; color: var(--ink); }
.flow-detail-kind { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--k); margin-bottom: 4px; }
.flow-detail-sub { font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }
.flow-detail-card p { font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.flow-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.flow-links > span { font-size: 12px; font-weight: 700; color: var(--muted); margin-right: 2px; }
.flow-links .trail-chip { background: var(--card); }

.why-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.why-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.why-h.ok .ic { color: var(--ok); }
.why-h.bad .ic { color: var(--terra); }
.why-card { padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); margin-bottom: 10px; }
.why-card.ok { border-left: 4px solid var(--ok); }
.why-card.bad { border-left: 4px solid var(--terra); }
.why-card p { color: var(--ink-3); font-size: 14.5px; margin-top: 3px; }

/* ---------- Check ---------- */
.check-intro { max-width: 760px; }
.check-intro .big, .check-intro p { margin-bottom: 12px; }
.locked { display: flex; gap: 18px; align-items: flex-start; max-width: 680px; }
.locked .ic-lg { color: var(--gold-deep); }
.quiz { max-width: 820px; }
.quiz-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.quiz-top .eyebrow { margin: 0; white-space: nowrap; }
.quiz-bar { flex: 1; height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.quiz-bar span { display: block; height: 100%; background: var(--gold); }
.quiz-q { font-size: 22px; line-height: 1.35; margin-bottom: 18px; }
.quiz-opts { display: flex; flex-direction: column; gap: 9px; }
.quiz-opt { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); font-size: 15.5px; font-weight: 500; transition: border-color .15s, background .15s; }
.quiz-opt:hover:not([disabled]) { border-color: var(--ink-3); }
.quiz-letter { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--card-2); font-weight: 800; flex: none; }
.quiz-opt.right { border-color: var(--ok); background: var(--ok-soft); }
.quiz-opt.right .quiz-letter { background: var(--ok); color: #fff; }
.quiz-opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.quiz-opt.wrong .quiz-letter { background: var(--bad); color: #fff; }
.quiz-opt[disabled] { cursor: default; }
.quiz-feedback { margin-top: 16px; padding: 14px 16px; border-radius: 14px; font-size: 15px; line-height: 1.55; }
.quiz-feedback.ok { background: var(--ok-soft); color: #1f5e3d; }
.quiz-feedback.bad { background: var(--terra-soft); color: #7c3a1b; }
.quiz-next { margin-top: 12px; display: flex; justify-content: flex-end; }
.result { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 36px 24px; max-width: 820px; }
.result.pass .ic-xl { color: var(--gold-deep); }
.result.fail .ic-xl { color: var(--terra); }
.result .big { max-width: 600px; }
.missed { width: 100%; text-align: left; }

/* ---------- Update player ---------- */
.update-body { display: flex; flex-direction: column; gap: 16px; }
.steps { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 16px; color: var(--ink-2); }
.u-sim { margin-top: 18px; }

/* ---------- Certificate ---------- */
.cert-actions { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.cert-actions .back { margin: 0; }
.cert-paper-wrap { overflow-x: auto; padding-bottom: 8px; }
.cert-paper {
  position: relative; width: 1000px; max-width: 100%; aspect-ratio: 297 / 210; margin: 0 auto;
  background: #fffdf8; color: var(--ink); padding: 54px 70px 40px;
  box-shadow: 0 30px 60px -40px rgba(30,40,45,.6), 0 0 0 1px var(--line);
  display: flex; flex-direction: column; align-items: center; text-align: center; overflow: hidden;
}
.cert-border { position: absolute; inset: 16px; border: 2px solid var(--gold); border-radius: 4px; pointer-events: none; }
.cert-border::after { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(204,163,0,.45); }
.cert-paper.revoked::before { content: "REVOKED"; position: absolute; top: 44%; left: 50%; transform: translate(-50%, -50%) rotate(-18deg); font-family: var(--display); font-weight: 900; font-size: 120px; color: rgba(196,61,61,.14); letter-spacing: .05em; }
.cert-head { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.cert-school { font-weight: 800; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.cert-kicker { margin-top: 30px; font-family: var(--display); font-weight: 900; font-size: 15px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold-deep); }
.cert-pre { margin-top: 14px; font-size: 15px; color: var(--ink-3); }
.cert-name { font-family: var(--display); font-weight: 900; font-size: 46px; letter-spacing: -.03em; line-height: 1.1; margin-top: 4px; }
.cert-module { display: flex; align-items: center; gap: 16px; margin-top: 14px; text-align: left; }
.cert-app { font-weight: 900; font-size: 22px; letter-spacing: -.01em; }
.cert-title { color: var(--ink-3); font-size: 16px; }
.cert-body { max-width: 640px; margin-top: 14px; font-size: 14.5px; color: var(--ink-2); line-height: 1.55; }
.cert-seals { display: flex; gap: 46px; margin-top: 22px; }
.cert-seal { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 150px; }
.cert-seal-ring { width: 46px; height: 46px; border-radius: 99px; display: grid; place-items: center; border: 2px solid var(--gold); color: var(--gold-deep); background: var(--gold-soft); margin-bottom: 4px; }
.cert-seal b { font-family: var(--display); font-weight: 900; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; }
.cert-seal span:last-child { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.cert-meta { display: flex; gap: 36px; margin-top: auto; padding-top: 18px; }
.cert-meta div { display: flex; flex-direction: column; gap: 2px; }
.cert-meta span, .cert-endorse > span { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cert-meta b { font-size: 15px; }
.cert-endorse { margin-top: 12px; font-size: 12.5px; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cert-endorse div { display: flex; align-items: center; gap: 5px; }
.cert-endorse .ic { color: var(--ok); }
.cert-foot { width: 100%; display: flex; justify-content: space-between; margin-top: 16px; font-size: 11px; color: var(--muted); letter-spacing: .03em; }

/* ---------- Admin ---------- */
.legend-row { display: flex; gap: 12px; flex-wrap: wrap; margin-left: auto; }
.cell-key { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.cell-key i { width: 14px; height: 14px; border-radius: 4px; }
.check-label { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.matrix-wrap, .table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.matrix { border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.matrix th, .matrix td { padding: 6px; border-bottom: 1px solid var(--line-2); text-align: center; }
.matrix thead th { position: sticky; top: 0; background: var(--card); z-index: 2; vertical-align: bottom; padding: 12px 6px; }
.matrix .sticky { position: sticky; left: 0; background: var(--card); z-index: 1; text-align: left; padding: 8px 14px; min-width: 220px; border-right: 1px solid var(--line-2); }
.matrix thead .sticky { z-index: 3; }
.mx-head { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 74px; font-size: 11.5px; font-weight: 700; color: var(--ink-3); line-height: 1.2; }
.mx-person { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.cell, .cell-key i { --c: transparent; }
.cell { width: 58px; height: 34px; border-radius: 9px; font-size: 12px; font-weight: 800; display: inline-grid; place-items: center; border: 1.5px dashed var(--line); color: var(--muted); }
.cell:hover { border-color: var(--ink-3); }
.s-not-started { background: var(--info-soft); border: 1.5px solid rgba(46,111,168,.35) !important; color: var(--info); }
.s-in-progress { background: var(--gold-soft); border: 1.5px solid rgba(204,163,0,.5) !important; color: var(--gold-deep); }
.s-overdue { background: var(--bad-soft); border: 1.5px solid rgba(196,61,61,.45) !important; color: var(--bad); }
.s-certified { background: var(--ok); border: 1.5px solid var(--ok) !important; color: #fff; }
.s-update-due { background: var(--terra); border: 1.5px solid var(--terra) !important; color: #fff; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fbfaf7; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

.alloc { display: grid; grid-template-columns: 1.15fr 1fr 320px; gap: 16px; align-items: start; }
.alloc-step { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.alloc-step .step-dot { background: var(--ink); color: #fff; }
.alloc-final { position: sticky; top: calc(var(--top-h) + 16px); }
.packs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.pack { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 11px 13px; border-radius: 13px; border: 1px solid var(--line); background: var(--card-2); }
.pack:hover { border-color: var(--gold); background: var(--gold-soft); }
.pack span { font-size: 12.5px; color: var(--ink-3); line-height: 1.35; }
.pick-list { display: flex; flex-direction: column; max-height: 560px; overflow: auto; border: 1px solid var(--line-2); border-radius: 14px; }
.pick { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.pick:last-child { border-bottom: 0; }
.pick:hover { background: #fcfbf8; }
.pick input { width: 18px; height: 18px; accent-color: var(--ink); flex: none; }

.list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--line-2); }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: #fcfbf8; }
.ver { font-family: ui-monospace, Menlo, monospace; font-weight: 700; font-size: 13px; padding: 3px 8px; border-radius: 7px; background: var(--terra-soft); color: var(--terra-deep); }
.how-updates { margin-bottom: 24px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.three p { margin-top: 4px; }

.form { max-width: 860px; }
.qs-head { display: flex; align-items: center; gap: 12px; margin: 8px 0 12px; flex-wrap: wrap; }
.q-edit { padding: 14px; border-radius: 14px; background: var(--card-2); margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.q-edit-head { display: flex; align-items: center; justify-content: space-between; }
.opt-edit { display: flex; align-items: center; gap: 10px; }
.opt-edit input[type=radio] { width: 18px; height: 18px; accent-color: var(--ok); flex: none; }
.form-foot { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* ---------- Sheet, toast ---------- */
#sheet { position: fixed; inset: 0; z-index: 50; display: none; }
#sheet.on { display: flex; align-items: center; justify-content: center; padding: 20px; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(28,36,40,.45); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet-card { position: relative; width: 100%; max-width: 480px; max-height: calc(100vh - 40px); overflow: auto; background: var(--card); border-radius: 22px; padding: 24px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.5); animation: up .25s ease; }
.sheet-card.wide { max-width: 760px; }
@keyframes up { from { transform: translateY(16px); opacity: 0; } }
.sheet-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 99px; display: grid; place-items: center; color: var(--ink-3); }
.sheet-x:hover { background: var(--card-2); }
.sheet-title { font-size: 21px; margin-bottom: 8px; padding-right: 30px; }
.sheet-body { color: var(--ink-3); margin-bottom: 16px; }
.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 18px; }
.sheet-list { display: flex; flex-direction: column; margin-top: 14px; border-top: 1px solid var(--line-2); }
.sheet-item { display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-bottom: 1px solid var(--line-2); font-weight: 600; text-align: left; width: 100%; }
.sheet-item:hover { color: var(--gold-deep); }
.sheet-item.danger { color: var(--bad); }
.me-card { display: flex; gap: 14px; align-items: center; }
.me-name { font-weight: 800; font-size: 17px; }
.sheet-mod { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; padding-right: 36px; }
.sheet-mod .sheet-title { margin: 0; }
.sheet-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; z-index: 60; padding: 12px 18px; border-radius: 13px; background: var(--ink); color: #fff; font-weight: 600; font-size: 14.5px; transition: opacity .25s, transform .25s; pointer-events: none; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); }
.toast.ok { background: var(--ok); }

/* ---------- Gate ---------- */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.gate-card { max-width: 520px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; padding: 34px; }
.gate-card h1 { font-size: 28px; }
.boot { min-height: 100vh; display: grid; place-items: center; color: var(--muted); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .sim { grid-template-columns: minmax(0, 1fr) 300px; }
  .alloc { grid-template-columns: 1fr 1fr; }
  .alloc-final { grid-column: 1 / -1; position: static; }
  .stat-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .sim { grid-template-columns: 1fr; }
  .sim-coach { position: sticky; bottom: 76px; top: auto; order: -1; z-index: 6; }
  .stepper { grid-template-columns: repeat(5, auto); overflow-x: auto; }
  .step-text span { display: none; }
  .flow-lanes { gap: 34px; }
}
@media (max-width: 860px) {
  :root { --top-h: 56px; }
  .side { display: none; }
  .bottomnav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .bottomnav .nav-link { flex: 1; flex-direction: column; gap: 3px; font-size: 11px; padding: 6px 2px; text-align: center; }
  .bottomnav .nav-link.on { box-shadow: none; background: var(--card-2); }
  .page { padding: 22px 16px 110px; }
  .hero { grid-template-columns: 1fr; padding: 22px; }
  .hero h1 { font-size: 27px; }
  .hero-stats { flex-wrap: wrap; }
  .stat { min-width: 0; flex: 1; }
  h1, .player-title h1 { font-size: 25px; }
  .user-name { display: none; }
  .topbar { padding: 0 14px; gap: 8px; }
  .topbar .wordmark { font-size: 16px; }
  .pill-status { padding: 0 10px; font-size: 0; gap: 0; }
  .pill-status i { width: 9px; height: 9px; }
  .user-btn { padding: 3px; }
  .user-btn > .ic { display: none; }
  .stepper { display: flex; overflow-x: auto; scrollbar-width: none; }
  .step { flex: none; }
  .player-title { display: grid; grid-template-columns: auto 1fr; gap: 14px; }
  .player-title .player-status { grid-column: 1 / -1; flex-direction: row; align-items: center; }
  .player-title .app-tile.lg { width: 48px; height: 48px; }
  .preview-strip { padding: 8px 16px; font-size: 12.5px; }
  .wm-pathway, .wm-pro, .wm-tm { display: none; }
  .what-grid, .why-cols, .three, .grid2, .sheet-cols, .alloc, .packs { grid-template-columns: 1fr; }
  .cat-grid, .card-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .player-title { flex-wrap: wrap; }
  .player-status { align-items: flex-start; }
  .legend-row { margin-left: 0; }
  .search { min-width: 0; flex: 1; }
  .sim-coach { bottom: 70px; }
}
@media (max-width: 760px) {
  .flow-lanes { grid-template-columns: 1fr; gap: 18px; }
  .flow-lane-head { text-align: left; }
  .flow-lane-nodes { gap: 10px; }
  .flow-edge-label { display: none; }
  .cert-paper { padding: 34px 30px 26px; aspect-ratio: auto; width: 100%; }
  .cert-name { font-size: 32px; }
  .cert-meta { flex-wrap: wrap; gap: 16px; justify-content: center; }
  .cert-seals { gap: 10px; }
  .cert-seal { width: auto; flex: 1; }
  .cert-head { flex-direction: column; gap: 8px; }
}

/* ---------- Print: only the certificate ---------- */
@media print {
  @page { size: A4 landscape; margin: 0; }
  body { background: #fff; }
  .topbar, .side, .bottomnav, .preview-strip, .cert-actions, .banner, .player-head, .stepper, #toast, #sheet { display: none !important; }
  .page { padding: 0; max-width: none; }
  .body { display: block; min-height: 0; }
  .cert-paper-wrap { overflow: visible; padding: 0; }
  .cert-paper { width: 297mm; height: 210mm; max-width: none; aspect-ratio: auto; box-shadow: none; margin: 0; padding: 18mm 22mm 14mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
