/* ==============================
   GLOBAL BASE
   ============================== */
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f9fcff;
  color: #223;
  margin: 0;
  padding: 0 34px;  /* breathing room left */
  max-width: 100%;
}

h1 {
  color: #1d3050;
  font-size: 2.1em;
  margin-bottom: 8px;
}

ul {
  list-style: none;
  padding: 0;
}

/* ==============================
   HEADERS
   ============================== */
header {
  padding: 32px 0 15px 34px;
  text-align: left;
  background: #e9f2fc;
}

.bubble-header {
  padding: 36px 0 20px 0;
  text-align: center;
  background: #e9f2fc;
  border-bottom-left-radius: 40px;
  border-bottom-right-radius: 40px;
  box-shadow: 0 4px 12px #ccddeeaa;
}

/* ==============================
   CARD CONTAINERS
   ============================== */
.card {
  width: 100%;
  max-width: 620px;
  margin: 40px auto 0 auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px #e0ecfb55;
  padding: 34px;
  text-align: left;
}

.info {
  color: #678;
  text-align: center;
  font-size: 1em;
  margin-bottom: 12px;
}

/* ==============================
   LIST ITEMS
   ============================== */
li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid #dde8f3;
  border-radius: 10px;
  padding: 16px;
  margin: 20px 0;
  background: #fdfdff;
}

.label {
  font-weight: bold;
  color: #234;
  font-size: 1.06em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.file-info {
  font-size: 0.95em;
  color: #799;
  margin-left: 6px;
}

.file-badge {
  display: inline-block;
  background: #e1eaf3;
  color: #2671c2;
  font-size: 0.87em;
  border-radius: 4px;
  padding: 3px 8px;
  margin-top: 5px;
}

/* ==============================
   AUDIO + MIDI BLOCKS
   ============================== */
.audio-block,
.midi-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}

.audio-block.playing,
.midi-block.playing {
  background: #eef6ff;
  border-left: 4px solid #2671c2;
  box-shadow: 0 0 0 2px #cde2f9aa;
  transition: background 0.3s ease;
}

.audio-controls,
.midi-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.midi-volume {
  width: 100px;
}

.midi-time {
  font-size: 0.95em;
  color: #444;
}

/* ==============================
   WAVEFORMS + MEDIA
   ============================== */
.waveform-container {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-top: 10px;
  padding: 8px;
}

.volume-slider {
  width: 100px;
}

img.spectrogram {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 1px 4px #ccd;
  margin-top: 8px;
  border: 1px solid #ccc;
}

/* ==============================
   BUTTONS
   ============================== */
.download-btn {
  display: inline-block;
  background: #2559a6;
  color: #fff;
  padding: 7px 14px;
  border-radius: 6px;
  text-decoration: none;
  margin-top: 7px;
  margin-right: 6px;
  transition: background 0.2s ease;
  cursor: pointer;
}
.download-btn:hover {
  background: #163867;
}

.refine-btn {
  background: #e7a742;
  color: #fff !important;
}

.unlock-btn {
  background: #be4b10;
  color: #fff !important;
  font-weight: bold;
}

/* Purchase variant (used by default full unlock) */
.download-btn.unlock-btn {
  background-color: #22a700;
}
.download-btn.unlock-btn:hover {
  background-color: #188200;
}

/* New: conversion-specific button */
.convert-btn {
  background-color: #2559a6;
  font-weight: 500;
}
.convert-btn:hover {
  background-color: #163867;
}

/* Disabled button style (future-proofed for lockouts) */
.btn-disabled {
  opacity: 0.55;
  pointer-events: none;
  background: #ccc !important;
  color: #777 !important;
}

/* ==============================
   DOWNLOAD CENTER
   ============================== */
.download-center {
  text-align: center;
  margin: 30px auto;
}
.download-center .download-btn {
  margin: 8px;
  display: inline-block;
}

/* ==============================
   GROUP TITLES
   ============================== */
.group-title {
  font-size: 1.12em;
  color: #27567e;
  margin-top: 32px;
  margin-bottom: 10px;
  background: #eaf1fb;
  border-left: 4px solid #2671c2;
  padding: 6px 0 6px 10px;
  border-radius: 7px 0 0 7px;
}

.subtext {
  color: #799;
  font-size: 0.97em;
  margin-left: 7px;
}

.view-full {
  color: #2671c2;
  font-size: 0.97em;
  margin-left: 7px;
  text-decoration: underline;
}

/* ==============================
   FOOTER
   ============================== */
footer {
  text-align: center;
  color: #778;
  margin: 50px 0 20px 0;
  font-size: 0.95em;
}
footer a {
  color: #2671c2;
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}

/* ==============================
   PROGRESS PAGE
   ============================== */
.status-wrapper {
  max-width: 680px;
  margin: 60px auto;
  padding: 30px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px #e0ecfb88;
  text-align: center;
}
.status-icon {
  font-size: 2.6em;
  margin-bottom: 14px;
}
.status-text {
  font-size: 1.3em;
  margin-bottom: 16px;
  color: #123;
}
.log-container {
  max-width: 700px;
  margin: 40px auto;
  background: #f7faff;
  border: 1px solid #e2ecf7;
  border-radius: 10px;
  padding: 20px;
  font-family: monospace;
  white-space: pre-wrap;
  overflow-x: auto;
  color: #234;
}
.log-title {
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 1.1em;
  color: #444;
}

/* ==============================
   PAYWALL OVERLAY
   ============================== */
.paywall-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.45);
  z-index: 999;
}

.paywall-box {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 10px;
  padding: 30px 40px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
  text-align: center;
  z-index: 1000;
  max-width: 400px;
}
.paywall-box h2 {
  margin-top: 0;
  color: #1d3050;
}
.paywall-box button {
  margin-top: 20px;
  padding: 8px 18px;
  border: none;
  background: #2559a6;
  color: white;
  border-radius: 6px;
  font-size: 1em;
  cursor: pointer;
}
.paywall-box button:hover {
  background: #133560;
}

/* ==============================
   FLASH MESSAGES
   ============================== */
.flash-wrapper {
  max-width: 640px;
  margin: 0 auto;
}
.flash-messages {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}
.flash-messages li {
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-weight: bold;
}
.flash-messages .error {
  background-color: #f8d7da;
  color: #721c24;
}
.flash-messages .success {
  background-color: #d4edda;
  color: #155724;
}
.flash.danger {
  background-color: #ffe0e0;
  color: #b00020;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 16px;
}

/* ==============================
   COLLAPSIBLES
   ============================== */
.collapsible {
  cursor: pointer;
  padding: 12px;
  background: #f1f7ff;
  border-radius: 6px;
  margin-top: 20px;
  font-weight: bold;
  transition: background 0.2s;
}
.collapsible:hover {
  background: #ddeeff;
}
.content {
  display: none;
  margin-top: 10px;
}
.content.show {
  display: block;
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 700px) {
  .card { margin-left: 0; max-width: 100vw; }
  header, footer { padding-left: 10px; margin-left: 0; }
  .dropdown-content { min-width: 100%; }
}

/* ==============================
   FAQ, DASHBOARD, PRICING, CONTACT
   ============================== */
.faq-list { list-style: none; padding: 0; margin: 0; }
.faq-list li { margin-bottom: 14px; }

.file-list { list-style: none; padding: 0; margin: 0; }
.file-list li {
  background: #fff;
  border: 1px solid #ddd;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.file-badge {
  background: #e0ebf5;
  color: #1d3050;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.85em;
  margin-left: 8px;
}

.refine-btn { background-color: #f3a23a; color: #222; margin-top: 32px; }
.refine-btn:hover { background-color: #e28a15; }

.flash-success {
  background:#e6f9ed;
  border-left:4px solid #4caf50;
  padding:12px;
  margin-bottom:16px;
}

.row-grid { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; }
.muted { color:#6b7280; font-size: .9em; }
.pill { display:inline-block; padding:.2rem .5rem; border-radius:999px; font-weight:600; }
.pill-ready { background:#d4f7d4; color:#1a601a; }
.pill-wait { background:#fff3cd; color:#856404; }
.pill-err  { background:#f8d7da; color:#721c24; }
.btn-inline { margin:4px 6px 0 0; display:inline-block; }
.danger-btn { background:#b91c1c !important; }
.danger-btn:hover { filter:brightness(0.95); }
.section-h { font-size:1.05rem; font-weight:700; margin:20px 0 10px; }

.pricing-list { list-style: none; padding: 0; margin: 0; }
.pricing-list li {
  background: #fff;
  border: 1px solid #ddd;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.price-badge {
  background: #2156a5;
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85em;
  margin-left: 8px;
}

/* ==============================
   TOP NAV + HERO
   ============================== */
.top-nav {
  text-align: right;
  padding: 10px 20px;
  background: #f2f7fc;
  font-size: 0.95em;
  border-bottom: 1px solid #dde6f2;
}
.top-nav a {
  color: #2559a6;
  text-decoration: none;
  margin: 0 6px;
}
.top-nav a:hover {
  text-decoration: underline;
}

.hero {
  text-align: center;
  padding: 60px 20px 40px 20px;
  background: linear-gradient(180deg, #e9f2fc, #f9fcff);
  border-bottom-left-radius: 50px;
  border-bottom-right-radius: 50px;
  box-shadow: 0 4px 12px #ccddeeaa;
}
.hero .brand {
  font-size: 2.8em;
  color: #1d3050;
  margin: 0;
}
.hero .subtext {
  font-size: 1.15em;
  color: #456;
  margin: 8px 0 20px;
}
.hero .features {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 720px;
  text-align: left;
}
.hero .features li {
  background: #fff;
  margin: 10px auto;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid #dde8f3;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  font-size: 1em;
  color: #234;
}

/* ==============================
   PLAYER BLOCKS (Audio + MIDI)
   ============================== */
.player-block {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: background 0.2s ease, border-left 0.2s ease;
}
.player-block.playing {
  background: #f5faff;
  border-left: 4px solid #2559a6;
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  margin-bottom: 6px;
}
.player-icon {
  margin-right: 6px;
  font-size: 1.1em;
}
.player-name {
  flex-grow: 1;
  color: #234;
}
.player-size {
  font-size: 0.9em;
  color: #678;
}

.waveform {
  height: 80px;
  margin-bottom: 10px;
  border-radius: 6px;
  overflow: hidden;
  background: #f9fbff;
  border: 1px solid #dce6f7;
}

.player-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
}
.player-controls button {
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  background: #eaf1fb;
  cursor: pointer;
  transition: background 0.2s ease;
}
.player-controls button:hover {
  background: #d8e6f7;
}
.player-time {
  margin-left: auto;
  font-family: monospace;
  font-size: 0.95em;
  color: #333;
}

.player-volume {
  width: 100%;
  margin-top: 4px;
}

/* Progress bar (for MIDI) */
.player-progress {
  background: #eee;
  height: 6px;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}
.player-progress-bar {
  background: #2559a6;
  height: 6px;
  width: 0%;
  transition: width 0.2s linear;
}

/* ==============================
   CONTACT FORM
   ============================== */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-form input,
.contact-form textarea {
  padding: 10px 12px;
  border: 1px solid #ccd;
  border-radius: 8px;
  font-size: 1em;
  font-family: inherit;
  background: #fdfdff;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #2671c2;
  box-shadow: 0 0 0 3px #d8e6f7;
  outline: none;
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form button {
  align-self: flex-start;
  margin-top: 10px;
}

/* ==============================
   DROPDOWN FOR STEM CONVERSIONS
   ============================== */
.dropdown {
  position: relative;
  display: inline-block;
  margin-left: 10px;
}

.dropdown-content {
  display: none;
  position: absolute;
  background: #fff;
  min-width: 200px;
  box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
  z-index: 10;
  border-radius: 6px;
  overflow: hidden;
}

.dropdown:hover .dropdown-content,
.dropdown.open .dropdown-content {
  display: block;
}

.dropdown-item {
  background: none;
  border: none;
  padding: 10px 14px;
  text-align: left;
  width: 100%;
  cursor: pointer;
  font-size: 14px;
  color: #234;
}
.dropdown-item:hover,
.dropdown-item:focus {
  background: #f0f6ff;
  outline: none;
}

.dropdown-item span.price {
  float: right;
  color: #777;
  font-size: 0.85em;
}


.progress-track {
  margin: 20px auto 0;
  max-width: 420px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-bar-inner {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4ade80, #22c55e);
  transition: width 0.6s ease-out;
}


/* Center the Unlock Full Version button */
.unlock-center {
  text-align: center;
  margin: 20px auto;
}

.unlock-center form {
  display: inline-block;
}

.unlock-center .download-btn {
  display: inline-block;
  margin: 0 auto;
}

/* Convert utility working state */
.convert-working-card {
  margin-top: 16px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(17, 24, 39, 0.10);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
}

.convert-working-card[hidden] {
  display: none !important;
}

.convert-working-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.convert-spinner {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 3px solid rgba(17, 24, 39, 0.14);
  border-top-color: rgba(17, 24, 39, 0.72);
  animation: convertSpin 0.85s linear infinite;
  flex: 0 0 auto;
}

.convert-progress-rail {
  position: relative;
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  margin-top: 14px;
  background: rgba(17, 24, 39, 0.10);
}

.convert-progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 45%;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.55);
  animation: convertSweep 1.35s ease-in-out infinite;
}

.convert-steps {
  display: grid;
  gap: 6px;
  margin: 14px 0 0;
  padding-left: 22px;
  color: #6b7280;
  font-size: 0.92rem;
}

.convert-step.done {
  color: #374151;
}

.convert-step.active {
  color: #111827;
  font-weight: 700;
}

.download-btn.is-busy {
  opacity: 0.82;
  cursor: wait;
}

@keyframes convertSpin {
  to { transform: rotate(360deg); }
}

@keyframes convertSweep {
  0% { transform: translateX(-120%); }
  50% { transform: translateX(80%); }
  100% { transform: translateX(240%); }
}

/* Launch polish: hide waveform boxes on result audio cards. Native controls/buttons remain. */
.audio-block .waveform-container {
  display: none !important;
}
.audio-block[data-bn-native-audio="1"] .waveform-container {
  display: none !important;
}

/* Static visual player: no waveform library, no loading boxes */
.audio-block .waveform-container.bn-static-waveform {
  display: block !important;
  height: 82px;
  margin: 12px 0 12px;
  padding: 10px 12px;
  border: 1px solid #dce8f7;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(242, 247, 253, 0.98));
  overflow: hidden;
}

.bn-static-wave-shell {
  position: relative;
  height: 100%;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
}

.bn-static-wave-bars {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  opacity: 0.82;
}

.bn-static-wave-bar {
  display: block;
  flex: 1 1 auto;
  min-width: 2px;
  max-width: 7px;
  border-radius: 999px;
  background: rgba(38, 113, 194, 0.34);
}

.bn-static-wave-progress {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: rgba(38, 113, 194, 0.14);
  border-right: 1px solid rgba(38, 113, 194, 0.38);
  pointer-events: none;
}

.bn-static-wave-playhead {
  position: absolute;
  top: 8%;
  bottom: 8%;
  left: 0%;
  width: 2px;
  border-radius: 999px;
  background: rgba(38, 113, 194, 0.72);
  transform: translateX(-1px);
  pointer-events: none;
}

.bn-static-wave-shell.is-playing .bn-static-wave-bar {
  background: rgba(38, 113, 194, 0.50);
}

.audio-block.bn-audio-playing {
  border-color: rgba(38, 113, 194, 0.35);
  box-shadow: 0 8px 24px rgba(38, 113, 194, 0.10);
}

/* Launch polish: cleaner result audio cards + static visual player */
.audio-block[data-bn-static-wave-player="1"],
.audio-block[data-bn-static-wave-player],
.audio-block.bn-audio-playing {
  transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.audio-block .bn-static-waveform {
  margin-top: 16px !important;
  margin-bottom: 18px !important;
}

.audio-block .bn-static-wave-shell {
  background: linear-gradient(180deg, rgba(255,255,255,0.74), rgba(240,247,255,0.64));
}

.audio-block .bn-static-wave-bars {
  gap: 4px;
}

.audio-block .bn-static-wave-bar {
  background: rgba(38, 113, 194, 0.26);
}

.audio-block .bn-static-wave-shell.is-playing .bn-static-wave-bar {
  background: rgba(38, 113, 194, 0.46);
}

.audio-block .bn-static-wave-progress {
  background: rgba(38, 113, 194, 0.10);
}

.audio-block .bn-static-wave-playhead {
  width: 2px;
  background: rgba(22, 94, 180, 0.74);
}

.audio-block button,
.audio-block .play-btn,
.audio-block .loop-btn {
  border: 0;
  border-radius: 9px;
  padding: 8px 13px;
  background: #eef5ff;
  color: #123052;
  font-weight: 600;
  line-height: 1;
  box-shadow: none;
}

.audio-block .play-btn {
  background: #e4f0ff;
  color: #0b4d91;
}

.audio-block button:hover,
.audio-block .play-btn:hover,
.audio-block .loop-btn:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
}

.audio-block .time-display {
  display: inline-block;
  min-width: 104px;
  margin-left: 8px;
  font-variant-numeric: tabular-nums;
  color: #1c2f46;
  font-weight: 500;
}

.audio-block input[type="range"] {
  width: 118px;
  margin-top: 8px;
  accent-color: #2671c2;
}

.audio-block.bn-audio-playing {
  border-color: rgba(38, 113, 194, 0.34);
  box-shadow: 0 10px 26px rgba(38, 113, 194, 0.12);
}

/* Collapsed technical area for spectrograms */
.bn-tech-details {
  margin-top: 28px;
  margin-bottom: 18px;
  border: 1px solid #dbe8f7;
  border-radius: 12px;
  background: #f8fbff;
  overflow: hidden;
}

.bn-tech-details > summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  background: #e8f1fd;
  color: #173a62;
  font-weight: 800;
  border-left: 5px solid #2d8cff;
}

.bn-tech-details > summary::-webkit-details-marker {
  display: none;
}

.bn-tech-details > summary::after {
  content: "Show";
  float: right;
  font-size: 0.9rem;
  color: #456985;
  font-weight: 700;
}

.bn-tech-details[open] > summary::after {
  content: "Hide";
}

.bn-tech-panel {
  padding: 14px 16px 18px;
}

.bn-tech-panel img {
  max-width: 100%;
  height: auto;
}

/* Launch polish: cleaner result audio cards + static visual player */
.audio-block[data-bn-static-wave-player="1"],
.audio-block[data-bn-static-wave-player],
.audio-block.bn-audio-playing {
  transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.audio-block .bn-static-waveform {
  margin-top: 16px !important;
  margin-bottom: 18px !important;
}

.audio-block .bn-static-wave-shell {
  background: linear-gradient(180deg, rgba(255,255,255,0.74), rgba(240,247,255,0.64));
}

.audio-block .bn-static-wave-bars {
  gap: 4px;
}

.audio-block .bn-static-wave-bar {
  background: rgba(38, 113, 194, 0.26);
}

.audio-block .bn-static-wave-shell.is-playing .bn-static-wave-bar {
  background: rgba(38, 113, 194, 0.46);
}

.audio-block .bn-static-wave-progress {
  background: rgba(38, 113, 194, 0.10);
}

.audio-block .bn-static-wave-playhead {
  width: 2px;
  background: rgba(22, 94, 180, 0.74);
}

.audio-block button,
.audio-block .play-btn,
.audio-block .loop-btn {
  border: 0;
  border-radius: 9px;
  padding: 8px 13px;
  background: #eef5ff;
  color: #123052;
  font-weight: 600;
  line-height: 1;
  box-shadow: none;
}

.audio-block .play-btn {
  background: #e4f0ff;
  color: #0b4d91;
}

.audio-block button:hover,
.audio-block .play-btn:hover,
.audio-block .loop-btn:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
}

.audio-block .time-display {
  display: inline-block;
  min-width: 104px;
  margin-left: 8px;
  font-variant-numeric: tabular-nums;
  color: #1c2f46;
  font-weight: 500;
}

.audio-block input[type="range"] {
  width: 118px;
  margin-top: 8px;
  accent-color: #2671c2;
}

.audio-block.bn-audio-playing {
  border-color: rgba(38, 113, 194, 0.34);
  box-shadow: 0 10px 26px rgba(38, 113, 194, 0.12);
}

/* Collapsed technical area for spectrograms */
.bn-tech-details {
  margin-top: 28px;
  margin-bottom: 18px;
  border: 1px solid #dbe8f7;
  border-radius: 12px;
  background: #f8fbff;
  overflow: hidden;
}

.bn-tech-details > summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  background: #e8f1fd;
  color: #173a62;
  font-weight: 800;
  border-left: 5px solid #2d8cff;
}

.bn-tech-details > summary::-webkit-details-marker {
  display: none;
}

.bn-tech-details > summary::after {
  content: "Show";
  float: right;
  font-size: 0.9rem;
  color: #456985;
  font-weight: 700;
}

.bn-tech-details[open] > summary::after {
  content: "Hide";
}

.bn-tech-panel {
  padding: 14px 16px 18px;
}

.bn-tech-panel img {
  max-width: 100%;
  height: auto;
}

/* My Uploads scoped storage actions */
.bn-inline-delete-form {
  display: inline-block;
  margin: 0;
}

.bn-delete-small {
  background: #b91c1c;
  color: #fff;
  border: 1px solid #7f1d1d;
  box-shadow: none;
}

.bn-delete-small:hover {
  background: #991b1b;
}


/* My Uploads scoped storage actions */
.bn-inline-delete-form {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin: 0.65rem 0 0;
}

.bn-delete-small {
  appearance: none;
  border: 1px solid #dc2626;
  background: #fff5f5;
  color: #991b1b;
  border-radius: 8px;
  padding: 0.48rem 0.72rem;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
}

.bn-delete-small:hover {
  background: #fee2e2;
  border-color: #991b1b;
  color: #7f1d1d;
}

.bn-delete-small:focus {
  outline: 2px solid rgba(220, 38, 38, 0.25);
  outline-offset: 2px;
}

/* ==============================
   RESULTS PAGE EDUCATIONAL LAYOUT
   ============================== */
.page-subheader .results-status-pill {
  display: inline-block;
  margin-bottom: 8px;
  padding: 5px 11px;
  border: 1px solid #bcd1e8;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #315879;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page-subheader .results-intro {
  max-width: 760px;
  margin: 10px auto 0;
  padding: 0 20px;
  color: #52697c;
  font-size: 1.04rem;
  line-height: 1.65;
}

.results-overview-card {
  width: min(920px, calc(100% - 36px));
  margin: 24px auto 0;
  padding: 24px;
  border: 1px solid #d9e6f3;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(28, 63, 94, 0.06);
  color: #31485c;
  text-align: left;
}

.results-success-banner {
  width: min(920px, calc(100% - 36px));
  margin: 18px auto 0;
  padding: 14px 18px;
  box-sizing: border-box;
  border: 1px solid #b9dfc3;
  border-radius: 12px;
  background: #effaf2;
  color: #285c35;
  text-align: center;
}

.results-section-heading {
  margin-bottom: 10px;
}

.results-section-heading h2 {
  margin: 3px 0 0;
  color: #1d4365;
  font-size: 1.35rem;
}

.results-section-kicker {
  color: #5f7890;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.source-audio-player {
  width: 100%;
  margin: 10px 0 14px;
}

.media-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 9px;
  margin: 14px 0 0;
}

.media-facts > div {
  padding: 10px 12px;
  border: 1px solid #e1eaf3;
  border-radius: 9px;
  background: #f7faff;
}

.media-facts dt {
  color: #6c8295;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.media-facts dd {
  margin: 3px 0 0;
  color: #203a52;
  font-weight: 700;
}

.results-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.results-summary-grid a {
  display: flex;
  min-height: 82px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 1px solid #d9e7f5;
  border-radius: 10px;
  background: #f5f9fe;
  color: #315879;
  text-align: center;
  text-decoration: none;
}

.results-summary-grid a:hover {
  border-color: #9dbfe1;
  background: #edf5fd;
}

.results-summary-grid strong {
  color: #174f85;
  font-size: 1.5rem;
}

.results-summary-grid span {
  margin-top: 2px;
  font-size: 0.86rem;
}

.results-fine-print {
  color: #667c8e;
  font-size: 0.88rem;
  line-height: 1.55;
}

.results-primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.results-primary-actions .download-btn {
  margin: 0;
}

.results-primary-download {
  font-weight: 800;
}

.results-secondary-action {
  border: 1px solid #b8cde2;
  background: #fff;
  color: #255987 !important;
}

.results-secondary-action:hover {
  background: #edf5fd;
}

.results-card {
  max-width: 920px;
}

.results-output-section {
  scroll-margin-top: 18px;
  margin-top: 34px;
}

.results-explainer {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid #dce8f4;
  border-radius: 10px;
  background: #f8fbff;
  color: #3e566a;
  line-height: 1.55;
}

.results-explainer p {
  margin: 0 0 8px;
}

.results-explainer p:last-child {
  margin-bottom: 0;
}

.results-use-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.results-use-list li {
  display: block;
  margin: 0;
  padding: 10px;
  border: 0;
  background: #edf5fd;
  font-size: 0.9rem;
}

.results-compatibility {
  color: #526b80;
  font-size: 0.92rem;
}

.stem-list audio {
  width: 100%;
}

.notation-card {
  padding: 2px 16px 18px;
  border: 1px solid #dce8f4;
  border-radius: 12px;
  background: #fbfdff;
}

.results-trust-card,
.results-next-card,
.results-downloads {
  margin-top: 38px;
  padding: 20px;
  border-radius: 12px;
}

.results-trust-card {
  border-left: 5px solid #d39b35;
  background: #fff9ed;
  color: #51452f;
}

.results-trust-card h2,
.results-next-card h2,
.results-downloads h2 {
  margin: 0 0 10px;
  color: #274b6c;
  font-size: 1.25rem;
}

.results-trust-card p {
  margin: 8px 0 0;
  line-height: 1.6;
}

.results-next-card {
  border: 1px solid #d7e6f4;
  background: #f7fbff;
}

.results-next-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.results-next-grid > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 13px;
  border-radius: 9px;
  background: #fff;
}

.results-next-grid strong {
  color: #234f78;
}

.results-next-grid span,
.results-next-tools {
  color: #536d83;
  font-size: 0.92rem;
  line-height: 1.5;
}

.results-reference-audio {
  margin-top: 18px;
}

.results-stem-format-options {
  margin: 18px 0;
}

.results-format-options {
  margin-top: 38px;
}

.results-format-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
}

.results-format-actions form,
.results-format-actions .download-btn {
  margin: 0;
}

.results-next-tools {
  margin: 16px 0 0;
}

.results-downloads {
  border-top: 1px solid #dce6ef;
  border-radius: 0;
  text-align: center;
}

@media (max-width: 700px) {
  .results-overview-card {
    width: auto;
    margin-left: 0;
    margin-right: 0;
    padding: 18px;
  }

  .results-card {
    width: auto;
    padding: 20px 16px;
  }

  .results-success-banner {
    width: auto;
    margin-left: 0;
    margin-right: 0;
  }

  .results-primary-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .results-primary-actions .download-btn {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }

  .results-summary-grid,
  .results-next-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .results-use-list {
    grid-template-columns: 1fr;
  }

  .media-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .results-summary-grid,
  .results-next-grid,
  .media-facts {
    grid-template-columns: 1fr;
  }
}

/* ==============================
   RESULTS PAGE PHASE 3
   Compact, consistent output cards
   ============================== */
.results-card {
  margin-top: 24px;
  padding: 24px;
}

.results-output-section {
  margin-top: 26px;
}

.results-output-section:first-child {
  margin-top: 0;
}

.results-output-section .group-title {
  margin-top: 0;
  padding: 8px 12px;
  font-size: 1.08rem;
}

.results-explainer {
  margin-bottom: 12px;
  padding: 12px 14px;
}

.results-inline-note {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #f4f8fc;
  text-align: left;
  line-height: 1.5;
}

.results-stem-grid,
.results-player-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0 0;
}

.results-stem-grid > li,
.results-player-grid > .player-block {
  min-width: 0;
  margin: 0;
}

.results-stem-grid > li {
  padding: 14px;
}

.results-stem-grid audio {
  min-width: 0;
}

.file-technical-name {
  overflow: hidden;
  color: #72869a;
  font-size: 0.78rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stem-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stem-card-actions .download-btn {
  margin: 0;
  padding: 7px 11px;
}

.loop-label {
  color: #4f6579;
  font-size: 0.88rem;
  font-weight: 700;
}

.results-player-grid .player-block {
  padding: 13px;
}

.results-player-grid .bn-static-waveform {
  height: 56px !important;
  margin: 10px 0 12px !important;
  padding: 8px 10px;
}

.results-player-grid .player-controls {
  gap: 6px;
}

.results-player-grid .player-controls button {
  padding: 7px 9px;
  font-size: 0.84rem;
}

.results-player-grid .time-display {
  min-width: 92px;
  margin-left: 0;
  font-size: 0.82rem;
}

.results-player-grid input[type="range"] {
  width: 100%;
  margin-top: 4px;
}

.results-reference-audio .player-block {
  margin-bottom: 12px;
}

.results-transcription-section {
  padding: 0;
  border: 0;
}

.results-transcription-section .midi-block {
  margin-bottom: 14px;
}

.notation-card {
  margin-top: 14px;
  padding: 16px;
}

.notation-card h3 {
  margin: 0 0 8px;
  color: #274b6c;
  font-size: 1.05rem;
}

.results-trust-card,
.results-next-card {
  margin-top: 26px;
  padding: 16px;
}

.results-format-options {
  margin-top: 26px;
}

.results-format-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.results-format-card {
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 12px;
}

.results-compact-status {
  margin: 8px 0;
}

.results-format-purchase,
.results-individual-files {
  margin-top: 8px;
}

.results-individual-files ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.results-individual-files li {
  display: list-item;
  margin: 4px 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.results-footer-actions {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #dce6ef;
  text-align: center;
}

.results-footer-actions .refine-btn {
  margin: 0;
}

@media (max-width: 760px) {
  .results-stem-grid,
  .results-player-grid,
  .results-format-card-grid {
    grid-template-columns: 1fr;
  }

  .results-card {
    padding: 18px 14px;
  }
}

@media (max-width: 480px) {
  .stem-card-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .stem-card-actions .download-btn {
    text-align: center;
  }
}
