/* Bayofi marketing site.
   Order: font, tokens, base, typography, layout, components, sections, media queries.
   Colour tokens are the app's own values from frontend/constants/theme.ts. */

/* ------------------------------------------------------------------ font - */

/* Self-hosted: a Google Fonts link would send every visitor's IP to a third
   party before they have seen the privacy policy. Variable weight axis, so one
   file per subset serves both 300 and 400. */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 300 400;
  font-display: swap;
  src: url('/static/fonts/newsreader-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 300 400;
  font-display: swap;
  src: url('/static/fonts/newsreader-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------------------------------------------------------------- tokens - */

:root {
  --bg: #FFFFFF;
  --surface: #F2F3F5;
  --text: #11181C;
  --ink: #18181B;
  --ink-on: #FFFFFF;
  --muted: #687076;
  --placeholder: #5F666C;
  --border: rgba(0, 0, 0, 0.08);
  --divider: rgba(128, 128, 128, 0.2);
  --link: #3D5A80;
  --input: #f7f7f8;

  /* Placeholder boxes need a dashed edge that actually reads; --border at 8%
     disappears against --surface. */
  --slot-border: #c7cacd;

  /* Edge of a media slot. The recordings' --surface sits at 1.1:1 against --bg,
     so a hairline ring plus layered shadows has to separate the clip from the
     page. Shadows do not read on the dark page, so dark swaps them for a brighter
     ring and a faint halo. */
  --media-shadow:
    0 0 0 1px rgba(17, 24, 28, 0.07),
    0 2px 4px rgba(17, 24, 28, 0.05),
    0 16px 40px -8px rgba(17, 24, 28, 0.18),
    0 48px 80px -24px rgba(61, 90, 128, 0.22);

  --nav-h: 87px;
  --gutter: 24px;
  --wrap-max: 1400px;
  --radius-card: 12px;
  --radius-btn: 8px;

  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Helvetica, Arial, sans-serif;
  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151718;
    --surface: #1C1F20;
    --text: #ECEDEE;
    --ink: #FAFAFA;
    --ink-on: #151718;
    --muted: #9BA1A6;
    --placeholder: #8B9298;
    --border: rgba(255, 255, 255, 0.1);
    --link: #8FB0D6;
    --input: #1a1d1f;
    --slot-border: #3a3f42;
    --media-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.1),
      0 0 0 6px rgba(255, 255, 255, 0.025),
      0 24px 60px -12px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #151718;
  --surface: #1C1F20;
  --text: #ECEDEE;
  --ink: #FAFAFA;
  --ink-on: #151718;
  --muted: #9BA1A6;
  --placeholder: #8B9298;
  --border: rgba(255, 255, 255, 0.1);
  --link: #8FB0D6;
  --input: #1a1d1f;
  --slot-border: #3a3f42;
  --media-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 0 6px rgba(255, 255, 255, 0.025),
    0 24px 60px -12px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base - */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  opacity: 0.7;
}

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

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

p {
  margin: 0;
}

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

/* Minus the nav's own bottom border, which --nav-h includes: else a bordered target draws a second hairline. */
[id] {
  scroll-margin-top: calc(var(--nav-h) - 1px);
}

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

/* ------------------------------------------------------------ typography - */

.display {
  font-family: var(--font-serif);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.04;
  font-size: clamp(38px, 5.2vw, 58px);
  color: var(--text);
  margin: 0;
}

.display-line {
  display: block;
}

.display-sm {
  font-size: clamp(30px, 3.4vw, 40px);
  line-height: 1.1;
}

.eyebrow {
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--placeholder);
}

.lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 470px;
}

.body {
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 62ch;
}

/* ---------------------------------------------------------------- layout - */

.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.narrow {
  max-width: 760px;
}

.band {
  border-top: 1px solid var(--border);
  padding-block: clamp(56px, 7vw, 96px);
}

.band-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 48px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 20px;
  border-radius: var(--radius-btn);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--ink);
  color: var(--ink-on);
}

.btn-sm {
  min-height: 36px;
  padding: 8px 14px;
  font-size: 13px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: none;
  border: none;
  border-radius: var(--radius-btn);
  color: var(--muted);
  cursor: pointer;
}

.icon {
  width: 20px;
  height: 20px;
  display: block;
}

.icon-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun {
    display: none;
  }

  :root:not([data-theme="light"]) .icon-moon {
    display: block;
  }
}

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

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

:root[data-theme="light"] .icon-sun {
  display: block;
}

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

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

.brand-mark {
  display: block;
  width: auto;
  color: var(--ink);
}

.brand-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--placeholder);
}

.lang-current {
  color: var(--text);
  font-weight: 600;
}

/* ------------------------------------------------------------------- nav - */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 56px;
  padding-block: 15px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  color: var(--muted);
  margin-inline: auto;
}

/* A wrapped label would deepen the sticky bar; below 1160px the sheet takes over. */
.nav-links a {
  color: var(--muted);
  white-space: nowrap;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-mobile {
  display: none;
}

.nav-mobile summary {
  list-style: none;
}

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

/* The filter makes the bar the containing block for the fixed panel below it,
   which then tracks the bar instead of the viewport. */
html.nav-open .nav {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: var(--bg);
}

/* The bar's backdrop-filter makes it the containing block for these fixed
   children, so they live outside the subtree a closed <details> hides; engines
   disagree on how that subtree is hidden, and a full-viewport overlay that stays
   hit-testable would swallow every tap on the page. Gate them here instead. */
.nav-scrim,
.nav-sheet {
  display: none;
}

.nav-mobile[open] .nav-scrim {
  display: block;
}

.nav-mobile[open] .nav-sheet {
  display: flex;
}

.nav-scrim {
  position: fixed;
  inset: var(--nav-h) 0 0;
  background: rgba(0, 0, 0, 0.4);
  /* Not for the cursor: WebKit only synthesises a click from a tap on elements it
     treats as interactive, and the scrim's dismissal is a click listener. */
  cursor: pointer;
}

/* dvh, not vh: on iOS Safari 100vh is the URL-bar-expanded height, which would
   run the panel under the browser chrome. */
.nav-sheet {
  position: fixed;
  inset-inline: 0;
  top: var(--nav-h);
  max-height: calc(100dvh - var(--nav-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 1;
  flex-direction: column;
  gap: 16px;
  padding: 16px var(--gutter) 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

/* fill-box makes `center` the path's own centre rather than the SVG user-space
   origin, which would swing the arms off-screen. */
.nav-mobile .icon-burger path {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 160ms ease, opacity 120ms ease;
}

.nav-mobile[open] .burger-top {
  transform: translateY(5px) rotate(45deg);
}

.nav-mobile[open] .burger-mid {
  opacity: 0;
}

.nav-mobile[open] .burger-bot {
  transform: translateY(-5px) rotate(-45deg);
}

.nav-sheet-links {
  display: flex;
  flex-direction: column;
}

.nav-sheet-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  color: var(--text);
  border-bottom: 1px solid var(--divider);
}

.nav-sheet-links a:last-child {
  border-bottom: none;
}

/* The links carry dividers; without this the switch and CTA crowd the last one. */
.nav-sheet-foot {
  display: flex;
  align-items: center;
  margin-top: 8px;
  justify-content: space-between;
  gap: 16px;
}

.nav-sheet-foot .btn {
  min-height: 44px;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(300px, 26vw, 400px);
  gap: 56px;
  align-items: center;
  padding-block: 72px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

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

.hero-media {
  display: flex;
  justify-content: flex-end;
}

/* ----------------------------------------------------------- media slots - */

.media {
  position: relative;
  overflow: hidden;
}

.media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  height: 100%;
  padding: 0 16px;
  background: var(--surface);
  border: 1px dashed var(--slot-border);
  border-radius: var(--media-inner-radius);
  color: var(--placeholder);
  font-size: 11px;
  line-height: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.media-asset {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--media-inner-radius);
}

/* Both variants ship in the markup, so the cascade picks one — the same shape
   the nav icons use, where an explicit data-theme beats the OS query in both
   directions. */
.media-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .media-light {
    display: none;
  }

  :root:not([data-theme="light"]) .media-dark {
    display: block;
  }
}

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

:root[data-theme="dark"] .media-dark {
  display: block;
}

:root[data-theme="light"] .media-light {
  display: block;
}

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

/* The ratio is the 600x1304 recordings' exactly, so a loop is shown whole; any
   other value would crop it, since .media-asset covers its box. */
.media-phone {
  --media-radius: 26px;
  --media-inner-radius: var(--media-radius);
  width: min(300px, 100%);
  aspect-ratio: 300 / 652;
  border-radius: var(--media-radius);
  box-shadow: var(--media-shadow);
}

/* --------------------------------------------------------- feature bands - */

.feature-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.feature-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Right-aligned rather than centred: the slot is far narrower than its grid
   column, and a shared outer edge keeps every band's media on one line. */
.feature-media {
  display: flex;
  justify-content: flex-end;
}

/* ------------------------------------------------------------ asset grid - */

/* Fixed track count: the eight types split evenly into two full rows of four,
   which an auto-fit count cannot guarantee — it leaves a ragged last row. */
.type-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.type-card {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: center;
  gap: 4px 10px;
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 16px;
}

.type-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.type-name {
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
  color: var(--text);
}

.type-line {
  grid-column: 2;
  font-size: 13px;
  line-height: 18px;
  color: var(--muted);
}

/* ------------------------------------------------------------------- faq - */

.faq {
  display: flex;
  flex-direction: column;
}

.faq-item {
  border-bottom: 1px solid var(--divider);
}

.faq-item:first-child {
  border-top: 1px solid var(--divider);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding-block: 26px;
  font-size: 18px;
  line-height: 1.4;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

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

.faq-item .chev {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: var(--placeholder);
  transition: transform 0.18s ease;
}

.faq-item[open] .chev {
  transform: rotate(180deg);
}

.faq-answer {
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
  padding-bottom: 20px;
  max-width: 70ch;
}

/* ----------------------------------------------------------------- plans - */

.pricing-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  /* flex-end puts the pill beside the h2 rather than beside the eyebrow above it. */
  align-items: flex-end;
  gap: 24px;
}

/* The row itself carries the spacing down to the table, so the shared heading
   block must not add its own on top. */
.pricing-head .band-head {
  margin-bottom: 0;
}

.billing-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  /* Lifts the pill off the h2's line-box bottom onto its baseline. */
  margin-bottom: 6px;
}

.billing-pill {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.billing-option {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 18px;
  color: var(--muted);
  cursor: pointer;
}

#billing-monthly:checked ~ .pricing-head .billing-toggle [for="billing-monthly"],
#billing-yearly:checked ~ .pricing-head .billing-toggle [for="billing-yearly"] {
  background: var(--ink);
  color: var(--ink-on);
  font-weight: 600;
}

/* The radios are visually hidden, so the ring has to land on their labels. */
.billing-input#billing-monthly:focus-visible ~ .pricing-head .billing-toggle [for="billing-monthly"],
.billing-input#billing-yearly:focus-visible ~ .pricing-head .billing-toggle [for="billing-yearly"] {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

/* The saving only applies to yearly, but it keeps its space so flipping the
   switch cannot reflow or re-wrap the toggle row. */
.billing-save {
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  visibility: hidden;
}

#billing-yearly:checked ~ .pricing-head .billing-toggle .billing-save {
  visibility: visible;
}

/* Mobile-only; the three columns fit side by side above the 800px query. */
.plan-picker {
  display: none;
}

.table-scroll {
  overflow-x: auto;
  margin-top: 32px;
}

/* Fixed layout is what keeps the columns still when the prices swap: with auto
   layout the wider yearly note would redistribute every column's width. */
.plans {
  width: 100%;
  min-width: 720px;
  table-layout: fixed;
  border-collapse: collapse;
  text-align: center;
}

.plans th,
.plans td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--divider);
}

.plans thead th {
  border-bottom: 1px solid var(--border);
  /* Only the yearly stack carries a note, so a column without one is a line shorter:
     top alignment keeps every column's name and price on the same line anyway. */
  vertical-align: top;
}

.plans thead th:first-child {
  width: 28%;
}

.plans thead th:not(:first-child) {
  width: 24%;
}

.plans tbody th[scope="row"] {
  text-align: left;
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
  color: var(--text);
}

.plans td {
  font-size: 14px;
  line-height: 18px;
  color: var(--muted);
}

/* Negative margin against the cell's own padding: the tap target is the whole
   cell rather than the width of the label text. */
.row-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -14px -16px;
  padding: 14px 16px;
  cursor: pointer;
}

.row-toggle .chev {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--placeholder);
  transition: transform 0.18s ease;
}

#rows-standard:checked ~ .table-scroll .row-toggle .chev {
  transform: rotate(90deg);
}

/* The checkbox is visually hidden, so the ring has to land on its label. */
#rows-standard:focus-visible ~ .table-scroll .row-toggle {
  outline: 2px solid var(--link);
  outline-offset: -2px;
}

.plan-subrow {
  display: none;
}

#rows-standard:checked ~ .table-scroll .plan-subrow {
  display: table-row;
}

/* Indent clears the chevron, so a sub-row's label starts where its parent's does. */
.plans tbody th.plan-subrow-label {
  padding-left: 38px;
  font-weight: 400;
  color: var(--muted);
}

.plans thead th > span:not(.plan-prices) {
  display: block;
}

.plan-prices {
  display: block;
  margin-top: 8px;
}

.plan-yearly {
  display: none;
}

#billing-yearly:checked ~ .table-scroll .plan-monthly {
  display: none;
}

#billing-yearly:checked ~ .table-scroll .plan-yearly {
  display: block;
}

.plan-name {
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
  color: var(--text);
}

.plan-price {
  display: block;
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

.plan-period {
  display: block;
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--placeholder);
  margin-top: 4px;
}

.plan-note {
  display: block;
  font-size: 12px;
  line-height: 16px;
  /* `th` is bold by default, and a bold note would outweigh the period line above it. */
  font-weight: 400;
  color: var(--muted);
  margin-top: 4px;
  white-space: nowrap;
}

/* -------------------------------------------------------------- download - */

.download-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.download-inner .badges {
  justify-content: center;
}

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

.footer {
  border-top: 1px solid var(--border);
  padding-top: 56px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-tagline {
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
  max-width: 34ch;
}

.footer-head {
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--placeholder);
  font-weight: 600;
  margin: 0;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}

.footer-links a {
  color: var(--muted);
  min-height: 24px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-block: 24px;
  font-size: 11px;
  line-height: 14px;
  color: var(--placeholder);
}

/* ---------------------------------------------------------------- legal - */

.doc {
  counter-reset: doc-section;
}

.doc .display-sm {
  margin-bottom: 12px;
}

.doc-date {
  font-size: 13px;
  color: var(--placeholder);
  margin-bottom: 24px;
}

.doc-intro {
  margin: 0;
}

.doc-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 32px;
  counter-increment: doc-section;
}

.doc-head {
  font-size: 17px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

/* The copy cross-references sections by number, so the numbering has to render;
   drawing it here keeps it out of every heading. Which prefix is per document:
   the Terms are drafted as statutory paragraphs, the Privacy Policy is not. */
.doc-num-decimal .doc-head::before {
  content: counter(doc-section) ". ";
}

.doc-num-section-sign .doc-head::before {
  content: "§ " counter(doc-section) ". ";
}

/* An annex is not a numbered section. Same specificity as the two rules above,
   so the override only wins by following them. */
.doc-section-plain {
  counter-increment: none;
}

.doc-section-plain .doc-head::before {
  content: none;
}

.doc-section p {
  margin: 0;
}

/* The global reset strips link styling, which inside running text would leave a
   link indistinguishable from the words around it. */
.doc a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --muted is the body colour, so a lead-in only reads as emphasis at --text. */
.doc strong {
  font-weight: 600;
  color: var(--text);
}

.doc-list {
  margin: 0;
  padding-inline-start: 22px;
  list-style: disc;
}

.doc-list li {
  margin-block: 6px;
}

.doc-list li::marker {
  color: var(--placeholder);
}

/* Clause numbers are cited in the copy ("described in § 9(3)"), so they come from
   the list's own markers rather than being typed into the text. */
.doc-clauses {
  margin: 0;
  padding-inline-start: 26px;
  list-style: decimal;
}

.doc-clauses li {
  margin-block: 8px;
}

.doc-clauses li::marker {
  color: var(--placeholder);
}

/* --------------------------------------------------------- media queries - */

@media (max-width: 1160px) {
  .nav-links,
  .nav-actions .lang-switch,
  .nav-actions .btn {
    display: none;
  }

  .nav-actions {
    margin-left: auto;
    gap: 8px;
  }

  .nav-mobile {
    display: block;
  }

  /* Tied to the nav breakpoint: a sheet nav over a two-column body reads as two
     different layouts at once. */
  .hero,
  .feature-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  /* One column here, so the shared right edge the desktop rule buys is gone and
     the narrow phone slot sits under its own copy instead. */
  .hero-media,
  .feature-media {
    justify-content: center;
  }
}

@media (max-width: 1040px) {
  /* Four 240px cards plus their gaps outgrow the wrap below this width. */
  .type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* The table's 720px minimum plus gutters only clears at ~768px, so below this
   one plan column shows at a time instead of panning the whole table. */
@media (max-width: 800px) {
  .plan-picker {
    display: flex;
    margin-top: 24px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 999px;
  }

  .plan-pick {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    font-size: 13px;
    line-height: 18px;
    color: var(--muted);
    text-align: center;
    cursor: pointer;
  }

  #plan-1:checked ~ .plan-picker [for="plan-1"],
  #plan-2:checked ~ .plan-picker [for="plan-2"],
  #plan-3:checked ~ .plan-picker [for="plan-3"] {
    background: var(--ink);
    color: var(--ink-on);
    font-weight: 600;
  }

  /* The radios are visually hidden, so the ring has to land on their labels. */
  .plan-input#plan-1:focus-visible ~ .plan-picker [for="plan-1"],
  .plan-input#plan-2:focus-visible ~ .plan-picker [for="plan-2"],
  .plan-input#plan-3:focus-visible ~ .plan-picker [for="plan-3"] {
    outline: 2px solid var(--link);
    outline-offset: 2px;
  }

  #plan-1:checked ~ .table-scroll :is(.plan-col-2, .plan-col-3),
  #plan-2:checked ~ .table-scroll :is(.plan-col-1, .plan-col-3),
  #plan-3:checked ~ .table-scroll :is(.plan-col-1, .plan-col-2) {
    display: none;
  }

  /* Fixed layout reads the surviving header cells, so the widths have to be restated. */
  .plans {
    min-width: 0;
  }

  .plans thead th:first-child {
    width: 55%;
  }

  .plans thead th:not(:first-child) {
    width: 45%;
  }

  .plans th,
  .plans td {
    padding: 12px 8px;
  }

  .row-toggle {
    margin: -12px -8px;
    padding: 12px 8px;
  }

  .plans tbody th.plan-subrow-label {
    padding-left: 26px;
  }
}

@media (max-width: 600px) {
  :root {
    --gutter: 16px;
  }

  .hero {
    padding-block: 48px;
  }

  /* The h1 lines are hard-broken, so the phone width has to come out of the
     type size or a 19-character Polish line wraps mid-phrase. */
  .display {
    font-size: clamp(28px, 8.6vw, 38px);
  }

  .display-sm {
    font-size: clamp(26px, 7.4vw, 30px);
  }

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

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
}

@media (pointer: coarse) {
  .btn-sm {
    min-height: 44px;
  }

  .icon-btn {
    width: 44px;
    height: 44px;
  }

  .nav-links a,
  .footer-links a,
  .link-btn,
  .lang-switch a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

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

  .faq-item .chev {
    transition: none;
  }

  .nav-mobile .icon-burger path {
    transition: none;
  }
}

/* --------------------------------------------------------------- consent - */

.badge-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: var(--radius-btn);
  background: var(--ink);
  color: var(--ink-on);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.consent {
  position: fixed;
  inset: auto 16px 16px 16px;
  z-index: 50;
  max-width: 560px;
  margin-inline: auto;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.consent[hidden] {
  display: none;
}

.consent-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
}

.consent-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.consent-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.consent-body a {
  color: var(--link);
}

.consent-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.consent-details[hidden] {
  display: none;
}

.consent-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.45;
}

.consent-option input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex: none;
}

.consent-tag {
  font-size: 12px;
  color: var(--muted);
}

.consent-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

/* Every choice carries the same weight: no option is styled to be the easy one. */
.btn-consent {
  min-height: 44px;
  padding: 10px 12px;
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-consent[hidden] {
  display: none;
}

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

@media (max-width: 600px) {
  .badge-link {
    min-width: calc(50% - 6px);
  }
}
