/**
 * assets/styles/platform.css
 *
 * The public site on dawkids.com: the front page, the nursery directory, a
 * nursery's page, a category, and the join form.
 *
 * Built on ds/tokens.css -- which must be loaded BEFORE this file. Both
 * templates that render this site do so (views/platform/layouts/layout.ejs and
 * views/platform/pages/home.ejs, which carries its own copy of the shell). If
 * a third entry point is ever added, it loads the tokens or it gets a page with
 * no colours at all; that has happened once already.
 *
 * WHAT CHANGED, AND WHY IT HAD TO
 *
 * The sheet this replaces had three faults that no amount of tuning fixes:
 *
 * 1. `.searchbar` was `display: flex; flex-wrap: wrap` inside `max-width: 720px`
 *    holding an input at `flex: 1 1 220px`, two selects at `flex: 0 1 160px`
 *    and a button. 220 + 160 + 160 + button does not fit in 720, so the bar
 *    wrapped into four ragged rows at EVERY width, including a desktop. It was
 *    not a small-screen problem; it never laid out correctly at all. It is a
 *    grid now, with an explicit shape at each of three widths.
 *
 * 2. Three media queries, for the whole site.
 *
 * 3. `letter-spacing: -.02em` on the h1. Arabic is a joined script: negative
 *    tracking pulls the letters of a word into each other. It is not a tight
 *    heading, it is a misspelt one.
 */

/**
 * ALIASES ONTO THE DESIGN SYSTEM -- not a second palette.
 *
 * These names are referenced throughout this file and were previously declared
 * here as literals (#14202c ink, #03a9f3 accent). Because this sheet loads
 * after the tokens and re-used several of the same names, it silently won every
 * one of those arguments, so the public site kept the purchased theme's stock
 * blue and had no dark theme at all.
 *
 * `--bg` is included because two rules below referenced it and nothing ever
 * declared it -- those backgrounds have been resolving to nothing since the
 * sheet was written.
 */
:root {
  --muted: var(--ink-muted);
  --accent-deep: var(--accent-hover);
  --warm: var(--sun-500);
  --radius: var(--r-lg);
  --shadow: var(--e-2);
  --bg: var(--surface-2);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--t-lg);
  line-height: var(--lh-body);
  /**
   * NO `direction` AND NO `text-align: right` HERE.
   *
   * Both were hard-coded, and both were wrong for six of the ten languages this
   * site ships in. The templates already compute `dir` on <html>, correctly,
   * and this rule then overrode the attribute they had just set: an English or
   * Turkish visitor got a right-to-left page, one click from the switcher.
   */
  text-align: start;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; letter-spacing: 0; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--s-5); }
@media (max-width: 575.98px) { .wrap { padding-inline: var(--s-4); } }

/* ====================================================================== *
 * HEADER
 * ====================================================================== */

.site-head {
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  inset-block-start: 0;
  z-index: var(--z-sticky);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  min-height: var(--topbar-h);
  padding-block: var(--s-2);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--t-xl);
  color: var(--ink);
  flex: 0 0 auto;
}
.brand:hover { text-decoration: none; }
.brand img { height: 32px; width: auto; background: none; }

.site-nav {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.site-nav > a {
  color: var(--ink-2);
  font-size: var(--t-sm);
  font-weight: var(--fw-medium);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
  min-height: 38px;
  display: inline-flex;
  align-items: center;
}
.site-nav > a:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }

/**
 * The sign-in button, which was dark ink on a dark fill.
 *
 * `.site-nav > a` is a class plus an element, so it outranks the bare `.btn`
 * that was trying to set the label colour, and the nav's own --ink-2 won. The
 * button was rendered, filled with the brand, and its label almost invisible
 * on it. Specificity, not colour choice -- the fix is to say it at the same
 * weight the nav rule is said at.
 */
.site-nav > a.btn,
.site-nav > a.btn:hover { color: var(--ink-on-brand); }
.site-nav > a.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* ---- the mobile menu -------------------------------------------------- *
 * There was none. The nav wrapped, and on a phone the brand, the links and the
 * sign-in button fought over one row and all of them lost.
 *
 * It opens with no JavaScript: a visually hidden checkbox, a <label> drawn as
 * the button, and the panel shown by `:checked`. The checkbox is a real
 * focusable control, so the keyboard reaches it; it is not hidden with
 * `display: none`, which would take it out of the tab order entirely.         */

/**
 * Hidden from sight, never from the keyboard.
 *
 * `opacity: 0` alone was not enough: a checkbox still paints its own native
 * box, and on a wide screen -- where the burger is display:none -- a small grey
 * square appeared beside the brand. `clip-path: inset(50%)` removes the paint
 * without removing the element from the tab order, which `display: none` would.
 */
.nav-check {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  appearance: none;
  -webkit-appearance: none;
}
.nav-burger {
  display: none;
  margin-inline-start: auto;
  width: 44px; height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--surface);
  flex: 0 0 auto;
}
.nav-burger span {
  display: block;
  width: 18px; height: 2px;
  background: var(--ink-2);
  border-radius: 2px;
  transition: transform var(--dur-2) var(--ease), opacity var(--dur-1) var(--ease);
}
/* The ring has to appear on the label, because the control the keyboard is
   actually focusing is invisible. */
.nav-check:focus-visible + .nav-burger { outline: 2px solid var(--focus); outline-offset: 2px; }

@media (max-width: 899.98px) {
  .nav-burger { display: flex; }

  .site-nav {
    display: none;
    margin-inline-start: 0;
    width: 100%;
    order: 3;
    flex-direction: column;
    align-items: stretch;
    gap: var(--s-1);
    padding: var(--s-3) 0 var(--s-4);
    border-top: 1px solid var(--line);
    margin-top: var(--s-3);
  }
  .nav-check:checked ~ .site-nav { display: flex; }

  /* Full-width rows with a real target height, not links squeezed onto a bar. */
  .site-nav > a {
    font-size: var(--t-lg);
    padding: var(--s-3) var(--s-2);
    min-height: 52px;
    border-radius: var(--r-sm);
  }
  .site-nav > a.btn { justify-content: center; margin-top: var(--s-2); }

  /* The burger becomes a cross while the panel is open. */
  .nav-check:checked + .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-check:checked + .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-check:checked + .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .site-head .wrap { flex-wrap: wrap; padding-block: var(--s-3); }

  /* On a narrow screen the language list opens in flow rather than floating
     off the edge of the viewport. */
  .lang-switch { width: 100%; }
  .lang-switch > summary { width: 100%; justify-content: space-between; min-height: 48px; }
  .lang-switch ul {
    position: static;
    box-shadow: none;
    margin-top: var(--s-2);
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  }
}

/* ====================================================================== *
 * BUTTONS
 * ====================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  border: 1px solid var(--accent);
  cursor: pointer;
  font: inherit;
  font-size: var(--t-sm);
  font-weight: var(--fw-semi);
  padding: 11px var(--s-6);
  min-height: 46px;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: var(--ink-on-brand);
  text-align: center;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); text-decoration: none; color: var(--ink-on-brand); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-3); color: var(--ink); border-color: var(--n-400); }
.btn-sm { padding: 8px var(--s-4); font-size: var(--t-xs); min-height: 38px; }
.btn-quiet {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  font-weight: var(--fw-medium);
}
.btn-quiet:hover { background: var(--surface-3); color: var(--ink); }

/* ====================================================================== *
 * HERO
 *
 * Two columns on a wide screen -- the claim on one side, the search on the
 * other -- because a lone paragraph with 46 characters of measure leaves half
 * the screen empty, which is what it did. One column below 900px, where the
 * search comes first: a parent on a phone is here to search, not to read.
 * ====================================================================== */

/**
 * A DARK PANEL, not a white page with a heading on it.
 *
 * The hero was `background: var(--surface)` -- white -- carrying a headline, a
 * 34-character paragraph and a form. On a front page whose directory is still
 * empty, that is a blank sheet with four inputs on it, and no amount of
 * spacing tuning makes it read as a product.
 *
 * Dark ground, white type, and the search lifted onto it as a white card. It
 * puts the one thing the page is for at the centre of the composition, it
 * gives the page a figure against a ground, and it holds up with zero rows in
 * the database -- which is the state this page is in today.
 *
 * The colour is fixed rather than themed. This panel is the brand's own
 * surface: it is dark in the light theme too, the way a masthead is.
 */
.hero {
  position: relative;
  isolation: isolate;
  /* A tinted light ground, not white and not dark. White gave the page no
     figure at all; dark inverted the ground under a nursery's own logo and
     under an icon set balanced for white. This keeps the figure and leaves
     everything authored against a light page alone. */
  background: linear-gradient(180deg, var(--brand-050) 0%, var(--surface) 100%);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-block: var(--s-10) var(--s-9);
  overflow: hidden;
}
@media (max-width: 767.98px) { .hero { padding-block: var(--s-7) var(--s-8); } }

/**
 * The light in the panel. Two soft blooms and a fine dot grid, all drawn --
 * there is no photography in this repository that a parent should be shown,
 * and a stock photograph of somebody else's children would be a promise
 * nobody made.
 */
.hero-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(46% 58% at 84% 4%, rgba(78, 168, 201, .22) 0%, transparent 62%),
    radial-gradient(40% 50% at 6% 98%, rgba(232, 131, 79, .16) 0%, transparent 64%),
    radial-gradient(circle at center, rgba(14, 82, 115, .07) 1px, transparent 1.4px);
  background-size: auto, auto, 26px 26px;
}

.hero h1 { color: var(--ink); }
.hero p.lede { color: var(--ink-2); }

.hero-kicker {
  margin: 0 0 var(--s-4);
  font-size: var(--t-xs);
  font-weight: var(--fw-semi);
  letter-spacing: .04em;
  color: var(--accent);
  max-width: 44ch;
  line-height: var(--lh-snug);
}

.hero .wrap {
  display: grid;
  gap: var(--s-7);
  grid-template-columns: 1fr;
  align-items: start;
}
/* Stacked, the search comes first: this page is opened to be used. */
.hero-copy { order: 2; }
.hero-search { order: 1; min-width: 0; }

@media (min-width: 900px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: var(--s-9);
    align-items: center;
  }
  .hero-copy { order: 1; }
  .hero-search { order: 2; }
}

.hero h1 {
  font-size: var(--t-5xl);
  line-height: 1.22;
  margin: 0 0 var(--s-4);
  font-weight: var(--fw-bold);
  /* No negative tracking. Arabic joins. */
  letter-spacing: 0;
}
.hero p.lede {
  font-size: var(--t-xl);
  color: var(--ink-2);
  margin: 0;
  max-width: 34ch;
  line-height: var(--lh-snug);
}

/* ---- the search panel ------------------------------------------------ *
 * A grid with a stated shape at each width, not a flex row left to wrap where
 * it likes. Three columns on a wide screen, two on a tablet, one on a phone;
 * the keyword field and the button always span the full row.                 */
/* The card that floats on the panel. It carries the page's only real
   elevation, because it is the only thing on the page that is above it. */
.hero-search {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: var(--s-6);
  /* On a light ground the card is lifted by a soft, wide shadow rather than a
     heavy one -- a dark shadow on a pale page reads as dirt, not as height. */
  box-shadow:
    0 18px 40px -18px rgba(6, 47, 67, .28),
    0 2px 6px rgba(6, 47, 67, .06);
}
@media (max-width: 575.98px) { .hero-search { padding: var(--s-4); border-radius: var(--r-lg); } }

.hero-search__title {
  margin: 0 0 var(--s-4);
  font-family: var(--font-display);
  font-size: var(--t-md);
  font-weight: var(--fw-semi);
  color: var(--ink);
}

.searchbar {
  display: grid;
  gap: var(--s-3);
  grid-template-columns: 1fr;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
  max-width: none;
}
@media (min-width: 560px) {
  .searchbar { grid-template-columns: 1fr 1fr; }
  .searchbar input[type="search"],
  .searchbar input[name="keyword"],
  .searchbar > .btn { grid-column: 1 / -1; }
}

.searchbar input,
.searchbar select {
  font: inherit;
  font-size: var(--t-sm);
  padding: 12px var(--s-4);
  min-height: 48px;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  min-width: 0;
}
.searchbar input::placeholder { color: var(--ink-faint); }
.searchbar input:focus,
.searchbar select:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: var(--ring);
}
.searchbar .btn { width: 100%; }

/* The extra filters, folded away. */
.more-filters { margin-top: var(--s-2); }
.more-filters > summary {
  cursor: pointer;
  list-style: none;
  font-size: var(--t-sm);
  font-weight: var(--fw-medium);
  color: var(--accent);
  padding: var(--s-2) 0;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 38px;
}
.more-filters > summary::-webkit-details-marker { display: none; }
.more-filters > summary::before { content: "＋"; font-size: .9em; }
.more-filters[open] > summary::before { content: "－"; }

.searchbar-more {
  margin-top: var(--s-3);
  display: grid;
  gap: var(--s-3);
  grid-template-columns: 1fr;
}
@media (min-width: 560px) { .searchbar-more { grid-template-columns: 1fr 1fr; } }
.searchbar-more .check {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--t-sm);
  color: var(--ink-2);
  min-height: 44px;
}

/* ---- nearest ---------------------------------------------------------- */
.near-me { margin-top: var(--s-4); display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.near-msg { font-size: var(--t-xs); color: var(--ink-muted); }
/**
 * `display: grid` beats the browser's own `[hidden] { display: none }`, so the
 * empty results box was painting as a stray grey bar at the foot of the search
 * card before anyone had pressed anything. This is the standard trap with
 * `hidden` and any display rule; the guard belongs next to the rule that
 * causes it.
 */
[hidden] { display: none !important; }

.near-results {
  margin-top: var(--s-3);
  display: grid;
  gap: var(--s-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-2);
  background: var(--surface-2);
}
.near-item {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: var(--t-sm);
}
.near-item:hover { background: var(--surface); text-decoration: none; }
.near-item b { font-weight: var(--fw-semi); color: var(--ink); }
.near-km { font-size: var(--t-2xs); color: var(--accent); font-variant-numeric: tabular-nums; margin-inline-start: auto; }
.near-where { font-size: var(--t-xs); color: var(--ink-muted); }
.near-empty { color: var(--ink-muted); font-size: var(--t-sm); padding: var(--s-3); }

/* ====================================================================== *
 * TOTALS
 * ====================================================================== */

.totals {
  grid-column: 1 / -1;
  display: flex;
  gap: var(--s-8);
  flex-wrap: wrap;
  margin-top: var(--s-4);
  padding-top: var(--s-6);
  border-top: 1px solid var(--line);
  order: 3;
}
.total b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--t-3xl);
  line-height: 1.1;
  font-weight: var(--fw-bold);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.total span { font-size: var(--t-xs); color: var(--ink-muted); }

/* ====================================================================== *
 * WHAT A PARENT GETS
 *
 * Three claims that are true with an empty database, which is the state this
 * page is in until the platform lists its first nursery. Without them the
 * front page is a search box above an empty grid.
 * ====================================================================== */

.band-value { background: var(--surface); border-bottom: 1px solid var(--line); }

.value-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-7);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .value-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); } }

.value-item { display: grid; gap: var(--s-2); align-content: start; }
.value-icon {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--accent-wash);
  color: var(--accent);
  font-size: 19px;
  margin-bottom: var(--s-2);
}
.value-item h3 { margin: 0; font-size: var(--t-lg); font-weight: var(--fw-semi); }
.value-item p { margin: 0; color: var(--ink-2); font-size: var(--t-sm); line-height: var(--lh-snug); max-width: 42ch; }

/* ====================================================================== *
 * THE ONE ASK
 * ====================================================================== */

.band-cta {
  background: var(--brand-050);
  border-block: 1px solid var(--accent-line);
  color: var(--ink);
}
.band-cta .wrap {
  display: grid;
  gap: var(--s-5);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 820px) { .band-cta .wrap { grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-8); } }
.band-cta h2 { color: var(--ink); margin: 0 0 var(--s-2); font-size: var(--t-2xl); }
.band-cta p { margin: 0; color: var(--ink-2); max-width: 58ch; line-height: var(--lh-snug); }

/* Kept as a name so the markup does not have to change, but on a light band
   it is simply the ordinary filled button. */
.btn-on-dark { white-space: nowrap; }

/* ====================================================================== *
 * SECTIONS
 * ====================================================================== */

section.band { padding-block: var(--s-10); }
@media (max-width: 767.98px) { section.band { padding-block: var(--s-8); } }
section.band:nth-of-type(even) { background: var(--surface); border-block: 1px solid var(--line); }

.band-head {
  display: flex;
  align-items: baseline;
  gap: var(--s-4);
  margin-bottom: var(--s-6);
  flex-wrap: wrap;
}
.band-head h2 { font-size: var(--t-2xl); margin: 0; font-weight: var(--fw-bold); }
.band-head a { margin-inline-start: auto; font-size: var(--t-sm); font-weight: var(--fw-medium); }

/* ====================================================================== *
 * CHIPS
 * ====================================================================== */

.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-pill);
  font-size: var(--t-sm);
  color: var(--ink-2);
  min-height: 40px;
}
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.chip.is-on { background: var(--accent); border-color: var(--accent); color: var(--ink-on-brand); font-weight: var(--fw-semi); }
.chip em { font-style: normal; color: var(--ink-muted); font-size: var(--t-2xs); font-variant-numeric: tabular-nums; }
.chip.is-on em { color: inherit; opacity: .8; }

/* ====================================================================== *
 * NURSERY CARDS
 * ====================================================================== */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--s-5); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  transition: border-color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.card:hover { border-color: var(--accent-line); box-shadow: var(--e-2); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .card:hover { transform: none; } }

.card-photo { aspect-ratio: 16 / 9; background: var(--accent-wash); overflow: hidden; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.card-photo.is-empty { display: grid; place-items: center; color: var(--accent); font-size: var(--t-4xl); }
.card-body { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); flex: 1; }
.card h3 { margin: 0; font-size: var(--t-lg); font-weight: var(--fw-semi); line-height: var(--lh-tight); }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--accent); }
.card .where { font-size: var(--t-xs); color: var(--ink-muted); }
.card .blurb {
  font-size: var(--t-sm);
  color: var(--ink-2);
  margin: 0;
  line-height: var(--lh-snug);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
.card .facts { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: auto; padding-top: var(--s-3); }
.fact {
  font-size: var(--t-2xs);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 3px var(--s-3);
  border-radius: var(--r-sm);
  color: var(--ink-2);
  white-space: nowrap;
}

/* ====================================================================== *
 * DIRECTORY
 * ====================================================================== */

.filters {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  margin-bottom: var(--s-6);
}
.filters form {
  display: grid;
  gap: var(--s-3);
  grid-template-columns: 1fr;
  align-items: end;
}
@media (min-width: 640px) { .filters form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .filters form { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.filters form > .btn { min-height: 46px; }

.field { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; }
.field label { font-size: var(--t-2xs); font-weight: var(--fw-semi); color: var(--ink-muted); }
.field input, .field select {
  font: inherit;
  font-size: var(--t-sm);
  padding: 11px var(--s-3);
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--focus); box-shadow: var(--ring); }

.result-count { color: var(--ink-muted); font-size: var(--t-sm); margin: 0 0 var(--s-5); }

.pager { display: flex; gap: var(--s-1); justify-content: center; margin-top: var(--s-8); flex-wrap: wrap; }
.pager a, .pager span {
  padding: var(--s-2) var(--s-4);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: var(--t-sm);
  font-variant-numeric: tabular-nums;
}
.pager a:hover { border-color: var(--accent-line); color: var(--accent); text-decoration: none; }
.pager .is-on { background: var(--accent); border-color: var(--accent); color: var(--ink-on-brand); font-weight: var(--fw-semi); }

.empty { text-align: center; padding: var(--s-10) var(--s-5); color: var(--ink-muted); }
.empty h3 { color: var(--ink); margin: 0 0 var(--s-2); font-size: var(--t-xl); }

/* ====================================================================== *
 * NURSERY PROFILE
 * ====================================================================== */

.profile-head { background: var(--surface); border-bottom: 1px solid var(--line); padding-block: var(--s-9); }
.profile-head h1 { margin: 0 0 var(--s-2); font-size: var(--t-4xl); font-weight: var(--fw-bold); }
.profile-head .where { color: var(--ink-muted); margin: 0 0 var(--s-6); }
.profile-actions { display: flex; gap: var(--s-3); flex-wrap: wrap; }

.cols { display: grid; grid-template-columns: 1fr; gap: var(--s-7); }
@media (min-width: 900px) { .cols { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-6);
}
.panel h2 { margin: 0 0 var(--s-3); font-size: var(--t-xl); font-weight: var(--fw-semi); }
.panel p { margin: 0 0 var(--s-3); color: var(--ink-2); }
.panel p:last-child { margin-bottom: 0; }

.facts-list { display: grid; gap: var(--s-3); margin: 0; }
.facts-list > div { display: flex; gap: var(--s-3); justify-content: space-between; font-size: var(--t-sm); }
.facts-list dt, .facts-list .k { color: var(--ink-muted); }
.facts-list dd, .facts-list .v { margin: 0; font-weight: var(--fw-medium); text-align: end; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: var(--s-3); }
.gallery img { border-radius: var(--r-md); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* ====================================================================== *
 * FORMS
 * ====================================================================== */

.form-grid { display: grid; grid-template-columns: 1fr; gap: var(--s-5); }
@media (min-width: 700px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid .full { grid-column: 1 / -1; }
}
.form-grid label { display: block; font-size: var(--t-xs); font-weight: var(--fw-semi); color: var(--ink-2); margin-bottom: var(--s-2); }
.form-grid input, .form-grid select, .form-grid textarea {
  font: inherit;
  font-size: var(--t-sm);
  width: 100%;
  padding: 12px var(--s-4);
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus {
  outline: none; border-color: var(--focus); box-shadow: var(--ring);
}
.form-grid textarea { min-height: 140px; resize: vertical; line-height: var(--lh-snug); }
.form-note { font-size: var(--t-xs); color: var(--ink-muted); margin-top: var(--s-1); }

.alert {
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-md);
  margin-bottom: var(--s-5);
  font-size: var(--t-sm);
  border: 1px solid var(--line);
  border-inline-start-width: 3px;
}
.alert-ok { background: var(--ok-100); color: var(--ok-700); border-color: var(--ok-600); }
.alert-bad { background: var(--bad-100); color: var(--bad-700); border-color: var(--bad-600); }

/* ====================================================================== *
 * NEWS
 * ====================================================================== */

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--s-5); }
.news-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--dur-2) var(--ease);
}
.news-card:hover { border-color: var(--accent-line); }
.news-card.is-pinned { border-color: var(--accent-line); box-shadow: inset 0 3px 0 var(--sun-500); }
.news-photo { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-3); }
.news-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-body { padding: var(--s-4) var(--s-5) var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); flex: 1; }
.news-meta { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.news-tag {
  font-size: var(--t-3xs);
  font-weight: var(--fw-semi);
  padding: 2px var(--s-2);
  border-radius: var(--r-xs);
  border: 1px solid var(--line);
  color: var(--ink-muted);
}
.news-tag-nursery { color: var(--accent); border-color: var(--accent-line); background: var(--accent-wash); }
.news-pin { font-size: var(--t-3xs); color: var(--sun-600); font-weight: var(--fw-semi); }
.news-card h3 { margin: 0; font-size: var(--t-md); line-height: var(--lh-tight); font-weight: var(--fw-semi); }
.news-card h3 a { color: var(--ink); }
.news-card h3 a:hover { color: var(--accent); }
.news-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: var(--t-sm);
  line-height: var(--lh-snug);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

/* ====================================================================== *
 * FOOTER
 * ====================================================================== */

.site-foot {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-block: var(--s-8) var(--s-6);
  color: var(--ink-muted);
  font-size: var(--t-sm);
  margin-top: var(--s-9);
}
.site-foot .wrap {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 700px) {
  .site-foot .wrap { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .site-foot .foot-legal { grid-column: 1 / -1; }
}
.site-foot .brand { font-size: var(--t-lg); margin-bottom: var(--s-3); }
.foot-line { margin: 0; max-width: 40ch; line-height: var(--lh-snug); }
.site-foot nav { display: flex; flex-direction: column; gap: var(--s-2); }
@media (min-width: 700px) { .site-foot nav { align-items: flex-start; } }
.site-foot a { color: var(--ink-2); min-height: 32px; display: inline-flex; align-items: center; }
.site-foot a:hover { color: var(--accent); }
.foot-legal {
  margin: 0;
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
  font-size: var(--t-xs);
  font-variant-numeric: tabular-nums;
}

/* ====================================================================== *
 * THE LANGUAGE SWITCH -- see ds/public.css, which owns its appearance.
 * Only the placement is here.
 * ====================================================================== */

.lang-switch { flex: 0 0 auto; }
