:root {
  color-scheme: dark;
  --canvas: #0e1825;
  --panel: #152436;
  --text: #f2f6fa;
  --muted: #b1bfd0;
  --line: #304257;
  --accent: #ff8055;
  --accent-text: #26160f;
  --edge: clamp(1rem, 4vw, 4rem);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--canvas);
  color: var(--text);
  scroll-padding-top: 1.5rem;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
h1, h2, p, dl, dd { margin: 0; }
p, li { line-height: 1.65; }
a { color: inherit; text-underline-offset: 0.22em; }
a:focus-visible, summary:focus-visible {
  outline: 2px solid #ffd0bd;
  outline-offset: 5px;
}

.shell {
  width: min(100% - var(--edge) * 2, 76rem);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 2;
  top: 0.625rem;
  left: 0.625rem;
  padding: 0.7rem 1rem;
  color: var(--accent-text);
  background: var(--accent);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}
.header-inner { min-height: 4.4rem; }
.brand, .header-inner nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
}
.brand {
  gap: 0.55rem;
  font-weight: 780;
  letter-spacing: -0.025em;
  white-space: nowrap;
}
.brand-mark {
  display: inline-block;
  width: 1.55rem;
  height: 1.35rem;
  background: var(--accent);
  clip-path: polygon(0 88%, 44% 13%, 58% 35%, 82% 1%, 100% 34%, 100% 88%, 75% 46%, 59% 70%, 44% 48%, 20% 88%);
}
.header-inner nav { display: flex; gap: clamp(0.8rem, 2.8vw, 2.4rem); }
.header-inner nav a {
  position: relative;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
  white-space: nowrap;
}
.header-inner nav a:hover, .header-inner nav [aria-current] { color: var(--text); }
.header-inner nav [aria-current]::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  content: "";
}

.hero {
  padding-block: clamp(1.3rem, 4vw, 3.5rem) clamp(2rem, 5vw, 4.5rem);
}
.hero-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: clamp(28rem, 51vw, 43rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: #18283a;
}
.hero-image, .hero-veil {
  position: absolute;
  z-index: -1;
  width: 100%;
  height: 100%;
  inset: 0;
}
.hero-image { object-fit: cover; object-position: 60% 55%; }
.hero-veil {
  background:
    linear-gradient(90deg, #08131f 0%, #0a1521ed 15%, #0a1521a6 41%, transparent 71%),
    linear-gradient(0deg, #08131fbf, transparent 50%);
}
.hero-content { padding: clamp(1.3rem, 5vw, 4.5rem); }
.edition {
  margin-bottom: 0.9rem;
  color: #ffb49b;
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
h1 {
  font-size: clamp(3rem, 8.5vw, 6.5rem);
  font-weight: 870;
  line-height: 0.91;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.hero h1 { max-width: 11ch; text-wrap: initial; }
.hero h1 span { display: block; color: #bdcce1; }
.hero-description {
  max-width: 34ch;
  margin-top: 1.3rem;
  color: #d0dbe7;
  font-size: clamp(1rem, 1.65vw, 1.18rem);
}
.action {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.1rem;
  min-height: 3rem;
  margin-top: 1.45rem;
  padding: 0.68rem 1rem;
  border-radius: 0.45rem;
  color: var(--accent-text);
  background: var(--accent);
  font-weight: 780;
  text-decoration: none;
  transition: background 180ms ease, transform 180ms ease;
}
.action:hover { background: #ffa184; transform: translateY(-2px); }
.action:active { transform: translateY(1px); }
.action span { font-size: 1.12em; }
.hero-note { margin-top: 0.55rem; color: #c4cfdd; font-size: 0.875rem; }

h2 { font-size: clamp(1.55rem, 3.1vw, 2.45rem); letter-spacing: -0.045em; line-height: 1.1; }
.quick-start {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: center;
  padding-block: 2rem clamp(3rem, 8vw, 7rem);
  border-top: 1px solid var(--line);
}
.summary p { margin-top: 0.7rem; color: var(--muted); }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  color: #ffb49b;
  font-weight: 675;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 180ms ease;
}
.text-link:hover { text-decoration-color: currentColor; }
.quick-keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--panel);
  text-align: center;
}
.quick-keys div { padding: 1.25rem 0.4rem; }
.quick-keys div + div { border-left: 1px solid var(--line); }
.quick-keys dt { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.28rem; }
.quick-keys dt span, .control-list dd span { color: var(--muted); font-size: 0.8rem; }
.quick-keys dd { margin-top: 0.7rem; font-size: 0.875rem; }
kbd {
  display: inline-grid;
  min-width: 2rem;
  min-height: 2rem;
  place-items: center;
  padding: 0.15rem 0.35rem;
  border: 1px solid #52677e;
  border-bottom-width: 3px;
  border-radius: 0.35rem;
  background: #21354b;
  color: var(--text);
  font: 700 0.94rem/1 system-ui, sans-serif;
}

.guide-hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  min-height: min(46rem, calc(100svh - 4.4rem));
  gap: clamp(1.5rem, 6vw, 6rem);
  padding-block: clamp(2.5rem, 8vw, 6rem);
}
.guide-hero h1 { font-size: clamp(2.7rem, 6vw, 5.5rem); line-height: 0.98; text-wrap: initial; }
.guide-hero .hero-description { max-width: 42ch; }
.back-link { display: flex; width: fit-content; margin-top: 0.35rem; }
.control-panel {
  padding: clamp(1.25rem, 4vw, 2.4rem);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 0.75rem;
  background: var(--panel);
}
.control-panel h2 { font-size: clamp(1.45rem, 2.5vw, 2rem); }
.control-list { margin-top: 1rem; }
.control-list div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--line);
}
.control-list dd { display: flex; align-items: center; gap: 0.4rem; }
.control-list kbd { width: 2.65rem; height: 2.65rem; font-size: 1.12rem; }
.control-source { margin-top: 0.55rem; font-size: 0.85rem; }
.guide-body {
  display: grid;
  grid-template-columns: 2fr 1fr;
  align-items: start;
  gap: clamp(2rem, 9vw, 8rem);
  padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 7vw, 7rem);
  border-top: 1px solid var(--line);
}
.steps { padding-left: 1.35rem; margin: 1rem 0 2.6rem; }
.steps li { padding-left: 0.25rem; margin-block: 0.65rem; color: var(--muted); }
.steps li::marker { color: #ffb49b; font-weight: 750; }
.steps strong { color: var(--text); }
.questions { margin-top: 1rem; }
.questions details { border-bottom: 1px solid var(--line); }
.questions details:first-child { border-top: 1px solid var(--line); }
.questions summary { padding: 0.9rem 0; cursor: pointer; font-weight: 650; }
.questions summary::marker { color: var(--accent); }
.questions p { color: var(--muted); padding: 0 0 1rem 1rem; }
.guide-index { border-left: 1px solid var(--line); padding-left: 1rem; }
.guide-index h2 { font-size: 1rem; margin-bottom: 0.35rem; letter-spacing: 0; }
.guide-index a { display: flex; align-items: center; min-height: 2.75rem; color: var(--muted); }
.guide-index a:hover { color: var(--text); }

.site-footer { border-top: 1px solid var(--line); }
.footer-inner { padding-block: 0.8rem; }
.footer-inner p { color: var(--muted); font-size: 0.875rem; }
.footer-inner a { font-size: 0.875rem; white-space: nowrap; }

@media (max-width: 700px) {
  .header-inner { min-height: 3.75rem; }
  .hero-panel { min-height: 33rem; }
  .hero-image { object-position: 73% 50%; }
  .hero-veil { background: linear-gradient(0deg, #08131f 1%, #08131fef 20%, #08131f88 54%, transparent 80%); }
  .quick-start, .guide-hero, .guide-body { grid-template-columns: 1fr; }
  .guide-hero { min-height: 0; }
  .guide-index { grid-row: 1; }
  .footer-inner { flex-wrap: wrap; gap: 0; }
}

@media (max-width: 350px) {
  .header-inner { gap: 0.55rem; }
  .header-inner nav { gap: 0.55rem; }
  .header-inner nav a { font-size: 0.8rem; }
  .brand-mark { width: 1.2rem; }
}

@media (prefers-reduced-motion: no-preference) {
  [data-enter] { animation: arrive 430ms ease-out both; }
  @keyframes arrive {
    from { transform: translateY(9px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}
