:root {
  --paper: #f4efe5;
  --paper-deep: #e8e1d5;
  --ink: #14211d;
  --muted: #68716c;
  --green: #183d32;
  --acid: #e6ff57;
  --coral: #ee6b55;
  --line: rgba(20, 33, 29, 0.17);
  --mono: "DM Mono", monospace;
  --sans: "Manrope", sans-serif;
  --serif: "Newsreader", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { color: inherit; font: inherit; }
.section-shell { width: min(1180px, calc(100% - 64px)); margin: 0 auto; }

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.wordmark { display: inline-flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: -.03em; }
.wordmark-mark { height: 20px; display: flex; align-items: center; gap: 2px; }
.wordmark-mark i { display: block; width: 2px; height: 6px; background: currentColor; border-radius: 2px; }
.wordmark-mark i:nth-child(2) { height: 14px; }
.wordmark-mark i:nth-child(3) { height: 20px; }
.wordmark-mark i:nth-child(4) { height: 11px; }
.wordmark-mark i:nth-child(5) { height: 5px; }
.topbar-links { display: flex; gap: 25px; font: 500 9px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.topbar-links a { transition: opacity .2s; }
.topbar-links a:hover { opacity: .5; }

.paper-summary { display: grid; grid-template-columns: 1.08fr .92fr; gap: 9%; padding: 58px 0 50px; }
.eyebrow, .section-index { color: var(--muted); font: 500 9px var(--mono); letter-spacing: .13em; text-transform: uppercase; }
.paper-title h1 { margin: 15px 0 0; font: 400 clamp(58px, 7vw, 86px)/.95 var(--serif); letter-spacing: -.045em; }
.paper-subtitle { max-width: 580px; margin: 17px 0 0; color: var(--green); font: 400 clamp(21px, 2.3vw, 30px)/1.25 var(--serif); }
.paper-description { align-self: end; }
.paper-description > p { max-width: 540px; margin: 0; color: #4f5b55; font-size: 13px; line-height: 1.8; }
.paper-actions { display: flex; gap: 13px; margin-top: 25px; }
.paper-actions a { display: inline-flex; align-items: center; gap: 12px; padding: 10px 14px; font: 500 9px var(--mono); text-transform: uppercase; transition: transform .2s; }
.paper-actions a:hover { transform: translateY(-2px); }
.primary-link { color: #fff; background: var(--green); }
.secondary-link { border: 1px solid var(--line); }
.innovations { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.innovations article { min-height: 130px; display: grid; grid-template-columns: 30px 1fr; gap: 13px; padding: 23px 25px 22px 0; border-right: 1px solid var(--line); }
.innovations article + article { padding-left: 25px; }
.innovations article:last-child { border-right: 0; }
.innovations article > span { color: var(--coral); font: 400 8px var(--mono); }
.innovations h2 { margin: 0 0 8px; font-size: 12px; line-height: 1.3; }
.innovations p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }

.demos { margin-top: 72px; padding: 78px 0 100px; background: var(--paper-deep); }
.demo-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; }
.demo-heading h2 { margin: 13px 0 0; font: 400 clamp(42px, 5vw, 62px)/1 var(--serif); letter-spacing: -.04em; }
.demo-heading > p { max-width: 415px; margin: 0 0 3px; color: var(--muted); font-size: 11px; }
.demo-toolbar { display: flex; align-items: center; justify-content: space-between; margin-top: 42px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.demo-count { display: flex; align-items: center; gap: 11px; }
.demo-count strong { color: var(--coral); font: 400 25px/1 var(--serif); }
.demo-count span { color: var(--muted); font: 400 7px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.legend { display: flex; gap: 22px; color: var(--muted); font: 400 8px var(--mono); text-transform: uppercase; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; }
.legend-dot.proposed { background: var(--coral); }
.legend-dot.reference { background: var(--green); }
.legend-dot.baseline { border: 1px solid var(--muted); }

.demo-card { margin-top: 36px; border: 1px solid var(--line); background: rgba(244,239,229,.78); box-shadow: 7px 7px 0 rgba(20,33,29,.035); }
.demo-card-header { min-height: 61px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.sample-number { display: flex; align-items: baseline; gap: 8px; padding: 0 20px; color: var(--coral); font: 400 18px/1 var(--mono); }
.sample-number span { color: var(--muted); font: 400 7px var(--mono); letter-spacing: .13em; text-transform: uppercase; }
.score-panel { min-width: 0; margin: 0; padding: 18px 20px 20px; border-bottom: 1px solid var(--line); background: #dcd5c8; }
.score-label, .methods-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font: 500 7px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.score-label small, .methods-label small { color: var(--muted); font: 400 6px var(--mono); letter-spacing: .07em; }
.score-open { position: relative; display: grid; place-items: center; width: 100%; min-height: 135px; overflow: hidden; border: 0; padding: 13px; background: #fff; cursor: zoom-in; box-shadow: 0 4px 15px rgba(20,33,29,.07); }
.score-open::after { content: "+"; position: absolute; right: 9px; bottom: 9px; display: grid; place-items: center; width: 24px; height: 24px; color: #fff; background: var(--green); font: 400 14px var(--mono); opacity: 0; transition: opacity .2s; }
.score-open:hover::after { opacity: 1; }
.score-open img { display: block; width: 100%; height: auto; max-height: 270px; object-fit: contain; }
.methods-panel { min-width: 0; padding: 18px 20px 20px; }
.methods-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.method-tile { min-width: 0; min-height: 92px; display: flex; flex-direction: column; justify-content: space-between; padding: 13px 14px; border: 1px solid rgba(20,33,29,.13); background: rgba(255,255,255,.22); }
.method-tile:first-child { grid-column: 1 / -1; min-height: 78px; }
.method-tile[data-method="vocalrender"] { border-color: rgba(99,119,20,.28); background: rgba(230,255,87,.18); }
.method-tile[data-method="vocalrender-pro"] { border-color: rgba(204,74,55,.25); background: rgba(238,107,85,.11); }
.method-tile-head { display: flex; align-items: center; min-width: 0; }
.method-name { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 12px; font-weight: 700; white-space: nowrap; }
.method-name i { flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; }
.method-tile[data-type="proposed"] .method-name i { background: var(--coral); }
.method-tile[data-type="reference"] .method-name i { background: var(--green); }
.method-tile[data-type="baseline"] .method-name i { border: 1px solid var(--muted); }
.method-tag { margin-left: 7px; padding: 2px 5px; background: var(--acid); font: 500 7px var(--mono); text-transform: uppercase; white-space: nowrap; }
.method-tile[data-method="vocalrender-pro"] .method-tag { background: rgba(238,107,85,.2); }
.audio-status { margin-left: auto; color: var(--muted); font: 400 7px var(--mono); letter-spacing: .07em; text-transform: uppercase; }
.audio-status.ready { color: var(--green); }
.audio-status.pending { color: #986b63; }
.audio-player { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 9px; min-width: 0; margin-top: 11px; }
.play-button { width: 28px; height: 28px; border: 1px solid var(--ink); border-radius: 50%; padding-left: 2px; background: transparent; cursor: pointer; font-size: 8px; transition: color .2s, background .2s; }
.play-button:hover:not(:disabled), .play-button.playing { color: #fff; background: var(--green); }
.play-button:disabled { cursor: not-allowed; opacity: .3; }
.progress { width: 100%; height: 2px; margin: 0; accent-color: var(--coral); cursor: pointer; }
.progress:disabled { cursor: not-allowed; opacity: .25; }
.time { color: var(--muted); font: 400 8px var(--mono); white-space: nowrap; }

.score-dialog { width: min(94vw, 1500px); max-width: none; max-height: 92vh; overflow: auto; border: 0; padding: 44px 20px 20px; background: var(--paper-deep); box-shadow: 0 25px 80px rgba(0,0,0,.35); }
.score-dialog::backdrop { background: rgba(10,20,17,.8); backdrop-filter: blur(4px); }
.score-dialog img { display: block; width: 100%; height: auto; background: #fff; }
.score-dialog-close { position: absolute; top: 8px; right: 13px; border: 0; padding: 0; background: transparent; cursor: pointer; font: 300 27px/1 var(--sans); }

@media (max-width: 800px) {
  .section-shell { width: min(680px, calc(100% - 36px)); }
  .paper-summary { grid-template-columns: 1fr; gap: 25px; padding: 45px 0 40px; }
  .paper-description { max-width: 590px; }
  .innovations { grid-template-columns: 1fr; }
  .innovations article, .innovations article + article { min-height: 0; padding: 18px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .innovations article:last-child { border-bottom: 0; }
  .demo-heading { align-items: start; flex-direction: column; gap: 18px; }
  .methods-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 540px) {
  .topbar-links a:first-child, .topbar-links a:last-child { display: none; }
  .paper-title h1 { font-size: 56px; }
  .paper-subtitle { font-size: 22px; }
  .paper-actions { align-items: stretch; flex-direction: column; }
  .paper-actions a { justify-content: space-between; }
  .demos { margin-top: 55px; padding: 58px 0 75px; }
  .demo-heading h2 { font-size: 43px; }
  .demo-toolbar { align-items: start; flex-direction: column; gap: 14px; }
  .legend { flex-wrap: wrap; gap: 10px 17px; }
  .score-panel, .methods-panel { padding: 13px; }
  .score-open { min-height: 100px; padding: 8px; }
  .methods-grid { grid-template-columns: 1fr; }
  .method-tile:first-child { grid-column: auto; min-height: 92px; }
  .method-tag { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
