/*
 * The public pages' shared stylesheet (server-rendered, no JavaScript; the strict CSP allows only same-origin
 * stylesheets). Every value is a design token (issue #518): the block below is generated from apps/web/src/tokens.css,
 * and npm run lint:css checks this file like the app's own.
 */
@font-face {
  font-family: Heebo;
  src: url('/fonts/heebo-hebrew.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0590-05FF, U+20AA, U+FB1D-FB4F;
}
@font-face {
  font-family: Heebo;
  src: url('/fonts/heebo-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}
/* tokens:start (generated from apps/web/src/tokens.css by npm run tokens:generate; do not edit) */
:root {
  /* Colour */
  --paper: #ffffff;
  --canvas: #f0f3fa;
  --ink: #17233f;
  --muted: #59647b; /* 5.3:1 on canvas, readable on the pale cobalt surfaces */
  --line: #e4e9f3;
  --brand: #2254ec;
  --brand-strong: #1f4bc4;
  --brand-tint: #eef2ff;
  --brand-tint-2: #f5f8ff;
  --apricot: #ffb77b; /* logo and accents, never focus */
  --deal-bg: #dcf3e5; /* promotions are green (owner decision): --deal-text on it 6.11:1 */
  --deal-text: #166534; /* 7.13:1 on paper */
  --deal-surface: #ecf8f0; /* --deal-text on it 6.54:1 */
  --club-bg: #dce6ff;
  --club-text: #1a3fa8;
  --neutral-bg: #e6e9f2;
  --neutral-text: #3f4766;
  --warning-bg: #fff6e2;
  --warning-text: #8a5f10;
  --error: #bd453e;
  --error-bg: #fff4ee;
  --success: #1b6b3a;
  --success-bg: #e4f3ea;
  --focus: #b45f06;
  --scrim: #161b3380;

  /* Widget high-contrast mode: black, white, yellow (19.6:1 / 21:1 on black) */
  --a11y-contrast-bg: #000000;
  --a11y-contrast-fg: #ffffff;
  --a11y-contrast-accent: #ffff00;
  /* Widget high-contrast mode: light variants of the semantic text colours (dark text on a black page is unreadable) */
  --a11y-contrast-green: #8ce0ae;
  --a11y-contrast-blue: #b3c8ff;
  --a11y-contrast-neutral: #d5dae8;
  --a11y-contrast-amber: #ffcf6b;
  --a11y-contrast-red: #ff9d94;

  /* Type: Heebo, size / line-height / weight */
  --text-hero-size: 2.5rem; /* the public pages' desktop h1 and the product page price (issue #518) */
  --text-hero-line: 3rem;
  --text-hero-weight: 800;
  --text-display-size: 1.75rem;
  --text-display-line: 2.125rem;
  --text-display-weight: 800;
  --text-price-size: 1.625rem;
  --text-price-line: 1.875rem;
  --text-price-weight: 800;
  --text-title-page-size: 1.375rem;
  --text-title-page-line: 1.75rem;
  --text-title-page-weight: 800;
  --text-title-card-size: 1.125rem;
  --text-title-card-line: 1.5rem;
  --text-title-card-weight: 800;
  --text-row-title-size: 1rem;
  --text-row-title-line: 1.375rem;
  --text-row-title-weight: 700;
  --text-row-name-weight: 500;
  --text-body-size: 0.9375rem;
  --text-body-line: 1.375rem;
  --text-body-weight: 500;
  --text-button-size: 0.875rem;
  --text-button-line: 1.25rem;
  --text-button-weight: 700;
  --text-secondary-size: 0.8125rem;
  --text-secondary-line: 1.125rem;
  --text-secondary-weight: 400;
  --text-caption-size: 0.75rem;
  --text-caption-line: 1rem;
  --text-caption-weight: 400;
  --text-pill-size: 0.75rem;
  --text-pill-line: 1.125rem;
  --text-pill-weight: 700;

  /* Type: the one monospace stack, for a secret the person copies (the access key) */
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  /* Radius */
  --radius-slot: 8px;
  --radius-button: 12px;
  --radius-compact: 14px;
  --radius-stepper: 16px;
  --radius-card: 18px;
  --radius-sheet: 24px;
  --radius-pill: 999px;
  --radius-circle: 50%;

  /* Size: --tap is the hit area; drawn sizes may stay smaller */
  --tap: 48px;
  --bar-button: 48px;
  --compact: 28px;
  --stepper: 32px;
  --image-slot-width: 36px;
  --image-slot-height: 44px;
  --switch-width: 52px;
  --switch-height: 32px;
  --app-max: 680px;
  --alternative-row: 56px;
  --alternative-thumb: 40px;
  --sheet-handle-bar: 40px;
  --field-compact: 40px;
  --icon-stroke: 1.6; /* every Icon glyph: thin, never bold (one place: the svg rule in styles.css) */
  --icon-stroke-bar: 1.7; /* the white magnifier on the filled search button (frame C-TopBar) */
  --icon-stroke-stepper: 2.2; /* the stepper + and −: as heavy as the bold count beside them (issue #871) */
  --icon-stroke-barcode: 1.2; /* eight bars 2.6 units apart: thinner than --icon-stroke so the gaps stay open */
  --icon-size-barcode: 22px;
  --name-roll-run: 11s; /* one roll of a long name: hold 1s, move 4s, hold 2s, return 4s (the 25s round is in nameRoller.ts) */
  --name-fade: 24px; /* the faded end of a clipped name */
  --icon-size-department: 26px; /* the department icon in a result row's tile */
  --icon-size-bar: 22px; /* the glyph inside a filled icon button */
  --visual-slot: 48px; /* a search row's product picture */

  /* Motion */
  --motion-sheet-snap: 250ms;
  --motion-sheet-ease: ease-in-out;
  --result-row-height: 56px; /* a search result row: 48px control plus 4px above and below */

  /* Motion: search mode (issue #910). Reduced motion shows the end state at once. */
  --motion-search-rise: 300ms;
  --motion-search-ease: cubic-bezier(0.2, 0, 0, 1);

  /* Shadow */
  --shadow-menu: 0 6px 16px rgba(23, 35, 63, 0.18);
  --shadow-sheet: 0 -8px 20px rgba(23, 35, 63, 0.13);

  /* Motion */
  --motion-toast-in: 180ms;
  --motion-toast-out: 250ms;

  /* Aliases of the old names (migration only) */
  --green: var(--brand);
  --primary: var(--brand);
  --mint: var(--brand-tint);
  --soft: var(--brand-tint);
  --soft-apricot: #fff0e4;
  --amber: var(--warning-text);
  --warning: #fff5df; /* rendered value kept (token --warning-bg is #fff6e2) */
  --red: #b43d46; /* rendered value kept (token --error is #bd453e) */
}
/* tokens:end */
:root {
  --gutter: var(--space-5);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Heebo, system-ui, sans-serif;
  line-height: 1.5;
}
a {
  color: var(--brand);
}
a:hover {
  color: var(--brand-strong);
}
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.skip {
  position: absolute;
  inset-inline-start: var(--gutter);
  top: -80px;
  z-index: 1;
  background: var(--paper);
  color: var(--ink);
  padding: 12px 16px;
  border-radius: var(--radius-slot);
  border: 2px solid var(--brand);
  font-weight: var(--text-button-weight);
}
.skip:focus {
  top: 8px;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  min-height: var(--tap);
  gap: 8px;
  color: var(--brand);
  font-size: var(--text-title-page-size);
  font-weight: var(--text-title-page-weight);
}
.logo span {
  color: var(--ink);
}
/*
 * The header menu (owner decision 2026-11-25, frame PUB-NAV-B): on a phone a second row under the logo and sign-in,
 * whose text lines up with the logo; from 900px the same links sit inline beside the sign-in. At 400% zoom it may wrap.
 */
.top {
  flex-wrap: wrap;
}
.site-nav {
  order: 1;
  display: flex;
  flex-wrap: wrap;
  flex-basis: calc(100% + 2 * var(--gutter));
  margin: var(--space-3) calc(-1 * var(--gutter)) calc(-1 * var(--space-3));
  padding: 0 calc(var(--gutter) - var(--space-2));
  border-top: 1px solid var(--line);
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 var(--space-2);
  font-size: var(--text-button-size);
  font-weight: var(--text-button-weight);
  text-decoration: none;
  /* Every link keeps the underline's room, so the current one's line does not move its text. */
  border-bottom: 2px solid transparent;
}
.site-nav a[aria-current='page'] {
  color: var(--ink);
  border-bottom-color: var(--brand);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  min-width: var(--tap);
  padding: 0 24px;
  border-radius: var(--radius-compact);
  border: 1px solid var(--brand);
  font-weight: var(--text-button-weight);
  font-size: var(--text-row-title-size);
  text-decoration: none;
  background: var(--paper);
}
.btn.primary {
  background: var(--brand);
  color: var(--paper);
  min-height: 52px;
}
.btn.primary:hover {
  background: var(--brand-strong);
  color: var(--paper);
}
.top .btn {
  padding: 0 20px;
}
/* The header's sign-in (#1440): solid blue at the 48px tap height (not the 52px of the page's primary call to action). */
.btn.solid {
  background: var(--brand);
  color: var(--paper);
}
.btn.solid:hover {
  background: var(--brand-strong);
  color: var(--paper);
}
main section {
  padding: 28px var(--gutter) 8px;
}
h1 {
  margin: 0 0 12px;
  font-size: var(--text-display-size);
  line-height: 1.2;
  font-weight: var(--text-display-weight);
}
h2 {
  margin: 0 0 16px;
  font-size: var(--text-title-page-size);
  font-weight: var(--text-title-page-weight);
}
h3 {
  margin: 0 0 4px;
  font-size: var(--text-row-title-size);
  font-weight: var(--text-row-title-weight);
}
p {
  margin: 0;
}
.hero {
  background: var(--brand-tint-2);
}
main .hero {
  padding-bottom: 24px;
}
.lead {
  margin-bottom: 20px;
  font-size: var(--text-row-title-size);
  color: var(--neutral-text);
}
.cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.note {
  margin-top: 12px;
  font-size: var(--text-button-size);
  color: var(--muted);
}
.steps,
.chains {
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: var(--radius-stepper);
  padding: 14px;
}
.steps h3 {
  font-size: var(--text-title-card-size);
}
.steps p {
  font-size: var(--text-body-size);
  color: var(--neutral-text);
}
.num {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-circle);
  background: var(--brand);
  color: var(--paper);
  font-weight: var(--text-title-card-weight);
  display: flex;
  align-items: center;
  justify-content: center;
}
.chains {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chains li {
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  font-weight: var(--text-body-weight);
}
.chains .more {
  border: 0;
  background: var(--brand-tint-2);
  color: var(--neutral-text);
}
.faq {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq div {
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  padding: 14px;
}
.faq p {
  font-size: var(--text-body-size);
  color: var(--neutral-text);
  /* The support address in an answer breaks inside instead of pushing the line out (200% text). */
  overflow-wrap: break-word;
}
/* A link on its own line under an answer is a target, not a word in a sentence: 48px tall (#1071, Lighthouse target-size). */
.faq .faq-link a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
}
footer {
  margin-top: 28px;
  padding: 20px var(--gutter);
  background: var(--ink);
  color: var(--paper);
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 18px;
}
footer a {
  color: var(--paper);
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  font-size: var(--text-body-size);
}
footer p {
  margin-top: 8px;
  font-size: var(--text-secondary-size);
  color: var(--line);
}
article.page {
  padding: 28px var(--gutter) 8px;
  max-width: 820px;
}
.page section {
  padding: 0;
  margin-top: 24px;
}
.page .lead {
  margin-bottom: 12px;
}
/* A paragraph after a section's list (the accessibility page's contact line) keeps the list's own gap. */
.page section + p {
  margin-top: var(--space-3);
}
.prose {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.prose li {
  border-inline-start: 3px solid var(--line);
  padding-inline-start: 12px;
  /* A long address or link breaks inside the line instead of widening the page (200% text, #1466). */
  overflow-wrap: break-word;
}
/* An address inside a policy sentence (the Google ad links): it stays inline, so the sentence's full stop keeps its line;
   the 48px target is block padding, which an inline box draws without changing the line height. */
.prose li a {
  padding-block: calc((var(--tap) - 1lh) / 2);
  overflow-wrap: anywhere;
}
/* The guest's measurement switch at the bottom of the privacy policy (#802): the app's switch row, drawn the same. */
.privacy-opt-out {
  margin-block: var(--space-6);
  padding: var(--space-4) var(--space-6);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.privacy-opt-out[hidden] {
  display: none;
}
.privacy-opt-out .settings-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  min-height: 56px;
}
.privacy-opt-out .switch {
  position: relative;
  flex: none;
  width: var(--switch-width);
  height: var(--tap);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.privacy-opt-out .switch-track {
  position: absolute;
  inset-block: calc((var(--tap) - var(--switch-height)) / 2);
  inset-inline: 0;
  border-radius: var(--radius-pill);
  background: var(--muted);
}
.privacy-opt-out .switch[aria-checked='true'] .switch-track {
  background: var(--brand);
}
.privacy-opt-out .switch-knob {
  position: absolute;
  inset-block-start: calc((var(--switch-height) - 26px) / 2);
  inset-inline-start: 3px;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-circle);
  background: var(--paper);
}
.privacy-opt-out .switch[aria-checked='true'] .switch-knob {
  inset-inline-start: calc(var(--switch-width) - 26px - 3px);
}
.contact-link {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: var(--tap);
  font-weight: var(--text-button-weight);
  overflow-wrap: anywhere;
}
/* The contact page's mail button: the address itself, so it can also be read and copied. */
.btn.mail {
  gap: 10px;
  max-width: 100%;
  direction: ltr;
}
.btn.mail bdi {
  overflow-wrap: anywhere;
}
@media (min-width: 900px) {
  :root {
    --gutter: max(80px, calc((100vw - 1120px) / 2));
  }
  /* The gutter grows with the window, so it stays outside the page's max-width: a border-box cap would leave the
     cap minus two gutters for the content (nothing at 1920px) and pin the box to one side. */
  article.page {
    box-sizing: content-box;
    margin-inline: auto;
  }
  .top {
    padding-block: 14px;
  }
  .top {
    flex-wrap: nowrap;
  }
  .site-nav {
    order: 0;
    flex-basis: auto;
    margin: 0;
    margin-inline: auto var(--space-2);
    padding: 0;
    border: 0;
  }
  .logo {
    font-size: var(--text-price-size);
  }
  main section {
    padding-top: 48px;
  }
  .hero {
    display: flex;
    gap: 56px;
    align-items: center;
  }
  .hero > div {
    flex: 1;
    max-width: 640px;
  }
  h1 {
    font-size: var(--text-hero-size);
    line-height: var(--text-hero-line);
    font-weight: var(--text-hero-weight);
  }
  h2 {
    font-size: var(--text-display-size);
    line-height: var(--text-display-line);
  }
  .lead {
    font-size: var(--text-title-card-size);
    max-width: 560px;
  }
  .cta {
    flex-direction: row;
    align-items: center;
  }
  .btn.primary {
    padding: 0 32px;
    font-size: var(--text-title-card-size);
  }
  .steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
  .steps li {
    flex-direction: column;
    padding: 22px;
  }
  .steps p {
    font-size: var(--text-row-title-size);
  }
  .faq {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .faq div {
    padding: 18px;
  }
  .faq h3 {
    font-size: var(--text-title-card-size);
  }
  .faq p {
    font-size: var(--text-row-title-size);
  }
  footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 48px;
  }
  footer p {
    margin: 0;
  }
}
@media (prefers-reduced-motion: no-preference) {
  a,
  .btn {
    transition:
      background-color 0.15s,
      color 0.15s;
  }
}
@media (forced-colors: active) {
  .btn,
  .steps li,
  .faq div {
    border: 1px solid CanvasText;
  }
}
/* The app's own high-contrast values (apps/web/src/styles.css). */
@media (prefers-contrast: more) {
  :root {
    --ink: #000;
    --muted: #3d4863;
    --line: #5d6985;
  }
  .btn,
  .steps li,
  .faq div,
  .chains li {
    border: 1px solid var(--ink);
  }
  a {
    text-decoration: underline;
  }
}
@media (forced-colors: active) {
  .skip {
    background: Canvas;
    color: LinkText;
    border-color: CanvasText;
  }
  a:focus-visible {
    outline: 3px solid Highlight;
    outline-offset: 2px;
  }
}
