/* PLMGS Parents Hub
   Layout: sticky crest header, navy hero with the PL-Lites, three solid category blocks,
   then one view per category chosen by the URL hash (#administrative, #p1-parents, ...).

   Fonts: the page uses "Fredoka" (headings) and "Figtree" (text) when they are installed,
   and falls back to rounded system fonts otherwise. To bundle them, add the .woff2 files to
   assets/fonts/ and uncomment the @font-face rules below.

@font-face { font-family: "Fredoka"; font-weight: 500 700; font-display: swap; src: url("../assets/fonts/fredoka.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 400 700; font-display: swap; src: url("../assets/fonts/figtree.woff2") format("woff2"); }
*/

html { color-scheme: light; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }

:root {
  --bg: #F3F5FC;
  --surface: #FFFFFF;
  --ink: #14163F;
  --muted: #4A5080;
  --line: #D6DBF0;
  --blue: #1F2A7A;
  --blue-deep: #171E63;
  --on-blue: #FFFFFF;
  --yellow: #FFC72C;
  --on-yellow: #14163F;
  --yellow-soft: #FFF0B3;
  --focus: #1F2A7A;
  --font-display: "Fredoka", ui-rounded, "Arial Rounded MT Bold", "Hiragino Maru Gothic ProN", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C0F33; --surface: #161A52; --ink: #F1F2FF; --muted: #AEB3E0; --line: #2B3178;
    --blue: #2B3AA8; --blue-deep: #1A2170; --yellow-soft: #3B3512; --focus: #FFC72C;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C0F33; --surface: #161A52; --ink: #F1F2FF; --muted: #AEB3E0; --line: #2B3178;
  --blue: #2B3AA8; --blue-deep: #1A2170; --yellow-soft: #3B3512; --focus: #FFC72C;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  background: var(--bg); color: var(--ink);
  font: 400 17px/1.55 var(--font-body);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; margin: 0; text-wrap: balance; }
p { margin: 0; }
.wrap { max-width: 1080px; margin-inline: auto; }

/* header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 3px solid var(--yellow); margin-inline: calc(-1 * max(16px, env(safe-area-inset-left, 0px))) calc(-1 * max(16px, env(safe-area-inset-right, 0px))); padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
.top .wrap { display: flex; align-items: center; gap: 16px; padding-block: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand img { width: 64px; height: auto; display: block; flex: none; }
.brand b { font: 600 19px/1.1 var(--font-display); display: block; color: var(--blue); }
:root[data-theme="dark"] .brand b { color: var(--yellow); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand b { color: var(--yellow); } }
.brand small { font-size: 13px; color: var(--muted); letter-spacing: .04em; }
nav { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
nav a { text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 14px; border-radius: 999px; color: var(--ink); }
nav a:hover { background: var(--yellow-soft); }
nav a[aria-current="page"] { background: var(--blue); color: var(--on-blue); }

/* hero */
.hero { background: var(--blue-deep); color: #fff; margin-inline: calc(-1 * max(16px, env(safe-area-inset-left, 0px))) calc(-1 * max(16px, env(safe-area-inset-right, 0px))); padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); border-bottom: 10px solid var(--yellow); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px; align-items: end; padding-top: 44px; }
.hero-copy { padding-bottom: 44px; display: grid; gap: 16px; align-content: center; align-self: center; }
.eyebrow { font: 600 13px/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); }
.hero h1 { font-size: clamp(36px, 6vw, 60px); }
.hero h1 em { font-style: normal; color: var(--yellow); }
.hero p { color: #DDE0FF; max-width: 46ch; font-size: 18px; }
.cast { display: flex; align-items: flex-end; justify-content: center; gap: 0; margin-bottom: -2px; }
.cast img { height: auto; display: block; }
.cast img:nth-child(1) { width: 31%; }
.cast img:nth-child(2) { width: 36%; margin-inline: -4%; position: relative; z-index: 1; }
.cast img:nth-child(3) { width: 33%; }
.cast img.group { width: 100%; margin: 0; }

/* category blocks */
.cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding-block: 36px 12px; }
.cat { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 24px 22px 24px; border-radius: var(--r); text-decoration: none; min-height: 280px; overflow: hidden; border: 2px solid transparent; transition: transform .18s ease; }
.cat:hover { transform: translateY(-4px); }
.cat h2 { font-size: 27px; max-width: 11ch; }
.cat p { font-size: 15.5px; max-width: min(22ch, 54%); }
.cat .go { margin-top: auto; font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; position: relative; z-index: 1; }
.cat .go::after { content: "\2192"; }
.cat img { position: absolute; right: -6px; bottom: -4px; width: 46%; height: auto; max-height: 85%; object-fit: contain; object-position: bottom right; }
.cat.blue { background: var(--blue); color: var(--on-blue); }
.cat.yellow { background: var(--yellow); color: var(--on-yellow); }
.cat.plain { background: var(--surface); color: var(--ink); border-color: var(--line); }
.cat.plain .go { color: var(--blue); }
:root[data-theme="dark"] .cat.plain .go { color: var(--yellow); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cat.plain .go { color: var(--yellow); } }

.chips { display: flex; flex-wrap: wrap; gap: 6px; position: relative; z-index: 1; max-width: 62%; }
.chips span { font-size: 12.5px; font-weight: 600; background: var(--yellow-soft); color: var(--ink); padding: 3px 10px; border-radius: 999px; }

.pill { display: inline-block; font: 700 11px/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; background: var(--yellow); color: var(--on-yellow); padding: 4px 8px; border-radius: 6px; vertical-align: middle; }

/* views */
.view[hidden] { display: none !important; }
.page-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: end; padding-top: 40px; }
.page-head h1 { font-size: clamp(32px, 5vw, 48px); color: var(--blue); }
:root[data-theme="dark"] .page-head h1 { color: var(--yellow); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .page-head h1 { color: var(--yellow); } }
.page-head p { color: var(--muted); margin-top: 10px; max-width: 56ch; }
.page-head img { width: clamp(90px, 16vw, 150px); height: auto; display: block; }
.crumb { font-size: 14px; font-weight: 600; text-decoration: none; color: var(--muted); display: inline-block; margin-bottom: 12px; }
.crumb:hover { color: var(--ink); text-decoration: underline; }
.ground { height: 8px; background: var(--yellow); border-radius: 4px; margin-top: -2px; }

.tabs { display: flex; gap: 8px; overflow-x: auto; padding-block: 22px 6px; scrollbar-width: thin; }
.tabs a { flex: none; text-decoration: none; font-weight: 600; font-size: 15.5px; padding: 10px 18px; border-radius: 999px; background: var(--surface); border: 2px solid var(--line); }
.tabs a:hover { border-color: var(--yellow); }
.tabs a[aria-current="page"] { background: var(--yellow); border-color: var(--yellow); color: var(--on-yellow); }

.panel { padding-block: 22px 56px; display: grid; gap: 16px; }
.panel h2 { font-size: 28px; }
.lead { color: var(--muted); max-width: 62ch; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.flow { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.flow li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); align-items: start; }
.flow li:last-child { border-bottom: 0; }
.flow time { font: 600 18px/1.3 var(--font-display); color: var(--blue); font-variant-numeric: tabular-nums; background: var(--yellow-soft); border-radius: 8px; padding: 4px 10px; text-align: center; }
:root[data-theme="dark"] .flow time { color: var(--yellow); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .flow time { color: var(--yellow); } }
.flow li div { display: grid; gap: 6px; padding-top: 4px; min-width: 0; }
.flow p::before { content: "\2022  "; color: var(--muted); }
.flow li div:has(p:only-child) p::before { content: none; }
.flow-note { font-weight: 600; background: var(--yellow); color: var(--on-yellow); border-radius: 12px; padding: 12px 18px; }
@media (max-width: 520px) { .flow li { grid-template-columns: minmax(0, 1fr); gap: 8px; } .flow time { justify-self: start; } }
.book img { width: 100%; max-width: 240px; height: auto; border-radius: 10px; border: 1px solid var(--line); display: block; margin-bottom: 6px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.btn { display: inline-block; text-decoration: none; font-weight: 700; font-size: 15px; padding: 10px 18px; border-radius: 999px; border: 2px solid var(--blue); color: var(--blue); }
.btn:hover { border-color: var(--yellow); }
.btn.primary { background: var(--yellow); border-color: var(--yellow); color: var(--on-yellow); }
:root[data-theme="dark"] .btn:not(.primary) { color: var(--yellow); border-color: var(--yellow); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn:not(.primary) { color: var(--yellow); border-color: var(--yellow); } }
.linkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.linkcard { display: flex; flex-direction: column; gap: 6px; min-width: 0; text-decoration: none; background: var(--blue); color: var(--on-blue); border-radius: var(--r); padding: 20px 22px; border: 2px solid transparent; transition: transform .18s ease; }
.linkcard:hover { transform: translateY(-3px); border-color: var(--yellow); }
.linkcard h3 { font-size: 21px; overflow-wrap: anywhere; }
.linkcard p { color: #DDE0FF; font-size: 15.5px; }
.linkcard .go { margin-top: auto; padding-top: 10px; font-weight: 700; font-size: 15px; color: var(--yellow); }
.linkcard .go::after { content: " \2197"; }
.linkcard.doc .go::after { content: " \2193"; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.card h3 { font-size: 20px; color: var(--ink); }
.card p { color: var(--muted); font-size: 15.5px; }
.card .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.facts div { padding: 18px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; min-width: 0; }
.facts dt { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 4px 0 0; font: 600 20px/1.25 var(--font-display); }
.facts { margin: 0; }


.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; min-width: 420px; }
th, td { text-align: left; padding: 12px 18px; border-bottom: 1px solid var(--line); }
th { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--yellow-soft); }
td.price, th.price { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
.stall { font: 600 20px/1.2 var(--font-display); margin-top: 6px; }


footer { margin-inline: calc(-1 * max(16px, env(safe-area-inset-left, 0px))) calc(-1 * max(16px, env(safe-area-inset-right, 0px))); padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); background: var(--blue-deep); color: #fff; border-top: 8px solid var(--yellow); padding-block: 26px calc(26px + env(safe-area-inset-bottom, 0px)); }
footer .wrap { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
footer img { width: 72px; height: auto; }
footer b { font: 600 20px var(--font-display); display: block; }
footer span { color: #CDD1F8; font-size: 14.5px; letter-spacing: .06em; }

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); padding-top: 32px; }
  .hero-copy { padding-bottom: 8px; }
  .cast { max-width: 440px; margin-inline: auto; width: 100%; }
  .cats { grid-template-columns: minmax(0, 1fr); }
  .cat { min-height: 230px; }
  nav { margin-left: 0; width: 100%; }
}
@media (max-width: 520px) {
  body { font-size: 16.5px; }
  .brand img { width: 52px; }
  .page-head { grid-template-columns: minmax(0, 1fr); }
  .page-head img { display: none; }
  .chips { max-width: 100%; }
  .cat img { width: 36%; opacity: .95; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
