/* DEV4LIFE Status – public styles.
   Same tokens as dev4life.de (site.css): cobalt board, ink, paper, Byte butter, apple focus.
   No inline styles anywhere; status is always text + icon, colour only supports it. */

@font-face {
  font-family: "Familjen Grotesk";
  src: url("../fonts/familjen-grotesk-latin.7eb7ec31a3a1.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --cobalt: #3440e0;
  --cobalt-deep: #2630b8;
  --ink-fix: #191a3d;
  --ink: #191a3d;
  --ink-soft: #55577a;
  --paper: #f1f0f8;
  --surface: #ffffff;
  --line: #d9d8ea;
  --apple: #ff5545;
  --butter: #ffd447;
  --butter-deep: #c9a21f;
  --leaf: #59c99a;
  --orange: #ff8a3d;
  --accent: var(--cobalt);
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  --btn-shadow: #000;
  --board: var(--cobalt);
  --foot: #191a3d;

  --s-operational: var(--leaf);
  --s-degraded: var(--butter);
  --s-partial_outage: var(--orange);
  --s-major_outage: var(--apple);
  --s-maintenance: var(--cobalt);
  --s-maintenance-fg: #ffffff;
  --s-none: var(--line);

  --font: "Familjen Grotesk", "Segoe UI", system-ui, sans-serif;
  --t-small: 0.92rem;
  --t-0: 1.0625rem;
  --t-1: 1.375rem;
  --t-2: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem);
  --t-3: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem);

  --gutter: clamp(16px, 4vw, 40px);
  --max: 980px;
  --radius-board: 28px;
  --radius: 16px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ecebfa;
    --ink-soft: #a9aacb;
    --paper: #12133a;
    --surface: #1c1e4d;
    --line: #2f3168;
    --accent: var(--butter);
    --btn-bg: var(--butter);
    --btn-fg: #191a3d;
    --btn-shadow: #8a6d0c;
    --board: var(--cobalt-deep);
    --foot: #0b0c28;
    --s-maintenance: #7c84ff;
    --s-maintenance-fg: #191a3d;
    color-scheme: dark;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 96px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-0);
  line-height: 1.55;
  overflow-x: clip;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

h1,
h2,
h3,
h4 {
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.06;
  margin: 0;
}

h1 {
  font-size: var(--t-3);
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}

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

:focus-visible {
  outline: 3px solid var(--apple);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 700;
}

.skip:focus {
  top: 8px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

main.wrap {
  flex: 1;
  padding-top: clamp(16px, 3vw, 32px);
}

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

.small {
  font-size: var(--t-small);
}

.tnum,
time {
  font-variant-numeric: tabular-nums;
}

.ic {
  width: 1em;
  height: 1em;
  flex: none;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  background: var(--btn-bg);
  color: var(--btn-fg);
  box-shadow: 0 5px 0 var(--btn-shadow);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.btn:hover {
  color: var(--btn-fg);
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--btn-shadow);
}

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

.btn-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink), 0 5px 0 var(--line);
}

.btn-ghost:hover {
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink), 0 7px 0 var(--line);
}

.btn-ghost:active {
  box-shadow: inset 0 0 0 2px var(--ink), 0 0 0 var(--line);
}

.btn-butter,
.site-foot .btn {
  --btn-bg: var(--butter);
  --btn-fg: #191a3d;
  --btn-shadow: #8a6d0c;
}

.btn-small {
  padding: 8px 16px;
  font-size: var(--t-small);
}

.btn .ic {
  width: 1.1em;
  height: 1.1em;
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn:hover,
  .btn:active {
    transform: none;
    transition: none;
  }
}

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 12px var(--gutter) 0;
  pointer-events: none;
}

.site-head-inner {
  pointer-events: auto;
  max-width: calc(var(--max) + 32px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  border-radius: 18px;
  transition: background-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

/* no backdrop blur: too expensive */
.site-head.is-scrolled .site-head-inner {
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line), 0 10px 30px -18px rgb(25 26 61 / 0.45);
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand:hover {
  color: var(--ink);
}

.brand-mark svg {
  width: 40px;
  height: 40px;
}

@media (prefers-color-scheme: dark) {
  .logo-bg {
    fill: #191a3d;
  }
}

.brand-word svg {
  height: 17px;
  width: auto;
  aspect-ratio: 450 / 70;
  fill: currentColor;
}

.brand-status {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  padding-left: 14px;
  border-left: 2px solid var(--line);
  line-height: 1.3;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 26px);
  font-weight: 600;
}

.nav-link {
  text-decoration: none;
}

.nav-link:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .brand-word,
  .nav-link:not(.nav-lang) {
    display: none;
  }
}

/* ---------- hero ---------- */

.hero {
  margin-bottom: clamp(28px, 5vw, 48px);
}

.hero-board {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: clamp(26px, 5vw, 52px) clamp(22px, 5vw, 52px) clamp(30px, 5vw, 46px);
  border-radius: var(--radius-board);
  background-color: var(--board);
  background-image: radial-gradient(rgb(255 255 255 / 0.13) 1.6px, transparent 1.9px);
  background-size: 28px 28px;
  background-position: 14px 14px;
  color: #ffffff;
}

/* the ground line in the colour of the overall status */
.hero-board::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
  background: var(--s);
}

.hero-operational { --s: var(--s-operational); }
.hero-degraded { --s: var(--s-degraded); }
.hero-partial_outage { --s: var(--s-partial_outage); }
.hero-major_outage { --s: var(--s-major_outage); }
.hero-maintenance { --s: #7c84ff; }

.hero-kicker {
  font-size: var(--t-small);
  font-weight: 600;
  color: rgb(255 255 255 / 0.86);
  margin-bottom: 14px;
}

.hero-dot {
  position: relative;
  display: inline-block;
  vertical-align: -2px;
  margin-right: 8px;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--s);
  box-shadow: 0 0 0 3px rgb(255 255 255 / 0.18);
}

.hero-dot.is-live::after,
.live-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-dot.is-live::after,
  .live-dot::after {
    animation: pulse 1.8s var(--ease-out) infinite;
  }
}

@keyframes pulse {
  from {
    transform: scale(1);
    opacity: 0.7;
  }
  to {
    transform: scale(2.6);
    opacity: 0;
  }
}

.hero-title {
  font-size: var(--t-3);
  max-width: 18ch;
  text-wrap: balance;
}

.hero-detail {
  margin-top: 12px;
  font-size: var(--t-1);
  line-height: 1.35;
  color: rgb(255 255 255 / 0.9);
  max-width: 34ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 26px;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #ffffff;
}

.hero-link:hover {
  color: var(--butter);
}

.hero .rel {
  color: rgb(255 255 255 / 0.75);
}

.hero :focus-visible {
  outline-color: var(--butter);
}

.hero-byte img {
  width: clamp(120px, 18vw, 200px);
  height: auto;
  margin-bottom: -8px;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-byte img {
    animation: byte-in 0.6s var(--ease-out) both;
  }
}

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

@media (max-width: 640px) {
  .hero-board {
    grid-template-columns: 1fr;
  }

  .hero-byte {
    order: -1;
  }

  .hero-byte img {
    width: 110px;
    margin-bottom: 0;
  }
}

/* ---------- blocks & cards ---------- */

.block {
  margin-bottom: clamp(32px, 5vw, 52px);
}

.block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  margin-bottom: 16px;
}

.block-title {
  font-size: var(--t-2);
}

.block > .block-title {
  margin-bottom: 16px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--line);
}

.pad {
  padding: clamp(18px, 3vw, 28px);
}

.stack {
  display: grid;
  gap: 16px;
}

.more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  text-decoration: none;
  color: var(--accent);
}

.more:hover {
  text-decoration: underline;
}

.note {
  margin-top: 12px;
}

/* ---------- status bits ---------- */

.s-operational { --c: var(--s-operational); --fg: var(--ink-fix); }
.s-degraded { --c: var(--s-degraded); --fg: var(--ink-fix); }
.s-partial_outage { --c: var(--s-partial_outage); --fg: var(--ink-fix); }
/* Ink on apple: white would only reach 3.2:1 */
.s-major_outage { --c: var(--s-major_outage); --fg: var(--ink-fix); }
.s-maintenance { --c: var(--s-maintenance); --fg: var(--s-maintenance-fg); }
.s-none { --c: var(--s-none); --fg: var(--ink); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--t-small);
  font-weight: 700;
  white-space: nowrap;
}

.chip .ic {
  width: 22px;
  height: 22px;
  padding: 4px;
  border-radius: 6px;
  background: var(--c);
  color: var(--fg);
}

.sw {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--c);
  flex: none;
}

.legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: var(--t-small);
  color: var(--ink-soft);
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---------- components ---------- */

.groups {
  display: grid;
  gap: 16px;
}

.group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(18px, 3vw, 28px);
  border-bottom: 1px solid var(--line);
}

.group-name {
  font-size: var(--t-1);
}

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

.comp {
  padding: 20px clamp(18px, 3vw, 28px) 18px;
}

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

.comp-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.comp-name {
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.comp-desc {
  font-size: var(--t-small);
  color: var(--ink-soft);
  margin-top: 2px;
}

.bars {
  position: relative;
  border-radius: 6px;
}

.bar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2px;
  height: 32px;
}

.b {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 2px;
  background: var(--c);
  transition: transform 0.2s var(--ease-out), opacity 0.2s var(--ease-out);
  transform-origin: 50% 100%;
}

.b.is-current {
  transform: scaleY(1.14);
}

.bars.is-active .b:not(.is-current) {
  opacity: 0.55;
}

@media (prefers-reduced-motion: reduce) {
  .b {
    transition: none;
  }
}

.bar-legend {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.bar-legend .uptime {
  color: var(--ink);
  font-weight: 600;
}

.l30 {
  display: none;
}

/* phones: the last 30 days only */
@media (max-width: 600px) {
  .b:nth-child(-n + 60) {
    display: none;
  }

  .l90 {
    display: none;
  }

  .l30 {
    display: inline;
  }

  .bar-list {
    gap: 3px;
  }
}

.problems {
  margin-top: 10px;
  font-size: var(--t-small);
}

.problems summary {
  cursor: pointer;
  color: var(--ink-soft);
  width: fit-content;
}

.problems summary:hover {
  color: var(--accent);
}

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

.problems li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

/* popover drawn by status.js */
.tip {
  position: absolute;
  bottom: calc(100% + 10px);
  z-index: 5;
  width: max-content;
  max-width: min(300px, 80vw);
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--ink-fix);
  color: #ecebfa;
  font-size: var(--t-small);
  line-height: 1.4;
  box-shadow: 0 12px 30px -12px rgb(0 0 0 / 0.5);
  pointer-events: none;
  left: var(--x, 0);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.tip.is-open {
  opacity: 1;
  transform: none;
}

.tip strong {
  display: block;
}

.tip .tip-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.tip ul {
  margin: 6px 0 0;
  padding-left: 16px;
}

@media (prefers-color-scheme: dark) {
  .tip {
    background: #ecebfa;
    color: #191a3d;
  }
}

/* ---------- incidents ---------- */

.incident,
.maint {
  position: relative;
  padding: clamp(18px, 3vw, 28px);
  padding-left: calc(clamp(18px, 3vw, 28px) + 8px);
  overflow: hidden;
}

.incident::before,
.maint::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  background: var(--imp, var(--line));
}

.impact-minor { --imp: var(--s-degraded); }
.impact-major { --imp: var(--s-partial_outage); }
.impact-critical { --imp: var(--s-major_outage); }
.impact-none { --imp: var(--s-operational); }
.maint { --imp: var(--s-maintenance); }

.incident-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
}

.tag-impact {
  background: var(--imp, var(--paper));
  color: var(--ink-fix);
  box-shadow: none;
}

.tag-maint {
  background: var(--s-maintenance);
  color: var(--s-maintenance-fg);
  box-shadow: none;
}

.live-dot {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--imp, var(--apple));
}

.incident-title {
  font-size: var(--t-1);
  line-height: 1.2;
}

.incident-title a {
  text-decoration: none;
}

.incident-title a:hover {
  text-decoration: underline;
}

.affected,
.period {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 10px;
  font-size: var(--t-small);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 2px 8px;
  border-radius: 999px;
  background: var(--paper);
  font-weight: 600;
}

.timeline {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.tl {
  position: relative;
  padding: 0 0 18px 24px;
}

.tl::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--ink-soft);
}

.tl:first-child::before {
  background: var(--imp, var(--accent));
}

.tl-resolved::before,
.tl-resolved:first-child::before {
  background: var(--s-operational);
}

.tl::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 24px;
  bottom: 2px;
  width: 2px;
  background: var(--line);
}

.tl:last-child {
  padding-bottom: 0;
}

.tl:last-child::after {
  display: none;
}

.tl-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  font-size: var(--t-small);
}

.tl-body {
  margin-top: 4px;
  max-width: 68ch;
}

.tl-body p + p {
  margin-top: 0.6em;
}

.maint .tl-body {
  margin-top: 12px;
}

/* ---------- past events ---------- */

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

.day {
  padding: 18px clamp(18px, 3vw, 28px);
}

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

.day-title {
  font-size: 1rem;
  letter-spacing: 0;
  margin-bottom: 6px;
}

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

.event {
  position: relative;
  padding-left: 18px;
}

.event::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--imp, var(--s-maintenance));
}

.event-title {
  font-weight: 700;
  text-decoration: none;
}

.event-title:hover {
  text-decoration: underline;
}

.event-meta {
  margin-top: 2px;
}

.event-text {
  margin-top: 4px;
  max-width: 68ch;
}

.event-dated {
  display: grid;
  grid-template-columns: 7.5em minmax(0, 1fr);
  gap: 4px 16px;
}

.event-dated + .event-dated {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

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

.event-date {
  color: var(--ink-soft);
  font-size: var(--t-small);
  padding-top: 2px;
}

@media (max-width: 520px) {
  .event-dated {
    grid-template-columns: 1fr;
  }
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

/* ---------- page heads & detail pages ---------- */

.page-head {
  margin: 8px 0 clamp(24px, 4vw, 36px);
}

.page-head h1 {
  margin: 4px 0 10px;
  text-wrap: balance;
}

.crumb {
  font-size: var(--t-small);
  color: var(--ink-soft);
}

.crumb a {
  text-decoration: none;
}

.crumb a:hover {
  text-decoration: underline;
}

.lead {
  font-size: var(--t-1);
  line-height: 1.4;
  max-width: 42ch;
  color: var(--ink-soft);
}

.lead strong {
  color: var(--ink);
}

.with-byte {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.page-byte {
  width: 120px;
  height: auto;
  flex: none;
}

@media (max-width: 520px) {
  .page-byte {
    display: none;
  }
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px 28px;
  margin: 22px 0 0;
}

.facts dt {
  font-size: var(--t-small);
  color: var(--ink-soft);
}

.facts dd {
  margin: 2px 0 0;
  font-weight: 600;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.prose {
  max-width: 72ch;
}

.prose p + p {
  margin-top: 0.8em;
}

.narrow {
  max-width: 680px;
}

/* ---------- forms ---------- */

.form {
  display: grid;
  gap: 22px;
}

.field label,
.field legend {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

input[type="email"],
input[type="text"],
input[type="password"],
input[type="search"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 11px 14px;
  transition: border-color 0.2s var(--ease-out);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--ink-soft);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--ink);
  outline-offset: 2px;
}

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

.field-error {
  color: var(--ink);
  font-weight: 600;
  margin-top: 6px;
  display: flex;
  gap: 6px;
}

.field-error::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  width: 1.3em;
  height: 1.3em;
  border-radius: 4px;
  background: var(--apple);
  color: #191a3d;
  font-size: 0.85em;
}

.radio,
.check,
.field .radio,
.field .check {
  margin: 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  cursor: pointer;
}

input[type="radio"],
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--cobalt);
  flex: none;
}

@media (prefers-color-scheme: dark) {
  input[type="radio"],
  input[type="checkbox"] {
    accent-color: var(--butter);
  }
}

.choices {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 12px;
  background: var(--paper);
}

/* with JS the list only shows for "selected components" */
.js .choices.is-hidden {
  display: none;
}

.choice-group legend {
  font-weight: 700;
  margin: 0;
  padding: 0;
}

.choice-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0 16px;
  padding-left: 30px;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.actions {
  display: flex;
  gap: 12px;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.alert {
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 600;
  box-shadow: inset 4px 0 0 var(--a);
  background: var(--surface);
  margin-bottom: 16px;
}

.form .alert {
  margin: 0;
  background: var(--paper);
}

.alert-error { --a: var(--apple); }
.alert-ok { --a: var(--leaf); }

.danger-zone {
  margin-top: 16px;
  display: grid;
  gap: 10px;
  justify-items: start;
}

.h3 {
  font-size: var(--t-1);
}

/* ---------- message pages ---------- */

.message {
  text-align: left;
  display: grid;
  gap: 16px;
  justify-items: start;
  margin-top: 12px;
}

.message h1 {
  font-size: var(--t-2);
}

.message-byte {
  width: 150px;
  height: auto;
  padding: 18px 20px;
  border-radius: 20px;
  background-color: var(--board);
  background-image: radial-gradient(rgb(255 255 255 / 0.13) 1.6px, transparent 1.9px);
  background-size: 14px 14px;
  box-sizing: content-box;
}

/* ---------- footer ---------- */

.site-foot {
  margin-top: clamp(48px, 7vw, 88px);
  background: var(--foot);
  color: #f1f0f8;
  padding-top: clamp(40px, 6vw, 72px);
  overflow: hidden;
}

.site-foot a {
  text-decoration: none;
}

.site-foot a:hover {
  color: var(--butter);
  text-decoration: underline;
}

.site-foot :focus-visible {
  outline-color: var(--butter);
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}

@media (max-width: 820px) {
  .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .foot-brand {
    grid-column: 1 / -1;
  }
}

.foot-claim {
  font-size: var(--t-1);
  line-height: 1.35;
  max-width: 24ch;
  margin-bottom: 22px;
}

.foot-col h2 {
  font-size: var(--t-small);
  font-weight: 600;
  letter-spacing: 0;
  color: #a9aacb;
  margin-bottom: 12px;
}

.foot-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgb(255 255 255 / 0.12);
  font-size: var(--t-small);
  color: #a9aacb;
}

.foot-mark {
  margin-top: 36px;
  padding-inline: var(--gutter);
  color: #2c2f7a;
}

.foot-mark svg {
  width: 100%;
  max-width: calc(var(--max) + 32px);
  margin: 0 auto -1.2%;
  height: auto;
  aspect-ratio: 450 / 70;
  fill: currentColor;
}

@media (prefers-color-scheme: dark) {
  .foot-mark {
    color: #1a1c4a;
  }
}
