/* Eftertimen · mobile-first. Små skærme er udgangspunktet; større skærme
   lægges på med min-width. Farver kommer fra tokens, så lys og mørk tilstand
   deler samme regler. */
@font-face {
  font-family: DM Sans;
  src: url(/dm-sans.woff2) format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}
:root {
  color-scheme: light dark;
  --ink: #142a2e;
  --muted: #4b6266;
  --teal: #13584f;
  --teal-soft: #e3efe9;
  --line: #d3dfdb;
  --field: #ffffff;
  --field-line: #94aaa5;
  --paper: #f6f8f5;
  --surface: #ffffff;
  --forest: #173c3d;
  --forest-line: #456263;
  --on-forest: #f2faf5;
  --on-forest-muted: #c6d9d4;
  --mint: #bce9c0;
  --mint-hover: #cdf3d0;
  --coral: #f3a689;
  --coral-ink: #5a2419;
  --coral-soft: #ffd2c4;
  --warn-bg: #f7ecce;
  --warn-line: #d6bd80;
  --warn-ink: #594521;
  --err-bg: #feede7;
  --err-ink: #6a2a20;
  --danger: #8e3426;
  --focus: #1f78a8;
  --shadow: 0 1px 2px rgb(20 42 46 / 6%), 0 12px 32px -12px rgb(20 42 46 / 22%);
  --radius: 14px;
  --gutter: clamp(16px, 4.5vw, 40px);
  --tabbar: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  font:
    16px/1.5 "DM Sans",
    system-ui,
    -apple-system,
    sans-serif;
  font-optical-sizing: auto;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8f1ee;
    --muted: #a5bab6;
    --teal: #8fd8bf;
    --teal-soft: #1b3436;
    --line: #2a4346;
    --field: #132527;
    --field-line: #4b6a6b;
    --paper: #0f1f21;
    --surface: #152a2c;
    --forest: #1c4446;
    --forest-line: #3f6668;
    --warn-bg: #3a3220;
    --warn-line: #6f5d33;
    --warn-ink: #f3e1b5;
    --err-bg: #3d221d;
    --err-ink: #ffd2c4;
    --danger: #ff9f88;
    --focus: #7cc4ef;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 14px 36px -14px rgb(0 0 0 / 60%);
  }
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100dvh;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: var(--teal);
  text-underline-offset: 3px;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}
button:disabled,
select:disabled,
input:disabled {
  opacity: 0.55;
  cursor: default;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}
input,
select {
  min-height: 48px;
  background: var(--field);
  border: 1px solid var(--field-line);
  border-radius: 8px;
  color: var(--ink);
  padding: 10px 13px;
  inline-size: 100%;
}
input::placeholder {
  color: var(--muted);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(2rem, 1.3rem + 3.4vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
  font-weight: 650;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.4rem);
  letter-spacing: -0.03em;
  line-height: 1.22;
}
h3 {
  font-size: 1.125rem;
  line-height: 1.3;
}
p,
li {
  text-wrap: pretty;
}
a,
button,
summary {
  font-weight: 600;
}
[hidden] {
  display: none !important;
}
.shell {
  inline-size: min(1160px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

/* ---------- Topbjælke og navigation ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-block-end: 1px solid var(--line);
  padding-block-start: env(safe-area-inset-top);
}
/* Sløret baggrund ligger på et pseudo-element. backdrop-filter på selve header
   ville gøre den til ramme for den faste fanebjælke på mobil. */
header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
}
.top {
  min-block-size: 58px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1.2rem;
  font-weight: 720;
  letter-spacing: -0.05em;
  text-decoration: none;
  color: var(--ink);
}
.brand img {
  inline-size: 30px;
  block-size: 30px;
}
.navicon {
  inline-size: 22px;
  block-size: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.navicon .fill {
  fill: currentColor;
  stroke: none;
}
/* Mobil: navigationen er en fast fanebjælke nederst, inden for tommelfingerens rækkevidde. */
nav {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--surface);
  border-block-start: 1px solid var(--line);
  padding-block-end: env(safe-area-inset-bottom);
  box-shadow: 0 -8px 24px -18px rgb(0 0 0 / 35%);
}
nav a,
nav button {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  min-block-size: var(--tabbar);
  text-decoration: none;
  font-size: 0.75rem;
  color: var(--muted);
  position: relative;
}
nav a[aria-current="page"] {
  color: var(--ink);
}
nav a[aria-current="page"]::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inline-size: 32px;
  block-size: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--teal);
}
.navask .navicon {
  color: var(--teal);
}
.settings {
  margin-inline-start: auto;
  display: flex;
  gap: 8px;
  min-block-size: 44px;
  min-inline-size: 44px;
  justify-content: center;
  align-items: center;
  color: var(--muted);
  font-size: 0.875rem;
}
.settings > span:not(.localdot) {
  display: none;
}
.localdot,
.lamp {
  inline-size: 8px;
  block-size: 8px;
  background: #568466;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}
main {
  padding-block-end: calc(var(--tabbar) + 40px + env(safe-area-inset-bottom));
}

/* ---------- Sideoverskrifter ---------- */
.headline {
  margin-block: 28px 22px;
}
.eyebrow {
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: var(--teal);
  margin-block-end: 8px;
}
.twocol {
  display: grid;
  gap: 28px;
  padding-block-end: 30px;
}
.maincol,
aside {
  min-inline-size: 0;
}

/* ---------- Optager ---------- */
.recorder {
  background: var(--forest);
  color: var(--on-forest);
  border-radius: var(--radius);
  overflow: hidden;
  padding-inline: 16px;
  box-shadow: var(--shadow);
}
.recbar,
.transport,
.sectionline,
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.recbar {
  justify-content: space-between;
  padding-block: 16px 12px;
  border-block-end: 1px solid var(--forest-line);
  font-size: 0.875rem;
}
.recstatus {
  display: flex;
  align-items: center;
  gap: 9px;
}
.lamp {
  background: #bddacb;
}
.lamp.live {
  background: #ff967d;
  box-shadow: 0 0 0 4px rgb(255 150 125 / 30%);
  animation: pulse 1.6s var(--ease) infinite;
}
@keyframes pulse {
  50% {
    box-shadow: 0 0 0 7px rgb(255 150 125 / 0%);
  }
}
time,
.timecode,
.timebtn,
.source {
  font-variant-numeric: tabular-nums;
}
.recbar time {
  color: var(--on-forest-muted);
}
.monitor {
  display: grid;
  place-items: center;
  min-block-size: 150px;
  text-align: center;
}
.monitor #placeholder {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding-block: 18px;
  color: #d4ede2;
}
.monitor strong {
  font-size: 1.125rem;
  color: var(--on-forest);
  font-weight: 600;
  margin-block-start: 3px;
}
.monitor span {
  font-size: 0.875rem;
  color: var(--on-forest-muted);
}
.monitor video {
  inline-size: 100%;
  aspect-ratio: 16 / 9;
  max-block-size: 260px;
  object-fit: contain;
}
.transport {
  padding-block: 14px 16px;
  border-block-start: 1px solid var(--forest-line);
}
.record,
.secondary,
.buttonlike,
.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 18px;
  border-radius: 999px;
  min-block-size: 48px;
  font-weight: 650;
  text-decoration: none;
  transition:
    background-color 0.15s,
    transform 0.15s var(--ease);
}
.record:active,
.secondary:active,
.buttonlike:active,
.action:active {
  transform: scale(0.98);
}
.record {
  background: var(--mint);
  color: #173b35;
  min-inline-size: 112px;
}
.record:hover {
  background: var(--mint-hover);
}
.record.islive {
  background: var(--coral-soft);
  color: var(--coral-ink);
}
.recordglyph {
  inline-size: 13px;
  block-size: 13px;
  border-radius: 50%;
  background: currentColor;
  transition: border-radius 0.2s;
}
.record.islive .recordglyph {
  border-radius: 3px;
}
.meter {
  margin-inline-start: auto;
  color: var(--on-forest-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
}
.meter meter {
  inline-size: 48px;
  block-size: 9px;
  accent-color: var(--mint);
}
.bookmark {
  color: var(--on-forest);
  font-size: 0.8125rem;
  min-block-size: 44px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.captureMeta {
  margin-block-start: 22px;
}
label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
}
label span {
  font-weight: 400;
  color: var(--muted);
  margin-inline-start: 4px;
}
.captureMeta input,
.fields select,
.fields input,
.filters input,
.filters select,
.loginForm input,
.keyform input {
  margin-block-start: 6px;
}
.captureMeta details {
  margin-block-start: 12px;
}
summary {
  cursor: pointer;
  min-block-size: 44px;
  padding-block: 9px;
  color: var(--teal);
  font-size: 0.875rem;
}
.fields {
  display: grid;
  gap: 14px;
}
.setupBox {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--teal-soft);
  margin-block-end: 24px;
}
.setupBox p {
  color: var(--muted);
  margin-block: 8px 13px;
  font-size: 0.9375rem;
}
.setupBox .small {
  font-size: 0.8125rem;
  margin: 6px 0 0;
}
.secondary,
.buttonlike {
  background: var(--teal);
  color: var(--paper);
}
.action,
.buttonlike.light {
  background: var(--surface);
  border: 1px solid var(--field-line);
  color: var(--ink);
}
progress {
  inline-size: 100%;
  accent-color: var(--teal);
}

/* ---------- Lister ---------- */
.sectionline {
  justify-content: space-between;
  align-items: baseline;
  margin-block: 3px 10px;
}
.sectionline h2 {
  font-size: 1.2rem;
}
.sectionline a {
  font-size: 0.875rem;
  padding: 10px 0;
}
.empty {
  padding-block: 18px;
  color: var(--muted);
  border-block-start: 1px solid var(--line);
  font-size: 0.9375rem;
}
.empty strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  margin-block-end: 4px;
}
.row {
  display: flex;
  inline-size: 100%;
  gap: 14px;
  text-align: start;
  align-items: center;
  border-block-start: 1px solid var(--line);
  padding-block: 14px;
  text-decoration: none;
  color: var(--ink);
  min-block-size: 64px;
}
@media (hover: hover) {
  .row:hover .rowTitle {
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}
.rowmark {
  block-size: 38px;
  inline-size: 34px;
  flex: none;
  border-radius: 8px;
  background: var(--teal-soft);
  display: grid;
  place-items: center;
  color: var(--teal);
}
.rowtext {
  min-inline-size: 0;
  flex: 1;
}
.rowTitle {
  font-size: 1rem;
  display: block;
  font-weight: 620;
  overflow-wrap: anywhere;
  letter-spacing: -0.015em;
}
.subline,
.row small,
.small {
  display: block;
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 450;
}
.row .arrow {
  color: var(--teal);
  font-size: 1.3rem;
}
.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-block: 16px 26px;
}
.filters label:first-child {
  grid-column: 1 / -1;
}
.groupHeading {
  color: var(--teal);
  margin-block: 24px 8px;
  font-size: 1.2rem;
}

/* ---------- Beskeder ---------- */
.notice {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  color: var(--warn-ink);
  border-radius: 10px;
  padding: 12px 15px;
  margin-block-start: 15px;
}
.notice.calm {
  background: var(--teal-soft);
  border-color: var(--line);
  color: var(--ink);
}
.notice.error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--err-bg);
  border-color: transparent;
  color: var(--err-ink);
  gap: 16px;
}
.notice.error button {
  font-size: 1.4rem;
  min-inline-size: 44px;
  min-block-size: 44px;
}
.reading {
  max-inline-size: 72ch;
  margin-block-end: 45px;
}
.reading h2 {
  margin-block: 30px 9px;
}
.reading p {
  margin-block: 8px 12px;
}
.reading code {
  overflow-wrap: anywhere;
  font-size: 0.8125rem;
}
.keystatus {
  font-weight: 600;
}
.keystatus[data-ready="true"]::before {
  content: "";
  display: inline-block;
  inline-size: 8px;
  block-size: 8px;
  border-radius: 50%;
  background: #4f9a6c;
  margin-inline-end: 8px;
  vertical-align: middle;
}
.keyform .inline,
.loginForm {
  display: grid;
  gap: 10px;
}
.loginForm {
  max-inline-size: 420px;
  padding-block-end: 40px;
}
.danger {
  color: var(--danger);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding-block: 10px;
  min-block-size: 44px;
}

/* ---------- Forelæsning ---------- */
.back {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  margin-block: 14px 8px;
}
.detailtitle {
  max-inline-size: 960px;
}
.detailtitle h1 {
  font-size: clamp(1.8rem, 1.2rem + 3vw, 3rem);
  overflow-wrap: anywhere;
}
.detailtitle .eyebrow {
  margin-block-end: 8px;
}
.detailtitle .tags {
  color: var(--muted);
  margin-block-start: 9px;
  font-size: 0.875rem;
}
.askbtn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-block-start: 18px;
  padding: 10px 20px 10px 14px;
  min-block-size: 48px;
  border-radius: 999px;
  background: var(--forest);
  color: var(--on-forest);
  box-shadow: var(--shadow);
}
.askbtn:hover {
  background: color-mix(in srgb, var(--forest) 88%, white);
}
/* Fanerne kan rulles vandret på smalle skærme i stedet for at bryde over flere linjer. */
.tabbar {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scrollbar-width: none;
  border-block-end: 1px solid var(--line);
  margin-block: 22px;
  margin-inline: calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
  scroll-padding-inline: var(--gutter);
}
.tabbar::-webkit-scrollbar {
  display: none;
}
.tabbar button {
  flex: none;
  padding-block: 12px 10px;
  border-block-end: 3px solid transparent;
  color: var(--muted);
  min-block-size: 46px;
}
.tabbar button[aria-pressed="true"] {
  border-color: var(--teal);
  color: var(--ink);
}
.sheet {
  max-inline-size: 72ch;
}
.sheet section {
  margin-block: 22px;
}
.sheet h2 {
  margin-block-end: 10px;
}
.sheet p,
.sheet li {
  margin-block: 7px;
}
.sheet ol {
  padding-inline-start: 23px;
}
.sheet li {
  padding-inline-start: 4px;
}
.sheet .lead {
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.4rem);
  letter-spacing: -0.02em;
  line-height: 1.45;
}
.source,
.timebtn {
  display: inline-flex;
  align-items: center;
  color: var(--teal);
  border-radius: 6px;
  font-size: 0.8125rem;
  background: var(--teal-soft);
  padding: 4px 9px;
  min-block-size: 32px;
  vertical-align: baseline;
}
.sheet details,
.settingsFoot {
  border-block-start: 1px solid var(--line);
  padding-block: 5px;
}
.sheet summary {
  font-size: 1rem;
}
.statusblock {
  padding-block: 20px;
  border-block-end: 1px solid var(--line);
  margin-block: 15px;
}
.statusblock p {
  margin-block: 7px 14px;
}
.actions {
  margin-block: 16px;
}
.graphic {
  inline-size: 100%;
  max-inline-size: 800px;
  block-size: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}
.audioBlock {
  background: var(--forest);
  color: var(--on-forest);
  padding: 22px;
  border-radius: var(--radius);
  margin-block: 14px;
  max-inline-size: 790px;
}
.audioBlock h2 {
  margin-block-end: 15px;
}
.audioBlock audio {
  inline-size: 100%;
}
.audioBlock label {
  color: var(--on-forest-muted);
  margin-block-start: 10px;
}
.audioBlock select {
  inline-size: auto;
  margin-inline-start: 10px;
  font-size: 0.875rem;
  min-block-size: 40px;
}
.videoPlayer {
  inline-size: 100%;
  max-inline-size: 900px;
  max-block-size: 62vh;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: #18282d;
  display: block;
}
.transcript {
  list-style: none;
  padding: 0;
}
.transcript li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  border-block-start: 1px solid var(--line);
  padding-block: 9px;
}
.timebtn {
  flex: none;
}
.slides {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.slides button {
  text-align: start;
}
.slides img {
  inline-size: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: block;
}
.settingsFoot {
  margin-block: 35px;
}
.detailsEdit {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-block: 12px;
}
.detailsEdit label {
  min-inline-size: 160px;
  flex: 1;
}
.excerpt {
  color: var(--teal);
  font-size: 0.875rem;
  font-weight: 450;
  margin-block-start: 5px;
  display: block;
}
.searchread {
  max-inline-size: 650px;
}
.hint {
  font-size: 0.875rem;
  color: var(--muted);
}
.icon {
  inline-size: 17px;
  block-size: 17px;
  display: inline-block;
}
.padded {
  margin-block-start: 12px;
}
.hideText {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

/* ---------- Toast, spring-link og samtale-pille ---------- */
.toast {
  position: fixed;
  inset-block-end: calc(var(--tabbar) + 14px + env(safe-area-inset-bottom));
  inset-inline: 16px;
  margin-inline: auto;
  inline-size: fit-content;
  max-inline-size: calc(100% - 32px);
  z-index: 30;
  pointer-events: none;
  border-radius: 10px;
  background: var(--forest);
  color: var(--on-forest);
  font-size: 0.875rem;
}
.toast:not(:empty) {
  padding: 10px 14px;
  box-shadow: var(--shadow);
}
.skip {
  position: absolute;
  inset-inline-start: 8px;
  inset-block-start: -80px;
  background: var(--surface);
  padding: 10px;
  z-index: 50;
}
.skip:focus {
  inset-block-start: 8px;
}
.livepill {
  position: fixed;
  z-index: 25;
  inset-inline-end: 16px;
  inset-block-end: calc(var(--tabbar) + 14px + env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-block-size: 48px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--forest);
  color: var(--on-forest);
  box-shadow: var(--shadow);
}

/* ---------- Samtalepanelet ---------- */
/* Bundark på mobil, flydende panel på større skærme. <dialog> giver fokusfælde og Esc. */
.voice {
  inline-size: 100%;
  max-inline-size: 100%;
  max-block-size: min(92dvh, 760px);
  margin: auto auto 0;
  padding: 18px var(--gutter) calc(18px + env(safe-area-inset-bottom));
  border: 0;
  border-radius: 22px 22px 0 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
  gap: 14px;
  overscroll-behavior: contain;
}
.voice[open] {
  display: flex;
  animation: rise 0.28s var(--ease);
}
.voice::backdrop {
  background: rgb(8 20 22 / 55%);
  backdrop-filter: blur(3px);
}
@keyframes rise {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
}
.voicehead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.voicehead h2 {
  overflow-wrap: anywhere;
}
.voicehead .eyebrow {
  margin-block-end: 4px;
}
.iconbtn {
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  border-radius: 50%;
  flex: none;
  color: var(--muted);
  background: var(--teal-soft);
}
.stage {
  --lvl: 0;
  background: var(--forest);
  color: var(--on-forest);
  border-radius: var(--radius);
  padding: 22px 18px 18px;
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}
.stage p {
  min-block-size: 1.5em;
  color: var(--on-forest);
  font-weight: 550;
}
.stage[data-state="error"] p {
  color: var(--coral-soft);
}
/* Bølgen tegnes af syv streger, hvis højde følger lydniveauet via --lvl. */
.wave {
  display: flex;
  align-items: center;
  gap: 6px;
  block-size: 64px;
}
.wave i {
  inline-size: 7px;
  block-size: 100%;
  border-radius: 7px;
  background: var(--mint);
  transform: scaleY(calc(0.14 + var(--lvl) * var(--k, 1)));
  transition:
    transform 0.09s linear,
    background-color 0.3s;
}
.wave i:nth-child(1),
.wave i:nth-child(7) {
  --k: 0.35;
}
.wave i:nth-child(2),
.wave i:nth-child(6) {
  --k: 0.6;
}
.wave i:nth-child(3),
.wave i:nth-child(5) {
  --k: 0.85;
}
.stage[data-state="speaking"] .wave i {
  background: var(--coral);
}
.stage[data-state="idle"] .wave i,
.stage[data-state="error"] .wave i {
  opacity: 0.55;
}
.stage[data-state="connecting"] .wave i {
  animation: breathe 1.2s var(--ease) infinite;
}
.wave i:nth-child(2) {
  animation-delay: 0.1s !important;
}
.wave i:nth-child(3) {
  animation-delay: 0.2s !important;
}
.wave i:nth-child(4) {
  animation-delay: 0.3s !important;
}
.wave i:nth-child(5) {
  animation-delay: 0.4s !important;
}
.wave i:nth-child(6) {
  animation-delay: 0.5s !important;
}
.wave i:nth-child(7) {
  animation-delay: 0.6s !important;
}
@keyframes breathe {
  50% {
    transform: scaleY(0.45);
  }
}
.wave.mini {
  block-size: 18px;
  gap: 3px;
}
.wave.mini i {
  inline-size: 3px;
  transform: none;
}
.wave.mini i:nth-child(odd) {
  block-size: 55%;
}
.voicelog {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1 1 auto;
  min-block-size: 0;
  max-block-size: 38dvh;
  display: grid;
  gap: 10px;
  align-content: start;
}
.voicelog:empty {
  display: none;
}
.voicelog li {
  max-inline-size: 88%;
  padding: 10px 14px;
  border-radius: 16px;
  line-height: 1.45;
}
.voicelog .who {
  display: block;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--muted);
  margin-block-end: 2px;
}
.voicelog .you {
  justify-self: end;
  background: var(--teal-soft);
  border-end-end-radius: 4px;
}
.voicelog .noor {
  justify-self: start;
  border: 1px solid var(--line);
  border-end-start-radius: 4px;
}
.voicelog .timebtn {
  margin-inline: 2px;
}
.voicebar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.voicebar .record {
  flex: 1 1 200px;
}
.voicebar .action {
  flex: 1 1 160px;
}
.fine {
  font-size: 0.8125rem;
}

/* ---------- Optagekilde og lydafspiller i skyen ---------- */
.sources {
  border: 0;
  padding: 0;
  margin: 0 0 16px;
  gap: 10px;
}
.cloud .sources {
  display: grid;
}
.sources legend {
  font-weight: 650;
  font-size: 0.875rem;
  margin-block-end: 8px;
  padding: 0;
}
.source-opt {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  font-weight: 400;
}
.source-opt:has(input:checked) {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1px var(--teal);
}
.source-opt input {
  inline-size: 20px;
  block-size: 20px;
  min-block-size: 0;
  margin: 2px 0 0;
  accent-color: var(--teal);
  flex: none;
}
.source-opt span {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}
.source-opt strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
}
.segplayer {
  background: var(--forest);
  color: var(--on-forest);
  border-radius: var(--radius);
  padding: 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px 16px;
  max-inline-size: 790px;
}
.segplayer .playbtn {
  inline-size: 56px;
  block-size: 56px;
  border-radius: 50%;
  background: var(--mint);
  color: #173b35;
  display: grid;
  place-items: center;
}
.segplayer .playbtn svg {
  inline-size: 22px;
  block-size: 22px;
  fill: currentColor;
}
.segplayer input[type="range"] {
  inline-size: 100%;
  min-block-size: 44px;
  padding: 0;
  border: 0;
  background: none;
  accent-color: var(--mint);
}
.segplayer .segrow {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
  color: var(--on-forest-muted);
}
.segplayer select {
  inline-size: auto;
  min-block-size: 40px;
  font-size: 0.875rem;
}

/* ---------- Sky-tilstand ---------- */
.cloudonly {
  display: none;
}
.cloud .cloudonly {
  display: block;
}
.cloud .localonly,
.cloud #modelCard,
.cloud #keyForm,
.cloud #removeKey,
.cloud #voiceKeyForm {
  display: none !important;
}

/* ---------- Større skærme ---------- */
@media (min-width: 560px) {
  .fields {
    grid-template-columns: 1fr 1fr;
  }
  .keyform .inline {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
  .meter meter {
    inline-size: 72px;
  }
  .recorder {
    padding-inline: 24px;
  }
  .voice {
    inline-size: min(560px, 100% - 32px);
    margin: auto;
    border-radius: 22px;
    padding: 22px 24px;
  }
}
@media (min-width: 760px) {
  :root {
    --tabbar: 0px;
  }
  .top {
    min-block-size: 70px;
    gap: 36px;
  }
  .brand {
    font-size: 1.4rem;
  }
  .brand img {
    inline-size: 34px;
    block-size: 34px;
  }
  /* Navigationen flytter op i topbjælken. */
  nav {
    position: static;
    display: flex;
    gap: 26px;
    align-self: stretch;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
  }
  nav a {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 0.9375rem;
    min-block-size: 0;
  }
  nav a .navicon {
    display: none;
  }
  nav a[aria-current="page"]::before {
    inset-block: auto 0;
    inset-inline: 0;
    inline-size: auto;
    border-radius: 3px 3px 0 0;
  }
  nav .navask {
    display: flex;
    align-self: center;
    gap: 8px;
    min-block-size: 42px;
    padding: 8px 16px 8px 12px;
    border-radius: 999px;
    background: var(--forest);
    color: var(--on-forest);
    font-size: 0.9375rem;
  }
  nav .navask .navicon {
    color: var(--mint);
    inline-size: 18px;
    block-size: 18px;
  }
  .settings > span:not(.localdot) {
    display: inline;
  }
  .headline {
    margin-block: 44px 28px;
  }
  .twocol {
    grid-template-columns: minmax(0, 1.7fr) minmax(270px, 1fr);
    gap: clamp(28px, 4.2vw, 60px);
  }
  .monitor {
    min-block-size: 180px;
  }
  .filters {
    grid-template-columns: 2fr 1fr 1.05fr 0.9fr;
    gap: 14px;
  }
  .filters label:first-child {
    grid-column: auto;
  }
  .tabbar {
    margin-inline: 0;
    padding-inline: 0;
  }
  .back {
    margin-block: 24px 12px;
  }
  .toast {
    inset-inline: auto 20px;
  }
  .livepill {
    inset-inline-end: 24px;
  }
}
@media (min-width: 1000px) {
  .voice {
    inline-size: 600px;
  }
}

/* ---------- Bevægelse og præferencer ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .wave i {
    transform: scaleY(0.4);
  }
}
@media (forced-colors: active) {
  .wave i,
  .lamp,
  .localdot {
    background: CanvasText;
  }
  .record,
  .secondary,
  .action,
  .askbtn,
  .livepill {
    border: 1px solid ButtonText;
  }
}
@media print {
  header,
  nav,
  .tabbar,
  .actions,
  .settingsFoot,
  .livepill,
  .toast {
    display: none !important;
  }
  main {
    padding: 0;
  }
}

/* ---------- Næste time og skema ---------- */
/* Ét tydeligt næste skridt øverst på Optag. */
.nextup {
  margin-block-end: 18px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--forest);
  color: var(--on-forest);
  box-shadow: var(--shadow);
}
.nextup h2 {
  margin: 0 0 6px;
  font-size: clamp(1.25rem, 1.05rem + 1vw, 1.6rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.nextup p {
  margin: 0 0 12px;
  color: var(--on-forest-muted);
  max-inline-size: 52ch;
}
.nextup .eyebrow {
  color: var(--mint);
  margin-block-end: 4px;
}
.nextup .nextstate {
  color: var(--on-forest);
  font-weight: 560;
}
.nextup .nextstate:empty,
.nextup .nextwhere:empty {
  display: none;
}
.nextup.armed {
  outline: 3px solid var(--mint);
  outline-offset: -3px;
}
.nextactions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}
.linkish {
  min-block-size: 44px;
  padding: 0 2px;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  font-weight: 560;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.linkish.danger {
  color: var(--danger);
}
.plandialog {
  inline-size: min(100%, 560px);
  max-inline-size: 100%;
  max-block-size: min(92dvh, 820px);
  margin: auto auto 0;
  padding: 18px var(--gutter) calc(22px + env(safe-area-inset-bottom));
  border: 0;
  border-radius: 22px 22px 0 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  overscroll-behavior: contain;
}
.plandialog::backdrop {
  background: rgb(8 20 22 / 55%);
}
.plandialog section + section {
  margin-block-start: 22px;
  padding-block-start: 18px;
  border-block-start: 1px solid var(--line);
}
.plandialog h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
}
.planhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-block-end: 10px;
}
.planhead h2 {
  margin: 0;
}
.steps {
  margin: 0 0 12px;
  padding-inline-start: 1.3em;
  display: grid;
  gap: 4px;
}
.planform {
  display: grid;
  gap: 8px;
}
.planform input {
  inline-size: 100%;
}
.filelink {
  color: var(--teal);
  text-decoration: underline;
  cursor: pointer;
}
.pushrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.courselist {
  display: grid;
  gap: 2px;
  margin-block-end: 16px;
}
.courselist label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-block-size: 44px;
}
.courselist input {
  inline-size: 22px;
  block-size: 22px;
  accent-color: var(--teal);
}
.eventlist {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.eventlist li {
  display: grid;
  grid-template-columns: 8.5em 1fr;
  gap: 2px 12px;
  font-size: 0.94rem;
}
.eventlist li.off {
  opacity: 0.55;
}
.eventlist time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
@media (min-width: 760px) {
  .plandialog {
    margin: auto;
    border-radius: 22px;
  }
}
.filelink {
  display: inline;
  font-weight: 560;
}
#importBox > summary {
  cursor: pointer;
  list-style-position: outside;
}
#importBox > summary h3 {
  display: inline;
}
#importBox[open] > summary {
  margin-block-end: 8px;
}
