/* abai-school: a friendlier skeleton over base (loaded after base's site.css). No colours of its own:
   only base tokens, so every palette works. Shape, not colour, sets it apart from base: the name on a
   band of the primary colour, the menu as pills, a rounded photo with a dark «board» card over it,
   inner-page headings in rounded panels, news as a list, sections as a column, large radii. */
:root{--radius-sm:.625rem;--radius:1.125rem;--radius-lg:1.5rem;--radius-xl:2rem}
/* fallback base colours = this template's default palette "steppe" (settings.toml), for a core that
   sends no theme.vars; theme.vars comes after this file and overrides them */
:root{--c-primary:#146446;--c-accent:#e3ad3c;--c-surface:#f7f5ec}

/* header: the name on the primary colour (the core's on-primary keeps the text readable), menu pills below */
.site-header--board{background:var(--color-surface)}
.board-bar{background:var(--color-primary);color:var(--color-on-primary)}
.board-bar__side{display:none}
.site-header--board .brand,.site-header--board a.brand:hover{color:var(--color-on-primary)}
.site-header--board .brand__kind{color:var(--color-on-primary);font-weight:500}
.site-header--board .emblem{border-radius:var(--radius-sm);background:var(--color-surface);color:var(--color-heading);box-shadow:0 0 0 3px var(--color-accent)}
.site-header--board .emblem--logo{padding:.2rem;background:var(--color-surface);box-shadow:none}
.board-bar :focus-visible{outline-color:var(--color-on-primary)}
.board-bar .lang a{color:var(--color-on-primary)}
.board-bar .lang a:hover{color:var(--color-on-primary)}
.board-bar .lang a:hover span{background:color-mix(in srgb,var(--color-on-primary) 16%,transparent)}
.board-bar .lang a[aria-current] span{background:var(--color-on-primary);color:var(--color-primary)}
.site-header--board .nav{border-top:0;border-bottom:1px solid var(--color-border)}
.site-header--board .nav__list a{margin:.65rem .1rem;padding:.42rem .95rem;border:0;border-radius:var(--radius-pill);line-height:1.3}
.site-header--board .nav__list li:first-child a{margin-inline-start:0;padding-inline-start:.95rem}
.site-header--board .nav__list a:hover{background:var(--color-primary-soft);color:var(--color-heading)}
.site-header--board .nav__list a[aria-current]{background:var(--color-primary);color:var(--color-on-primary)}
.site-header--board .nav__list a:focus-visible{outline-offset:-1px;border-radius:var(--radius-pill)}
.site-header--board .nav__toggle{border-color:var(--color-border);background:var(--color-surface-2)}
.site-header--board .nav__panel{border-top-style:dashed}

/* home hero: the photo in a rounded frame, the board card over its lower left corner */
.hero-b{padding-top:var(--space-4)}
.hero-b__inner{display:grid;grid-template-columns:var(--space-3) minmax(0,1fr) var(--space-3);grid-template-rows:auto 2.5rem auto}
.hero-b__photo{position:relative;grid-column:1/-1;grid-row:1/3;overflow:hidden;aspect-ratio:4/3;max-height:60vh;border-radius:var(--radius-xl);background:var(--color-surface-2)}
.hero-b__photo img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover}
.hero-b__board{position:relative;z-index:1;grid-column:2;grid-row:2/4;display:grid;gap:var(--space-5);align-items:center;padding:var(--space-5);border-bottom:.35rem solid var(--color-accent);border-radius:var(--radius-lg);background:var(--color-primary-strong);color:var(--color-on-dark);box-shadow:0 0 0 .4rem var(--color-surface),var(--shadow-lg)}
.hero-b__text{min-width:0}
.hero-b__eyebrow{display:flex;align-items:center;gap:var(--space-3);margin:0;color:var(--color-accent-on-dark);font-size:var(--text-sm);font-weight:700;letter-spacing:.06em;text-transform:uppercase}
.hero-b__eyebrow::before{content:"";flex:none;width:1.5rem;height:3px;border-radius:2px;background:var(--color-accent)}
.hero-b__title{max-width:22ch;margin:var(--space-3) 0;color:inherit;font-size:var(--text-hero);font-weight:800;line-height:1.08;letter-spacing:-.02em;text-wrap:balance;overflow-wrap:anywhere}
.hero-b__title--long{max-width:30ch;font-size:var(--text-hero-long);line-height:1.15}
.hero-b__kind{margin:0;color:var(--color-on-dark-muted);font-size:var(--text-lg)}
.hero-b__tagline{max-width:44ch;margin:var(--space-3) 0 0;font-size:var(--text-lg);line-height:1.5}
.hero-b__actions{margin:var(--space-5) 0 0}
.hero-b a:focus-visible{outline-color:var(--color-focus-on-dark)}
.hero-b__mark{display:none}
.hero-b .emblem--hero:not(.emblem--logo){border-radius:var(--radius-xl)}
.hero-b--plain .hero-b__inner{grid-template-columns:minmax(0,1fr);grid-template-rows:auto}
.hero-b--plain .hero-b__board{grid-column:1;grid-row:1;padding:var(--space-6) var(--space-5)}

/* home board: sections column and news list */
.board{display:grid;gap:var(--space-6);padding-block:var(--space-6)}
.board__title{display:flex;align-items:center;gap:var(--space-3);margin:0 0 var(--space-4);font-size:var(--text-xl)}
.board__title::before{content:"";flex:none;width:.35rem;height:1.1em;border-radius:2px;background:var(--color-accent)}
.board .band__head{margin-bottom:var(--space-4)}
.board .band__head .board__title{margin:0}
.board__main{display:grid;gap:var(--space-6);min-width:0}
/* one column: news first, the sections list after it (a school can have 25 sections) */
.board--two .board__links{order:2}
.board__anns .ann-list{grid-template-columns:1fr}
.links-box{overflow:hidden;border:1px solid var(--color-border);border-radius:var(--radius-lg);background:var(--color-surface);box-shadow:var(--shadow-sm)}
.links li+li,.links-more,.links-more[open]>.links{border-top:1px solid var(--color-border)}
.links-more__toggle{display:flex;align-items:center;gap:var(--space-2);min-height:3.25rem;padding:var(--space-2) var(--space-4);color:var(--color-link);font-size:var(--text-sm);font-weight:650;cursor:pointer;list-style:none}
.links-more__toggle::-webkit-details-marker{display:none}
.links-more__toggle:hover{background:var(--color-primary-soft)}
.links-more__toggle:focus-visible{outline-offset:-3px}
.links-more__toggle .count{margin-inline-end:auto}
.links-more__chevron{width:1.1em;height:1.1em;color:var(--color-text-muted);transition:transform .15s}
.links-more[open] .links-more__chevron{transform:rotate(180deg)}
.link-row{display:flex;align-items:center;gap:var(--space-3);min-height:3.25rem;padding:var(--space-2) var(--space-4);color:var(--color-heading);font-weight:650;line-height:var(--leading-tight);text-decoration:none}
.link-row__icon{display:grid;place-items:center;flex:none;width:2.25rem;height:2.25rem;border-radius:50%;background:var(--color-primary-soft);color:var(--color-primary)}
.link-row--periodic .link-row__icon{background:var(--color-accent-soft);color:var(--color-heading)}
.link-row__name{flex:1;min-width:0}
.link-row__arrow{color:var(--color-text-muted);transition:transform .15s}
.link-row:hover{background:var(--color-primary-soft);color:var(--color-link-hover)}
.link-row:hover .link-row__arrow{color:var(--color-primary);transform:translateX(3px)}
.link-row:focus-visible{outline-offset:-3px;border-radius:0}

/* news: rounded rows without a frame, a tear-off calendar leaf when there is no picture */
.news-list{display:grid;gap:var(--space-3)}
.news-item{position:relative;display:grid;grid-template-columns:5.5rem 1fr;gap:var(--space-4);align-items:center;padding:var(--space-3);border-radius:var(--radius-lg);background:var(--color-surface);box-shadow:var(--shadow-sm);transition:box-shadow .15s}
.news-item:hover{box-shadow:0 0 0 2px var(--color-primary),var(--shadow-md)}
.news-item:focus-within{outline:var(--focus-width) solid var(--color-focus);outline-offset:2px}
.news-item__media{overflow:hidden;border-radius:var(--radius);background:var(--color-primary-soft)}
.news-item__media img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:cover}
.news-item__date{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;aspect-ratio:1;padding-top:.5rem;background:var(--color-accent-soft);color:var(--color-heading);font-size:var(--text-xs);font-weight:700;line-height:1.2;text-align:center}
.news-item__date::before{content:"";position:absolute;inset:0 0 auto;height:.5rem;background:var(--color-primary)}
.news-item__day{font-size:var(--text-2xl);font-weight:800;line-height:1}
.news-item__body{min-width:0}
.news-item .meta{margin-bottom:var(--space-1)}
.news-item__title{margin:0;font-size:var(--text-base);overflow-wrap:anywhere}
.news-item__title a{color:var(--color-heading);text-decoration:none}
.news-item__title a:hover{text-decoration:underline}
.news-item__title a:focus-visible{outline:none}
.news-item__title a::after{content:"";position:absolute;inset:0}
.news-item__summary{display:none;margin:var(--space-2) 0 0;overflow:hidden;color:var(--color-text-muted);-webkit-box-orient:vertical;-webkit-line-clamp:2}
.news-item--lead{grid-template-columns:1fr;gap:0;padding:0;overflow:hidden}
.news-item--lead .news-item__media{border-radius:0}
.news-item--lead .news-item__media img,.news-item--lead .news-item__date{aspect-ratio:16/9;max-height:20rem}
.news-item--lead .news-item__body{padding:var(--space-4)}
.news-item--lead .news-item__title{font-size:var(--text-lg)}
.news-item--lead .news-item__summary{display:-webkit-box;-webkit-line-clamp:3}

/* inner pages: the heading sits in a rounded panel instead of a full-width band */
.page-head:not(.page-head--center){padding-block:var(--space-4) 0;background:none;border-bottom:0}
.page-head:not(.page-head--center)::after{display:none}
.page-head:not(.page-head--center)>.wrap{position:relative;isolation:isolate;overflow:hidden;padding:var(--space-4) var(--space-5) var(--space-5);border:1px solid var(--color-border);border-radius:var(--radius-xl);background:var(--color-surface-2)}
.page-head:not(.page-head--center)>.wrap::after{content:"";position:absolute;inset:0 0 0 60%;z-index:-1;background:var(--color-primary);opacity:.06;pointer-events:none;-webkit-mask:var(--ornament) 0 0/56px 56px;mask:var(--ornament) 0 0/56px 56px}
.no-ornament .page-head>.wrap::after{display:none}

/* footer: rounded top edge */
.site-footer{border-top:0;border-radius:var(--radius-xl) var(--radius-xl) 0 0;box-shadow:inset 0 .3rem 0 var(--color-accent)}

@media (min-width:30rem){
  .news-item:not(.news-item--lead){grid-template-columns:7rem 1fr}
  .news-item__summary{display:-webkit-box}
}
@media (min-width:40rem) and (max-width:63.99rem){
  /* no side column yet: the sections list goes in two columns */
  .links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .links li+li{border-top:0}
  .links li:nth-child(n+3){border-top:1px solid var(--color-border)}
  .links li:nth-child(odd){border-inline-end:1px solid var(--color-border)}
}
@media (min-width:40rem){
  .hero-b--plain .hero-b__board{grid-template-columns:minmax(0,1fr) auto;padding-inline:var(--space-6)}
  .hero-b--plain .hero-b__mark{display:block;padding:var(--space-4)}
  .news-item--lead{grid-template-columns:minmax(0,1.15fr) 1fr}
  .news-item--lead .news-item__media img,.news-item--lead .news-item__date{height:100%;min-height:15rem;max-height:24rem;aspect-ratio:auto}
  .news-item--lead .news-item__body{align-self:center;padding:var(--space-5)}
  .news-item--lead .news-item__title{font-size:var(--text-xl)}
}
@media (min-width:48rem){
  .board-bar .site-header__bar{display:grid;grid-template-columns:minmax(6rem,1fr) minmax(0,auto) minmax(6rem,1fr);padding-block:var(--space-4)}
  .board-bar__side{display:block}
  .site-header--board .brand{justify-self:center;max-width:46rem}
  .site-header--board .lang{justify-self:end}
  .site-header--board .emblem:not(.emblem--hero){width:3.5rem;height:3.5rem}
  .hero-b--photo .hero-b__inner{grid-template-columns:var(--space-6) minmax(0,clamp(30rem,36vw,40rem)) minmax(0,1fr);grid-template-rows:minmax(var(--space-6),1fr) auto var(--space-6)}
  .hero-b--photo .hero-b__photo{aspect-ratio:auto;max-height:none;min-height:clamp(22rem,32vw,30rem)}
  .hero-b--photo .hero-b__board{padding:var(--space-6)}
  .page-head:not(.page-head--center)>.wrap{padding:var(--space-5) var(--space-6) var(--space-6)}
}
@media (min-width:64rem){
  .site-header--board .nav__list{justify-content:center}
  .board--two{grid-template-columns:minmax(0,1fr) 20rem;align-items:start;column-gap:var(--space-6)}
  .board--two .board__links{grid-column:2;grid-row:1;position:sticky;top:var(--space-4)}
  .board--two .board__main{grid-column:1;grid-row:1}
}
@media (prefers-reduced-motion:reduce){
  .link-row:hover .link-row__arrow{transform:none}
}
@media print{
  .board__links,.hero-b__photo,.page-head>.wrap::after{display:none}
  .board-bar,.hero-b__board{background:none;color:#000;border:0;box-shadow:none}
  .site-header--board .brand,.site-header--board .brand__kind,.hero-b__title,.hero-b__kind{color:#000}
  .page-head:not(.page-head--center)>.wrap{background:none;border:0;padding:0}
  .news-item{border:1px solid #999;box-shadow:none;break-inside:avoid}
  .site-footer{border-radius:0;box-shadow:none}
}
