/* find-school.css: "Find my school → register" (find-school.html, js/find-school.js). Class prefix fy-.
   Colors come from the tokens in css/pages.css (light and dark) plus the few below.
   Phone first: one column, a sticky Back / Next bar at the bottom (above the home indicator); from 760px the
   bar sits under the step and school cards go two or three across. */

.fy-page {
  --fy-bg: #F5F7FA; --fy-ok: #17603E; --fy-ok-bg: #E6F4EC; --fy-ok-line: #9CCFB2;
  --fy-old: #7A4F00; --fy-old-bg: #FFF6E5; --fy-old-line: #E8C47E;
  --fy-el: #1F5C96; --fy-mid: #6B3FA0; --fy-hi: #9A3412;
  background: var(--fy-bg);
}
[data-theme="dark"] .fy-page {
  --fy-bg: var(--bg); --fy-ok: #7FDBA3; --fy-ok-bg: rgba(46,160,96,.18); --fy-ok-line: rgba(127,219,163,.4);
  --fy-old: #F5C76B; --fy-old-bg: rgba(242,179,61,.12); --fy-old-line: rgba(242,179,61,.4);
  --fy-el: #9EC5F8; --fy-mid: #CDB2F2; --fy-hi: #F8B48C;
}
.fy-page .wrap { max-width: 860px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.fy-page main { padding-bottom: 24px; }
.fy-page main :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.fy-page main a { color: var(--accent); }
.print-only { display: none; }
.link-btn { background: none; border: 0; padding: 10px 2px; min-height: 44px; color: var(--accent); font-weight: 600; text-decoration: underline; cursor: pointer; }

.fy-intro { padding: 22px 0 10px; }
.fy-intro h1 { margin: 4px 0 6px; font-size: 1.7rem; line-height: 1.2; font-weight: 800; color: var(--ink); }
.fy-lead { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.5; max-width: 680px; }

/* ------------------------------------------------------------ progress */
.fy-progress { margin: 14px 0 6px; }
.fy-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.fy-bar a { display: flex; flex-direction: column; gap: 6px; min-height: 44px; padding: 0 0 4px; color: var(--muted); text-decoration: none; font-size: .78rem; font-weight: 700; }
.fy-bar a::before { content: ""; display: block; height: 6px; border-radius: 3px; background: var(--track); }
.fy-bar li.is-done a::before, .fy-bar li.is-on a::before { background: var(--gold); }
.fy-bar li.is-on a { color: var(--ink); }
.fy-bar a[aria-disabled="true"] { cursor: default; }
.fy-bar-n { display: none; }
.fy-bar-t { overflow-wrap: anywhere; }
@media (min-width: 560px) { .fy-bar-n { display: inline; margin-right: 4px; } .fy-bar a { font-size: .86rem; flex-direction: column; } }

/* ------------------------------------------------------------ steps */
.fy-step { padding-top: 8px; }
.fy-h2 { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; font-size: 1.3rem; font-weight: 800; color: var(--ink); }
.fy-h2:focus { outline: none; }
.fy-h2:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.fy-h3 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 800; color: var(--ink); }
.fy-num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--gold); color: #14324F; font-size: .95rem; flex: none; }
.fy-card { padding: 16px; margin: 0 0 14px; }
.fy-card > p { margin: 0 0 10px; }
.fy-card > p:last-child { margin-bottom: 0; }
.fy-label { display: block; margin: 0 0 6px; font-size: .9rem; font-weight: 700; color: var(--ink); }
.fy-row { display: flex; gap: 8px; flex-wrap: wrap; }
.fy-row input, .fy-row select { flex: 1 1 220px; min-width: 0; min-height: 48px; font-size: 1rem; }
.fy-row .btn { min-height: 48px; flex: 1 0 auto; }
@media (min-width: 560px) { .fy-row .btn { flex: none; } }
.fy-check { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 6px; font-size: .92rem; cursor: pointer; }
.fy-check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--navy-2); }
.fy-status { margin: 8px 0 0; min-height: 1.2em; font-size: .92rem; color: var(--muted); }
.fy-status:empty { margin: 0; min-height: 0; }
.fy-status.fy-err { color: var(--bad); font-weight: 600; }
.fy-small { font-size: .84rem; color: var(--muted); line-height: 1.45; }
.fy-privacy { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 0; }
.fy-privacy svg, .fy-badge svg, .btn svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fy-privacy svg { margin-top: 1px; }
.fy-offline { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--fy-old-bg); border: 1px solid var(--fy-old-line); color: var(--fy-old); font-weight: 600; font-size: .9rem; }
.fy-offline[hidden] { display: none; }
.fy-or { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--muted); font-size: .8rem; font-weight: 700; text-transform: uppercase; }
.fy-or::before, .fy-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.fy-note { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; font-size: .94rem; line-height: 1.5; }
.fy-note b { color: var(--ink); }
.fy-note-info { background: var(--info-bg); border: 1px solid var(--info-border); }
.fy-note-warn { background: var(--fy-old-bg); border: 1px solid var(--fy-old-line); }
.fy-note a { display: inline-block; padding: 6px 0; font-weight: 600; }

/* ------------------------------------------------------------ step 2 */
.fy-where { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 12px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.fy-schools { display: grid; gap: 12px; margin-bottom: 14px; }
@media (min-width: 760px) { .fy-schools { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.fy-school { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; min-width: 0; box-shadow: var(--shadow-sm); }
.fy-school .fy-h3 { margin: 6px 0 4px; font-size: 1.12rem; overflow-wrap: anywhere; }
.fy-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.fy-lv { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; border: 1px solid currentColor; }
.fy-lv-elementary { color: var(--fy-el); } .fy-lv-middle { color: var(--fy-mid); } .fy-lv-high { color: var(--fy-hi); }
.fy-meta { margin: 0 0 4px; color: var(--muted); font-size: .9rem; }
.fy-bell { margin: 6px 0; font-size: .92rem; }
.fy-bell small { color: var(--muted); }
.fy-badge { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; padding: 8px 10px; border-radius: 10px; font-size: .88rem; font-weight: 700; }
.fy-badge-ok { background: var(--fy-ok-bg); color: var(--fy-ok); border: 1px solid var(--fy-ok-line); }
.fy-badge-old { background: var(--fy-old-bg); color: var(--fy-old); border: 1px solid var(--fy-old-line); }
.fy-links { display: flex; flex-wrap: wrap; gap: 0 16px; margin: 4px 0 0; }
.fy-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.fy-confirm { margin: 0 0 14px; padding: 12px 14px; border-left: 4px solid var(--gold); background: var(--surface); border-radius: 0 12px 12px 0; }
.fy-confirm p { margin: 0; }
.fy-how { margin: 6px 0 0; padding-left: 20px; }
.fy-how li { margin: 0; }
.fy-how a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.fy-near { margin: 0; padding: 0; list-style: none; }
.fy-near li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 6px 0; border-top: 1px solid var(--border); }
.fy-near a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.fy-near small { color: var(--muted); }
.fy-options .fy-links { margin-top: 2px; }

/* ------------------------------------------------------------ step 3 */
.fy-btn-wide { width: 100%; min-height: 48px; white-space: normal; text-align: center; }
@media (min-width: 560px) { .fy-btn-wide { width: auto; } }
.fy-progress-t { margin: 0 0 6px; font-weight: 700; color: var(--ink); }
.fy-docs { margin: 0 0 12px; padding: 0; list-style: none; }
.fy-docs li { border-top: 1px solid var(--border); padding: 2px 0; }
.fy-doc { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 10px 0 4px; cursor: pointer; font-size: .96rem; }
.fy-doc input { width: 24px; height: 24px; margin: 0; flex: none; accent-color: var(--navy-2); }
.fy-doc-link { display: inline-flex; align-items: center; min-height: 44px; margin-left: 36px; font-size: .88rem; font-weight: 600; }
.fy-actions { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.fy-actions .btn { min-height: 46px; }
.fy-dob { width: 100%; max-width: 260px; min-height: 48px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 1rem; }
[data-theme="dark"] .fy-dob { color-scheme: dark; }
.fy-dob-out { margin: 10px 0 4px; font-weight: 700; color: var(--ink); }

/* ------------------------------------------------------------ step 4 */
.fy-dates { margin: 0 0 10px; padding: 0; list-style: none; }
.fy-date { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-top: 1px solid var(--border); }
.fy-when { font-size: .82rem; font-weight: 800; color: var(--fy-el); text-transform: uppercase; letter-spacing: .03em; }
.fy-date-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; font-size: .88rem; }
.fy-date-meta a { display: inline-flex; align-items: center; min-height: 44px; }
.fy-plan { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.fy-fams { margin: 0 0 6px; padding: 0; list-style: none; display: grid; gap: 8px; }
.fy-fams .btn { width: 100%; min-height: 48px; white-space: normal; justify-content: flex-start; text-align: left; }
.fy-fams .btn[disabled] { opacity: .7; }

/* ------------------------------------------------------------ Back / Next */
.fy-nav { display: flex; gap: 10px; margin: 18px 0 8px; }
.fy-nav .btn { min-height: 50px; font-size: 1rem; }
.fy-nav .fy-next { flex: 1; }
.fy-nav .fy-back[hidden] { display: none; }
@media (max-width: 759px) {
  .fy-nav { position: sticky; bottom: 0; z-index: 30; margin: 18px calc(-1 * max(16px, env(safe-area-inset-left, 0px))) 0;
    padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgba(16,32,52,.08); }
}
@media (min-width: 760px) { .fy-nav .fy-next { flex: none; min-width: 260px; } .fy-nav { justify-content: flex-start; } }
@media (max-width: 420px) { .fy-hide-sm { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .fy-page * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ------------------------------------------------------------ print: one page "Our enrollment checklist" */
@media print {
  @page { size: letter; margin: 12mm; }
  .fy-page { background: #fff; }
  .fy-page main > *:not(.fy-print) { display: none !important; }
  .fy-page .site-foot, .fy-page .topbar, .skip-link, .netstatus, #netstatus { display: none !important; }
  .print-only { display: block !important; }
  .fy-print { color: #000; font-size: 9.5pt; line-height: 1.35; }
  .fy-print h1 { margin: 0 0 2pt; font-size: 16pt; color: #14324F; }
  .fy-print h2 { margin: 9pt 0 3pt; font-size: 11pt; color: #14324F; border-bottom: 1px solid #9AA9BA; padding-bottom: 1pt; }
  .fy-p-sub { margin: 0; color: #333; }
  .fy-p-table { width: 100%; border-collapse: collapse; }
  .fy-p-table td { padding: 3pt 4pt; border-bottom: 1px solid #ccd; vertical-align: top; }
  .fy-p-docs { margin: 0; padding-left: 0; list-style: none; }
  .fy-p-docs li { margin: 2pt 0; }
  .fy-p-box { font-size: 12pt; }
  .fy-p-note { margin: 3pt 0 0; font-weight: 700; }
  .fy-p-foot { margin-top: 10pt; font-size: 8pt; color: #333; }
}

/* Keep focused or scrolled-to items above the sticky Next bar on phones. */
html { scroll-padding-bottom: 104px; }
