:root {
  color-scheme: light;
  --paper: #f5f8ff;
  --paper-deep: #edf2ff;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-solid: #ffffff;
  --ink: #15233a;
  --ink-soft: #68758c;
  --line: rgba(58, 79, 116, 0.13);
  --accent: #ff5d5d;
  --accent-strong: #e9404f;
  --accent-soft: #ffe6e8;
  --jade: #109d84;
  --jade-soft: #ddf8f1;
  --gold: #f0a21b;
  --blue: #4d7cff;
  --blue-soft: #e5edff;
  --purple: #8a63f6;
  --purple-soft: #eee8ff;
  --coral: #ff6d67;
  --coral-soft: #ffe8e5;
  --amber: #f5a623;
  --amber-soft: #fff2d8;
  --green: #16b98e;
  --green-soft: #def8ef;
  --cyan: #16a8d9;
  --cyan-soft: #def5fd;
  --pink: #e95ca9;
  --pink-soft: #fde5f2;
  --shadow: 0 22px 60px rgba(68, 91, 132, 0.13);
  --topbar: 72px;
  --sidebar: 282px;
  --toc: 236px;
  --radius: 18px;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
  --sans: Inter, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #151b19;
  --paper-deep: #1b2320;
  --surface: rgba(31, 40, 37, 0.9);
  --surface-solid: #202925;
  --ink: #eef1e8;
  --ink-soft: #aeb8b1;
  --line: rgba(225, 234, 226, 0.13);
  --accent: #ff7d7d;
  --accent-strong: #ff9a9a;
  --accent-soft: #4d2b30;
  --jade: #68dac0;
  --jade-soft: #203f39;
  --gold: #f4bd57;
  --blue: #7f9fff;
  --blue-soft: #263452;
  --purple: #ae91ff;
  --purple-soft: #342c53;
  --coral: #ff8d87;
  --coral-soft: #4b2d30;
  --amber: #ffc45d;
  --amber-soft: #493b25;
  --green: #5edbb9;
  --green-soft: #22433b;
  --cyan: #67cef0;
  --cyan-soft: #223d49;
  --pink: #f18bc4;
  --pink-soft: #4b2b40;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 10%, color-mix(in srgb, var(--blue) 12%, transparent), transparent 25rem),
    radial-gradient(circle at 92% 16%, color-mix(in srgb, var(--coral) 11%, transparent), transparent 28rem),
    radial-gradient(circle at 70% 75%, color-mix(in srgb, var(--purple) 8%, transparent), transparent 30rem),
    var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: var(--jade);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: white;
  background: var(--accent);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: fixed;
  z-index: 30;
  inset: 0 0 auto;
  height: var(--topbar);
  display: grid;
  grid-template-columns: var(--sidebar) minmax(260px, 620px) 1fr;
  align-items: center;
  gap: 28px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.brand-seal {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff8ed;
  background: var(--accent);
  border: 2px solid color-mix(in srgb, var(--accent) 65%, white);
  border-radius: 12px 12px 12px 4px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.2);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 800;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.04em;
}

.brand-copy small {
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.search-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px 11px 16px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 4px 18px rgba(42, 46, 43, 0.04);
  cursor: pointer;
}

kbd {
  padding: 2px 7px;
  color: var(--ink-soft);
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 6px;
  font: 11px/1.6 var(--sans);
}

.top-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

.offline-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  color: var(--jade);
  background: var(--jade-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.offline-badge i {
  width: 7px;
  height: 7px;
  background: currentColor;
  border-radius: 50%;
}

.icon-button,
.close-menu {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  cursor: pointer;
}

.workspace {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--toc);
  min-height: 100vh;
  padding-top: var(--topbar);
}

.sidebar,
.toc-panel {
  position: fixed;
  z-index: 20;
  top: var(--topbar);
  bottom: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.sidebar {
  left: 0;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 78%, transparent);
}

.sidebar-head,
.toc-title {
  padding: 0 10px 12px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nav-group {
  margin-bottom: 8px;
}

.nav-group > button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  color: var(--ink-soft);
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  text-align: left;
}

.nav-group > button::after {
  content: "＋";
  font-size: 14px;
  font-weight: 400;
}

.nav-group.open > button::after {
  content: "−";
}

.nav-items {
  display: none;
  padding: 2px 0 5px;
}

.nav-group.open .nav-items {
  display: grid;
}

.nav-item {
  padding: 7px 10px;
  color: var(--ink-soft);
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  font-size: 12px;
  line-height: 1.45;
  text-decoration: none;
}

.nav-item:hover,
.nav-item.active {
  color: var(--ink);
  background: var(--surface);
  border-left-color: var(--accent);
}

.sidebar-foot {
  display: grid;
  gap: 4px;
  margin-top: auto;
  padding: 14px 12px;
  color: var(--ink-soft);
  background: var(--jade-soft);
  border-radius: 12px;
  font-size: 11px;
}

.sidebar-foot strong {
  color: var(--jade);
  font-size: 12px;
}

main {
  grid-column: 2;
  width: 100%;
  min-width: 0;
  padding: 44px clamp(28px, 5vw, 78px) 100px;
}

.toc-panel {
  right: 0;
  width: var(--toc);
  padding: 28px 22px;
  border-left: 1px solid var(--line);
}

.toc-panel:empty,
.toc-panel.home-mode {
  display: none;
}

.toc-panel nav {
  display: grid;
  gap: 1px;
}

.toc-link {
  padding: 5px 8px;
  color: var(--ink-soft);
  border-left: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.45;
  text-decoration: none;
}

.toc-link.depth-3 {
  padding-left: 18px;
}

.toc-link:hover {
  color: var(--accent);
  border-left-color: var(--accent);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 6vw, 72px);
  color: #fff9ef;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 42%),
    #203f38;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 243, 224, 0.2);
  border-radius: 50%;
}

.hero::before {
  width: 330px;
  height: 330px;
  top: -190px;
  right: -80px;
}

.hero::after {
  width: 220px;
  height: 220px;
  right: 70px;
  bottom: -170px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #e5c88d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.hero h1 {
  max-width: 760px;
  margin: 20px 0 18px;
  font: 800 clamp(38px, 6vw, 70px)/1.08 var(--serif);
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 249, 239, 0.77);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
}

.primary-button {
  color: #fff8ef;
  border: 1px solid #bc5d4c;
  background: #a93f30;
}

.secondary-button {
  color: #fff9ef;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 48px;
}

.stat {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.stat strong {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font: 800 24px/1 var(--serif);
}

.stat span {
  color: var(--ink-soft);
  font-size: 11px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 46px 0 18px;
}

.section-head h2 {
  margin: 0;
  font: 800 28px/1.2 var(--serif);
}

.section-head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.entry-card,
.skill-card,
.volume-card {
  display: flex;
  flex-direction: column;
  min-height: 170px;
  padding: 22px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.entry-card:hover,
.skill-card:hover,
.volume-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: 0 16px 34px rgba(40, 37, 28, 0.08);
}

.card-kicker {
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.entry-card h3,
.skill-card h3,
.volume-card h3 {
  margin: 12px 0 8px;
  font: 750 18px/1.35 var(--serif);
}

.entry-card p,
.skill-card p,
.volume-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.card-meta {
  margin-top: auto;
  padding-top: 18px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.skill-card {
  min-height: 150px;
  border-top: 3px solid var(--jade);
}

.volume-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.volume-card {
  min-height: 120px;
  padding: 18px;
}

.volume-card h3 {
  font-size: 15px;
}

.doc-shell {
  max-width: 920px;
  margin: 0 auto;
}

.doc-header {
  margin-bottom: 34px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.breadcrumbs {
  margin-bottom: 18px;
  color: var(--ink-soft);
  font-size: 11px;
}

.doc-header h1 {
  margin: 0 0 14px;
  font: 800 clamp(32px, 5vw, 52px)/1.14 var(--serif);
  letter-spacing: -0.03em;
}

.doc-header p {
  max-width: 760px;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.75;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.doc-meta span,
.doc-meta a {
  padding: 6px 9px;
  color: var(--ink-soft);
  background: var(--paper-deep);
  border-radius: 7px;
  font-size: 10px;
  text-decoration: none;
}

.markdown-body {
  font-size: 15px;
  line-height: 1.82;
  overflow-wrap: anywhere;
}

.markdown-body h1 {
  display: none;
}

.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  scroll-margin-top: calc(var(--topbar) + 24px);
  font-family: var(--serif);
}

.markdown-body h2 {
  margin: 58px 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 28px;
}

.markdown-body h3 {
  margin: 36px 0 12px;
  font-size: 21px;
}

.markdown-body h4 {
  margin: 26px 0 10px;
  font-size: 17px;
}

.markdown-body p {
  margin: 14px 0;
}

.markdown-body strong {
  color: color-mix(in srgb, var(--ink) 90%, var(--accent));
}

.markdown-body a {
  color: var(--jade);
  text-underline-offset: 3px;
}

.markdown-body blockquote {
  margin: 24px 0;
  padding: 14px 18px;
  color: var(--ink-soft);
  background: var(--jade-soft);
  border-left: 4px solid var(--jade);
  border-radius: 0 12px 12px 0;
}

.markdown-body blockquote p {
  margin: 0;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 24px;
}

.markdown-body li {
  margin: 6px 0;
}

.markdown-body code {
  padding: 2px 6px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-radius: 5px;
  font: 0.88em/1.6 "SFMono-Regular", Consolas, monospace;
}

.code-block {
  position: relative;
  overflow-x: auto;
  margin: 22px 0;
  padding: 20px;
  color: #e7ece4;
  background: #17211e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  font: 12px/1.7 "SFMono-Regular", Consolas, monospace;
  white-space: pre;
}

.code-language {
  display: block;
  margin-bottom: 8px;
  color: #9eb8ae;
  font: 9px var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.table-wrap {
  overflow-x: auto;
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 12px;
  line-height: 1.55;
}

.markdown-body th,
.markdown-body td {
  min-width: 100px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.markdown-body th {
  color: var(--ink);
  background: var(--paper-deep);
  font-weight: 750;
}

.markdown-body tr:last-child td {
  border-bottom: 0;
}

.markdown-body th:last-child,
.markdown-body td:last-child {
  border-right: 0;
}

.search-dialog[hidden],
.mobile-scrim[hidden] {
  display: none;
}

.search-dialog {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: start center;
  padding: min(14vh, 120px) 20px 20px;
}

.search-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 20, 18, 0.56);
  backdrop-filter: blur(5px);
}

.search-panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: 72vh;
  overflow: hidden;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.25);
}

.search-box {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.search-box > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #fff8ed;
  background: var(--accent);
  border-radius: 9px;
  font-family: var(--serif);
}

.search-box input {
  width: 100%;
  padding: 6px 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 17px;
}

.search-hint {
  padding: 10px 18px;
  color: var(--ink-soft);
  background: var(--paper-deep);
  font-size: 10px;
}

.search-results {
  max-height: calc(72vh - 105px);
  overflow: auto;
  padding: 8px;
}

.search-result {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  color: var(--ink);
  border-radius: 10px;
  text-decoration: none;
}

.search-result:hover,
.search-result:focus {
  background: var(--paper-deep);
  outline: none;
}

.search-result strong {
  font-family: var(--serif);
}

.search-result small,
.search-result span {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.5;
}

.empty-state {
  padding: 44px 24px;
  color: var(--ink-soft);
  text-align: center;
}

.mobile-only {
  display: none;
}

/* v1.4 visual knowledge cockpit */

.tone-blue {
  --tone: var(--blue);
  --tone-soft: var(--blue-soft);
}

.tone-purple {
  --tone: var(--purple);
  --tone-soft: var(--purple-soft);
}

.tone-coral {
  --tone: var(--coral);
  --tone-soft: var(--coral-soft);
}

.tone-amber {
  --tone: var(--amber);
  --tone-soft: var(--amber-soft);
}

.tone-green {
  --tone: var(--green);
  --tone-soft: var(--green-soft);
}

.tone-cyan {
  --tone: var(--cyan);
  --tone-soft: var(--cyan-soft);
}

.tone-pink {
  --tone: var(--pink);
  --tone-soft: var(--pink-soft);
}

.topbar {
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  box-shadow: 0 8px 30px rgba(73, 95, 133, 0.06);
}

.brand-seal {
  border: 0;
  background: linear-gradient(145deg, var(--blue), var(--purple));
  box-shadow: 0 9px 22px color-mix(in srgb, var(--blue) 28%, transparent);
}

.brand-copy strong {
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 850;
}

.search-trigger {
  border-color: color-mix(in srgb, var(--blue) 20%, var(--line));
  background: color-mix(in srgb, var(--blue-soft) 35%, var(--surface-solid));
  box-shadow: none;
}

.search-trigger:hover {
  color: var(--blue);
  border-color: color-mix(in srgb, var(--blue) 45%, var(--line));
}

.offline-badge {
  color: var(--green);
  background: var(--green-soft);
}

.sidebar {
  background: color-mix(in srgb, var(--surface-solid) 91%, transparent);
}

.nav-group > button {
  position: relative;
  gap: 8px;
  justify-content: flex-start;
}

.nav-group > button::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  background: var(--blue);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--blue-soft);
}

.nav-group > button::after {
  margin-left: auto;
}

.nav-group:nth-child(7n + 2) > button::before {
  background: var(--purple);
  box-shadow: 0 0 0 4px var(--purple-soft);
}

.nav-group:nth-child(7n + 3) > button::before {
  background: var(--coral);
  box-shadow: 0 0 0 4px var(--coral-soft);
}

.nav-group:nth-child(7n + 4) > button::before {
  background: var(--amber);
  box-shadow: 0 0 0 4px var(--amber-soft);
}

.nav-group:nth-child(7n + 5) > button::before {
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.nav-group:nth-child(7n + 6) > button::before {
  background: var(--cyan);
  box-shadow: 0 0 0 4px var(--cyan-soft);
}

.nav-group:nth-child(7n) > button::before {
  background: var(--pink);
  box-shadow: 0 0 0 4px var(--pink-soft);
}

.nav-item:hover,
.nav-item.active {
  color: var(--blue);
  border-left-color: var(--blue);
  background: var(--blue-soft);
}

.sidebar-foot {
  color: var(--ink-soft);
  background: linear-gradient(135deg, var(--blue-soft), var(--green-soft));
}

.sidebar-foot strong {
  color: var(--blue);
}

.hero {
  min-height: 500px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  align-items: center;
  gap: clamp(28px, 5vw, 74px);
  padding: clamp(34px, 5vw, 68px);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--blue) 12%, transparent), transparent 18rem),
    radial-gradient(circle at 82% 12%, color-mix(in srgb, var(--coral) 14%, transparent), transparent 18rem),
    linear-gradient(145deg, var(--surface-solid), color-mix(in srgb, var(--blue-soft) 36%, var(--surface-solid)));
  border: 1px solid color-mix(in srgb, var(--blue) 16%, var(--line));
  box-shadow: 0 30px 80px rgba(76, 105, 162, 0.14);
}

.hero::before {
  width: 210px;
  height: 210px;
  top: -120px;
  right: 34%;
  border: 34px solid color-mix(in srgb, var(--amber) 12%, transparent);
}

.hero::after {
  width: 180px;
  height: 180px;
  right: -80px;
  bottom: -100px;
  border: 30px solid color-mix(in srgb, var(--purple) 10%, transparent);
}

.hero-copy,
.hero-visual {
  position: relative;
  z-index: 1;
}

.eyebrow {
  color: var(--blue);
  letter-spacing: 0.12em;
}

.eyebrow i {
  width: 9px;
  height: 9px;
  background: var(--coral);
  border-radius: 50%;
  box-shadow: 0 0 0 5px var(--coral-soft);
}

.hero h1 {
  max-width: 720px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(42px, 5.6vw, 72px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.hero h1 em {
  color: transparent;
  background: linear-gradient(90deg, var(--blue), var(--purple) 46%, var(--coral));
  background-clip: text;
  -webkit-background-clip: text;
  font-family: inherit;
  font-style: normal;
}

.hero p {
  color: var(--ink-soft);
  font-size: 17px;
}

.primary-button {
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  box-shadow: 0 12px 26px color-mix(in srgb, var(--blue) 28%, transparent);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px color-mix(in srgb, var(--blue) 36%, transparent);
}

.secondary-button {
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--blue) 20%, var(--line));
  background: var(--surface-solid);
}

.secondary-button:hover {
  color: var(--blue);
  border-color: var(--blue);
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.hero-proof span::first-letter {
  color: var(--green);
}

.hero-visual {
  min-height: 380px;
}

.orbit-ring,
.orbit-core,
.orbit-card {
  position: absolute;
}

.orbit-ring {
  left: 50%;
  top: 50%;
  border: 1px dashed color-mix(in srgb, var(--blue) 24%, transparent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ring-one {
  width: 300px;
  height: 300px;
}

.ring-two {
  width: 220px;
  height: 220px;
  border-color: color-mix(in srgb, var(--purple) 24%, transparent);
}

.orbit-core {
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 132px;
  height: 132px;
  display: grid;
  place-content: center;
  gap: 5px;
  color: white;
  background: linear-gradient(145deg, var(--blue), var(--purple));
  border: 9px solid color-mix(in srgb, var(--surface-solid) 78%, transparent);
  border-radius: 50%;
  box-shadow: 0 22px 44px color-mix(in srgb, var(--blue) 32%, transparent);
  transform: translate(-50%, -50%);
  text-align: center;
}

.orbit-core span {
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.orbit-core small {
  color: rgba(255, 255, 255, 0.76);
  font-size: 10px;
  letter-spacing: 0.13em;
}

.orbit-card {
  z-index: 4;
  min-width: 118px;
  display: grid;
  gap: 2px;
  padding: 13px 15px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 15px 34px rgba(68, 91, 132, 0.13);
}

.orbit-card b {
  font-size: 14px;
}

.orbit-card small {
  color: var(--ink-soft);
  font-size: 9px;
}

.orbit-card::before {
  content: "";
  position: absolute;
  left: 13px;
  top: -4px;
  width: 28px;
  height: 7px;
  background: var(--tone);
  border-radius: 99px;
}

.orbit-card-a {
  --tone: var(--blue);
  left: 1%;
  top: 18%;
}

.orbit-card-b {
  --tone: var(--purple);
  right: 1%;
  top: 12%;
}

.orbit-card-c {
  --tone: var(--coral);
  right: -1%;
  top: 55%;
}

.orbit-card-d {
  --tone: var(--amber);
  left: 10%;
  bottom: 3%;
}

.orbit-card-e {
  --tone: var(--green);
  right: 20%;
  bottom: 0;
}

.stats {
  margin-top: 20px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px;
  border: 0;
  background: var(--surface-solid);
  box-shadow: 0 9px 26px rgba(68, 91, 132, 0.07);
}

.stat i {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--tone);
  background: var(--tone-soft);
  border-radius: 13px;
  font-size: 14px;
  font-style: normal;
  font-weight: 850;
}

.stat strong {
  color: var(--tone);
  font-family: var(--sans);
  font-size: 25px;
}

.section-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.section-head h2 {
  font-family: var(--sans);
  font-weight: 900;
  letter-spacing: -0.035em;
}

.visual-section {
  margin-top: 54px;
}

.capability-map {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.capability-card {
  position: relative;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  overflow: hidden;
  color: var(--ink);
  background: linear-gradient(155deg, var(--surface-solid) 46%, var(--tone-soft));
  border: 1px solid color-mix(in srgb, var(--tone) 17%, var(--line));
  border-radius: 20px;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.capability-card::after {
  content: "";
  position: absolute;
  width: 110px;
  height: 110px;
  right: -55px;
  top: -55px;
  background: color-mix(in srgb, var(--tone) 12%, transparent);
  border-radius: 50%;
}

.capability-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 36px color-mix(in srgb, var(--tone) 16%, transparent);
}

.capability-index {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--tone);
  background: var(--tone-soft);
  border-radius: 11px;
  font-size: 11px;
  font-weight: 850;
}

.capability-copy h3 {
  margin: 28px 0 7px;
  font-size: 17px;
}

.capability-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.65;
}

.capability-count {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: auto;
  color: var(--tone);
}

.capability-count strong {
  font-size: 25px;
}

.capability-count span {
  font-size: 10px;
  font-weight: 700;
}

.journey-section {
  padding: 32px 30px 28px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 14px 38px rgba(68, 91, 132, 0.07);
}

.journey-section .section-head {
  margin-top: 0;
}

.journey-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  padding-top: 6px;
}

.journey-track::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 7%;
  right: 7%;
  top: 52px;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--purple), var(--coral), var(--amber), var(--green), var(--cyan), var(--pink));
  border-radius: 99px;
  opacity: 0.3;
}

.journey-step {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
}

.journey-number {
  color: var(--tone);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.journey-step i {
  width: 24px;
  height: 24px;
  background: var(--tone);
  border: 6px solid var(--tone-soft);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--surface-solid);
  transition: transform 160ms ease;
}

.journey-step:hover i {
  transform: scale(1.22);
}

.journey-step b {
  font-size: 11px;
  text-align: center;
}

.entry-card,
.skill-card,
.volume-card {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--tone, var(--blue)) 14%, var(--line));
  background: linear-gradient(155deg, var(--surface-solid) 66%, var(--tone-soft, var(--blue-soft)));
}

.entry-card::before,
.skill-card::before,
.volume-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 4px;
  background: var(--tone, var(--blue));
}

.entry-card:hover,
.skill-card:hover,
.volume-card:hover {
  border-color: color-mix(in srgb, var(--tone, var(--blue)) 35%, var(--line));
  box-shadow: 0 18px 36px color-mix(in srgb, var(--tone, var(--blue)) 13%, transparent);
}

.entry-card .card-kicker,
.skill-card .card-kicker,
.volume-card .card-kicker,
.entry-card .card-meta,
.skill-card .card-meta {
  color: var(--tone, var(--blue));
}

.skill-card {
  border-top: 1px solid color-mix(in srgb, var(--tone) 14%, var(--line));
}

.doc-header {
  position: relative;
  padding: 30px;
  background: linear-gradient(145deg, var(--surface-solid), var(--blue-soft));
  border: 1px solid color-mix(in srgb, var(--blue) 14%, var(--line));
  border-radius: 22px;
}

.doc-header::before {
  content: "";
  position: absolute;
  left: 30px;
  top: -4px;
  width: 72px;
  height: 8px;
  background: linear-gradient(90deg, var(--blue), var(--purple), var(--coral));
  border-radius: 99px;
}

.doc-header h1 {
  font-family: var(--sans);
  font-weight: 900;
}

.doc-meta span,
.doc-meta a {
  background: var(--surface-solid);
  border: 1px solid var(--line);
}

.markdown-body h2 {
  color: var(--ink);
  border-bottom-color: color-mix(in srgb, var(--blue) 18%, var(--line));
}

.markdown-body h2::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 22px;
  margin-right: 10px;
  vertical-align: -2px;
  background: linear-gradient(var(--blue), var(--purple));
  border-radius: 99px;
}

.search-panel {
  border-color: color-mix(in srgb, var(--blue) 24%, var(--line));
}

.search-box > span {
  background: linear-gradient(145deg, var(--blue), var(--purple));
}

.search-result:hover,
.search-result:focus {
  background: var(--blue-soft);
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 38%, transparent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1180px) {
  :root {
    --toc: 0px;
  }

  .workspace {
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
  }

  .toc-panel {
    display: none;
  }

  .volume-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  :root {
    --topbar: 64px;
    --sidebar: min(86vw, 320px);
  }

  .mobile-only {
    display: inline-flex;
  }

  .topbar {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    padding: 0 12px;
  }

  .brand-copy small,
  .search-trigger,
  .offline-badge {
    display: none;
  }

  .brand {
    justify-self: start;
  }

  .brand-seal {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }

  .brand-copy strong {
    font-size: 14px;
  }

  .workspace {
    display: block;
  }

  .sidebar {
    z-index: 70;
    transform: translateX(-105%);
    transition: transform 180ms ease;
    background: var(--surface-solid);
  }

  .sidebar.open {
    transform: none;
  }

  .sidebar-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .mobile-scrim {
    position: fixed;
    z-index: 60;
    inset: var(--topbar) 0 0;
    background: rgba(10, 14, 13, 0.5);
  }

  main {
    padding: 24px 16px 72px;
  }

  .hero {
    padding: 32px 24px;
    border-radius: 20px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-grid,
  .skill-grid,
  .volume-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
    gap: 6px;
  }

  .doc-header h1 {
    font-size: 34px;
  }

  .markdown-body h2 {
    font-size: 24px;
  }
}

@media print {
  .topbar,
  .sidebar,
  .toc-panel,
  .search-dialog,
  .hero-actions,
  .doc-meta {
    display: none !important;
  }

  .workspace,
  main {
    display: block;
    padding: 0;
  }

  body {
    background: white;
  }

  .doc-shell {
    max-width: none;
  }
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 760px;
  }

  .hero-visual {
    width: min(540px, 100%);
    margin: 0 auto;
  }

  .capability-map {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .journey-track {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px 8px;
  }

  .journey-track::before {
    display: none;
  }

  .journey-step {
    min-height: 92px;
    align-content: center;
    padding: 10px;
    background: var(--tone-soft);
    border-radius: 14px;
  }
}

@media (max-width: 820px) {
  .hero {
    min-height: 0;
    gap: 30px;
    padding: 30px 22px;
  }

  .hero h1 {
    font-size: clamp(37px, 11vw, 50px);
  }

  .hero p {
    font-size: 15px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions a {
    width: 100%;
  }

  .hero-visual {
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .orbit-ring {
    display: none;
  }

  .orbit-card,
  .orbit-core {
    position: relative;
    inset: auto;
    width: auto;
    height: auto;
    min-width: 0;
    transform: none;
  }

  .orbit-core {
    order: -1;
    grid-column: 1 / -1;
    padding: 22px;
    border-width: 7px;
    border-radius: 20px;
  }

  .orbit-card-e {
    grid-column: 1 / -1;
  }

  .capability-map {
    grid-template-columns: 1fr;
  }

  .capability-card {
    min-height: 156px;
  }

  .capability-copy h3 {
    margin-top: 20px;
  }

  .journey-section {
    padding: 24px 18px;
  }

  .journey-track {
    grid-template-columns: 1fr;
  }

  .journey-step {
    min-height: 0;
    grid-template-columns: 34px 24px 1fr;
    justify-items: start;
    padding: 12px 14px;
  }

  .journey-step b {
    align-self: center;
    font-size: 12px;
    text-align: left;
  }

  .journey-number {
    align-self: center;
  }

  .doc-header {
    padding: 24px 20px;
  }

  .doc-header::before {
    left: 20px;
  }
}

/* v1.5 separate role learning systems */

.topbar {
  grid-template-columns: var(--sidebar) auto minmax(240px, 1fr) auto;
  gap: 16px;
}

.track-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--paper-deep);
  border-radius: 11px;
}

.track-switcher a {
  padding: 7px 10px;
  color: var(--ink-soft);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.track-switcher a:hover {
  color: var(--ink);
  background: var(--surface-solid);
}

.track-switcher a.active {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  box-shadow: 0 6px 14px color-mix(in srgb, var(--blue) 20%, transparent);
}

.track-switcher a.product-active {
  background: linear-gradient(135deg, var(--blue), var(--purple));
}

.track-switcher a.project-active {
  background: linear-gradient(135deg, var(--green), var(--cyan));
}

.product-seal {
  background: linear-gradient(145deg, var(--blue), var(--purple));
}

.project-seal {
  background: linear-gradient(145deg, var(--green), var(--cyan));
}

body[data-track="overview"] .sidebar {
  display: none;
}

body[data-track="overview"] .workspace {
  grid-template-columns: minmax(0, 1fr);
}

body[data-track="overview"] main {
  grid-column: 1;
  max-width: 1680px;
  margin: 0 auto;
}

body[data-track="overview"] .toc-panel {
  display: none;
}

body[data-track="overview"] .topbar {
  grid-template-columns: 260px auto minmax(240px, 1fr) auto;
}

.role-choice-hero {
  max-width: 940px;
  margin: 22px auto 38px;
  text-align: center;
}

.role-choice-hero h1 {
  margin: 10px 0 18px;
  color: var(--ink);
  font-size: clamp(44px, 6.5vw, 78px);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.06em;
}

.role-choice-hero h1 em {
  color: transparent;
  background: linear-gradient(90deg, var(--blue), var(--purple), var(--coral), var(--green));
  background-clip: text;
  -webkit-background-clip: text;
  font-style: normal;
}

.role-choice-hero p {
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.8;
}

.role-portal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.role-portal {
  position: relative;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 4vw, 46px);
  overflow: hidden;
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--role-primary) 20%, var(--line));
  border-radius: 30px;
  text-decoration: none;
  box-shadow: 0 24px 60px color-mix(in srgb, var(--role-primary) 11%, transparent);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.role-portal::before,
.role-portal::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.role-portal::before {
  width: 300px;
  height: 300px;
  top: -180px;
  right: -90px;
  background: color-mix(in srgb, var(--role-primary) 12%, transparent);
}

.role-portal::after {
  width: 180px;
  height: 180px;
  bottom: -110px;
  left: -70px;
  border: 30px solid color-mix(in srgb, var(--role-secondary) 10%, transparent);
}

.role-portal:hover {
  transform: translateY(-7px);
  box-shadow: 0 34px 72px color-mix(in srgb, var(--role-primary) 18%, transparent);
}

.role-product {
  --role-primary: var(--blue);
  --role-secondary: var(--purple);
  background: linear-gradient(145deg, var(--surface-solid), var(--blue-soft));
}

.role-project {
  --role-primary: var(--green);
  --role-secondary: var(--cyan);
  background: linear-gradient(145deg, var(--surface-solid), var(--green-soft));
}

.role-portal-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 13px;
}

.role-symbol {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, var(--role-primary), var(--role-secondary));
  border-radius: 17px;
  box-shadow: 0 12px 24px color-mix(in srgb, var(--role-primary) 25%, transparent);
  font-size: 22px;
  font-weight: 900;
}

.role-badge {
  color: var(--role-primary);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
}

.role-portal h2 {
  position: relative;
  z-index: 1;
  margin: 36px 0 12px;
  font-size: clamp(32px, 4vw, 50px);
  letter-spacing: -0.045em;
}

.role-portal > p {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.8;
}

.mini-flow {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin: 36px 0;
}

.mini-flow span {
  min-width: 58px;
  padding: 10px 8px;
  color: var(--role-primary);
  background: var(--surface-solid);
  border: 1px solid color-mix(in srgb, var(--role-primary) 18%, var(--line));
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.mini-flow i {
  height: 3px;
  background: linear-gradient(90deg, var(--role-primary), var(--role-secondary));
  border-radius: 99px;
  opacity: 0.45;
}

.role-outcome {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  padding: 18px;
  background: color-mix(in srgb, var(--surface-solid) 72%, transparent);
  border: 1px solid color-mix(in srgb, var(--role-primary) 16%, var(--line));
  border-radius: 16px;
}

.role-outcome small {
  color: var(--ink-soft);
  font-size: 10px;
}

.role-outcome strong {
  color: var(--role-primary);
  font-size: 13px;
}

.role-enter {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 28px;
  color: var(--role-primary);
  font-size: 12px;
  font-weight: 850;
}

.role-bridge {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 14px;
  margin: 26px 0;
}

.bridge-side,
.bridge-core {
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 22px;
  border-radius: 18px;
  text-align: center;
}

.bridge-side {
  background: var(--surface-solid);
  border: 1px solid var(--line);
}

.bridge-side b {
  font-size: 12px;
}

.bridge-side span,
.bridge-core small {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.55;
}

.product-side b {
  color: var(--blue);
}

.project-side b {
  color: var(--green);
}

.bridge-core {
  min-width: 220px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--purple), var(--green));
  box-shadow: 0 15px 30px color-mix(in srgb, var(--blue) 20%, transparent);
}

.bridge-core span {
  font-size: 9px;
  letter-spacing: 0.14em;
}

.bridge-core strong {
  font-size: 13px;
}

.bridge-core small {
  color: rgba(255, 255, 255, 0.76);
}

.overview-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.overview-actions a {
  display: grid;
  gap: 6px;
  padding: 20px;
  color: var(--ink);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 15px;
  text-decoration: none;
}

.overview-actions a:hover {
  border-color: var(--blue);
}

.overview-actions b {
  font-size: 12px;
}

.overview-actions span {
  color: var(--ink-soft);
  font-size: 10px;
}

.track-hero {
  position: relative;
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: center;
  gap: 50px;
  padding: clamp(30px, 5vw, 58px);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--role-primary) 20%, var(--line));
  border-radius: 28px;
  box-shadow: 0 26px 70px color-mix(in srgb, var(--role-primary) 12%, transparent);
}

.track-hero::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -150px;
  top: -150px;
  border: 45px solid color-mix(in srgb, var(--role-secondary) 10%, transparent);
  border-radius: 50%;
}

.track-hero-copy,
.learning-progress {
  position: relative;
  z-index: 1;
}

.track-back,
.doc-back {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}

.track-back:hover,
.doc-back:hover {
  color: var(--role-primary, var(--blue));
}

.track-hero h1 {
  max-width: 780px;
  margin: 10px 0 18px;
  font-size: clamp(36px, 5vw, 61px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.track-hero-copy > p {
  max-width: 720px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.8;
}

.role-formula {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}

.role-formula span {
  padding: 7px 10px;
  color: var(--role-primary);
  background: color-mix(in srgb, var(--surface-solid) 76%, transparent);
  border: 1px solid color-mix(in srgb, var(--role-primary) 18%, var(--line));
  border-radius: 9px;
  font-size: 10px;
  font-weight: 800;
}

.role-formula i {
  color: var(--ink-soft);
  font-size: 10px;
  font-style: normal;
}

.learning-progress {
  display: grid;
  justify-items: center;
  gap: 20px;
}

.progress-ring {
  width: 220px;
  height: 220px;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--role-primary) var(--progress), color-mix(in srgb, var(--role-primary) 12%, var(--surface-solid)) 0);
  border-radius: 50%;
  box-shadow: 0 18px 44px color-mix(in srgb, var(--role-primary) 18%, transparent);
}

.progress-ring > div {
  width: 164px;
  height: 164px;
  display: grid;
  place-content: center;
  gap: 5px;
  background: var(--surface-solid);
  border-radius: 50%;
  text-align: center;
}

.progress-ring strong {
  color: var(--role-primary);
  font-size: 38px;
  line-height: 1;
}

.progress-ring span {
  color: var(--ink-soft);
  font-size: 10px;
}

.progress-caption {
  display: grid;
  gap: 4px;
  text-align: center;
}

.progress-caption b {
  color: var(--role-primary);
  font-size: 12px;
}

.progress-caption span {
  color: var(--ink-soft);
  font-size: 9px;
}

.track-section {
  margin-top: 52px;
}

.learning-path {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.learning-stage {
  position: relative;
  min-height: 310px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  overflow: hidden;
  background: linear-gradient(150deg, var(--surface-solid) 62%, var(--tone-soft));
  border: 1px solid color-mix(in srgb, var(--tone) 18%, var(--line));
  border-radius: 20px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.learning-stage:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px color-mix(in srgb, var(--tone) 13%, transparent);
}

.learning-stage.is-complete {
  background: linear-gradient(150deg, var(--surface-solid) 45%, var(--green-soft));
  border-color: color-mix(in srgb, var(--green) 35%, var(--line));
}

.stage-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}

.stage-top > span {
  color: var(--tone);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.stage-top i {
  height: 2px;
  background: color-mix(in srgb, var(--tone) 25%, var(--line));
}

.stage-top small {
  color: var(--tone);
  font-size: 9px;
  font-weight: 750;
}

.is-complete .stage-top small {
  color: var(--green);
}

.learning-stage > a {
  display: flex;
  flex: 1;
  flex-direction: column;
  color: var(--ink);
  text-decoration: none;
}

.learning-stage h3 {
  margin: 28px 0 8px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.learning-stage p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.65;
}

.stage-output {
  display: grid;
  gap: 5px;
  margin-top: auto;
  padding: 14px;
  background: color-mix(in srgb, var(--surface-solid) 74%, transparent);
  border-radius: 12px;
}

.stage-output small {
  color: var(--ink-soft);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.stage-output b {
  color: var(--tone);
  font-size: 10px;
}

.learning-stage > button {
  width: 100%;
  margin-top: 12px;
  padding: 9px 12px;
  color: var(--tone);
  background: var(--tone-soft);
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}

.learning-stage.is-complete > button {
  color: var(--green);
  background: var(--green-soft);
}

.role-capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.role-capability {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 18px;
  color: var(--ink);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 16px;
  text-decoration: none;
}

.role-capability:hover {
  border-color: var(--tone);
  box-shadow: 0 12px 26px color-mix(in srgb, var(--tone) 10%, transparent);
}

.role-capability > span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--tone);
  background: var(--tone-soft);
  border-radius: 14px;
  font-weight: 900;
}

.role-capability h3 {
  margin: 0 0 5px;
  font-size: 13px;
}

.role-capability p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.55;
}

.role-capability > i {
  color: var(--tone);
  font-style: normal;
}

.artifact-section {
  padding: 28px;
  background: linear-gradient(145deg, var(--surface-solid), var(--paper-deep));
  border: 1px solid var(--line);
  border-radius: 24px;
}

.artifact-section .section-head {
  margin-top: 0;
}

.artifact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.artifact-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  padding: 18px;
  color: var(--ink);
  background: var(--surface-solid);
  border: 1px solid color-mix(in srgb, var(--tone) 18%, var(--line));
  border-radius: 16px;
  text-decoration: none;
}

.artifact-card > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--tone);
  background: var(--tone-soft);
  border-radius: 9px;
  font-size: 9px;
  font-weight: 850;
}

.artifact-card h3 {
  margin: 22px 0 8px;
  font-size: 14px;
}

.artifact-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.6;
}

.artifact-card b {
  margin-top: auto;
  color: var(--tone);
  font-size: 9px;
}

.doc-back {
  margin-bottom: 10px;
}

.site-legal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(20px, 4vw, 56px);
  color: var(--ink-soft);
  background: var(--paper);
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.6;
}

.site-legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.site-legal-footer a {
  color: inherit;
  text-underline-offset: 3px;
}

.site-legal-footer a:hover {
  color: var(--accent-strong);
}

.legal-body {
  min-height: 100vh;
  background: var(--paper-deep);
}

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(20px, 5vw, 72px);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.legal-header .brand {
  width: auto;
}

.legal-header nav {
  display: flex;
  gap: 16px;
  font-size: 13px;
}

.legal-header nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

.legal-main {
  width: min(820px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0 88px;
}

.legal-main h1 {
  margin: 10px 0 12px;
  font: 850 clamp(38px, 7vw, 64px)/1.08 var(--serif);
  letter-spacing: -0.05em;
}

.legal-updated {
  margin: 0 0 44px;
  color: var(--ink-soft);
}

.legal-section {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.legal-section h2 {
  margin: 0 0 12px;
  font: 750 22px/1.35 var(--serif);
}

.legal-section p,
.legal-section li {
  color: var(--ink-soft);
  line-height: 1.85;
}

.legal-section ul {
  padding-left: 22px;
}

.legal-section a {
  color: var(--accent-strong);
  text-underline-offset: 3px;
}

@media (max-width: 1320px) {
  .topbar,
  body[data-track="overview"] .topbar {
    grid-template-columns: var(--sidebar) auto minmax(190px, 1fr) auto;
  }

  .offline-badge {
    display: none;
  }
}

@media (max-width: 1100px) {
  .track-switcher a {
    padding-inline: 8px;
  }

  .track-hero {
    grid-template-columns: 1fr;
  }

  .learning-progress {
    grid-template-columns: auto 1fr;
    justify-items: start;
  }

  .progress-ring {
    width: 160px;
    height: 160px;
  }

  .progress-ring > div {
    width: 118px;
    height: 118px;
  }

  .progress-ring strong {
    font-size: 28px;
  }

  .learning-path,
  .role-capability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .artifact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .site-legal-footer,
  .legal-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-legal-footer nav {
    gap: 10px 14px;
  }

  .legal-main {
    padding-top: 42px;
  }

  .track-switcher {
    display: none;
  }

  .topbar,
  body[data-track="overview"] .topbar {
    grid-template-columns: auto 1fr auto;
  }

  body[data-track="overview"] .workspace {
    display: block;
  }

  .role-choice-hero {
    margin-top: 8px;
  }

  .role-choice-hero h1 {
    font-size: clamp(40px, 13vw, 60px);
  }

  .role-choice-hero p {
    font-size: 14px;
  }

  .role-portal-grid,
  .overview-actions {
    grid-template-columns: 1fr;
  }

  .role-portal {
    min-width: 0;
    min-height: 450px;
    padding: 28px 24px;
  }

  .mini-flow {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .mini-flow i {
    display: none;
  }

  .mini-flow span {
    min-width: 0;
    padding-inline: 5px;
  }

  .role-bridge {
    grid-template-columns: 1fr;
  }

  .bridge-core {
    min-width: 0;
    order: -1;
  }

  .track-hero {
    min-height: 0;
    padding: 28px 22px;
  }

  .track-hero h1 {
    font-size: clamp(36px, 10.5vw, 50px);
  }

  .learning-progress {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .learning-path,
  .role-capability-grid,
  .artifact-grid {
    grid-template-columns: 1fr;
  }

  .learning-stage {
    min-height: 290px;
  }

  .artifact-section {
    padding: 22px 16px;
  }
}
