.audio-editor-page {
  --audio-ink: #10231c;
  --audio-cream: #f5f2e9;
  --audio-lime: #c8f25f;
  --audio-green: #174f38;
  --audio-line: #d8ddd2;
  font-family: "Manrope", sans-serif;
  color: var(--audio-ink);
  background:
    linear-gradient(rgba(23, 79, 56, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 79, 56, 0.035) 1px, transparent 1px),
    var(--audio-cream);
  background-size: 32px 32px;
}

.audio-main {
  overflow: hidden;
}

.audio-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 64px;
  align-items: center;
  padding-top: 78px;
  padding-bottom: 64px;
}

.audio-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: var(--audio-green);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.audio-kicker span {
  width: 34px;
  height: 2px;
  background: var(--audio-green);
}

.audio-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(3.4rem, 7vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.07em;
  line-height: 0.88;
}

.audio-hero h1 em {
  color: var(--audio-green);
  font-family: Georgia, serif;
  font-weight: 400;
}

.audio-hero-copy {
  max-width: 630px;
  margin: 30px 0 0;
  color: #50635b;
  font-size: 1.08rem;
  line-height: 1.75;
}

.signal-card {
  min-height: 330px;
  padding: 24px;
  border: 1px solid #092d20;
  border-radius: 4px;
  color: #eef8e6;
  background: #102e24;
  box-shadow: 18px 18px 0 var(--audio-lime);
  transform: rotate(1.5deg);
}

.signal-top,
.signal-bottom {
  display: flex;
  justify-content: space-between;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.signal-bars {
  display: flex;
  height: 220px;
  align-items: center;
  gap: 4px;
  margin: 18px 0;
  overflow: hidden;
}

.signal-bars i {
  flex: 1;
  height: var(--bar);
  min-width: 2px;
  background: var(--audio-lime);
  opacity: 0.88;
}

.signal-bottom strong {
  color: var(--audio-lime);
}

.audio-workspace {
  margin-bottom: 70px;
  padding: 12px;
  border: 1px solid #cbd3c7;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 30px 70px rgba(24, 57, 44, 0.09);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 1px;
  background: #cbd3c7;
}

.editor-panel,
.master-panel {
  padding: 30px;
  background: #fbfcf8;
}

.master-panel {
  background: #eef1e8;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.panel-heading > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.step-no,
.track-count {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 600;
}

.step-no {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--audio-green);
}

.track-count {
  padding: 7px 9px;
  border: 1px solid var(--audio-line);
  color: #68756f;
  background: white;
}

.audio-dropzone {
  display: grid;
  min-height: 178px;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 24px;
  border: 1.5px dashed #87988e;
  cursor: pointer;
  background: #f5f7f1;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.audio-dropzone:hover,
.audio-dropzone.is-dragging {
  border-color: var(--audio-green);
  background: #eff8d8;
  transform: translateY(-2px);
}

.audio-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.drop-icon {
  display: grid;
  width: 43px;
  height: 43px;
  margin-bottom: 5px;
  place-items: center;
  border-radius: 50%;
  color: #11291f;
  background: var(--audio-lime);
}

.drop-icon svg {
  width: 21px;
}

.audio-dropzone strong {
  font-size: 0.98rem;
}

.audio-dropzone > span:not(.drop-icon),
.audio-dropzone small {
  color: #68776f;
  font-size: 0.77rem;
}

.audio-dropzone small {
  font-family: "IBM Plex Mono", monospace;
}

.empty-timeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 100px;
  color: #7c8983;
  font-size: 0.86rem;
}

.empty-timeline[hidden] {
  display: none;
}

.empty-timeline svg {
  width: 18px;
}

.track-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.audio-track {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 36px;
  border: 1px solid var(--audio-line);
  background: white;
}

.track-order {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border-right: 1px solid var(--audio-line);
  color: #65756d;
  background: #f2f4ed;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
}

.track-order svg {
  width: 15px;
}

.track-main {
  min-width: 0;
  padding: 14px;
}

.track-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.7fr);
  gap: 14px;
  align-items: center;
}

.track-title-row > div {
  min-width: 0;
}

.track-title-row strong,
.track-title-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-title-row strong {
  font-size: 0.84rem;
}

.track-title-row span {
  margin-top: 3px;
  color: #74827b;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.63rem;
}

.track-title-row audio {
  width: 100%;
  height: 34px;
}

.preview-unavailable {
  padding: 9px 10px;
  border: 1px dashed #bdc8bd;
  color: #75827b;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6rem;
  text-align: center;
  background: #f6f8f3;
}

.trim-row {
  display: grid;
  grid-template-columns: 108px minmax(50px, 1fr) 108px;
  gap: 12px;
  align-items: end;
  margin-top: 13px;
}

.trim-row label {
  position: relative;
  color: #718078;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.trim-row input {
  width: 100%;
  margin-top: 4px;
  padding: 7px 27px 7px 8px;
  border: 1px solid #ccd5cb;
  border-radius: 2px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  background: #fafbf8;
}

.trim-row label small {
  position: absolute;
  right: 7px;
  bottom: 8px;
  color: #9aa49f;
  font-size: 0.55rem;
  text-transform: lowercase;
}

.trim-line {
  height: 28px;
  display: flex;
  align-items: center;
}

.trim-line::before {
  width: 100%;
  height: 3px;
  content: "";
  background: #dce2d9;
}

.trim-line span {
  position: absolute;
}

.track-actions {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  border-left: 1px solid var(--audio-line);
}

.track-actions button {
  display: grid;
  place-items: center;
  border: 0;
  border-bottom: 1px solid var(--audio-line);
  color: #5e6d65;
  cursor: pointer;
  background: #fafbf8;
}

.track-actions button:last-child {
  border-bottom: 0;
  color: #a24235;
}

.track-actions button:hover:not(:disabled) {
  background: var(--audio-lime);
}

.track-actions button:disabled {
  cursor: default;
  opacity: 0.3;
}

.track-actions svg {
  width: 14px;
}

.cleanup-fieldset {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  border: 0;
}

.cleanup-fieldset legend,
.format-control label {
  margin-bottom: 10px;
  color: #57675f;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cleanup-option {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 26px;
  gap: 10px;
  align-items: center;
  min-height: 70px;
  padding: 13px 14px;
  border: 1px solid #ccd5cb;
  cursor: pointer;
  background: #f9faf6;
}

.cleanup-option:has(input:checked) {
  border-color: var(--audio-green);
  box-shadow: inset 3px 0 0 var(--audio-green);
  background: #fff;
}

.cleanup-option.featured:has(input:checked) {
  background: #eaf5cd;
}

.cleanup-option input {
  position: absolute;
  opacity: 0;
}

.cleanup-option strong,
.cleanup-option small,
.cleanup-option b {
  display: block;
}

.cleanup-option strong {
  font-size: 0.85rem;
}

.cleanup-option small {
  margin-top: 2px;
  color: #68766f;
  font-size: 0.68rem;
  line-height: 1.35;
}

.cleanup-option b {
  margin-bottom: 3px;
  color: var(--audio-green);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.52rem;
  letter-spacing: 0.08em;
}

.cleanup-option svg {
  width: 18px;
}

.format-control {
  margin-top: 22px;
}

.format-control label {
  display: block;
}

.format-control select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #bdc8bd;
  border-radius: 0;
  color: var(--audio-ink);
  font-family: "Manrope", sans-serif;
  font-weight: 600;
  background: white;
}

.export-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  padding: 14px 0;
  border-top: 1px solid #ccd5cb;
  color: #64736c;
  font-size: 0.75rem;
}

.export-summary span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.export-summary svg {
  width: 15px;
}

.export-summary strong {
  color: var(--audio-ink);
  font-family: "IBM Plex Mono", monospace;
}

.export-button {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border: 1px solid #102e24;
  color: white;
  cursor: pointer;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  background: var(--audio-green);
  box-shadow: 5px 5px 0 var(--audio-lime);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.export-button:hover:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--audio-lime);
}

.export-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.7);
  opacity: 0.48;
}

.export-button.is-processing svg {
  animation: audio-pulse 900ms ease-in-out infinite alternate;
}

@keyframes audio-pulse {
  to { transform: translateY(4px); opacity: 0.4; }
}

.editor-status {
  min-height: 20px;
  margin: 14px 0 0;
  color: #2f684b;
  font-size: 0.72rem;
  line-height: 1.45;
}

.editor-status.is-error {
  color: #a83c30;
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 9px 0 0;
  color: #728078;
  font-size: 0.65rem;
}

.privacy-note svg {
  width: 13px;
}

.audio-notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  padding-bottom: 80px;
}

.audio-notes article {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 16px;
}

.audio-notes article > span {
  color: var(--audio-green);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  font-weight: 600;
}

.audio-notes h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.audio-notes p {
  margin: 0;
  color: #607169;
  font-size: 0.78rem;
  line-height: 1.65;
}

.audio-seo {
  padding-bottom: 96px;
}

.audio-seo-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.65fr);
  gap: 24px 80px;
  padding: 52px 0;
  border-top: 1px solid #c8d0c5;
}

.audio-seo-intro .audio-kicker {
  grid-column: 1 / -1;
  margin: 0;
}

.audio-seo-intro h2 {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 4rem);
  letter-spacing: -0.055em;
  line-height: 1;
}

.audio-seo-intro > p:last-child {
  margin: 0;
  color: #53665d;
  line-height: 1.8;
}

.audio-answer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid #c8d0c5;
  background: #c8d0c5;
  gap: 1px;
}

.audio-answer-grid article {
  min-height: 240px;
  padding: 28px;
  background: #fbfcf8;
}

.audio-answer-grid article::before {
  display: block;
  width: 34px;
  height: 4px;
  margin-bottom: 54px;
  content: "";
  background: var(--audio-lime);
  box-shadow: 12px 0 0 var(--audio-green);
}

.audio-answer-grid h3,
.audio-faq h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.audio-answer-grid p,
.audio-faq p {
  margin: 0;
  color: #5c6f66;
  font-size: 0.79rem;
  line-height: 1.72;
}

.audio-faq {
  display: grid;
  grid-template-columns: 0.55fr 1fr;
  gap: 70px;
  margin-top: 72px;
}

.audio-faq-heading span {
  color: var(--audio-green);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.audio-faq-heading h2 {
  margin: 10px 0 0;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.audio-faq > div:last-child {
  border-top: 1px solid #c8d0c5;
}

.audio-faq article {
  padding: 22px 0;
  border-bottom: 1px solid #c8d0c5;
}

.dark-mode.audio-editor-page {
  --audio-ink: #eaf2e8;
  --audio-cream: #111914;
  --audio-line: #35443b;
  background-color: #111914;
}

.dark-mode .editor-panel,
.dark-mode .master-panel,
.dark-mode .audio-track,
.dark-mode .cleanup-option,
.dark-mode .format-control select,
.dark-mode .audio-answer-grid article {
  color: #eaf2e8;
  background: #18231d;
}

.dark-mode .audio-dropzone,
.dark-mode .track-order,
.dark-mode .track-actions button,
.dark-mode .trim-row input {
  color: #dfe9dd;
  background: #202d26;
}

.dark-mode .cleanup-option.featured:has(input:checked) {
  background: #28402e;
}

@media (max-width: 980px) {
  .audio-hero {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .signal-card {
    width: min(100%, 600px);
  }

  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .master-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 24px;
  }

  .master-panel .panel-heading,
  .master-panel .cleanup-fieldset {
    grid-column: 1 / -1;
  }

  .audio-seo-intro,
  .audio-faq {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 700px) {
  .audio-hero {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .audio-hero h1 {
    font-size: clamp(3rem, 16vw, 4.7rem);
  }

  .signal-card {
    min-height: 250px;
    padding: 18px;
    box-shadow: 9px 9px 0 var(--audio-lime);
  }

  .signal-bars {
    height: 155px;
  }

  .audio-workspace {
    width: calc(100% - 20px);
    padding: 6px;
  }

  .editor-panel,
  .master-panel {
    padding: 19px;
  }

  .master-panel {
    display: block;
  }

  .audio-track {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .track-title-row,
  .trim-row {
    grid-template-columns: 1fr;
  }

  .track-title-row audio {
    margin-top: 8px;
  }

  .trim-line {
    display: none;
  }

  .track-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 34px;
    border-top: 1px solid var(--audio-line);
    border-left: 0;
  }

  .track-actions button {
    border-right: 1px solid var(--audio-line);
    border-bottom: 0;
  }

  .format-control {
    margin-top: 24px;
  }

  .audio-notes {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .audio-answer-grid {
    grid-template-columns: 1fr;
  }

  .audio-answer-grid article {
    min-height: auto;
  }

  .audio-answer-grid article::before {
    margin-bottom: 28px;
  }
}
