@font-face {
  font-family: "Barlow";
  src: url("/fonts/barlow-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("/fonts/barlow-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("/fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("/fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --gehaeuse: #1b1d1e;
  --gehaeuse-kante: #2c3032;
  --schild: #e6e9ea;
  --schild-feld: #f3f5f5;
  --linie: #b6bcbf;
  --tinte: #141617;
  --tinte-2: #474e52;
  --scheibe: #9aa3a8;
  --marke: #c8202a;
  --marke-tief: #a3121b;
  --teal: #1d95ba;
  --teal-taste: #14789a;
  --teal-tief: #0f6582;
  --rolle: #141617;
  --ziffer: #eef1f1;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --schrift: "Barlow", "Segoe UI", system-ui, sans-serif;
  --schrift-schild: "Barlow Semi Condensed", "Barlow", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--gehaeuse);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font: 400 15px/1.5 var(--schrift);
  color: var(--tinte);
  background: var(--gehaeuse);
  caret-color: var(--teal-taste);
}

::selection {
  background: var(--teal);
  color: #fff;
}

button,
input {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.gehaeuse {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(12px, 4vw, 56px) clamp(10px, 3vw, 40px);
}

.schild {
  width: 100%;
  max-width: 30rem;
  background: var(--schild);
  border-radius: 6px;
  box-shadow: 0 1px 0 var(--gehaeuse-kante), 0 24px 48px -24px rgb(0 0 0 / 0.7);
  padding: clamp(18px, 3.2vw, 32px);
  display: grid;
  gap: 22px;
}

.schild[data-view="live"] {
  max-width: 60rem;
}

/* Kopf */

.kopf {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
}

h1 {
  margin: 0;
  font: 700 30px/1 var(--schrift-schild);
  letter-spacing: -0.01em;
}

.kopf-unter {
  margin: 4px 0 0;
  color: var(--tinte-2);
}

.kopf-konto {
  display: grid;
  justify-items: end;
  gap: 2px;
  text-align: right;
}

.konto-name {
  font-weight: 600;
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--teal-tief);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link:hover {
  color: var(--tinte);
}

/* Scheibenfenster */

.fenster {
  position: relative;
  height: 64px;
  background: #0e0f10;
  border-radius: 3px;
  overflow: hidden;
}

.schild[data-view="live"] .fenster {
  height: clamp(112px, 15vw, 164px);
}

.fenster canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Anmeldung */

.anmeldung {
  display: grid;
  gap: 16px;
}

.feld {
  display: grid;
  gap: 6px;
}

label,
.zw-name,
.sz-name,
.ms-kopf h2,
.typenschild dt {
  font: 600 13px/1.2 var(--schrift-schild);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tinte-2);
}

input {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  background: var(--schild-feld);
  border: 1px solid #848c90;
  border-radius: 3px;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

input:hover {
  border-color: var(--tinte-2);
}

input:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 0;
  border-color: var(--teal-tief);
  background: #fff;
}

input[aria-invalid="true"] {
  border-color: var(--marke-tief);
}

.passwort {
  position: relative;
}

.passwort input {
  padding-right: 48px;
}

.auge {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--tinte-2);
  border-radius: 2px;
}

.auge svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.auge[aria-pressed="false"] .durch {
  display: none;
}

.auge:hover {
  color: var(--tinte);
}

.hinweis {
  margin: 0;
  color: var(--tinte-2);
}

.fehler {
  margin: 0;
  color: var(--marke-tief);
  font-weight: 600;
}

.fuss {
  margin: 0;
  color: var(--tinte-2);
}

/* Tasten */

.taste {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 3px;
  font: 600 16px/1 var(--schrift-schild);
  letter-spacing: 0.02em;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.taste svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.taste:active {
  transform: translateY(1px);
}

.taste:disabled {
  cursor: progress;
  background: #6f777b;
}

.taste-start {
  background: var(--teal-taste);
}

.taste-start:hover:not(:disabled) {
  background: var(--teal-tief);
}

.taste-auflegen {
  background: var(--marke-tief);
}

.taste-auflegen:hover:not(:disabled) {
  background: #870d15;
}

.taste-auflegen:focus-visible {
  outline-color: var(--marke);
}

/* Betrieb */

.betrieb {
  display: grid;
  gap: 22px;
}

.messung {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 14px 28px;
  align-items: end;
}

.zaehlwerk,
.schauzeichen {
  display: grid;
  gap: 8px;
}

.rollen {
  display: flex;
  gap: 3px;
  font: 600 32px/1 var(--schrift-schild);
  font-variant-numeric: tabular-nums;
}

.rolle {
  width: 1.02em;
  height: 1.36em;
  overflow: hidden;
  background: var(--rolle);
  color: var(--ziffer);
  border-radius: 2px;
}

.rolle-rot {
  background: var(--marke);
  margin-left: 4px;
}

.band {
  display: flex;
  flex-direction: column;
  transform: translateY(calc(var(--n, 0) * -1.36em));
  transition: transform 0.45s var(--ease);
}

.band span {
  height: 1.36em;
  display: grid;
  place-items: center;
}

.zw-einheit {
  color: var(--tinte-2);
}

.sz-leiste {
  --i: 0;
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--tinte);
  border-radius: 2px;
  height: 44px;
  font: 600 15px/1 var(--schrift-schild);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sz-leiste::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 25%;
  background: var(--tinte);
  transform: translateX(calc(var(--i) * 100%));
  transition: transform 0.45s var(--ease), background-color 0.3s var(--ease);
}

.sz-leiste[data-zustand="spricht"]::before {
  background: var(--teal-taste);
}

.sz-leiste li {
  position: relative;
  display: grid;
  place-items: center;
  padding: 0 4px;
  text-align: center;
  color: var(--tinte-2);
  transition: color 0.3s var(--ease);
}

.sz-leiste li + li {
  border-left: 1px solid var(--linie);
}

.sz-leiste li.aktiv {
  color: #fff;
}

/* Mitschrift */

.mitschrift {
  border-top: 1px solid var(--tinte);
}

.ms-kopf {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0 8px;
  border-bottom: 1px solid var(--linie);
  color: var(--tinte-2);
}

.ms-kopf h2 {
  margin: 0;
  color: var(--tinte);
}

.ms-liste {
  margin: 0;
  padding: 0;
  list-style: none;
  height: clamp(180px, 34vh, 360px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--scheibe) transparent;
  overscroll-behavior: contain;
}

.ms-liste:focus-visible {
  outline-offset: -2px;
}

.ms-liste li {
  display: grid;
  grid-template-columns: 3.6rem 7.5rem 1fr;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #d2d7d9;
}

.ms-liste li.ms-leer {
  display: block;
  padding: 16px 0;
  border: 0;
  color: var(--tinte-2);
}

.ms-zeit {
  color: var(--tinte-2);
  font-variant-numeric: tabular-nums;
}

.ms-wer {
  font: 600 15px/1.5 var(--schrift-schild);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ms-assistent .ms-wer {
  color: var(--teal-tief);
}

.ms-text {
  max-width: 68ch;
  overflow-wrap: anywhere;
}

.ms-vorlaeufig .ms-text {
  color: var(--tinte-2);
}

.ms-eintrag {
  animation: ein 0.5s var(--ease);
}

@keyframes ein {
  from {
    clip-path: inset(0 0 100% 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

/* Aktionen */

.aktionen {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

.aktionen .fehler {
  flex: 1 1 18rem;
}

/* Typenschild */

.typenschild {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--linie);
  border-left: 1px solid var(--linie);
}

.schild[data-view="login"] .typenschild {
  display: none;
}

.schild[data-view="live"] .typenschild {
  grid-template-columns: repeat(3, 1fr);
}

.typenschild div {
  padding: 7px 10px;
  border-right: 1px solid var(--linie);
  border-bottom: 1px solid var(--linie);
  display: grid;
  gap: 2px;
}

.typenschild dt {
  font-size: 11px;
}

.typenschild dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 760px) {
  .messung {
    grid-template-columns: auto auto;
  }

  .schauzeichen {
    grid-column: 1 / -1;
  }

  .schild[data-view="live"] .typenschild {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .kopf {
    grid-template-columns: 1fr;
  }

  .kopf-konto {
    grid-column: 1 / -1;
    grid-template-columns: 1fr auto;
    justify-items: start;
    align-items: baseline;
    text-align: left;
    padding-top: 10px;
    border-top: 1px solid var(--linie);
  }

  h1 {
    font-size: 26px;
  }

  .messung {
    gap: 14px 16px;
  }

  .rollen {
    font-size: 26px;
  }

  .sz-leiste {
    font-size: 13px;
    letter-spacing: 0.03em;
  }

  .ms-liste li {
    grid-template-columns: 3.2rem 1fr;
    gap: 2px 10px;
  }

  .ms-text {
    grid-column: 2;
  }

  .aktionen .taste {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
