:root {
  --paper: #efe6d6;
  --paper-2: #f6f1e6;
  --ink: #1d1a16;
  --muted: #6d655c;
  --line: #d9cebc;
  --oxide: #8d3828;
  --oxide-deep: #6e2a1d;
  --oxide-soft: #f3e3d8;
  --shadow: 0 18px 50px rgba(60, 40, 20, 0.08);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  color: var(--ink);
  font-family: Outfit, "Avenir Next", sans-serif;
  font-weight: 380;
  background:
    radial-gradient(900px 420px at 0% -10%, #f8f1e4 0%, transparent 55%),
    linear-gradient(180deg, #f3ecdf 0%, var(--paper) 28%, #e7decd 100%);
}

button, input { font: inherit; color: inherit; }

a { color: inherit; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand strong {
  display: block;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.35rem;
  font-weight: 560;
  letter-spacing: -0.03em;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.mark {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 0.7rem;
  background: var(--ink);
  color: #f6f1e6;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.35rem;
}

nav { display: flex; gap: 1.1rem; }

nav a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 0.1rem;
}

nav a:hover { border-bottom-color: var(--oxide); }

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.2rem 1.25rem 3rem;
}

.eyebrow {
  margin: 0 0 0.4rem;
  color: var(--oxide);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 16ch;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 560;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.lede {
  max-width: 42rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.5;
}

.desk {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 0.8fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.intake, .rail, .result {
  background: rgba(246, 241, 230, 0.78);
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  box-shadow: var(--shadow);
}

.intake { padding: 1rem; }

.drop {
  display: grid;
  gap: 0.35rem;
  min-height: 11rem;
  padding: 1.4rem;
  border: 1.5px dashed #c9bba6;
  border-radius: 1.1rem;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.7), rgba(243, 227, 216, 0.35));
  cursor: pointer;
}

.drop.hot { border-color: var(--oxide); background: var(--oxide-soft); }

.drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.drop-kicker {
  color: var(--oxide);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.drop-title {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.drop-note { color: var(--muted); }

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: end;
  margin-top: 0.9rem;
}

.field { display: grid; gap: 0.3rem; font-size: 0.85rem; color: var(--muted); }

.field input {
  width: 6.5rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: white;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.05rem;
  cursor: pointer;
}

.solid { background: var(--ink); color: #f6f1e6; }

.solid:hover { background: var(--oxide-deep); }

.ghost {
  background: transparent;
  border: 1px solid var(--line);
}

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

button:disabled { opacity: 0.55; cursor: progress; }

button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--oxide);
  outline-offset: 2px;
}

.status {
  min-height: 1.4rem;
  margin: 0.85rem 0 0;
  font-weight: 500;
}

.engine {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.rail { padding: 1.2rem 1.2rem 0.4rem; }

.rail h2 {
  margin: 0 0 0.8rem;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.5rem;
  font-weight: 560;
  letter-spacing: -0.03em;
}

.rail ol { list-style: none; margin: 0; padding: 0; }

.rail li {
  display: grid;
  gap: 0.15rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.rail strong { font-weight: 600; }

.rail span { color: var(--muted); line-height: 1.4; }

.result { margin-top: 1.25rem; padding: 1.15rem; }

.result-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

#full-text {
  margin: 0;
  max-width: 40rem;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.exports { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.exports button {
  background: white;
  border: 1px solid var(--line);
  padding: 0.45rem 0.7rem;
}

audio { width: 100%; margin: 1rem 0 0.8rem; }

.timeline {
  display: flex;
  gap: 0.25rem;
  height: 0.7rem;
  margin-bottom: 1rem;
}

.timeline button {
  padding: 0;
  border-radius: 999px;
  background: #e4cfc4;
  min-width: 0.4rem;
}

.timeline button.on { background: var(--oxide); }

.segments { list-style: none; margin: 0; padding: 0; }

.segments li {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 0.8rem;
  padding: 0.9rem 0.2rem;
  border-top: 1px solid var(--line);
  cursor: pointer;
}

.segments li.on { background: linear-gradient(90deg, var(--oxide-soft), transparent 80%); }

.time {
  color: var(--oxide);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.92rem;
}

.phrase { margin: 0; font-size: 1.05rem; line-height: 1.4; }

.words { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.45rem; }

.words span {
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}

footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

@media (max-width: 800px) {
  .desk, .segments li, .result-bar { grid-template-columns: 1fr; display: grid; }
  .top { align-items: flex-start; }
  .segments li { grid-template-columns: 1fr; }
}
