/* NamiVision project page — Studio RIZI
   Dark measurement-console surface, four band accents, one amber action. */

:root {
  --canvas: #080b10;
  --surface: #0d131b;
  --surface-2: #121a24;
  --surface-3: #18222e;
  --ink: #eef3f9;
  --muted: #9aa8ba;
  --muted-2: #748396;
  --rule: rgba(255, 255, 255, 0.1);
  --rule-strong: rgba(255, 255, 255, 0.18);
  --action: #ffc857;
  --action-ink: #171006;
  --cyan: #4fc3f7;
  --green: #7bd88f;
  --amber: #ffc857;
  --red: #ff7a8a;
  --blue: #7aa2ff;
  --max: 1200px;
  --font-display: "Space Grotesk", "Noto Sans JP", "Noto Sans SC", sans-serif;
  --font-body: "Inter", "Noto Sans JP", "Noto Sans SC", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --radius: 12px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(1100px 620px at 78% -12%, rgba(79, 195, 247, 0.11), transparent 62%),
    radial-gradient(900px 520px at -8% 18%, rgba(255, 200, 87, 0.06), transparent 58%),
    var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

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

::selection {
  background: var(--action);
  color: var(--action-ink);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--action);
  color: var(--action-ink);
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.shell {
  width: min(var(--max), calc(100% - 64px));
  margin-inline: auto;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--rule);
  background: rgba(8, 11, 16, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-right: auto;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 500;
}

.nav-links > a {
  color: var(--muted);
  text-decoration: none;
  transition: color 160ms ease;
}

.nav-links > a:hover {
  color: var(--ink);
}

.nav-github {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.nav-github span {
  color: var(--muted-2);
}

/* Language menu */

.lang {
  position: relative;
}

.lang summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  list-style: none;
  transition: border-color 160ms ease, color 160ms ease;
}

.lang summary::-webkit-details-marker {
  display: none;
}

.lang summary::after {
  content: "";
  width: 5px;
  height: 5px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.lang summary:hover,
.lang[open] summary {
  border-color: var(--action);
  color: var(--ink);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  min-width: 148px;
  padding: 6px;
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  background: var(--surface-2);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}

.lang-menu a {
  display: block;
  padding: 9px 11px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.lang-menu a:hover,
.lang-menu a[aria-current="page"] {
  background: var(--surface-3);
  color: var(--ink);
}

.lang-menu a[aria-current="page"] {
  color: var(--action);
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button-primary {
  background: var(--action);
  color: var(--action-ink);
  border-color: var(--action);
}

.button-primary:hover {
  background: #ffd67c;
  border-color: #ffd67c;
}

.button-secondary {
  border-color: var(--rule-strong);
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.05);
}

.button-ghost {
  min-height: 38px;
  padding: 0 14px;
  border-color: var(--rule);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}

.button-ghost:hover {
  border-color: var(--rule-strong);
  color: var(--ink);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 82px 0 74px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 82%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 82%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}

.eyebrow,
.kicker {
  margin: 0 0 18px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.5;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 12ch;
  text-wrap: balance;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.85rem, 5.1vw, 4.9rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.hero h1 .accent {
  color: var(--action);
}

.hero-lede {
  max-width: 48ch;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.2vw, 1.08rem);
  line-height: 1.75;
}

.hero-lede strong {
  color: var(--ink);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.hero-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 20px 0 0;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.hero-note span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-note span + span::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted-2);
}

/* App window frame */

.app-frame {
  position: relative;
  margin: 0;
  border: 1px solid var(--rule-strong);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.app-frame::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(79, 195, 247, 0.32), transparent 34%, transparent 68%, rgba(255, 200, 87, 0.22));
  opacity: 0.6;
}

.app-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.app-dots {
  display: flex;
  gap: 5px;
  margin-right: 4px;
}

.app-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--surface-3);
}

.app-bar .file {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-bar .tempo {
  margin-left: auto;
  padding: 4px 8px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  color: var(--action);
  white-space: nowrap;
}

.app-frame img {
  width: 100%;
  height: auto;
  border-radius: 0 0 14px 14px;
}

.app-caption {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 14px 2px 0;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.app-caption b {
  color: var(--muted);
  font-weight: 500;
}

/* Floating measurement chips */

.measure-chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--rule-strong);
  border-radius: 7px;
  background: rgba(10, 15, 22, 0.9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.03em;
  backdrop-filter: blur(8px);
}

.measure-chip b {
  font-size: 13px;
  font-weight: 600;
}

.measure-chip.low {
  left: 14%;
  bottom: 27%;
  color: var(--cyan);
}

.measure-chip.high {
  right: 5%;
  bottom: 7%;
  color: var(--red);
}



/* ---------- Section rhythm ---------- */

.section {
  padding: 88px 0;
  border-top: 1px solid var(--rule);
}

.section-head {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 44px;
}

.section-index {
  padding-top: 6px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.section-head h2 {
  max-width: 24ch;
  text-wrap: balance;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.2vw, 2.75rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.16;
}

.section-head p {
  max-width: 58ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

/* ---------- Lane map ---------- */

.lanes-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.lanes-copy p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.75;
}

.lanes-copy p strong {
  color: var(--ink);
  font-weight: 600;
}

.lanes-copy ul {
  display: grid;
  gap: 12px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.lanes-copy li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.lanes-copy li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dot, var(--cyan));
}

.lane-stack {
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.lane-stack-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lane {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  min-height: 64px;
  border-bottom: 1px solid var(--rule);
}

.lane:last-child {
  border-bottom: 0;
}

.lane-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 10px 12px;
  border-right: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.015);
}

.lane-label b {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.lane-label span {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
}

.lane-wave {
  position: relative;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 25% 100%;
}

.lane-wave svg {
  width: 100%;
  height: 44px;
  overflow: visible;
}

.lane-wave path {
  fill: none;
  stroke: var(--wave, var(--cyan));
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}

.lane-wave .fill {
  fill: var(--wave, var(--cyan));
  stroke: none;
  opacity: 0.16;
}

.lane.master .lane-label b {
  color: var(--ink);
}

/* ---------- Workflow ---------- */

.workflow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule-strong);
}

.step {
  padding: 26px 26px 8px 0;
  border-right: 1px solid var(--rule);
}

.step:last-child {
  border-right: 0;
  padding-right: 0;
}

.step + .step {
  padding-left: 26px;
}

.step-number {
  display: block;
  margin-bottom: 34px;
  color: var(--action);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.step h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.step-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.chip.action {
  border-color: rgba(255, 200, 87, 0.36);
  color: var(--action);
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid var(--rule-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
}

/* ---------- CSV evidence ---------- */

.csv-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.csv-copy p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.75;
}

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

.csv-legend li {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  font-size: 13px;
  color: var(--muted);
}

.csv-legend b {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

.csv-legend .late b {
  color: var(--action);
}

.csv-legend .early b {
  color: var(--cyan);
}

.csv-legend .missing b {
  color: var(--muted-2);
}

.code-card {
  min-width: 0;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: #070b11;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 15px;
  border-bottom: 1px solid var(--rule);
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.code-head .dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.code-head .dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.code-card pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  color: #c9d6e6;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.9;
  tab-size: 2;
}

.code-card .header {
  color: var(--muted-2);
}

.code-card .pos {
  color: var(--action);
}

.code-card .neg {
  color: var(--cyan);
}

.code-card .dim {
  color: var(--muted-2);
}

.code-note {
  margin: 12px 2px 0;
  color: var(--muted-2);
  font-size: 12px;
}

/* ---------- Player / settings ---------- */

.player-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.player-shot {
  margin: 0;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.player-shot img {
  width: 100%;
  height: auto;
}

.player-copy p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.75;
}

.feature-list {
  margin: 0;
  border-top: 1px solid var(--rule-strong);
}

.feature-list div {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}

.feature-list dt {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feature-list dd {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

/* ---------- Download ---------- */

.download {
  position: relative;
  overflow: hidden;
  padding: 88px 0;
  border-top: 1px solid var(--rule);
}

.download::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(700px 360px at 12% 100%, rgba(255, 200, 87, 0.09), transparent 70%),
    radial-gradient(600px 320px at 92% 0%, rgba(79, 195, 247, 0.08), transparent 70%);
}

.download-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: end;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--rule-strong);
  border-left: 3px solid var(--action);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(18, 26, 36, 0.96), rgba(10, 15, 22, 0.96));
  box-shadow: var(--shadow);
}

.download-panel h2 {
  max-width: 20ch;
  text-wrap: balance;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.download-panel p {
  max-width: 58ch;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.download-panel p strong {
  color: var(--ink);
  font-weight: 600;
}

.download-actions {
  display: grid;
  gap: 10px;
  justify-items: stretch;
  min-width: 240px;
}

.download-file {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  text-align: center;
}

.requirements {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.requirements span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.limitation {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.7;
}

.limitation b {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 44px 0 36px;
  border-top: 1px solid var(--rule);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: start;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.footer-brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: -0.01em;
}

.footer-brand span {
  display: block;
  color: var(--muted-2);
  font-size: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-content: flex-end;
  font-size: 12px;
}

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

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

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.03em;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 46px;
  }

  .hero h1 {
    max-width: 16ch;
  }

  .hero-lede {
    max-width: 62ch;
  }

  .lanes-grid,
  .csv-grid,
  .player-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .csv-grid > * {
    min-width: 0;
  }

  .player-shot {
    order: 2;
  }

  .download-panel {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .download-actions {
    justify-self: start;
    width: min(100%, 340px);
  }
}

@media (max-width: 860px) {
  .nav {
    gap: 14px;
  }

  .nav-links {
    gap: 14px;
  }

  .nav-links > a:not(.nav-github):not(.nav-download) {
    display: none;
  }

  .section-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .section-index {
    padding-top: 0;
  }

  .workflow {
    grid-template-columns: minmax(0, 1fr);
    border-top: 0;
  }

  .step,
  .step + .step {
    padding: 24px 0;
    border-top: 1px solid var(--rule-strong);
    border-right: 0;
  }

  .step-number {
    margin-bottom: 16px;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(var(--max), calc(100% - 40px));
  }

  .site-header .nav {
    min-height: 64px;
  }

  .brand {
    font-size: 17px;
  }

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

  .nav-github {
    display: none;
  }

  .nav-download {
    min-width: 44px;
    width: 44px;
    padding: 0;
  }

  .nav-download .label {
    display: none;
  }

  .hero {
    padding: 52px 0 56px;
  }

  .hero h1 {
    font-size: clamp(2.45rem, 12vw, 3.3rem);
  }

  .hero-actions .button {
    flex: 1 1 100%;
  }

  .app-bar .tempo {
    display: none;
  }

  .measure-chip {
    position: static;
    margin: 8px 8px 0 0;
  }

  .app-frame {
    display: flex;
    flex-wrap: wrap;
    padding-bottom: 8px;
  }

  .app-frame .app-bar,
  .app-frame picture {
    flex: 1 1 100%;
  }

  

  .section,
  .download {
    padding: 60px 0;
  }

  .lane {
    grid-template-columns: 78px minmax(0, 1fr);
    min-height: 58px;
  }

  .lane-label {
    padding: 8px;
  }

  .lane-wave {
    padding: 6px 8px;
  }

  .lane-wave svg {
    height: 38px;
  }

  .feature-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .code-card pre {
    font-size: 10.5px;
    padding: 14px;
  }

  .download-panel {
    padding: 24px 20px;
  }

  .download-actions {
    width: 100%;
    min-width: 0;
  }

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

  .footer-links {
    justify-content: flex-start;
  }

  .footer-bottom {
    display: grid;
    gap: 6px;
  }
}

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

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