:root {
  font:
    16px/1.5 "DM Sans",
    system-ui,
    sans-serif;
  color: #252d29;
  background: #f7f6f2;
  --green: #375640;
  --rust: #a7432d;
  --muted: #596258;
  --line: #dadecf;
  --cream: #eef0e6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header,
main {
  max-width: 1100px;
  margin: auto;
  padding: 0 clamp(18px, 4vw, 48px);
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
header a {
  font-size: 0.875rem;
  color: var(--green);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  letter-spacing: 0.12em;
}
.mark {
  display: flex;
  align-items: center;
  gap: 2px;
  border-radius: 9px;
  background: var(--green);
  height: 34px;
  padding: 0 8px;
}
.mark i {
  width: 2px;
  height: 9px;
  background: #faf8ea;
  border-radius: 1px;
}
.mark i:nth-child(2),
.mark i:nth-child(4) {
  height: 17px;
}
.mark i:nth-child(3) {
  height: 23px;
}
.hero {
  margin: clamp(30px, 6vw, 65px) 0 24px;
}
.kicker {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  color: var(--green);
  margin: 0 0 8px;
}
h1 {
  font:
    500 clamp(2.65rem, 6vw, 4.5rem)/1.06 Georgia,
    serif;
  letter-spacing: -0.055em;
  margin: 0 0 12px;
}
h2 {
  font-size: 1.16rem;
  line-height: 1.3;
  letter-spacing: -0.025em;
  margin: 0;
}
p {
  margin: 0.4rem 0;
  color: var(--muted);
}
.hero p:last-child {
  max-width: 610px;
}
.import,
.panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(16px, 3vw, 26px);
}
.import {
  background: #eaf0e7;
  border: 1px dashed #849781;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 14px 24px;
}
.import.drag {
  outline: 3px solid var(--green);
}
.import small {
  grid-column: 1/-1;
  color: var(--muted);
}
.import p,
.export p {
  font-size: 0.91rem;
  max-width: 660px;
}
.panel {
  background: white;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(210px, 0.73fr) minmax(0, 1.55fr);
  gap: 16px;
}
.action,
button {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
  border-radius: 10px;
  min-height: 44px;
  padding: 10px 17px;
  border: 1px solid transparent;
  background: var(--green);
  color: white;
}
.pick {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pick input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
}
.pick:focus-within,
:focus-visible {
  outline: 3px solid #a86219;
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
#total {
  font-size: 0.85rem;
  background: var(--cream);
  padding: 2px 7px;
  border-radius: 6px;
}
#list {
  margin-top: 16px;
  max-height: 410px;
  overflow: auto;
}
.row {
  display: block;
  text-align: left;
  width: 100%;
  margin-bottom: 4px;
  background: transparent;
  color: inherit;
  padding: 9px;
  overflow-wrap: anywhere;
}
.row small {
  display: block;
  color: var(--muted);
  font-weight: 400;
}
.row[aria-current="true"] {
  background: var(--cream);
  border-color: #c8d2c0;
}
.editor {
  min-height: 250px;
}
.editor label {
  display: block;
  font-weight: 650;
  margin: 15px 0 6px;
}
.editor h2 {
  overflow-wrap: anywhere;
}
.editor textarea {
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  border: 1px solid #aeb7a8;
  font:
    1.1rem/1.6 system-ui,
    sans-serif;
  resize: vertical;
}
audio {
  display: block;
  width: 100%;
  margin-top: 13px;
}
button.subtle {
  background: transparent;
  color: var(--muted);
}
.controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}
.initial {
  display: block;
  font:
    2.7rem/1.5 Georgia,
    serif;
  color: var(--rust);
}
#empty {
  max-width: 370px;
  margin: 10px auto;
  padding: 8px;
}
.feedback {
  white-space: pre-line;
  overflow-wrap: anywhere;
  font-size: 0.91rem;
  color: #7d3526;
  margin: 11px 0;
}
.feedback:empty {
  margin: 16px 0;
}
.export {
  margin: 16px 0 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.export button {
  background: var(--rust);
  flex-shrink: 0;
}
#summary {
  color: var(--green);
  font-weight: 650;
}
[hidden] {
  display: none !important;
}
@media (max-width: 680px) {
  header {
    height: 62px;
  }
  .workspace,
  .import {
    grid-template-columns: minmax(0, 1fr);
  }
  .import {
    gap: 10px;
  }
  .export {
    display: grid;
  }
  .queue #list {
    max-height: 185px;
  }
  .hero {
    margin-top: 32px;
  }
  .editor {
    min-height: 180px;
  }
}

.import-card { display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
.import-card > .pick, .import-card .controls { margin-top:auto; }
.import-card p { margin-bottom:10px; }
.secondary { background:white; border-color:#aeb9aa; color:var(--green); }
.editor .pick { display:inline-flex; margin:0; }
#link-source { max-width:100%; min-height:44px; padding:8px; color:var(--green); background:white; border:1px solid #aeb9aa; border-radius:8px; font:inherit; }
#link-pair { margin:14px 0; }
dialog { width:min(520px, calc(100% - 32px)); border:1px solid var(--line); border-radius:16px; padding:24px; color:inherit; }
dialog::backdrop { background:rgba(26,36,29,.45); }
dialog label { display:block; font-weight:650; margin:12px 0 6px; }
dialog textarea { width:100%; font:1.1rem/1.6 system-ui,sans-serif; padding:12px; border:1px solid #aeb9aa; border-radius:10px; resize:vertical; }
header nav { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:3px 15px; }
#stimme, #drop { scroll-margin-top:16px; }
.speech { margin:16px 0 50px; }
.export { margin-bottom:16px; }
.speech details { margin:12px 0; }
.speech summary { cursor:pointer; color:var(--green); font-weight:650; }
.speech a { color:var(--green); }
.speech form label { display:block; font-weight:650; margin:12px 0 6px; }
.speech textarea { width:100%; padding:12px; border-radius:10px; border:1px solid #aeb9aa; font:1.1rem/1.6 system-ui,sans-serif; }
#speech-result a { display:inline-block; margin-top:8px; }
