/* The page of the score video server: a calm dark theme in the score bug's navy, white and light
   blue. System fonts only; the Content-Security-Policy allows nothing from other origins. */

:root {
  color-scheme: dark;
  --navy: #0a1638;
  --bg: #071029;
  --panel: #0c1a40;
  --surface: #10204b;
  --surface-hover: #172b5f;
  --field: #08132f;
  --line: #20366a;
  --line-strong: #2f4b89;
  --text: #eef3fb;
  --muted: #a6b6d6;
  --accent: #7fd0ff;
  --accent-strong: #b5e5ff;
  --accent-ink: #04132e;
  --accent-soft: rgb(127 208 255 / 12%);
  --ok-text: #b9f3d2;
  --ok-bg: #0d3527;
  --ok-line: #2b7a57;
  --warn-text: #ffe8a8;
  --warn-bg: #352a0b;
  --warn-line: #9a7a25;
  --danger-text: #ffd6dd;
  --danger-bg: #3d1121;
  --danger-line: #a63c59;
  --radius: 12px;
  --radius-small: 8px;
  --condensed:
    "Avenir Next Condensed", "Arial Narrow", "Roboto Condensed",
    sans-serif-condensed, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-padding-top: 16px;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(1100px 420px at 50% -180px, #13286070, transparent 70%),
    var(--bg);
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-strong);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

button,
input {
  font: inherit;
}

p {
  margin: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 30;
  padding: 8px 14px;
  border-radius: var(--radius-small);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
}

.muted {
  color: var(--muted);
}

.hint {
  color: var(--muted);
  font-size: 0.875rem;
}

/* Layout ------------------------------------------------------------------------------------ */

.page {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px 32px;
}

@media (min-width: 720px) {
  .page {
    padding: 0 24px 40px;
  }
}

.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "brand account"
    "jump jump";
  align-items: center;
  gap: 14px 16px;
  padding: 22px 0 18px;
}

.brand {
  grid-area: brand;
  min-width: 0;
}

.title {
  display: inline-flex;
  margin: 0;
  font: italic 700 clamp(1.75rem, 5vw, 2.25rem) / 1 var(--condensed);
  font-stretch: condensed;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  filter: drop-shadow(0 4px 5px rgb(0 0 0 / 45%));
}

.title-name {
  padding: 0.2em 0.45em 0.14em 0.5em;
  border: 1px solid #1d3170;
  border-right: 0;
  background: var(--navy);
  color: #fff;
  box-shadow: inset -5px 0 0 #e8eef9;
}

.title-box {
  padding: 0.2em 0.45em 0.14em;
  background: var(--accent);
  color: var(--navy);
}

.subtitle {
  margin-top: 10px;
  color: var(--muted);
}

.account {
  grid-area: account;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px 14px;
  font-size: 0.9375rem;
}

.account-name {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.jump {
  grid-area: jump;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.jump a {
  display: inline-flex;
  align-items: center;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
}

.jump a:hover {
  border-bottom-color: var(--accent);
  color: var(--text);
}

.jump-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.45em;
  height: 1.45em;
  margin-left: 6px;
  padding: 0 0.35em;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.75rem;
  font-weight: 800;
}

@media (max-width: 599px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "account"
      "brand"
      "jump";
    gap: 12px;
    padding-top: 14px;
  }

  .account {
    font-size: 0.875rem;
  }
}

main {
  display: grid;
  gap: 20px;
}

main:focus {
  outline: none;
}

.workflow,
.side {
  display: grid;
  gap: 20px;
  align-items: start;
  min-width: 0;
}

@media (min-width: 980px) {
  .workflow {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  container-type: inline-size;
}

@media (max-width: 599px) {
  .panel {
    padding: 16px;
  }
}

.panel h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.2;
}

/* As tall as a heading row with a button, so the columns' headings line up. */
.panel > h2 {
  min-height: 36px;
  margin-bottom: 16px;
}

.panel h2:focus {
  outline: none;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 16px;
}

.panel-meta {
  color: var(--muted);
  font-size: 0.875rem;
}

.step {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.875rem;
  font-weight: 800;
}

.site-footer {
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.8125rem;
  text-align: center;
}

/* Controls ---------------------------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}

.button:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--surface-hover);
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button--small {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 0.9375rem;
}

.button--primary {
  min-width: 12rem;
  min-height: 46px;
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
}

.button--primary:hover:not(:disabled) {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.button--danger {
  border-color: var(--danger-line);
  background: transparent;
  color: var(--danger-text);
}

.button--danger:hover:not(:disabled) {
  border-color: #d4607d;
  background: var(--danger-bg);
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.link-button:hover {
  color: var(--accent-strong);
}

input[type="text"] {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--field);
  color: var(--text);
}

input[type="text"]::placeholder {
  color: #8798bd;
}

input[type="text"]:focus-visible {
  border-color: var(--accent);
  outline-offset: 1px;
}

input[aria-invalid="true"] {
  border-color: var(--danger-line);
}

input[type="color"] {
  width: 48px;
  height: 42px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--field);
  cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 4px;
}

input[type="color"]::-moz-color-swatch {
  border: 0;
  border-radius: 4px;
}

/* Boxes for warnings (yellow) and problems (red) -------------------------------------------- */

.box {
  padding: 12px 14px;
  border: 1px solid;
  border-left-width: 4px;
  border-radius: var(--radius-small);
  overflow-wrap: anywhere;
}

.box--compact {
  margin-bottom: 12px;
  padding: 8px 12px;
  font-size: 0.875rem;
}

.box--warning {
  border-color: var(--warn-line);
  background: var(--warn-bg);
  color: var(--warn-text);
}

.box--problem {
  border-color: var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger-text);
}

.box-title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
}

.box-list {
  margin: 0;
  padding-left: 1.2em;
}

.box-list li + li {
  margin-top: 4px;
}

.box-code {
  margin-top: 6px;
  font-size: 0.8125rem;
  opacity: 0.85;
}

/* 1 Spiel wählen ---------------------------------------------------------------------------- */

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tabs:empty {
  display: none;
}

.tab {
  display: grid;
  align-content: start;
  gap: 1px;
  min-width: 0;
  padding: 7px 14px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.tab:hover {
  background: var(--surface-hover);
}

.tab[aria-selected="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 -3px 0 var(--accent);
}

.tab-label {
  font-weight: 700;
}

.tab-league {
  color: var(--muted);
  font-size: 0.8125rem;
}

.matches {
  margin: 0;
  padding: 0;
  list-style: none;
}

.matches > li + li {
  border-top: 1px solid var(--line);
}

.match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 4px 12px;
  width: 100%;
  margin: 2px 0;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  background: none;
  color: inherit;
  text-align: left;
}

button.match {
  cursor: pointer;
}

button.match:hover {
  background: var(--surface-hover);
}

.match[aria-current="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.match-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.match-teams {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.match-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 12px;
  color: var(--muted);
  font-size: 0.875rem;
}

.match-sets {
  font-variant-numeric: tabular-nums;
}

.match-result {
  color: var(--accent);
  font-size: 1.125rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.match-go {
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 700;
}

button.match:hover .match-go,
.match[aria-current="true"] .match-go {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.match--off {
  grid-template-columns: minmax(0, 1fr) auto;
  opacity: 0.55;
}

.match-note {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.8125rem;
  font-style: italic;
}

/* Phones: the result and "Prüfen" stack on the right instead of taking a row of their own. */
@container (max-width: 420px) {
  .match {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "main result"
      "main go";
    row-gap: 6px;
    padding: 9px 6px;
  }

  .match-main {
    grid-area: main;
  }

  .match-result {
    grid-area: result;
    justify-self: end;
    align-self: end;
  }

  .match-go {
    grid-area: go;
    justify-self: end;
    align-self: start;
  }

  .match--off {
    grid-template-areas:
      "main result"
      "note note";
  }

  .match--off .match-result {
    align-self: center;
  }

  .match-note {
    grid-area: note;
  }

  .tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr));
  }

  .tab {
    padding: 7px 10px 8px;
  }

  .tab-league {
    overflow-wrap: anywhere;
  }
}

.more {
  margin-top: 8px;
}

.upcoming {
  margin-top: 12px;
}

.upcoming > summary {
  padding: 4px 0;
  color: var(--muted);
  cursor: pointer;
}

.team-meta {
  margin-top: 12px;
}

.resolve {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.field-label {
  font-weight: 700;
}

.input-row {
  display: flex;
  gap: 8px;
}

.input-row input {
  flex: 1;
}

.input-row .button {
  flex: none;
}

.field-error {
  color: var(--danger-text);
}

/* 2 Spiel prüfen ---------------------------------------------------------------------------- */

.check-body {
  display: grid;
  gap: 16px;
}

.howto {
  margin: 8px 0 0;
  padding-left: 1.3em;
  color: var(--muted);
}

.howto li + li {
  margin-top: 4px;
}

.loading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 0;
}

.loading-title {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.spinner {
  flex: none;
  width: 28px;
  height: 28px;
  border: 3px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* The two teams as the score bug shows them: navy name, shirt colour, sets won. */
.scoreline {
  display: grid;
  grid-template-columns: minmax(0, max-content) 7px 2.6em;
  row-gap: 3px;
  width: max-content;
  max-width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  filter: drop-shadow(0 4px 5px rgb(0 0 0 / 45%));
}

.scoreline-team {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
}

.scoreline-name {
  min-width: 0;
  padding: 0.3em 0.9em 0.24em 0.7em;
  border: 1px solid #1d3170;
  border-right: 0;
  background: var(--navy);
  color: #fff;
  font: italic 700 1.375rem / 1.1 var(--condensed);
  font-stretch: condensed;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.scoreline-color {
  background: #888888;
}

.scoreline-sets {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--navy);
  font: italic 700 1.5rem / 1 var(--condensed);
}

.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 18px;
  margin: 0;
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.check-meta {
  color: var(--muted);
  font-size: 0.875rem;
}

.check-actions {
  display: flex;
  gap: 8px;
}

/* 3 Optionen -------------------------------------------------------------------------------- */

.options {
  display: grid;
  gap: 20px;
}

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field legend {
  margin-bottom: 8px;
  padding: 0;
  font-weight: 700;
}

.optional {
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 400;
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--field);
}

.segmented label {
  position: relative;
  display: block;
}

.segmented input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.segmented input:focus-visible {
  outline: none;
}

.segmented span {
  display: block;
  padding: 7px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.segmented label:hover input:not(:checked, :disabled) + span {
  background: var(--surface-hover);
  color: var(--text);
}

.segmented input:checked + span {
  background: var(--accent);
  color: var(--accent-ink);
}

.segmented input:focus-visible + span {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.segmented input:disabled {
  cursor: not-allowed;
}

.segmented input:disabled + span {
  opacity: 0.45;
  text-decoration: line-through;
}

.checks {
  display: grid;
  gap: 12px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.check > span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.check small {
  color: var(--muted);
  font-size: 0.8125rem;
}

.check--force {
  padding: 10px 12px;
  border: 1px solid var(--danger-line);
  border-radius: var(--radius-small);
  background: var(--danger-bg);
}

.team-edit {
  display: grid;
  grid-template-columns: 4rem 48px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.team-edit-label {
  color: var(--muted);
}

#team-reset {
  justify-self: start;
  font-size: 0.875rem;
}

.submit {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.blocked-note {
  color: var(--danger-text);
}

.create-status {
  min-height: 1.45em;
}

.create-status:empty {
  display: none;
}

@container (max-width: 420px) {
  .submit .button--primary {
    width: 100%;
  }
}

/* Aufträge ---------------------------------------------------------------------------------- */

.job-list {
  display: grid;
  gap: 14px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

#jobs-placeholder {
  margin-top: 14px;
}

.job {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  scroll-margin-top: 16px;
  container-type: inline-size;
}

.job:focus {
  outline: none;
}

.job:focus-visible {
  outline: 3px solid var(--accent);
}

.job--running {
  border-color: var(--line-strong);
}

.job--flash {
  animation: flash 2.4s ease-out;
}

@keyframes flash {
  0%,
  35% {
    box-shadow: 0 0 0 3px var(--accent);
  }

  100% {
    box-shadow: 0 0 0 3px transparent;
  }
}

.job-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px 12px;
}

.job-title {
  min-width: 0;
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.job-meta,
.job-options {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.875rem;
}

.job-options {
  margin-top: 0;
}

.job-line {
  margin-top: 10px;
}

.job-since {
  color: var(--muted);
  font-size: 0.875rem;
}

.job .box {
  margin-top: 12px;
}

.job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.badge {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge--queued {
  border-color: var(--line-strong);
  background: var(--panel);
  color: #cdd8ef;
}

.badge--running {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.badge--running::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.25;
  }
}

.badge--done {
  border-color: var(--ok-line);
  background: var(--ok-bg);
  color: var(--ok-text);
}

.badge--failed {
  border-color: var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger-text);
}

.badge--cancelled,
.badge--expired {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--muted);
}

.progress {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.progress-percent {
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

progress {
  display: block;
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #1b2e62;
  color: var(--accent);
  appearance: none;
}

progress::-webkit-progress-bar {
  border-radius: 999px;
  background: #1b2e62;
}

progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, #4fb5f2, var(--accent));
  transition: width 0.5s ease;
}

progress::-moz-progress-bar {
  border-radius: 999px;
  background: var(--accent);
}

progress:indeterminate {
  background: linear-gradient(90deg, #1b2e62 0%, #3a74b0 50%, #1b2e62 100%) 0
    0 / 200% 100%;
  animation: sweep 1.4s linear infinite;
}

progress:indeterminate::-webkit-progress-bar {
  background: transparent;
}

@keyframes sweep {
  to {
    background-position: -200% 0;
  }
}

.job-early {
  display: grid;
  gap: 6px;
}

.job-done {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

@container (min-width: 640px) {
  .job-done {
    grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
    align-items: start;
  }
}

.job-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-small);
  background: #000;
}

.job-novideo {
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-small);
  color: var(--muted);
}

.job-files {
  display: grid;
  align-content: start;
  gap: 10px;
}

.job-expiry,
.job-took {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.job-expiry time {
  color: var(--text);
  font-weight: 600;
}

.downloads {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
}

.download:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  color: var(--text);
}

.download--overlay {
  border-color: var(--accent);
}

.download-label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.download-label::before {
  content: "↓";
  content: "↓" / "";
  color: var(--accent);
  font-weight: 800;
}

.download-size {
  flex: none;
  color: var(--muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

/* Hilfe ------------------------------------------------------------------------------------- */

.help summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  list-style: none;
  cursor: pointer;
}

.help summary::-webkit-details-marker {
  display: none;
}

.help summary h2::before {
  content: "";
  width: 0.5em;
  height: 0.5em;
  margin: 0 6px 0 2px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}

.help details[open] summary h2::before {
  transform: rotate(45deg);
}

.summary-hint {
  color: var(--muted);
  font-size: 0.9375rem;
}

.help-body {
  max-width: 72ch;
  margin-top: 6px;
  color: #d8e1f1;
}

.help-body h3 {
  margin: 22px 0 6px;
  color: var(--text);
  font-size: 1.0625rem;
}

.help-body p + p {
  margin-top: 10px;
}

.help-body ol {
  margin: 0 0 10px;
  padding-left: 1.3em;
}

.help-body li + li {
  margin-top: 6px;
}

pre {
  max-width: 100%;
  margin: 10px 0 0;
  padding: 12px 14px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--field);
  font-size: 0.8125rem;
  line-height: 1.55;
}

code {
  font-family: var(--mono);
}

:not(pre) > code {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--field);
  font-size: 0.9em;
}

/* Messages ---------------------------------------------------------------------------------- */

.messages {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 20;
  display: grid;
  justify-items: end;
  gap: 8px;
  pointer-events: none;
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: min(100%, 460px);
  padding: 10px 8px 10px 14px;
  border: 1px solid;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgb(0 0 0 / 50%);
  pointer-events: auto;
  animation: message-in 0.2s ease-out;
}

@keyframes message-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.message--error {
  border-color: var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger-text);
}

.message--info {
  border-color: var(--accent);
  background: #10295e;
  color: var(--text);
}

.message-text {
  flex: 1;
  min-width: 0;
  padding-top: 5px;
  overflow-wrap: anywhere;
}

.message-text a {
  color: inherit;
  font-weight: 700;
}

.message-close {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-size: 1.375rem;
  line-height: 1;
  cursor: pointer;
}

.message-close:hover {
  background: rgb(255 255 255 / 10%);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Sign-in page (served by app.ts to visitors without a session) ------------------------------ */

.signin {
  max-width: 32rem;
  margin: 18vh auto 0;
  padding: 32px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  text-align: center;
}

.signin h1 {
  margin: 0 0 8px;
  font-family: var(--condensed);
  font-size: 2rem;
  font-style: italic;
  letter-spacing: 0.01em;
}

.signin p {
  margin: 0 0 24px;
  color: var(--muted);
}

.signin p:last-child {
  margin-bottom: 0;
}

.signin .button {
  text-decoration: none;
}
