:root{
  --blue:#2d57a6;
  --blue-dark:#20437f;  /* hover on blue */
  --lavender:#858fbb;
  --muted:#5f6a91;
  --ice:#f6f8ff;
  --ink:#25324a;
  --white:#ffffff;
  --accent:#765e5e;
  --page:#dfe4f4;
  --panel:#ffffff;
  --menu-bar:#c3cbec;
  --line:rgba(45,87,166,.35);
  /* form states: text, tinted background, light border; --bad-line marks an invalid field */
  --ok:#1e6b3d;
  --ok-bg:#eef7f1;
  --ok-tint:#b5d8c1;
  --bad:#8f1d14;
  --bad-bg:#fdf1f0;
  --bad-tint:#e8b4af;
  --bad-line:#c9524a;
  --sans:'Cabin', Arial, sans-serif;
  --head:'Quicksand', 'Cabin', Arial, sans-serif;
  --edge:35px;   /* min. distance of header, panels and footer from the window edge */
  --inset:10vw;  /* content inset inside the header, panels and footer */
}
*{box-sizing:border-box;}
/* author display rules (e.g. li{display:flex}) must not override the attribute */
[hidden]{display:none!important;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  min-height:100vh;
  min-height:100dvh;
  display:flex;
  flex-direction:column;
  overflow-x:hidden;
  font-family:var(--sans);
  font-weight:400;
  font-size:1.1875rem;
  line-height:1.7;
  color:var(--ink);
  background:var(--page);
}
main{flex:1 0 auto;overflow-x:clip;}
h1,h2,h3,h4{margin:0 0 .5em;font-family:var(--head);font-weight:700;color:var(--blue);}
h1,h2{font-weight:400;letter-spacing:-.01em;}
h1{font-size:clamp(2.5rem,4vw + 1rem,4rem);line-height:1.25;overflow-wrap:anywhere;}
h2{font-size:clamp(1.6rem,2.6vw,2rem);line-height:1.2;}
h3{font-size:1.25rem;margin:0 0 .35em;}
p{margin:0 0 1.15em;}
a{color:var(--blue);}
.meta{font-size:1.05rem;color:var(--muted);}
.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;}
.photo-credit{margin:.5rem 0 0;font-size:.9rem;line-height:1.5;color:var(--ink);text-align:left;overflow-wrap:anywhere;}

a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,
summary:focus-visible{outline:3px solid var(--muted);outline-offset:2px;}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto;}
  *,*::before,*::after{transition-duration:.01ms!important;animation-duration:.01ms!important;}
}

/* ===== footer: same width and inset as the header ===== */
footer.site{position:relative;flex-shrink:0;background:var(--blue);color:var(--page);padding:3.5rem 0 1.75rem;}
.footer-inner{width:calc(100% - 2 * var(--edge));max-width:1500px;margin:0 auto;padding-inline:var(--inset);}
.footer-grid{display:grid;gap:2rem;}
@media (min-width:860px){.footer-grid{grid-template-columns:1fr auto;gap:3rem;}}
.footer-logo{display:inline-flex;margin-bottom:1rem;}
.footer-logo img{display:block;height:48px;width:auto;filter:brightness(0) invert(1);}
.footer-title{margin:0 0 .75rem;font-size:1.25rem;font-weight:700;line-height:1.3;color:var(--white);}
footer.site a{color:var(--page);text-decoration:none;}
footer.site a:hover{color:var(--white);}
footer.site :focus-visible{outline-color:var(--white);}  /* Muted would be ~1.3:1 on the blue */
footer.site ul{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.6rem;}
.footer-follow{margin-top:1.75rem;}
.social-row{display:flex;gap:.9rem;margin-top:.25rem;}
.social-row a{width:44px;height:44px;border:1px solid rgba(255,255,255,.4);border-radius:999px;display:flex;align-items:center;justify-content:center;}
.social-row svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;}
.footer-bottom{margin-top:2.5rem;padding-top:1.25rem;border-top:1px solid rgba(255,255,255,.25);font-size:1.05rem;display:flex;justify-content:space-between;flex-wrap:wrap;gap:.75rem;}

/* ===== contact form states (red and green: owner's exception, docs/design.md section 10) ===== */
.form-msg{padding:1rem 1.25rem;margin:0 0 2rem;border-radius:6px;border:1px solid transparent;}
.form-msg h3{margin:0 0 .25rem;font-family:var(--head);font-weight:700;font-size:1.25rem;}
.form-msg p{margin:0;font-size:.95rem;line-height:1.5;color:var(--ink);}
.form-msg.is-bad{background:var(--bad-bg);border-color:var(--bad-tint);}
.form-msg.is-bad h3{color:var(--bad);}
.form-msg.is-ok{background:var(--ok-bg);border-color:var(--ok-tint);}
.form-msg.is-ok h3{color:var(--ok);}
.form-reqnote{margin:0 0 1.25rem;font-size:1rem;color:var(--muted);}
.req{color:var(--bad);margin-left:.2em;font-weight:700;}
.form-field{margin:0 0 1.25rem;}
.form-field label{display:block;margin:0 0 .35rem;font-family:var(--head);font-weight:700;font-size:1rem;color:var(--blue);}
.has-error .field{border-color:var(--bad-line);background:var(--bad-bg);}
.field-error{margin:.4rem 0 0;font-size:.95rem;color:var(--bad);}
.form-note{margin-top:1.25rem;}

/* ===== donation: form embed, bank transfer box ===== */
.embed{min-height:1px;}
.bank{margin:0;}
.bank-row{display:flex;gap:.4rem 1rem;padding:.4rem 0;}
.bank-row dt{flex:0 0 6rem;margin:0;font-weight:500;color:var(--muted);}
.bank-row dd{flex:1;min-width:0;margin:0;overflow-wrap:anywhere;}
.bank-note{margin:.75rem 0 0;}
.copy-btn{
  display:inline-flex;align-items:center;justify-content:center;
  width:36px;height:36px;margin-left:.35rem;padding:0;
  border:none;border-radius:999px;background:transparent;color:var(--blue);
  cursor:pointer;vertical-align:middle;transition:background .2s ease,color .2s ease;
}
.copy-btn:hover{background:var(--ice);}
.copy-btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.copy-btn .copy-done{display:none;}
.copy-btn.is-copied{color:var(--ok);}
.copy-btn.is-copied .copy-icon{display:none;}
.copy-btn.is-copied .copy-done{display:block;}
@media (max-width:639.98px){
  .bank-row{flex-direction:column;gap:.2rem;}
  .bank-row dt{flex:none;font-size:1.05rem;color:var(--muted);}
}

/* ===== lightbox (news photos) ===== */
html.lightbox-open{overflow:hidden;scrollbar-gutter:stable;}
.lightbox{
  padding:0;border:0;margin:0;background:transparent;color:var(--white);
  width:100vw;height:100vh;height:100dvh;max-width:none;max-height:none;
  overscroll-behavior:contain;
}
.lightbox::backdrop{background:rgba(20,27,41,.92);}
.lightbox[open]{display:flex;flex-direction:column;}
.lightbox-stage{
  flex:1;min-height:0;padding:4rem 1rem 1.5rem;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  position:relative;overflow:hidden;touch-action:none;user-select:none;
}
.lightbox-stage img{
  display:block;max-width:100%;max-height:100%;width:auto;height:auto;
  border-radius:8px;cursor:zoom-in;transform-origin:center;will-change:transform;
  -webkit-user-drag:none;
}
.lightbox.is-zoomed .lightbox-stage img{cursor:grab;border-radius:0;}
.lightbox.is-dragging .lightbox-stage img{cursor:grabbing;}
.lightbox-close{
  position:absolute;top:.5rem;right:.75rem;z-index:1;
  padding:.25rem .5rem;border:0;background:none;color:var(--white);
  font:400 2.75rem/1 var(--sans);cursor:pointer;
}
.lightbox-close:hover{opacity:.75;}
.lightbox-caption{margin:.75rem 0 0;max-width:100%;text-align:left;font-size:.9rem;line-height:1.5;transition:opacity .2s ease;}
.lightbox.is-zoomed .lightbox-caption{opacity:0;}

/* ===== rich text ===== */
.prose{max-width:56rem;}
.prose h2,.prose h3{margin-top:0.5em;}
.prose p{max-width:70ch;}
.prose ul,.prose ol{max-width:56ch;padding-left:1.25rem;}
.prose blockquote{
  margin:1.5rem 0;padding:.25rem 0 .25rem 1.25rem;
  border-left:3px solid var(--muted);font-size:1.25rem;color:var(--ink);
}
.prose img{max-width:100%;height:auto;border-radius:24px;}
.prose-figure{width:fit-content;max-width:100%;margin-bottom:1.15em;}
.prose-figure img{display:block;}
.prose .richtext-image.full-width{display:block;margin:1.5rem 0;}
.prose .richtext-image.left{float:left;max-width:50%;margin:.25rem 1.5rem 1rem 0;}
.prose .richtext-image.right{float:right;max-width:50%;margin:.25rem 0 1rem 1.5rem;}
.prose .zoomable{cursor:zoom-in;}
.prose .zoomable img{display:block;}
.prose::after{content:"";display:block;clear:both;}

/* ===== page frame (docs/design.md section 7) =====
   White header, wave into the lavender page, white panels, wave into the blue footer. */
.site-header{position:relative;z-index:20;background:var(--white);}
.site-nav{
  display:flex;align-items:flex-start;gap:2rem;
  width:calc(100% - 2 * var(--edge));max-width:1500px;margin:0 auto;
  padding:70px var(--inset) 45px;
}
.site-logo{align-self:center;flex:none;}
.site-logo img{display:block;height:65px;width:auto;transition:opacity .15s ease;}
.site-logo:hover img{opacity:.8;}
.site-menu{list-style:none;display:flex;align-items:flex-start;gap:.5rem 1.6rem;margin:0 0 0 auto;padding:0;}
.site-menu a{font-family:var(--head);font-size:1.15rem;font-weight:500;text-decoration:none;}
/* 5px pale bar under the hovered, focused or current link, at the bottom of the header */
.site-menu a:not(.menu-give){
  display:inline-block;line-height:1.2;
  padding:14px 0 20px;margin-bottom:-25px;
  border-bottom:5px solid transparent;transition:border-color .2s ease;
}
.site-menu a:not(.menu-give):hover,
.site-menu a:not(.menu-give):focus-visible,
.site-menu a[aria-current]{border-bottom-color:var(--menu-bar);}
/* "Anneta" is a solid .button set in the menu font, a step bigger and heavier */
.site-menu .menu-give{margin-top:5px;padding:.55rem 1.4rem;font-size:1.25rem;font-weight:600;}
.menu-toggle,.menu-burger{display:none;}

/* the wave: fill = colour below, background = colour above */
.wave-defs{position:absolute;width:0;height:0;overflow:hidden;}
.wave{display:block;flex:none;width:100%;height:39px;}
/* The last pixel row takes the next section's colour: on scaled screens (e.g. 125 %) the
   wave's bottom edge falls between device pixels and would otherwise leave a light line. */
.seam-top{margin-top:-1px;background:linear-gradient(var(--white) calc(100% - 2px),var(--page) 0);fill:var(--page);}
.seam-bottom{margin-bottom:-1px;background:linear-gradient(var(--page) calc(100% - 2px),var(--blue) 0);fill:var(--blue);}

/* panels: white, rounded, max 1500px, at least --edge from the window edge */
.site-main{width:100%;padding:30px var(--edge) 0;}
.panel{
  position:relative;overflow:hidden;
  max-width:1500px;margin:0 auto 60px;padding-block:4.5rem 5rem;
  background:var(--panel);border-radius:50px;
}
.panel-inner{padding-inline:var(--inset);}

/* under 1024px: four-line burger, full-screen menu in the page colour (pure CSS) */
@media (max-width:1023.98px){
  .site-nav{align-items:center;padding-block:1.75rem 1.25rem;}
  .site-logo,.menu-burger{position:relative;z-index:31;}
  .menu-toggle{display:block;position:absolute;right:var(--edge);top:1.75rem;width:1px;height:1px;margin:0;opacity:0;}
  .menu-burger{
    display:block;flex:none;margin-left:auto;padding:7px;
    width:40px;height:30px;box-sizing:content-box;cursor:pointer;
  }
  .menu-burger span{position:absolute;left:7px;width:40px;height:4px;background:var(--blue);transition:top .2s ease,left .2s ease,width .2s ease,transform .2s ease;}
  .menu-burger span:nth-child(1){top:7px;}
  .menu-burger span:nth-child(2),.menu-burger span:nth-child(3){top:20px;}
  .menu-burger span:nth-child(4){top:33px;}
  .menu-toggle:checked ~ .menu-burger span:nth-child(1),
  .menu-toggle:checked ~ .menu-burger span:nth-child(4){top:20px;left:27px;width:0;}
  .menu-toggle:checked ~ .menu-burger span:nth-child(2){transform:rotate(45deg);}
  .menu-toggle:checked ~ .menu-burger span:nth-child(3){transform:rotate(-45deg);}
  .menu-toggle:focus-visible ~ .menu-burger{outline:3px solid var(--muted);outline-offset:2px;}

  /* hidden = not focusable: visibility switches after the fade-out */
  .site-menu{
    position:fixed;inset:0;z-index:30;overflow-y:auto;
    flex-direction:column;gap:1rem;margin:0;
    padding:7.5rem 1.5rem 2rem calc(var(--edge) + var(--inset));
    background:var(--page);
    visibility:hidden;opacity:0;transition:opacity .2s ease,visibility 0s linear .2s;
  }
  .menu-toggle:checked ~ .site-menu{visibility:visible;opacity:1;transition:opacity .2s ease;}
  .site-menu li{opacity:0;transition:opacity .2s ease;}
  .menu-toggle:checked ~ .site-menu li{opacity:1;}
  .menu-toggle:checked ~ .site-menu li:nth-child(2){transition-delay:.05s;}
  .menu-toggle:checked ~ .site-menu li:nth-child(3){transition-delay:.1s;}
  .menu-toggle:checked ~ .site-menu li:nth-child(4){transition-delay:.15s;}
  .menu-toggle:checked ~ .site-menu li:nth-child(5){transition-delay:.2s;}
  .site-menu a:not(.menu-give){padding:0;margin:0;border:0;font-size:1.75rem;font-weight:700;}
  .site-menu .menu-give{margin-top:.75rem;padding:.7rem 1.4rem;font-size:1.3rem;}
  body:has(.menu-toggle:checked){overflow:hidden;}
}
@media (max-width:639.98px){
  :root{--edge:12px;--inset:1.5rem;}
  .site-logo img{height:50px;}
  .wave{height:20px;}
  .site-main{padding-top:16px;}
  .panel{margin-bottom:28px;padding-block:3rem 3.5rem;border-radius:28px;}
}
@media (prefers-reduced-motion:reduce){
  .menu-toggle:checked ~ .site-menu li{transition-delay:0s!important;}
}

/* ===== shared parts: headings, buttons, links, photos ===== */
.panel h2{font-size:clamp(2.1rem,3.6vw,3rem);line-height:1.15;margin:0 0 2rem;}
.button{
  display:inline-flex;align-items:center;justify-content:center;
  padding:.85rem 1.6rem;border:1px solid var(--line);border-radius:999px;
  background:transparent;color:var(--blue);
  font-family:var(--sans);font-weight:400;font-size:1.1rem;line-height:1.2;
  text-decoration:none;cursor:pointer;transition:background .15s ease,border-color .15s ease;
}
.button:hover{background:var(--ice);}
.button.is-solid{background:var(--blue);border-color:var(--blue);color:var(--white);}
.button.is-solid:hover{background:var(--blue-dark);border-color:var(--blue-dark);}
.button-light{color:var(--white);border-color:rgba(255,255,255,.75);}
.button-light:hover{background:rgba(255,255,255,.12);}
.button-light.is-solid{background:var(--white);border-color:var(--white);color:var(--blue);}
.button-light.is-solid:hover{background:var(--ice);border-color:var(--ice);}
.button-row{display:flex;flex-wrap:wrap;gap:1rem;}
.photo{overflow:hidden;border-radius:24px;}
.photo img{display:block;width:100%;height:auto;}
/* news without a photo: the logo-and-motto picture (og-default.png), its white turned into
   the page colour so it reads as a photo box on the white panel */
.photo.is-default{background:var(--page);}
.photo.is-default img{mix-blend-mode:multiply;object-fit:cover;scale:1.35;}  /* the logo fills only half of the picture */
.section-intro{margin:-1rem 0 2rem;}
/* icon-only button (news search): a round pill */
.button.is-icon{flex:none;width:3.5rem;height:3.5rem;padding:0;}
.button.is-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;}
/* a button that reads as a text link ("Näita kaardil", "Vaata kaardil") */
.link-button{
  display:inline;padding:0;border:0;background:none;
  font:inherit;color:var(--blue);text-decoration:underline;text-underline-offset:.2em;cursor:pointer;
}
.link-button:hover{color:var(--blue-dark);}
.link-button:disabled{color:var(--muted);text-decoration:none;cursor:default;}
/* skip link: hidden until focused, then a solid pill in the top-left corner */
.skip-link{position:absolute;z-index:40;top:1rem;left:var(--edge);}
.skip-link:not(:focus){width:1px;height:1px;padding:0;border:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
/* fields: labels above, hairline border, 6px corners */
.field{
  display:block;width:100%;margin:0;padding:.85rem 1rem;
  border:1px solid var(--line);border-radius:6px;background:var(--white);color:var(--ink);
  font-family:var(--sans);font-size:1.1rem;line-height:1.7;
}
textarea.field{height:150px;min-height:150px;resize:vertical;}

/* ===== subpages (docs/design.md section 9) ===== */
.page-title{margin:0 0 1rem;font-size:clamp(2.4rem,4.4vw,3.6rem);line-height:1.15;}
.lead{max-width:34em;margin:0;font-family:var(--head);font-size:clamp(1.4rem,2.3vw,1.9rem);line-height:1.35;color:var(--blue);}
/* reading pages (Meist, plain page, news item): one centred column; text, photos and boxes share its width */
.reading{display:grid;grid-template-columns:minmax(0,48rem);justify-content:center;}
.reading.is-wide{grid-template-columns:minmax(0,56rem);}
.reading .prose,.reading .prose p,.reading .prose ul,.reading .prose ol{max-width:none;}
.reading .prose h2{margin:2.25rem 0 .6rem;font-weight:700;font-size:1.5rem;line-height:1.3;}
.reading .prose h3{margin:1.75rem 0 .5rem;}
.breadcrumb{margin:0 0 1.25rem;font-size:1.05rem;color:var(--muted);}
.breadcrumb a{color:inherit;}

/* news list: title and search on one row, a hairline (owner's exception), then the items */
.news-index-head{display:grid;gap:1.5rem 3rem;align-items:end;padding-bottom:3.25rem;margin-bottom:1.5rem;border-bottom:1px solid var(--line);}
.news-index-head .page-title{margin:0;}
.news-search{display:flex;gap:.75rem;align-items:center;}
.news-search-note{margin:0 0 1.5rem;}
.news-items{display:flex;flex-direction:column;gap:1.4rem;margin:0;padding:0;list-style:none;}
.news-item{display:grid;grid-template-columns:clamp(160px,34%,260px) minmax(0,1fr);gap:1rem 2rem;align-items:center;}
.news-item .photo{border-radius:16px;}
.news-item .photo img{aspect-ratio:2/1;object-fit:cover;}
.news-item h2{margin:0 0 .25rem;font-weight:500;font-size:clamp(1.25rem,1.9vw,1.5rem);line-height:1.25;}
.news-item h2 a{color:var(--blue);text-decoration:none;}
.news-item h2 a:hover{text-decoration:underline;}
.news-item .meta{display:block;margin-bottom:.35rem;}
.news-item p{
  margin:0;font-size:1.1rem;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;
}
@media (min-width:860px){
  .news-index-head{grid-template-columns:auto minmax(13rem,26rem);justify-content:space-between;}
}
/* no hairlines between news: on tablets and phones the space between items grows */
@media (max-width:1023.98px){
  .news-items{gap:2.2rem;}
}
/* phones: the photo stays beside the text (36 % of the row), so the text gets priority */
@media (max-width:639.98px){
  .news-items{gap:2.5rem;}
  .news-item{grid-template-columns:minmax(0,36%) minmax(0,1fr);gap:1rem;align-items:start;}
  .news-item .photo{border-radius:14px;}
  .news-item .photo img{aspect-ratio:4/3;}
  .news-item h2{font-size:1.15rem;}
  .news-item .meta{margin-bottom:.25rem;font-size:.95rem;}
  .news-item p{font-size:1rem;-webkit-line-clamp:3;}
}

/* news item: title, date, photo, event strip, text */
.article-title{font-size:clamp(1.9rem,3.2vw,2.7rem);margin-bottom:.5rem;}
.article-date{margin:0 0 2rem;font-size:1.1rem;}
.article-photo{margin:0 0 2rem;}
.article-photo .photo{display:block;cursor:zoom-in;}
.article-photo img{aspect-ratio:2.2/1;object-fit:cover;object-position:var(--focus,50% 50%);}

/* event strip: date column, hairline, details (owner's exceptions: month in capitals, the hairline) */
.event-strip{display:grid;grid-template-columns:auto minmax(0,1fr);margin:0 0 2rem;padding:1rem 1.5rem 1.1rem;border:1px solid var(--line);border-radius:5px;}
.event-strip-when{margin:0;padding-right:2rem;font-family:var(--head);font-weight:700;color:var(--blue);}
.event-strip-when time > span:not(.sr-only){display:block;}
.event-strip-day{font-size:2.4rem;line-height:1;}
.event-strip-month{margin-top:.1rem;font-size:1.5rem;line-height:1.15;text-transform:uppercase;}
.event-strip-time{margin-top:.5rem;font-size:1.65rem;font-weight:400;line-height:1.1;}
.event-strip-details{min-width:0;padding-left:2rem;border-left:1px solid var(--line);}
.event-strip-details > *{margin:0;}
.event-strip-details > * + *{margin-top:.6rem;}
.event-strip-repeat{color:var(--muted);font-size:1.05rem;font-style:italic;}
.event-strip-place{display:flex;flex-wrap:wrap;align-items:center;gap:.3rem .75rem;font-size:1.05rem;}
.event-strip-place .link-button{font-size:.95rem;}
.event-strip-note,.event-strip-note p{font-size:1.15rem;line-height:1.55;}
.event-strip-note p{margin:0 0 .45rem;}
.event-strip-note p:last-child{margin-bottom:0;}
.event-strip-note a{overflow-wrap:anywhere;}
.event-strip .event-link{font-size:1rem;font-weight:400;text-decoration:underline;text-underline-offset:.25em;}
.event-strip .map{grid-column:1 / -1;margin-top:1.25rem;}
.event-strip .map:not(.is-active){display:none;}
.event-strip .map-canvas{border-radius:5px;}
/* phones: one column, day, month and time on one line */
@media (max-width:639.98px){
  .event-strip{grid-template-columns:1fr;gap:.75rem;}
  .event-strip-when{padding:0;}
  .event-strip-when time{display:flex;flex-wrap:wrap;align-items:baseline;gap:.15rem .6rem;}
  .event-strip-day{font-size:2rem;}
  .event-strip-month,.event-strip-time{margin:0;font-size:1.5rem;}
  .event-strip-time{margin-left:.4rem;}
  .event-strip-details{padding:0;border:0;}
  /* the address stays beside the pin; the map link wraps under it, in line with the text */
  .event-strip-place > span{flex:1 1 0;min-width:8rem;}
  .event-strip-place .link-button{margin-left:calc(20px + .75rem);}
  .article-photo .photo{overflow:hidden;}
  .article-photo img{aspect-ratio:16/10;transform:scale(1.12);}
}

/* Meist: contents box on the left from 1400px, above the text below that */
.about-page{padding-inline:var(--inset);}
.toc-box{align-self:start;width:fit-content;max-width:100%;margin-bottom:2.5rem;padding:1.25rem 1.5rem;border:1px solid var(--line);border-radius:5px;}
.toc-box ul{margin:0;padding:0;list-style:none;}
.toc-box li{line-height:1.2;}
.toc-box li + li{margin-top:14px;}
.toc-box a{font-family:var(--head);font-size:1.05rem;text-decoration:none;}
.toc-box a[aria-current]{font-weight:700;}
.toc-box a:hover,.toc-box a:focus-visible{text-decoration:underline;text-underline-offset:.25em;}
.chapter{padding:2rem 0;scroll-margin-top:1rem;}
.chapter:last-child{padding-bottom:0;}
.chapter h2{margin:0 0 1rem;font-size:clamp(1.8rem,3vw,2.4rem);line-height:1.2;}
.chapter-photo{margin:0 0 1.5rem;}
.chapter-photo img{aspect-ratio:16/9;object-fit:cover;}
.chapter .prose b,.chapter .prose strong{font-weight:600;color:var(--blue);}
.people{display:grid;gap:2.5rem;grid-template-columns:repeat(auto-fill,minmax(14rem,1fr));margin:0;padding:0;list-style:none;}
.person-photo{display:block;width:7rem;aspect-ratio:1;margin-bottom:1rem;overflow:hidden;border-radius:50%;}
.person-photo img{display:block;width:100%;height:100%;object-fit:cover;}
.person-avatar .avatar-bg{fill:var(--page);}
.person-avatar .avatar-fig{fill:var(--blue);}
.person h3{margin:0 0 .1rem;font-size:1.25rem;}
.person-role{margin:0 0 .4rem;color:var(--muted);}
.person a,.person .email{display:block;overflow-wrap:anywhere;}
@media (min-width:1400px){
  .about-page{padding-inline:2rem;}
  .about-page .reading{grid-template-columns:minmax(13rem,1fr) minmax(0,48rem) minmax(13rem,1fr);column-gap:2.5rem;}
  .toc-box{position:sticky;top:2rem;justify-self:end;width:100%;max-width:16rem;margin:0;padding:25px 20px;}
  .toc-box li + li{margin-top:20px;}
  .about-page .reading-main{grid-column:2;}
}

/* 404: a large light number, headline, one sentence, one link */
.error-code{margin:0 0 .75rem;font-family:var(--head);font-weight:300;font-size:clamp(4rem,9vw,6.5rem);line-height:1;color:var(--blue);}
.error-page .page-title{font-size:clamp(2rem,3.4vw,2.75rem);}
.error-page .lead{max-width:none;font-size:clamp(1.15rem,1.6vw,1.4rem);}
.arrow-link{
  display:inline-flex;align-items:center;gap:.4rem;margin-top:2rem;padding-bottom:.15em;
  border-bottom:1.5px solid currentColor;font-family:var(--head);font-size:1.25rem;text-decoration:none;
}
.arrow-link:hover{color:var(--blue-dark);}
.arrow-link svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;}

/* admin event preview */
.event-preview-note{margin:0 0 2rem;}

/* ===== events: front page section and admin preview (owner's exception: hairlines between rows) ===== */
.events{list-style:none;margin:0;padding:0;}
.event-row{display:grid;grid-template-columns:9.5rem minmax(0,1fr) auto;gap:1.5rem;align-items:baseline;padding:1.6rem 0;}
.event-row:first-child{padding-top:0;}
.event-row:last-child{padding-bottom:0;}
.event-row + .event-row{border-top:1px solid var(--line);}
/* date column like the event strip on the news item, with the full month name;
   day, month and time each on their own line keep it narrow */
.event-when{font-family:var(--head);font-weight:700;line-height:1.1;color:var(--blue);}
.event-when time,.event-date,.event-day,.event-month,.event-time{display:block;}
.event-day{font-size:1.5rem;line-height:1.15;}  /* a step above the month, as big as the time */
.event-month{font-size:1.25rem;line-height:1.15;text-transform:uppercase;}
.event-time{margin-top:.4rem;font-weight:400;font-size:1.5rem;}
.event-repeat{display:block;margin-top:.35rem;font-weight:500;font-size:1.05rem;color:var(--muted);}
.event-body{min-width:0;}
.event-name{margin:0 0 .6rem;font-weight:400;font-size:1.6rem;line-height:1.25;color:var(--blue);}
.event-location{display:flex;align-items:flex-start;gap:.45rem;margin-top:.3em;color:var(--muted);font-size:1.05rem;line-height:1.35;}
.event-location .contact-icon{width:18px;height:18px;margin-top:.1em;}
.event-note{margin-top:1.1em;font-size:1.05rem;line-height:1.35;}
.event-note p{margin:0;}
.event-more{display:inline-block;margin-top:1em;font-size:1.05rem;font-weight:500;text-decoration:none;}
.event-more:hover{text-decoration:underline;}
.event-links{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.4rem;align-items:flex-start;}
.event-link{display:inline-flex;align-items:center;gap:.4rem;font-size:1.05rem;font-weight:500;line-height:1.35;text-decoration:none;}
.event-link:hover{text-decoration:underline;}
.event-link svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;}
/* medium widths: the calendar link shows only its icon (name kept for screen readers and as a tooltip) */
@media (min-width:860px) and (max-width:1099.98px){
  .event-row .event-link{padding:.4rem;margin:-.4rem;}
  .event-row .event-link svg{width:24px;height:24px;}
  .event-row .event-link-label{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;}
}
/* one column: day, month and time on one line, calendar links in a row */
@media (max-width:859.98px){
  .event-row{grid-template-columns:1fr;gap:.6rem;}
  .event-when time{display:flex;flex-wrap:wrap;gap:.15rem .6rem;align-items:baseline;}
  .event-day,.event-month{display:inline;}
  .event-time{margin:0 0 0 .4rem;font-size:1.25rem;}
  .event-links{flex-direction:row;flex-wrap:wrap;gap:.35rem 1.25rem;margin-top:.5rem;}
}

/* ===== contact: details left, form right ===== */
.contact-grid{display:grid;gap:2.5rem 4rem;}
@media (min-width:860px){.contact-grid{grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);align-items:start;}}
.front-contact h2{margin-bottom:1rem;}
.form-aux{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden;}
.contact-icon{width:20px;height:20px;flex:none;fill:none;stroke:var(--blue);stroke-width:1.6;}
.contact-list{list-style:none;margin:1.5rem 0 0;padding:0;display:flex;flex-direction:column;gap:1.25rem;}
.contact-list li{display:flex;align-items:center;gap:.65rem;}
.contact-board{margin-top:1.75rem;}
.contact-label{margin:0 0 .75rem;font-family:var(--head);font-size:1.25rem;font-weight:700;color:var(--blue);}
.contact-person{margin:0;line-height:1.5;}
.contact-person + .contact-person{margin-top:1.1rem;}
.contact-name{display:block;font-weight:500;margin-bottom:.15rem;}
.contact-line{display:flex;align-items:center;gap:.5rem;}
.contact-line .contact-icon{width:17px;height:17px;}
.form-note{margin-top:1.25rem;font-size:1rem;}

/* map (off until #22, see settings.MAP_ENABLED) */
.map{margin-top:2rem;}
.map-canvas{height:320px;overflow:hidden;background:var(--white);}
.map-note{margin:1rem 0 0;}
.map-note:empty{display:none;}
.leaflet-container{font-family:var(--sans);}
.leaflet-container a{color:var(--blue);}

/* ===== front page: hero carousel (docs/design.md section 8) ===== */
.hero-carousel{--hero-h:clamp(500px,42vw,580px);padding:0;}
.hero-slides{position:relative;height:var(--hero-h);}
.hero-slide{position:absolute;inset:0;overflow:hidden;}
.hero-slide[hidden]{display:none;}
.hero-slide.is-entering{animation:hero-fade .6s ease;}
@keyframes hero-fade{from{opacity:0;}to{opacity:1;}}
.slide-photo{position:absolute;inset:0;}
.slide-photo img{display:block;width:100%;height:100%;object-fit:cover;object-position:var(--focus,50% 50%);}

/* main slide: two-line heading, statement and buttons as one centred group in the middle
   of the slide. The photo is darkened evenly, just enough for the white text (heading 3:1,
   statement 4.5:1 on a bright sky); phones need more as the statement sits on the sky. */
.slide-main::before{content:"";position:absolute;inset:0;z-index:1;background:rgba(23,36,58,.5);}
.slide-main-text{
  position:absolute;z-index:2;inset:0;display:grid;align-content:center;justify-items:center;
  padding:3rem 5.5rem 5rem;text-align:center;
}
.slide-main h1{
  max-width:6em;margin:0 0 1.75rem;color:var(--white);font-weight:400;
  font-size:clamp(4rem,7.6vw,7.2rem);line-height:1.08;letter-spacing:-.02em;
  overflow-wrap:normal;text-wrap:balance;
}
.slide-main-text p{
  margin:0 0 2rem;max-width:40ch;color:var(--ice);
  font-family:var(--sans);font-weight:500;font-size:clamp(1.3rem,1.8vw,1.6rem);line-height:1.45;
}
.slide-main .button-row{justify-content:center;}
.slide-main .button{padding:1rem 2.1rem;font-size:1.3rem;}

/* poster slide: just a picture (event or campaign poster) filling the slide like a photo.
   Narrower screens crop its edges, so editors keep the text in the middle (help text). */
.slide-poster picture{position:absolute;inset:0;}
.slide-poster img{display:block;width:100%;height:100%;object-fit:cover;}

/* news slide: photo with a compact white box in the bottom-left corner */
.slide-news-box{
  position:absolute;z-index:2;left:0;bottom:0;width:min(500px,36%);
  padding:1.5rem 2rem 1.6rem 2.25rem;background:var(--panel);border-radius:0 44px 0 0;
}
.slide-news-box h2{margin:0 0 1rem;font-weight:500;font-size:clamp(1.4rem,1.7vw,1.6rem);line-height:1.25;}
/* same pill as "Loe edasi", inverted; a size smaller to suit the compact box */
.slide-news-box .button{padding:.6rem 1.2rem;font-size:1rem;}

/* controls: arrows bottom right, dots centred; white on photos, blue on white */
.carousel-controls{color:var(--white);}
.carousel-controls[hidden]{display:none;}
.carousel-dots{position:absolute;z-index:3;left:0;right:0;bottom:2rem;width:max-content;margin:0 auto;display:flex;gap:.25rem;}
.carousel-dot{display:grid;place-items:center;width:24px;height:24px;padding:0;border:0;background:none;color:inherit;cursor:pointer;}
.carousel-dot::before{content:"";width:14px;height:14px;border:1px solid currentColor;border-radius:50%;box-sizing:border-box;transition:background .15s ease;}
.carousel-dot[aria-current="true"]::before{background:currentColor;}
.carousel-arrows{position:absolute;z-index:3;right:2.5rem;bottom:1.5rem;display:flex;gap:8px;}
.carousel-arrow{
  display:grid;place-items:center;width:40px;height:40px;padding:0;
  border:1px solid currentColor;border-radius:50%;background:transparent;color:inherit;cursor:pointer;
  transition:background .15s ease;
}
.carousel-arrow:hover{background:rgba(255,255,255,.15);}
.carousel-arrow svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;}
.hero-carousel :focus-visible{outline-color:currentColor;}
.slide-main .button-light:focus-visible{outline-color:var(--white);}
/* a poster can have any colours: white-filled controls with a blue line show on all of them */
.hero-carousel[data-current="poster"] .carousel-controls{color:var(--blue);}
.hero-carousel[data-current="poster"] .carousel-arrow{background:var(--white);}
.hero-carousel[data-current="poster"] .carousel-arrow:hover{background:var(--ice);}
.hero-carousel[data-current="poster"] .carousel-dot::before{background:var(--white);}
.hero-carousel[data-current="poster"] .carousel-dot[aria-current="true"]::before{background:currentColor;}
.hero-carousel[data-current="poster"] .carousel-controls :focus-visible{box-shadow:0 0 0 8px var(--white);}

@media (max-width:1279.98px){
  .slide-news-box{width:min(400px,46%);padding:1.4rem 1.75rem 1.5rem 2rem;}
}
@media (max-width:859.98px){
  .hero-carousel{--hero-h:680px;}
  .slide-main::before{background:rgba(23,36,58,.6);}
  .slide-main-text{padding:2rem 1.5rem 4.5rem;}
  .slide-main h1{margin-bottom:1.25rem;font-size:min(4.75rem,17.5vw);}
  .slide-main-text p{font-size:1.25rem;}
  .slide-main .button-row{width:min(100%,20rem);flex-direction:column;align-items:stretch;}
  .slide-news .slide-photo{bottom:auto;height:calc(100% - 150px);}
  .slide-news-box{width:100%;padding:1.25rem 1.5rem 4rem;border-radius:32px 32px 0 0;}
  .slide-news-box h2{font-size:1.45rem;}
  .hero-carousel[data-current="news"] .carousel-controls{color:var(--blue);}
  .hero-carousel[data-current="news"] .carousel-arrow:hover{background:var(--ice);}
  .carousel-dots{bottom:1.5rem;}
  .carousel-arrows{right:1.25rem;bottom:1rem;}
  .carousel-arrow{width:36px;height:36px;}
}

/* ===== front page: corner photo (donation top-left, "Eesti Caritas" top-right)
   A rectangle flush with the panel's top and side edge (the panel clips the outer corner),
   one rounded inner corner like the news slide box. Sized in % of the panel (cqw). ===== */
.has-corner-photo{container-type:inline-size;--pw:38cqw;--ph:calc(var(--pw) / 1.66);}
.corner-photo{position:absolute;z-index:0;top:0;width:var(--pw);margin:0;}
.corner-photo.is-left{left:0;}
.corner-photo.is-right{right:0;}
.corner-photo img{display:block;width:100%;height:var(--ph);object-fit:cover;object-position:var(--focus,50% 50%);}
.corner-photo.is-left img{border-bottom-right-radius:44px;}
.corner-photo.is-right img{border-bottom-left-radius:44px;}
/* credit under the photo, kept off the panel edge by the text inset */
.corner-photo figcaption{margin:.4rem var(--inset) 0;}
.corner-photo.is-right figcaption{text-align:right;}
.corner-wave{display:none;}

/* donation (Trussell): photo top-left, text below it, Maksekeskus form on the right */
.donation{padding:0;}
.donation-grid{position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,560px);gap:0 4rem;padding-right:var(--inset);}
.donation-text{padding:4.5rem 0 4.5rem var(--inset);}
.has-corner-photo .donation-text{padding-top:calc(var(--ph) + 3.5rem);}
.donation-text p{font-size:1.15rem;}
.donation-form{display:flex;justify-content:flex-end;align-items:flex-start;padding:3.5rem 0 4rem;}
.donation-form > *{width:100%;max-width:560px;}
.bank-box{padding:1.5rem;border:1px solid var(--line);border-radius:6px;background:var(--panel);}
.donation-form .embed{background:var(--panel);}
/* The Maksekeskus card draws its border on the iframe's outermost pixels, which fractional
   zoom (e.g. Windows scaling) cuts off. Hide it under a 1px clip and draw the same border here. */
.donation-form .embed:has(iframe){overflow:hidden;border:1px solid rgba(0,0,0,.176);border-radius:6px;}
.donation-form .embed:has(iframe) iframe{margin:-1px -1px -2px!important;width:calc(100% + 2px)!important;}
.donation-form.is-bank{align-items:center;}

/* "Eesti Caritas": text left, photo top-right */
.about{padding:0;}
.about-text{position:relative;z-index:1;padding:4.5rem 0 4.5rem var(--inset);}
.has-corner-photo .about-text{
  width:calc(100cqw - var(--pw) - 3rem);
  min-height:calc(var(--ph) + 3rem);
}
.about-text .prose p{font-size:1.15rem;}
.about-text .button{margin-top:.5rem;}

@media (max-width:1279.98px){
  .donation.has-corner-photo{--pw:49cqw;}
  .donation-grid{grid-template-columns:minmax(0,1fr) minmax(0,460px);gap:0 3rem;}
}
/* the form needs a 520-600px column: below 1100px text and form stack */
@media (max-width:1099.98px){
  .donation-grid{grid-template-columns:1fr;padding-right:0;}
  .donation-text{padding:3rem var(--inset) 1rem;max-width:44rem;}
  .has-corner-photo .donation-text{padding-top:calc(var(--ph) + 3.5rem);}
  .donation-form{padding:1rem var(--inset) 3.5rem;justify-content:flex-start;}
  /* tablets and phones: full-width photo across the top of the panel, text below it */
  .has-corner-photo,.donation.has-corner-photo{--pw:100cqw;--ph:36cqw;}
  .corner-photo.is-left img,.corner-photo.is-right img{border-radius:0;}
  /* the site wave leads from the photo into the panel (1px overlap hides the seam) */
  .corner-photo .corner-wave{display:block;position:absolute;left:0;top:var(--ph);transform:translateY(calc(1px - 100%));fill:var(--panel);}
  .has-corner-photo .about-text{width:auto;min-height:0;padding:calc(var(--ph) + 3.5rem) var(--inset) 3.5rem;}
}
@media (max-width:859.98px){
  .has-corner-photo,.donation.has-corner-photo{--ph:62cqw;}
  .donation-form{padding-bottom:2.5rem;}
  .donation-form > *{max-width:none;}
  .has-corner-photo .about-text{padding:calc(var(--ph) + 3rem) var(--inset) 2.5rem;}
}

/* ===== front page: news ===== */
.front-news{padding-block:3.5rem;}
.front-news-grid{display:grid;gap:2.5rem;margin-bottom:2.5rem;}
.front-news-grid.is-single{max-width:40rem;}
.front-news h3{margin:0 0 .3rem;font-family:var(--head);font-weight:500;color:var(--blue);line-height:1.25;}
.front-news h3 a{color:inherit;text-decoration:none;}
.front-news h3 a:hover{text-decoration:underline;}
.front-news .meta{display:block;margin-bottom:.5rem;}
.front-news-featured .photo{margin-bottom:1.25rem;}
.front-news-featured .photo.is-default img{aspect-ratio:16/9;}
.front-news-featured h3{font-size:clamp(1.4rem,2vw,1.75rem);}
.front-news-featured p{margin:0;font-size:1.15rem;}
.front-news-list{display:flex;flex-direction:column;gap:1.75rem;margin:0;padding:0;list-style:none;}
.front-news-list li{--row:96px;display:flex;gap:1.25rem;align-items:flex-start;min-height:var(--row);}
/* side items: the photo has a fixed size and sets the row height; a long title makes
   its row taller, the photo stays as it is */
.front-news-list .photo{position:relative;flex:none;width:128px;height:var(--row);border-radius:16px;}
.front-news-list .photo img{position:absolute;inset:0;height:100%;object-fit:cover;}
.front-news-list h3{font-size:1.2rem;}
/* three side items when stacked or without JS; on wide screens site.js shows as many as fit */
.front-news-list li:nth-child(n+4){display:none;}
.front-news-list.is-fitted li:not([hidden]){display:flex;}
@media (min-width:1100px){
  .front-news-grid:not(.is-single){grid-template-columns:1.35fr 1fr;gap:3.5rem;align-items:start;}
}
/* below 1100px the featured photo spans the column, cropped a little to 2:1 */
@media (max-width:1099.98px){
  .front-news-grid.is-single{max-width:none;}
  .front-news-featured .photo img{aspect-ratio:2/1;height:auto;object-fit:cover;}
}
@media (max-width:639.98px){
  .front-news-list .photo{width:96px;border-radius:14px;}
  .front-news-list .photo.is-default img{scale:1;}  /* square tile: the whole logo must fit */
  .front-news-list h3{font-size:1.1rem;}
}
