/* =====================================================
   COLOURS — navy, gold and warm paper, with one bright
   colour for each of the six headings.
   Change these lines to change the whole website.
   ===================================================== */
:root {
  --navy:      #12305f;
  --navy-dark: #0b1f40;
  --yellow:    #f0a91b;   /* gold: news label, menu highlight, buttons */
  --yellow-dk: #d89212;
  --cream:     #fff4dc;   /* soft gold */
  --cream-2:   #fffaf0;
  --bg:        #faf7f0;   /* warm paper background */
  --ink:       #23262d;
  --muted:     #5d6573;
  --line:      #e6e0d2;
  --white:     #ffffff;
  --radius:    14px;
  --shadow:    0 6px 22px rgba(18, 48, 95, .09);
}

/* the six heading colours: strong colour + light background */
.c-blue   { --c: #2563eb; --c-soft: #e8f0ff; --c-art: #d6e4ff; }
.c-pink   { --c: #c2185b; --c-soft: #fdecf3; --c-art: #fbd9e7; }
.c-orange { --c: #ea6c0a; --c-soft: #fff0e3; --c-art: #ffe1c4; }
.c-green  { --c: #16a34a; --c-soft: #e6f7ec; --c-art: #cdeed9; }
.c-purple { --c: #7c3aed; --c-soft: #f1eaff; --c-art: #e2d4fd; }
.c-sky    { --c: #0e8a8a; --c-soft: #e2f6f5; --c-art: #c9ece9; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'Nunito Sans', system-ui, sans-serif; font-size: 17px; line-height: 1.7; color: var(--ink); background: var(--bg); }
a { color: var(--navy); }
img { max-width: 100%; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3, h4 { font-family: 'Merriweather', Georgia, serif; color: var(--navy); line-height: 1.3; }
h1 { font-size: 30px; font-weight: 900; }
h2 { font-size: 23px; font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; }
h4 { font-size: 16px; font-weight: 700; }

/* ---------- News ticker ---------- */
.ticker { display: flex; align-items: center; background: var(--navy-dark); color: #fff; font-size: 14px; overflow: hidden; }
.ticker-label { background: var(--yellow); color: var(--navy-dark); font-weight: 800; padding: 7px 16px; text-transform: uppercase; letter-spacing: .06em; flex-shrink: 0; z-index: 1; }
.ticker-track { overflow: hidden; flex: 1; }
.ticker-items { display: inline-flex; gap: 48px; white-space: nowrap; padding-left: 24px; animation: scroll 45s linear infinite; }
.ticker-items a { color: #fff; text-decoration: none; }
.ticker-items a:hover { color: var(--yellow); text-decoration: underline; }
.ticker:hover .ticker-items { animation-play-state: paused; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Header ---------- */
.site-header { background: var(--white); position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.header-inner { display: flex; align-items: center; gap: 20px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; margin-right: auto; }
.brand-logo { width: 62px; height: 62px; object-fit: contain; }
.brand-fallback { display: grid; place-items: center; border-radius: 50%; background: var(--navy); color: var(--yellow); font-family: 'Merriweather', serif; font-weight: 900; font-size: 22px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-top { font-family: 'Merriweather', serif; font-weight: 900; font-size: 22px; color: var(--navy); text-transform: uppercase; letter-spacing: .04em; }
.brand-school { font-size: 14px; font-weight: 700; color: var(--muted); }
.site-search { display: flex; width: 320px; max-width: 100%; border: 1.5px solid #d8d1c0; border-radius: 99px; overflow: hidden; background: #fff; }
.site-search input { flex: 1; min-width: 0; border: 0; padding: 9px 16px; font: inherit; font-size: 15px; outline: none; background: none; }
.site-search button { border: 0; background: var(--navy); color: #fff; width: 48px; font-size: 16px; cursor: pointer; }
.site-search button:hover { background: var(--navy-dark); }
.site-search:focus-within { border-color: var(--yellow); box-shadow: 0 0 0 3px var(--cream); }
.nav-toggle { display: none; background: var(--navy); color: #fff; border: 0; font-size: 22px; padding: 6px 12px; border-radius: 8px; cursor: pointer; }

/* ---------- Menu (navy bar, gold highlight) ---------- */
.main-nav { background: var(--navy); border-bottom: 4px solid var(--yellow); }
.main-nav > ul { list-style: none; display: flex; flex-wrap: wrap; margin: 0 auto; }
.main-nav li { position: relative; }
.main-nav > ul > li > a, .main-nav > ul > li > button {
  display: block; padding: 12px 14px; color: #fff; text-decoration: none; font: inherit; font-size: 15px; font-weight: 700;
  background: none; border: 0; cursor: pointer; white-space: nowrap;
}
.main-nav .caret { font-size: 11px; opacity: .8; }
.main-nav > ul > li > a:hover, .main-nav > ul > li > button:hover, .has-sub.open > button,
.main-nav a.active, .main-nav button.active { background: var(--yellow); color: var(--navy-dark); }

.main-nav .sub { display: none; position: absolute; top: 100%; left: 0; width: 310px; background: var(--white); border-radius: 0 0 12px 12px; box-shadow: 0 14px 30px rgba(11,31,64,.22); overflow: hidden; border-top: 4px solid var(--c, var(--yellow)); }
.main-nav .sub-right .sub { left: auto; right: 0; }
.main-nav .sub-head { display: block; padding: 11px 16px; background: var(--c-soft, var(--cream)); color: var(--c, var(--navy)); font-family: 'Merriweather', serif; font-weight: 700; font-size: 14px; text-decoration: none; line-height: 1.4; }
.main-nav .sub-head span { display: block; font-family: 'Nunito Sans', sans-serif; font-size: 12px; font-weight: 800; opacity: .85; margin-top: 2px; }
.main-nav .sub ul { list-style: none; margin: 0; padding: 6px 0; max-height: 60vh; overflow-y: auto; }
.main-nav .sub li a { display: flex; gap: 10px; align-items: center; padding: 8px 16px; color: var(--navy); text-decoration: none; font-weight: 600; font-size: 15px; }
.main-nav .sub li a:hover { background: var(--cream); color: var(--navy); }
.main-nav .sub li.sub-label { margin: 6px 16px 2px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--c, var(--navy)); }
.sub-ic { width: 22px; text-align: center; flex-shrink: 0; }
@media (hover: hover) and (min-width: 721px) { .has-sub:hover .sub { display: block; } }
.has-sub.open .sub { display: block; }

/* ---------- Hero ---------- */
.hero { background: radial-gradient(circle at 85% 20%, rgba(240,169,27,.25), transparent 40%), linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%); color: #fff; padding: 44px 0; }
.hero-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; }
.hero-kicker { color: var(--yellow); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; margin: 0; }
.hero-title { color: #fff; font-size: clamp(30px, 5vw, 46px); margin: 8px 0 10px; }
.hero-sub { font-size: 18px; opacity: .9; margin: 0; max-width: 520px; }
.hero-card { background: var(--white); color: var(--ink); border-radius: var(--radius); padding: 22px 24px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.hero-card h2 { margin: 0 0 4px; font-size: 21px; }
.hero-card p { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hero-chips a { font-size: 13px; font-weight: 700; text-decoration: none; background: var(--cream); color: var(--navy); padding: 5px 12px; border-radius: 99px; }
.hero-chips a:hover { background: var(--yellow); }
.hero-chips a.chip-portal { background: var(--navy); color: #fff; }
.hero-chips a.chip-portal:hover { background: var(--navy-dark); color: var(--yellow); }

.btn { display: inline-block; padding: 11px 20px; border-radius: 10px; text-decoration: none; border: 0; cursor: pointer; font: inherit; font-weight: 800; }
.btn-yellow, .btn-gold, .btn-pink { background: var(--yellow); color: var(--navy-dark); }
.btn-yellow:hover, .btn-gold:hover, .btn-pink:hover { background: #ffbd3a; color: var(--navy-dark); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-dark); color: #fff; }

/* ---------- Students photo ---------- */
.readers-photo { position: relative; margin: 18px 0 8px; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); background: var(--navy-dark); }
.readers-photo img { display: block; width: 100%; height: auto; }
.readers-photo figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 18px 10px; background: linear-gradient(transparent, rgba(11,31,64,.88)); color: #fff; font-family: 'Merriweather', serif; font-weight: 700; font-size: 15px; }

/* ---------- Home: numbered service tiles ---------- */
.section-title { margin-top: 30px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 18px 0 28px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 22px 20px 18px; border-radius: 16px; background: var(--c-soft); border-top: 6px solid var(--c); text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.tile:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0,0,0,.10); color: var(--ink); }
.tile-num { position: absolute; top: 12px; right: 14px; font-family: 'Merriweather', serif; font-weight: 900; font-size: 30px; color: var(--c); opacity: .22; }
.tile-icon { font-size: 34px; }
.tile-title { font-family: 'Merriweather', serif; font-weight: 700; font-size: 17px; color: var(--c); line-height: 1.3; }
.tile-text { font-size: 15px; color: var(--muted); flex: 1; }
.tile-count { font-weight: 800; font-size: 14px; color: var(--c); margin-top: 6px; }

/* ---------- Layout ---------- */
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; padding-top: 32px; padding-bottom: 48px; }
.page-grid.full { grid-template-columns: minmax(0, 1fr); }
.content { background: var(--white); border-radius: var(--radius); padding: 32px 36px; box-shadow: var(--shadow); }
.content.plain { background: none; box-shadow: none; padding: 0; }
.page-head { margin-bottom: 22px; padding-bottom: 14px; border-bottom: 3px solid var(--cream); }
.page-head h1 { margin: 0 0 4px; }
.page-head p { color: var(--muted); font-weight: 700; margin: 0; }
.lead { font-size: 19px; }
.content h2 { margin: 34px 0 12px; padding-left: 14px; border-left: 5px solid var(--yellow); }
.content h3 { margin: 22px 0 4px; }
.content ul.ticks { list-style: none; padding: 0; }
.content ul.ticks li { padding-left: 32px; position: relative; margin-bottom: 6px; }
.content ul.ticks li::before { content: '✓'; position: absolute; left: 0; top: 5px; color: #fff; background: var(--navy); width: 21px; height: 21px; border-radius: 50%; font-size: 12px; display: grid; place-items: center; }

.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 24px 0; }
.pillar { text-align: center; border-radius: 14px; padding: 18px 10px; }
.pillar:nth-child(1) { background: #e8f1fc; } .pillar:nth-child(2) { background: #fff4e2; }
.pillar:nth-child(3) { background: #e9f6ec; } .pillar:nth-child(4) { background: #f1ebfc; }
.pillar .icon { font-size: 32px; }
.pillar h4 { margin: 6px 0 2px; font-size: 17px; }
.pillar p { margin: 0; font-size: 14px; color: var(--muted); }
.callout { background: var(--cream-2); border-left: 5px solid var(--yellow); border-radius: 0 14px 14px 0; padding: 18px 22px; margin: 26px 0; }
.callout h3 { margin-top: 0; }
.callout p { margin: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 20px 0; }
.card { background: var(--cream-2); border-radius: 14px; padding: 18px 20px; }
.card .icon { font-size: 28px; }
.card h3 { margin: 6px 0 4px; font-size: 18px; }
.card p { margin: 0; font-size: 15px; color: var(--muted); }
.word-band { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }
.word-band span { color: #fff; padding: 6px 16px; border-radius: 99px; font-weight: 700; font-size: 14px; }
.word-band span:nth-child(1) { background: #d7263d; } .word-band span:nth-child(2) { background: #1a5bb5; }
.word-band span:nth-child(3) { background: #178a3a; } .word-band span:nth-child(4) { background: #ef7a10; }
.word-band span:nth-child(5) { background: #5b26b8; }
.rules-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 16px; }
.rules-table th, .rules-table td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.rules-table th { background: var(--navy); color: #fff; }
.rules-table tr:nth-child(even) td { background: var(--cream-2); }

/* ---------- Home: six heading cards ---------- */
.group-cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.group-card { display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: var(--c-soft); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.group-card:hover { transform: translateY(-5px); box-shadow: 0 14px 30px rgba(18,51,107,.16); color: var(--ink); }
.gc-art { display: grid; place-items: center; height: 96px; background: var(--c-art); font-size: 54px; }
.gc-body { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 16px 14px 18px; flex: 1; }
.gc-title { font-family: 'Merriweather', Georgia, serif; font-weight: 700; font-size: 17px; line-height: 1.25; color: var(--navy-dark); }
.gc-text { font-size: 14px; color: var(--muted); line-height: 1.45; flex: 1; }
.gc-btn { margin-top: 8px; background: var(--c); color: #fff; font-weight: 800; font-size: 15px; padding: 8px 26px; border-radius: 8px; }

.home-panels { display: grid; grid-template-columns: 1fr 1.25fr; gap: 20px; margin-top: 26px; }
.panel { border-radius: 18px; padding: 18px 22px; box-shadow: var(--shadow); }
.panel-news { background: var(--cream-2); border: 1px solid #f0dfbb; }
.panel-high { background: #ecf7ef; border: 1px solid #cfe9d6; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.panel-head h2 { margin: 0; font-size: 20px; color: var(--navy-dark); padding: 0; border: 0; }
.panel-head a { font-weight: 800; font-size: 14px; text-decoration: none; color: var(--navy-dark); }
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 9px 4px 9px 18px; border-bottom: 1px solid #efe1c3; position: relative; }
.news-list li::before { content: ''; position: absolute; left: 2px; top: 18px; width: 7px; height: 7px; border-radius: 50%; background: #8a93a6; }
.news-list a { color: var(--ink); text-decoration: none; font-weight: 600; }
.news-list a:hover { color: var(--red); }
.news-list span { flex-shrink: 0; font-size: 13px; color: var(--muted); }
.high-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.high { display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; color: var(--ink); background: #fff; border-radius: 12px; padding-bottom: 10px; overflow: hidden; transition: transform .15s; }
.high:hover { transform: translateY(-3px); color: var(--ink); }
.high-art { display: grid; place-items: center; width: 100%; height: 78px; background: var(--c-art); font-size: 40px; margin-bottom: 6px; }
.high b { font-family: 'Merriweather', Georgia, serif; font-size: 14px; line-height: 1.3; padding: 0 6px; }
.high small { font-size: 12.5px; color: var(--muted); padding: 0 6px; }

/* ---------- Services page ---------- */
.jump { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; margin-bottom: 8px; }
.jump a { display: flex; align-items: center; gap: 10px; background: var(--c-soft); color: var(--c); padding: 8px 12px; border-radius: 12px; font-weight: 800; font-size: 14px; text-decoration: none; line-height: 1.3; }
.jump a span { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-size: 13px; }
.jump a:hover { outline: 2px solid var(--c); }
.svc-group { margin-top: 34px; scroll-margin-top: 170px; }
.svc-head { display: flex; gap: 16px; align-items: center; border-radius: var(--radius); padding: 16px 22px; color: #fff; background: var(--c); }
.content .svc-head h2 { color: #fff; margin: 0; padding: 0; border: 0; font-size: 21px; }
.svc-head p { margin: 2px 0 0; color: rgba(255,255,255,.92); font-size: 15px; }
.svc-num { flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%; background: #fff; color: var(--c); display: grid; place-items: center; font-family: 'Merriweather', Georgia, serif; font-weight: 800; font-size: 21px; }
.svc-icon-big { margin-left: auto; font-size: 36px; }
.content h3.svc-sub { display: flex; align-items: center; gap: 12px; margin: 24px 0 0; font-size: 17px; color: var(--c); text-transform: uppercase; letter-spacing: .08em; }
.content h3.svc-sub::before { content: '🗂️'; font-size: 18px; }
.content h3.svc-sub::after { content: ''; flex: 1; height: 2px; background: var(--c-art); }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(195px, 1fr)); gap: 12px; margin-top: 14px; }
.svc-card { display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: 14px; background: var(--c-soft); border: 2px solid transparent; text-decoration: none; color: var(--ink); transition: transform .15s, border-color .15s; }
a.svc-card:hover { transform: translateY(-3px); border-color: var(--c); color: var(--ink); }
.svc-card.no-link { opacity: .8; }
.svc-icon { font-size: 28px; }
.svc-name { font-weight: 800; font-size: 16px; color: var(--navy-dark); line-height: 1.3; }
.svc-text { font-size: 14px; color: var(--muted); flex: 1; }
.svc-go { font-size: 13px; font-weight: 800; color: var(--c); margin-top: 6px; }

/* ---------- Online resources page ---------- */
.res-tools { position: sticky; top: 150px; z-index: 5; background: var(--white); padding: 4px 0 10px; }
#resFilter { width: 100%; padding: 12px 16px; border: 2px solid var(--cream); border-radius: 12px; font: inherit; font-size: 16px; margin-bottom: 10px; background: var(--cream-2); }
#resFilter:focus { outline: none; border-color: var(--yellow-dk); background: #fff; }
.res-jump a span { background: none !important; width: auto !important; font-size: 17px; }
.res-card { position: relative; padding-top: 14px; }
.res-tag { align-self: flex-start; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--c); background: #fff; border: 1px solid var(--c-art); padding: 1px 9px; border-radius: 99px; margin-bottom: 6px; }
.res-card .svc-go { word-break: break-all; }
.res-none { font-weight: 700; color: var(--muted); }
.res-section[hidden], .res-card[hidden] { display: none !important; }

/* ---------- E-Book Library ---------- */
.eb-hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; background: linear-gradient(120deg, #12336b, #1a5bb5); color: #fff; border-radius: 20px; padding: 24px 28px; box-shadow: var(--shadow); }
.eb-hero h1 { color: #fff; margin: 0; font-size: 30px; }
.eb-hero p { margin: 4px 0 0; color: #dce6f7; }
.eb-hero b { color: var(--yellow); }
.eb-search { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 99px; padding: 4px 6px 4px 16px; flex: 1; max-width: 520px; min-width: 240px; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.eb-search input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: 16px; padding: 10px 6px; color: var(--ink); background: none; }
.eb-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 6px; }
.eb-tab { display: flex; align-items: center; gap: 8px; border: 2px solid var(--line); background: #fff; color: var(--navy-dark); font: inherit; font-weight: 800; font-size: 15px; padding: 8px 14px; border-radius: 99px; cursor: pointer; }
.eb-tab span { background: var(--c-soft, var(--cream)); color: var(--c, var(--navy)); border-radius: 99px; padding: 0 9px; font-size: 13px; }
.eb-tab:hover { border-color: var(--c, var(--navy)); }
.eb-tab.active { background: var(--c, var(--navy)); border-color: var(--c, var(--navy)); color: #fff; }
.eb-tab.active span { background: #fff; }
.eb-status { min-height: 1.4em; margin: 4px 0 10px; color: var(--muted); font-weight: 700; }
.eb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.eb-card { display: flex; flex-direction: column; background: #fff; border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; border-top: 5px solid var(--c); }
.eb-card:hover { transform: translateY(-5px); box-shadow: 0 14px 30px rgba(18,51,107,.18); color: var(--ink); }
.eb-card[hidden] { display: none; }
.eb-cover { position: relative; display: block; aspect-ratio: 2 / 3; background: var(--c-art); overflow: hidden; }
.eb-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.eb-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 18px 16px 18px 26px; text-align: left;
  background: linear-gradient(150deg, var(--c), var(--navy-dark)); color: #fff; box-shadow: inset 10px 0 0 rgba(255,255,255,.18); }
.eb-fallback b { font-family: 'Merriweather', Georgia, serif; font-size: 19px; line-height: 1.2; }
.eb-fallback small { font-size: 13px; opacity: .85; }
.eb-info { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 14px; flex: 1; }
.eb-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.eb-badge { font-size: 11px; font-weight: 800; color: var(--c); background: var(--c-soft); padding: 1px 8px; border-radius: 99px; }
.eb-title { font-family: 'Merriweather', Georgia, serif; font-weight: 700; font-size: 15.5px; line-height: 1.3; color: var(--navy-dark); }
.eb-author { font-size: 14px; color: var(--muted); font-weight: 700; }
.eb-genre { font-size: 12.5px; color: var(--c); font-weight: 700; }
.eb-desc { font-size: 13.5px; color: var(--muted); line-height: 1.45; flex: 1; }
.eb-read { margin-top: 8px; font-weight: 800; font-size: 14px; color: var(--c); }
.eb-promo { display: block; background: var(--cream-2); border: 2px dashed var(--yellow-dk); border-radius: 14px; padding: 12px 16px; margin-bottom: 14px; text-decoration: none; color: var(--ink); }
.eb-promo span { font-weight: 800; color: var(--navy); }
.eb-promo:hover { background: var(--cream); color: var(--ink); }

/* ---------- Embedded app page ---------- */
.app-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.app-bar h1 { margin: 2px 0 0; font-size: 26px; }
.app-back { font-weight: 800; font-size: 14px; text-decoration: none; color: var(--red); }
.app-frame { width: 100%; height: 80vh; min-height: 560px; border: 2px solid var(--line); border-radius: 14px; background: var(--bg); }
.app-note { font-size: 14px; color: var(--muted); margin: 10px 0 0; }

/* ---------- Contact form ---------- */
.form-grid { display: grid; gap: 14px; max-width: 560px; }
.form-grid label { font-weight: 700; font-size: 15px; display: block; margin-bottom: 4px; color: var(--navy); }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; padding: 10px 12px; border: 1px solid #cfd6e3; border-radius: 10px; font: inherit; font-size: 16px; background: #fff; }
.form-grid input:focus, .form-grid textarea:focus, .form-grid select:focus { outline: 3px solid rgba(248,196,64,.45); border-color: var(--yellow-dk); }
.hp { position: absolute; left: -9999px; }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-weight: 700; }
.alert-ok { background: #e6f6ea; color: #17602e; }
.alert-err { background: #fde8ea; color: #9b1c2c; }

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 18px; }
.side-box { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.side-box h3 { margin: 0; background: var(--navy); color: #fff; font-size: 16px; padding: 12px 16px; }
.side-box ul { list-style: none; margin: 0; padding: 6px 0; }
.side-box a { display: flex; gap: 10px; align-items: center; padding: 8px 16px; text-decoration: none; font-size: 15px; font-weight: 600; color: var(--ink); border-left: 4px solid transparent; line-height: 1.35; }
.side-box a:hover, .side-box a.active { background: var(--cream-2); border-left-color: var(--yellow); color: var(--navy); }
.side-num { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--c, var(--navy)); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: #cfd9ec; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1.3fr 1fr 1fr; gap: 28px; padding-top: 40px; padding-bottom: 30px; }
.site-footer h4 { color: var(--yellow); margin: 0 0 10px; }
.footer-school { color: #fff; font-weight: 700; margin-top: -6px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: #cfd9ec; text-decoration: none; }
.site-footer a:hover { color: var(--yellow); text-decoration: underline; }
.footer-bottom { background: #081a3a; padding: 14px 0 10px; font-size: 14.5px; }
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.footer-words { color: #fff; font-weight: 700; letter-spacing: .02em; }
.footer-copy { justify-content: center !important; font-size: 13px; opacity: .7; margin-top: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .site-search { width: 240px; }
  .main-nav > ul > li > a, .main-nav > ul > li > button { padding: 11px 10px; font-size: 14.5px; }
}
@media (max-width: 960px) {
  .page-grid { grid-template-columns: 1fr; }
  .home-panels { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  h1, .page-head h1 { font-size: 25px; }
  .header-inner { flex-wrap: wrap; gap: 10px; }
  .brand { flex: 1 1 0; min-width: 0; }
  .brand-logo { width: 48px; height: 48px; }
  .brand-top { font-size: 18px; }
  .brand-school { font-size: 12px; }
  .nav-toggle { display: block; }
  .site-search { order: 3; width: 100%; }
  .main-nav { display: none; }
  body.nav-open .main-nav { display: block; }
  .main-nav > ul { flex-direction: column; padding: 0; }
  .main-nav > ul > li > a, .main-nav > ul > li > button { width: 100%; text-align: left; padding: 12px 16px; font-size: 16px; }
  .main-nav .sub, .main-nav .sub-right .sub { position: static; width: auto; border-radius: 0; box-shadow: none; }
  .main-nav .sub ul { max-height: none; }
  .content { padding: 22px 18px; }
  .group-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .readers-photo figcaption { position: static; background: var(--navy-dark); font-size: 13px; padding: 9px 12px; }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .svc-head { padding: 14px; }
  .content .svc-head h2 { font-size: 18px; }
  .svc-icon-big { display: none; }
  .svc-grid { grid-template-columns: 1fr 1fr; }
  .app-frame { height: 75vh; min-height: 480px; }
  .footer-grid { grid-template-columns: 1fr; }
  .res-tools { position: static; }
  .eb-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .eb-hero { padding: 18px; }
  .eb-search { min-width: 0; width: 100%; }
  .eb-hero h1 { font-size: 24px; }
  .eb-fallback b { font-size: 15px; }
  .eb-desc { display: none; }
  .footer-bottom .container { flex-direction: column; text-align: center; }
}
