/* The frame of every page of dancers.app: the header, the Menú and the footer, the same on the Worker's pages
   (src/worker/directory/chrome.ts) and the app's screens (Shell in src/app/ui.tsx), which both link this file after
   their own (public/directorio.css, src/app/styles.css: the tokens live there). KB: HEADER_FOOTER_HOME_2026-10.md and
   the canvas boards Main, Home-escritorio, Menu-celular and Cuenta-escritorio.
   Decisions, not defects:
   - «Menú» is a word with its icon, never a bare hamburger: the point is to show how much Dancers has (§2).
   - The phone's header has no row of sections: six don't fit at 390 px and a cut word looks broken. They live in the
     Menú and in the home's own sections.
   - On desktop the sections fold into the Menú one by one from the end (Tienda first) when the row runs out (a script
     in chrome.ts measures it); they never wrap and are never cut.
   - The current section is a white pill, not an underline (an underline reads as a link).
   - The phone's Menú is a page in Niebla with white cards under its own lime band; on desktop it's a dropdown in
     Pizarra, because a sheet over the page is Pizarra, never lime (BRAND_GUIDE §7).
   - The footer is lime with the wordmark cut by its edge; on the phone each group is one line of links separated by
     «|», where the bar belongs to the link before it so a wrapped line never starts with one. */

/* ---- The header ------------------------------------------------------------------------------------------- */
.top { background: var(--lima); color: var(--pizarra); padding-top: env(safe-area-inset-top); }
.hd { max-width: 1040px; margin: 0 auto; min-height: 64px; padding: 0 8px 0 16px; display: flex; align-items: center; gap: 20px; }
.hd .brand { flex: none; display: flex; align-items: center; min-height: 44px; color: var(--pizarra); text-decoration: none; }
.hd .wordmark { display: block; width: 104px; height: auto; }
/* Everything in the row lines up with the wordmark's letters, never with the dancer's head (Rafael, 26-Oct): the box
   runs from the head's top (y 0 of 194) to the letters' foot (190.5), so a centred box leaves the letters 23.5 units
   (12.11 % of its height) low. */
.hd .wordmark { transform: translateY(-12.11%); }
.doors { display: none; }
.hd-acts { margin-left: auto; flex: none; display: flex; align-items: center; }
.tb { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 8px; border: 0; border-radius: var(--radius-pill);
  background: none; color: var(--pizarra); font: 600 15px/16px var(--font-sans); text-decoration: none; cursor: pointer; white-space: nowrap; }
/* A 16 px line, even inside the 44 px button: with 15 px the line starts on a half pixel and the label's baseline rounds
   down, 1 px under the wordmark's letters on the phone (measured, 26-Oct). */
.tb svg { width: 18px; height: 18px; flex: none; }
.tb .caret { width: 14px; height: 14px; }
.hd-account { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.hd-country { display: none; }
.hd-menu .i-close, .hd-menu[aria-expanded="true"] .i-open { display: none; }
.hd-menu[aria-expanded="true"] .i-close { display: block; }
.flag { display: block; flex: none; width: 21px; height: 14px; border-radius: 2px; outline: 1px solid rgba(58, 61, 66, .22); outline-offset: -1px;
  object-fit: cover; }
.flag.globe { outline: 0; }
@media (min-width: 700px) {
  /* The boards' column: 1040 px of content, like the page and the footer. */
  .hd { max-width: 1072px; min-height: 76px; padding: 0 16px; gap: 0; }
  .hd .wordmark { width: 112px; }
  .hd .brand { margin-right: 20px; }
  /* 14 px labels, 30 px apart with a bar between: all six fit from 1180 px, five at 1100, four at 1024 (the first label
     starts 20 px after the wordmark). */
  .doors { display: flex; flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; margin: 0 0 0 -7px; }
  .doors a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 7px; border-radius: var(--radius-pill);
    color: var(--pizarra); font-weight: 600; font-size: 14px; text-decoration: none; }
  .doors a[hidden] { display: none; }
  /* Room between sections, with a gray bar in the middle like the footer's «|» (Rafael, 26-Oct): drawn, not typed, so a
     screen reader doesn't read it as part of the link; outside the pill, and not clickable. */
  .doors a { position: relative; }
  .doors a + a { margin-left: 16px; }
  .doors a + a::before { content: ""; position: absolute; left: -8.75px; top: 50%; width: 1.5px; height: 16px; margin-top: -8px;
    background: currentColor; opacity: .3; pointer-events: none; }
  /* The current section's white pill already separates it: no bar against its edges. */
  .doors a[aria-current]::before, .doors a[aria-current] + a::before { display: none; }
  .doors a[aria-current] { background: var(--blanco); }
  .hd-acts { margin-right: -8px; }
  .tb { font-size: 14px; padding: 0 6px; }
  .hd-country { display: inline-flex; gap: 6px; }
  /* Room for the open Menú's pill (its 6 px shadow) after «Entrar» or «Mi escuela». */
  .hd-account { margin-right: 4px; }
  /* Open, the button is a Pizarra pill: its own box, as the board draws it, so nothing in the row moves. */
  .hd-menu[aria-expanded="true"] { background: var(--pizarra); color: var(--blanco); }
}
@media (hover: hover) {
  .doors a:not([aria-current]):hover { text-decoration: underline; text-underline-offset: 6px; }
  .hd-country:hover span { text-decoration: underline; text-underline-offset: 3px; }
}

/* ---- The Menú --------------------------------------------------------------------------------------------- */
.mn[hidden] { display: none !important; }
.mn { position: fixed; inset: 0; z-index: 60; overflow-y: auto; overscroll-behavior: contain; background: var(--niebla); color: var(--pizarra);
  padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.mn ul { list-style: none; margin: 0; padding: 0; }
.mn h2 { margin: 0; letter-spacing: .01em; }
.mn-band { background: var(--lima); padding-top: env(safe-area-inset-top); }
.mn-body { max-width: 560px; margin: 0 auto; padding: 14px 16px 0; }
.mn-card { background: var(--blanco); border-radius: var(--radius-card); padding: 18px; }
.mn-card p { margin: 0; font-size: 16px; line-height: 1.45; }
.mn-in { display: flex; width: 100%; margin-top: 14px; }
.mn-grp { background: var(--blanco); border-radius: var(--radius-card); padding: 14px 16px 4px; margin-top: 10px; }
.mn-grp h2 { font-size: 13px; font-weight: 700; color: var(--gris); margin-bottom: 2px; }
.mn-grp a { display: flex; align-items: center; gap: 10px; min-height: 52px; border-top: 1px solid var(--niebla); color: var(--pizarra);
  font-size: 18px; font-weight: 600; line-height: 1.25; text-decoration: none; }
.mn-grp li:first-child a { border-top: 0; }
.mn-grp .n { margin-left: auto; font-size: 15px; font-weight: 600; color: var(--gris); font-variant-numeric: tabular-nums; }
.mn-grp .chev { width: 16px; height: 16px; flex: none; color: var(--gris); }
.mn-grp a span:first-child + .chev { margin-left: auto; }
.mn-mine .mn-grp:first-child { margin-top: 0; }
/* The phone lists every group; desktop only what the header's row doesn't show (board Cuenta-escritorio). */
.mn-also { display: none; }
.mn-also li[hidden] { display: none; }
.mn-out { margin: 6px 0 0; }
.mn-out a, .mn-foot a, .mn-foot .link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-underline-offset: 3px; }
.mn-foot .link { border: 0; background: none; padding: 0; font: 600 16px var(--font-sans); color: var(--pizarra); text-decoration: underline; cursor: pointer; }
.mn-country { display: flex; align-items: center; gap: 12px; min-height: 60px; margin-top: 10px; padding: 0 16px; border-radius: var(--radius-card);
  background: var(--blanco); color: var(--pizarra); font-size: 17px; font-weight: 600; text-decoration: none; }
.mn-country .flag { width: 24px; height: 16px; }
.mn-change { margin-left: auto; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.mn-foot { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 10px 0 0; }
.mn .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html.mn-open { overflow: hidden; }
@media (min-width: 700px) {
  html.mn-open { overflow: visible; }
  /* A dropdown under the header's «Menú», in Pizarra with white text and white pills, a lime focus ring. */
  .mn { position: absolute; inset: auto; top: calc(68px + env(safe-area-inset-top)); right: max(16px, calc(50% - 520px)); width: 380px;
    max-height: calc(100vh - 90px); background: var(--pizarra); color: var(--blanco); border-radius: var(--radius-card); padding: 6px 22px 20px; }
  .mn :focus-visible { outline-color: var(--lima); }
  .mn-band { display: none; }
  .mn-full { display: none; }
  .mn-also { display: block; }
  .mn-body { padding: 0; }
  .mn-card, .mn-grp, .mn-country { background: none; border-radius: 0; padding: 0; margin: 0; }
  .mn-card { padding-top: 16px; }
  .mn-card p { font-size: 15px; }
  .mn .btn-primary { background: var(--blanco); color: var(--pizarra); min-height: 48px; }
  .mn-grp h2 { margin: 18px 0 2px; color: #B9BDC6; }
  .mn-mine .mn-grp:first-child h2 { margin-top: 16px; }
  .mn-grp a { min-height: 42px; border-top: 0; border-bottom: 1px solid rgba(255, 255, 255, .12); color: var(--blanco); font-size: 16px; }
  .mn-grp .n, .mn-grp .chev { color: #B9BDC6; }
  .mn-country { min-height: 48px; margin-top: 14px; color: var(--blanco); font-size: 16px; gap: 10px; }
  .mn-out a, .mn-foot a, .mn-foot .link { color: var(--blanco); font-size: 15px; }
}
@media (hover: hover) {
  .mn-grp a:hover span:first-child { text-decoration: underline; text-underline-offset: 3px; }
}

/* Wide screens (Rafael, 26-Oct: «Even in 1280x800px we have room»): the header and the footer open to a 1376 px
   column with 32 px margins, wider than the page's 1072, so the row has room to spare. */
@media (min-width: 1100px) {
  .hd { max-width: 1440px; padding: 0 32px; }
  .mn { right: max(32px, calc(50% - 688px)); }
}

/* ---- The search: «Buscar» in the header and its sheet (src/worker/directory/chrome.ts; KB SEARCH_HELP_2026-10.md) ----
   Decisions, not defects:
   - On the phone «Buscar» is the magnifier alone (its name is read out): the row already holds the wordmark, «Entrar»
     and «Menú». From 700 px it says «Buscar».
   - The sheet is the Menú's twin: a page in Niebla under its own lime band on the phone, a Pizarra panel on desktop.
   - It opens with the box focused in the same tap, so the phone's keyboard is already up. */
.hd-search span { display: none; }
.hd-search { padding: 0 10px; min-width: 44px; justify-content: center; }
.hd-search svg { width: 20px; height: 20px; }
.hd-search[aria-expanded="true"] { background: var(--pizarra); color: var(--blanco); }
.sx-sheet[hidden] { display: none !important; }
.sx-sheet { position: fixed; inset: 0; z-index: 61; overflow-y: auto; overscroll-behavior: contain; background: var(--niebla); color: var(--pizarra);
  padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.sx-sheet .sr-only, .sx-form .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0; }
.sx-sheet ul { list-style: none; margin: 0; padding: 0; }
.sx-body { max-width: 560px; margin: 0 auto; padding: 14px 16px 0; }
html.sx-open { overflow: hidden; }

/* The box: the same on /buscar, /ayuda and in the sheet. */
.sx-form { margin: 0 0 14px; }
.sx-label { display: block; font: 600 13px/1.3 var(--font-sans); color: var(--gris); margin: 0 0 6px; }
.sx-row { display: flex; gap: 8px; }
.sx-input { flex: 1; min-width: 0; min-height: 54px; padding: 0 18px; border: 1.5px solid var(--gris); border-radius: var(--radius-pill);
  background: var(--blanco); color: var(--pizarra); font: 500 17px var(--font-sans); -webkit-appearance: none; appearance: none; }
.sx-input::placeholder { color: var(--gris); }
.sx-input:focus { outline: none; border-color: var(--pizarra); box-shadow: 0 0 0 1.5px var(--pizarra); }
.sx-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.sx-go { flex: none; display: grid; place-items: center; width: 54px; height: 54px; border: 0; border-radius: 50%; background: var(--pizarra);
  color: var(--lima); cursor: pointer; }
.sx-go svg { width: 22px; height: 22px; }

/* Live results in the sheet: a white card per group, like the Menú's. */
.sx-lg { background: var(--blanco); border-radius: var(--radius-card); padding: 12px 16px 4px; margin-top: 10px; }
.sx-lg h3 { margin: 0 0 2px; font-size: 13px; font-weight: 700; color: var(--gris); letter-spacing: .01em; }
.sx-lg li + li .sx-hit { border-top: 1px solid var(--niebla); }
.sx-lg .sx-hit { display: block; padding: 10px 0; color: var(--pizarra); text-decoration: none; }
.sx-hb { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sx-vouch { font-size: 12px; font-weight: 600; color: var(--gris); }
.sx-title { font-size: 17px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.sx-sub { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--gris); line-height: 1.35; }
.sx-sub .flag { flex: none; }
.sx-all { display: inline-flex; align-items: center; min-height: 48px; margin-top: 6px; font-weight: 700; color: var(--pizarra);
  text-decoration: underline; text-underline-offset: 3px; }
.sx-note, .sx-none p { margin: 4px 0 6px; font-weight: 600; }
.sx-note a { color: inherit; text-underline-offset: 3px; }
.sx-wait { margin: 8px 0 0; color: var(--gris); font-weight: 600; }
.sx-try-t { margin: 18px 0 8px; font-size: 13px; font-weight: 700; color: var(--gris); }
.sx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sx-chips a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--radius-pill); background: var(--blanco);
  color: var(--pizarra); font-weight: 600; font-size: 15px; text-decoration: none; }
.sx-helps { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 14px 0 0; }
.sx-helps a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--pizarra); text-underline-offset: 3px; }
@media (hover: hover) {
  .sx-lg .sx-hit:hover .sx-title { text-decoration: underline; text-underline-offset: 3px; }
  .sx-chips a:hover { background: var(--lima); }
}
@media (min-width: 700px) {
  .hd-search span { display: inline; }
  .hd-search { padding: 0 8px 0 6px; margin-right: 2px; }
  .hd-search svg { width: 18px; height: 18px; }
  html.sx-open { overflow: visible; }
  /* A Pizarra panel under the header's «Buscar», like the Menú's dropdown. */
  .sx-sheet { position: absolute; inset: auto; top: calc(68px + env(safe-area-inset-top)); right: max(16px, calc(50% - 520px)); width: 560px;
    max-height: calc(100vh - 90px); background: var(--pizarra); color: var(--blanco); border-radius: var(--radius-card); padding: 18px 22px 20px; }
  .sx-sheet :focus-visible { outline-color: var(--lima); }
  .sx-sheet .mn-band { display: none; }
  .sx-sheet .sx-body { padding: 0; }
  .sx-sheet .sx-label, .sx-sheet .sx-try-t, .sx-sheet .sx-lg h3 { color: #B9BDC6; }
  .sx-sheet .sx-input { border-color: transparent; }
  .sx-sheet .sx-input:focus { border-color: var(--lima); box-shadow: 0 0 0 1.5px var(--lima); }
  .sx-sheet .sx-go { background: var(--blanco); color: var(--pizarra); }
  .sx-sheet .sx-lg { background: none; border-radius: 0; padding: 0; margin-top: 14px; }
  .sx-sheet .sx-lg li + li .sx-hit { border-top: 1px solid rgba(255, 255, 255, .12); }
  .sx-sheet .sx-lg .sx-hit, .sx-sheet .sx-all, .sx-sheet .sx-helps a, .sx-sheet .sx-note, .sx-sheet .sx-none p { color: var(--blanco); }
  .sx-sheet .sx-vouch, .sx-sheet .sx-sub, .sx-sheet .sx-wait { color: #B9BDC6; }
  .sx-sheet .sx-chips a { background: none; color: var(--blanco); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5); }
}
@media (min-width: 700px) and (hover: hover) { .sx-sheet .sx-chips a:hover { background: var(--blanco); color: var(--pizarra); } }
@media (min-width: 1100px) { .sx-sheet { right: max(32px, calc(50% - 688px)); } }
