/* ChordWise – site styles. Visual language borrowed from the app: a red stage-piano
   panel with lowercase labels and lamp buttons, white keys that light up yellow. */

/* Sharp/flat signs (♭ ♮ ♯ 𝄪 𝄫) from Noto Music; every other character falls through to Archivo. */
@font-face {
  font-family: "Accidentals";
  src: url("/assets/fonts/noto-music-accidentals.woff2") format("woff2");
  unicode-range: U+266D-266F, U+1D12A-1D12B;
  font-display: swap;
}

:root {
  --nord: #b01030;
  --nord-deep: #8a0c26;
  --nord-ink: #5c0718;
  --lamp-off: #3d3d3d;
  --lamp-on: #ff3048;
  --lamp-glow: rgba(255, 48, 72, .55);
  --key-lit: #ffc107;
  --key-lit-deep: #e0a800;
  --ink: #1b1b1b;
  --ink-soft: #4a4446;
  --paper: #f7f3f4;
  --paper-2: #efe8ea;
  --line: #ddd2d5;
  --white: #ffffff;
  --btn-top: #4a4a4a;
  --btn-bottom: #2e2e2e;

  --font: "Accidentals", "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wide: 112;      /* font-stretch for display type */
  --measure: 62ch;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-variation-settings: "wdth" 100;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--nord); text-underline-offset: .18em; }
a:hover { color: var(--nord-deep); }
:focus-visible { outline: 3px solid var(--key-lit); outline-offset: 2px; border-radius: 4px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 {
  font-stretch: 112%;
  font-variation-settings: "wdth" var(--wide);
  line-height: 1.08;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.9rem); font-weight: 800; max-width: 17ch; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 780; max-width: 22ch; }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); font-weight: 720; }
p { margin: 0 0 1em; max-width: var(--measure); }

/* Panel labels: lowercase, like the printing on the instrument. */
.label {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .02em;
  font-variation-settings: "wdth" 88;
  text-transform: lowercase;
}

/* ---------- lamp button (shared by header nav and demo controls) ---------- */
.lamp {
  display: inline-flex; flex-direction: column; align-items: center; gap: 5px;
  color: #fff; text-decoration: none; background: none; border: 0; padding: 0;
  font: inherit; cursor: pointer;
}
.lamp .cap {
  width: 44px; height: 18px; border-radius: 3px;
  background: linear-gradient(var(--btn-top), var(--btn-bottom));
  border: 1px solid #1a1a1a; box-shadow: inset 0 1px 0 #6e6e6e;
  display: grid; place-items: center;
}
.lamp .cap::after {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--lamp-off); box-shadow: inset 0 1px 1px rgba(0,0,0,.6);
}
.lamp[aria-pressed="true"] .cap::after, .lamp.is-on .cap::after {
  background: var(--lamp-on); box-shadow: 0 0 8px 2px var(--lamp-glow);
}
.lamp:hover .cap { background: linear-gradient(#555, #333); }
.lamp:active .cap { background: #252525; }
.lamp:hover, .lamp:focus-visible { color: #fff; }

/* ---------- header panel ---------- */
.panel {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(var(--nord), var(--nord-deep));
  border-bottom: 1px solid var(--nord-ink);
  color: #fff;
}
.panel .wrap { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 28px); min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; margin-right: auto; }
.brand:hover, .brand:focus-visible { color: #fff; }
.brand:hover span { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand span { font-weight: 800; font-size: 1.2rem; font-variation-settings: "wdth" 118; letter-spacing: -.01em; }
.panel nav { display: flex; gap: clamp(10px, 1.6vw, 22px); }
.lang-pick { position: relative; display: inline-flex; }
.lang-pick select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  font: 600 .85rem/1 var(--font); color: #fff; background: transparent;
  border: 1px solid rgba(255,255,255,.5); border-radius: 4px; padding: 9px 30px 9px 11px;
}
.lang-pick::after {
  content: ""; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; margin-top: -5px;
  border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); pointer-events: none;
}
.lang-pick select:hover { background: rgba(255,255,255,.12); }
.lang-pick select option { color: var(--ink); background: #fff; }
.panel .get {
  font-weight: 700; font-size: .9rem; color: var(--nord-deep); background: #fff;
  padding: 9px 14px; border-radius: 4px; text-decoration: none; white-space: nowrap;
}
.panel .get:hover { background: var(--key-lit); color: var(--ink); }
@media (max-width: 860px) { .panel nav { display: none; } }
@media (max-width: 480px) { .panel .get { display: none; } }

/* ---------- hero ---------- */
.hero { padding: clamp(36px, 7vw, 84px) 0 0; }
.hero-text { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px clamp(24px, 5vw, 64px); align-items: end; }
.hero-text p { color: var(--ink-soft); font-size: 1.12rem; }
@media (max-width: 860px) { .hero-text { grid-template-columns: 1fr; } }

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin: 4px 0 8px; }
.store {
  display: inline-flex; align-items: center; gap: 10px; min-width: 186px;
  padding: 9px 16px 9px 12px; border-radius: 8px; background: var(--ink); color: #fff;
  text-decoration: none; line-height: 1.1;
}
.store:hover { background: #000; color: #fff; }
.store svg { width: 26px; height: 26px; flex: none; }
.store small { display: block; font-size: .72rem; opacity: .85; }
.store b { font-size: 1.1rem; font-weight: 700; font-variation-settings: "wdth" 108; }
.store-note { font-size: .88rem; color: var(--ink-soft); margin: 0; }

/* ---------- instrument (live demo) ---------- */
.instrument {
  margin-top: clamp(28px, 5vw, 56px);
  background: linear-gradient(var(--nord), var(--nord-deep));
  border-radius: 14px 14px 6px 6px;
  padding: 12px clamp(10px, 2vw, 22px) clamp(14px, 2vw, 22px);
  box-shadow: 0 30px 60px -30px rgba(92, 7, 24, .55), inset 0 1px 0 rgba(255,255,255,.18);
  color: #fff;
}
.instrument-bar { display: flex; align-items: flex-end; gap: 18px; padding: 4px 6px 12px; flex-wrap: wrap; }
.instrument-bar .title { margin-right: auto; font-weight: 700; font-variation-settings: "wdth" 110; font-size: .95rem; opacity: .95; }
.screen {
  background: var(--white); color: var(--ink);
  border-radius: 6px 6px 0 0; padding: clamp(14px, 2.4vw, 26px) clamp(16px, 3vw, 32px) 10px;
  min-height: 150px; display: grid; grid-template-columns: 1fr auto; gap: 6px 20px; align-items: end;
  border: 1px solid var(--nord-ink); border-bottom: 0;
}
.readout {
  font-size: clamp(2.6rem, 9vw, 5.6rem); font-weight: 800; line-height: .95;
  font-variation-settings: "wdth" 125; letter-spacing: -.02em; margin: 0;
  min-height: 1em; overflow-wrap: anywhere;
}
.readout.idle { color: #b8adb0; font-weight: 700; }
.readout-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: .95rem; color: var(--ink-soft); min-height: 1.6em; }
.readout-meta b { color: var(--ink); font-weight: 650; }
.screen .alts { font-size: 1.15rem; font-weight: 650; color: var(--ink-soft); text-align: right; align-self: start; padding-top: 6px; }

.keys {
  position: relative; display: flex; height: clamp(150px, 24vw, 230px);
  background: #1a1a1a; border: 1px solid var(--nord-ink); border-top: 3px solid #2a2a2a;
  border-radius: 0 0 6px 6px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
}
.key {
  position: relative; flex: 1 1 0; border: 0; margin: 0; padding: 0 0 10px; cursor: pointer;
  background: linear-gradient(#fff 80%, #ece8e9); border-right: 1px solid #c9c2c4;
  border-radius: 0 0 5px 5px; display: flex; align-items: flex-end; justify-content: center;
  font: 600 .72rem var(--font); color: #8c8386;
}
.key.black {
  position: absolute; top: 0; height: 62%; z-index: 2; padding-bottom: 8px;
  background: linear-gradient(#3a3a3a, #111 88%); border: 1px solid #000; color: #9a9a9a;
  border-radius: 0 0 4px 4px; box-shadow: inset 0 -4px 0 #222;
}
.key.on { background: linear-gradient(var(--key-lit) 80%, var(--key-lit-deep)); color: var(--ink); }
.key.black.on { background: linear-gradient(#ffd24d, var(--key-lit-deep)); color: var(--ink); box-shadow: none; }
.key.root::before {
  content: ""; position: absolute; left: 50%; bottom: 30px; width: 10px; height: 10px; margin-left: -5px;
  border-radius: 50%; background: var(--nord);
}
.key.black.root::before { bottom: 26px; }
.demo-help { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; padding: 12px 6px 0; font-size: .86rem; opacity: .95; }
.demo-help p { margin: 0; }
.demo-status:empty { display: none; }
@media (max-width: 600px) { .demo-help .kbd-hint { display: none; } }

/* ---------- sections ---------- */
section { padding: clamp(64px, 10vw, 120px) 0 0; }
.section-lead { color: var(--ink-soft); font-size: 1.1rem; }

.inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 28px; border-top: 2px solid var(--ink); }
.inputs > div { padding: 22px 24px 8px 0; }
.inputs > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.inputs h3 { display: flex; align-items: center; gap: 10px; }
.inputs h3::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--lamp-on); box-shadow: 0 0 8px 2px var(--lamp-glow); flex: none; }
.inputs p { color: var(--ink-soft); margin: 0; }
@media (max-width: 760px) {
  .inputs { grid-template-columns: 1fr; }
  .inputs > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

.feature { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 5vw, 64px); align-items: center; margin-top: clamp(48px, 7vw, 88px); }
.feature:nth-of-type(even) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.feature:nth-of-type(even) .shot { order: 2; }
.feature .label { color: var(--nord); margin-bottom: 8px; }
.feature p { color: var(--ink-soft); }
.shot { border-radius: 10px; overflow: hidden; border: 6px solid var(--ink); background: var(--ink); box-shadow: 0 24px 48px -28px rgba(27,27,27,.45); }
@media (max-width: 760px) {
  .feature, .feature:nth-of-type(even) { grid-template-columns: 1fr; }
  .feature:nth-of-type(even) .shot { order: 0; }
}

.maestro { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin-top: 28px; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; background: var(--white); }
.maestro > div { padding: clamp(20px, 3vw, 34px); }
.maestro > div + div { background: linear-gradient(var(--nord), var(--nord-deep)); color: #fff; }
.maestro h3 { margin-bottom: .6em; }
.maestro ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.maestro li { position: relative; padding-left: 26px; }
.maestro li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 9px; height: 9px; border-radius: 50%; background: var(--lamp-off); }
.maestro > div + div li::before { background: #fff; box-shadow: 0 0 8px 2px rgba(255,255,255,.5); }
.fine { font-size: .9rem; color: var(--ink-soft); margin-top: 14px; }
@media (max-width: 760px) { .maestro { grid-template-columns: 1fr; } }

.faq { margin-top: 24px; border-top: 2px solid var(--ink); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative;
  font-weight: 680; font-size: 1.12rem; font-variation-settings: "wdth" 104;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; margin-top: -5px;
  border-radius: 50%; background: var(--lamp-off); transition: background .15s, box-shadow .15s;
}
.faq details[open] summary::after { background: var(--lamp-on); box-shadow: 0 0 8px 2px var(--lamp-glow); }
.faq details p { color: var(--ink-soft); padding-bottom: 18px; margin: 0; }

.final { margin-top: clamp(64px, 10vw, 120px); padding: clamp(40px, 7vw, 80px) 0; background: var(--ink) url("/assets/img/studio-1200.webp") center / cover; color: #fff; position: relative; }
.final::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(27,27,27,.92), rgba(27,27,27,.55)); }
.final .wrap { position: relative; }
.final p { color: #e9e2e4; }
.final .store { background: #fff; color: var(--ink); }
.final .store:hover { background: var(--key-lit); }

footer { background: var(--ink); color: #cfc7c9; font-size: .92rem; padding: 36px 0 30px; }
footer .wrap { display: grid; gap: 22px; }
footer a { color: #fff; }
footer a:hover { color: var(--key-lit); }
.foot-main { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; padding-bottom: 22px; border-bottom: 1px solid #3a3436; }
footer .brand { margin: 0; }
footer .brand img { width: 28px; height: 28px; border-radius: 7px; box-shadow: none; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.foot-links a { text-decoration: none; font-weight: 600; }
footer .langs { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer .langs a { color: #bfb6b9; text-decoration: none; }
footer .langs a:hover { color: #fff; }
footer .langs a[aria-current] { color: #fff; font-weight: 650; }
footer .copy { margin: 0; color: #9d9497; font-size: .85rem; }

.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 5vw, 64px) clamp(24px, 4vw, 48px); margin-top: clamp(64px, 8vw, 104px); padding-top: clamp(40px, 5vw, 56px); border-top: 2px solid var(--ink); }
.feature-grid .shot { margin-bottom: 18px; aspect-ratio: 800 / 369; }
.feature-grid .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.feature-grid .label { color: var(--nord); margin-bottom: 6px; }
.feature-grid p { color: var(--ink-soft); margin: 0; }
@media (max-width: 760px) { .feature-grid { grid-template-columns: 1fr; } }

@media (max-width: 600px) {
  .instrument-bar { gap: 12px; }
  .instrument-bar .title { flex-basis: 100%; }
  .lamp .cap { width: 38px; }
}

/* Keep Japanese/Korean words together when headings wrap. */
:lang(ja) :is(h1, h2, h3), :lang(ko) :is(h1, h2, h3) { word-break: auto-phrase; }
:lang(ko) { word-break: keep-all; }

.stores { align-items: center; }
.badge { display: inline-block; line-height: 0; border-radius: 9px; }
.badge img { height: 52px; width: auto; }
.store { height: 52px; }
.final .badge img { filter: drop-shadow(0 0 1px rgba(255,255,255,.6)); }

/* The icon is red too: give it a light edge so it stands out on the red panel. */
.brand img { box-shadow: 0 0 0 2px rgba(255,255,255,.85); }


/* ---------- live demo extras ---------- */
.readout-meta .lib-link { color: var(--nord); font-weight: 650; }
.play-chord {
  font: 700 .9rem var(--font); color: var(--nord-deep); background: #fff; border: 0; border-radius: 4px;
  padding: 9px 14px; cursor: pointer; align-self: center;
}
.play-chord:hover { background: var(--key-lit); color: var(--ink); }

/* ---------- chord library ---------- */
.chord-page { padding-top: clamp(24px, 4vw, 44px); }
.crumbs { font-size: .9rem; color: var(--ink-soft); margin-bottom: 18px; }
.crumbs a { color: var(--ink-soft); }
.chord-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 48px; align-items: end; }
.chord-head h1 { max-width: none; margin-bottom: .2em; }
.chord-name { font-size: 1.25rem; color: var(--ink-soft); margin: 0; }
.facts { margin: 0; display: grid; gap: 0; border-top: 2px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 9em 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 650; font-variation-settings: "wdth" 104; }
@media (max-width: 760px) { .chord-head { grid-template-columns: 1fr; } .facts div { grid-template-columns: 7em 1fr; } }
.under-demo { color: var(--ink-soft); margin-top: 12px; }
.chord-sec { padding-top: clamp(40px, 6vw, 64px); }
.chord-sec h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.invs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; margin-top: 18px; }
.invs figure { margin: 0; }
.invs figcaption { margin-top: 8px; color: var(--ink-soft); }
.invs figcaption b { color: var(--ink); margin-right: 8px; }
.kbd { width: 100%; height: auto; display: block; background: #1a1a1a; border-radius: 6px; padding: 3px; }
.kbd .k-w { fill: #fff; stroke: #c9c2c4; stroke-width: 1; }
.kbd .k-b { fill: #1f1f1f; }
.kbd .k-on { fill: var(--key-lit); stroke: var(--key-lit-deep); stroke-width: 1; }
.kbd .k-root { fill: var(--nord); }
.related { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 760px) { .related { grid-template-columns: 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chips a {
  display: inline-block; padding: 7px 11px; border-radius: 4px; text-decoration: none;
  background: var(--white); border: 1px solid var(--line); color: var(--ink);
  font-weight: 650; font-variation-settings: "wdth" 104; min-width: 3em; text-align: center;
}
.chips a:hover { border-color: var(--nord); color: var(--nord); }
.lib { margin-top: clamp(40px, 6vw, 64px); border-top: 2px solid var(--ink); }
.lib-row { display: grid; grid-template-columns: 5.5em 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: start; }
.lib-row h2 { font-size: 1.5rem; margin: 6px 0 0; }
@media (max-width: 600px) { .lib-row { grid-template-columns: 1fr; gap: 4px; } }
.chord-page .final { margin-top: clamp(56px, 8vw, 96px); }

/* ---------- long-form text (privacy) ---------- */
.prose .wrap { max-width: 760px; padding-bottom: 80px; }
.prose h3 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose .lead { color: var(--ink-soft); }

/* ---------- usage numbers ---------- */
.stats { padding-top: clamp(48px, 7vw, 80px); }
.stats-title { font-size: 1rem; font-weight: 650; font-variation-settings: "wdth" 100; letter-spacing: 0; color: var(--ink-soft); margin-bottom: 14px; max-width: none; }
.stats-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.stats-row p { margin: 0; padding: 18px 20px 6px 0; display: flex; flex-direction: column; gap: 2px; }
.stats-row p + p { padding-left: 20px; border-left: 1px solid var(--line); }
.stats-row b { font-size: clamp(1.6rem, 2.9vw, 2.3rem); white-space: nowrap; font-weight: 800; font-variation-settings: "wdth" 125; line-height: 1; color: var(--nord); }
.stats-row span { color: var(--ink-soft); }
@media (max-width: 760px) {
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-row p:nth-child(odd) { padding-left: 0; border-left: 0; }
}

.proof { font-size: .95rem; font-weight: 600; color: var(--ink); margin: 2px 0 6px; }
.proof::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--lamp-on); box-shadow: 0 0 6px 1px var(--lamp-glow); vertical-align: 1px; }
.final .proof { color: #fff; }

/* ---------- user manual ---------- */
.manual h1 { max-width: 20ch; }
.man-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(28px, 4vw, 44px) clamp(20px, 3vw, 32px); margin-top: clamp(32px, 5vw, 52px); padding-top: clamp(28px, 4vw, 40px); border-top: 2px solid var(--ink); }
.man-card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); min-width: 0; }
.man-card .man-shot { margin: 0 0 14px; }
.man-card .shot { border-width: 4px; aspect-ratio: 1200 / 584; }
.man-card .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.man-card-blank { aspect-ratio: 1200 / 584; border-radius: 10px; margin-bottom: 14px; background: linear-gradient(var(--nord) 0 17%, var(--white) 17%); border: 4px solid var(--ink); }
.man-card h2 { font-size: 1.3rem; margin: 0 0 6px; }
.man-card p { color: var(--ink-soft); margin: 0; font-size: .98rem; }
.man-card:hover h2 { color: var(--nord); }

.man-grid { display: grid; grid-template-columns: 240px minmax(0, 760px); gap: clamp(32px, 5vw, 64px); align-items: start; }
.man-toc { position: sticky; top: 96px; font-size: .95rem; border-top: 2px solid var(--ink); padding-top: 12px; }
.man-toc .man-home { display: block; font-weight: 700; color: var(--ink); text-decoration: none; margin-bottom: 6px; }
.man-toc ol { list-style: none; margin: 0; padding: 0; }
.man-toc li a { display: flex; align-items: center; gap: 10px; padding: 5px 0; color: var(--ink-soft); text-decoration: none; }
.man-toc li a::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--lamp-off); }
.man-toc li a:hover { color: var(--ink); }
.man-toc li a[aria-current="page"] { color: var(--ink); font-weight: 650; }
.man-toc li a[aria-current="page"]::before { background: var(--lamp-on); box-shadow: 0 0 6px 1px var(--lamp-glow); }
@media (max-width: 980px) {
  .man-grid { grid-template-columns: minmax(0, 1fr); }
  .man-toc { position: static; order: 2; }
}

.man-body > h1 { margin-top: 0; }
.man-sec { padding-top: clamp(36px, 5vw, 56px); }
.man-sec h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
.man-sec p { max-width: var(--measure); }
.man-shot { margin: 18px 0 20px; }
.man-shot .shot { border-width: 5px; }
.man-shot.wide .shot { border-width: 3px; border-radius: 6px; }
.man-items { margin: 14px 0 0; border-top: 2px solid var(--ink); }
.man-items div { display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.man-items dt { font-weight: 700; font-variation-settings: "wdth" 104; }
.man-items dd { margin: 0; color: var(--ink-soft); }
@media (max-width: 600px) { .man-items div { grid-template-columns: 1fr; gap: 2px; } }
.man-tip { display: flex; gap: 12px; align-items: baseline; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin-top: 18px; }
.man-tip::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--key-lit); box-shadow: 0 0 6px 1px rgba(255, 193, 7, .7); transform: translateY(-1px); }
.man-table-wrap { overflow-x: auto; margin-top: 16px; }
.man-table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: .97rem; }
.man-table th, .man-table td { text-align: left; vertical-align: top; padding: 11px 14px 11px 0; border-bottom: 1px solid var(--line); }
.man-table thead th { border-bottom: 2px solid var(--ink); font-variation-settings: "wdth" 104; }
.man-table tbody th { font-weight: 650; width: 30%; }
.man-table td { color: var(--ink-soft); }
.man-table td:last-child { color: var(--ink); }
.man-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: clamp(48px, 7vw, 72px); padding-top: 16px; border-top: 2px solid var(--ink); }
.man-pager a { display: flex; flex-direction: column; gap: 2px; text-decoration: none; font-weight: 700; font-variation-settings: "wdth" 104; color: var(--ink); }
.man-pager a span { font-weight: 400; font-size: .88rem; color: var(--ink-soft); }
.man-pager .next { text-align: right; align-items: flex-end; }
.man-pager a:hover { color: var(--nord); }
.man-link { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; margin-top: clamp(32px, 5vw, 48px); padding-top: 18px; border-top: 1px solid var(--line); }
.man-link a { font-weight: 700; font-variation-settings: "wdth" 108; font-size: 1.1rem; }
.man-link span { color: var(--ink-soft); }
.man-search { position: relative; max-width: 560px; margin: 22px 0 6px; }
.man-search input { width: 100%; font: inherit; font-size: 1.05rem; padding: 12px 14px 12px 42px; border: 2px solid var(--ink); border-radius: 8px; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%231b1b1b' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m15.5 15.5 5 5'/%3E%3C/svg%3E") no-repeat 14px 50%; color: var(--ink); }
.man-search input:focus { outline: none; border-color: var(--nord); box-shadow: 0 0 0 3px rgba(176, 16, 48, .15); }
.man-hits { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); list-style: none; margin: 0; padding: 6px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 18px 40px -18px rgba(27, 27, 27, .45); max-height: min(70vh, 520px); overflow: auto; }
.man-hits a { display: grid; gap: 2px; padding: 10px 12px; border-radius: 6px; text-decoration: none; color: var(--ink); }
.man-hits a:hover, .man-hits a.on { background: var(--paper-2); }
.man-hits b { font-weight: 700; }
.man-hit-ch { font-size: .82rem; color: var(--nord); }
.man-hit-x { font-size: .9rem; color: var(--ink-soft); }
.man-none { padding: 12px; color: var(--ink-soft); }
.man-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 24px; margin-bottom: 18px; }
.man-top .crumbs { margin: 0; }
.man-top .man-search { margin: 0; flex: 0 1 380px; }
.man-top .man-search input { padding-block: 9px; font-size: 1rem; }
@media (max-width: 600px) { .man-top .man-search { flex-basis: 100%; } }
.man-card-plans { aspect-ratio: 1200 / 584; border-radius: 10px; margin-bottom: 14px; border: 4px solid var(--ink); background: linear-gradient(var(--nord), var(--nord-deep)); display: flex; align-items: center; justify-content: center; gap: clamp(28px, 6vw, 56px); }
.man-card-plans .lamp { pointer-events: none; transform: scale(1.35); }
