/* Online MIDI Player styles — ported from the original site
   (navigation.css, content.css, globals.css concatenated in the original
   cascade order so the computed values are identical). */

/* ---------- navigation.css ---------- */
:root {
  --shared-shell: 1120px;
  --shared-line: #d8d1c4;
  --shared-paper: #f6f3ec;
  --shared-ink: #17201e;
  --shared-accent: #a8402e;
}

.shared-site-header__rail {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 76px;
  pointer-events: none;
}

.shared-site-header {
  display: flex;
  width: min(var(--shared-shell), calc(100% - 32px));
  min-height: 76px;
  padding-block: 12px;
  margin: auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--shared-line);
  pointer-events: auto;
  transition: width 180ms ease, min-height 180ms ease, padding 180ms ease,
    transform 180ms ease, border-color 180ms ease, border-radius 180ms ease,
    background-color 180ms ease, box-shadow 180ms ease;
}

.shared-site-header--scrolled {
  width: min(calc(100% - 48px), 880px);
  min-height: 60px;
  padding: 7px 14px;
  transform: translateY(10px);
  border: 1px solid var(--shared-line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--shared-paper) 88%, transparent);
  box-shadow: 0 10px 30px rgb(23 32 30 / 10%);
  backdrop-filter: blur(16px);
}

.shared-site-header__brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--shared-ink);
  font-weight: 750;
  text-decoration: none;
}

.shared-site-header__nav {
  display: flex;
  gap: 18px;
}

.shared-site-header__nav a {
  color: var(--shared-ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.shared-site-header__nav a[aria-current="page"] {
  color: var(--shared-accent);
}

.shared-site-footer {
  width: min(var(--shared-shell), calc(100% - 32px));
  margin: auto;
  padding: 30px 0;
  color: #65706c;
  font-size: 13px;
}

.shared-site-footer__columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.shared-site-footer__legal {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--shared-line);
  font-size: 12px;
}

@media (max-width: 560px) {
  .shared-site-header__rail {
    position: relative;
    height: 64px;
  }

  .shared-site-header,
  .shared-site-header--scrolled {
    width: min(100% - 32px, var(--shared-shell));
    min-height: 64px;
    padding: 9px 0;
    transform: none;
    border: 0;
    border-bottom: 1px solid var(--shared-line);
    border-radius: 0;
    background: var(--shared-paper);
    box-shadow: none;
    backdrop-filter: none;
  }

  .shared-site-header__nav {
    gap: 12px;
  }

  .shared-site-footer__columns {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shared-site-header {
    transition: none;
  }
}

.footer-badges {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  margin-left: 14px;
  vertical-align: middle;
}

.footer-badges img {
  display: block;
  height: 40px;
  width: auto;
}

/* ---------- content.css ---------- */
:root {
  --shared-ink: #17201e;
  --shared-line: #d8d1c4;
  --shared-accent: #a8402e;
  --shared-muted: #65706c;
  --shared-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shared-space-3: 12px;
  --shared-space-4: 16px;
  --shared-space-8: 32px;
}

.faq-list {
  border-top: 1px solid var(--shared-line);
}

.faq-list__item {
  border-bottom: 1px solid var(--shared-line);
}

.faq-list__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--shared-space-4);
  min-height: 60px;
  padding: var(--shared-space-3) 0;
  cursor: pointer;
  list-style: none;
  color: var(--shared-ink);
  font-weight: 650;
}

.faq-list__summary::-webkit-details-marker {
  display: none;
}

.faq-list__summary::after {
  flex: 0 0 auto;
  color: var(--shared-muted);
  content: '+';
  font-size: 1.35rem;
  font-weight: 400;
}

.faq-list__item[open] .faq-list__summary::after {
  content: '−';
}

.faq-list__question {
  min-width: 0;
}

.faq-list__number {
  flex: 0 0 auto;
  order: 2;
  color: var(--shared-accent);
  font: 0.8rem/1 var(--shared-mono);
  letter-spacing: 0.08em;
}

.faq-list__answer {
  max-width: 760px;
  padding: 0 var(--shared-space-8) var(--shared-space-4) 0;
  color: var(--shared-muted);
}

.faq-list__answer p {
  margin: 0;
}

.shared-step-list { display: grid; gap: var(--shared-space-4); padding: 0; margin: 0; list-style: none; }
.shared-step-list__item { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: var(--shared-space-4); padding: var(--shared-space-4) 0; border-top: 1px solid var(--shared-line); }
.shared-step-list__number { color: var(--shared-accent); font: 700 .875rem/1.5 var(--shared-mono); }
.shared-step-list__content { min-width: 0; }
.shared-step-list__content h3 { margin: 0; color: var(--shared-ink); }
.shared-step-list__body { color: var(--shared-muted); }
.shared-step-list__body p { margin: 0; }
.shared-step-list__body a { overflow-wrap: anywhere; }
.shared-step-list__shot { margin: 14px 0 0; border: 1px solid var(--shared-line); border-radius: 10px; overflow: hidden; background: #fff; }
.shared-step-list__shot img { display: block; width: 100%; height: auto; }
@media (min-width: 700px) { .shared-step-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }

/* Comparison table (homepage): sites as rows, criteria as columns. */
.compare-table-wrap { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare-table th, .compare-table td { border-bottom: 1px solid var(--shared-line); padding: 10px 12px; text-align: left; vertical-align: top; }
.compare-table thead th { color: var(--shared-muted); font: 650 .75rem/1.5 var(--shared-mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.compare-table tbody th { white-space: nowrap; font-weight: 650; color: var(--shared-ink); }
.compare-table tbody th a { color: var(--shared-accent); }
.compare-table td { color: var(--shared-muted); min-width: 150px; }
.compare-note { margin: 10px 0 0; color: var(--shared-muted); font-size: 13px; }

/* LinkCardGrid: related-content / tool cards (plain <a>) */
.shared-link-card-grid {
  display: grid;
  gap: 12px;
}

.shared-link-card {
  display: grid;
  min-height: 164px;
  padding: 20px;
  border: 1px solid var(--shared-line);
  border-radius: 12px;
  background: var(--shared-surface);
  color: inherit;
  text-decoration: none;
  transition:
    border-color 140ms ease,
    background 140ms ease;
}

.shared-link-card:hover {
  border-color: var(--shared-accent);
  background: var(--shared-surface-raised);
}

.shared-link-card:focus-visible {
  outline: 2px solid var(--shared-accent);
  outline-offset: 2px;
}

.shared-link-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.shared-link-card p {
  margin: 0;
  color: var(--shared-muted);
  line-height: 1.6;
}


/* ---------- globals.css (imported last on the original site; its :root values win) ---------- */
:root {
  --paper: #eef2f5;
  --panel: #ffffff;
  --ink: #101a23;
  --muted: #55677a;
  --line: #d3dde4;
  --accent: #0e7490;
  --accent-strong: #155e75;
  --ok: #15803d;
  --warn: #92400e;
  --danger: #b42318;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --shared-shell: 1120px;
  --shared-line: var(--line);
  --shared-paper: var(--paper);
  --shared-ink: var(--ink);
  --shared-muted: var(--muted);
  --shared-accent: var(--accent);
  --shared-surface: var(--panel);
  --shared-surface-raised: #f7fafc;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
}
a { color: var(--accent-strong); }
button, select, input { font: inherit; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code { font-family: var(--mono); font-size: 0.92em; }

.site-shell { width: min(var(--shared-shell), calc(100% - 32px)); margin-inline: auto; }
.skip-link {
  position: absolute; top: -60px; left: 12px; z-index: 2000;
  padding: 10px 14px; background: var(--ink); color: #fff; text-decoration: none;
}
.skip-link:focus { top: 10px; }

.brand-badge {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent); color: #eafafc; font-size: 17px;
}
.shared-site-header__nav a[aria-current="page"] { color: var(--accent-strong); }

/* Page frame */
.tool-main { padding: 26px 0 72px; }
.tool-hero {
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid var(--ink); border-radius: 18px;
  background: var(--ink); color: #e8eef4;
}
.tool-hero h1 { margin: 0; max-width: 820px; font-size: clamp(34px, 6vw, 58px); font-weight: 700; }
.tool-hero .eyebrow-label {
  margin: 0 0 14px; color: #7dd3e6;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.tool-hero__lede { max-width: 720px; margin: 18px 0 0; color: #b9c6d2; font-size: 17px; }

.tool-section { margin-top: 44px; }
.section-title h2 { margin: 0 0 8px; font-size: clamp(22px, 3.4vw, 30px); }
.section-lede { max-width: 760px; margin: 0; color: var(--muted); }
.section-title { margin-bottom: 18px; }
.section-title .eyebrow-label {
  margin: 0 0 8px; color: var(--accent);
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.prose { max-width: 820px; }
.prose p { margin: 0 0 12px; color: var(--muted); }
.prose ul { margin: 0 0 12px; padding-left: 20px; color: var(--muted); }
.prose ol { margin: 0 0 12px; padding-left: 20px; color: var(--muted); }
.prose strong { color: var(--ink); }
.plain-table { width: 100%; border-collapse: collapse; margin: 0 0 14px; font-size: 14.5px; }
.plain-table th, .plain-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.plain-table th { color: var(--muted); font-size: 12.5px; letter-spacing: 0.04em; text-transform: uppercase; }
.license {
  margin: 0 0 14px; padding: 14px 16px; overflow-x: auto;
  border: 1px solid var(--line); border-radius: 10px; background: #f8fafb;
  font: 12.5px/1.5 var(--mono); color: #334155; white-space: pre-wrap;
}
.hash { overflow-wrap: anywhere; }

/* Card, buttons */
.tool-card {
  margin-top: 26px; padding: 18px;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--panel);
}
.btn {
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--ink); font-size: 14px; font-weight: 600;
  cursor: pointer;
}
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--accent-strong); }
.btn--small { padding: 5px 10px; font-size: 13px; }
.btn--on { background: #e0f2f6; border-color: var(--accent); color: var(--accent-strong); }

.notice {
  margin: 14px 0 0; padding: 12px 14px;
  border: 1px solid #f2d9a4; border-radius: 10px;
  background: #fdf6e3; color: var(--warn); font-size: 14px;
}
.notice p, .notice ul { margin: 6px 0 0; }
.notice ul { padding-left: 18px; }
.notice--error { border-color: #f3b8b0; background: #fdf1ef; color: var(--danger); }

/* Stats */
.file-summary { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.stat {
  display: grid; gap: 2px; min-width: 120px; flex: 1 1 140px;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: #f8fafb;
}
.stat__label { color: var(--muted); font-size: 12px; letter-spacing: 0.02em; }
.stat__value { font-size: 18px; font-weight: 700; }
.stat__value--mono { font-family: var(--mono); font-size: 14px; overflow-wrap: anywhere; }

/* Dropzone */
.dropzone {
  display: grid; gap: 10px; justify-items: center; text-align: center;
  padding: 34px 20px;
  border: 2px dashed var(--line); border-radius: 14px; background: #f4f7f9;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone--active { border-color: var(--accent); background: #e8f5f8; }
.dropzone--compact { padding: 12px 14px; justify-items: start; text-align: left; border-style: solid; }
.dropzone__title { margin: 0; font-size: 20px; font-weight: 700; }
.dropzone__hint { margin: 0; max-width: 520px; color: var(--muted); font-size: 14px; }
.dropzone__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* Status */
.player__status { min-height: 8px; }
.status-line { margin: 12px 0 0; padding: 10px 14px; border-radius: 10px; font-size: 14px; }
.status-line--info { background: #eef7f9; color: var(--accent-strong); }
.status-line--error { background: #fdf1ef; color: var(--danger); }

/* Transport */
.transport { margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfd; }
.transport__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.transport__row--settings { margin-top: 10px; align-items: flex-start; gap: 18px; }
.transport__play { min-width: 92px; }
.transport__time { margin-left: auto; font: 600 15px var(--mono); color: var(--ink); }
.transport__seek { display: block; margin-top: 10px; }
.transport__seek input, .transport__field input[type="range"] { width: 100%; accent-color: var(--accent); }
.transport__field { flex: 1 1 240px; display: grid; gap: 6px; }
.transport__field label { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); }
.transport__field output { font: 600 13.5px var(--mono); color: var(--ink); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn {
  padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--muted); font: 600 12.5px var(--mono); cursor: pointer;
}
.chip-btn--on { border-color: var(--accent); background: #e0f2f6; color: var(--accent-strong); }

/* Piano roll */
.roll { margin-top: 16px; }
.roll__toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.roll__label { font-weight: 700; }
.roll__controls { display: flex; align-items: center; gap: 6px; }
.roll__zoom { min-width: 72px; text-align: center; font: 600 12.5px var(--mono); color: var(--muted); }
.roll__canvas-wrap { height: 340px; border-radius: 12px; overflow: hidden; border: 1px solid #1f2d3a; background: #0f1720; }
.roll__canvas { display: block; width: 100%; height: 100%; cursor: crosshair; touch-action: pan-y; }
.roll__hint { margin: 8px 0 0; color: var(--muted); font-size: 13px; }

/* Track list */
.track-list { margin-top: 18px; }
.track-list__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.track-list h3 { margin: 0 0 8px; font-size: 17px; }
.track-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.track-table th {
  padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--muted);
  font: 700 12px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; text-align: left;
}
.track-table td { padding: 8px 10px; border-bottom: 1px solid #e8eef2; vertical-align: middle; }
.track-table .num { text-align: right; font-family: var(--mono); font-size: 13px; }
.track-row--silent td { color: #8a9aa8; }
.track-row--silent .track-swatch { opacity: 0.3; }
.track-swatch { display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 3px; vertical-align: -1px; }
.track-name { font-weight: 600; }
.track-instrument { color: var(--muted); }
.track-actions { white-space: nowrap; text-align: right; }
.toggle {
  width: 30px; height: 28px; margin-left: 4px;
  border: 1px solid var(--line); border-radius: 7px; background: #fff;
  font: 700 12.5px var(--mono); color: var(--muted); cursor: pointer;
}
.toggle--on { background: var(--danger); border-color: var(--danger); color: #fff; }
.toggle--solo.toggle--on { background: var(--ok); border-color: var(--ok); }
.track-list__note { margin: 10px 0 0; color: var(--muted); font-size: 13px; }

/* Loop, transpose and instrument controls */
.loop-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.transport__hint { margin: 0; color: var(--muted); font-size: 12.5px; }
.loop-state { margin: 8px 0 0; min-height: 1em; color: var(--muted); font-size: 13px; }
.loop-state:empty { display: none; }
.transport__field select {
  width: 100%; padding: 7px 8px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--ink); font-size: 14px;
}

/* Export bar */
.export-bar { margin-top: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfd; }
.export-bar__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.export-bar__title { margin: 0; font-size: 16px; }
.export-bar__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.export-bar__hint { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.export-bar__progress { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.export-bar__progress progress { flex: 1 1 160px; height: 10px; accent-color: var(--accent); }
.export-bar__status { font: 600 13px var(--mono); color: var(--ink); white-space: nowrap; }
.export-bar__done { margin: 12px 0 0; color: var(--ok); font-size: 14px; font-weight: 600; }

/* Visualizer page */
.visualizer-shell__controls { display: flex; flex-wrap: wrap; align-items: end; justify-content: flex-end; gap: 12px; }
.visualizer-shell__field { display: grid; gap: 4px; }
.visualizer-shell__field label { font-size: 13.5px; color: var(--muted); }
.visualizer-shell__field select { padding: 7px 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 14px; }
.visualizer-shell__stage--fs:fullscreen { overflow-y: auto; background: #eef2f5; padding: 18px; }
.follow-demo__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.follow-demo__time { font: 600 15px var(--mono); color: var(--ink); }
.follow-demo__hint { color: var(--muted); font-size: 13px; }

/* Screenshot dropped into a prose section */
.section-shot { margin: 16px 0 0; }
.section-shot img { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; }

/* Feature grid */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.feature { padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.feature h3 { margin: 0 0 6px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* Related cards grid columns */
.shared-link-card-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.shared-link-card { min-height: 120px; }

/* Footer */
.shared-site-footer { border-top: 1px solid var(--line); background: #e9eef2; }
.shared-site-footer__columns strong { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.footer-links { margin: 8px 0 0; padding: 0; list-style: none; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent-strong); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (max-width: 720px) {
  .tool-card { padding: 12px; }
  .roll__canvas-wrap { height: 260px; }
  .transport__time { margin-left: 0; width: 100%; }
  .track-range, .track-table th:nth-child(5) { display: none; }
}

@media (max-width: 560px) {
  .shared-site-header__rail { height: auto; }
  .shared-site-header { flex-wrap: wrap; row-gap: 4px; padding-block: 10px; }
  .shared-site-header__nav { flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .shared-site-header__nav::-webkit-scrollbar { display: none; }
  /* Keep M and S reachable on phones: drop the channel and note-count columns. */
  .track-table th, .track-table td { padding-inline: 6px; }
  .track-table th:nth-child(3), .track-table td:nth-child(3),
  .track-table th:nth-child(4), .track-table td:nth-child(4) { display: none; }
}
