:root {
  --bg: #e3e4e8;
  --surface: #f4f5f7;
  --ink: #171a22;
  --muted: #4a5160;
  --line: #c5c8d0;
  --accent: #1e3a6e;
  --accent-ink: #f4f6fb;
  --font: "Geologica", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --rail: 248px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.5;
  padding-bottom: 84px;
}
[hidden] { display: none !important; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img, video, audio { max-width: 100%; display: block; }
button, select { font: inherit; color: inherit; }
.shell {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  align-items: start;
}
.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 20px 20px;
  border-right: 1px solid var(--line);
  background: var(--bg);
}
.lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.lockup img { width: 36px; height: 36px; flex: none; }
.rail-word {
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.05em;
  line-height: 0.95;
}
.rail-lines {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 15px;
}
.rail-lines li {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.dens { margin: 0; }
.dens-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 88px;
}
.dens-bars span {
  display: block;
  width: 22px;
  height: var(--h);
  background: var(--ink);
}
.dens-bars span:last-child { background: var(--accent); }
.dens figcaption {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.rail-nav {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
}
.rail-nav a { text-decoration: none; }
.rail-nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.stage {
  width: min(880px, 100%);
  padding: 32px 40px 28px;
}
.kicker {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
h1 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(40px, 5vw, 60px);
  line-height: 0.96;
  letter-spacing: -0.045em;
}
.lead { margin: 16px 0 0; max-width: 38ch; color: var(--muted); font-size: 18px; }
.bench { margin-top: 28px; }
.modes, .levels { display: flex; flex-wrap: wrap; gap: 0; }
.modes { border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.modes button, .levels button, .go, .cookie button { font: inherit; cursor: pointer; }
.modes button {
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  min-height: 44px;
  padding: 8px 14px;
  margin-bottom: -1px;
}
.modes button[aria-pressed="true"] { border-bottom-color: var(--accent); font-weight: 700; }
.levels { gap: 8px; }
.levels button {
  flex: 1 1 140px;
  border: 1px solid var(--line);
  background: var(--surface);
  min-height: 44px;
  padding: 8px 12px;
}
.levels button[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}
.drop {
  position: relative;
  display: grid;
  gap: 4px;
  align-content: end;
  min-height: 168px;
  padding: 18px 16px;
  background-color: var(--surface);
  background-image: repeating-linear-gradient(to bottom, transparent 0 27px, var(--line) 27px 28px);
  border: 1px solid var(--ink);
  cursor: pointer;
}
.drop input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.drop .kicker, .drop strong, #drop-meta {
  width: fit-content;
  background: var(--surface);
  padding-right: 8px;
}
.drop strong { font-size: 26px; letter-spacing: -0.04em; font-weight: 700; }
.drop span, .status { color: var(--muted); }
.status { margin: 12px 0 0; font-size: 15px; }
.file-name { font-family: var(--mono); font-size: 13px; color: var(--ink); }
.source, #result video, #result audio { width: 100%; margin-top: 12px; background: #171a22; }
.controls { margin-top: 14px; display: grid; gap: 12px; }
.trim { display: grid; gap: 10px; }
.trim label {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}
.trim input[type="range"] { width: 100%; accent-color: var(--accent); }
.time { font-family: var(--mono); font-size: 13px; }
.turn { display: grid; gap: 6px; font-size: 14px; }
.turn select {
  min-height: 44px;
  border: 1px solid var(--ink);
  background: var(--surface);
  padding: 0 10px;
}
.meter { height: 4px; margin-top: 12px; background: var(--line); overflow: hidden; }
.meter span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}
.go {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  margin-top: 14px;
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
}
.go:hover { background: #152a52; }
.go:disabled { opacity: 0.55; }
.sizes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.sizes div { background: var(--surface); border: 1px solid var(--line); padding: 10px 12px; }
.sizes span { display: block; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.sizes strong { font-size: 28px; letter-spacing: -0.04em; }
.after { padding-top: 48px; }
.after h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.04em;
  line-height: 1;
  font-weight: 700;
}
.after dl { margin: 8px 0 0; }
.after div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.after dt { font-weight: 700; }
.after dd, .note { margin: 0; color: var(--muted); }
.note { margin-top: 16px; font-size: 14px; max-width: 62ch; }
.foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding: 18px 0 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 14px; }
.foot a { color: var(--ink); }
.foot { align-items: flex-start; }
.req { margin: 8px 0 0; max-width: 42ch; font-size: 13px; line-height: 1.45; }
.req a { color: inherit; }
.cookie {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--surface);
  font-size: 14px;
}
.cookie p { margin: 0; }
.cookie a { color: var(--surface); }
.cookie button {
  border: 0;
  background: var(--surface);
  color: var(--ink);
  min-height: 40px;
  min-width: 64px;
  font-weight: 700;
}
.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.top-inner {
  width: min(760px, calc(100% - 32px));
  margin-inline: auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.brand-text { display: flex; flex-direction: column; gap: 3px; line-height: 1; }
.brand-word { font-weight: 700; font-size: 20px; letter-spacing: -0.04em; }
.brand-sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav { display: flex; gap: 18px; }
.nav a { text-decoration: none; }
.legal { width: min(68ch, calc(100% - 32px)); margin-inline: auto; padding: 28px 0 80px; }
.legal h1 { font-size: clamp(36px, 6vw, 52px); margin: 8px 0 12px; }
.legal p { color: var(--muted); }
.legal a.back { color: var(--ink); font-weight: 700; }
@media (min-width: 861px) {
  .rail { padding-bottom: 96px; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .rail {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 16px;
  }
  .lockup { grid-column: 1; grid-row: 1; align-self: center; }
  .dens { grid-column: 2; grid-row: 1; align-self: center; }
  .rail-lines { grid-column: 1 / -1; }
  .rail-nav { grid-column: 1 / -1; flex-direction: row; gap: 16px; margin-top: 0; }
  .stage { padding: 22px 16px 8px; }
  .after div, .trim label { grid-template-columns: 1fr; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
