/* ── 1. Web Font Registration (2 Families Strictly: Yongle + Neutral UI Sans) ── */
@font-face {
  font-family: "Yongle";
  src: url("fonts/Yongle-SCCommon.woff2?v=1.2.4") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Yongle";
  src: url("fonts/Yongle-Subset.woff2?v=1.2.4") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+20-22, U+25-29, U+2B-3B, U+3D, U+3F, U+41-5A, U+61-7A, U+B7, U+E0, U+E9, U+F2, U+113, U+2026, U+2103, U+3001-3002, U+300A-300D, U+4E00, U+4E09, U+4E0B, U+4E0D-4E0E, U+4E13, U+4E1D, U+4E24, U+4E2D, U+4E49, U+4E4B, U+4E50, U+4E5F, U+4E66, U+4E8C, U+4E8E, U+4E91, U+4EBA, U+4EC1, U+4ECA, U+4ECE, U+4EE3-4EE5, U+4F17, U+4F53, U+4F5C, U+4F7F, U+4F8B, U+4F9D, U+4FE1, U+4FED-4FEE, U+501F, U+5065, U+5149, U+515C, U+5168, U+5178, U+517C, U+5185, U+5199, U+51C6, U+51E1, U+51E4, U+51FA, U+51FF, U+521D, U+5230, U+52A9, U+5306, U+5341, U+5343, U+5373, U+538B, U+539A, U+53D1, U+53D6, U+53E0, U+53E4, U+53EF-53F0, U+53F7, U+540C, U+548C, U+56DB, U+56FD, U+5728, U+573A, U+57CE, U+58A8, U+58C1, U+590D, U+5927, U+5929-592A, U+5931, U+5934, U+5957, U+59CA, U+5B57-5B58, U+5B75, U+5B8B, U+5B9E, U+5BB6, U+5C0F, U+5C18, U+5C4F, U+5C71, U+5DE5, U+5E55, U+5E73, U+5E76, U+5E84, U+5E93, U+5F00, U+5F52-5F53, U+5F62, U+5F71, U+5F80, U+5F97, U+5FB7, U+5FC3, U+603B, U+606D, U+6089, U+610F, U+6240, U+6284, U+62BD, U+6324, U+6392, U+6400, U+653B, U+6570, U+6574, U+6587, U+65E0, U+65E5, U+65E7, U+660E, U+661F, U+6625, U+6653, U+666F-6670, U+667A, U+6708, U+672C, U+6731, U+673A, U+6761, U+6807, U+680F, U+6821, U+683C, U+68C0, U+68CB, U+6977, U+6A2A, U+6B21, U+6B63, U+6B65-6B66, U+6BCF, U+6C14, U+6C34, U+6C38, U+6C49, U+6CE8, U+6CFD, U+6D41, U+6DA6, U+6DB5, U+6DF7, U+6E05, U+6E29, U+6E90, U+706B, U+7089, U+70B9, U+70BC, U+7136, U+7146, U+7228, U+7269, U+73B0, U+7434, U+7528, U+753B, U+7559, U+767D, U+7684, U+76D6, U+76F4, U+77E5, U+781A, U+792E, U+793C, U+7980, U+79CB, U+7A7A, U+7AD6, U+7AE0, U+7AEF, U+7B14, U+7B26, U+7B6C, U+7B80, U+7C4D, U+7CB1, U+7E9B, U+7EA7, U+7EB1, U+7EB8, U+7EBF, U+7EC7, U+7ECF, U+7EDF, U+7F57, U+7F6E, U+8005, U+800C, U+80FD, U+81EA, U+81F4, U+826F, U+82F1, U+8303, U+8336, U+83B7, U+884C, U+8981, U+89C1, U+89C4, U+8BA9, U+8BD5, U+8BD7, U+8BDA, U+8BFB, U+8C61, U+8D63, U+8E9C, U+8EAB, U+8F3C, U+8F52, U+8F66, U+8F7D, U+8FB0, U+8FDE, U+901A, U+9020, U+9053, U+90E8, U+914D, U+9152, U+91CA, U+91CD, U+91CF, U+9283, U+95F4, U+9601, U+9605, U+96C5, U+97F3, U+97F5, U+987E, U+9882, U+98CE, U+9995, U+9AA8, U+9B13, U+9B23, U+9E92, U+9E9F, U+9F49, U+9F50, U+9F99, U+FF01, U+FF0C, U+FF1A-FF1B, U+FF1F, U+20CD0, U+25ED7, U+2C27C;
}

/* ── 2. Design Tokens: Cool Gallery Alabaster, Pine-Soot Obsidian & Imperial Cinnabar ── */
:root {
  color-scheme: light;

  /* Surfaces */
  --bg: #FBFBFA;
  --surface: #F2F3F0;
  --surface-pure: #FFFFFF;
  --obsidian: #111315;
  --obsidian-elev: #191C20;

  /* Ink & Contrast (All AA >= 4.5:1) */
  --ink: #141618;
  --muted: #525860;
  --ink-dark: #F5F6F4;
  --muted-dark: #A9B0B8;

  /* Single Deliberate Accent: Imperial Cinnabar */
  --accent: #BE2721;
  --accent-hover: #9B1E19;
  --accent-on-dark: #EB5B54;
  --zhusilan-rule: rgba(190, 39, 33, 0.32);

  /* Hairlines */
  --rule: #DEDFD9;
  --rule-strong: #C2C5BC;
  --rule-dark: rgba(255, 255, 255, 0.14);

  /* 2 Font Families Strictly */
  --font-display: "Yongle", "Songti SC", "STSong", serif;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;

  /* Strict 3-Size Body Scale (Hero h1 and navbar brand exempt) */
  --text-heading: clamp(1.85rem, 3.1vw, 2.65rem);
  --text-body: 1rem;
  --text-sm: 0.875rem;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 4.5rem;
  --container-max: 78rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.72;
  color: var(--ink);
  background-color: var(--bg);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
  transition: color 180ms var(--ease-out), opacity 180ms var(--ease-out);
}

a:hover {
  color: var(--accent-hover);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.section-obsidian :focus-visible,
.hero-stage :focus-visible {
  outline-color: var(--accent-on-dark);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3.5rem);
}

/* ── 3. Borderless Fixed Header with Clean Scrolled Surface Separation ── */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background-color: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 200ms var(--ease-out), border-color 200ms var(--ease-out);
}

.site-header.is-scrolled,
.site-header.is-menu-open {
  background-color: rgba(251, 251, 250, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--rule);
}

.header-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  height: var(--header-h);
  padding-inline: clamp(1.25rem, 4vw, 3.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  background-color: var(--accent);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1;
  border-radius: 3px;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.4vw, 2.25rem);
}

.site-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  padding-block: 0.25rem;
  transition: color 160ms var(--ease-out);
}

.site-nav a:hover {
  color: var(--accent);
}

.site-nav a.nav-download {
  color: var(--accent);
  font-weight: 600;
}

.site-nav a.nav-download:hover {
  color: var(--accent-hover);
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 1.15rem;
  height: 1.5px;
  background-color: var(--ink);
  transition: transform 180ms var(--ease-out), opacity 180ms var(--ease-out);
}

.mobile-menu {
  border-top: 1px solid var(--rule);
  padding: 0.75rem clamp(1.25rem, 4vw, 3.5rem) 1.25rem;
  display: grid;
  gap: 0.25rem;
  background-color: var(--bg);
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu a {
  font-size: var(--text-body);
  color: var(--ink);
  text-decoration: none;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--rule);
}

.mobile-menu a:last-child {
  border-bottom: 0;
  color: var(--accent);
  font-weight: 600;
}

/* ── 4. Opening Hero: Monumental Centered Display + Interactive Pine-Soot Stage ── */
.hero {
  position: relative;
  min-height: 100dvh;
  padding: calc(var(--header-h) + clamp(2.25rem, 6vh, 4.5rem)) clamp(1.25rem, 4vw, 3.5rem) clamp(2.5rem, 5vh, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  background:
    radial-gradient(64% 48% at 50% 0%, rgba(190, 39, 33, 0.045) 0%, rgba(251, 251, 250, 0) 72%),
    linear-gradient(180deg, #F5F5F2 0%, var(--bg) 42%);
}

.hero-guides {
  position: absolute;
  inset: 0 clamp(1rem, 3.5vw, 3rem);
  border-inline: 1px solid rgba(190, 39, 33, 0.14);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 64rem;
  margin-inline: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.1rem, 2.2vh, 1.75rem);
  margin-block: auto;
  padding-bottom: clamp(1.75rem, 4vh, 3rem);
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(4.25rem, 11.5vw, 9.25rem);
  line-height: 0.98;
  letter-spacing: 0.06em;
  color: var(--ink);
  font-kerning: normal;
  font-feature-settings: "kern" 1;
}

.hero-char {
  display: inline-block;
  animation: heroRise 620ms var(--ease-out) both;
}

.hero-char:nth-child(2) { animation-delay: 65ms; }
.hero-char:nth-child(3) { animation-delay: 130ms; }
.hero-char:nth-child(4) { animation-delay: 195ms; }

@keyframes heroRise {
  from {
    opacity: 0.01;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-lead {
  margin: 0;
  max-width: 44rem;
  font-size: var(--text-body);
  color: var(--muted);
  line-height: 1.7;
}

.hero-action {
  padding-top: 0.25rem;
}

/* Primary CTA Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.72rem 2rem;
  border-radius: 3px;
  background-color: var(--accent);
  color: var(--bg);
  font-size: var(--text-body);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: background-color 180ms var(--ease-out), border-color 180ms var(--ease-out), transform 180ms var(--ease-out);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--bg);
  transform: translateY(-1px);
}

.btn-subtle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  background-color: var(--surface-pure);
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: border-color 160ms var(--ease-out), color 160ms var(--ease-out), background-color 160ms var(--ease-out);
}

.btn-subtle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Above-the-Fold Pine-Soot Interactive Stage */
.hero-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container-max);
  background-color: var(--obsidian);
  color: var(--ink-dark);
  border-top: 2px solid var(--accent);
  padding: clamp(1rem, 2.2vw, 1.5rem) clamp(1.25rem, 3vw, 2.5rem) clamp(1.5rem, 3vw, 2.25rem);
}

.hero-stage-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule-dark);
}

.hero-stage-hint {
  font-size: var(--text-sm);
  color: var(--muted-dark);
}

.hero-stage-editable {
  margin-top: 1.15rem;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.8vw, 3.15rem);
  line-height: 1.32;
  letter-spacing: 0.02em;
  color: var(--ink-dark);
  font-kerning: normal;
  font-feature-settings: "kern" 1;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-height: 1.4em;
  caret-color: var(--accent-on-dark);
}

.hero-stage-editable:focus {
  outline: none;
}

/* ── 5. Shared Sections & Typographic Rhythm ── */
.section {
  padding-block: clamp(4.5rem, 8.5vw, 7.5rem);
}

.section-light {
  background-color: var(--bg);
}

.section-stone {
  background-color: var(--surface);
  border-block: 1px solid var(--rule);
}

.section-obsidian {
  background-color: var(--obsidian);
  color: var(--ink-dark);
}

.section-download {
  background-color: var(--surface);
  border-top: 2px solid var(--accent);
}

.section-head {
  max-width: 48rem;
  margin-bottom: clamp(2.25rem, 4.5vw, 3.5rem);
}

.section-head h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-heading);
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.section-head-dark h2 {
  color: var(--ink-dark);
}

.section-desc {
  margin: 0;
  max-width: 60ch;
  font-size: var(--text-body);
  color: var(--muted);
}

.section-head-dark .section-desc {
  color: var(--muted-dark);
}

h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
}

.section-obsidian h3 {
  color: var(--ink-dark);
}

/* ── 6. Connected Non-Button Controls (Segmented Toggle, Select, Switch, Range) ── */
.segmented {
  display: inline-flex;
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  overflow: hidden;
  background-color: var(--surface-pure);
}

.hero-stage .segmented,
.segmented-dark {
  border-color: var(--rule-dark);
  background-color: var(--obsidian-elev);
}

.seg-item {
  position: relative;
  display: inline-flex;
  cursor: pointer;
  margin: 0;
}

.seg-item + .seg-item {
  border-left: 1px solid var(--rule);
}

.hero-stage .seg-item + .seg-item,
.segmented-dark .seg-item + .seg-item {
  border-left-color: var(--rule-dark);
}

.seg-item input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.seg-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.42rem 0.9rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}

.hero-stage .seg-item span,
.segmented-dark .seg-item span {
  color: var(--muted-dark);
}

.seg-item:hover span {
  color: var(--ink);
}

.hero-stage .seg-item:hover span,
.segmented-dark .seg-item:hover span {
  color: var(--ink-dark);
}

.seg-item input:checked + span {
  background-color: var(--ink);
  color: var(--bg);
}

.hero-stage .seg-item input:checked + span,
.segmented-dark .seg-item input:checked + span {
  background-color: var(--accent);
  color: var(--bg);
}

.seg-item input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.seg-glyph span {
  font-family: var(--font-display);
  font-size: var(--text-body);
  padding: 0.42rem 0.95rem;
}

/* Toggle Switch */
.switch-control {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--ink);
  user-select: none;
}

.switch-dark {
  color: var(--ink-dark);
}

.switch-control input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.switch-track {
  position: relative;
  width: 2.35rem;
  height: 1.3rem;
  border-radius: 999px;
  background-color: var(--rule-strong);
  flex-shrink: 0;
  transition: background-color 180ms var(--ease-out);
}

.switch-dark .switch-track {
  background-color: rgba(255, 255, 255, 0.24);
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(1.3rem - 4px);
  height: calc(1.3rem - 4px);
  border-radius: 50%;
  background-color: var(--surface-pure);
  transition: transform 180ms var(--ease-out);
}

.switch-control input:checked + .switch-track {
  background-color: var(--accent);
}

.switch-control input:checked + .switch-track::after {
  transform: translateX(1.05rem);
}

.switch-control input:focus-visible + .switch-track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── 7. Section 2: Interactive Type Studio ── */
.studio-toolbar {
  display: grid;
  grid-template-columns: auto auto auto minmax(18rem, 1fr) auto;
  align-items: end;
  gap: 1rem 1.25rem;
  padding-block: 1.25rem;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule);
}

.studio-toolbar .seg-item span {
  padding: 0.42rem 0.7rem;
}

.tool-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.tool-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.tool-select {
  appearance: none;
  min-width: 11.25rem;
  height: 2.35rem;
  padding: 0 2rem 0 0.7rem;
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  background-color: var(--surface-pure);
  font-size: var(--text-sm);
  color: var(--ink);
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.tool-sliders {
  display: grid;
  grid-template-columns: repeat(3, minmax(5.75rem, 1fr));
  gap: 0.85rem 1rem;
}

.slider-item {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.slider-item output {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

input[type="range"] {
  width: 100%;
  margin: 0;
  height: 1.5rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.tool-switch-group {
  padding-bottom: 0.42rem;
  white-space: nowrap;
}

.studio-stage {
  margin-top: 1.5rem;
  border: 1px solid var(--rule);
  background-color: var(--surface-pure);
  color: var(--ink);
  transition: background-color 220ms var(--ease-out), color 220ms var(--ease-out), border-color 220ms var(--ease-out);
}

.studio-stage[data-theme="ink"] {
  background-color: var(--obsidian);
  color: var(--ink-dark);
  border-color: var(--obsidian-elev);
}

.studio-canvas-wrap {
  min-height: 21rem;
  padding: clamp(1.5rem, 3.5vw, 3rem);
  overflow-x: auto;
}

.studio-canvas {
  font-family: var(--font-display);
  font-size: var(--specimen-size, 52px);
  line-height: var(--specimen-lh, 1.55);
  letter-spacing: var(--specimen-ls, 0em);
  font-kerning: normal;
  font-feature-settings: "kern" 1;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-height: 15rem;
  caret-color: var(--accent);
}

.studio-canvas:focus {
  outline: none;
}

.studio-canvas[data-kern="off"] {
  font-kerning: none;
  font-feature-settings: "kern" 0;
}

/* Ming-Dynasty Zhusilan (朱丝栏) Vertical Mode */
.studio-stage[data-dir="vertical"] .studio-canvas-wrap {
  display: flex;
  justify-content: center;
  padding: clamp(1.5rem, 3vw, 2.75rem);
}

.studio-stage[data-dir="vertical"] .studio-canvas {
  writing-mode: vertical-rl;
  text-orientation: upright;
  min-height: 26rem;
  max-height: 34rem;
  width: 100%;
  padding: 1.75rem 1.25rem;
  border: 3px double var(--accent);
  background-image: repeating-linear-gradient(
    to left,
    transparent 0,
    transparent calc(1em * var(--specimen-lh, 1.55) - 1px),
    var(--zhusilan-rule) calc(1em * var(--specimen-lh, 1.55) - 1px),
    var(--zhusilan-rule) calc(1em * var(--specimen-lh, 1.55))
  );
  background-origin: content-box;
  overflow-x: auto;
}

.studio-stage[data-theme="ink"][data-dir="vertical"] .studio-canvas {
  border-color: var(--accent-on-dark);
  background-image: repeating-linear-gradient(
    to left,
    transparent 0,
    transparent calc(1em * var(--specimen-lh, 1.55) - 1px),
    rgba(235, 91, 84, 0.34) calc(1em * var(--specimen-lh, 1.55) - 1px),
    rgba(235, 91, 84, 0.34) calc(1em * var(--specimen-lh, 1.55))
  );
}

.studio-statusbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 0.85rem clamp(1.5rem, 3.5vw, 3rem);
  border-top: 1px solid var(--rule);
  font-size: var(--text-sm);
  color: var(--muted);
}

.studio-stage[data-theme="ink"] .studio-statusbar {
  border-top-color: var(--rule-dark);
  color: var(--muted-dark);
}

.studio-statusbar p {
  margin: 0;
}

.studio-count {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ── 8. Section 3: Obsidian Exhibition Stage: Real Vector Glyph Anatomy ── */
.anatomy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.anatomy-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.anatomy-switches {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.anatomy-viewport {
  border: 1px solid var(--rule-dark);
  background-color: var(--obsidian-elev);
  padding: clamp(1rem, 2.5vw, 2rem);
}

#anatomy-svg {
  display: block;
  width: 100%;
  max-height: 29rem;
  height: auto;
}

.svg-guides {
  transition: opacity 200ms var(--ease-out);
}

.guide-embox {
  fill: none;
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 2;
}

.guide-axis {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 2;
  stroke-dasharray: 10 10;
}

.guide-subtle {
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 2;
  stroke-dasharray: 6 8;
}

.guide-accent {
  stroke: var(--accent-on-dark);
  stroke-width: 3;
}

.guide-slant {
  stroke: rgba(235, 91, 84, 0.52);
  stroke-width: 2;
  stroke-dasharray: 10 8;
}

.guide-label {
  fill: var(--muted-dark);
  font-family: var(--font-sans);
  font-size: 34px;
}

.guide-label-accent {
  fill: var(--accent-on-dark);
  font-weight: 600;
}

.svg-glyph-fill {
  fill: var(--ink-dark);
  stroke: transparent;
  stroke-width: 0;
  transition: fill 200ms var(--ease-out), stroke 200ms var(--ease-out);
}

.svg-glyph-fill.is-wireframe {
  fill: rgba(245, 246, 244, 0.08);
  stroke: var(--ink-dark);
  stroke-width: 4;
}

.svg-nodes.is-hidden {
  display: none;
}

.svg-node-dot {
  fill: var(--accent-on-dark);
}

.anatomy-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule-dark);
  font-size: var(--text-sm);
  color: var(--muted-dark);
}

.anatomy-detail {
  margin-top: 1.5rem;
}

.anatomy-detail p {
  margin: 0 0 1rem;
  color: var(--muted-dark);
  max-width: 60ch;
}

.anatomy-notes {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.55rem;
  color: var(--muted-dark);
  font-size: var(--text-body);
}

.anatomy-notes strong {
  color: var(--ink-dark);
  font-weight: 600;
}

.anatomy-pillars {
  display: grid;
  gap: 2rem;
}

.pillar-item {
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule-dark);
}

.pillar-item p {
  margin: 0;
  color: var(--muted-dark);
}

/* ── 9. Section 4: Art-Directed Editorial In-Use Showcase + Optical Ladder ── */
.showcase-spread {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: stretch;
}

.showcase-photo-frame {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.showcase-photo-frame picture {
  display: block;
  width: 100%;
}

.showcase-photo-frame img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 1px solid var(--rule);
}

.showcase-photo-frame figcaption {
  font-size: var(--text-sm);
  color: var(--muted);
}

.showcase-editorial-demo {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
}

.zhusilan-sheet {
  flex: 1;
  background-color: var(--surface-pure);
  border: 1px solid var(--rule);
  padding: clamp(1.25rem, 2.5vw, 2rem);
  display: grid;
  place-items: center;
}

.zhusilan-frame {
  width: 100%;
  min-height: 19rem;
  border: 3px double var(--accent);
  padding: 1.25rem 0.75rem;
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-around;
  align-items: center;
  background-image: linear-gradient(to left, transparent calc(100% - 1px), var(--zhusilan-rule) calc(100% - 1px));
  background-size: 20% 100%;
}

.zhusilan-col {
  margin: 0;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2.5vw, 2.25rem);
  line-height: 1.25;
  letter-spacing: 0.22em;
  color: var(--ink);
}

.editorial-note p {
  margin: 0;
  color: var(--muted);
}

/* Widescreen Documentary Showcase */
.cinema-showcase {
  margin-top: clamp(3rem, 6vw, 4.75rem);
}

.cinema-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--obsidian);
  border: 1px solid var(--rule);
}

.cinema-stage picture {
  display: block;
  width: 100%;
  height: 100%;
}

.cinema-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cinema-caption-layer {
  position: absolute;
  inset: auto 0 0 0;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.25rem, 4vw, 3.5rem) clamp(1.25rem, 3vw, 2.5rem);
  background: linear-gradient(180deg, rgba(17, 19, 21, 0) 0%, rgba(17, 19, 21, 0.72) 58%, rgba(17, 19, 21, 0.9) 100%);
  text-align: center;
  color: var(--ink-dark);
}

.cinema-subtitle {
  margin: 0 auto 0.5rem;
  max-width: 34ch;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.7vw, 2.25rem);
  line-height: 1.4;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.cinema-pinyin {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-body);
  color: rgba(245, 246, 244, 0.86);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.cinema-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  margin-top: 1.35rem;
}

.cinema-copy {
  max-width: 54ch;
}

.cinema-copy p {
  margin: 0;
  color: var(--muted);
}

/* Optical Size Ladder */
.ladder-block {
  margin-top: clamp(3.5rem, 6.5vw, 5.5rem);
  padding-top: clamp(2.25rem, 4vw, 3rem);
  border-top: 1px solid var(--rule-strong);
}

.ladder-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-bottom: 1.5rem;
}

.ladder-head p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--muted);
}

.ladder-rows {
  display: grid;
}

.ladder-row {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 1rem 2rem;
  align-items: baseline;
  padding-block: 1.35rem;
  border-top: 1px solid var(--rule);
}

.ladder-spec {
  font-size: var(--text-sm);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.ladder-sample {
  margin: 0;
  font-family: var(--font-display);
  color: var(--ink);
  font-kerning: normal;
  font-feature-settings: "kern" 1;
  overflow-wrap: anywhere;
}

.ladder-72 { font-size: clamp(2.5rem, 5.2vw, 4.5rem); line-height: 1.12; }
.ladder-40 { font-size: clamp(1.6rem, 3vw, 2.5rem); line-height: 1.28; }
.ladder-24 { font-size: 1.5rem; line-height: 1.55; }
.ladder-16 { font-size: var(--text-body); line-height: 1.85; max-width: 56ch; }

/* ── 10. Section 5: Repertoire Ledger, Live Checker & Glyph Browser ── */
.repertoire-ledger {
  margin: 0 0 2.5rem;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-block: 1px solid var(--rule-strong);
}

.ledger-item {
  padding: 1.25rem 1rem 1.25rem 0;
}

.ledger-item + .ledger-item {
  padding-left: 1.25rem;
  border-left: 1px solid var(--rule);
}

.ledger-item dt {
  font-size: var(--text-sm);
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.ledger-item dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-heading);
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.ledger-total dd {
  color: var(--accent);
}

/* Coverage Checker */
.checker-box {
  background-color: var(--surface-pure);
  border: 1px solid var(--rule);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  margin-bottom: 2.5rem;
}

.checker-input-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.checker-input-row label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.checker-input-row input {
  width: 100%;
  height: 2.75rem;
  padding: 0 0.9rem;
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  background-color: var(--bg);
  font-size: var(--text-body);
}

.checker-result {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.checker-summary {
  margin: 0 0 0.85rem;
  font-size: var(--text-sm);
  color: var(--muted);
}

.checker-tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.check-char {
  display: inline-grid;
  place-items: center;
  min-width: 2.6rem;
  height: 2.6rem;
  padding-inline: 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1;
  border: 1px solid var(--rule);
  background-color: var(--bg);
  color: var(--ink);
}

.check-char.is-miss {
  border-style: dashed;
  border-color: var(--accent);
  color: var(--accent);
  background-color: rgba(190, 39, 33, 0.05);
  font-family: var(--font-sans);
}

/* Glyph Browser + Loupe */
.browser-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.browser-hint {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--muted);
}

.browser-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16.5rem;
  gap: 1.5rem;
  align-items: start;
}

.glyph-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(3.5rem, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  background-color: var(--surface-pure);
  max-height: 28rem;
  overflow-y: auto;
}

.glyph-tile {
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background-color: var(--surface-pure);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out);
}

.glyph-tile:hover {
  background-color: var(--surface);
  color: var(--accent);
}

.glyph-tile.is-selected {
  background-color: var(--obsidian);
  color: var(--ink-dark);
}

.glyph-tile-char {
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1;
}

.glyph-loupe {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  background-color: var(--surface-pure);
  border: 1px solid var(--rule);
  border-top: 2px solid var(--accent);
}

.loupe-stage {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--rule);
  background:
    linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(190, 39, 33, 0.14) calc(50% - 0.5px), rgba(190, 39, 33, 0.14) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(0deg, transparent calc(50% - 0.5px), rgba(190, 39, 33, 0.14) calc(50% - 0.5px), rgba(190, 39, 33, 0.14) calc(50% + 0.5px), transparent calc(50% + 0.5px));
}

.loupe-char {
  font-family: var(--font-display);
  font-size: 8.25rem;
  line-height: 1;
  color: var(--ink);
}

.loupe-info {
  padding: 1.1rem 1.25rem 1.25rem;
  display: grid;
  gap: 0.45rem;
}

.loupe-code {
  margin: 0;
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--ink);
}

.loupe-cat {
  margin: 0 0 0.4rem;
  font-size: var(--text-sm);
  color: var(--muted);
}

/* ── 11. Section 6: Open-Source Skill & Release Timeline ── */
.opensource-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.skill-panel > p {
  margin: 0 0 1.4rem;
  color: var(--muted);
  max-width: 58ch;
}

.prompt-block {
  margin-bottom: 1.1rem;
  border: 1px solid var(--rule);
  background-color: var(--surface);
  padding: 1rem 1.2rem;
}

.prompt-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
  font-size: var(--text-sm);
  color: var(--muted);
}

.prompt-text {
  margin: 0;
  font-size: var(--text-body);
  color: var(--ink);
  line-height: 1.6;
  overflow-wrap: anywhere;
  user-select: all;
}

.workflow-list {
  margin: 1.5rem 0 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.55rem;
  color: var(--muted);
}

.changelog-panel {
  padding-top: 0.1rem;
}

.changelog-panel .segmented {
  margin-top: 0.4rem;
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
}

.release-body {
  border-top: 1px solid var(--rule-strong);
  padding-top: 1.25rem;
}

.release-title {
  margin: 0 0 0.9rem;
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--ink);
}

.release-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.7rem;
  color: var(--muted);
}

/* ── 12. Section 7: Download Band & OFL 1.1 ── */
.download-list {
  border-top: 1px solid var(--rule-strong);
}

.download-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: 1.5rem 3rem;
  align-items: start;
  padding-block: clamp(1.75rem, 3.2vw, 2.5rem);
  border-bottom: 1px solid var(--rule);
}

.download-info p {
  margin: 0;
  color: var(--muted);
  max-width: 58ch;
}

.download-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
}

.download-subnote {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--muted);
}

.download-alt-links {
  margin: 0;
  font-size: var(--text-sm);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
}

.license-strip {
  margin-top: clamp(2.25rem, 4vw, 3.25rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem 2.5rem;
}

.license-col p {
  margin: 0;
  color: var(--muted);
}

.install-strip {
  margin-top: clamp(2rem, 3.5vw, 3rem);
  padding-top: clamp(1.75rem, 3vw, 2.5rem);
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 3rem;
}

.install-item p {
  margin: 0;
  color: var(--muted);
}

/* ── 13. Footer ── */
.site-footer {
  background-color: var(--obsidian);
  color: var(--muted-dark);
  padding-block: 2.5rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
}

.footer-wordmark {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-heading);
  line-height: 1.15;
  color: var(--ink-dark);
  margin-bottom: 0.35rem;
}

.footer-brand p {
  margin: 0;
  font-size: var(--text-sm);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--muted-dark);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink-dark);
}

/* ── 14. Responsive Breakpoints (Tablet & 390px Mobile) ── */
@media (max-width: 1180px) {
  .studio-toolbar {
    display: flex;
    flex-wrap: wrap;
  }

  .tool-sliders {
    flex: 1 1 100%;
  }
}

@media (max-width: 1024px) {
  .anatomy-grid,
  .showcase-spread,
  .opensource-split,
  .download-row {
    grid-template-columns: 1fr;
  }

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

  .ledger-item:nth-child(4) {
    padding-left: 0;
    border-left: 0;
  }

  .ledger-item:nth-child(n + 4) {
    border-top: 1px solid var(--rule);
  }
}

@media (max-width: 820px) {
  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .browser-layout {
    grid-template-columns: 1fr;
  }

  .glyph-loupe {
    position: static;
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    align-items: center;
  }

  .loupe-stage {
    border-bottom: 0;
    border-right: 1px solid var(--rule);
  }

  .loupe-char {
    font-size: 4.5rem;
  }

  .license-strip,
  .install-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--header-h) + 2.25rem);
  }

  .hero-guides {
    inset: 0 0.65rem;
  }

  .hero-title {
    font-size: clamp(3.4rem, 17vw, 4.75rem);
  }

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

  .ledger-item:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

  .ledger-item:nth-child(even) {
    padding-left: 1rem;
    border-left: 1px solid var(--rule);
  }

  .ledger-item:nth-child(n + 3) {
    border-top: 1px solid var(--rule);
  }

  .checker-input-row {
    grid-template-columns: 1fr;
  }

  .ladder-row {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .tool-sliders {
    grid-template-columns: 1fr;
  }

  .cinema-stage {
    aspect-ratio: 16 / 10;
  }

  .cinema-caption-layer {
    padding: 2rem 1rem 0.9rem;
  }

  .cinema-subtitle {
    font-size: 1.08rem;
    margin-bottom: 0.3rem;
  }

  .cinema-pinyin {
    font-size: var(--text-sm);
  }

  .segmented {
    max-width: 100%;
    overflow-x: auto;
  }

  .seg-item span {
    padding: 0.4rem 0.65rem;
  }
}

/* ── 15. Reduced Motion Accessibility ── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
