:root {
  color-scheme: light;
  --bg: #f7faff;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #fcfdff;
  --surface-soft: #eef5ff;
  --text: #071633;
  --muted: #607092;
  --muted-strong: #35466a;
  --line: rgba(23, 61, 119, 0.12);
  --line-strong: rgba(23, 61, 119, 0.22);
  --primary: #1266f1;
  --primary-strong: #004ed6;
  --primary-soft: #e8f1ff;
  --cyan: #10a6c8;
  --green: #0f9f74;
  --orange: #e8841d;
  --purple: #7257d7;
  --danger: #c2414b;
  --shadow: 0 18px 55px rgba(20, 55, 105, 0.11);
  --shadow-soft: 0 10px 30px rgba(20, 55, 105, 0.08);
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --sidebar-width: 292px;
  --right-width: 322px;
  --topbar-height: 76px;
  --content-max: 1160px;
  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07101f;
  --surface: rgba(13, 25, 46, 0.82);
  --surface-strong: #0d192e;
  --surface-soft: #10213b;
  --text: #ecf4ff;
  --muted: #9db1d5;
  --muted-strong: #c7d5ee;
  --line: rgba(144, 179, 238, 0.16);
  --line-strong: rgba(144, 179, 238, 0.26);
  --primary: #6ca4ff;
  --primary-strong: #9bc2ff;
  --primary-soft: rgba(42, 109, 219, 0.18);
  --cyan: #5ed7ef;
  --green: #60d2aa;
  --orange: #ffb156;
  --purple: #a999ff;
  --danger: #ff8792;
  --shadow: 0 18px 65px rgba(0, 0, 0, 0.32);
  --shadow-soft: 0 10px 32px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 74% 8%, rgba(69, 130, 255, 0.12), transparent 34rem),
    linear-gradient(180deg, var(--bg), #fbfdff 44%, var(--bg));
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 72% 8%, rgba(60, 117, 228, 0.16), transparent 36rem),
    linear-gradient(180deg, #07101f, #0b1628 46%, #07101f);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.3), transparent 58%);
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.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;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  transform: translateY(-160%);
  border: 2px solid var(--primary);
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--primary-strong);
  padding: 8px 12px;
  font-weight: 750;
  box-shadow: var(--shadow-soft);
}

.skip-link:focus {
  transform: translateY(0);
}

.reading-progress {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  box-shadow: 0 0 16px rgba(18, 102, 241, 0.4);
  transform: scaleX(0);
  transform-origin: left center;
}

@supports (animation-timeline: scroll()) {
  .reading-progress {
    animation: readingProgress linear both;
    animation-timeline: scroll(root block);
  }
}

@supports not (animation-timeline: scroll()) {
  .reading-progress {
    transform: scaleX(1);
    opacity: 0.42;
  }
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: rgba(248, 251, 255, 0.82);
  backdrop-filter: blur(18px);
  padding: 22px 18px;
  z-index: 30;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

html[data-theme="dark"] .sidebar {
  background: rgba(9, 18, 33, 0.88);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.brand strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: 0;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: url("site-icon.svg") center / contain no-repeat;
  box-shadow: 0 12px 30px rgba(18, 102, 241, 0.24);
}

.brand-mark::before,
.brand-mark::after {
  content: none;
}

.brand-mobile {
  display: none;
}

.sidebar-section {
  margin-top: 26px;
}

.nav-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-item,
.nav-subitem {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--muted-strong);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-item > span:last-child {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.nav-item strong,
.nav-item small {
  display: block;
}

.nav-item strong {
  line-height: 1.18;
}

.nav-item small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.nav-item:hover,
.nav-subitem:hover {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.nav-item.is-active,
.nav-subitem.is-active {
  background: linear-gradient(90deg, rgba(18, 102, 241, 0.13), rgba(18, 102, 241, 0.05));
  color: var(--primary-strong);
  font-weight: 700;
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--primary);
}

.nav-sublist {
  display: grid;
  gap: 2px;
  margin: 4px 0 14px 29px;
  padding: 0 0 0 14px;
  list-style: none;
  border-left: 1px solid var(--line-strong);
}

.nav-subitem {
  padding: 7px 10px;
  font-size: 13px;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.nav-subitem strong {
  color: inherit;
  font-size: 13px;
  line-height: 1.32;
}

.nav-subitem small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  height: var(--topbar-height);
  display: grid;
  grid-template-columns: minmax(280px, 560px) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px);
}

html[data-theme="dark"] .topbar {
  background: rgba(7, 16, 31, 0.84);
}

.search-wrap {
  position: relative;
  max-width: 620px;
}

.search-wrap input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  padding: 0 18px 0 42px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.search-wrap::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 16px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--muted);
  border-radius: 999px;
}

.search-wrap::after {
  content: "";
  position: absolute;
  left: 27px;
  top: 29px;
  width: 7px;
  height: 2px;
  background: var(--muted);
  transform: rotate(45deg);
}

.search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: 52px;
  display: none;
  max-height: 420px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.search-results.is-open {
  display: grid;
  gap: 6px;
}

.search-result {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
}

.search-result.is-active,
.search-result:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  background: var(--primary-soft);
}

.search-result:hover,
.search-result.is-active {
  background: var(--primary-soft);
}

.search-result small {
  color: var(--muted);
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.ghost-button,
.primary-button,
.chip-button,
.icon-button {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.58) inset;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.ghost-button:hover,
.chip-button:hover,
.icon-button:hover {
  border-color: rgba(18, 102, 241, 0.4);
  color: var(--primary-strong);
}

.ghost-button:active,
.primary-button:active,
.chip-button:active,
.icon-button:active {
  transform: translateY(1px);
}

.primary-button {
  border-color: transparent;
  background: linear-gradient(180deg, var(--primary), var(--primary-strong));
  color: #f8fbff;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(18, 102, 241, 0.28);
}

.primary-button:hover {
  color: #f8fbff;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  padding: 0;
}

.icon-lines,
.icon-lines::before,
.icon-lines::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.icon-lines {
  position: relative;
}

.icon-lines::before,
.icon-lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.icon-lines::before {
  top: -6px;
}

.icon-lines::after {
  top: 6px;
}

.main-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--content-max)) var(--right-width);
  gap: 28px;
  align-items: start;
  padding: 34px 28px 80px;
  max-width: 1600px;
  width: 100%;
  flex: 1;
  margin: 0 auto;
}

.content-surface {
  min-width: 0;
  outline: none;
}

.right-rail {
  position: sticky;
  top: calc(var(--topbar-height) + 24px);
  display: grid;
  gap: 16px;
  max-height: calc(100vh - var(--topbar-height) - 40px);
  overflow: auto;
}

.panel,
.article-card,
.hero-card,
.entry-card,
.diagram-card,
.term-card,
.resource-card,
.company-card,
.route-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.panel {
  padding: 18px;
}

.panel h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.toc-list,
.rail-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc-list a,
.rail-list a {
  display: block;
  padding: 6px 8px;
  border-left: 2px solid var(--line-strong);
  color: var(--muted-strong);
  font-size: 13px;
}

.toc-list a:hover,
.toc-list a.is-active {
  border-left-color: var(--primary);
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-radius: 0 8px 8px 0;
}

.rail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag,
.meta-pill,
.term {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 650;
}

.term {
  cursor: help;
  border-style: dashed;
}

.term:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 0.92fr;
  gap: 34px;
  align-items: center;
  min-height: 520px;
  padding: 28px 0 12px;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  color: var(--text);
  font-size: 58px;
  line-height: 1.02;
  letter-spacing: 0;
}

.hero h1 span,
.page-hero h1 span {
  color: var(--primary);
}

.hero .subtitle,
.page-hero .subtitle {
  margin: 18px 0 0;
  color: var(--primary-strong);
  font-size: 24px;
  line-height: 1.35;
}

.hero .description,
.page-hero .description {
  margin: 18px 0 0;
  max-width: 64ch;
  color: var(--muted-strong);
  font-size: 16px;
}

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

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--muted-strong);
  font-size: 13px;
}

.hero-card {
  min-height: 430px;
  overflow: hidden;
  position: relative;
  display: grid;
  place-items: center;
  padding: 10px;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 14%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(18, 102, 241, 0.15), transparent 64%);
}

.hero-generated-image {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  aspect-ratio: 3 / 2;
  object-fit: contain;
  filter: drop-shadow(0 24px 44px rgba(18, 102, 241, 0.18));
}

.entry-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(300px, 0.72fr);
  grid-template-areas:
    "foundation platform"
    "foundation application";
  gap: 18px;
  align-items: stretch;
}

.entry-card:nth-child(1) { grid-area: foundation; }
.entry-card:nth-child(2) { grid-area: platform; }
.entry-card:nth-child(3) { grid-area: application; }

.entry-card {
  position: relative;
  overflow: hidden;
  min-height: 310px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.entry-card:first-child {
  min-height: 430px;
  padding: 34px;
}

.entry-card:not(:first-child) {
  min-height: 206px;
}

.entry-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -34px;
  width: 210px;
  height: 210px;
  border-radius: 36px;
  background: linear-gradient(135deg, rgba(18, 102, 241, 0.14), rgba(16, 166, 200, 0.06));
  transform: rotate(18deg);
}

.entry-card[data-tone="green"]::after {
  background: linear-gradient(135deg, rgba(15, 159, 116, 0.15), rgba(16, 166, 200, 0.07));
}

.entry-card[data-tone="orange"]::after {
  background: linear-gradient(135deg, rgba(232, 132, 29, 0.17), rgba(255, 195, 91, 0.08));
}

.entry-card h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 24px;
}

.entry-card p,
.entry-card ul,
.entry-card a {
  position: relative;
  z-index: 1;
}

.entry-card p {
  color: var(--muted-strong);
}

.entry-card ul {
  margin: 16px 0 22px;
  padding-left: 19px;
  color: var(--muted-strong);
}

.hot-row {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.hot-row::-webkit-scrollbar {
  display: none;
}

.hot-row > strong,
.hot-row .tag {
  flex: 0 0 auto;
  white-space: nowrap;
}

.section-block {
  margin: 28px 0;
}

.section-heading {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.25;
}

.section-heading p {
  margin: 0;
  max-width: 72ch;
  color: var(--muted);
}

.home-route-grid,
.concept-entry-grid,
.showcase-grid,
.principle-grid,
.knowledge-part-grid,
.route-map-grid,
.definition-grid,
.split-note-grid {
  display: grid;
  gap: 14px;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

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

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

.concept-entry-grid,
.showcase-grid,
.definition-grid,
.split-note-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-route-card,
.concept-entry-card,
.showcase-card,
.principle-card,
.knowledge-part-card,
.route-map-card,
.definition-grid article,
.split-note-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 18px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: inline-grid;
  place-items: center;
  margin: 0 0 12px;
  color: var(--primary-strong);
  background: linear-gradient(180deg, var(--primary-soft), rgba(255, 255, 255, 0.72));
  border: 1px solid rgba(18, 102, 241, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 10px 22px rgba(18, 102, 241, 0.08);
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
}

.card-icon.small {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  margin-bottom: 10px;
}

.card-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.entry-card[data-tone="green"] .card-icon,
.knowledge-part-card[data-tone="1"] .card-icon {
  color: var(--green);
  background: linear-gradient(180deg, rgba(15, 159, 116, 0.13), rgba(255, 255, 255, 0.72));
  border-color: rgba(15, 159, 116, 0.18);
}

.entry-card[data-tone="orange"] .card-icon,
.knowledge-part-card[data-tone="2"] .card-icon {
  color: var(--orange);
  background: linear-gradient(180deg, rgba(232, 132, 29, 0.14), rgba(255, 255, 255, 0.72));
  border-color: rgba(232, 132, 29, 0.2);
}

html[data-theme="dark"] .card-icon {
  background: linear-gradient(180deg, rgba(108, 164, 255, 0.18), rgba(13, 25, 46, 0.72));
  border-color: rgba(144, 179, 238, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 22px rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] .entry-card[data-tone="green"] .card-icon,
html[data-theme="dark"] .knowledge-part-card[data-tone="1"] .card-icon {
  background: linear-gradient(180deg, rgba(96, 210, 170, 0.16), rgba(13, 25, 46, 0.72));
}

html[data-theme="dark"] .entry-card[data-tone="orange"] .card-icon,
html[data-theme="dark"] .knowledge-part-card[data-tone="2"] .card-icon {
  background: linear-gradient(180deg, rgba(255, 177, 86, 0.16), rgba(13, 25, 46, 0.72));
}

.home-route-card strong,
.concept-entry-card span,
.showcase-card strong,
.principle-card strong,
.knowledge-part-card strong,
.route-map-card strong,
.definition-grid strong,
.split-note-grid strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  margin-bottom: 8px;
  text-align: left;
}

.concept-entry-card p,
.showcase-card p,
.principle-card p,
.knowledge-part-card p,
.route-map-card p,
.definition-grid p,
.split-note-grid p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 14px;
  text-align: left;
}

.route-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: auto;
  padding: 8px 2px 4px;
}

.route-node {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--muted-strong);
  padding: 7px 10px;
  font-size: 12px;
  position: relative;
}

.route-node:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 50%;
  width: 10px;
  height: 1px;
  background: var(--line-strong);
}

.concept-entry-card {
  position: relative;
  overflow: hidden;
  min-height: 128px;
}

.concept-entry-card::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -26px;
  width: 86px;
  height: 86px;
  border-radius: 28px;
  background: var(--primary-soft);
  transform: rotate(18deg);
}

.concept-entry-card span,
.concept-entry-card p {
  position: relative;
  z-index: 1;
}

.foundation-preview {
  display: grid;
  grid-template-columns: 0.72fr 1fr;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 18px;
  align-items: stretch;
}

.preview-copy {
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.preview-copy h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.preview-copy p {
  margin: 0 0 16px;
  color: var(--muted-strong);
}

.preview-list {
  display: grid;
  gap: 10px;
  grid-auto-rows: 1fr;
}

.preview-item {
  display: grid;
  gap: 4px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  padding: 13px 14px;
}

.preview-item strong {
  color: var(--text);
}

.preview-item span {
  color: var(--muted-strong);
  font-size: 13px;
}

.showcase-card {
  min-height: 176px;
  overflow: hidden;
  position: relative;
}

.showcase-mini-bars {
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 90px;
  height: 56px;
}

.token-strip {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 18px;
  display: flex;
  gap: 7px;
  overflow: hidden;
}

.token-strip i {
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  padding: 5px 8px;
  font-style: normal;
  font-size: 12px;
}

.mini-network {
  position: absolute;
  right: 22px;
  bottom: 24px;
  width: 86px;
  height: 62px;
  background:
    radial-gradient(circle at 12px 18px, var(--primary) 0 4px, transparent 5px),
    radial-gradient(circle at 48px 10px, var(--cyan) 0 4px, transparent 5px),
    radial-gradient(circle at 74px 34px, var(--primary) 0 4px, transparent 5px),
    radial-gradient(circle at 34px 52px, var(--purple) 0 4px, transparent 5px),
    linear-gradient(32deg, transparent 0 17%, var(--line-strong) 18% 19%, transparent 20%),
    linear-gradient(142deg, transparent 0 30%, var(--line-strong) 31% 32%, transparent 33%);
}

.loop-symbol {
  position: absolute;
  right: 22px;
  bottom: 10px;
  color: var(--primary);
  font-size: 74px;
  line-height: 1;
  opacity: 0.28;
}

.relationship-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  padding: 14px;
}

.relationship-strip.wide {
  margin-top: 14px;
}

.relationship-strip span {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--primary-strong);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
}

.relationship-strip b {
  color: var(--muted);
  font-weight: 700;
}

.knowledge-part-card {
  gap: 12px;
}

.knowledge-part-card[data-tone="0"] {
  border-color: rgba(18, 102, 241, 0.32);
}

.knowledge-part-card[data-tone="1"] {
  border-color: rgba(15, 159, 116, 0.28);
}

.knowledge-part-card[data-tone="2"] {
  border-color: rgba(232, 132, 29, 0.3);
}

.chapter-chip-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.chapter-chip-list a {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--muted-strong);
  padding: 5px 9px;
  font-size: 12px;
}

.chapter-chip-list a:hover {
  color: var(--primary-strong);
  border-color: rgba(18, 102, 241, 0.36);
}

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

.page-hero {
  margin-bottom: 22px;
  padding: 18px 0 10px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb span::after {
  content: "›";
  margin-left: 8px;
  color: var(--muted);
}

.breadcrumb span:last-child::after {
  content: "";
}

.article-card {
  padding: 26px;
  margin: 16px 0;
}

.article-card h2 {
  margin: 0 0 14px;
  font-size: 28px;
  line-height: 1.25;
  scroll-margin-top: calc(var(--topbar-height) + 24px);
}

.article-card h3 {
  margin: 24px 0 10px;
  font-size: 20px;
}

.article-card p {
  margin: 0 0 14px;
  max-width: 78ch;
  color: var(--muted-strong);
  font-size: 16px;
}

.article-card p:last-child {
  margin-bottom: 0;
}

.article-card ul,
.article-card ol {
  max-width: 78ch;
  color: var(--muted-strong);
  padding-left: 22px;
}

.article-card li {
  margin: 6px 0;
}

.lead-box {
  border: 1px solid rgba(18, 102, 241, 0.18);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(18, 102, 241, 0.08), rgba(18, 102, 241, 0.03));
  padding: 20px;
  margin: 18px 0;
}

.one-line {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: var(--surface-soft);
  color: var(--muted-strong);
}

.one-line strong {
  color: var(--primary-strong);
  white-space: nowrap;
}

.section-kicker,
.deep-dive-label {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-bottom: 10px;
  border: 1px solid rgba(18, 102, 241, 0.2);
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.foundation-story-card,
.concept-lab,
.understanding-check {
  position: relative;
  overflow: hidden;
  border-color: rgba(18, 102, 241, 0.22);
}

.foundation-story-card::after,
.concept-lab::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 220px;
  height: 220px;
  right: -110px;
  top: -110px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(18, 102, 241, 0.11), transparent 68%);
  pointer-events: none;
}

.foundation-story-card > *,
.concept-lab > * {
  position: relative;
  z-index: 1;
}

.foundation-story-intro,
.concept-lab-lead {
  color: var(--text) !important;
  font-size: 18px !important;
  line-height: 1.8;
}

.foundation-story-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.foundation-story-step {
  min-height: 174px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--surface-strong), var(--surface-soft));
  padding: 16px;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.foundation-story-step:hover {
  transform: translateY(-2px);
  border-color: rgba(18, 102, 241, 0.34);
  box-shadow: var(--shadow-soft);
}

.foundation-story-step > span,
.concept-lab-steps li > span {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  min-height: 28px;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 900;
}

.foundation-story-step strong {
  color: var(--text);
  font-size: 16px;
}

.foundation-story-step p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.7;
}

.concept-clarifier {
  display: grid;
  grid-template-columns: minmax(118px, 0.26fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border: 1px solid rgba(232, 132, 29, 0.28);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(232, 132, 29, 0.09), var(--surface-strong));
  padding: 15px 16px;
}

.concept-clarifier strong {
  color: var(--orange);
}

.concept-clarifier p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 14px;
}

.concept-lab-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 12px;
  margin: 18px 0 12px;
}

.concept-lab-grid article,
.understanding-check-grid article,
.summary-takeaways article {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  padding: 17px;
}

.concept-lab-grid small,
.understanding-check-grid small,
.summary-takeaways small,
.check-answer small {
  display: block;
  margin-bottom: 7px;
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.concept-lab-grid strong {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 17px;
}

.concept-lab-grid p,
.understanding-check-grid p,
.summary-takeaways p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.75;
}

.concept-lab-analogy {
  background: linear-gradient(155deg, var(--primary-soft), var(--surface-strong)) !important;
}

.concept-lab-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: none !important;
  margin: 12px 0 18px;
  padding: 0 !important;
  list-style: none;
}

.concept-lab-steps li {
  min-height: 144px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  padding: 16px;
}

.concept-lab-steps li p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.7;
}

.understanding-check {
  background: linear-gradient(145deg, var(--surface), rgba(15, 159, 116, 0.055));
  border-color: rgba(15, 159, 116, 0.24);
}

.understanding-check .section-kicker {
  border-color: rgba(15, 159, 116, 0.24);
  background: rgba(15, 159, 116, 0.1);
  color: var(--green);
}

.understanding-check-grid,
.summary-takeaways {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.check-answer {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  overflow: hidden;
}

.check-answer summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 16px;
  cursor: pointer;
  list-style: none;
}

.check-answer summary::-webkit-details-marker {
  display: none;
}

.check-answer summary > span {
  border-radius: 999px;
  background: rgba(15, 159, 116, 0.1);
  color: var(--green);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 850;
}

.check-answer summary > strong {
  color: var(--text);
}

.check-answer > div {
  border-top: 1px solid var(--line);
  padding: 16px;
}

.check-answer > div p {
  margin: 0;
}

.deep-dive-card {
  border-left: 3px solid rgba(18, 102, 241, 0.22);
}

.deep-dive-label {
  background: var(--surface-soft);
  border-color: var(--line);
  color: var(--muted-strong);
}

.deep-dive-lead {
  max-width: 74ch !important;
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--primary-soft);
  padding: 12px 14px;
  color: var(--text) !important;
}

.summary-takeaways {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0;
}

.summary-takeaways article {
  min-height: 142px;
}

.chapter-roadmap-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 14px;
  align-items: stretch;
}

.chapter-roadmap-card {
  min-height: 178px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--surface-strong), var(--surface-soft));
  padding: 16px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.chapter-roadmap-card span {
  display: inline-grid;
  place-items: center;
  min-width: 48px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 900;
}

.chapter-roadmap-card strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
}

.chapter-roadmap-card p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.65;
}

.chapter-sequence {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  margin-top: 16px;
}

.chapter-sequence a,
.chapter-sequence div {
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  padding: 12px 14px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.chapter-sequence small {
  color: var(--muted);
  font-size: 12px;
}

.chapter-sequence strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.sequence-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  margin-top: 18px;
}

.sequence-stage-card {
  height: 380px;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-strong), var(--surface-soft));
  box-shadow: var(--shadow-soft);
  padding: 18px;
  display: grid;
  grid-template-rows: auto auto minmax(82px, auto) 1fr;
  align-items: center;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.sequence-stage-card > span {
  display: inline-grid;
  place-items: center;
  min-width: 64px;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 900;
}

.sequence-stage-card > strong {
  color: var(--text);
  font-size: 17px;
  line-height: 1.45;
}

.sequence-stage-card > p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.72;
}

.sequence-chapter-list {
  align-self: stretch;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: center;
  gap: 8px;
}

.sequence-chapter-list a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.sequence-chapter-list a:hover {
  border-color: rgba(18, 102, 241, 0.34);
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.chapter-expansion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  margin-top: 18px;
}

.chapter-expansion-card {
  min-height: 338px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-strong), var(--surface-soft));
  box-shadow: var(--shadow-soft);
  padding: 18px;
  display: grid;
  grid-template-rows: auto auto minmax(48px, auto) auto auto 1fr;
  align-items: center;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.chapter-expansion-card[data-tone="1"] {
  border-color: rgba(15, 159, 116, 0.26);
}

.chapter-expansion-card[data-tone="2"] {
  border-color: rgba(232, 132, 29, 0.28);
}

.chapter-expansion-title {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.chapter-expansion-title span {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 26px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 900;
}

.chapter-expansion-title strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
}

.chapter-expansion-card > p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.6;
}

.chapter-status-row {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.chapter-status-row b {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--primary-strong);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  font-size: 18px;
}

.chapter-status-row small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.chapter-outline-tags,
.chapter-deep-preview {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.chapter-outline-tags span,
.chapter-deep-preview a {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted-strong);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.chapter-deep-preview {
  align-content: center;
}

.chapter-deep-preview a {
  max-width: 100%;
  border-color: rgba(18, 102, 241, 0.18);
  color: var(--primary-strong);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

.deep-anchor-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 16px;
}

.deep-anchor-strip a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 260px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.deep-anchor-strip a:hover {
  border-color: rgba(18, 102, 241, 0.34);
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.formula {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  padding: 14px 16px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
}

.callout-grid,
.concept-grid,
.company-grid,
.resource-grid,
.routes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

#resource-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  scroll-margin-top: calc(var(--topbar-height) + 24px);
}

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

.mini-card,
.concept-card,
.term-card,
.resource-card,
.company-card,
.route-card {
  padding: 16px;
  height: 100%;
  min-height: 154px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.mini-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
}

.foundation-map-grid .mini-card {
  min-height: 116px;
  padding: 12px 16px;
}

.foundation-map-grid .mini-card strong {
  margin-bottom: 3px;
}

.mini-card strong,
.concept-card summary,
.term-card strong,
.resource-card strong,
.company-card strong,
.route-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 16px;
}

.mini-card p,
.concept-card p,
.term-card p,
.resource-card p,
.company-card p,
.route-card p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.platform-freshness {
  border: 1px solid rgba(18, 102, 241, 0.22);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--primary-soft) 64%, var(--surface));
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.platform-freshness-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 5px rgba(18, 102, 241, 0.1);
}

.platform-freshness strong {
  color: var(--text);
  font-size: 14px;
}

.platform-freshness p {
  margin: 4px 0 0;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.65;
}

.platform-scope-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.platform-scope-card {
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  padding: 20px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  color: inherit;
  text-align: center;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.platform-scope-card:hover {
  transform: translateY(-2px);
  border-color: rgba(18, 102, 241, 0.35);
  box-shadow: var(--shadow-soft);
}

.platform-scope-card small {
  color: var(--primary-strong);
  font-weight: 800;
}

.platform-scope-card strong {
  color: var(--text);
  font-size: 18px;
}

.platform-scope-card p {
  margin: 0;
  max-width: 36ch;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.65;
}

.platform-jump-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.platform-jump-list > a {
  min-width: 0;
  min-height: 66px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.platform-jump-list > a:hover {
  border-color: rgba(18, 102, 241, 0.34);
  color: var(--primary-strong);
}

.platform-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 16px;
  align-items: stretch;
}

.platform-profile-card {
  min-width: 0;
  height: 100%;
  min-height: 720px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-margin-top: calc(var(--topbar-height) + 24px);
}

.platform-profile-head {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
}

.platform-profile-head > div {
  min-width: 0;
}

.platform-profile-head h3 {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 19px;
  line-height: 1.3;
}

.platform-profile-head > div > span {
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 800;
}

.platform-profile-head > small {
  align-self: start;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.platform-logo {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
}

.platform-logo img {
  grid-area: 1 / 1;
  width: 31px;
  height: 31px;
  object-fit: contain;
}

.platform-logo i {
  grid-area: 1 / 1;
  color: var(--primary-strong);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.platform-logo img + i {
  visibility: hidden;
}

.platform-logo img + i.is-visible {
  visibility: visible;
}

.platform-logo.is-mark {
  background: var(--primary-soft);
  border-color: rgba(18, 102, 241, 0.18);
}

.platform-logo.is-mark i {
  font-size: clamp(10px, 1.3vw, 13px);
}

.platform-jump-list .platform-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.platform-jump-list .platform-logo img {
  width: 23px;
  height: 23px;
}

.platform-position {
  margin: 0;
  min-height: 112px;
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.78;
  display: flex;
  align-items: center;
}

.platform-chip-group {
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  gap: 7px;
}

.platform-chip-group b {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.platform-chip-group span,
.platform-spec-row span {
  border: 1px solid rgba(18, 102, 241, 0.14);
  border-radius: 999px;
  background: var(--primary-soft);
  padding: 5px 9px;
  color: var(--primary-strong);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
}

.platform-chip-group.is-product span {
  border-color: rgba(22, 163, 130, 0.15);
  background: rgba(22, 163, 130, 0.08);
  color: var(--green-strong, #0b7f68);
}

.platform-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 10px;
  flex: 1;
}

.platform-detail-grid > div {
  min-width: 0;
  min-height: 138px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  padding: 13px;
  display: grid;
  align-content: center;
  gap: 6px;
  text-align: left;
}

.platform-detail-grid strong {
  color: var(--text);
  font-size: 12px;
}

.platform-detail-grid p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.65;
}

.platform-detail-grid .is-caution {
  border-color: rgba(232, 143, 50, 0.18);
  background: rgba(232, 143, 50, 0.055);
}

.platform-spec-row {
  min-height: 34px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.platform-source-link {
  min-height: 38px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.platform-source-link .card-icon {
  width: 18px;
  height: 18px;
  margin: 0;
}

.current-model-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 14px;
  margin-top: 18px;
}

.current-model-card {
  height: 100%;
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  padding: 18px;
  display: grid;
  grid-template-rows: auto repeat(3, minmax(76px, auto)) auto;
  gap: 10px;
}

.current-model-card header {
  min-height: 84px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.current-model-card header span {
  color: var(--primary-strong);
  font-size: 10px;
  font-weight: 800;
}

.current-model-card header strong {
  color: var(--text);
  font-size: 17px;
}

.current-model-card header small {
  color: var(--muted);
  font-size: 11px;
}

.current-model-card > div {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  padding: 11px 12px;
  display: grid;
  align-content: center;
  gap: 4px;
  text-align: left;
}

.current-model-card > div.is-note {
  border-color: rgba(232, 143, 50, 0.18);
  background: rgba(232, 143, 50, 0.055);
}

.current-model-card b {
  color: var(--text);
  font-size: 11px;
}

.current-model-card p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.6;
}

.current-model-card > a {
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.current-model-card > a .card-icon {
  width: 17px;
  height: 17px;
  margin: 0;
}

.resource-card {
  align-items: stretch;
  text-align: left;
  justify-content: space-between;
  gap: 10px;
  min-height: 198px;
  padding: 18px;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.resource-card:hover {
  border-color: rgba(18, 102, 241, 0.34);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.resource-card strong {
  text-align: left;
  margin-bottom: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.resource-card > p {
  text-align: left;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.resource-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.resource-card-head span {
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.resource-card-head small {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-meta {
  justify-content: flex-start;
  margin-top: 0;
}

.resource-category-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 18px;
  margin: 20px 0 18px;
}

.resource-category-copy {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.resource-category-copy h2 {
  margin: 0;
  font-size: 22px;
}

.resource-category-copy p {
  margin: 0;
  max-width: 68ch;
  color: var(--muted-strong);
}

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

.resource-category-card {
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  color: var(--text);
  cursor: pointer;
  padding: 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  align-content: center;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.category-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border: 1px solid rgba(18, 102, 241, 0.18);
}

.category-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.resource-category-card:hover {
  border-color: rgba(18, 102, 241, 0.34);
  transform: translateY(-1px);
}

.resource-category-card.is-active {
  border-color: rgba(18, 102, 241, 0.5);
  background: linear-gradient(180deg, var(--primary-soft), var(--surface-strong));
}

.resource-category-card span {
  font-weight: 850;
}

.resource-category-card strong {
  color: var(--primary-strong);
  font-size: 20px;
  line-height: 1;
}

.resource-category-card small {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

html[data-theme="dark"] .category-icon {
  background: rgba(108, 164, 255, 0.14);
  border-color: rgba(144, 179, 238, 0.18);
}

.resource-filter-status {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.model-card .tag,
.mini-card .tag {
  margin-top: 12px;
}

.concept-card summary {
  cursor: pointer;
  list-style: none;
}

.concept-card summary::-webkit-details-marker {
  display: none;
}

.concept-card summary::after {
  content: "+";
  float: right;
  color: var(--primary);
}

.concept-card[open] summary::after {
  content: "−";
}

.diagram-card {
  padding: 18px;
  margin: 16px 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.diagram-card figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.diagram-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.diagram-title h3 {
  margin: 0;
  font-size: 18px;
}

.diagram-title small {
  color: var(--muted);
}

.diagram-scroll {
  overflow: auto;
  padding: 2px;
  display: grid;
  place-items: center;
  min-height: 220px;
}

.svg-visual {
  width: 100%;
  min-width: 620px;
  height: auto;
  display: block;
}

.svg-compact {
  min-width: 460px;
}

.asset-showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  margin-bottom: 18px;
}

.visual-library-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.asset-figure {
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.visual-feature-card,
.visual-asset-card {
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.visual-feature-card:hover,
.visual-asset-card:hover {
  border-color: rgba(18, 102, 241, 0.36);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.asset-showcase-grid .asset-figure {
  margin: 0;
}

.asset-figure img,
.visual-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  object-position: center;
  box-sizing: border-box;
  padding: 8px;
  display: block;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(241, 247, 255, 0.7));
}

.asset-figure figcaption,
.asset-caption,
.visual-card-body {
  min-height: 126px;
  padding: 14px 16px 16px;
  display: grid;
  align-content: center;
  gap: 6px;
  text-align: center;
}

.asset-figure figcaption strong,
.asset-caption strong,
.visual-card-body strong {
  color: var(--text);
  font-size: 14px;
}

.asset-figure figcaption span,
.asset-caption span,
.visual-card-body span {
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.asset-caption small,
.visual-card-body small {
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 800;
}

.visual-asset-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.visual-media {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-soft);
}

.visual-thumb {
  width: 100%;
  height: 100%;
  display: block;
}

.visual-card-body {
  min-height: 156px;
}

.deep-point-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 14px;
  align-items: stretch;
  margin-top: 18px;
}

.deep-point-card {
  min-height: 176px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  padding: 18px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 8px;
}

.deep-point-card span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 800;
  font-size: 12px;
}

.deep-point-card strong {
  color: var(--text);
  font-size: 15px;
}

.deep-point-card p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.7;
}

.visual-inventory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 12px;
  align-items: stretch;
  margin-top: 18px;
}

.chapter-status-panel {
  display: grid;
  gap: 12px;
}

.rail-sequence-chip {
  min-height: 38px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
  display: grid;
  place-items: center;
}

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

.rail-status-grid span {
  min-width: 0;
  min-height: 76px;
  padding: 10px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  text-align: center;
}

.rail-status-grid b {
  color: var(--primary-strong);
  font-size: 18px;
  line-height: 1;
}

.rail-status-grid small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.visual-inventory-card {
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 14px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  text-align: center;
}

.visual-inventory-card strong {
  color: var(--text);
  font-size: 14px;
}

.visual-inventory-card span {
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 800;
}

.visual-inventory-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.knowledge-unit-groups {
  display: grid;
  gap: 18px;
}

.knowledge-unit-group {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  padding: 16px;
}

.knowledge-unit-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.knowledge-unit-heading strong {
  color: var(--text);
  font-size: 16px;
}

.knowledge-unit-heading span {
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.knowledge-unit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.knowledge-unit-card {
  min-height: 148px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 12px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  text-align: center;
}

.knowledge-unit-card strong {
  color: var(--text);
  font-size: 13px;
}

.knowledge-unit-card p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.knowledge-unit-card span {
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 800;
}

.visual-demo {
  position: relative;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 14px;
}

.comparison-table th,
.comparison-table td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
}

.comparison-table th {
  background: var(--surface-soft);
  color: var(--text);
}

.comparison-table tr:last-child td {
  border-bottom: 0;
}

.article-footer-nav {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
}

.article-footer-nav a {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  background: var(--surface);
  display: block;
}

.article-footer-nav a:last-child {
  text-align: right;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: calc(100% - 56px);
  max-width: 1544px;
  margin: 0 auto 24px;
  padding: 20px 12px 4px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.site-footer a {
  color: inherit;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--primary-strong);
}

.footer-break {
  flex-basis: 100%;
  height: 0;
}

.correction-form {
  display: grid;
  gap: 18px;
}

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

.correction-form label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
}

.correction-form input,
.correction-form select,
.correction-form textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-strong);
  color: var(--text);
  padding: 11px 13px;
  font-weight: 500;
  line-height: 1.5;
}

.correction-form textarea {
  min-height: 180px;
  resize: vertical;
}

.correction-form .primary-button {
  justify-self: start;
}

.form-success {
  margin-bottom: 20px;
  border: 1px solid rgba(18, 154, 105, 0.28);
  border-radius: var(--radius-md);
  background: rgba(18, 154, 105, 0.08);
  padding: 18px 20px;
}

.form-success p {
  margin: 6px 0 0;
  color: var(--muted-strong);
}

.standalone-error {
  width: min(680px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 14px;
}

.standalone-error h1,
.standalone-error p {
  margin: 0;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

#term-grid {
  scroll-margin-top: calc(var(--topbar-height) + 20px);
}

.chip-button {
  min-height: 34px;
  font-size: 13px;
}

.chip-button.is-active {
  background: var(--primary);
  color: #f8fbff;
  border-color: var(--primary);
}

.route-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.route-step {
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.35;
}

.route-step b {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 900;
}

.route-step i {
  min-width: 0;
  color: inherit;
  font-style: normal;
}

.route-map-card {
  min-height: 0;
  padding: 22px;
  justify-content: flex-start;
}

.route-map-head {
  min-height: 118px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 15px;
}

.route-map-head > span {
  display: inline-block;
  margin-bottom: 9px;
  color: var(--primary-strong);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.route-map-head > strong {
  margin-bottom: 7px;
  font-size: 18px;
}

.route-map-head > p {
  line-height: 1.65;
}

.term-meta,
.resource-meta,
.company-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
}

.learning-objectives,
.application-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.learning-objectives article,
.application-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  padding: 16px;
  min-height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.learning-objectives span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 900;
  margin-bottom: 10px;
}

.learning-objectives strong,
.application-grid strong {
  color: var(--text);
  font-size: 15px;
}

.application-grid p {
  margin: 8px 0 0;
  color: var(--muted-strong);
  font-size: 13px;
}

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

.application-proof-strip article {
  min-width: 0;
  min-height: 146px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
  padding: 18px;
  display: grid;
  align-content: center;
  gap: 4px;
}

.application-proof-strip strong {
  color: var(--primary-strong);
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.application-proof-strip span {
  color: var(--text);
  font-weight: 850;
}

.application-proof-strip small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.application-case-lab {
  padding: clamp(20px, 3vw, 32px);
}

.application-lab-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.application-lab-heading > div:first-child {
  min-width: 0;
}

.application-lab-heading h2 {
  margin-top: 8px;
}

.application-lab-heading p {
  margin-bottom: 0;
}

.application-lab-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
}

.application-lab-actions .ghost-button,
.case-copy-button {
  min-height: 42px;
}

.application-case-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.application-case-filters .chip-button {
  min-height: 42px;
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--muted-strong);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.application-case-filters .chip-button span {
  min-width: 21px;
  height: 21px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--muted);
  display: inline-grid;
  place-items: center;
  font-size: 10px;
  font-weight: 850;
}

.application-case-filters .chip-button.is-active {
  border-color: var(--primary);
  background: var(--primary);
  color: #f8fbff;
}

.application-case-filters .chip-button.is-active span {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.application-case-status {
  margin: 12px 0 0 !important;
  color: var(--muted) !important;
  font-size: 13px !important;
}

.application-case-status strong {
  color: var(--primary-strong);
}

.application-case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
  align-items: start;
}

.application-case-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  overflow: clip;
  scroll-margin-top: calc(var(--topbar-height) + 24px);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.application-case-card[open] {
  grid-column: 1 / -1;
  border-color: rgba(18, 102, 241, 0.34);
  box-shadow: var(--shadow-soft);
}

.application-case-card summary {
  min-height: 164px;
  padding: 18px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.application-case-card summary::-webkit-details-marker {
  display: none;
}

.application-case-card summary::marker {
  content: "";
}

.application-case-card[open] summary {
  min-height: 0;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--primary-soft), transparent);
}

.case-number {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
}

.case-summary-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.case-summary-copy small {
  color: var(--primary-strong);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.case-summary-copy > strong {
  color: var(--text);
  font-size: 17px;
  line-height: 1.4;
}

.case-summary-copy > span:not(.case-platform-preview) {
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.6;
}

.case-platform-preview {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.case-expand-label {
  min-width: 86px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.case-expand-label::after {
  content: " +";
  color: var(--primary-strong);
}

.application-case-card[open] .case-expand-label::after {
  content: " −";
}

.application-case-body {
  padding: 22px;
  display: grid;
  gap: 16px;
}

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

.case-context-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.case-context-grid article,
.case-demo-block {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  padding: 16px;
}

.case-context-grid span,
.case-block-title span {
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 900;
}

.case-context-grid p {
  margin: 7px 0 0;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.65;
}

.case-platform-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: 10px;
}

.case-platform-row > a {
  min-width: 0;
  min-height: 66px;
  border: 1px solid rgba(18, 102, 241, 0.18);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--primary-soft) 64%, var(--surface-strong));
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 20px;
  gap: 10px;
  align-items: center;
}

.case-platform-row > a:hover {
  border-color: rgba(18, 102, 241, 0.4);
}

.case-platform-row > a > span:first-child {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--primary-strong);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 900;
}

.case-platform-row > a > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.case-platform-row strong {
  color: var(--text);
  font-size: 13px;
}

.case-platform-row small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.case-platform-row .card-icon {
  width: 18px;
  height: 18px;
  margin: 0;
}

.case-block-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.case-block-title small {
  color: var(--muted);
  font-size: 10px;
}

.case-step-list,
.case-check-list {
  margin: 14px 0 0 !important;
  padding: 0 !important;
  list-style: none;
  display: grid;
  gap: 9px;
}

.case-step-list {
  counter-reset: case-step;
}

.case-step-list li,
.case-check-list li {
  margin: 0 !important;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.6;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.case-step-list li::before {
  counter-increment: case-step;
  content: counter(case-step);
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 900;
}

.case-check-list li::before {
  content: "✓";
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(15, 159, 116, 0.1);
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
}

.case-prompt-shell {
  min-width: 0;
  border: 1px solid rgba(18, 102, 241, 0.2);
  border-radius: var(--radius-md);
  background: #071329;
  overflow: hidden;
}

.case-prompt-head {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(155, 194, 255, 0.16);
}

.case-prompt-head > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.case-prompt-head strong {
  color: #edf5ff;
  font-size: 12px;
}

.case-prompt-head small {
  color: #a9bbda;
  font-size: 10px;
}

.case-prompt-head .ghost-button {
  border-color: rgba(155, 194, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
  color: #d9e8ff;
}

.case-prompt-shell pre {
  margin: 0;
  max-width: 100%;
  padding: 18px;
  color: #e7f0ff;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.72;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.case-deliverables {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  padding: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.case-deliverables > strong {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 11px;
}

.case-deliverables > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.case-deliverables span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  padding: 5px 9px;
  color: var(--muted-strong);
  font-size: 10px;
}

.case-boundary {
  border: 1px solid rgba(232, 132, 29, 0.22);
  border-left: 4px solid var(--orange);
  border-radius: var(--radius-sm);
  background: rgba(232, 132, 29, 0.055);
  padding: 14px 16px;
}

.case-boundary strong {
  color: var(--orange);
  font-size: 11px;
}

.case-boundary p {
  margin: 5px 0 0;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.65;
}

.case-source-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.case-source-row > span {
  color: var(--muted);
  font-size: 10px;
}

.case-source-row > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.case-source-row a {
  color: var(--primary-strong);
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.case-source-row .card-icon {
  width: 15px;
  height: 15px;
  margin: 0;
}

.application-lab-note {
  margin-top: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  padding: 15px 16px;
}

.application-lab-note strong {
  color: var(--text);
  font-size: 12px;
}

.application-lab-note p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.application-chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px;
  margin-top: 18px;
}

.application-chapter-grid > a {
  min-width: 0;
  min-height: 205px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  padding: 18px;
  display: grid;
  align-content: center;
  gap: 8px;
  transition: transform 160ms ease, border-color 160ms ease;
}

.application-chapter-grid > a:hover {
  transform: translateY(-2px);
  border-color: rgba(18, 102, 241, 0.36);
}

.application-chapter-grid small,
.application-chapter-grid > a > span {
  color: var(--primary-strong);
  font-size: 10px;
  font-weight: 800;
}

.application-chapter-grid strong {
  color: var(--text);
  font-size: 16px;
}

.application-chapter-grid p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.6;
}

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

.application-method-grid article {
  min-width: 0;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  padding: 17px;
  display: grid;
  align-content: center;
  gap: 8px;
}

.application-method-grid span {
  color: var(--primary-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
}

.application-method-grid strong {
  color: var(--text);
  font-size: 14px;
}

.application-method-grid p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.65;
}

.application-case-card summary:focus-visible,
.application-case-lab button:focus-visible,
.application-case-lab a:focus-visible,
.case-prompt-shell pre:focus-visible,
.application-chapter-grid > a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.term-tooltip {
  position: fixed;
  z-index: 1001;
  max-width: 320px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  padding: 12px;
  color: var(--muted-strong);
  font-size: 13px;
}

.term-tooltip strong {
  display: block;
  color: var(--text);
  margin-bottom: 4px;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--primary);
  color: #f8fbff;
  box-shadow: var(--shadow);
  opacity: 0.92;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity 160ms ease, transform 160ms ease;
}

.back-to-top:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.mobile-scrim {
  position: fixed;
  inset: 0;
  z-index: 29;
  background: rgba(3, 11, 24, 0.36);
}

.pulse-node {
  animation: pulseNode 2.8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.slow-float {
  animation: slowFloat 5.2s ease-in-out infinite;
}

.dash-line {
  stroke-dasharray: 8 8;
  animation: dashMove 16s linear infinite;
}

.token-card {
  animation: tokenLift 4.4s ease-in-out infinite;
}

.token-card:nth-child(2n) {
  animation-delay: 0.45s;
}

.bar-grow {
  transform-origin: bottom;
  animation: barGrow 3.2s ease-in-out infinite;
}

.attention-line {
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
  animation: attentionDraw 4.8s ease-in-out infinite;
}

.diffusion-stage {
  animation: stageGlow 5.5s ease-in-out infinite;
}

.diffusion-stage:nth-child(2) {
  animation-delay: 0.8s;
}

.diffusion-stage:nth-child(3) {
  animation-delay: 1.6s;
}

.diffusion-stage:nth-child(4) {
  animation-delay: 2.4s;
}

@keyframes pulseNode {
  0%, 100% { transform: scale(1); opacity: 0.78; }
  50% { transform: scale(1.12); opacity: 1; }
}

@keyframes slowFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes dashMove {
  to { stroke-dashoffset: -220; }
}

@keyframes tokenLift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes barGrow {
  0%, 100% { transform: scaleY(0.42); opacity: 0.58; }
  50% { transform: scaleY(1); opacity: 1; }
}

@keyframes attentionDraw {
  0% { stroke-dashoffset: 160; opacity: 0.18; }
  38%, 72% { stroke-dashoffset: 0; opacity: 0.88; }
  100% { stroke-dashoffset: -160; opacity: 0.18; }
}

@keyframes stageGlow {
  0%, 100% { opacity: 0.48; transform: translateY(0); }
  45% { opacity: 1; transform: translateY(-5px); }
}

@keyframes readingProgress {
  to { transform: scaleX(1); }
}

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

@media (max-width: 1320px) {
  :root {
    --right-width: 280px;
    --sidebar-width: 264px;
  }

  .main-layout {
    gap: 20px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .top-actions .ghost-button {
    padding: 0 10px;
  }
}

@media (max-width: 1120px) {
  .main-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .right-rail {
    position: static;
    max-height: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .hero-card {
    min-height: 360px;
  }

  .topbar {
    grid-template-columns: minmax(220px, 1fr) auto;
  }

  .top-actions .ghost-button:nth-child(2),
  .top-actions .ghost-button:nth-child(3) {
    display: none;
  }

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

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

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

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

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

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

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 35;
    width: min(88vw, 330px);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .mobile-menu-button,
  .brand-mobile {
    display: flex;
  }

  .topbar {
    height: auto;
    min-height: var(--topbar-height);
    grid-template-columns: auto 160px 1fr auto;
    padding: 12px 16px;
  }

  .topbar .search-wrap {
    grid-column: 1 / -1;
    order: 4;
    max-width: none;
  }

  .top-actions .ghost-button {
    display: none;
  }

  .main-layout {
    padding: 24px 16px 72px;
  }

  .site-footer {
    width: calc(100% - 32px);
  }

  .hero h1,
  .page-hero h1 {
    font-size: 42px;
  }

  .hero .subtitle,
  .page-hero .subtitle {
    font-size: 20px;
  }

  .entry-grid,
  .home-route-grid,
  .concept-entry-grid,
  .showcase-grid,
  .chapter-roadmap-grid,
  .asset-showcase-grid,
  .visual-library-grid,
  .resource-category-grid,
  .principle-grid,
  .knowledge-part-grid,
  .route-map-grid,
  .foundation-preview,
  .learning-objectives,
  .application-grid,
  .foundation-story-flow,
  .concept-lab-grid,
  .concept-lab-steps,
  .understanding-check-grid,
  .summary-takeaways,
  .deep-point-grid,
  .visual-inventory-grid,
  .sequence-matrix,
  .chapter-expansion-grid,
  .knowledge-unit-grid,
  .concept-grid.three,
  .company-grid.three,
  .platform-profile-grid,
  .platform-scope-grid,
  .current-model-grid,
  .right-rail {
    grid-template-columns: 1fr;
  }

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

  .form-grid {
    grid-template-columns: 1fr;
  }

  .platform-profile-card {
    min-height: 0;
  }

  .current-model-card {
    min-height: 0;
  }

  .entry-grid {
    grid-template-areas: none;
  }

  .entry-card:nth-child(n) {
    grid-area: auto;
    min-height: 220px;
    padding: 24px;
  }

  .sequence-stage-card {
    height: auto;
    min-height: 300px;
  }

  .sequence-chapter-list {
    grid-template-columns: 1fr;
  }

  .chapter-sequence {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .route-steps {
    grid-template-columns: 1fr;
  }

  .route-map-head {
    min-height: 0;
  }

  body {
    font-size: 14px;
  }

  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .brand-mobile small {
    display: none;
  }

  .brand strong {
    font-size: 17px;
  }

  .top-actions .primary-button {
    min-height: 38px;
    padding: 0 11px;
  }

  .hero {
    min-height: auto;
    padding-top: 10px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 34px;
  }

  .hero .description,
  .page-hero .description {
    font-size: 15px;
  }

  .hero-card {
    min-height: 280px;
  }

  .hero-generated-image {
    width: min(100%, 420px);
  }

  .article-card {
    padding: 18px;
  }

  .article-card h2 {
    font-size: 23px;
  }

  .foundation-story-intro,
  .concept-lab-lead {
    font-size: 16px !important;
  }

  .foundation-story-step,
  .concept-lab-steps li,
  .summary-takeaways article {
    min-height: 0;
  }

  .concept-clarifier,
  .check-answer summary {
    grid-template-columns: 1fr;
  }

  .callout-grid,
  .concept-grid,
  .company-grid,
  .resource-grid,
  .routes-grid,
  .definition-grid,
  .split-note-grid {
    grid-template-columns: 1fr;
  }

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

  .platform-detail-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .platform-detail-grid > div,
  .platform-position,
  .platform-chip-group {
    min-height: 0;
  }

  .platform-profile-head {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .platform-profile-head > small {
    grid-column: 2;
  }

  #resource-grid {
    grid-template-columns: 1fr;
  }

  .route-line {
    align-items: stretch;
    flex-direction: column;
    overflow: visible;
  }

  .route-node:not(:last-child)::after {
    left: 18px;
    right: auto;
    top: calc(100% + 1px);
    width: 1px;
    height: 9px;
  }

  .article-footer-nav {
    flex-direction: column;
  }

  .article-footer-nav a:last-child {
    text-align: left;
  }

  .svg-visual {
    min-width: 560px;
  }

  .asset-figure figcaption,
  .asset-caption,
  .visual-card-body {
    min-height: auto;
    padding: 12px 14px 14px;
  }

  .deep-point-card {
    min-height: 144px;
  }
}

@media (max-width: 1120px) {
  .application-proof-strip,
  .application-method-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .application-lab-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .application-case-grid,
  .case-context-grid,
  .case-demo-grid {
    grid-template-columns: 1fr;
  }

  .application-case-card[open] {
    grid-column: auto;
  }

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

@media (max-width: 640px) {
  .application-proof-strip,
  .application-method-grid,
  .application-chapter-grid {
    grid-template-columns: 1fr;
  }

  .application-proof-strip article {
    min-height: 112px;
  }

  .application-lab-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .application-case-filters {
    margin-inline: -18px;
    padding: 2px 18px 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .application-case-filters::-webkit-scrollbar {
    display: none;
  }

  .application-case-filters .chip-button {
    flex: 0 0 auto;
    scroll-snap-align: start;
    white-space: nowrap;
  }

  .application-case-card summary {
    min-height: 0;
    padding: 15px;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 11px;
  }

  .case-number {
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }

  .case-summary-copy > strong {
    font-size: 15px;
  }

  .case-expand-label {
    grid-column: 2;
    justify-self: start;
    min-width: 0;
  }

  .application-case-body {
    padding: 15px;
  }

  .case-block-title,
  .case-prompt-head,
  .case-source-row,
  .case-deliverables {
    align-items: flex-start;
    flex-direction: column;
  }

  .case-prompt-head .ghost-button {
    width: 100%;
  }

  .case-source-row > div {
    display: grid;
  }

  .application-chapter-grid > a,
  .application-method-grid article {
    min-height: 0;
  }
}
