/* Loggad — public site styles (hand-written, committed).
   Consumes ONLY the design tokens from /brand/design (a build-time copy of
   loggad.client/src/assets/design — the single source of truth). No literal
   colours or fonts here; sizes are tokens except layout plumbing (the phone
   frame's proportions, hairlines). If a value is missing, add a token in the
   client design system, not a literal below.

   Themes: /js/theme-boot.js sets html[data-theme] to "light" or "dark" from
   prefers-color-scheme before first paint, so theme.css's
   :root[data-theme='dark'] overrides apply exactly as they do in the app.
   Without JavaScript the page renders the light theme.

   The production CSP is style-src 'self': no inline style attributes anywhere
   in the markup. */

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

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

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-primary);
  font: var(--text-body-md);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--text-accent);
  text-underline-offset: 0.18em;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

.skip-link {
  position: absolute;
  inset-inline-start: var(--space-4);
  inset-block-start: calc(-1 * var(--space-16));
  z-index: 10;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-inverse);
  color: var(--text-inverse);
  font: var(--text-label-md);
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  inset-block-start: var(--space-3);
}

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

.container {
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

@media (min-width: 720px) {
  .container {
    padding-inline: var(--space-10);
  }
}

/* ---- the logotype pair: one file per theme, swapped in CSS ---- */

.wordmark .logo-dark {
  display: none;
}

:root[data-theme='dark'] .wordmark .logo-light {
  display: none;
}

:root[data-theme='dark'] .wordmark .logo-dark {
  display: block;
}

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

.site-header {
  border-block-end: 1px solid var(--border-default);
  background: var(--bg-page);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-block-size: var(--space-16);
}

.wordmark {
  display: flex;
  align-items: center;
  min-block-size: 44px;
  text-decoration: none;
}

.wordmark img {
  display: block;
  block-size: 30px;
  inline-size: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  padding-inline: var(--space-3);
  font: var(--text-label-md);
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.site-nav a:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

.site-nav .open-journal {
  color: var(--text-accent);
}

/* ---- buttons: 44 px targets everywhere ---- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-block-size: 48px;
  padding: var(--space-3) var(--space-6);
  font: var(--text-label-md);
  font-size: 1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard);
}

.button svg {
  inline-size: 18px;
  block-size: 18px;
}

.button-primary {
  background: var(--accent-default);
  color: var(--accent-text-on);
  border: 1px solid var(--accent-default);
}

.button-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.button-primary:active {
  background: var(--accent-active);
}

.button-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.button-secondary:hover {
  background: var(--bg-surface);
}

/* ---- section rhythm ---- */

.section {
  padding-block: var(--space-16);
}

@media (min-width: 960px) {
  .section {
    padding-block: var(--space-24);
  }
}

.section + .section {
  border-block-start: 1px solid var(--border-default);
}

.eyebrow {
  margin: 0 0 var(--space-4);
  font: var(--text-label-caps);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-accent);
}

.section-title {
  margin: 0;
  font: var(--text-display-md);
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

@media (min-width: 720px) {
  .section-title {
    font-size: 2.75rem;
  }
}

.section-lede {
  margin: var(--space-4) 0 0;
  max-inline-size: 36em;
  font: var(--text-body-lg);
  color: var(--text-secondary);
  text-wrap: pretty;
}

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

.hero {
  padding-block: var(--space-10) var(--space-12);
  overflow: hidden;
}

.hero .container {
  display: grid;
  gap: var(--space-12);
  align-items: center;
}

@media (min-width: 960px) {
  .hero {
    padding-block: var(--space-20) var(--space-24);
  }

  .hero .container {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-12);
  }
}

.hero-title {
  margin: 0;
  font: var(--text-display-lg);
  font-size: 2.75rem;
  line-height: 1.05;
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

@media (min-width: 720px) {
  .hero-title {
    font-size: 4.25rem;
  }
}

.hero-title em {
  font-style: italic;
  color: var(--text-accent);
}

.hero-lede {
  margin: var(--space-6) 0 0;
  max-inline-size: 30em;
  font: var(--text-body-lg);
  font-size: 1.1875rem;
  color: var(--text-secondary);
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-block-start: var(--space-8);
}

.hero-actions .button {
  flex: 1 1 auto;
}

@media (min-width: 480px) {
  .hero-actions .button {
    flex: 0 0 auto;
  }
}

.hero-note {
  margin: var(--space-5) 0 0;
  font: var(--text-body-sm);
  color: var(--text-tertiary);
}

.hero-note a {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  color: var(--text-secondary);
}

/* ---- hero visual: the phone, the photograph being read, the badge ---- */

.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
}

@media (min-width: 960px) {
  .hero-visual {
    align-items: flex-end;
    padding-inline-end: var(--space-8);
  }
}

.phone {
  position: relative;
  inline-size: min(100%, 320px);
  aspect-ratio: 9 / 18.5;
  padding: 10px;
  border-radius: 44px;
  background: var(--bg-inverse);
  box-shadow: var(--shadow-lg);
}

:root[data-theme='dark'] .phone {
  background: var(--paper-2);
  box-shadow: 0 0 0 1px var(--border-strong), var(--shadow-lg);
}

.phone-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  block-size: 100%;
  overflow: hidden;
  border-radius: 34px;
  background: var(--bg-page);
}

.app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-8) var(--space-4) var(--space-2);
}

.app-bar-title {
  font: var(--text-display-sm);
  font-size: 1.375rem;
  line-height: 1.2;
}

.app-bar-meta {
  font: var(--text-label-sm);
  color: var(--text-tertiary);
}

/* The photograph (an illustration of one: a rating plate on a wall). */
.photo {
  position: relative;
  margin: var(--space-2) var(--space-3) 0;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  background: var(--photo-wall);
  overflow: hidden;
}

.plate {
  position: absolute;
  inset: 14% 12%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 6% 9%;
  border-radius: 4px;
  background: var(--photo-plate);
  color: var(--photo-plate-ink);
  font: var(--text-mono-sm);
  font-size: 0.5625rem;
  line-height: 1.35;
  transform: rotate(-2deg);
}

.plate-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  white-space: nowrap;
}

.plate-head {
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* A region Loggad inspected: the symbol's rounded scan-corner brackets,
   drawn around the exact rows it framed. The brackets fade in; the rows
   themselves never do. */
.region {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.region::before {
  content: '';
  position: absolute;
  inset: -4px -8px;
  --corner: 11px;
  border-radius: 4px;
  background:
    linear-gradient(var(--photo-scan), var(--photo-scan)) top left / var(--corner) 2px no-repeat,
    linear-gradient(var(--photo-scan), var(--photo-scan)) top left / 2px var(--corner) no-repeat,
    linear-gradient(var(--photo-scan), var(--photo-scan)) top right / var(--corner) 2px no-repeat,
    linear-gradient(var(--photo-scan), var(--photo-scan)) top right / 2px var(--corner) no-repeat,
    linear-gradient(var(--photo-scan), var(--photo-scan)) bottom left / var(--corner) 2px no-repeat,
    linear-gradient(var(--photo-scan), var(--photo-scan)) bottom left / 2px var(--corner) no-repeat,
    linear-gradient(var(--photo-scan), var(--photo-scan)) bottom right / var(--corner) 2px no-repeat,
    linear-gradient(var(--photo-scan), var(--photo-scan)) bottom right / 2px var(--corner) no-repeat;
  opacity: 0;
  animation: region-in var(--duration-reveal) var(--ease-settle) forwards;
}

.region-1::before {
  animation-delay: 900ms;
}

.region-2::before {
  animation-delay: 1500ms;
}

.region-3::before {
  animation-delay: 2100ms;
}

.scan-line {
  position: absolute;
  inset-inline: 0;
  inset-block-start: 0;
  block-size: 2px;
  background: var(--photo-scan);
  box-shadow: 0 0 12px 2px var(--photo-scan);
  opacity: 0.9;
  animation: scan 2.8s var(--ease-standard) infinite;
}

@keyframes scan {
  0% {
    inset-block-start: 0%;
    opacity: 0;
  }
  12% {
    opacity: 0.9;
  }
  88% {
    opacity: 0.9;
  }
  100% {
    inset-block-start: 100%;
    opacity: 0;
  }
}

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

/* The folded stage line under the photograph. */
.stage-line {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-3) var(--space-3) 0;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  font: var(--text-label-sm);
  color: var(--text-secondary);
}

.stage-line svg {
  inline-size: 16px;
  block-size: 16px;
  color: var(--verified-fg);
  flex: none;
}

/* The receipt: what was written down, a correction on every line. */
.receipt {
  margin: var(--space-3) var(--space-3) 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
}

.receipt-label {
  margin: 0 0 var(--space-2);
  font: var(--text-label-caps);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-tertiary);
}

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

.receipt-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  padding-block: var(--space-2);
  font: var(--text-body-sm);
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--text-primary);
}

.receipt-list li + li {
  border-block-start: 1px solid var(--border-default);
}

.receipt-fix {
  flex: none;
  font: var(--text-label-sm);
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
}

/* The phone's bottom bar: Home · Ask · Documents · Account. */
.tab-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-block-start: auto;
  padding: var(--space-2) var(--space-2) var(--space-5);
  border-block-start: 1px solid var(--border-default);
  background: var(--bg-page);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font: var(--text-label-sm);
  font-size: 0.625rem;
  color: var(--text-tertiary);
}

.tab svg {
  inline-size: 18px;
  block-size: 18px;
}

.tab-active {
  color: var(--text-accent);
}

/* The steel badge. On a phone it sits under the handset, touching only its
   bezel; on a wide screen it leans against the handset's left edge in the
   free space beside it. Neither position covers a line of the app. */
.badge {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--space-3);
  inline-size: 210px;
  margin-block-start: calc(-1 * var(--space-4));
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: linear-gradient(
    135deg,
    var(--steel-100) 0%,
    var(--steel-300) 38%,
    var(--steel-100) 55%,
    var(--steel-300) 100%
  );
  box-shadow:
    inset 0 0 0 1px var(--steel-500),
    var(--shadow-md);
  color: var(--steel-engrave);
  transform: rotate(-4deg);
}

@media (min-width: 960px) {
  .badge {
    position: absolute;
    inset-inline-start: -2%;
    inset-block-end: 12%;
    inline-size: 230px;
    margin: 0;
  }
}

.badge-qr {
  inline-size: 64px;
  block-size: 64px;
  color: var(--steel-engrave);
}

.badge-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-inline-size: 0;
}

.badge-mark {
  inline-size: 72px;
  block-size: auto;
}

.badge-code {
  font: var(--text-mono-sm);
  font-size: 0.625rem;
  letter-spacing: 0.02em;
}

/* ---- the contrast: general knowledge vs this object ---- */

.contrast .container {
  display: grid;
  gap: var(--space-10);
}

@media (min-width: 960px) {
  .contrast .container {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    align-items: end;
    gap: var(--space-16);
  }
}

.contrast-quote {
  margin: 0;
  font: var(--text-display-md);
  font-size: 2.125rem;
  line-height: 1.15;
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

@media (min-width: 720px) {
  .contrast-quote {
    font-size: 3.25rem;
  }
}

.contrast-quote .quiet {
  color: var(--text-tertiary);
}

.contrast-body {
  margin: 0;
  font: var(--text-body-lg);
  color: var(--text-secondary);
  text-wrap: pretty;
}

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

.steps {
  list-style: none;
  margin: var(--space-12) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
  }
}

.step {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
}

.step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.step-number {
  font: var(--text-mono-md);
  color: var(--text-tertiary);
}

.step-icon {
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  border-radius: var(--radius-full);
  background: var(--accent-surface);
  color: var(--text-accent);
}

.step-icon svg {
  inline-size: 22px;
  block-size: 22px;
}

.step h3 {
  margin: var(--space-2) 0 0;
  font: var(--text-heading-lg);
}

.step p {
  margin: 0;
  font: var(--text-body-md);
  color: var(--text-secondary);
}

/* ---- the answer showcase ---- */

.showcase .container {
  display: grid;
  gap: var(--space-12);
  align-items: center;
}

@media (min-width: 960px) {
  .showcase .container {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: var(--space-16);
  }
}

.chat {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
}

@media (min-width: 720px) {
  .chat {
    padding: var(--space-8);
  }
}

.chat-question {
  align-self: flex-end;
  max-inline-size: 85%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-xs) var(--radius-lg);
  background: var(--accent-default);
  color: var(--accent-text-on);
  font: var(--text-body-md);
}

.chat-answer {
  max-inline-size: 92%;
  font: var(--text-body-md);
  color: var(--text-primary);
}

.chat-answer p {
  margin: 0 0 var(--space-3);
}

.chat-sources {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.source-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-block-size: 36px;
  padding: var(--space-1) var(--space-3) var(--space-1) var(--space-1);
  border-radius: var(--radius-full);
  background: var(--bg-page);
  border: 1px solid var(--border-default);
  font: var(--text-label-sm);
  color: var(--text-secondary);
}

.source-thumb {
  display: grid;
  place-items: center;
  inline-size: 28px;
  block-size: 28px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-sunken);
  color: var(--text-tertiary);
}

.source-thumb svg {
  inline-size: 14px;
  block-size: 14px;
}

.chat-footnote {
  margin: 0;
  font: var(--text-body-xs);
  color: var(--text-tertiary);
}

.check-list {
  list-style: none;
  margin: var(--space-8) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-4);
}

.check-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: var(--space-3);
  font: var(--text-body-md);
  color: var(--text-secondary);
}

.check-list svg {
  inline-size: 24px;
  block-size: 24px;
  color: var(--verified-fg);
}

.check-list strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ---- features ---- */

.features {
  display: grid;
  gap: var(--space-4);
  margin-block-start: var(--space-12);
}

@media (min-width: 720px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }
}

.feature {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: var(--space-4);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
}

.feature h3 {
  margin: var(--space-2) 0 var(--space-2);
  font: var(--text-heading-md);
}

.feature p {
  margin: 0;
  color: var(--text-secondary);
}

/* ---- trust ---- */

.trust {
  display: grid;
  gap: var(--space-6);
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
}

@media (min-width: 960px) {
  .trust {
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    padding: var(--space-10);
  }
}

.trust h2 {
  margin: 0 0 var(--space-2);
  font: var(--text-heading-lg);
}

.trust p {
  margin: 0;
  color: var(--text-secondary);
  max-inline-size: 44em;
}

/* ---- questions ---- */

.faq-title {
  padding-block-start: var(--space-16);
}

@media (min-width: 960px) {
  .faq-title {
    padding-block-start: var(--space-24);
  }
}

.faq {
  margin-block-start: var(--space-10);
  border-block-start: 1px solid var(--border-default);
}

.faq details {
  border-block-end: 1px solid var(--border-default);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-block-size: 64px;
  padding-block: var(--space-4);
  font: var(--text-heading-md);
  cursor: pointer;
  list-style: none;
}

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

.faq summary svg {
  flex: none;
  inline-size: 20px;
  block-size: 20px;
  color: var(--text-tertiary);
  transition: transform var(--duration-base) var(--ease-standard);
}

.faq details[open] summary svg {
  transform: rotate(180deg);
}

.faq details p {
  margin: 0;
  padding-block-end: var(--space-6);
  max-inline-size: 40em;
  color: var(--text-secondary);
}

/* ---- the pilot band: copy beside the application form ---- */

.pilot {
  background: var(--bg-inverse);
  color: var(--text-inverse);
  scroll-margin-block-start: var(--space-4);
}

.pilot .container {
  display: grid;
  gap: var(--space-8);
  padding-block: var(--space-16);
}

@media (min-width: 960px) {
  .pilot .container {
    grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
    align-items: start;
    gap: var(--space-16);
    padding-block: var(--space-20);
  }
}

.pilot h2 {
  margin: 0;
  font: var(--text-display-md);
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

@media (min-width: 720px) {
  .pilot h2 {
    font-size: 2.75rem;
  }
}

.pilot-copy p {
  margin: var(--space-4) 0 0;
  max-inline-size: 30em;
  font: var(--text-body-lg);
  opacity: 0.82;
  text-wrap: pretty;
}

.pilot-steps {
  display: grid;
  gap: var(--space-3);
  margin: var(--space-8) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: pilot-step;
}

.pilot-steps li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: var(--space-3);
  align-items: center;
  font: var(--text-body-md);
  counter-increment: pilot-step;
}

.pilot-steps li::before {
  content: counter(pilot-step);
  display: grid;
  place-items: center;
  inline-size: 32px;
  block-size: 32px;
  border: 1px solid currentColor;
  border-radius: var(--radius-full);
  font: var(--text-label-sm);
  opacity: 0.82;
}

:root[data-theme='dark'] .pilot {
  background: var(--accent-surface);
  color: var(--text-primary);
}

/* The form sits on its own surface so inputs read the same on the inverse band in
   both themes. */
.pilot-form {
  padding: var(--space-6) var(--space-5);
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
}

@media (min-width: 720px) {
  .pilot-form {
    padding: var(--space-8);
  }
}

:root[data-theme='dark'] .pilot-form {
  border: 1px solid var(--border-default);
}

.pilot-fields {
  display: grid;
  gap: var(--space-6);
}

.field {
  display: grid;
  gap: var(--space-2);
}

.field-label {
  padding: 0;
  font: var(--text-label-md);
  font-size: 1rem;
  color: var(--text-primary);
}

.field-optional {
  display: inline-block;
  margin-inline-start: var(--space-1);
  font: var(--text-body-sm);
  color: var(--text-tertiary);
}

.field-input {
  inline-size: 100%;
  min-block-size: 48px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  background: var(--bg-page);
  color: var(--text-primary);
  font: var(--text-body-md);
  font-size: 1rem; /* 16 px: phones do not zoom into the field */
}

.field-input::placeholder {
  color: var(--text-tertiary);
}

.field-input:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
  border-color: var(--accent-default);
}

textarea.field-input {
  display: block;
  margin-block-start: var(--space-3);
  resize: vertical;
}

.field-error,
.pilot-error {
  display: none;
  gap: var(--space-2);
  align-items: start;
  margin: 0;
  font: var(--text-body-sm);
  color: var(--danger-fg);
}

.field-error svg,
.pilot-error svg {
  flex: none;
  inline-size: 18px;
  block-size: 18px;
  margin-block-start: 1px;
}

.pilot-form[data-state='invalid'] .field-error,
.pilot-form[data-state='error'] .pilot-error {
  display: flex;
}

.pilot-form[data-state='invalid'] #pilot-email,
.field-input[aria-invalid='true'] {
  border-color: var(--danger-fg);
}

.pilot-error {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--danger-surface);
  color: var(--text-primary);
}

.pilot-error svg {
  color: var(--danger-fg);
}

/* tappable choices: native checkboxes and radios under a 44 px pill */

.choice-group {
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-group legend {
  margin-block-end: var(--space-3);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chip {
  position: relative;
}

.chip input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.chip span {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  background: var(--bg-page);
  color: var(--text-primary);
  font: var(--text-label-md);
  font-size: 0.9375rem;
  transition:
    background-color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard);
}

.chip:hover span {
  border-color: var(--accent-default);
}

.chip input:checked + span {
  background: var(--accent-default);
  border-color: var(--accent-default);
  color: var(--accent-text-on);
}

.chip input:focus-visible + span {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* the optional message stays one tap away */

.pilot-more summary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-block-size: 44px;
  font: var(--text-label-md);
  font-size: 1rem;
  color: var(--text-accent);
  cursor: pointer;
  list-style: none;
}

.pilot-more summary::-webkit-details-marker {
  display: none;
}

.pilot-more summary svg {
  inline-size: 18px;
  block-size: 18px;
  transition: transform var(--duration-base) var(--ease-standard);
}

.pilot-more[open] summary svg {
  transform: rotate(180deg);
}

/* the honeypot: present for bots, absent for people and assistive technology */

.pilot-trap {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.pilot-submit {
  inline-size: 100%;
}

.pilot-submit-sending {
  display: none;
  align-items: center;
  gap: var(--space-2);
}

.pilot-form[data-state='sending'] .pilot-submit-idle {
  display: none;
}

.pilot-form[data-state='sending'] .pilot-submit-sending {
  display: inline-flex;
}

.pilot-form[data-state='sending'] .pilot-submit {
  cursor: progress;
}

.pilot-form[data-state='sending'] .pilot-fields > :not(.pilot-submit) {
  opacity: 0.55;
  pointer-events: none;
}

.spinner {
  inline-size: 16px;
  block-size: 16px;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: var(--radius-full);
  animation: pilot-spin 800ms linear infinite;
}

@keyframes pilot-spin {
  to {
    transform: rotate(360deg);
  }
}

.pilot-privacy {
  margin: 0;
  font: var(--text-body-sm);
  color: var(--text-secondary);
}

/* the receipt that replaces the form */

.pilot-receipt {
  display: none;
  grid-template-columns: 44px 1fr;
  gap: var(--space-4);
  align-items: start;
}

.pilot-receipt:focus {
  outline: none;
}

.pilot-form[data-state='sent'] .pilot-fields,
.pilot-form[data-state='already'] .pilot-fields {
  display: none;
}

.pilot-form[data-state='sent'] .pilot-receipt-sent,
.pilot-form[data-state='already'] .pilot-receipt-already {
  display: grid;
}

.pilot-receipt-icon {
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  border-radius: var(--radius-full);
  background: var(--verified-surface);
  color: var(--verified-fg);
}

.pilot-receipt-icon svg {
  inline-size: 24px;
  block-size: 24px;
}

.pilot-receipt h3 {
  margin: var(--space-2) 0 var(--space-2);
  font: var(--text-heading-lg);
}

.pilot-receipt p {
  margin: 0;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.pilot-email-echo {
  color: var(--text-primary);
}

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

.site-footer {
  padding-block: var(--space-10) var(--space-12);
}

.site-footer .container {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 720px) {
  .site-footer .container {
    grid-template-columns: auto 1fr;
    align-items: center;
  }
}

.footer-mark {
  inline-size: 36px;
  block-size: 36px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 720px) {
  .footer-links {
    justify-content: flex-end;
  }
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  padding-inline: var(--space-2);
  font: var(--text-label-md);
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.footer-fine {
  grid-column: 1 / -1;
  margin: 0;
  font: var(--text-body-xs);
  color: var(--text-tertiary);
}

/* ---- legal pages: privacy and terms ---- */

.legal {
  max-inline-size: var(--container-reading);
  margin-inline: auto;
  padding: var(--space-10) var(--space-5) var(--space-20);
}

.legal h1 {
  margin: 0;
  font: var(--text-display-md);
  font-size: 2.25rem;
  line-height: 1.15;
}

.legal .legal-meta {
  margin: var(--space-3) 0 var(--space-10);
  font: var(--text-body-sm);
  color: var(--text-tertiary);
}

.legal h2 {
  margin: var(--space-12) 0 var(--space-3);
  font: var(--text-heading-lg);
}

.legal h3 {
  margin: var(--space-8) 0 var(--space-2);
  font: var(--text-heading-md);
}

.legal p,
.legal li {
  font: var(--text-body-md);
  color: var(--text-secondary);
}

.legal li + li {
  margin-block-start: var(--space-2);
}

.legal table {
  inline-size: 100%;
  border-collapse: collapse;
  font: var(--text-body-sm);
}

.legal th,
.legal td {
  padding: var(--space-3) var(--space-2);
  text-align: start;
  vertical-align: top;
  border-block-end: 1px solid var(--border-default);
}

.legal th {
  font: var(--text-label-md);
  color: var(--text-primary);
}

.table-scroll {
  overflow-x: auto;
}

/* ---- reduced motion: the stills, never a missing state ---- */

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

  .scan-line {
    display: none;
  }

  .region::before {
    animation: none;
    opacity: 1;
  }

  .faq summary svg,
  .pilot-more summary svg,
  .chip span {
    transition: none;
  }

  .spinner {
    animation: none;
    border-inline-end-color: currentColor;
    opacity: 0.6;
  }
}
