@import url("https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Source+Sans+3:ital,wght@0,400;0,600;0,700;1,400&family=Source+Serif+4:ital,wght@1,600&display=swap");

:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151c24;
  --bg-elev: #1c232d;
  --paper: #232c38;
  --ink: #e8eef3;
  --muted: #9aabba;
  --hematoxylin: #7eb4d4;
  --hematoxylin-deep: #3d6a8f;
  --eosin: #d07a7e;
  --stroma: #6fb59a;
  --gold: #c9a36a;
  --line: #334152;
  --line-strong: #4a5a6c;
  --nav-bg: #10161d;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  --stat-fill: rgba(16, 22, 29, 0.45);
  --panel-sc: linear-gradient(180deg, rgba(62, 106, 143, 0.28), rgba(35, 44, 56, 0.9));
  --panel-st: linear-gradient(180deg, rgba(201, 163, 106, 0.22), rgba(35, 44, 56, 0.92));
  --panel-sc-border: rgba(126, 180, 212, 0.35);
  --panel-st-border: rgba(201, 163, 106, 0.32);
  --module-sc: linear-gradient(165deg, #2a3d52 0%, #232c38 55%);
  --module-st: linear-gradient(165deg, #3d3428 0%, #232c38 55%);
  --skill-bg: linear-gradient(165deg, rgba(124, 92, 191, 0.28) 0%, rgba(35, 44, 56, 0.86) 58%);
  --skill-border: rgba(176, 148, 230, 0.38);
  --skill-kicker: #d4c4fb;
  --skill-btn: #8b6fd4;
  --skill-btn-ink: #f6f2ff;
  --skill-btn-soft: linear-gradient(165deg, rgba(139, 111, 212, 0.42) 0%, rgba(124, 92, 191, 0.22) 100%);
  --skill-btn-soft-hover: linear-gradient(165deg, rgba(139, 111, 212, 0.58) 0%, rgba(124, 92, 191, 0.34) 100%);
  --skill-btn-soft-ink: #ece3ff;
  --fs-1: clamp(2.05rem, 2.9vw, 2.55rem);
  --fs-2: clamp(1.38rem, 2vw, 1.62rem);
  --fs-3: clamp(1.12rem, 1.5vw, 1.28rem);
  --sx-map: #11161c;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #e6eef3;
  --bg-elev: #f4f8fb;
  --paper: #ffffff;
  --ink: #182430;
  --muted: #334553;
  --hematoxylin: #2f4a7a;
  --hematoxylin-deep: #2f4a7a;
  --eosin: #b85a64;
  --stroma: #3d7a6a;
  --gold: #a67c3a;
  --line: #c5d3dc;
  --line-strong: #9eb0bf;
  --nav-bg: #f7fbfc;
  --shadow: 0 10px 28px rgba(24, 36, 48, 0.08);
  --stat-fill: #ffffff;
  --panel-sc: linear-gradient(180deg, #d5e6f2, #f3f8fb);
  --panel-st: linear-gradient(180deg, #f3e6cc, #f8f4ec);
  --panel-sc-border: #9bbad0;
  --panel-st-border: #d4be8a;
  --module-sc: linear-gradient(165deg, #e7f1f7 0%, #ffffff 58%);
  --module-st: linear-gradient(165deg, #f5ead8 0%, #ffffff 58%);
  --skill-bg: linear-gradient(165deg, rgba(124, 92, 191, 0.16) 0%, rgba(255, 255, 255, 0.72) 58%);
  --skill-border: rgba(124, 92, 191, 0.28);
  --skill-kicker: #6d4cae;
  --skill-btn: #6d4cae;
  --skill-btn-ink: #f7f2fc;
  --skill-btn-soft: linear-gradient(165deg, rgba(124, 92, 191, 0.22) 0%, rgba(124, 92, 191, 0.1) 100%);
  --skill-btn-soft-hover: linear-gradient(165deg, rgba(124, 92, 191, 0.32) 0%, rgba(124, 92, 191, 0.16) 100%);
  --skill-btn-soft-ink: #4c3187;
  --sx-map: #11161c;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.55;
  font-size: 18px;
}
::placeholder {
  color: var(--muted);
  opacity: 1;
}

a { color: var(--hematoxylin); text-decoration: none; }
a:hover { color: var(--eosin); }
a:focus-visible {
  outline: 2px solid var(--hematoxylin);
  outline-offset: 3px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0 clamp(1.2rem, 2.2vw, 2.4rem);
  height: 76px;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
  font-size: 1.28rem;
  line-height: 1;
  text-decoration: none;
}
.brand span { color: var(--hematoxylin); }
.brand:hover { color: var(--ink); }
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.nav-links { display: flex; gap: 0.15rem; flex-wrap: wrap; }
.nav-links a {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.45rem 0.75rem;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--ink);
  text-decoration: none;
  box-shadow: inset 0 -2px 0 var(--hematoxylin);
}

.theme-toggle {
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--hematoxylin); }
.theme-toggle svg { width: 1.15rem; height: 1.15rem; }
html[data-theme="dark"] .theme-toggle .icon-moon,
html[data-theme="light"] .theme-toggle .icon-sun { display: none; }

.wrap {
  max-width: 2040px;
  margin: 0 auto;
  padding: clamp(2.2rem, 4vw, 3.8rem) clamp(1.2rem, 2.2vw, 2.4rem) 5rem;
}
.hero h1 {
  font-weight: 700;
  font-size: var(--fs-1);
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
}
.hero p { color: var(--muted); margin: 0 0 2rem; font-size: 1.14rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.8rem;
}
#llm-skill { scroll-margin-top: 5.5rem; }
.card h2 {
  font-weight: 700;
  margin: 0 0 0.6rem;
  font-size: var(--fs-2);
  letter-spacing: -0.02em;
}
.card p { color: var(--muted); margin: 0 0 1.1rem; }
html[data-theme="light"] .card p {
  color: var(--ink);
}
html[data-theme="light"] .card p.note,
html[data-theme="light"] .home-help {
  color: var(--muted);
}
.btn {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 700;
  background: var(--hematoxylin-deep);
  color: #f4f8fb;
  padding: 0.65rem 1.1rem;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; color: #f4f8fb; }
html[data-theme="light"] .btn { color: #f7fbfc; }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn.ghost:hover {
  color: var(--ink);
  filter: none;
}
html[data-theme="light"] .btn.ghost,
html[data-theme="light"] .btn.ghost:hover {
  color: var(--ink);
}
.subcards { display: grid; gap: 0.9rem; margin-top: 0.5rem; }
.sub {
  border: 1px solid var(--line);
  padding: 1rem 1.1rem;
  background: var(--bg-elev);
}
.sub h3 { margin: 0 0 0.3rem; font-weight: 700; font-size: var(--fs-3); }
.sub p { margin: 0; font-size: 0.98rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.6rem 0.55rem; border-bottom: 1px solid var(--line); }
th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
}
.note { color: var(--muted); font-size: 1.02rem; line-height: 1.6; }
.pill {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border: 1px solid var(--line-strong);
  color: var(--hematoxylin);
}
.soon { color: var(--eosin); font-size: 0.88rem; }

.explorer-page { height: calc(100vh - 76px); background: var(--bg); }
.explorer-page iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--bg);
}

.page-home { background: var(--bg); }
.home {
  width: min(2040px, 97vw);
  margin: 0 auto;
  padding: 0 clamp(1.2rem, 2.2vw, 2.4rem) clamp(3rem, 5vw, 5rem);
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  align-items: center;
  gap: clamp(1.2rem, 3vw, 2.8rem);
  padding: 0.6rem 0 0.4rem;
}

.hero-copy { min-width: 0; }
.wordmark {
  font-family: "Abril Fatface", "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(6.4rem, 14vw, 12.5rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  margin: 0;
  color: var(--ink);
}

.home-fullname {
  margin: 0.85rem 0 0;
  font-size: clamp(1.35rem, 2.3vw, 1.75rem);
  font-weight: 600;
  white-space: nowrap;
}

.home-lede {
  max-width: 46rem;
  font-size: clamp(1.18rem, 1.7vw, 1.42rem);
  color: var(--muted);
  margin: 0.7rem 0 0;
}
.home-help {
  max-width: 46rem;
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  color: var(--muted);
  margin: 0.85rem 0 0;
}

.hero-figure {
  margin: 0;
  display: flex;
  justify-content: flex-end;
}
.hero-figure img {
  width: min(100%, 520px);
  height: auto;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.28));
}

.overview {
  margin-top: 0.5rem;
  padding: 1.7rem 1.7rem 1.8rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.overview > h2 {
  margin: 0 0 1.1rem;
  font-size: var(--fs-1);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.overview-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.overview-panel {
  padding: 1.25rem 1.2rem 1.3rem;
  border-radius: 2px;
}
.overview-panel--sc {
  background: var(--panel-sc);
  border: 1px solid var(--panel-sc-border);
}
.overview-panel--st {
  background: var(--panel-st);
  border: 1px solid var(--panel-st-border);
}
.overview-panel h3 {
  margin: 0 0 0.9rem;
  font-size: var(--fs-2);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}
.stat {
  background: var(--stat-fill);
  border: 1px solid transparent;
  border-top: 3px solid var(--line-strong);
  padding: 0.95rem 0.8rem;
  min-height: 8.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.stat--cells { border-top-color: var(--hematoxylin); }
.stat--features { border-top-color: var(--stroma); }
.stat--states { border-top-color: #8d9ec0; }
.stat--tech { border-top-color: var(--gold); }
.stat--sections { border-top-color: var(--eosin); }
.stat strong {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
}
.stat span {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.35;
}

.home-modules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.2rem, 2vw, 1.8rem);
  margin-top: 1.4rem;
}
.module {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  min-height: 16.5rem;
  padding: clamp(1.6rem, 2.4vw, 2.3rem);
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.module--sc {
  background: var(--module-sc);
  border-left: 5px solid var(--hematoxylin);
}
.module--st {
  background: var(--module-st);
  border-left: 5px solid var(--gold);
}
.module:hover {
  transform: translateY(-4px);
  color: inherit;
}
.module-icon {
  flex: 0 0 4.6rem;
  width: 4.6rem;
  height: 4.6rem;
  margin-top: 0.15rem;
}
.module--sc .module-icon { color: var(--hematoxylin); }
.module--st .module-icon { color: var(--gold); }
.module-icon svg {
  width: 4.6rem;
  height: 4.6rem;
  display: block;
}
.module-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 100%;
}
.module h2 {
  font-weight: 700;
  font-size: var(--fs-1);
  letter-spacing: -0.02em;
  margin: 0 0 0.7rem;
}
.module p {
  color: var(--muted);
  font-size: 1.08rem;
  margin: 0;
  flex: 1;
}
.module-go {
  margin-top: 1.4rem;
  font-weight: 700;
}
.module--sc .module-go { color: var(--hematoxylin); }
.module--st .module-go { color: var(--gold); }

.home-skill {
  margin-top: 1.4rem;
  display: grid;
  grid-template-columns: auto 1fr clamp(15rem, 24%, 30rem);
  align-items: center;
  column-gap: 0;
  width: 100%;
  min-height: 12rem;
  padding: 1.35rem 1.45rem 1.4rem;
  background: var(--skill-bg);
  border: 1px solid var(--skill-border);
  box-shadow: var(--shadow);
}
.skill-copy {
  min-width: 0;
}
.skill-kicker {
  display: inline-block;
  margin: 0 0 0.5rem;
  padding: 0.32rem 0.95rem;
  border-radius: 999px;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--skill-btn-soft-ink);
  background: var(--skill-btn-soft);
  border: 1px solid var(--skill-border);
}
.skill-copy h2 {
  margin: 0;
  font-size: var(--fs-1);
  letter-spacing: -0.02em;
}
.skill-copy > p:last-child {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}
html[data-theme="dark"] .home-skill .skill-copy > p:last-child {
  color: rgba(226, 216, 245, 0.78);
}
.skill-flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.skill-flow li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
  width: 9.9rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--skill-kicker);
  text-align: center;
}
.skill-flow-icon {
  width: 8.1rem;
  height: 8.1rem;
  display: grid;
  place-items: center;
  color: var(--skill-kicker);
  background: none;
  border: 0;
}
.skill-flow-icon svg { width: 7.9rem; height: 7.9rem; }
.skill-flow li + li {
  position: relative;
  width: 13.5rem;
  padding-left: 3.6rem;
}
.skill-flow li + li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 2.15rem;
  width: 3.6rem;
  text-align: center;
  color: var(--skill-kicker);
  font-size: 2.85rem;
  line-height: 1;
  font-weight: 400;
  opacity: 0.95;
}
.skill-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  width: 100%;
  height: 100%;
  min-height: 8.4rem;
  padding: 0.35rem 0.2rem 0.35rem 1.2rem;
  border-left: 1px solid var(--skill-border);
  box-sizing: border-box;
}
.skill-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  border-radius: 999px;
  padding: 1.22rem 1.15rem;
  font-size: 1.32rem;
  font-weight: 700;
  background: var(--skill-btn-soft);
  color: var(--skill-btn-soft-ink);
  border: 1px solid var(--skill-border);
  box-shadow: none;
}
.skill-download svg {
  width: 1.5rem;
  height: 1.5rem;
}
.skill-download:hover {
  background: var(--skill-btn-soft-hover);
  color: var(--skill-btn-soft-ink);
  filter: none;
}
.skill-guide {
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--skill-kicker);
}
.skill-guide:hover { color: var(--eosin); }

.home-showcase {
  margin-top: 1.8rem;
}
.showcase-shell {
  position: relative;
  padding-top: 0.15rem;
}
.showcase-tabs {
  position: absolute;
  top: 0;
  left: 1.15rem;
  z-index: 2;
  display: flex;
  gap: 0.4rem;
}
.showcase-tab {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.showcase-tab:hover { color: var(--ink); }
.showcase-tab:focus-visible {
  outline: 2px solid var(--hematoxylin);
  outline-offset: 3px;
}
.home-showcase[data-active="sc"] .showcase-tab[aria-selected="true"] {
  background: var(--hematoxylin);
  border-color: var(--hematoxylin);
  color: #10161d;
}
.home-showcase[data-active="st"] .showcase-tab[aria-selected="true"] {
  background: var(--gold);
  border-color: var(--gold);
  color: #10161d;
}
html[data-theme="light"] .home-showcase[data-active="sc"] .showcase-tab[aria-selected="true"] {
  color: #f4f8fb;
}
html[data-theme="light"] .home-showcase[data-active="st"] .showcase-tab[aria-selected="true"] {
  color: #1a140c;
}
.showcase-window {
  margin-top: 1.05rem;
  padding: 1.85rem 1.05rem 1.05rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 18px;
}
.home-showcase[data-active="sc"] .showcase-window {
  border-color: var(--panel-sc-border);
}
.home-showcase[data-active="st"] .showcase-window {
  border-color: var(--panel-st-border);
}
.showcase-chrome {
  display: flex;
  gap: 0.38rem;
  margin: 0 0.15rem 0.7rem;
}
.showcase-chrome span {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: var(--line-strong);
  opacity: 0.7;
}
.showcase-chrome span:nth-child(1) { background: #d07a7e; }
.showcase-chrome span:nth-child(2) { background: #c9a36a; }
.showcase-chrome span:nth-child(3) { background: #6fb59a; }
.showcase-mosaic {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.55rem;
}
.showcase-tile {
  grid-column: span 2;
  margin: 0;
  aspect-ratio: 1 / 1;
  background: #fff;
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
}
.showcase-tile:nth-child(5) { grid-column: 2 / 4; }
.showcase-tile:nth-child(6) { grid-column: 4 / 6; }
.showcase-tile:nth-child(7) { grid-column: 6 / 8; }
.showcase-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.showcase-tile--dark { background: #11161c; }

@media (max-width: 1100px) {
  .home-hero,
  .overview-split,
  .home-modules,
  .home-skill { grid-template-columns: 1fr; }
  .skill-flow { justify-content: flex-start; flex-wrap: wrap; row-gap: 0.8rem; }
  .skill-actions {
    align-items: stretch;
    border-left: 0;
    padding-left: 0;
    min-height: 0;
  }
  .showcase-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .showcase-tile,
  .showcase-tile:nth-child(5),
  .showcase-tile:nth-child(6),
  .showcase-tile:nth-child(7) { grid-column: auto; }
  .showcase-tile:nth-child(7) {
    grid-column: 1 / -1;
    width: calc(50% - 0.28rem);
    justify-self: center;
  }
  .stat-row { grid-template-columns: 1fr; }
  .stat { min-height: 0; }
  .home-fullname { white-space: normal; }
  .hero-figure { order: -1; }
  .hero-figure img { width: min(320px, 70%); }
}
@media (max-width: 640px) {
  .showcase-tabs { left: 0.7rem; }
  .showcase-window { padding: 1.7rem 0.7rem 0.7rem; border-radius: 14px; }
  .showcase-mosaic { grid-template-columns: 1fr; gap: 0.45rem; }
  .showcase-tile:nth-child(7) { width: 100%; }
}

@media (max-width: 860px) {
  .nav { height: auto; padding-top: 0.85rem; padding-bottom: 0.75rem; flex-wrap: wrap; }
  .explorer-page { height: calc(100vh - 118px); }
}

.about-card > h2 {
  font-size: var(--fs-1);
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}
.about-card--stats { padding-bottom: 1.4rem; }
.stat-modules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  margin-top: 1.1rem;
}
.stat-module {
  padding: 1.15rem 1.1rem 1.2rem;
  border: 1px solid var(--line);
}
.stat-module--sc {
  background: var(--panel-sc);
  border-color: var(--panel-sc-border);
}
.stat-module--st {
  background: var(--panel-st);
  border-color: var(--panel-st-border);
}
.stat-module h3 {
  margin: 0;
  font-size: var(--fs-2);
  font-weight: 700;
}
.stat-kicker {
  margin: 0.35rem 0 0.9rem;
  color: var(--muted);
  font-size: 0.98rem;
}
.sunburst-block {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}
.sunburst-block h4,
.sunburst-side h4 {
  margin: 0 0 0.55rem;
  font-size: var(--fs-3);
  font-weight: 700;
}
.sunburst-layout {
  display: grid;
  grid-template-columns: minmax(280px, 460px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.sunburst-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  min-height: 1.8rem;
  margin-bottom: 0.4rem;
  font-size: 0.86rem;
}
.sunburst-crumb button {
  border: 0;
  background: none;
  color: var(--hematoxylin);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.sunburst-crumb button:hover { color: var(--eosin); }
.crumb-sep { color: var(--muted); }
.sunburst-svgwrap { display: flex; justify-content: center; }
.sunburst-svgwrap svg { width: min(100%, 440px); height: auto; }
.sunburst-svgwrap .sector {
  stroke: var(--paper);
  stroke-width: 1;
  cursor: pointer;
}
.sunburst-svgwrap .sector:hover,
.sunburst-svgwrap .sector:focus-visible {
  stroke: var(--ink);
  stroke-width: 1.6;
  outline: none;
}
.sunburst-hole {
  fill: var(--stat-fill);
  stroke: var(--line);
  cursor: pointer;
}
.sunburst-label { pointer-events: none; }
.sunburst-name,
.sunburst-count,
.sunburst-pct {
  text-anchor: middle;
  fill: var(--ink);
}
.sunburst-name { font-size: 11px; font-weight: 700; }
.sunburst-count { font-size: 13px; font-weight: 700; }
.sunburst-pct { font-size: 10px; fill: var(--muted); }
.sunburst-hint {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.sunburst-rings {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.sunburst-rings button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0.08rem 0.2rem;
  text-align: left;
}
.sunburst-rings button:hover { color: var(--hematoxylin); }
.sunburst-rings .is-current button {
  color: var(--ink);
  font-weight: 700;
}
.sunburst-svgwrap .sector.is-layer {
  stroke: var(--ink);
  stroke-width: 1.7;
}
.sunburst-row.is-static { cursor: pointer; }
.sunburst-row.is-active { border-color: var(--hematoxylin); }
.sunburst-children {
  display: grid;
  gap: 0.45rem;
  max-height: 22rem;
  overflow: auto;
}
.sunburst-row {
  display: grid;
  grid-template-columns: 0.7rem 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.55rem;
  row-gap: 0.22rem;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--stat-fill);
  color: inherit;
  padding: 0.45rem 0.55rem 0.5rem;
  cursor: pointer;
  font: inherit;
}
.sunburst-row:hover { border-color: var(--hematoxylin); }
.swatch {
  grid-row: 1 / span 2;
  width: 0.7rem;
  align-self: stretch;
}
.row-meta { display: flex; flex-direction: column; gap: 0.05rem; }
.row-meta strong { font-size: 0.9rem; }
.row-meta em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.78rem;
}
.row-bar {
  grid-column: 2;
  height: 4px;
  background: var(--line);
}
.row-bar span { display: block; height: 100%; }
.sunburst-empty { margin: 0; color: var(--muted); font-size: 0.92rem; }
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.25rem;
}
.people { list-style: none; margin: 0.4rem 0 0; padding: 0; }
.people li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.people li:last-child { border-bottom: 0; padding-bottom: 0; }
.people strong { font-size: 1.2rem; }
.news-empty { margin: 0.35rem 0 0; font-size: 1.08rem; }

.help-fab {
  position: fixed;
  left: 1.15rem;
  bottom: 1.15rem;
  z-index: 40;
  width: 3.1rem;
  height: 3.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  color: var(--hematoxylin);
  font: 700 1.45rem "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.help-fab:hover { border-color: var(--hematoxylin); color: var(--ink); }
.help-fab[aria-expanded="true"] { background: var(--hematoxylin-deep); color: #f4f8fb; }
.help-panel {
  position: fixed;
  left: 1.15rem;
  bottom: 4.6rem;
  z-index: 40;
  width: min(34rem, calc(100vw - 2.3rem));
  max-height: min(70vh, 40rem);
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 1.2rem 1.25rem 1.35rem;
}
.help-panel[hidden] { display: none; }
.help-panel h2 {
  margin: 0 0 0.85rem;
  font-size: var(--fs-2);
}
.help-item { margin: 0 0 1.05rem; }
.help-item:last-child { margin-bottom: 0; }
.help-item h3 {
  margin: 0 0 0.35rem;
  font-size: var(--fs-3);
}
.help-item p, .help-item dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}
.help-glossary {
  margin: 0.35rem 0 0;
  display: grid;
  gap: 0.45rem;
}
.help-glossary div {
  display: grid;
  grid-template-columns: 8.2rem 1fr;
  gap: 0.55rem;
}
.help-glossary dt {
  margin: 0;
  font-weight: 700;
  font-size: 0.86rem;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
}
.help-glossary dd { margin: 0; }

@media (max-width: 1100px) {
  .stat-modules,
  .sunburst-layout,
  .about-split { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .module { transition: none; }
}

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

body.page-spatial { overflow: hidden; }

.spatial-page {
  height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(16.5rem, 21.25rem) minmax(0, 1fr);
  background: var(--bg);
}
.sx-boot {
  grid-column: 1 / -1;
  margin: 2rem;
  color: var(--muted);
}

.sx-rail {
  position: relative;
  min-width: 0;
  background: var(--bg-elev);
  border-right: 1px solid var(--line);
  overflow: auto;
  padding: 1rem 1.05rem 5.6rem;
}
.sx-rail.is-busy { overflow: hidden; }
.sx-rail-busy {
  position: absolute;
  inset: 0;
  z-index: 24;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2.4rem 1.1rem 1.2rem;
  background: rgba(16, 22, 29, 0.78);
  cursor: wait;
  pointer-events: auto;
  user-select: none;
}
.sx-rail-busy[hidden] { display: none; }
html[data-theme="light"] .sx-rail-busy {
  background: rgba(230, 238, 243, 0.78);
}
.sx-rail-busy-card {
  max-width: 16.5rem;
  padding: 0.95rem 1rem;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}
.sx-rail-busy-card strong {
  display: block;
  font-size: var(--fs-3);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
}
.sx-rail-busy-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}
.sx-rail h2 {
  margin: 0;
  font-size: var(--fs-2);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.sx-tools h2 {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 12px;
}
.sx-block + .sx-block {
  margin-top: 1.15rem;
  padding-top: 1.05rem;
  border-top: 1px solid var(--line);
}
.sx-kicker {
  margin: 0.2rem 0 0.7rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.sx-label {
  display: block;
  margin: 0.7rem 0 0.28rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.sx-tech {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
}
.sx-tech-btn {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.45rem 0.65rem;
  cursor: pointer;
}
.sx-tech-btn strong {
  font-size: 0.98rem;
  font-weight: 700;
  color: inherit;
}
.sx-tech-btn span {
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
}
.sx-tech-btn:hover { border-color: var(--hematoxylin); color: var(--ink); }
.sx-tech-btn.is-active {
  color: var(--ink);
  border-color: var(--gold);
  box-shadow: inset 3px 0 0 var(--gold);
}
.sx-rail select,
.sx-rail input[type="search"],
.sx-rail input[type="number"] {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.4rem 0.5rem;
}
.sx-rail select:disabled { opacity: 0.55; }
.sx-meta, .sx-hint {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}
.sx-hint code, .sx-meta code {
  font-size: 0.84em;
}

.sx-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.7rem;
}
.sx-tab {
  font: inherit;
  font-weight: 700;
  font-size: var(--fs-3);
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 0.35rem 0.2rem 0.5rem;
  cursor: pointer;
}
.sx-tab:hover { color: var(--ink); }
.sx-tab.is-active {
  color: var(--ink);
  border-bottom-color: var(--hematoxylin);
}
.sx-cat-actions {
  display: flex;
  gap: 0.75rem;
  margin: 0.45rem 0 0.35rem;
}
.sx-link {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--hematoxylin);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.sx-link:hover { color: var(--eosin); }
.sx-cat-list {
  display: grid;
  gap: 0.12rem;
  max-height: 32vh;
  overflow: auto;
}
.sx-cat {
  display: grid;
  grid-template-columns: auto 0.7rem minmax(0, 1fr);
  align-items: start;
  gap: 0.4rem;
  font-size: 0.86rem;
  line-height: 1.3;
  padding: 0.18rem 0;
  cursor: pointer;
}
.sx-cat input { margin: 0.15rem 0 0; }
.sx-swatch {
  width: 0.7rem;
  height: 0.7rem;
  margin-top: 0.2rem;
  border: 1px solid var(--line);
}
.sx-cat-name { min-width: 0; }
.sx-gene-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem;
}
.gene-selector {
  position: relative;
}
.gene-dropdown {
  position: fixed;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  max-height: 240px;
  overflow-y: auto;
  z-index: 40;
  display: none;
}
.gene-dropdown.visible {
  display: block;
}
.gene-item {
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--ink);
}
.gene-item:hover {
  background: var(--bg-elev);
}
.gene-item strong {
  color: var(--hematoxylin);
  font-weight: 700;
}
.sx-loading {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 4;
  pointer-events: none;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 0.4rem 0.65rem;
  font-size: 0.82rem;
  color: var(--muted);
  max-width: min(22rem, calc(100% - 24px));
}
.sx-loading[hidden] { display: none; }
.sx-confirm {
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  padding: 0.4rem 0.65rem;
  cursor: pointer;
}
.sx-confirm:hover { border-color: var(--hematoxylin); }
.sx-range-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 0.45rem;
}
.sx-auto {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.sx-range-inputs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.35rem;
  align-items: center;
}
.sx-range-inputs span { color: var(--muted); text-align: center; }

.sx-stage {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  padding: 0.85rem 0.9rem 1rem;
}
.sx-slide {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background:
    linear-gradient(180deg, rgba(201, 163, 106, 0.08), transparent 28%),
    var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.sx-frost {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.7rem 1rem 0.65rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(232, 238, 243, 0.08), transparent 55%);
}
html[data-theme="light"] .sx-frost {
  background: linear-gradient(90deg, #eef3f6, transparent 70%);
}
.sx-frost-id {
  font-family: "Abril Fatface", "Times New Roman", serif;
  font-size: clamp(1.55rem, 2.4vw, 2.05rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.sx-frost-sub {
  color: var(--muted);
  font-size: 0.9rem;
}
.sx-well {
  position: relative;
  min-height: 0;
  background: var(--sx-map);
}
.sx-well canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  background: var(--sx-map);
}
.sx-well canvas.is-panning { cursor: grabbing; }
.sx-well canvas.is-lasso,
.sx-well canvas.is-lasso.is-panning {
  cursor: crosshair;
  touch-action: none;
}
.sx-tools {
  position: relative;
}
.sx-toolbar {
  display: grid;
  grid-template-columns: repeat(4, 40px);
  gap: 8px;
  margin-top: 0;
  justify-content: start;
  user-select: none;
}
.sx-tool {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
.sx-tool svg {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}
.sx-tool svg[hidden],
.sx-tool svg[style*="display: none"] {
  display: none !important;
}
.sx-tool:hover {
  background: var(--line);
  color: var(--ink);
}
.sx-tool.is-active {
  color: var(--ink);
  background: var(--hematoxylin);
  border-color: var(--hematoxylin);
  box-shadow: none;
}
.sx-tool:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.sx-tool-text {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.sx-tools .tool-popover {
  position: absolute;
  z-index: 20;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.sx-tools .tool-popover.open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.sx-tools .tool-popover__row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sx-tools .tool-popover__row input[type="range"] {
  width: 170px;
  accent-color: var(--hematoxylin);
}
.sx-tools .tool-range-value {
  min-width: 44px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-size: 0.875rem;
}
.selection-toast {
  position: absolute;
  right: 12px;
  z-index: 5;
  width: min(400px, calc(100% - 24px));
  pointer-events: auto;
}
.selection-toast.hidden { display: none; }
.selection-toast__card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.selection-toast__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
}
.selection-toast__title {
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.selection-toast__btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 0.7rem;
  padding: 2px 10px;
  cursor: pointer;
}
.selection-toast__btn:hover {
  border-color: var(--hematoxylin);
  color: var(--hematoxylin);
}
.selection-toast__meta {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.75rem;
  color: var(--muted);
}
.selection-toast__meta strong {
  color: var(--ink);
  font-weight: 600;
}
.selection-toast__list {
  max-height: 220px;
  overflow: auto;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.selection-toast__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  font-size: 0.8rem;
}
.selection-toast__row:nth-child(even) {
  background: var(--bg-elev);
}
.selection-toast__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 72%;
}
.selection-toast__count {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.sx-colorbar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  pointer-events: none;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 0.55rem 0.65rem;
  min-width: 4.2rem;
}
.sx-colorbar[hidden] { display: none; }
.sx-colorbar-title {
  font-size: 0.8rem;
  font-weight: 700;
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sx-colorbar-scale {
  display: flex;
  align-items: stretch;
  gap: 0.4rem;
  margin-top: 0.4rem;
}
.sx-colorbar-bar {
  width: 0.7rem;
  height: 7.5rem;
  border: 1px solid var(--line);
}
.sx-colorbar-ticks {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.sx-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 1.5rem;
  text-align: center;
  color: #e8eef3;
}
.sx-stage-note {
  margin: 0;
  padding: 0.55rem 1rem 0.7rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
  border-top: 1px solid var(--line);
}

.sx-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.28rem;
}
.sx-legend li {
  display: grid;
  grid-template-columns: 0.7rem minmax(0, 1fr);
  gap: 0.45rem;
  align-items: start;
  font-size: 0.86rem;
  line-height: 1.3;
}
.sx-legend .sx-swatch { margin-top: 0.2rem; }
.sx-bar {
  height: 0.7rem;
  margin: 0.55rem 0 0.25rem;
  border: 1px solid var(--line);
}
.sx-bar-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1100px) {
  body.page-spatial { overflow: auto; }
  .spatial-page {
    height: auto;
    min-height: calc(100vh - 76px);
    grid-template-columns: 1fr;
  }
  .sx-rail { border: 0; border-bottom: 1px solid var(--line); padding-bottom: 1.1rem; }
  .sx-stage { min-height: 28rem; }
}

.sx-contrast-card {
  margin-top: 0.9rem;
  padding: 10px;
  background: var(--bg);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sx-contrast-card h3 {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.sx-contrast-card .sx-hint {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
}
.sx-contrast-btn {
  display: block;
  width: 100%;
  margin-top: 0.55rem;
  padding: 0.62rem 0.9rem;
  border: 1px solid var(--hematoxylin);
  background: var(--hematoxylin-deep);
  color: #f4f8fb;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}
.sx-contrast-btn:hover:not(:disabled) { filter: brightness(1.08); }
.sx-contrast-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
  pointer-events: none;
}
html[data-theme="light"] .sx-contrast-btn { color: #f7fbfc; }
.sx-contrast-btn-secondary {
  margin-top: 0.45rem;
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
  font-weight: 650;
}
.sx-contrast-btn-secondary:hover:not(:disabled) { filter: none; background: color-mix(in srgb, var(--hematoxylin) 10%, transparent); }
.sx-contrast-card .sx-contrast-btn {
  margin-top: 4px;
  padding: 8px 12px;
  border: 1px solid rgba(233, 69, 96, 0.45);
  border-radius: 8px;
  background: rgba(233, 69, 96, 0.12);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.sx-contrast-card .sx-contrast-btn:hover:not(:disabled) {
  filter: none;
  background: rgba(233, 69, 96, 0.22);
}
html[data-theme="light"] .sx-contrast-card .sx-contrast-btn {
  color: var(--ink);
}
.sx-contrast-card .sx-contrast-btn-secondary {
  margin-top: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0;
}
.sx-contrast-card .sx-contrast-btn-secondary:hover:not(:disabled) {
  filter: none;
  background: var(--line);
}
.sx-contrast-card .sx-contrast-btn-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.sx-contrast-btn.hidden { display: none; }

body.page-spatial-contrast {
  overflow: auto;
  min-height: 100%;
  background: var(--bg);
}
.spatial-contrast-page {
  padding: 1.5rem 1.35rem 3.2rem;
  max-width: 74rem;
  margin: 0 auto;
}
.scx-card {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.scx-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.1rem;
  padding: 1.35rem 1.5rem 1.2rem;
  border-bottom: 1px solid var(--line);
  border-left: 4px solid var(--hematoxylin);
  background: linear-gradient(90deg, rgba(126, 180, 212, 0.08), transparent 62%);
}
html[data-theme="light"] .scx-card-header {
  background: linear-gradient(90deg, #e8f0f6, transparent 70%);
}
.scx-card-header h2 {
  margin: 0 0 0.35rem;
  font-size: var(--fs-2);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.scx-card-header .page-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}
.scx-card-header .page-subtitle + .page-subtitle { margin-top: 0.4rem; }
.scx-back-map {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
}
.scx-back-map:hover {
  border-color: var(--hematoxylin);
  color: var(--hematoxylin);
  text-decoration: none;
}
.scx-form { position: relative; padding: 1.35rem 1.5rem 1.7rem; }
.scx-form.is-busy { overflow: hidden; }
.scx-form-busy {
  position: absolute;
  inset: 0;
  z-index: 24;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2.2rem 1.2rem 1.2rem;
  background: rgba(16, 22, 29, 0.78);
  cursor: wait;
  pointer-events: auto;
  user-select: none;
}
.scx-form-busy[hidden] { display: none; }
html[data-theme="light"] .scx-form-busy {
  background: rgba(230, 238, 243, 0.78);
}
.scx-form-row {
  display: grid;
  grid-template-columns: 8.25rem minmax(0, 1fr);
  gap: 0.7rem 1.05rem;
  margin-bottom: 1.1rem;
  align-items: start;
}
.scx-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.scx-form-row > .scx-label {
  margin: 0.35rem 0 0;
}
.scx-gene {
  font-family: "Source Serif 4", Georgia, serif;
  font-style: italic;
  font-size: var(--fs-3);
  font-weight: 600;
  line-height: 1.2;
}
.scx-help {
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}
.scx-cluster-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 0.75rem;
}
.scx-cluster-col { min-width: 0; }
.scx-cluster-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.scx-cluster-btn:hover { border-color: var(--hematoxylin); }
.scx-cluster-btn.is-active {
  border-color: var(--hematoxylin);
  box-shadow: inset 0 0 0 1px var(--hematoxylin);
}
.scx-swatch {
  width: 0.72rem;
  height: 0.72rem;
  flex: 0 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.18);
}
.scx-cluster-meta {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
  min-height: 1.15em;
}
.scx-cluster-ops {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.4rem;
}
.scx-op-btn {
  flex: 1;
  padding: 0.32rem 0.45rem;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}
.scx-op-btn:hover:not(:disabled) {
  border-color: var(--hematoxylin);
  color: var(--hematoxylin);
}
.scx-op-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.scx-op-btn.is-active {
  border-color: var(--hematoxylin);
  box-shadow: inset 0 0 0 1px var(--hematoxylin);
  color: var(--hematoxylin);
}
.scx-type-field {
  display: grid;
  gap: 0.22rem;
  margin-top: 0.45rem;
  min-width: 0;
}
.scx-type-field-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.scx-type-field select {
  width: 100%;
  min-width: 0;
  font: inherit;
  font-size: 0.84rem;
  color: var(--ink);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 0.36rem 0.45rem;
}
.scx-map {
  position: relative;
  height: min(72vh, 46rem);
  background: var(--sx-map);
  border: 1px solid var(--line);
  min-width: 0;
}
.scx-field-with-legend {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85rem 1rem;
  align-items: stretch;
}
.scx-field-with-legend.has-legend {
  grid-template-columns: minmax(0, 1fr) minmax(11.5rem, 16.5rem);
}
.scx-ann-legend {
  min-width: 0;
  max-height: min(72vh, 46rem);
  display: flex;
  flex-direction: column;
  padding: 0.55rem 0.65rem 0.7rem;
  border: 1px solid var(--line);
  background: var(--paper);
}
.scx-ann-legend-title {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  flex: none;
}
.scx-ann-legend-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
}
.scx-ann-legend-item {
  display: grid;
  grid-template-columns: 0.7rem minmax(0, 1fr);
  gap: 0.45rem;
  align-items: start;
  cursor: pointer;
  padding: 0.12rem 0.22rem;
  margin: 0 -0.22rem;
  border-radius: 3px;
}
.scx-ann-legend-item:hover,
.scx-ann-legend-item.is-hover {
  background: var(--bg-elev);
}
.scx-ann-legend-item.is-pinned {
  background: var(--bg-elev);
  box-shadow: inset 2px 0 0 var(--hematoxylin);
}
.scx-ann-legend-foot {
  flex: none;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}
.scx-ann-reset {
  display: block;
  width: 100%;
  padding: 0.32rem 0.45rem;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.scx-ann-reset:hover:not(:disabled) {
  border-color: var(--hematoxylin);
  color: var(--hematoxylin);
}
.scx-ann-reset:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.scx-ann-note {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}
.scx-ann-swatch {
  width: 0.7rem;
  height: 0.7rem;
  margin-top: 0.18rem;
  flex: none;
  border: 1px solid var(--line);
}
.scx-ann-name {
  min-width: 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.scx-map-stage {
  position: absolute;
  inset: 0;
}
.scx-map canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  background: var(--sx-map);
}
.scx-map canvas.is-panning { cursor: grabbing; }
.scx-map canvas.is-lasso,
.scx-map canvas.is-lasso.is-panning { cursor: crosshair; }
.scx-scroll {
  position: absolute;
  z-index: 6;
  background: rgba(18, 24, 32, 0.35);
}
.scx-scroll[hidden] { display: none; }
.scx-scroll-x {
  left: 0.45rem;
  right: 1.15rem;
  bottom: 0.4rem;
  height: 0.72rem;
}
.scx-scroll-y {
  top: 0.45rem;
  bottom: 1.15rem;
  right: 0.4rem;
  width: 0.72rem;
}
.scx-scroll-thumb {
  position: absolute;
  background: var(--hematoxylin);
  opacity: 0.9;
  cursor: grab;
  touch-action: none;
}
.scx-scroll-thumb:active { cursor: grabbing; }
.scx-scroll-x .scx-scroll-thumb {
  top: 0.1rem;
  bottom: 0.1rem;
  min-width: 1.8rem;
}
.scx-scroll-y .scx-scroll-thumb {
  left: 0.1rem;
  right: 0.1rem;
  min-height: 1.8rem;
}
html[data-theme="light"] .scx-scroll {
  background: rgba(210, 222, 230, 0.7);
}
.scx-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}
.scx-actions .btn { border: 0; cursor: pointer; }
.scx-actions .btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: none;
}
.scx-error {
  margin-top: 0.85rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--eosin);
  color: var(--eosin);
  font-size: 0.88rem;
  line-height: 1.4;
}
.scx-error[hidden],
.scx-result[hidden] { display: none; }
.scx-result {
  margin-top: 0.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}
.scx-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}
.scx-result-head h3 {
  margin: 0;
  font-size: var(--fs-3);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.scx-pdf {
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  color: var(--ink);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.42rem 0.75rem;
  cursor: pointer;
}
.scx-pdf:hover { border-color: var(--hematoxylin); color: var(--hematoxylin); }
.scx-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.7rem 1.1rem;
  margin-bottom: 0.95rem;
}
.scx-stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}
.scx-stat-item span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.scx-stat-item strong {
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.scx-figure {
  background: #FBF8F1;
  border: 1px solid var(--line);
  overflow: hidden;
}
.scx-de {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}
.scx-de[hidden] { display: none; }
.scx-de > .scx-help { margin: 0 0 0.85rem; }
.scx-de-status {
  min-height: 1.2rem;
  margin-bottom: 0.85rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.scx-de-panel {
  margin-top: 1.15rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--line);
}
.scx-de-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.55rem 0.7rem;
}
.scx-de-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.scx-de-field select,
.scx-de-field input {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  padding: 0.38rem 0.55rem;
  min-width: 9.5rem;
}
.scx-de-field-title input { min-width: 16rem; }
.scx-de-figure {
  background: #ffffff;
  border: 1px solid var(--line);
  overflow-x: auto;
  min-height: 4rem;
}
.scx-ggplot {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  background: #ffffff;
}
.scx-gsea-sets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.45rem 0.85rem;
  max-height: 14rem;
  overflow-y: auto;
  margin-top: 0.75rem;
}
.scx-gsea-set {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.82rem;
  color: var(--ink);
}
.scx-gsea-set-meta {
  color: var(--muted);
  font-size: 0.75rem;
}
.scx-de-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
}
.scx-de-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}
.scx-de-table th,
.scx-de-table td {
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.scx-de-table th {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.scx-de-pager {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.7rem;
}
.scx-pdf:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.contrast-violin {
  display: block;
  width: 100%;
  height: auto;
}
@media (max-width: 960px) {
  .scx-field-with-legend.has-legend {
    grid-template-columns: minmax(0, 1fr);
  }
  .scx-ann-legend {
    max-height: 14rem;
  }
}
@media (max-width: 720px) {
  .scx-form-row { grid-template-columns: 1fr; }
  .scx-card-header { flex-direction: column; }
  .scx-map { height: min(62vh, 28rem); }
  .scx-ann-legend { max-height: 12rem; }
}

.dl-block {
  margin: 0 0 2.4rem;
}
.dl-block h2 {
  font-size: var(--fs-2);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}
.page-download .card p {
  color: var(--ink);
}
.page-download .card p.note {
  color: var(--muted);
}
.page-download .card h3 {
  color: var(--ink);
  font-size: var(--fs-3);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.7rem;
}
.page-download .card p.dl-kicker {
  color: var(--gold);
}
.page-download .dl-block .card + .card {
  margin-top: 1.25rem;
}
.dl-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}
.page-download .dl-kicker ~ .dl-kicker {
  margin-top: 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}
.dl-ref {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.9rem 1.4rem;
  margin: 0;
  padding: 0;
  border: none;
}
.dl-ref + .dl-ref {
  margin-top: 0.9rem;
}
.page-download .dl-ref p {
  margin: 0 0 0.35rem;
}
.page-download .dl-ref p:last-of-type {
  margin-bottom: 0;
}
.dl-ref .pill { margin-bottom: 0.55rem; }
.dl-gse {
  border: 1px solid var(--line);
  background: var(--bg-elev);
  margin: 0.55rem 0 0;
}
.dl-gse summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  padding: 0.7rem 0.95rem;
  font-weight: 700;
}
.dl-gse summary::-webkit-details-marker { display: none; }
.dl-gse-meta {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.92rem;
}
.dl-gse table { margin: 0; }
.dl-gse td .btn {
  padding: 0.32rem 0.7rem;
  font-size: 0.82rem;
}
.dl-mail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.4rem;
}
.dl-foot {
  margin-top: 0.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.scx-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  max-height: 12.5rem;
  overflow: auto;
  padding: 0.2rem 0;
}
.scx-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.86rem;
}
.scx-partner-mode {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.55rem;
}
.scx-color-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem 1.6rem;
}
.scx-color-field {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.86rem;
  color: var(--text);
  cursor: pointer;
}
.scx-color-field input[type="color"] {
  width: 2rem;
  height: 1.55rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}
.scx-actions .sx-contrast-btn {
  width: auto;
  min-width: 13rem;
}
.ggplot-figure {
  display: block;
  max-width: 100%;
  height: auto;
  background: #fff;
  margin: 0 auto;
}
.page-spatial-contrast .gene-selector { position: relative; max-width: 22rem; }

.tut-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.tut-hero {
  display: grid;
  gap: 0;
  margin-bottom: 1.4rem;
  padding: 2.2rem 2.4rem;
}
.tut-hero h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(2.4rem, 4.8vw, 5.2rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  white-space: nowrap;
}
.tut-hero-copy > p:last-child {
  margin: 0;
  max-width: 82ch;
  color: var(--muted);
  font-size: 1.08rem;
}
.tut-route > span,
.tut-local-nav a span,
.tut-step-copy > span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hematoxylin);
}
.tut-routes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  margin-bottom: 1.6rem;
}
.tut-route {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  color: inherit;
  min-height: 10.5rem;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.tut-route:hover {
  transform: translateY(-3px);
  color: inherit;
}
.tut-route h2 {
  margin: 0;
  font-size: var(--fs-2);
}
.tut-route p {
  margin: 0;
  color: var(--muted);
}
.tut-layout {
  display: grid;
  grid-template-columns: 15.5rem minmax(0, 1fr);
  gap: 1.3rem;
  align-items: start;
}
.tut-local-nav {
  position: sticky;
  top: 5.6rem;
  display: grid;
  gap: 0.85rem;
}
.tut-local-nav nav {
  display: grid;
  gap: 0.25rem;
}
.tut-local-nav a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  color: var(--muted);
  font-weight: 700;
  border-left: 3px solid transparent;
}
.tut-local-nav a:hover,
.tut-local-nav a.is-active {
  color: var(--ink);
  background: var(--stat-fill);
  border-left-color: var(--hematoxylin);
}
.tut-main {
  display: grid;
  gap: 1.4rem;
}
.tut-section,
.tut-section-head {
  scroll-margin-top: 5.6rem;
}
.tut-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.2rem;
}
.tut-section-head h2 {
  margin: 0 0 0.45rem;
  font-size: var(--fs-1);
}
.tut-section-head p:not(.tut-kicker):not(.tut-meta) {
  margin: 0;
  color: var(--muted);
  max-width: 72ch;
}
.tut-meta {
  margin: 0;
  padding: 0.28rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.tut-step-list {
  display: grid;
  gap: 1.05rem;
}
.tut-step {
  display: grid;
  grid-template-columns: minmax(13.5rem, 0.34fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
  padding: 0.85rem;
  border: 1px solid var(--line);
  background: var(--stat-fill);
}
.tut-step-copy {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.4rem;
  padding: 0.55rem 0.4rem 0.55rem 0.9rem;
}
.tut-step-copy::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7rem;
  bottom: 0.7rem;
  width: 3px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--hematoxylin), rgba(126, 180, 212, 0.2));
}
.tut-step-copy h3 {
  margin: 0;
  font-size: var(--fs-3);
  letter-spacing: -0.02em;
}
.tut-step-copy p {
  margin: 0;
  color: var(--muted);
}
.tut-shot {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}
.tut-chrome {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  min-height: 2rem;
  padding: 0 0.75rem;
  border-bottom: 1px solid var(--line);
  background: var(--nav-bg);
}
.tut-chrome span {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--line-strong);
  opacity: 0.75;
}
.tut-chrome span:nth-child(1) { background: #d07a7e; }
.tut-chrome span:nth-child(2) { background: #c9a36a; }
.tut-chrome span:nth-child(3) { background: #6fb59a; }
.tut-chrome strong {
  margin-left: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.tut-shot img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--bg);
}
.tut-shot figcaption {
  padding: 0.65rem 0.8rem 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  border-top: 1px solid var(--line);
}
@media (max-width: 1100px) {
  .tut-routes,
  .tut-layout,
  .tut-section-head,
  .tut-step {
    grid-template-columns: 1fr;
  }
  .tut-local-nav { position: static; }
  .tut-local-nav nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .tut-hero h1 { white-space: normal; }
  .tut-local-nav nav { grid-template-columns: 1fr; }
}
