/*
 * YesMeetsNo. No external resources: fonts, icons and drawings ship with the site.
 *
 * Layout idea: flat blocks of grey and white, as on the earlier site; blue
 * stands for "yes", red for "no", and wherever the two sit side by side they
 * meet at a hard edge. Black outlines and square buttons with an arrow.
 * One look only, no dark variant: every colour below is set explicitly.
 */

@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("fonts/open-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  color-scheme: light;

  --blue: #63bfec;
  --blue-deep: #17709f;
  --blue-soft: #e7f5fd;
  --red: #e45f5d;
  --red-deep: #b3312f;
  --red-soft: #fdeceb;
  --ink: #111111;
  --muted: #595e66;
  --line: #d3d8de;
  --surface: #ffffff;
  --page: #f1f3f5;

  --display: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --text: "Open Sans", "Segoe UI", system-ui, sans-serif;

  --width: 1120px;
  --gutter-left: max(20px, env(safe-area-inset-left, 0px));
  --gutter-right: max(20px, env(safe-area-inset-right, 0px));
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 14px;
  text-wrap: balance;
}

h1 {
  font-size: clamp(30px, 4.4vw, 44px);
}

h2 {
  font-size: clamp(23px, 3vw, 30px);
}

h3 {
  font-size: 19px;
}

p {
  margin: 0 0 14px;
  max-width: 66ch;
}

a {
  color: inherit;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

.container {
  width: 100%;
  max-width: var(--width);
  margin: 0 auto;
  padding-left: var(--gutter-left);
  padding-right: var(--gutter-right);
}

.narrow {
  max-width: 760px;
}

.center {
  text-align: center;
}

.center p {
  margin-left: auto;
  margin-right: auto;
}

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

.small {
  font-size: 14px;
}

.hidden {
  display: none !important;
}

/* --- icons, tiles, chips -------------------------------------------------------- */

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: currentColor;
  vertical-align: -0.28em;
}

.icon.flip {
  transform: scaleX(-1);
}

.tile {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
}

.tile .icon {
  width: 28px;
  height: 28px;
  vertical-align: 0;
}

.tile-blue {
  background: var(--blue);
}

.tile-red {
  background: var(--red);
}

.tile-small {
  width: 40px;
  height: 40px;
}

.tile-small .icon {
  width: 22px;
  height: 22px;
}

.tile-big {
  width: 88px;
  height: 88px;
}

.tile-big .icon {
  width: 46px;
  height: 46px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--ink);
  background: var(--surface);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* click-through preview only */
.chip-preview {
  border-style: dashed;
  background: #fff3c4;
}

/* Parts of a page that are switched off for now carry the attribute "hidden". */
[hidden] {
  display: none !important;
}

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

/* drawing helpers: SVG is coloured through classes, never inline styles */

.ink-line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fill-white {
  fill: var(--surface);
}

.fill-ink {
  fill: var(--ink);
}

.fill-blue {
  fill: var(--blue);
}

.fill-red {
  fill: var(--red);
}

.fill-blue-soft {
  fill: var(--blue-soft);
}

.fill-red-soft {
  fill: var(--red-soft);
}

/* --- banner, header, footer ------------------------------------------------------- */

.banner {
  background: #fff3c4;
  border-bottom: 1px solid #d8b400;
  padding: 8px var(--gutter-right) 8px var(--gutter-left);
  font-size: 13px;
  text-align: center;
}

.site-header {
  position: relative;
  z-index: 3;
  background: var(--surface);
  border-bottom: 2px solid var(--ink);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  min-height: 68px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-mark {
  width: 44px;
  height: 36px;
  flex: none;
}

.logo-mark .ink-line {
  stroke-width: 2.4;
}

.mark-sign {
  fill: none;
  stroke: var(--surface);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logo-word {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.logo-word .yes {
  color: var(--blue-deep);
}

.logo-word .no {
  color: var(--red-deep);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
}

.nav a {
  padding: 6px 0;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

.nav a:hover {
  border-bottom-color: var(--line);
}

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

.site-footer {
  background: var(--surface);
  border-top: 2px solid var(--ink);
  padding: 40px 0 34px;
  font-size: 14px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px 48px;
}

.site-footer p {
  margin: 10px 0 0;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  font-family: var(--display);
  font-weight: 600;
}

.lang-switch strong {
  padding: 3px 9px;
  border: 2px solid var(--ink);
  background: var(--blue);
}

.lang-switch a {
  padding: 3px 9px;
  border: 2px solid var(--line);
  text-decoration: none;
}

.lang-switch a:hover {
  border-color: var(--ink);
}

.site-footer nav {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 8px 32px;
  align-content: start;
}

/* --- sections ------------------------------------------------------------------- */

.section {
  padding: 68px 0;
}

.section-white {
  background: var(--surface);
}

.section-quiet {
  padding: 28px 0 40px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 26px;
}

.section-head h2 {
  margin: 0;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 2px;
}

.text-link .icon {
  transition: transform 0.18s var(--ease);
}

.text-link:hover .icon {
  transform: translateX(3px);
}

.text-link:hover .icon.flip {
  transform: scaleX(-1) translateX(3px);
}

.back {
  margin-bottom: 22px;
}

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

.hero {
  padding: 64px 0 72px;
}

.hero-small {
  padding: 46px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 32px 48px;
}

.hero-text {
  min-width: 0;
}

.hero-title {
  font-size: clamp(44px, 7.4vw, 82px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin-bottom: 22px;
}

.hero-title .yes,
.hero-title .no {
  display: inline-block;
  padding: 0 0.16em;
  border: 3px solid var(--ink);
}

.hero-title .yes {
  background: var(--blue);
  transform: rotate(-2deg);
}

.hero-title .no {
  background: var(--red);
  transform: rotate(2deg);
}

/* German headline: "Ja" on a line of its own, "trifft Nein" below it. */
:lang(de) .hero-title .yes {
  display: table;
}

.hero-lead {
  font-size: 18px;
  max-width: 54ch;
}

.hero-art {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  justify-self: center;
}

.art-word {
  fill: var(--ink);
  font-family: var(--display);
  font-size: 40px;
  font-weight: 700;
}

.art-shadow {
  fill: var(--ink);
  opacity: 0.08;
}

.art-bubble {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 30px;
  font-size: 14px;
  color: var(--muted);
}

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

.trust .icon {
  color: var(--ink);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-width: 190px;
  padding: 13px 18px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease), background-color 0.12s;
}

.btn::after {
  content: "\2192";
  font-size: 19px;
  line-height: 0.8;
  transition: transform 0.18s var(--ease);
}

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

.btn:hover::after {
  transform: translateX(3px);
}

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

.btn-primary {
  background: var(--blue);
}

.btn:disabled {
  opacity: 0.55;
  cursor: progress;
  transform: none;
  box-shadow: 4px 4px 0 var(--ink);
}

.btn-small {
  min-width: 0;
  padding: 9px 13px;
  font-size: 13px;
  box-shadow: 3px 3px 0 var(--ink);
}

.btn-small::after {
  content: none;
}

.btn-plain {
  min-width: 0;
  padding: 6px 0;
  border: 0;
  background: none;
  box-shadow: none;
  font-weight: 500;
  text-decoration: underline;
}

.btn-plain::after {
  content: none;
}

.btn-plain:hover,
.btn-plain:active {
  transform: none;
  box-shadow: none;
  color: var(--red-deep);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 18px;
  margin-top: 26px;
}

.btn-row-center {
  justify-content: center;
}

/* --- how it works ----------------------------------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 36px 32px;
  margin-top: 40px;
  counter-reset: step;
}

.steps > li {
  position: relative;
  counter-increment: step;
  text-align: center;
}

.steps h3 {
  margin-top: 20px;
}

.steps h3::before {
  content: counter(step) ". ";
  color: var(--muted);
  font-weight: 500;
}

.steps p {
  margin: 0 auto;
  max-width: 30ch;
  font-size: 15px;
}

.mini {
  display: grid;
  place-content: center;
  gap: 12px;
  height: 150px;
  padding: 16px;
  border: 2px solid var(--ink);
  background: var(--page);
}

.mini-question {
  font-family: var(--display);
  font-weight: 600;
}

.mini-pills {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border: 2px solid var(--ink);
  background: var(--surface);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
}

.pill-yes {
  background: var(--blue);
}

.pill-off {
  color: var(--muted);
  border-color: var(--line);
}

.dot-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dot-label {
  width: 46px;
  margin-right: 6px;
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  color: var(--muted);
}

.dot {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--surface);
}

.dot-yes {
  background: var(--blue);
}

.dot-no {
  background: var(--red);
}

.dot-differs {
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--ink);
}

.mini-talk {
  grid-auto-flow: column;
  gap: 10px;
}

.mini-talk .tile {
  width: 46px;
  height: 46px;
}

.mini-talk .tile .icon {
  width: 24px;
  height: 24px;
}

/* --- topic cards ------------------------------------------------------------------ */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 26px;
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 2px solid var(--ink);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: transform 0.14s var(--ease), box-shadow 0.14s var(--ease);
}

.card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--ink);
}

.card:focus-visible {
  outline: 3px solid var(--blue-deep);
  outline-offset: 2px;
}

.card-picture {
  display: block;
  /* The shape of the drawing (src/cover.ts), so that nothing of it is cut off. */
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px;
}

.card h3 {
  margin: 0;
}

.card p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

/* Whatever stands above the last line takes the room that is left, so the last lines of a row of cards align. */
.card-body > :nth-last-child(2) {
  flex: 1;
}

.card-meta {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

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

.card-go {
  color: var(--ink);
  transition: transform 0.18s var(--ease);
}

.card:hover .card-go {
  transform: translateX(4px);
}

/* --- red and blue halves ------------------------------------------------------------ */

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.panel {
  display: flex;
  padding: 60px 0;
}

.panel-red {
  background: var(--red);
  justify-content: flex-end;
}

.panel-blue {
  background: var(--blue);
}

.panel-inner {
  width: 100%;
  max-width: calc(var(--width) / 2);
  padding-left: var(--gutter-left);
  padding-right: var(--gutter-right);
}

.panel-red .panel-inner {
  padding-right: 44px;
}

.panel-blue .panel-inner {
  padding-left: 44px;
}

.panel h2 {
  margin-top: 18px;
}

.promises {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 34px 32px;
}

.promises h3 {
  margin: 16px 0 8px;
}

.promises p {
  margin: 0;
  font-size: 15px;
}

.promises .signed {
  margin-bottom: 10px;
}

.callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 24px;
  padding: 28px;
  border: 2px solid var(--ink);
  background: var(--surface);
}

.callout-text {
  flex: 1 1 260px;
  min-width: 0;
}

.callout h2 {
  margin-bottom: 6px;
  font-size: 22px;
}

.callout p {
  margin: 0;
}

.two-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 36px 44px;
}

.tiled {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 22px;
}

.rule-box {
  padding: 26px;
  border: 2px solid var(--ink);
}

.rule-yes {
  background: var(--blue-soft);
}

.rule-no {
  background: var(--red-soft);
}

.signed li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.signed .icon {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  vertical-align: 0;
}

.signed-yes .icon {
  color: var(--blue-deep);
}

.signed-no .icon {
  color: var(--red-deep);
}

/* --- privacy drawing ------------------------------------------------------------------ */

.flow {
  display: grid;
  gap: 0;
  max-width: 820px;
  margin: 34px auto 22px;
  border: 2px solid var(--ink);
}

.flow-lane {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px 16px;
  padding: 22px;
}

.flow-lane-blue {
  background: var(--blue-soft);
}

.flow-lane-red {
  background: var(--red-soft);
}

.flow-node {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  min-width: 0;
  text-align: center;
}

.flow-node span:not(.tile) {
  font-size: 13px;
  color: var(--muted);
}

.flow-arrow {
  display: grid;
  place-items: center;
  width: 64px;
  height: 34px;
  background:
    linear-gradient(var(--ink), var(--ink)) left center / calc(50% - 16px) 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) right center / calc(50% - 16px) 2px no-repeat;
}

.flow-wall {
  display: grid;
  place-items: center;
  border-top: 2px dashed var(--ink);
  border-bottom: 2px dashed var(--ink);
  background: var(--surface);
  padding: 6px;
}

.flow-wall span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.flow-note {
  margin: 0 auto;
  font-size: 15px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 26px;
  margin-top: 34px;
}

.timeline li {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  text-align: center;
}

.timeline strong {
  margin-top: 8px;
  font-family: var(--display);
  font-size: 18px;
}

.timeline span:not(.tile) {
  max-width: 26ch;
  font-size: 15px;
  color: var(--muted);
}

/* --- topic page -------------------------------------------------------------------------- */

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 22px 0 0;
  font-size: 14px;
}

.facts div {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

.facts dd {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
}

.form-lead {
  margin: 0 0 26px;
  text-align: center;
  text-wrap: balance;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
}

.rule-note {
  display: flex;
  gap: 10px;
  max-width: none;
  margin-bottom: 30px;
  padding: 12px 14px;
  border-left: 6px solid var(--ink);
  background: var(--page);
  font-size: 14px;
}

.question {
  margin: 0 0 18px;
  padding: 28px 28px 26px;
  border: 0;
  background: var(--page);
  scroll-margin-top: 90px;
}

.question legend {
  float: left;
  width: 100%;
  padding: 0;
  margin-bottom: 20px;
}

.question legend + * {
  clear: both;
}

/* The question is what the visitor answers: the largest text after the title. */
.q-text {
  display: block;
  text-align: center;
  font-family: var(--display);
  font-size: clamp(21px, 2.6vw, 26px);
  font-weight: 700;
  line-height: 1.3;
  text-wrap: balance;
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.choice {
  position: relative;
  flex: 1 1 150px;
}

.choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  /* Above the visible button, so that the pointer always meets the input. */
  z-index: 1;
}

.choice > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  border: 2px solid var(--ink);
  background: var(--surface);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  /* The button stays where it is under the pointer: only its shadow changes. */
  transition: background-color 0.12s, box-shadow 0.12s;
}

.choice input:hover + span {
  box-shadow: 4px 4px 0 var(--ink);
}

/* Under the pointer a button shows a light version of what picking it means. */
@media (hover: hover) {
  .choice-yes input:hover:not(:checked) + span,
  .choice-no input:hover:not(:checked) + span {
    background: color-mix(in srgb, var(--blue) 35%, var(--surface));
  }

  .choice-neutral input:hover:not(:checked) + span,
  .choice-card input:hover:not(:checked) + span {
    background: var(--blue-soft);
  }
}

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

/* Both answers are blue when chosen (owner's decision, 2026-11-17): neither looks like the wrong one. */
.choice-yes input:checked + span,
.choice-no input:checked + span {
  background: var(--blue);
  box-shadow: 4px 4px 0 var(--ink);
}

.choice-neutral {
  flex: 0 1 auto;
}

.choice-neutral > span {
  padding: 10px 16px 10px 44px;
}

/* Choices of which several can be picked carry a small box; a picked one gets a check mark and a light field. */
.choice-neutral > span,
.choice-card > span {
  position: relative;
}

.choice-neutral > span::before,
.choice-card > span::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink);
  background: var(--surface);
}

.choice-neutral > span::before {
  left: 14px;
  top: 50%;
  margin-top: -9px;
}

.choice-card > span::before {
  top: 8px;
  right: 8px;
}

.choice-neutral input:checked + span::after,
.choice-card input:checked + span::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 10px;
  border: solid var(--ink);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.choice-neutral input:checked + span::after {
  left: 20px;
  top: 50%;
  margin-top: -7px;
}

.choice-card input:checked + span::after {
  top: 10px;
  right: 14px;
}

.choice-neutral input:checked + span,
.choice-card input:checked + span {
  background: var(--blue-soft);
  box-shadow: 4px 4px 0 var(--ink);
}

.choice-card {
  flex: 1 1 120px;
}

.choice-card > span {
  flex-direction: column;
  gap: 8px;
  padding: 16px 10px;
  font-size: 14px;
}

.choice-card .icon {
  width: 30px;
  height: 30px;
  vertical-align: 0;
}

.form-step {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 44px 0 20px;
  padding-top: 26px;
  border-top: 2px solid var(--ink);
  font-size: 22px;
}

.form-step:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* Languages and ways to talk: asked like the questions above, on the same grey field. */
.group {
  margin: 0 0 18px;
  padding: 28px 28px 26px;
  border: 0;
  background: var(--page);
}

.group-after-questions {
  margin-top: 36px;
  scroll-margin-top: 90px;
}

.group legend {
  float: left;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 0;
  margin-bottom: 20px;
  font-family: var(--display);
  font-size: clamp(19px, 2.2vw, 22px);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
}

.group legend + * {
  clear: both;
}

/* Answers and choices sit in the middle, at the size of their words rather than the full width. */
.question .choices,
.group .choices {
  justify-content: center;
}

.question .choice {
  flex: 1 1 0;
  max-width: 170px;
}

.question .choice > span {
  padding: 10px 14px;
  font-size: 14px;
}

.field {
  margin: 0 0 26px;
}

.field label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-weight: 600;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field textarea,
.field select,
.question-list input,
.share input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
}

.field textarea {
  resize: vertical;
}

.field .hint {
  display: flex;
  gap: 6px;
  margin: 8px 0 0;
  max-width: none;
  font-size: 14px;
  color: var(--muted);
}

.field label + select,
.field select + label {
  margin-bottom: 14px;
}

.field select + label {
  margin-top: 14px;
}

.consent {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  margin: 0 0 26px;
  padding: 16px;
  border: 2px solid var(--ink);
  background: var(--page);
  font-size: 14px;
}

.consent input {
  width: 24px;
  height: 24px;
  margin: 2px 0 0;
  accent-color: var(--ink);
}

.submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
}

.submit-row-center {
  flex-direction: column;
  text-align: center;
}

.error.is-working {
  color: var(--muted);
}

/* Pictures suggested for a draft: four covers to pick from with one click. */
.picture-suggestions {
  margin: 0 0 22px;
}

.picture-suggestion-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.picture-suggestion {
  aspect-ratio: 16 / 10;
  padding: 0;
  border: 2px solid var(--ink);
  background: var(--surface);
  cursor: pointer;
  overflow: hidden;
}

.picture-suggestion[aria-pressed="true"] {
  box-shadow: 4px 4px 0 var(--ink);
  outline: 3px solid var(--blue);
  outline-offset: 0;
}

.ideas {
  margin-bottom: 44px;
}

.idea-group {
  margin: 0 0 10px;
  border: 2px solid var(--ink);
  background: var(--surface);
}

.idea-group summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  font-family: var(--display);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

.idea-group summary::after {
  content: "+";
  margin-left: auto;
  font-size: 22px;
  line-height: 1;
}

.idea-group[open] summary {
  border-bottom: 2px solid var(--ink);
}

.idea-group[open] summary::after {
  content: "\2212";
}

.idea-list {
  margin: 0;
  padding: 6px 16px 10px;
  list-style: none;
}

.idea-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.idea-list li:last-child {
  border-bottom: 0;
}

.idea-list .btn {
  flex: none;
}

@media (max-width: 640px) {
  .idea-list li {
    flex-direction: column;
    align-items: flex-start;
  }
}

.row-end {
  display: flex;
  justify-content: flex-end;
}

.error {
  margin: 0;
  color: var(--red-deep);
  font-size: 14px;
  font-weight: 600;
}

.report {
  font-size: 14px;
}

.report .field {
  max-width: 440px;
  margin: 0 auto;
  text-align: left;
}

/* --- notices and status cards --------------------------------------------------------------- */

.notice {
  padding: 26px;
  border: 2px solid var(--ink);
  background: var(--surface);
}

.notice-warn {
  background: var(--red-soft);
}

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

.status-card {
  position: relative;
  padding: 40px 32px 34px;
  border: 2px solid var(--ink);
  background: var(--surface);
  box-shadow: 8px 8px 0 var(--ink);
}

/* blue and red meet at a hard edge */
.status-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 10px;
  border-bottom: 2px solid var(--ink);
  background: linear-gradient(90deg, var(--blue) 50%, var(--red) 50%);
}

.status-card h1 {
  font-size: clamp(26px, 3.6vw, 34px);
}

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

.status-art {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 6px 0 22px;
}

.status-art .tile {
  width: 84px;
  height: 84px;
}

.status-art .tile .icon {
  width: 42px;
  height: 42px;
}

.status-art .tile + .tile {
  margin-left: -18px;
}

.status-topic {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  margin-bottom: 16px;
  padding: 6px 12px;
  border: 1px solid var(--ink);
  background: var(--page);
  font-size: 14px;
  font-weight: 600;
}

.tracker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 30px;
}

.tracker li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 0 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  color: var(--muted);
}

.tracker li::before {
  content: "";
  position: absolute;
  top: 19px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--line);
}

.tracker li:first-child::before {
  content: none;
}

.tracker .tile {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  border-color: var(--line);
  color: var(--muted);
}

.tracker .tile .icon {
  width: 22px;
  height: 22px;
}

.tracker .is-done,
.tracker .is-current {
  color: var(--ink);
}

.tracker .is-done::before,
.tracker .is-current::before {
  background: var(--ink);
}

.tracker .is-done .tile {
  border-color: var(--ink);
  background: var(--blue);
  color: var(--ink);
}

.tracker .is-current .tile {
  border-color: var(--ink);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--ink);
}

.share {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 18px;
}

.share input {
  flex: 1 1 260px;
  min-width: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin: 0 0 20px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 2px solid var(--ink);
  background: var(--page);
}

.stat strong {
  display: block;
  font-family: var(--display);
  font-size: 24px;
  line-height: 1;
}

.stat span:not(.tile) {
  font-size: 13px;
  color: var(--muted);
}

.preview {
  margin: 0 0 18px;
  padding: 20px 22px;
  border: 2px dashed var(--ink);
  background: var(--page);
}

.preview h2 {
  font-size: 21px;
}

.preview ol {
  list-style: decimal;
  padding-left: 22px;
  margin-bottom: 12px;
}

.preview li {
  margin-bottom: 6px;
}

.demo-mail {
  margin-top: 22px;
  padding: 16px;
  border: 2px dashed var(--ink);
  background: #fff3c4;
  font-size: 14px;
}

.demo-mail p {
  margin-bottom: 10px;
}

/* --- create a topic ------------------------------------------------------------------------- */

.question-list {
  list-style: decimal;
  margin: 0 0 14px;
  padding-left: 26px;
}

.question-list li {
  margin-bottom: 12px;
  padding-left: 4px;
}

.question-list li::marker {
  font-family: var(--display);
  font-weight: 700;
}

.question-list .btn-plain {
  font-size: 13px;
  padding: 2px 0;
}

.option-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.option-card {
  position: relative;
  display: block;
  cursor: pointer;
}

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

.option-card > span {
  display: grid;
  gap: 8px;
  align-content: start;
  height: 100%;
  padding: 16px;
  border: 2px solid var(--ink);
  background: var(--surface);
  font-size: 14px;
  transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease), background-color 0.12s;
}

.option-card strong {
  font-family: var(--display);
  font-size: 16px;
}

.option-card input:hover + span {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink);
}

.option-card input:focus-visible + span {
  outline: 3px solid var(--blue-deep);
  outline-offset: 2px;
}

.option-card input:checked + span {
  background: var(--blue-soft);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink);
}

.option-art {
  display: grid;
  gap: 6px;
  justify-content: start;
  margin-bottom: 4px;
}

.option-art .dot-row {
  justify-content: flex-start;
  gap: 6px;
}

.option-art .dot {
  width: 15px;
  height: 15px;
}

.option-art .dot-differs {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink);
}

/* --- operator page and development outbox ------------------------------------------------------ */

.mail {
  margin-bottom: 16px;
  padding: 18px 20px;
  border: 2px solid var(--ink);
  background: var(--surface);
}

.status-card .mail {
  background: var(--page);
}

.mail pre {
  margin: 12px 0 0;
  font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.mail .btn-row {
  margin-top: 14px;
}

.status-card h2 {
  margin-top: 30px;
  font-size: 20px;
}

/* --- motion -------------------------------------------------------------------------------- */

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}

@keyframes ring {
  0%,
  100% {
    box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--ink);
  }
  50% {
    box-shadow: 0 0 0 7px var(--surface), 0 0 0 9px var(--ink);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes orbit-left {
  0%,
  100% {
    transform: translateX(-10px);
  }
  50% {
    transform: translateX(8px);
  }
}

@keyframes orbit-right {
  0%,
  100% {
    transform: translateX(10px);
  }
  50% {
    transform: translateX(-8px);
  }
}

/* --- articles of the information section ------------------------------------------------------ */

.article p {
  margin: 0 0 16px;
}

.article > h2 {
  margin-top: 42px;
  font-size: 24px;
}

.article > h2:first-child {
  margin-top: 0;
}

.article .signed {
  margin-bottom: 8px;
}

.article .two-columns {
  margin: 20px 0 8px;
}

.article .notice {
  margin-top: 40px;
}

.article .callout {
  margin-top: 48px;
}

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

.points > li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.points h2 {
  margin: 12px 0 8px;
  font-size: 21px;
}

.points p {
  margin: 0;
}

.mode-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 22px;
  margin: 22px 0 8px;
}

.mode-card h3 {
  margin: 14px 0 6px;
  font-size: 18px;
}

.mode-card p {
  margin: 0;
  font-size: 15px;
}

.use-cases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 36px 40px;
  margin-top: 30px;
}

.use-cases h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.use-cases ol {
  margin: 0;
  padding-left: 32px;
  list-style: decimal;
}

.use-cases li {
  margin-bottom: 8px;
  padding-left: 4px;
}

.use-cases li::marker {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.contact {
  display: grid;
  gap: 2px;
  margin: 0 0 16px;
  padding: 18px 20px;
  border: 2px solid var(--ink);
  background: var(--page);
  font-style: normal;
}

/* --- pictures of topics and articles: see src/cover.ts ------------------------------------------- */

.cover {
  display: block;
  width: 100%;
  height: 100%;
}

.cover-photo {
  object-fit: cover;
}

.photo-credit a {
  color: inherit;
}

.cover-edge {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
}

.cover-dot {
  fill: var(--line);
}

.cover-stroke {
  fill: none;
  stroke: var(--line);
  stroke-width: 3;
  stroke-linecap: round;
}

.picture-frame {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 2px solid var(--ink);
  background: var(--surface);
  box-shadow: 6px 6px 0 var(--ink);
}

.picture-frame-wide {
  aspect-ratio: 3 / 1;
  margin-bottom: 18px;
  box-shadow: none;
}

.topic-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  align-items: start;
  gap: 24px 36px;
  margin-bottom: 8px;
}

.picture-picker {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: start;
  gap: 20px 24px;
}

.picture-pick p {
  margin: 0 0 10px;
}

.picture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 8px;
  max-height: 268px;
  overflow-y: auto;
  padding: 12px;
  border: 2px solid var(--ink);
  background: var(--surface);
}

.picture-group {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.picture-pick .picture-group:first-child {
  margin-top: 0;
}

.picture-choice {
  position: relative;
  display: block;
  aspect-ratio: 1;
}

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

.picture-choice > span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 2px solid var(--line);
  background: var(--surface);
}

.picture-choice .icon {
  width: 24px;
  height: 24px;
}

.picture-choice input:hover + span {
  border-color: var(--ink);
}

.picture-choice input:focus-visible + span {
  outline: 3px solid var(--blue-deep);
  outline-offset: 2px;
}

.picture-choice input:checked + span {
  border-color: var(--ink);
  background: var(--blue);
  box-shadow: 3px 3px 0 var(--ink);
}

@media (prefers-reduced-motion: no-preference) {
  .art-bubble-yes {
    animation: pop-in 0.5s 0.15s var(--ease) both, bob 5s 0.8s ease-in-out infinite;
  }

  .art-bubble-no {
    animation: pop-in 0.5s 0.45s var(--ease) both, bob 5s 1.6s ease-in-out infinite;
  }

  .art-spark {
    animation: blink 1.8s 1s ease-in-out infinite;
  }

  .mini-match .dot-differs,
  .tracker .is-current .tile {
    animation: ring 1.8s ease-in-out infinite;
  }

  .status-card {
    animation: rise 0.35s var(--ease) both;
  }

  .status-art.is-searching .tile:first-child {
    animation: orbit-left 2.4s ease-in-out infinite;
  }

  .status-art.is-searching .tile:last-child {
    animation: orbit-right 2.4s ease-in-out infinite;
  }

  .status-art.is-joined .tile {
    animation: pop-in 0.45s var(--ease) both;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* --- small screens ---------------------------------------------------------------------------- */

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-art {
    max-width: 420px;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 46px 0;
  }

  .hero {
    padding: 40px 0 46px;
  }

  .hero-small {
    padding: 32px 0 28px;
  }

  .panel {
    padding: 44px 0;
  }

  .panel-red .panel-inner,
  .panel-blue .panel-inner {
    max-width: none;
    padding-left: var(--gutter-left);
    padding-right: var(--gutter-right);
  }

  .nav {
    gap: 4px 18px;
    font-size: 14px;
  }

  .logo-word {
    font-size: 19px;
  }

  .btn {
    width: 100%;
  }

  .btn-small,
  .btn-plain {
    width: auto;
  }

  .status-card {
    padding: 34px 20px 26px;
    box-shadow: 5px 5px 0 var(--ink);
  }

  .question {
    padding: 18px 16px;
  }

  .flow-lane {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .flow-arrow {
    transform: rotate(90deg);
  }

  .site-footer nav {
    grid-template-columns: minmax(0, 1fr);
  }

  .topic-head,
  .picture-picker {
    grid-template-columns: minmax(0, 1fr);
  }

  .points > li {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 14px;
  }

  .points .tile {
    width: 40px;
    height: 40px;
  }

  .points .tile .icon {
    width: 22px;
    height: 22px;
  }

  .points h2 {
    margin-top: 6px;
    font-size: 19px;
  }

  .topic-head .picture-frame {
    order: -1;
    aspect-ratio: 2 / 1;
  }

  .picture-picker .picture-frame {
    max-width: 260px;
  }
}

@media (max-width: 400px) {
  .nav {
    gap: 4px 13px;
    font-size: 13px;
  }
}
