/* ===========================================================
   Badsky_Games
   Palette: printed catalogue. Paper stock, pine ink, one orange
   for anything you can actually click to get a file.
   =========================================================== */

/* --- Fonts -------------------------------------------------
   Self hosted so no request ever leaves your visitor's browser
   for a third party. Drop these three .woff2 files into
   assets/fonts/ and the site picks them up. See README.md.
   Until then it falls back to fonts already on the machine. */

@font-face {
  font-family: "Anton";
  src: url("fonts/anton-regular.woff2") format("woff2");
  /* Anton ships one weight. Claiming the whole range means the heading
     weight below picks Anton when it is there, and a heavy system font
     when it is not, instead of rendering thin. */
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Plex Sans";
  src: url("fonts/ibm-plex-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Sans";
  src: url("fonts/ibm-plex-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  /* Zwei Themes teilen sich dieselben Namen. Die Namen sagen, wofuer
     eine Farbe da ist, nicht wie sie aussieht: --bg ist der Seitengrund,
     --block-bg der dunkle Streifen, --surface eine Fläche darauf. So
     muss beim Umschalten nur diese Liste getauscht werden. */

  --bg: #e0dccd;
  --fg: #1e2a22;
  --surface: #eeebdf;
  --muted: #455639;
  --line: rgba(30, 42, 34, 0.2);
  --line-strong: rgba(30, 42, 34, 0.55);
  --hover: rgba(30, 42, 34, 0.09);
  --edge: #141c17;
  --well: #141c17;
  --shadow: rgba(30, 42, 34, 0.18);

  --block-bg: #1e2a22;
  --block-fg: #eeebdf;
  --block-muted: #a9b0a1;
  --block-line: rgba(238, 235, 223, 0.16);
  --block-edge: rgba(238, 235, 223, 0.35);
  --block-shadow: #0a0f0c;

  --signal: #e2521b;
  /* Same orange, adjusted so small text clears 4.5:1 on each background */
  --signal-ink: #b23a0e;
  --signal-light: #f07a3e;
  /* text colour that sits on top of --signal */
  --on-signal: #141c17;

  /* Platzhalterkacheln und Minispiel lesen diese hier aus. */
  --art-bg: #eeebdf;
  --art-1: #1e2a22;
  --art-2: #6e8257;
  --art-3: #e2521b;

  --display: "Anton", "Haettenschweiler", "Arial Narrow Bold", Impact,
    system-ui, sans-serif;
  --sans: "Plex Sans", ui-sans-serif, system-ui, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --shell: 74rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

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

.shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--signal);
  color: var(--on-signal);
  padding: 0.75rem 1rem;
  font-weight: 600;
  z-index: 50;
}
.skip:focus {
  left: 0;
}

/* --- Top bar ---------------------------------------------- */

.topbar {
  background: var(--block-bg);
  color: var(--block-fg);
  border-bottom: 4px solid var(--signal);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.25rem;
  flex-wrap: wrap;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--block-fg);
}

.wordmark img {
  width: 2.25rem;
  height: 2.25rem;
  /* pixel art, so no smoothing when the browser scales it */
  image-rendering: pixelated;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.5vw, 1.75rem);
  font-size: 0.9375rem;
}

.nav a {
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a[aria-current="page"] {
  border-bottom-color: var(--signal);
}

/* --- Buttons ---------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.35rem;
  border: 2px solid var(--edge);
  border-radius: 0;
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 5px 5px 0 var(--edge);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--edge);
}

.btn:active {
  transform: translate(5px, 5px);
  box-shadow: 0 0 0 var(--edge);
}

.btn--get {
  background: var(--signal);
  color: var(--on-signal);
}

.btn--ghost {
  background: transparent;
  box-shadow: none;
  padding-inline: 0;
  border: 0;
  border-bottom: 2px solid var(--signal);
  color: inherit;
}
.btn--ghost:hover {
  transform: none;
  box-shadow: none;
  color: var(--signal-ink);
}

.feature--dark .btn--ghost:hover {
  color: var(--signal-light);
}

.btn__size {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 400;
  opacity: 0.85;
}

.btn svg {
  width: 1em;
  height: 1em;
  flex: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 1.75rem;
  margin-top: 2rem;
}

/* --- Feature blocks --------------------------------------- */

.feature {
  border-bottom: 1px solid var(--line);
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.feature .shell {
  max-width: 88rem;
}

.feature--dark {
  background: var(--block-bg);
  color: var(--block-fg);
  border-bottom: 0;
}

/* Two dark blocks in a row would run together, so each one after the
   first is separated by a rule in its own accent colour. */
.feature + .feature {
  border-top: 4px solid var(--signal);
}

.feature--dark .btn {
  box-shadow: 5px 5px 0 var(--block-shadow);
}
.feature--dark .btn:hover {
  box-shadow: 3px 3px 0 var(--block-shadow);
}
.feature--dark .btn:active {
  box-shadow: 0 0 0 var(--block-shadow);
}

.feature--dark .btn--ghost {
  box-shadow: none;
  border-bottom-color: var(--signal);
}

.feature__grid {
  display: grid;
  /* The pictures are the point of a game page, so they get the wider
     half. The text column has a max-width on its lead anyway. */
  grid-template-columns: minmax(19rem, 0.66fr) minmax(0, 1.34fr);
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
  align-items: center;
}

/* The cover always shows, always square. A trailer gets an identical
   square beside it, and on a narrow screen they stack. */
.mediaset {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
}

.mediaset--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.media--square {
  aspect-ratio: 1 / 1;
}

.feature__flag {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--signal-ink);
  margin: 0 0 0.85rem;
}

.feature--dark .feature__flag {
  color: var(--signal-light);
}

.feature__flag a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.feature__flag a:hover {
  border-bottom-width: 2px;
}

.feature__title {
  font-family: var(--display);
  font-weight: 800;
  /* --title-fit is set per game in app.js when a title has a very long
     word in it. Default 1 means no change. */
  font-size: clamp(
    calc(2.5rem * var(--title-fit, 1)),
    calc(5.6vw * var(--title-fit, 1)),
    calc(5.5rem * var(--title-fit, 1))
  );
  line-height: 0.88;
  letter-spacing: 0.005em;
  margin: 0 0 1.25rem;
  /* A long single word like DroneOPS:180 must not run into the pictures */
  overflow-wrap: break-word;
  hyphens: auto;
}

.feature__lead {
  margin: 0;
  max-width: 34ch;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.55;
}

/* --- Spec list -------------------------------------------- */

.specs {
  margin: 2.25rem 0 0;
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  border-top: 1px solid var(--line);
}

.feature--dark .specs,
.feature--dark .specs > * {
  border-color: var(--block-line);
}

.specs dt,
.specs dd {
  margin: 0;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
}

.specs dt {
  color: var(--muted);
  padding-right: 1rem;
}

.feature--dark .specs dt {
  color: var(--block-muted);
}

.specs dd {
  font-family: var(--mono);
  font-size: 0.875rem;
}

/* --- Media panel ------------------------------------------ */

.media {
  border: 2px solid var(--edge);
  background: var(--surface);
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
}

.feature--dark .media {
  border-color: var(--block-fg);
}

.media img,
.media svg,
.media iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  object-fit: cover;
}

.trailer {
  width: 100%;
  height: 100%;
  border: 0;
  padding: 1rem;
  margin: 0;
  background: var(--well);
  color: var(--block-fg);
  font: inherit;
  cursor: pointer;
  display: grid;
  place-content: center;
  gap: 0.9rem;
  justify-items: center;
}

.trailer__mark {
  width: clamp(2.5rem, 20%, 3.5rem);
  aspect-ratio: 1;
  background: var(--signal);
  display: grid;
  place-content: center;
}

.trailer__mark svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: var(--on-signal);
}

.trailer__label {
  font-weight: 600;
  font-size: 0.9375rem;
}

.trailer__note {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--block-muted);
  max-width: 26ch;
  text-align: center;
  line-height: 1.5;
}

.trailer:hover .trailer__mark {
  background: var(--block-fg);
}

.media__under {
  margin: 0.75rem 0 0;
  font-family: var(--mono);
  font-size: 0.75rem;
}

/* The link belongs to the trailer, so it sits under the trailer. */
.mediaset--two + .media__under {
  text-align: right;
}

@media (max-width: 48rem) {
  .mediaset--two + .media__under {
    text-align: left;
  }
}

.feature--dark .media__under a {
  color: var(--block-muted);
}

/* --- Section heads ---------------------------------------- */

.section {
  padding-block: clamp(3rem, 6vw, 4.5rem);
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  padding-bottom: 0.9rem;
  border-bottom: 3px solid var(--fg);
}

.section__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1;
  margin: 0;
}

.section__body {
  margin-top: 1.75rem;
}

.section__note {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
}

/* --- Game index ------------------------------------------- */

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

.index__row {
  border-bottom: 1px solid var(--line);
}

.index__link {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1.6fr) 9rem 10rem 8.5rem;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0.75rem 0.9rem 0.9rem;
  text-decoration: none;
  margin-inline: -0.9rem;
  border-left: 3px solid transparent;
  transition: background-color 0.1s ease, border-color 0.1s ease;
}

.index__link {
  background: var(--row-wash, transparent);
}

.index__link:hover {
  border-left-color: var(--row-accent, var(--signal));
}

.index__thumb {
  width: 3rem;
  height: 3rem;
  display: block;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  overflow: hidden;
}

.index__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.index__link:hover {
  background: var(--hover);
}

.index__name {
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.25;
}

.index__blurb {
  display: block;
  font-weight: 400;
  font-size: 0.9375rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.index__meta {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--fg);
}

.index__state {
  justify-self: end;
  font-family: var(--mono);
  font-size: 0.8125rem;
  white-space: nowrap;
  border-bottom: 2px solid var(--signal);
  padding-bottom: 2px;
}

.index__state--none {
  border-bottom-color: var(--line-strong);
  color: var(--muted);
}

.index__label {
  display: none;
  font-family: var(--sans);
  color: var(--muted);
  font-size: 0.75rem;
  margin-right: 0.4rem;
}

/* --- Game detail ------------------------------------------ */

.crumb {
  font-family: var(--mono);
  font-size: 0.8125rem;
  padding-top: 1.75rem;
}

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

.detail {
  padding-block: clamp(2rem, 4vw, 3rem) clamp(3rem, 6vw, 4.5rem);
}

.detail__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.75rem, 9vw, 5rem);
  overflow-wrap: break-word;
  line-height: 0.9;
  margin: 0.5rem 0 1.5rem;
}

.detail__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

.prose p {
  max-width: 68ch;
  margin: 0 0 1.15rem;
}

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

.downloads {
  border: 2px solid var(--edge);
  background: var(--surface);
  padding: 1.5rem;
}

.downloads h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  margin: 0 0 1rem;
  line-height: 1;
}

.downloads .btn {
  width: 100%;
  justify-content: space-between;
}

.downloads .btn + .btn {
  margin-top: 1.1rem;
}

.downloads__empty {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--fg);
}

.downloads__ver {
  margin: 0.75rem 0 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.downloads .specs {
  grid-template-columns: 5.5rem minmax(0, 1fr);
  margin-top: 1.75rem;
}

/* Phone screenshots are tall, desktop ones are wide, and a grid would
   stretch every row to the tallest one. Columns let each keep its own
   shape and just flow. */
.shots {
  columns: 3 14rem;
  column-gap: 1rem;
  margin-top: 2.5rem;
}

.shots img {
  border: 2px solid var(--edge);
  width: 100%;
  margin-bottom: 1rem;
  break-inside: avoid;
}

/* --- Legal pages ------------------------------------------ */

.legal {
  padding-block: clamp(2.5rem, 5vw, 4rem);
  max-width: 44rem;
}

.legal h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  line-height: 1;
  margin: 0 0 0.5rem;
}

.legal h2 {
  font-size: 1.1875rem;
  font-weight: 600;
  margin: 2.5rem 0 0.6rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.legal p,
.legal li {
  max-width: 68ch;
}

.legal p {
  margin: 0 0 1rem;
}

.legal ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.legal li {
  margin-bottom: 0.4rem;
}

.legal__stamp {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0 0 2rem;
}

/* --- Footer ----------------------------------------------- */

.footer {
  background: var(--block-bg);
  color: var(--block-fg);
  padding-block: 3rem 2.25rem;
  margin-top: auto;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem 3rem;
  flex-wrap: wrap;
}

.footer h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.375rem;
  margin: 0 0 0.75rem;
  line-height: 1;
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9375rem;
}

.footer li {
  margin-bottom: 0.45rem;
}

.footer a {
  color: var(--block-fg);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer a:hover {
  border-bottom-color: var(--signal);
}

.footer__end {
  margin: 2.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--block-line);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--block-muted);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer__end .sticker {
  filter: none;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page > main {
  flex: 1;
}

/* --- Responsive ------------------------------------------- */

@media (max-width: 48rem) {
  .mediaset--two {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 62rem) {
  .feature__grid,
  .detail__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .index__link {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.35rem;
    padding-block: 1.25rem;
  }

  .index__state {
    justify-self: start;
    margin-top: 0.35rem;
  }

  .index__label {
    display: inline;
  }
}

@media (max-width: 30rem) {
  .topbar__inner {
    padding-block: 0.75rem;
  }

  .downloads .btn {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .btn:hover,
  .btn:active {
    transform: none;
  }
}

/* --- Platform filter -------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 0.5rem;
}

.filter {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border: 2px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
}

.filter:hover {
  border-color: var(--fg);
}

.filter[aria-pressed="true"] {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
}

.filter__count {
  font-family: var(--mono);
  font-size: 0.75rem;
  opacity: 0.75;
}

.index__empty {
  padding: 2rem 0;
  color: var(--muted);
}

/* --- Screenshot viewer ------------------------------------ */

.shots img {
  cursor: zoom-in;
}

.viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 15, 12, 0.94);
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
}

.viewer__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 2px solid #eeebdf;
}

.viewer__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.6rem 1rem;
  border: 2px solid #eeebdf;
  border-radius: 0;
  background: transparent;
  color: #eeebdf;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.viewer__close:hover {
  background: #eeebdf;
  color: #141c17;
}

/* --- Stickers --------------------------------------------- */
/* Pieces cut out of the screenshots. Pure decoration, so they sit
   outside the text flow and never take a click. */

.section__title[data-sticker] {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sticker {
  image-rendering: pixelated;
  width: auto;
  flex: none;
  pointer-events: none;
  filter: drop-shadow(3px 3px 0 var(--shadow));
}

@media (max-width: 40rem) {
  .sticker {
    display: none;
  }
}

/* --- Social links ----------------------------------------- */

.social {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border-bottom: 1px solid transparent;
}

.social__icon {
  width: 1.15em;
  height: 1.15em;
  fill: currentColor;
  flex: none;
}

.footer a.social:hover {
  border-bottom-color: var(--signal);
  color: var(--signal-light);
}

/* --- Gear Drop -------------------------------------------- */

.arcade {
  margin-top: 1.75rem;
  max-width: 50rem;
}

.arcade__bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.arcade__bar b {
  color: var(--fg);
  font-size: 1rem;
}

.arcade__lives {
  display: inline-flex;
  gap: 0.3rem;
  min-height: 1rem;
}

.arcade__heart {
  height: 14px;
  width: auto;
  image-rendering: pixelated;
}

.arcade__stage {
  position: relative;
  border: 2px solid var(--edge);
  line-height: 0;
}

.arcade__stage canvas {
  display: block;
  width: 100%;
  height: auto;
  /* Das Spiel rechnet intern in 400 mal 150 Pixeln. Ohne diese Zeile
     wuerde der Browser beim Hochskalieren alles weichzeichnen. */
  image-rendering: pixelated;
  touch-action: none;
}

/* .btn sets display:inline-flex, which beats the browser default rule
   for [hidden]. Without this the start button stays on screen. */
.arcade__start[hidden] {
  display: none;
}

.arcade__start {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.arcade__start:hover {
  transform: translate(-50%, -50%) translate(2px, 2px);
}

.arcade__start:active {
  transform: translate(-50%, -50%) translate(5px, 5px);
}

.arcade__help {
  margin: 0.8rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 62ch;
}

/* --- Language switch -------------------------------------- */

.langswitch {
  display: inline-flex;
  border: 2px solid var(--block-edge);
}

.langswitch button {
  padding: 0.3rem 0.65rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--block-fg);
  font: inherit;
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.4;
  cursor: pointer;
}

.langswitch button + button {
  border-left: 2px solid var(--block-edge);
}

.langswitch button:hover {
  background: rgba(238, 235, 223, 0.14);
}

.langswitch button[aria-pressed="true"] {
  background: var(--signal);
  color: var(--on-signal);
}

@media (max-width: 30rem) {
  .topbar__inner {
    row-gap: 0.5rem;
  }
}

/* --- Dark mode -------------------------------------------- */
/* Nur die Farbliste wird getauscht, kein einziges Bauteil hat eine
   eigene Dark-Regel. Deshalb faerbt sich auch alles mit, was du
   später dazubaust. */

[data-theme="dark"] {
  --bg: #161d18;
  --fg: #e7e4d8;
  --surface: #1f2822;
  --muted: #9aa791;
  --line: rgba(231, 228, 216, 0.18);
  --line-strong: rgba(231, 228, 216, 0.42);
  --hover: rgba(231, 228, 216, 0.08);
  --edge: #e7e4d8;
  --well: #0d1310;
  --shadow: rgba(0, 0, 0, 0.5);

  --block-bg: #0f1512;
  --block-fg: #e7e4d8;
  --block-muted: #8f9a88;
  --block-line: rgba(231, 228, 216, 0.14);
  --block-edge: rgba(231, 228, 216, 0.3);
  --block-shadow: #000000;

  --signal-ink: #f07a3e;
  --signal-light: #f07a3e;

  --art-bg: #1f2822;
  --art-1: #0f1512;
  --art-2: #6e8257;
  --art-3: #e2521b;
}

[data-theme="dark"] .feature--dark .media {
  border-color: var(--block-edge);
}

/* --- Theme switch ----------------------------------------- */

.themeswitch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border: 2px solid var(--block-edge);
  border-radius: 0;
  background: transparent;
  color: var(--block-fg);
  cursor: pointer;
}

.themeswitch:hover {
  background: rgba(238, 235, 223, 0.14);
}

.themeswitch svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
}

.themeswitch .icon-dark {
  display: none;
}

[data-theme="dark"] .themeswitch .icon-dark {
  display: block;
}

[data-theme="dark"] .themeswitch .icon-light {
  display: none;
}

.headtools {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
