/* כבד את: shared design system for the marketplace pages (colours, type and shapes taken from
   Dan's design template). Page-specific rules live in /css/<page>.css, never here. */
/* Fonts: each page links /fonts/fonts.css and preloads the two Hebrew files (no @import: it delays them). */

:root {
  /* Palette from Dan's design v6 (2026-10-07): deep green on warm cream. The old blue/sky/peach names stay
     as aliases so page CSS that still uses them picks up the new palette. */
  --cream: #FBF8F1;
  --sand: #F4EFE4;
  --sand-deep: #EFEADF;
  --line: #E7E1D4;
  --line-strong: #D3CBB8;
  /* Boundary of controls only (fields, chips, option cards, menu button): 3:1 or more on white, cream, sand and mint (WCAG 1.4.11).
     Cards, dividers and table rules keep --line / --line-strong. */
  --control-line: #8A8270;
  --ink: #1B2420;
  --muted: #4A554F;
  --faint: #5F6862;
  --green: #1F4A3D;
  --green-dark: #163629;
  --green-deep: #173A30;
  --green-line: #2D5446;
  --mint: #EEF5EF;
  --mint-ring: #DCEBDD;
  --sage: #DCEBDD;
  --leaf: #B3D6B6;
  --live: #3F8A63;
  --star: #E0A83A;
  --star-off: #8A8270; /* outline of an empty star: 3.6:1 on white, 3.3:1 on mint */
  --sky: var(--mint);
  --blue: var(--green);
  --blue-dark: var(--green-dark);
  --peach: var(--sand);
  --peach-ink: #8A5A4A;
  /* Two accents next to the green: calm blue (trust) and warm peach (care). Home page only for now. */
  --sky-soft: #E3EEF6;
  --sky-ink: #2B5F85;
  --peach-soft: #FCEEE2;
  --peach-mid: #F3D9C6;
  --peach-deep: #8A4520;
  --on-dark: #D5E2D9;
  --danger: #9B2C2C;
  --danger-bg: #FBEDEA;
  --white: #FFFFFF;
  --font: 'Heebo', 'Arial Hebrew', Arial, sans-serif;
  --font-display: 'Secular One', 'Heebo', sans-serif;
  --radius: 24px;
  --gutter: 32px;
  --shadow: 0 16px 40px -22px rgba(27, 36, 32, .35);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 18px/1.6 var(--font); }
img { max-width: 100%; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
a:focus-visible, button:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
/* On the dark green surfaces a green ring is invisible: use cream there. Checkboxes get an explicit ring instead of the browser's own. */
.site-footer a:focus-visible, .site-footer button:focus-visible, .info-callout a:focus-visible { outline-color: var(--cream); }
input[type='checkbox']:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }

.wrap { max-width: calc(1240px + 2 * var(--gutter)); margin: 0 auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; top: -60px; inset-inline-start: 12px; background: var(--green); color: var(--cream); padding: 10px 16px; border-radius: 12px; z-index: 50; }
.skip-link:focus { top: 12px; }

/* ---- type ---- */
.h1 { font: 400 52px/1.08 var(--font-display); letter-spacing: -0.005em; }
.h2 { font: 400 34px/1.15 var(--font-display); }
.h3 { font: 400 26px/1.2 var(--font-display); }
/* Hebrew line breaking: headings balance, paragraphs avoid a lone short word on the last line. */
h1, h2, h3, .h1, .h2, .sec-title { text-wrap: balance; }
p, li, dd, summary { text-wrap: pretty; }
.lede { color: var(--muted); font-size: 20px; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.eyebrow { font-size: 16px; font-weight: 700; color: var(--blue); }
.stack { display: flex; flex-direction: column; gap: var(--gap, 16px); }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: var(--gap, 12px); }

/* ---- header / footer (built by js/ui.js) ---- */
.site-header { border-bottom: 1px solid var(--line); background: var(--cream); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 400 30px/1 var(--font-display); color: var(--green); text-decoration: none; letter-spacing: -0.01em; }
.brand:hover { color: var(--green); }
.brand img { display: block; height: 40px; width: auto; }
.brand { flex: none; white-space: nowrap; }
.brand-slogan { margin-inline-end: auto; min-width: 0; font-size: 16px; font-weight: 600; line-height: 1.25; color: var(--muted); }   /* next to the logo; the rest of the header keeps to the far side */
/* .menu holds the nav and the actions: part of the header row on wide screens, a drop-down panel on phones. */
.menu { display: contents; }
.menu-btn { display: none; }
.nav { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; font-size: 16px; }
.nav a, .header-actions a.link, .link-btn { color: var(--ink); text-decoration: none; font-weight: 600; white-space: nowrap; }
.nav a:hover, .header-actions a.link:hover, .link-btn:hover { color: var(--green); }
.nav a[aria-current='page'], .header-actions a.link[aria-current='page'] { color: var(--green); font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 18px; font-size: 16px; }
.header-actions .btn { height: 46px; padding: 0 22px; font-size: 16px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: 16px; cursor: pointer; }
.site-footer { background: var(--green-deep); color: var(--on-dark); margin-top: 96px; font-size: 15px; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--cream); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 40px; padding-block: 56px 36px; }
.footer-about { display: flex; flex-direction: column; gap: 12px; }
.footer-about p { max-width: 260px; }
.site-footer .brand { color: var(--cream); font-size: 28px; gap: 12px; }
.site-footer .brand:hover { color: var(--cream); text-decoration: none; }
.site-footer .brand-tile { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 13px; background: var(--cream); }
.site-footer .brand img { height: 32px; }
.site-footer nav { display: flex; flex-direction: column; gap: 0; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer nav strong { color: var(--cream); margin-bottom: 4px; }
.footer-bottom { border-top: 1px solid var(--green-line); padding-block: 18px 32px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.footer-bottom p { max-width: 75ch; }   /* the legal line was ~190 characters wide */

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 28px; border-radius: 999px; border: 1.5px solid var(--green); background: var(--green); color: var(--cream); font: 700 17px/1 var(--font); text-decoration: none; cursor: pointer; transition: background .2s; }
.btn:hover { background: var(--green-dark); color: var(--cream); }
.btn--outline { background: transparent; color: var(--green); }
.btn--outline:hover { background: var(--green); color: var(--cream); }
.btn--light { background: var(--cream); border-color: var(--cream); color: var(--green); }
.btn--light:hover { background: var(--sand); color: var(--green-dark); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--ink); font-weight: 600; }
.btn--ghost:hover { background: var(--sand); color: var(--ink); }
.btn--lg { height: 56px; padding: 0 32px; font-size: 18px; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .55; cursor: not-allowed; }

/* ---- chips, tags, badges ---- */
.chip { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--control-line); background: var(--white); color: var(--ink); font: 600 15px/1 var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.chip:hover { border-color: var(--green); }
.chip[aria-pressed='true'] { background: var(--green); border-color: var(--green); color: var(--cream); font-weight: 700; }
.chip--lg { min-height: 52px; padding: 0 24px; font-size: 17px; }
.chip--square { width: 56px; height: 56px; padding: 0; border-radius: 16px; justify-content: center; font-size: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
/* js/ui.js removableChip: a chosen item with an × button */
.chip--removable { cursor: default; padding-inline-end: 6px; background: var(--mint); border-color: var(--mint-ring); color: var(--green); }
.chip--removable:hover { border-color: var(--green); }
.chip-remove { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.chip-remove:hover { background: var(--white); }
.opt { min-height: 64px; padding: 12px 18px; border-radius: 16px; border: 1.5px solid var(--control-line); background: var(--white); color: var(--ink); font: 600 17px/1.3 var(--font); cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: start; }
.opt:hover { border-color: var(--ink); }
.opt::after { content: ''; width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid var(--control-line); }
.opt[aria-pressed='true'] { border-color: var(--green); background: var(--mint); font-weight: 700; }
.opt[aria-pressed='true']::after { border-color: var(--green); background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FBF8F1' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 14px no-repeat; }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 10px; }
.tag { display: inline-block; font-size: 14px; font-weight: 600; color: var(--green); background: var(--mint); padding: 3px 12px; border-radius: 999px; }
.badge { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 14px; font-weight: 700; color: var(--cream); background: var(--green); padding: 3px 12px; border-radius: 999px; }
.badge--soft { color: var(--blue); background: var(--sky); }
.badge--urgent { background: var(--danger); }

/* ---- surfaces ---- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; transition: box-shadow .25s, border-color .25s; }
.card:hover { border-color: var(--leaf); box-shadow: 0 18px 40px -24px rgba(27, 36, 32, .35); }
.panel { background: var(--sand); border-radius: var(--radius); padding: 30px; }
.panel--outline { background: transparent; border: 1px solid var(--line); }
.avatar { display: block; object-fit: cover; object-position: 50% 30%; background: var(--sand); }

/* ---- forms ---- */
.field { display: flex; flex-direction: column; gap: 8px; font-weight: 700; font-size: 19px; }
.field input, .field select, .field textarea, .input { width: 100%; height: 56px; border: 1px solid var(--control-line); border-radius: 14px; padding: 0 16px; font: 400 17px/1.4 var(--font); background: var(--white); color: var(--ink); }
.field textarea { height: auto; min-height: 120px; padding: 14px 16px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--mint-ring); }
.field input::placeholder, .field textarea::placeholder, .input::placeholder { color: var(--faint); }
/* Invalid fields (js/login-form.js sets aria-invalid and a .field-error line under the field; both are cleared on edit). */
.field input[aria-invalid='true'], .field select[aria-invalid='true'], .field textarea[aria-invalid='true'], .input[aria-invalid='true'] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.field input[aria-invalid='true']:focus, .field select[aria-invalid='true']:focus, .field textarea[aria-invalid='true']:focus, .input[aria-invalid='true']:focus { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg), 0 0 0 1px var(--danger); }
.chips[aria-invalid='true'], [role='group'][aria-invalid='true'] { outline: 2px solid var(--danger); outline-offset: 4px; border-radius: 16px; }
.check input[aria-invalid='true'] { outline: 2px solid var(--danger); outline-offset: 2px; }
.field-error { display: block; font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--danger); }
/* Phone and email are typed left-to-right: keep them on the right edge, under their right-aligned label. */
.field input[dir='ltr'], .input[dir='ltr'] { text-align: end; }
.field-hint { font-size: 15px; font-weight: 400; color: var(--muted); }
/* js/city-input.js: "did you mean" options / list failed to load, shown under the city field */
.city-hint { display: block; font-size: 15px; font-weight: 600; color: var(--danger); }
.city-hint .link-btn { color: var(--green); font-size: 15px; text-decoration: underline; }
.city-hint--wait { color: var(--muted); font-weight: 500; }   /* the list is still loading: calm, not an error */
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 18px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-weight: 700; font-size: 19px; margin-bottom: 14px; padding: 0; }
legend .muted { font-weight: 400; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.5; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; flex-shrink: 0; appearance: none; -webkit-appearance: none; border: 2px solid var(--muted); border-radius: 6px; background: var(--white); display: grid; place-content: center; cursor: pointer; }
.check input[type='radio'] { border-radius: 50%; }
.check input:checked { background: var(--green); border-color: var(--green); }
.check input[type='checkbox']:checked::after { content: ''; width: 6px; height: 11px; border: solid var(--cream); border-width: 0 2px 2px 0; rotate: 45deg; translate: 0 -1px; }
.check input[type='radio']:checked::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--cream); }
.alert { background: var(--danger-bg); color: var(--danger); border-radius: 14px; padding: 12px 16px; font-size: 16px; font-weight: 600; }
.notice { background: var(--mint); color: var(--green); border-radius: 14px; padding: 12px 16px; font-size: 16px; font-weight: 600; }
/* "only families who employed can rate" (0011): green box, cream text, a round "i" */
.info-callout { display: flex; align-items: flex-start; gap: 14px; background: var(--green); color: var(--cream); border-radius: 20px; padding: 18px 22px; font-size: 17px; line-height: 1.6; max-width: 760px; }
.info-callout p { margin: 0; }
.info-callout strong { font-weight: 700; }
.info-callout-icon { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--cream); color: var(--green); display: flex; align-items: center; justify-content: center; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.steps span { display: block; height: 4px; border-radius: 99px; background: var(--line); }
.steps span.on { background: var(--green); }
.stars { display: inline-flex; gap: 1px; font-size: 1em; line-height: 1; letter-spacing: 0; }
.stars .on { color: var(--star); }
.stars .off { color: transparent; -webkit-text-stroke: 1px var(--star-off); } /* empty = outline, so filled vs empty differs by shape, not only by hue */
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }

@media (max-width: 720px) {
  :root { --gutter: 20px; }
  body { font-size: 17px; }
  .h1 { font-size: 38px; }
  .h2 { font-size: 28px; }
  .site-footer { margin-top: 64px; }
}
/* Phones and tablets: logo + a round menu button; the nav and actions open as a panel under the header. */
@media (max-width: 960px) {
  .site-header { position: relative; }
  .site-header .wrap { padding-block: 12px; }
  .brand { font-size: 26px; gap: 8px; }
  .brand img { height: 34px; }
  .site-header .wrap { gap: 12px; }
  .brand-slogan { font-size: 14px; }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--control-line); border-radius: 50%; background: var(--white); color: var(--ink); cursor: pointer; }
  .menu { display: none; }
  .site-header.is-open .menu { display: flex; flex-direction: column; align-items: stretch; gap: 18px; position: absolute; inset-inline: 0; top: 100%; z-index: 40; padding: 18px var(--gutter) 24px; background: var(--cream); border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px -24px rgba(27, 36, 32, .5); }
  .site-header.is-open .nav { flex-direction: column; align-items: stretch; gap: 0; font-size: 18px; }
  .site-header.is-open .nav a { padding-block: 12px; border-bottom: 1px solid var(--sand-deep); }
  .site-header.is-open .header-actions { justify-content: space-between; font-size: 18px; }
  .site-header.is-open .header-actions a.link, .site-header.is-open .header-actions .link-btn { min-height: 48px; display: inline-flex; align-items: center; }
}
/* Logged-out visitors and caregivers get 5 header links; in this band the two info links (also in the
   footer and on the home page) step aside so the header stays one row. */
@media (min-width: 961px) and (max-width: 1180px) { .nav .nav-wide { display: none; } }
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 18px; padding-block: 36px 20px; }
  .site-footer nav { flex-direction: row; flex-wrap: wrap; gap: 0 18px; }
  .site-footer nav strong { width: 100%; margin: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
/* GA consent bar (js/analytics.js): in the page flow above <main>, so it never covers a fixed bottom bar. */

/* Touch screens: no sticky hover shadows/colours after a tap or while scrolling over a card. */
@media (hover: none) {
  .card:hover { box-shadow: none; border-color: var(--line); }
  .btn--outline:hover { background: transparent; color: var(--green); }
  .chip:hover, .opt:hover { border-color: var(--control-line); }
  .chip[aria-pressed='true']:hover { border-color: var(--green); }
  .opt[aria-pressed='true']:hover { border-color: var(--green); }
}

/* Warm "care" accent (peach) next to the calm "trust" blue and the "health" green. */
.panel--warm { background: var(--peach); }
.panel--sky { background: var(--sky); }
.notice--warm { background: var(--peach); color: var(--peach-ink); }
