/*
  site.css — styles for the public pages only: the business landing
  (index.html, class "biz" on <html>), the developer landing (developers.html,
  class "dev") and the sign-in placeholder (signin.html). The survey, brief
  and admin pages use styles.css; the two questionnaires add survey.css on top,
  which repeats the .biz / .dev colours below — change both together.

  Rules: every colour comes from the tokens below (no raw hex further down),
  no rounded corners, no shadows. Structure comes from 1px / 2px rules.

  Fonts in /fonts are IBM Plex (OFL licence in fonts/OFL-LICENSE.txt),
  subset once with fonttools (pip install fonttools brotli):
    pyftsubset IBMPlexSans-Regular.ttf --flavor=woff2 \
      --unicodes="U+0020-007E,U+00A0-00FF,U+0100-017F,U+2013-2014,U+2018-201E,U+2022,U+2026,U+20AC,U+2192,U+2212" \
      --layout-features="kern,liga,tnum,lnum,case" --output-file=IBMPlexSans-Regular.woff2
  (same command for each of the six weights).
*/

/* ─── Tokens ──────────────────────────────────────────────────────────── */

.biz { color-scheme: light;
  --surface:#f3f5f6; --surface-sunk:#e6eaeb; --ink:#1b2328; --muted:#55636a;
  --edge:#77848a; --hairline:#d2d8da; --accent:#0b5bbf; --on-accent:#ffffff; --signal:#be3129; }
.dev { color-scheme: dark;
  --surface:#1b2328; --surface-sunk:#232c32; --ink:#f3f5f6; --muted:#9aa7ae;
  --edge:#77848a; --hairline:#2e383e; --accent:#63a8e8; --on-accent:#1b2328; --signal:#f08a80; }

:root {
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  /* WHY fluid (not fixed pixels): margins and spacing grow with the screen,
     so the logo, hero text and every section share one left edge on a phone,
     a laptop and a 4K monitor alike. rem follows the visitor's font size. */
  --gutter: clamp(1rem, 5vw, 6rem);       /* left / right page margin */
  --section-y: clamp(2.5rem, 7vw, 6.5rem);/* top / bottom of a section */
  --gap: clamp(1rem, 2vw, 1.5rem);        /* between items */
  --gap-lg: clamp(2.5rem, 5vw, 4rem);     /* between columns */
}

/* ─── Fonts ───────────────────────────────────────────────────────────── */

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/IBMPlexSans-Regular.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("fonts/IBMPlexSans-Medium.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("fonts/IBMPlexSans-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/IBMPlexMono-Regular.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("fonts/IBMPlexMono-Medium.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("fonts/IBMPlexMono-SemiBold.woff2") format("woff2"); }

/* ─── Base ────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; border-radius: 0; }
/* WHY !important: [hidden] must win over any display rule below (grid, flex …). */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  /* WHY 5.25rem: jumps to #sections land below the sticky header (3.75rem) plus some air. */
  scroll-padding-top: 5.25rem;
  /* WHY: on very large screens (≈2000px wide and up) everything sized in rem
     grows a little with the screen, up to 125% on 4K; below that it's the
     visitor's own font size (100%), which their browser setting still controls. */
  font-size: clamp(100%, 0.5rem + 0.4vw, 125%);
}
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
/* While the mobile menu is open the page behind it doesn't scroll. */
html.menu-open, html.menu-open body { overflow: hidden; }

h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

h1, .display {
  font-size: clamp(2.25rem, 1.5rem + 2.4vw, 4.25rem);
  font-weight: 600; line-height: 1.08; letter-spacing: -0.015em;
}
h2 { font-size: clamp(1.5rem, 1.25rem + 0.8vw, 2rem); font-weight: 600; line-height: 1.2; }
h3, .h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.25; }
.small { font-size: 0.875rem; line-height: 1.5; color: var(--muted); }

/* Label: kickers, section labels, card headers, status lines. */
.label {
  font-family: var(--font-mono);
  font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  line-height: 1.5;
  color: var(--muted);
}
/* Figure: prices, counts like "3 / 3 geprüft". */
.figure {
  font-family: var(--font-mono);
  font-size: 0.9375rem; font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Facts not decided yet ([n], [Datum] …) — visible on purpose, exactly as
   written (so not uppercased inside a label). */
.placeholder { color: var(--signal); text-transform: none; }

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

/* ─── Links, buttons, focus ───────────────────────────────────────────── */

a { color: inherit; }
.text-link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25rem;
}
.text-link:hover { text-decoration-thickness: 2px; }

/* Ghost button: for the secondary actions that used to be underlined text
   (Sign out, Back, Offers, "Passwort vergessen?" …). A thin frame, no
   underline; the frame and text turn blue on hover. Links inside a sentence
   stay underlined text links. */
.btn-ghost, .link-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0 1rem;
  border: 1px solid var(--edge); background: transparent; color: var(--ink);
  font: inherit; font-size: 0.875rem; font-weight: 500; line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer;
}
.btn-ghost:disabled, .link-button:disabled { opacity: 0.4; cursor: not-allowed; }

/* WHY blue: the accent marks the one thing to do on the page — start a
   request / apply. Contrast: 6.4:1 (light) and 6.3:1 (dark). */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0 1.5rem;
  border: 1px solid var(--accent);
  background: var(--accent); color: var(--on-accent);
  font: inherit; font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn-secondary {
  min-height: 2.75rem;
  border-color: var(--accent);
  background: transparent; color: var(--accent);
}

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--edge);
  outline-offset: 2px;
}

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 20;
  padding: 0.75rem 1rem;
  background: var(--ink); color: var(--surface);
}
.skip-link:focus { top: 1rem; }

/* ─── Layout helpers ──────────────────────────────────────────────────── */

.inner { padding: 0 var(--gutter); }
.section { padding: var(--section-y) 0; }
.sunk { background: var(--surface-sunk); }
.section-head { display: grid; gap: 0.5rem; margin-bottom: 2.5rem; }

/* ─── Header ──────────────────────────────────────────────────────────── */

/* The header stays at the top while scrolling, only a little taller than its
   tallest items (the 2.75rem logo and buttons). */
.site-header {
  position: sticky; top: 0; z-index: 10;
  border-bottom: 1px solid var(--hairline); background: var(--surface);
}
/* WHY a 1fr · auto · 1fr grid: the section links sit in the middle of the
   page, however wide the logo and the right-hand group are. */
.header-inner {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.5rem;
  padding: 0.5rem var(--gutter);
}
.header-inner > .logo { justify-self: start; }
.header-inner a, .header-inner .btn { white-space: nowrap; }
.logo {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 2.75rem;
  color: var(--ink);
  font-weight: 600; font-size: 1.375rem; letter-spacing: -0.01em;
  text-decoration: none;
  /* WHY: the logo stays put while the other page is revealed (see the view
     transition at the end of this file). */
  view-transition-name: site-logo;
}
.logo svg { width: 0.875rem; height: auto; }
.site-nav { display: flex; justify-content: center; }
.site-nav ul { display: flex; gap: 1.5rem; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  color: var(--ink); text-decoration: none;
}
.site-nav a:hover { text-decoration: underline; text-underline-offset: 0.25rem; }
.header-right { display: flex; align-items: center; justify-self: end; gap: 1rem; }

.lang-switch { display: flex; align-items: center; gap: 0.25rem; view-transition-name: site-lang; }
.lang-switch[hidden] { display: none; }
.lang-btn {
  min-width: 2.75rem; min-height: 2.75rem; padding: 0 0.375rem;
  border: 0; background: transparent; color: var(--muted);
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.08em;
  cursor: pointer;
}
.lang-btn span { padding-bottom: 2px; border-bottom: 2px solid transparent; }
.lang-btn[aria-current="true"] { color: var(--ink); }
.lang-btn[aria-current="true"] span { border-bottom-color: var(--ink); }
.lang-sep { color: var(--muted); font-family: var(--font-mono); font-size: 0.6875rem; }

.audience-link { white-space: nowrap; }

.menu-button {
  display: none;
  min-width: 2.75rem; min-height: 2.75rem; padding: 0;
  border: 1px solid var(--edge); background: transparent; color: var(--ink);
  cursor: pointer;
}
.menu-button svg { display: block; margin: 0 auto; }
.menu-button .icon-close, .menu-button[aria-expanded="true"] .icon-open { display: none; }
.menu-button[aria-expanded="true"] .icon-close { display: block; }
/* Inside the sticky header: scrolls on its own if it is taller than the screen. */
.menu-panel { max-height: calc(100svh - 3.75rem); overflow-y: auto; border-bottom: 1px solid var(--hairline); background: var(--surface); }
.menu-panel[hidden] { display: none; }
.menu-panel ul { border-top: 1px solid var(--ink); }
.menu-panel li { border-bottom: 1px solid var(--hairline); }
.menu-panel a.menu-link {
  display: flex; align-items: center; min-height: 3.5rem; padding: 0 var(--gutter);
  color: var(--ink); text-decoration: none; font-size: 1.25rem; font-weight: 600;
}
.menu-extra { display: grid; gap: 1rem; padding: 1.5rem var(--gutter); }
.menu-extra .btn, .menu-extra .btn-ghost { width: 100%; }

/* ─── Hero ────────────────────────────────────────────────────────────── */

.hero { display: grid; grid-template-columns: 1fr 1fr; min-height: clamp(30rem, 72svh, 52rem); }
.hero-text {
  display: flex; flex-direction: column; justify-content: flex-end; gap: var(--gap);
  padding: var(--section-y) var(--gutter);
}
.hero-text h1 span { display: block; }

.hero-sub { max-width: 34em; font-size: 1.125rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }
.status-line { padding-top: 1rem; border-top: 1px solid var(--ink); }

.hero-panel {
  display: flex; align-items: flex-end;
  padding: var(--gutter);
  background: var(--accent);
}

/* Business page: the blue panel shows how many developers are in the pool. */
.pool-panel { color: var(--on-accent); }
.pool-figure { display: grid; gap: 0.5rem; }
.pool-panel .label { color: var(--on-accent); }
.pool-number {
  font-size: clamp(6rem, 3rem + 9vw, 12rem); font-weight: 600; line-height: 0.9; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.pool-caption { font-size: 1.5rem; font-weight: 600; line-height: 1.2; }

/* ─── How it works ────────────────────────────────────────────────────── */

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.steps li { display: grid; align-content: start; gap: 0.5rem; padding-top: 1rem; border-top: 2px solid var(--accent); }

/* ─── Sample (a shortlist / a brief) ──────────────────────────────────── */

.sample { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--gap-lg); align-items: start; }
.sample-text { display: grid; gap: var(--gap); max-width: 30em; }
.not-box { display: grid; gap: 0.5rem; padding-top: 1rem; border-top: 1px solid var(--ink); }

.record { padding: 1.5rem; background: var(--surface-sunk); }
.record-head {
  display: flex; justify-content: space-between; gap: 1rem;
  padding-bottom: 0.5rem; border-bottom: 1px solid var(--ink);
}
.record-title { display: grid; gap: 0.25rem; margin: 1rem 0 0.5rem; }
.entries > li {
  display: grid; grid-template-columns: 2rem 1fr auto; gap: 0.5rem 1rem;
  padding: 1rem 0; border-bottom: 1px solid var(--hairline);
}
.entries .num { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--muted); padding-top: 2px; }
.entry-body { display: grid; gap: 0.375rem; }
.entry-name { font-weight: 600; }
.checks { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.entry-side { display: grid; justify-items: end; align-content: start; gap: 2px; text-align: right; }
.record-sig { margin-top: 1rem; }

/* ─── Costs + FAQ ─────────────────────────────────────────────────────── */

.costs-faq { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-lg); align-items: start; }
.costs { border-top: 1px solid var(--ink); }
.costs div {
  display: grid; grid-template-columns: 10rem 1fr; gap: 1rem; align-items: baseline;
  padding: 1rem 0; border-bottom: 1px solid var(--hairline);
}

.faq { margin-top: 0.5rem; border-top: 1px solid var(--ink); }
.faq li { border-bottom: 1px solid var(--hairline); }
.faq h3 { font-size: 1rem; }
.faq-q {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  width: 100%; min-height: 3.5rem; padding: 0.75rem 0;
  border: 0; background: transparent; color: var(--ink);
  font: inherit; font-weight: 600; text-align: left; cursor: pointer;
}
.faq-q:hover .faq-text { text-decoration: underline; text-underline-offset: 0.25rem; }
.faq-sign { font-family: var(--font-mono); font-weight: 500; }
/* WHY: without JavaScript every answer is visible and the +/− means nothing. */
.no-js .faq-sign { visibility: hidden; }
.faq-a { max-width: 35em; padding: 0 0 1rem; }
.faq-a[hidden] { display: none; }

/* ─── Closing CTA ─────────────────────────────────────────────────────── */

/* The closing call to action sits on a blue band (same accent as the hero panel). */
.closing { background: var(--accent); color: var(--on-accent); }
.closing .inner { display: grid; gap: var(--gap-lg); padding-top: calc(var(--section-y) * 1.6); padding-bottom: calc(var(--section-y) * 1.6); }
.closing-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }
.closing-meta { display: grid; gap: 0.5rem; max-width: 40rem; padding-top: 1rem; border-top: 1px solid var(--on-accent); }
.closing .label { color: var(--on-accent); }
/* On the band the button turns light, so it still stands out. */
.closing .btn { border-color: var(--surface); background: var(--surface); color: var(--ink); }
.closing :focus-visible { outline-color: var(--on-accent); }
/* WHY: red placeholders would be unreadable on blue — dotted underline instead. */
.closing .placeholder { color: var(--on-accent); text-decoration: underline dotted; text-underline-offset: 3px; }

/* ─── Footer ──────────────────────────────────────────────────────────── */

.site-footer { border-top: 1px solid var(--ink); }
.site-footer .inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2.5rem;
  padding-top: 2.5rem; padding-bottom: 2.5rem;
}
.site-footer .logo { font-size: 1.125rem; view-transition-name: none; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.foot-links a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.foot-copy { margin-left: auto; }

/* ─── Sign-in (signin.html) ───────────────────────────────────────────── */

/* Centred on the page, like most sign-in screens: one column in the middle,
   vertically centred in the space under the header. */
.signin {
  display: grid; align-content: center; gap: var(--gap-lg);
  width: 100%; max-width: calc(30rem + 2 * var(--gutter)); margin: 0 auto;
  min-height: calc(100svh - 6rem);
  padding: var(--section-y) var(--gutter);
}
.signin-head { text-align: center; }
.signin-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }
.signin-actions .btn { flex: 1 1 10rem; }
.signin-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem; font-size: 0.875rem; }
.signin-head { display: grid; gap: 0.5rem; }
.signin-forms { display: grid; gap: var(--gap); }
.signin-box { display: grid; gap: 0.5rem; padding-top: 1rem; border-top: 1px solid var(--ink); }
.signin-or { text-align: center; }
/* "Google sign-in doesn't work inside this app": above the Google button. */
.signin-notice { display: grid; gap: 0.75rem; padding: 1rem; margin-bottom: 0.5rem; border: 1px solid var(--edge); background: var(--surface); }
/* Google's logo left of the label, both centred (Google's branding rules). */
.btn-google { gap: 0.75rem; }
.btn-google svg { flex: none; }
.field-input {
  width: 100%; min-height: 3rem; padding: 0 0.75rem;
  border: 1px solid var(--edge); background: var(--surface); color: var(--ink);
  font: inherit;
}
.code-input { font-family: var(--font-mono); letter-spacing: 0.2em; text-transform: uppercase; max-width: 12rem; }
.form-status { font-size: 0.875rem; color: var(--signal); }
#email-status, #signed-in-text, #copy-link-status { color: var(--ink); }

/* ─── Offers (offer.html) ─────────────────────────────────────────────── */

/* Logo left, account links right (no section links on this page). */
.header-simple { grid-template-columns: auto 1fr; }
.header-simple .header-right { gap: clamp(1rem, 2vw, 1.5rem); }

.offers {
  display: grid; align-content: start; gap: var(--gap-lg);
  width: 100%; max-width: calc(46rem + 2 * var(--gutter)); margin: 0 auto;
  padding: var(--section-y) var(--gutter);
}
.offers-head { display: grid; gap: 0.5rem; }
.offer-list { display: grid; gap: var(--gap-lg); }
/* One offer: a blue rule on top, like the steps on the landing pages. */
.offer { display: grid; gap: 1rem; padding-top: 1rem; border-top: 2px solid var(--accent); }
.offer.is-closed { border-top-color: var(--hairline); color: var(--muted); }
.offer-note { display: grid; gap: 0.25rem; padding: 1rem; background: var(--surface-sunk); }
.offer-summary-title { margin-top: 0.5rem; }
.offer-record { border-top: 1px solid var(--ink); }
.offer-record div {
  display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); gap: 1rem; align-items: baseline;
  padding: 0.75rem 0; border-bottom: 1px solid var(--hairline);
}
.offer-areas { border-top: 1px solid var(--ink); }
.offer-areas > li { display: grid; gap: 0.5rem; padding: 1rem 0; border-bottom: 1px solid var(--hairline); }
.offer-area-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.5rem 1rem; }
.offer-area-head h4 { margin: 0; font-size: 1rem; font-weight: 600; }
.offer-areas blockquote { display: grid; gap: 0.25rem; margin: 0; padding-left: 1rem; border-left: 2px solid var(--hairline); }
.offer-answered { display: grid; gap: 0.5rem; justify-items: start; }
.offer-decline { display: grid; gap: 0.75rem; }
.offer-decline fieldset { display: grid; gap: 0.25rem; margin: 0; padding: 0; border: 0; }
.offer-decline legend { margin-bottom: 0.5rem; }
.offer-reason { display: flex; align-items: center; gap: 0.75rem; min-height: 2.75rem; cursor: pointer; }
.offer-reason input { width: 1.25rem; height: 1.25rem; accent-color: var(--accent); }
textarea.field-input { min-height: 6rem; padding: 0.75rem; resize: vertical; }
/* Matched: the blue panel of the landing pages, with the contact details. */
.offer-matched { display: grid; gap: 0.75rem; padding: var(--gap); background: var(--accent); color: var(--on-accent); }
.offer-matched .label, .offer-matched .text-link { color: var(--on-accent); }

/* Chat (matched offers): own messages right on a light blue, the other side left. */
.offer-chat { display: grid; gap: 0.75rem; padding-top: 1rem; border-top: 2px solid var(--accent); }
.chat-thread {
  display: grid; gap: 0.75rem; max-height: min(60svh, 32rem); overflow-y: auto;
  padding: 1rem; background: var(--surface-sunk);
}
.chat-msg { display: grid; gap: 0.25rem; max-width: min(85%, 34rem); padding: 0.75rem 1rem; background: var(--surface); }
.chat-msg.is-mine { justify-self: end; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.chat-msg.is-theirs { justify-self: start; border-left: 2px solid var(--accent); }
.chat-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-compose { display: grid; gap: 0.5rem; }

/* The list: one row per offer — date and title, its state, an arrow. */
.offer-rows { border-top: 1px solid var(--ink); }
.offer-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 0.5rem 1.25rem;
  padding: 1.25rem 0.75rem; border-bottom: 1px solid var(--hairline);
  color: var(--ink); text-decoration: none;
}
.offer-row:hover { background: var(--surface-sunk); }
.offer-row:hover .offer-row-arrow { color: var(--accent); transform: translateX(0.25rem); }
.offer-row-main { display: grid; gap: 0.25rem; }
.offer-row-title { font-size: 1.25rem; font-weight: 600; line-height: 1.25; }
.offer-row-arrow { font-size: 1.25rem; color: var(--muted); transition: transform 150ms ease; }
/* State tag: blue when it needs an answer, solid blue once matched, muted when closed. */
.offer-tag {
  padding: 0.25rem 0.5rem; border: 1px solid var(--hairline);
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
}
.offer-tag.is-open { border-color: var(--accent); color: var(--accent); }
.offer-tag.is-matched { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.offer-row.is-closed .offer-row-title { color: var(--muted); }
.offer-list > .btn-ghost { justify-self: start; }
@media (prefers-reduced-motion: reduce) { .offer-row-arrow { transition: none; } }
.offer-matched .offer-record { border-top-color: var(--on-accent); }
.offer-matched .offer-record div { border-bottom-color: color-mix(in srgb, var(--on-accent) 35%, transparent); }
.offer-matched :focus-visible { outline-color: var(--on-accent); }

/* ─── Header below 80em (≈80rem): section links move into the menu ─── */
/* WHY a second switch just for the header: below that the four section links
   can't sit centred between the logo and DE / EN · audience link · CTA.
   In em, so it moves with the visitor's font size and zoom. */
@media (max-width: 79.99em) {
  .header-inner { grid-template-columns: auto 1fr; }
  .site-nav { display: none; }
  .header-right { gap: 1rem; }
  .menu-button { display: inline-flex; align-items: center; justify-content: center; }
  .menu-button[hidden] { display: none; }
}

/* ─── Narrow screens (below 48em ≈ 48rem) ─────────────────────────────── */

@media (max-width: 47.99em) {
  .header-inner { gap: 0.5rem; padding: 0.5rem var(--gutter); }
  .offer-record div { grid-template-columns: 1fr; gap: 0.25rem; }
  .offer-row { grid-template-columns: minmax(0, 1fr) auto; padding: 1rem 0.25rem; }
  .offer-row-arrow { display: none; }
  .offer-row .offer-tag { grid-column: 2; grid-row: 1; }
  /* WHY the audience link stays: switching business ↔ developer is always one tap away. */
  .header-right .btn-secondary { display: none; }
  .header-right { gap: 0.5rem; }
  .audience-link { font-size: 0.875rem; }
  /* Landing pages: Feedback moves into the menu (lib/feedback.js), the header is full. */
  .header-right:has(.menu-button) .feedback-button { display: none; }

  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-text { padding: 2.5rem var(--gutter); }
  .pool-panel { padding: 2.5rem var(--gutter); }
  .pool-number { font-size: 6rem; }

  .steps, .sample, .costs-faq { grid-template-columns: 1fr; }
  .sample, .costs-faq { gap: 2.5rem; }
  .costs div { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
  .entries > li { grid-template-columns: 2rem 1fr; }
  .entry-side { grid-column: 2; justify-items: start; text-align: left; }

  .closing .inner { padding-top: 4rem; padding-bottom: 4rem; }
}

/* Very narrow phones: the header keeps the mark only, so logo, DE / EN, the
   audience link and the menu still fit on one line at 22.5rem. */
@media (max-width: 24.99em) {
  .header-inner .logo span { display: none; }
  .header-inner .logo { min-width: 2.75rem; justify-content: center; }
  .foot-copy { margin-left: 0; }
}

/* ─── Business ↔ developer transition (lib/audience-switch.js) ─────────── */
/* The other landing page is revealed by a circle growing from where the
   visitor clicked. Only between the two landing pages — audience-switch.js
   skips it for any other navigation (e.g. to sign-in). Browsers without
   cross-document view transitions (Firefox today) simply navigate. */

@view-transition { navigation: auto; }

/* An English visitor's landing page stays hidden until lib/landing.js has
   swapped the German HTML for English — no German flash (max 1.5 s). */
html.lang-pending body { visibility: hidden; }

::view-transition-old(root) { animation: none; }
::view-transition-new(root) { animation: slate-reveal 700ms cubic-bezier(.33, 0, .15, 1); }
/* WHY the hold: the circle is drawn on the same thread as the page's script.
   lib/audience-switch.js keeps it paused (showing the old page) until
   lib/landing.js has loaded its text and language, so it then runs without stutter. */
html.vt-hold::view-transition-new(root) { animation-play-state: paused; }
@keyframes slate-reveal {
  from { clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 0)); }
  to   { clip-path: circle(150vmax at var(--vt-x, 50%) var(--vt-y, 0)); }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  ::view-transition-new(root), ::view-transition-old(root) { animation: none; }
}

/* Button hover: the button lifts up-left and leaves a hard edge behind
   (a sharp offset, no blur — the "no soft shadows" rule still holds).
   Same on keyboard focus; pressing pushes it back down. --btn-edge is the
   edge colour (light where buttons sit on a dark or blue background). */
.btn, .btn-ghost, .link-button { transition: transform 150ms ease, box-shadow 150ms ease; }
.btn:not(:disabled):is(:hover, :focus-visible),
.btn-ghost:not(:disabled):is(:hover, :focus-visible),
.link-button:not(:disabled):is(:hover, :focus-visible) {
  transform: translate(-3px, -3px);
  box-shadow: 3px 3px 0 0 var(--btn-edge, var(--ink));
  text-decoration: none;
}
.btn:not(:disabled):active,
.btn-ghost:not(:disabled):active,
.link-button:not(:disabled):active {
  transform: none; box-shadow: none; transition-duration: 50ms;
}
@media (prefers-reduced-motion: reduce) {
  .btn, .btn-ghost, .link-button { transition: none; }
  .btn:not(:disabled):is(:hover, :focus-visible),
.btn-ghost:not(:disabled):is(:hover, :focus-visible),
.link-button:not(:disabled):is(:hover, :focus-visible) { transform: none; }
}
/* On the blue closing band the edge is light, so it shows on blue. */
.closing { --btn-edge: var(--surface); }

/* Phones: the account header (offers, sign-in) — smaller buttons that wrap
   onto a second line instead of pushing the page sideways. */
@media (max-width: 47.99em) {
  .header-simple { grid-template-columns: auto minmax(0, 1fr); }
  .header-simple .header-right { flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; }
  .header-simple .header-right .btn-ghost { min-height: 2.5rem; padding: 0 0.625rem; font-size: 0.8125rem; }
}

/* Small phones (below 25em ≈ 400px, down to 320px): logo mark, DE / EN,
   the audience link and the menu button still fit on one line. */
@media (max-width: 24.99em) {
  .header-right { gap: 0.25rem; }
  .lang-btn { min-width: 2.25rem; }
  .lang-sep { display: none; }
  .audience-link { padding: 0 0.5rem; }
}

/* ─── Project (matched offers, lib/project.js) ────────────────────────── */
/* Left: what's chosen; right: the progress rail (sticky). On phones the
   rail becomes a bar at the top that opens the step list. */

.offers.is-project { max-width: calc(76rem + 2 * var(--gutter)); }
.project-head { display: grid; gap: 0.25rem; }
.project { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: var(--gap-lg); align-items: start; }
.project-main { min-width: 0; display: grid; gap: var(--gap); }
.project-panel { display: grid; gap: 1rem; align-content: start; }
.project-panel > h2 { outline: none; }
.project-callout { padding: 0.75rem 1rem; border-left: 2px solid var(--accent); background: var(--surface-sunk); }

.project-rail { position: sticky; top: 5.25rem; display: grid; gap: 0.75rem; padding-top: 1rem; border-top: 2px solid var(--accent); }
.project-rail-toggle { display: none; }
.project-rail-body { display: grid; gap: 0.75rem; }
.project-progress-text { font-weight: 600; }
.project-bar { height: 0.5rem; background: var(--surface-sunk); border: 1px solid var(--hairline); }
.project-bar-fill { display: block; height: 100%; background: var(--accent); transition: width 300ms ease; }
.project-steps { display: grid; border-top: 1px solid var(--hairline); }
.project-step {
  display: grid; grid-template-columns: 1rem minmax(0, 1fr); gap: 0.75rem; align-items: start; width: 100%;
  padding: 0.75rem 0.5rem; border: 0; border-bottom: 1px solid var(--hairline); background: transparent;
  color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.project-step:disabled { cursor: default; }
.project-step:not(:disabled):hover, .project-step.is-selected { background: var(--surface-sunk); }
.project-step.is-selected { box-shadow: inset 2px 0 0 var(--accent); }
/* Marker: empty square → outlined blue (running) → solid blue (approved). */
.project-step-marker { width: 1rem; height: 1rem; margin-top: 0.2rem; border: 1px solid var(--edge); background: var(--surface); }
.project-step.is-in_progress .project-step-marker, .project-step.is-changes .project-step-marker { border: 2px solid var(--accent); }
.project-step.is-review .project-step-marker { border: 2px solid var(--accent); background: linear-gradient(135deg, var(--accent) 50%, var(--surface) 50%); }
.project-step.is-approved .project-step-marker { border-color: var(--accent); background: var(--accent); }
.project-step-text { display: grid; gap: 0.125rem; min-width: 0; }
.project-step-title { font-weight: 600; line-height: 1.3; }
.project-step-meta { font-size: 0.8125rem; color: var(--muted); }
.project-step-meta.is-overdue, .is-overdue { color: var(--signal); }
.project-rail-links { display: grid; gap: 0.5rem; padding-top: 0.25rem; }
.project-nav {
  min-height: 2.75rem; padding: 0 1rem; border: 1px solid var(--edge); background: transparent; color: var(--ink);
  font: inherit; font-size: 0.875rem; font-weight: 500; text-align: left; cursor: pointer;
}
.project-nav.is-selected { border-color: var(--accent); color: var(--accent); }

.project-step-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.project-tag.is-review { border-color: var(--accent); color: var(--accent); }
.project-tag.is-approved { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.project-tag.is-changes { border-color: var(--signal); color: var(--signal); }
.project-review { display: grid; gap: 0.75rem; padding: 1rem; border: 2px solid var(--accent); }
.project-review-title { font-weight: 600; }

/* Timeline of a step. */
.project-posts { display: grid; gap: 0.75rem; }
.project-post { display: grid; gap: 0.5rem; padding: 1rem; background: var(--surface-sunk); border-left: 2px solid var(--hairline); }
.project-post.is-update { border-left-color: var(--accent); }
.project-post.is-approved, .project-post.is-auto_approved, .project-post.is-plan_agreed { border-left-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.project-post.is-changes { border-left-color: var(--signal); }
.project-post-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.project-links { display: grid; gap: 0.25rem; }
.project-links a { overflow-wrap: anywhere; }
.project-files { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.project-file.is-image a { display: block; border: 1px solid var(--hairline); }
.project-file.is-image img { display: block; width: 9rem; height: 6rem; object-fit: cover; object-position: top; background: var(--surface); }
.project-file-link {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.75rem;
  min-height: 2.75rem; padding: 0.5rem 0.75rem; border: 1px solid var(--edge); background: var(--surface);
  color: var(--ink); text-decoration: none; max-width: 24rem;
}
.project-file-link:hover { border-color: var(--accent); }
.project-file-type { font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; color: var(--accent); }
.project-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-empty { padding: 1rem 0; }

/* Writing an update / comment. */
.project-compose { display: grid; gap: 0.5rem; padding-top: 1rem; border-top: 1px solid var(--ink); }
/* An approved step: no form, just this line where it would be. */
.project-closed { margin: 0; padding-top: 1rem; border-top: 1px solid var(--ink); color: var(--muted); }
.project-links-input { min-height: 3.5rem; font-family: var(--font-mono); font-size: 0.875rem; }
.project-attach { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.project-picked { display: grid; gap: 0.25rem; }
.project-picked li { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.375rem 0.5rem; background: var(--surface-sunk); font-size: 0.875rem; }
.project-picked-remove { min-width: 2rem; min-height: 2rem; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1.125rem; cursor: pointer; }
.project-ask { margin-top: 0.25rem; }
.project-record { padding-top: 0.5rem; }

/* The plan before it's agreed. */
.project-plan-list { display: grid; border-top: 1px solid var(--ink); counter-reset: plan; }
.project-plan-list li { display: grid; gap: 0.125rem; padding: 0.75rem 0 0.75rem 2rem; border-bottom: 1px solid var(--hairline); position: relative; counter-increment: plan; }
.project-plan-list li::before { content: counter(plan); position: absolute; left: 0; top: 0.75rem; font-family: var(--font-mono); color: var(--muted); }
.project-plan-title { font-weight: 600; }
.project-plan-edit { display: grid; gap: 1rem; }
.project-plan-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; padding: 1rem; border: 1px solid var(--hairline); }
.project-plan-fields { display: grid; gap: 0.375rem; }
.project-plan-fields .field-input { margin-bottom: 0.375rem; }
.project-plan-tools { display: grid; gap: 0.5rem; align-content: start; }
.project-plan-tools .btn-ghost { min-height: 2.25rem; padding: 0 0.75rem; }

@media (max-width: 63.99em) {
  .project { grid-template-columns: minmax(0, 1fr); gap: var(--gap); }
  .project-rail { grid-row: 1; position: static; padding-top: 0; border-top: 0; }
  .project-rail-toggle {
    display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; width: 100%;
    min-height: 3rem; padding: 0.5rem 1rem; border: 1px solid var(--edge); border-top: 2px solid var(--accent);
    background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; text-align: left; cursor: pointer;
  }
  .project-rail-body { display: none; padding: 0 0.25rem; }
  .project-rail.is-open .project-rail-body { display: grid; }
}
@media (max-width: 47.99em) {
  .project-plan-row { grid-template-columns: minmax(0, 1fr); }
  .project-plan-tools { grid-template-columns: repeat(3, auto); justify-content: start; }
}
@media (prefers-reduced-motion: reduce) { .project-bar-fill { transition: none; } }
.project-panel .signin-actions .btn, .project-panel .signin-actions .btn-ghost { flex: 0 0 auto; }

/* ─── Meetings (lib/meeting.js): the calendar window and the chat cards ─ */

.fb-dialog.meet-dialog { width: min(100% - 2rem, 56rem); }
.meet-form { display: grid; gap: 1rem; padding: clamp(1.25rem, 4vw, 2rem); }
.meet-pick { display: grid; grid-template-columns: minmax(16rem, 1fr) minmax(0, 1.25fr); gap: 1.5rem; align-items: start; }
.meet-month { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.meet-month-name { text-align: center; font-weight: 600; text-transform: capitalize; }
.meet-nav { min-width: 2.75rem; min-height: 2.75rem; border: 1px solid var(--edge); background: transparent; color: var(--ink); font: inherit; font-size: 1.25rem; cursor: pointer; }
.meet-nav:disabled { opacity: 0.3; cursor: default; }
.meet-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.meet-weekday { padding: 0.25rem 0; text-align: center; font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.06em; color: var(--muted); }
.meet-day {
  aspect-ratio: 1; min-height: 2.5rem; border: 1px solid var(--hairline); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 0.875rem; font-variant-numeric: tabular-nums; cursor: pointer; position: relative;
}
.meet-day.is-outside { border: 0; background: transparent; }
.meet-day:disabled { color: var(--muted); background: transparent; opacity: 0.45; cursor: default; }
.meet-day:not(:disabled):hover { border-color: var(--accent); }
.meet-day.is-today { font-weight: 700; }
.meet-day.has-pick::after { content: ''; position: absolute; left: 50%; bottom: 0.3rem; width: 0.375rem; height: 0.375rem; margin-left: -0.1875rem; background: var(--accent); }
.meet-day[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.meet-day[aria-pressed="true"].has-pick::after { background: var(--on-accent); }
.meet-times { display: grid; gap: 0.75rem; align-content: start; justify-items: start; }
.meet-times.is-waiting .meet-wheels { opacity: 0.4; pointer-events: none; }
/* Time wheels: a scrolling column per number; the middle row (blue band) is the value. */
.meet-wheels { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem 1.5rem; }
.meet-wheel-group { display: grid; gap: 0.375rem; }
.meet-wheel-pair { display: flex; align-items: center; gap: 0.5rem; }
.meet-unit { font-family: var(--font-mono); font-size: 0.875rem; color: var(--muted); }
.meet-times .meet-fieldset, .meet-times .meet-field { width: 100%; }
.meet-chosen-text { display: grid; gap: 0.125rem; min-width: 0; overflow-wrap: anywhere; }
.meet-chosen-when { font-weight: 600; }
.meet-option { display: grid; gap: 0.125rem; min-width: 0; overflow-wrap: anywhere; }
.meet-option-when { font-variant-numeric: tabular-nums; }
.meet-option-choice { align-items: flex-start; padding: 0.25rem 0; }
.meet-option-choice input { margin-top: 0.2rem; }
.meet-option-list li + li { margin-top: 0.375rem; }
.meet-colon { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 600; }
.meet-wheel { position: relative; width: 5rem; height: 12.5rem; border: 1px solid var(--edge); background: var(--surface); }
.meet-wheel:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.meet-wheel::before {
  content: ''; position: absolute; left: 0; right: 0; top: calc(50% - 1.25rem); height: 2.5rem;
  border-block: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); pointer-events: none;
}
.meet-wheel-list {
  height: 100%; margin: 0; padding: 5rem 0; list-style: none; overflow-y: auto;
  scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain;
  -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent);
          mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent);
}
.meet-wheel-list::-webkit-scrollbar { display: none; }
.meet-wheel-item {
  display: flex; align-items: center; justify-content: center; height: 2.5rem; scroll-snap-align: center;
  font-family: var(--font-mono); font-size: 1.25rem; font-variant-numeric: tabular-nums; color: var(--muted); cursor: pointer;
}
.meet-wheel-item.is-selected { color: var(--ink); font-weight: 600; }
.meet-add { min-height: 2.5rem; }
.meet-time-hint { min-height: 1.25rem; }
.meet-chosen { display: grid; gap: 0.375rem; padding-top: 0.75rem; border-top: 1px solid var(--hairline); }
.meet-chosen-list { display: grid; gap: 0.25rem; }
.meet-chosen-list li { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.25rem 0.5rem; background: var(--surface-sunk); }
.meet-remove { min-width: 2.25rem; min-height: 2.25rem; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1.125rem; cursor: pointer; }
.meet-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.meet-fieldset legend { margin-bottom: 0.375rem; }
.meet-choice { display: flex; flex-wrap: wrap; }
.meet-choice-item { position: relative; cursor: pointer; }
.meet-choice-item + .meet-choice-item { margin-left: -1px; }
.meet-choice-item span { display: flex; align-items: center; min-height: 2.5rem; padding: 0 1rem; border: 1px solid var(--edge); font-size: 0.875rem; font-weight: 500; }
.meet-choice-item input:checked + span { position: relative; border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.meet-choice-item input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.meet-field { display: grid; gap: 0.375rem; }

/* In the chat: a card per request; short lines for answers. */
.chat-actions { flex-wrap: wrap; }
.chat-actions .btn, .chat-actions .btn-ghost { flex: 0 0 auto; }
.meet-card { gap: 0.5rem; max-width: min(92%, 34rem); border-top: 2px solid var(--accent); }
.meet-card.is-mine { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.meet-card.is-accepted { border-top-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.meet-card.is-declined, .meet-card.is-withdrawn, .meet-card.is-replaced, .meet-card.is-cancelled, .meet-card.is-expired, .meet-card.is-done { border-top-color: var(--hairline); color: var(--muted); }
.meet-topic { font-weight: 600; }
.meet-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; font-size: 0.875rem; }
.meet-tag.is-accepted { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.meet-tag.is-open { border-color: var(--accent); color: var(--accent); }
.meet-options { display: grid; gap: 0.125rem; margin: 0; padding: 0; border: 0; }
.meet-options .is-past { opacity: 0.45; }
.meet-option-list { display: grid; gap: 0.25rem; font-variant-numeric: tabular-nums; }
.meet-option-list.is-closed li { text-decoration: line-through; }
.meet-confirmed { font-weight: 600; font-variant-numeric: tabular-nums; }
.meet-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.meet-actions .btn { min-height: 2.5rem; padding: 0 1rem; }
.meet-reason { display: grid; gap: 0.375rem; }
.chat-line { justify-self: center; max-width: 90%; padding: 0.25rem 0.75rem; font-size: 0.8125rem; color: var(--muted); text-align: center; }

/* Next meeting in the progress rail. */
.project-next-meeting { display: grid; gap: 0.25rem; padding: 0.75rem; border: 1px solid var(--accent); }
.project-next-when { font-weight: 600; font-variant-numeric: tabular-nums; }
.project-next-meeting .btn-ghost { justify-self: start; margin-top: 0.25rem; min-height: 2.25rem; font-size: 0.8125rem; }

@media (max-width: 47.99em) {
  .meet-pick { grid-template-columns: minmax(0, 1fr); }
  .fb-dialog.meet-dialog { width: 100%; max-height: 100svh; }
  .meet-card { max-width: 100%; }
}

/* Inner pages: Impressum and privacy links at the very bottom (landing pages have their own footer). */
.legal-foot { padding: 2rem 1rem 2.5rem; text-align: center; font-size: 0.8125rem; color: var(--muted); }
.legal-foot a { color: inherit; text-decoration: underline; text-underline-offset: 0.2rem; }
.legal-foot a:hover { color: var(--ink); }
