:root {
  color-scheme: light;
  --canvas: #f6f7fb;
  --canvas-strong: #eceef6;
  --surface: #ffffff;
  --surface-soft: #f0f2f8;
  --surface-raised: #ffffff;
  --ink: #202331;
  --ink-soft: #646a7a;
  --line: #dde0ea;
  --line-strong: #c8cddd;
  --indigo: #5d60e8;
  --indigo-strong: #4a4dcc;
  --indigo-soft: #e9e9ff;
  --aqua: #159e98;
  --aqua-soft: #dcf7f4;
  --amber: #d79012;
  --amber-soft: #fff2cf;
  --coral: #d95752;
  --shadow-sm: 0 2px 12px rgba(52, 57, 82, 0.08);
  --shadow-md: 0 16px 44px rgba(52, 57, 82, 0.12);
  --shadow-lg: 0 28px 70px rgba(42, 46, 68, 0.18);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 30px;
  --header-height: 74px;
  --journey-progress: 0;
  font-family:
    "Microsoft JhengHei UI", "Noto Sans TC", "Microsoft JhengHei", system-ui,
    sans-serif;
  background: var(--canvas);
  color: var(--ink);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #11131b;
  --canvas-strong: #0c0e15;
  --surface: #1a1d29;
  --surface-soft: #222634;
  --surface-raised: #1e2230;
  --ink: #f4f2ff;
  --ink-soft: #a9adbd;
  --line: #303545;
  --line-strong: #43495c;
  --indigo: #8b8dff;
  --indigo-strong: #a5a7ff;
  --indigo-soft: #292a52;
  --aqua: #55d6cf;
  --aqua-soft: #173f40;
  --amber: #ffc75a;
  --amber-soft: #45391d;
  --coral: #ff8580;
  --shadow-sm: 0 2px 14px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 18px 48px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.42);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --canvas: #11131b;
    --canvas-strong: #0c0e15;
    --surface: #1a1d29;
    --surface-soft: #222634;
    --surface-raised: #1e2230;
    --ink: #f4f2ff;
    --ink-soft: #a9adbd;
    --line: #303545;
    --line-strong: #43495c;
    --indigo: #8b8dff;
    --indigo-strong: #a5a7ff;
    --indigo-soft: #292a52;
    --aqua: #55d6cf;
    --aqua-soft: #173f40;
    --amber: #ffc75a;
    --amber-soft: #45391d;
    --coral: #ff8580;
    --shadow-sm: 0 2px 14px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 18px 48px rgba(0, 0, 0, 0.28);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.42);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 28px);
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 80% 8%, color-mix(in srgb, var(--indigo) 10%, transparent), transparent 28rem),
    radial-gradient(circle at 18% 46%, color-mix(in srgb, var(--aqua) 8%, transparent), transparent 30rem),
    var(--canvas);
  color: var(--ink);
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

button,
a,
summary {
  touch-action: manipulation;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

code {
  padding: 0.1em 0.38em;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--indigo-strong);
  font-family: Consolas, monospace;
  font-size: 0.9em;
}

.skip-link {
  position: fixed;
  z-index: 100;
  left: 16px;
  top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--canvas);
  transform: translateY(-160%);
  transition: transform 180ms ease-out;
}

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

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px clamp(18px, 3vw, 48px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: blur(18px) saturate(130%);
}

.brand {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
}

.brand span {
  display: grid;
  line-height: 1.18;
}

.brand strong {
  font-family: "Segoe UI Variable Display", "Segoe UI", sans-serif;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.brand small {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.theme-switcher {
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.theme-switcher button {
  min-width: 58px;
  min-height: 44px;
  padding: 7px 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 700;
  transition:
    background 180ms ease-out,
    color 180ms ease-out,
    box-shadow 180ms ease-out;
}

.theme-switcher button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--indigo-strong);
  box-shadow: var(--shadow-sm);
}

.page-shell {
  display: grid;
  width: min(1500px, 100%);
  margin: 0 auto;
  grid-template-columns: 236px minmax(0, 1fr);
}

.chapter-rail {
  position: sticky;
  top: var(--header-height);
  align-self: start;
  height: calc(100vh - var(--header-height));
  padding: 48px 28px 28px 34px;
  border-right: 1px solid var(--line);
}

.chapter-rail > p {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.chapter-rail nav {
  display: grid;
  gap: 4px;
}

.chapter-rail nav a {
  position: relative;
  display: grid;
  min-height: 54px;
  align-content: center;
  padding: 7px 12px 7px 18px;
  border-radius: 12px;
  color: var(--ink-soft);
  text-decoration: none;
  transition:
    background 180ms ease-out,
    color 180ms ease-out;
}

.chapter-rail nav a::before {
  position: absolute;
  left: 7px;
  top: 50%;
  width: 4px;
  height: 0;
  border-radius: 999px;
  background: var(--indigo);
  content: "";
  transform: translateY(-50%);
  transition: height 180ms ease-out;
}

.chapter-rail nav a:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.chapter-rail nav a[aria-current="true"] {
  background: var(--indigo-soft);
  color: var(--indigo-strong);
}

.chapter-rail nav a[aria-current="true"]::before {
  height: 26px;
}

.chapter-rail nav span {
  font-size: 0.88rem;
  font-weight: 800;
}

.chapter-rail nav small {
  font-size: 0.7rem;
}

.rail-status {
  position: absolute;
  right: 28px;
  bottom: 26px;
  left: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-family: Bahnschrift, Consolas, monospace;
  font-size: 0.7rem;
}

.rail-status span {
  position: relative;
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.rail-status span::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--aqua), var(--indigo), var(--amber));
  content: "";
  transform: scaleX(var(--journey-progress));
  transform-origin: left;
}

main {
  min-width: 0;
}

.hero,
.story-section,
.closing {
  width: min(1120px, calc(100% - clamp(36px, 8vw, 112px)));
  margin-inline: auto;
}

.hero {
  position: relative;
  display: grid;
  min-height: calc(100vh - var(--header-height));
  align-items: center;
  gap: clamp(36px, 5vw, 72px);
  padding: clamp(72px, 9vw, 120px) 0 112px;
  grid-template-columns: minmax(320px, 0.8fr) minmax(420px, 1.2fr);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--indigo-strong);
  font-family: Bahnschrift, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

h1,
h2,
h3 {
  margin-top: 0;
  font-family: "Segoe UI Variable Display", "Segoe UI", sans-serif;
  letter-spacing: -0.035em;
  line-height: 1.14;
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(2.85rem, 5.4vw, 5rem);
  font-weight: 750;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3.65rem);
  font-weight: 730;
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.hero-lede {
  max-width: 36rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.85;
}

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

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  transition:
    background 180ms ease-out,
    border-color 180ms ease-out,
    color 180ms ease-out,
    box-shadow 180ms ease-out;
}

.button-primary {
  background: var(--indigo);
  color: #ffffff;
  box-shadow: 0 9px 28px color-mix(in srgb, var(--indigo) 30%, transparent);
}

.button-primary:hover {
  background: var(--indigo-strong);
}

.button-secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: var(--indigo);
  color: var(--indigo-strong);
}

.quick-facts {
  display: flex;
  gap: 28px;
  margin: 42px 0 0;
  padding: 0;
  list-style: none;
}

.quick-facts li {
  display: grid;
}

.quick-facts strong {
  color: var(--indigo-strong);
  font-family: Bahnschrift, Consolas, monospace;
  font-size: 1.45rem;
  line-height: 1;
}

.quick-facts span {
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.hero-visual {
  position: relative;
  min-width: 0;
  padding-bottom: 80px;
}

.hero-visual::before {
  position: absolute;
  top: 4%;
  right: 0;
  width: 76%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 38%, color-mix(in srgb, var(--amber) 36%, transparent), transparent 30%),
    radial-gradient(circle at 60% 58%, color-mix(in srgb, var(--indigo) 28%, transparent), transparent 55%);
  content: "";
  filter: blur(34px);
  opacity: 0.65;
}

.app-window {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line-strong) 85%, transparent);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  box-shadow: var(--shadow-md);
}

.app-window > figcaption {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px 10px 56px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.app-window > figcaption::before {
  position: absolute;
  top: 20px;
  left: 17px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
  content: "";
  box-shadow: 12px 0 var(--amber), 24px 0 var(--aqua);
}

.app-window > figcaption span {
  color: var(--ink);
  font-weight: 800;
}

.app-window > figcaption small {
  overflow: hidden;
  max-width: 60%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-window > p {
  min-height: 84px;
  margin: 0;
  padding: 17px 19px 20px;
  color: var(--ink-soft);
  font-size: 0.87rem;
}

.app-window-hero {
  position: relative;
  z-index: 1;
  margin: 0;
  transform: rotate(1.6deg);
}

.app-window-hero .shot-button {
  max-height: 470px;
}

.app-window-hero img {
  min-height: 330px;
  object-fit: cover;
  object-position: left top;
}

.hero-duck {
  position: absolute;
  z-index: 3;
  right: -1%;
  bottom: 0;
  width: clamp(160px, 24vw, 260px);
  height: auto;
  filter: drop-shadow(0 22px 22px rgba(16, 19, 31, 0.28));
}

.shot-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  text-align: left;
}

.shot-button img {
  display: block;
  width: 100%;
  height: auto;
  background: #0d1420;
  transition:
    filter 220ms ease-out,
    transform 220ms ease-out;
}

.shot-button:hover img {
  filter: brightness(1.04);
  transform: scale(1.008);
}

.zoom-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(13, 18, 30, 0.78);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 180ms ease-out,
    transform 180ms ease-out;
}

.shot-button:hover .zoom-hint,
.shot-button:focus-visible .zoom-hint {
  opacity: 1;
  transform: translateY(0);
}

.workday-track {
  position: absolute;
  right: 0;
  bottom: 46px;
  left: 0;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 12px;
  color: var(--ink-soft);
  font-family: Bahnschrift, Consolas, monospace;
  font-size: 0.72rem;
}

.track-line {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
}

.track-line i {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--aqua), var(--indigo), var(--amber));
  transform: scaleX(var(--journey-progress));
  transform-origin: left;
}

.track-duck {
  position: absolute;
  z-index: 2;
  left: clamp(34px, calc(6% + var(--journey-progress) * 84%), calc(100% - 72px));
  bottom: -2px;
  width: 28px;
  height: 28px;
  border: 2px solid var(--ink);
  border-radius: 55% 55% 48% 48%;
  background: var(--amber);
  box-shadow: 0 7px 16px color-mix(in srgb, var(--amber) 34%, transparent);
  transform: translateX(-50%);
}

.track-duck::before {
  position: absolute;
  top: 8px;
  right: -8px;
  width: 12px;
  height: 7px;
  border: 2px solid var(--ink);
  border-left: 0;
  border-radius: 0 9px 9px 0;
  background: #ef8c33;
  content: "";
}

.track-duck::after {
  position: absolute;
  top: 7px;
  right: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #161824;
  content: "";
}

.story-section {
  padding: clamp(92px, 10vw, 144px) 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 790px;
  margin-bottom: 48px;
}

.section-heading > p:last-child {
  max-width: 690px;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.5vw, 1.14rem);
}

.feature-layout-split {
  display: grid;
  align-items: start;
  gap: clamp(32px, 6vw, 82px);
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
}

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

.feature-list li {
  display: grid;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.feature-list strong {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 0.94rem;
}

.feature-list span {
  color: var(--ink-soft);
  font-size: 0.86rem;
}

details {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

summary {
  min-height: 48px;
  padding: 12px 46px 12px 18px;
  cursor: pointer;
  color: var(--indigo-strong);
  font-size: 0.88rem;
  font-weight: 800;
}

.rule-table {
  display: grid;
  padding: 0 18px 16px;
}

.rule-table > div {
  display: grid;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  grid-template-columns: 1fr 1.35fr;
}

.rule-table span {
  color: var(--ink-soft);
}

.moment-card {
  position: sticky;
  top: calc(var(--header-height) + 34px);
  display: grid;
  min-height: 360px;
  align-content: center;
  justify-items: center;
  padding: 42px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--amber) 38%, var(--line));
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--amber) 26%, transparent), transparent 48%),
    var(--surface);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.moment-label {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.moment-card > strong {
  margin: 14px 0 4px;
  color: var(--ink);
  font-family: Bahnschrift, Consolas, monospace;
  font-size: clamp(4.6rem, 9vw, 7.2rem);
  font-weight: 600;
  letter-spacing: -0.08em;
  line-height: 0.95;
}

.moment-card > small {
  color: var(--amber);
  font-weight: 800;
}

.moment-line {
  width: 80%;
  height: 6px;
  margin: 28px 0 18px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.moment-line i {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--aqua), var(--amber));
}

.moment-card p {
  max-width: 25rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.hud-showcase {
  display: grid;
  align-items: center;
  gap: clamp(28px, 4vw, 50px);
  grid-template-columns: minmax(230px, 0.64fr) minmax(270px, 0.76fr);
}

.app-window-tall {
  width: min(100%, 390px);
  margin: 0 auto;
}

.app-window-tall .shot-button {
  max-height: 580px;
  background:
    radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--indigo) 12%, transparent), transparent 48%),
    #080b12;
}

.app-window-tall img {
  object-fit: contain;
}

.hud-points {
  display: grid;
  gap: 10px;
}

.hud-points article {
  display: grid;
  padding: 16px 18px;
  border-left: 3px solid var(--indigo);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface);
}

.hud-points strong {
  font-size: 0.92rem;
}

.hud-points span {
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.app-window-wide {
  grid-column: 1 / -1;
  margin: 10px 0 0;
}

.feature-gallery {
  display: grid;
  gap: 20px;
}

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

.feature-gallery .shot-button,
.record-grid .shot-button,
.theme-comparison .shot-button {
  aspect-ratio: 1.45;
}

.feature-gallery .shot-button img,
.record-grid .shot-button img,
.theme-comparison .shot-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
}

.editor-feature {
  display: grid;
  align-items: center;
  gap: clamp(32px, 5vw, 70px);
  margin-top: 68px;
  padding: clamp(26px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  grid-template-columns: minmax(250px, 0.72fr) minmax(420px, 1.28fr);
}

.editor-feature p:not(.eyebrow) {
  margin: 0;
  color: var(--ink-soft);
}

.editor-feature figure {
  margin: 0;
}

.duck-section {
  position: relative;
}

.duck-grid {
  display: grid;
  align-items: stretch;
  gap: 20px;
  grid-template-columns: minmax(250px, 0.9fr) minmax(280px, 1.1fr) minmax(190px, 0.55fr);
}

.duck-card,
.reaction-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.duck-card {
  display: grid;
  overflow: hidden;
}

.duck-card .shot-button {
  align-self: center;
  background:
    radial-gradient(circle at 50% 48%, color-mix(in srgb, var(--amber) 18%, transparent), transparent 54%),
    var(--surface-soft);
}

.duck-card img {
  object-fit: contain;
}

.duck-card figcaption {
  display: grid;
  padding: 18px 20px 22px;
  border-top: 1px solid var(--line);
}

.duck-card figcaption span {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.reaction-card {
  padding: 28px;
}

.reaction-card > p {
  margin: 0 0 14px;
  color: var(--indigo-strong);
  font-family: Bahnschrift, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.reaction-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reaction-list span {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--indigo-soft);
  color: var(--indigo-strong);
  font-size: 0.75rem;
  font-weight: 800;
}

.reaction-card ul,
.studio-levels ul,
.record-story ul,
.safety-details ul {
  display: grid;
  gap: 9px;
  margin: 22px 0 0;
  padding-left: 1.25rem;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.app-window-menu {
  width: 100%;
  margin: 0;
}

.app-window-menu .shot-button {
  display: grid;
  min-height: 280px;
  place-items: center;
  background: #0a0c13;
}

.app-window-menu img {
  width: 190px;
  height: 208px;
  object-fit: contain;
}

.route-strip {
  display: grid;
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.route-strip span {
  display: grid;
  padding: 17px;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.route-strip span + span {
  border-left: 1px solid var(--line);
}

.route-strip strong {
  color: var(--ink);
  font-size: 0.82rem;
}

.app-window-studio {
  margin: 0;
}

.studio-levels {
  display: grid;
  gap: 22px;
  margin-top: 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.studio-levels article {
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.studio-levels article > span {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--aqua-soft);
  color: var(--aqua);
  font-size: 0.74rem;
  font-weight: 900;
}

.studio-levels h3 {
  margin-top: 18px;
}

.format-note,
.privacy-note {
  margin: 22px 0 0;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--amber-soft);
  color: color-mix(in srgb, var(--ink) 78%, var(--amber));
  font-size: 0.84rem;
}

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

.record-story {
  min-width: 0;
}

.record-story figure {
  margin: 0;
}

.record-story ul {
  margin: 22px 8px 0;
}

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

.theme-comparison figure {
  margin: 0;
}

.utility-grid {
  display: grid;
  gap: 12px;
  margin-top: 30px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.utility-grid article {
  display: grid;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.utility-grid strong {
  font-size: 0.9rem;
}

.utility-grid span {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 0.79rem;
}

.safety-section {
  padding-bottom: 92px;
}

.safety-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.safety-grid article {
  display: grid;
  align-content: start;
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.safety-grid article > span {
  margin-bottom: 34px;
  color: var(--aqua);
  font-family: Bahnschrift, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.safety-grid strong {
  line-height: 1.45;
}

.safety-grid p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.safety-details {
  margin-top: 18px;
}

.safety-details ul {
  margin: 0;
  padding: 0 36px 24px 48px;
}

.closing {
  display: grid;
  align-items: center;
  gap: clamp(28px, 5vw, 70px);
  margin-bottom: 72px;
  padding: clamp(28px, 5vw, 58px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 22% 38%, color-mix(in srgb, var(--amber) 28%, transparent), transparent 24rem),
    linear-gradient(135deg, var(--surface), var(--surface-soft));
  box-shadow: var(--shadow-md);
  grid-template-columns: minmax(220px, 0.7fr) minmax(300px, 1.3fr);
}

.closing img {
  width: min(100%, 290px);
  justify-self: center;
  filter: drop-shadow(0 18px 22px rgba(16, 19, 31, 0.22));
}

.closing p:not(.eyebrow) {
  max-width: 36rem;
  margin: 0 0 26px;
  color: var(--ink-soft);
}

.lightbox {
  width: min(1500px, calc(100vw - 32px));
  height: min(94vh, 1100px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--canvas-strong);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}

.lightbox::backdrop {
  background: rgba(5, 7, 12, 0.82);
  backdrop-filter: blur(8px);
}

.lightbox-shell {
  display: grid;
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr);
}

.lightbox-toolbar {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px 10px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.lightbox-toolbar p {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
}

.lightbox-toolbar button {
  min-width: 54px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 800;
}

.lightbox-stage {
  display: grid;
  min-height: 0;
  place-items: center;
  overflow: auto;
  padding: clamp(14px, 3vw, 34px);
}

.lightbox-stage img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  object-fit: contain;
}

.noscript-note {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 80;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--amber-soft);
  color: var(--ink);
  text-align: center;
}

:where(a, button, summary):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--indigo) 74%, white);
  outline-offset: 3px;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 440ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 440ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-height: 760px) and (min-width: 901px) {
  .chapter-rail {
    padding-top: 24px;
    padding-bottom: 20px;
  }

  .chapter-rail nav a {
    min-height: 48px;
  }

  .rail-status {
    display: none;
  }
}

@media (max-width: 1180px) {
  .page-shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .chapter-rail {
    padding-right: 20px;
    padding-left: 22px;
  }

  .hero {
    grid-template-columns: minmax(300px, 0.85fr) minmax(360px, 1.15fr);
  }

  .feature-gallery-three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-gallery-three .app-window:last-child {
    grid-column: 1 / -1;
    width: calc(50% - 10px);
  }

  .editor-feature {
    grid-template-columns: 1fr;
  }

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

  .app-window-menu {
    grid-column: 1 / -1;
    width: min(100%, 360px);
  }

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

@media (max-width: 900px) {
  :root {
    --header-height: 68px;
  }

  .site-header {
    padding-inline: 16px;
  }

  .brand small {
    display: none;
  }

  .theme-switcher button {
    min-width: 52px;
    padding-inline: 10px;
  }

  .page-shell {
    display: block;
  }

  .chapter-rail {
    position: sticky;
    z-index: 40;
    top: var(--header-height);
    width: 100%;
    height: auto;
    padding: 8px 12px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--canvas) 92%, transparent);
    backdrop-filter: blur(16px);
    scrollbar-width: none;
  }

  .chapter-rail::-webkit-scrollbar {
    display: none;
  }

  .chapter-rail > p,
  .rail-status,
  .chapter-rail nav small {
    display: none;
  }

  .chapter-rail nav {
    display: flex;
    width: max-content;
    gap: 6px;
  }

  .chapter-rail nav a {
    display: flex;
    min-height: 44px;
    align-items: center;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
  }

  .chapter-rail nav a::before {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 76px;
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 700px;
  }

  .hero-visual {
    width: min(100%, 720px);
    justify-self: center;
  }

  .workday-track {
    bottom: 38px;
  }

  .feature-layout-split,
  .hud-showcase,
  .editor-feature {
    grid-template-columns: 1fr;
  }

  .moment-card {
    position: relative;
    top: auto;
  }

  .app-window-tall {
    width: min(100%, 420px);
  }

  .editor-feature {
    padding: 26px;
  }

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

@media (max-width: 680px) {
  .site-header {
    gap: 10px;
  }

  .brand strong {
    font-size: 0.82rem;
  }

  .brand img {
    width: 30px;
    height: 30px;
  }

  .theme-switcher button {
    min-width: 44px;
    min-height: 44px;
    padding: 6px 8px;
    font-size: 0.75rem;
  }

  .hero,
  .story-section,
  .closing {
    width: min(100% - 32px, 1120px);
  }

  .hero {
    gap: 28px;
    padding-top: 58px;
  }

  h1 {
    font-size: clamp(2.55rem, 13vw, 4rem);
  }

  h2 {
    font-size: clamp(1.9rem, 9vw, 3rem);
  }

  .quick-facts {
    gap: 20px;
  }

  .hero-visual {
    padding-bottom: 56px;
  }

  .app-window-hero {
    transform: none;
  }

  .app-window-hero img {
    min-height: 250px;
  }

  .hero-duck {
    width: 150px;
  }

  .workday-track {
    bottom: 12px;
    gap: 7px;
  }

  .story-section {
    padding-block: 82px;
  }

  .section-heading {
    margin-bottom: 34px;
  }

  .feature-gallery-three,
  .duck-grid,
  .studio-levels,
  .record-grid,
  .theme-comparison,
  .utility-grid,
  .safety-grid,
  .closing {
    grid-template-columns: 1fr;
  }

  .feature-gallery-three .app-window:last-child {
    grid-column: auto;
    width: auto;
  }

  .app-window-menu {
    grid-column: auto;
  }

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

  .route-strip span + span {
    border-left: 0;
  }

  .route-strip span:nth-child(even) {
    border-left: 1px solid var(--line);
  }

  .route-strip span:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .safety-grid article {
    min-height: auto;
  }

  .safety-grid article > span {
    margin-bottom: 20px;
  }

  .closing {
    text-align: center;
  }

  .closing img {
    width: 220px;
  }

  .zoom-hint {
    display: none;
  }

  .app-window > figcaption {
    padding-left: 50px;
  }
}

@media (max-width: 420px) {
  .site-header {
    align-items: center;
  }

  .brand span {
    display: none;
  }

  .brand {
    min-width: 48px;
    justify-content: center;
  }

  .theme-switcher {
    margin-left: auto;
  }

  .quick-facts {
    justify-content: space-between;
  }

  .quick-facts span {
    font-size: 0.68rem;
  }

  .hero-actions {
    display: grid;
  }

  .hero-actions .button {
    width: 100%;
  }

  .route-strip {
    grid-template-columns: 1fr;
  }

  .route-strip span:nth-child(even) {
    border-left: 0;
  }

  .route-strip span + span {
    border-top: 1px solid var(--line);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
