/* ABF Åland public stylesheet, written from scratch on 27 October 2026 (FINAL_PLAN section 4). One file, one place per
   page part, in this order: 1 colours, spacing and type, 2 page width, 3 header, menu and footer, 4 rainbow and ribbon,
   5 title block, 6 shared parts, 7 one short section per page. Breakpoints: 37.5em (600 px), 75em (1200 px), the menu at
   67.5625em (1081 px, the same value as site.js) and the homepage hero at 64em (1024 px, G3 A4). They are in em, so a
   larger browser text size moves them.
   The admin keeps admin.css and the editor editor-examples.css. */

/* 1. Colours, spacing and type ------------------------------------------------------------------------------------- */

/* Subsets as Google Fonts splits them, with the unused width axis pinned at 100. The latin file is the one every page
   loads; latin-ext is fetched only for text that needs it. Declared first, so latin wins overlaps. */
@font-face{font-family:'Nunito Sans';src:url('/assets/fonts/nunitosans-latin-ext.woff2') format('woff2');font-style:normal;font-weight:200 1000;font-display:swap;unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Nunito Sans';src:url('/assets/fonts/nunitosans-latin.woff2') format('woff2');font-style:normal;font-weight:200 1000;font-display:swap;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Nunito Sans';src:url('/assets/fonts/nunitosans-other.woff2') format('woff2');font-style:normal;font-weight:200 1000;font-display:swap;unicode-range:U+0370-03FF,U+0400-052F}

:root{
  --red:#e31521;--red-dark:#b5121b;--ink:#111115;--muted:#51515a;--focus:#164e82;
  --blue:#3d95e2;--mint:#5ec5b4;--lavender:#c9bbf4;
  --paper:#fafaf7;--white:#fff;--line:#dcdcd6;
  --card:#f5f8fb;--card-line:#d5dce2;--file:#d9e9f8;--file-ink:#174d76;--picture:#eef3f7;
  --tint-red:#fde5e3;--tint-peach:#fdeee6;--tint-blue:#e0eefb;--tint-green:#e7efea;
  /* Fix round 3, A6: every band and the footer share --band-blue; mint and lavender stay for picture placeholders. */
  --band-blue:#e4eef8;--band-mint:#e6f2ed;--band-lavender:#f0ecfb;
  --s1:8px;--s2:16px;--s3:24px;--s4:32px;--s5:48px;--s6:64px;--s7:96px;--s8:128px;--s9:160px;
  --page:1360px;--gutter:20px;--measure:33.75em;--radius:14px;--radius-small:8px;
  --text:1.0625rem;
  --font:'Nunito Sans',Arial,sans-serif;
  --ease:cubic-bezier(.16,1,.3,1);
  /* Round 6: the card edge, and the one shadow a card gets when it rises on hover. */
  --card-edge:#c5cfd8;--lift:0 18px 34px -18px rgb(23 35 44 / .38);
  /* Round 6c: the space between blocks, between sections and inside bands, by screen size (phone values here). */
  --gap-block:32px;--gap-section:56px;--band-pad:40px;
  --mint-ink:#2a8c7c;
  /* The brand stripe: blue, mint and lavender in thirds (band tops, the open menu, photos beside text, the Om ABF card). */
  --rainbow:linear-gradient(90deg,var(--blue) 0 33.3%,var(--mint) 0 66.6%,var(--lavender) 0);
  /* Round 21: the one shadow of a card that stands on a photo or band (the Om ABF card). */
  --raise:0 28px 56px -32px rgb(23 35 44 / .42);
}
@media (width >= 37.5em){:root{--gutter:28px;--text:1.125rem;--gap-block:40px;--gap-section:72px;--band-pad:56px}}
@media (width >= 75em){:root{--gutter:32px;--gap-block:48px;--gap-section:96px;--band-pad:64px}}

/* Round 13: between public pages the old page fades out and the new one fades in, rising 10 px; the header stays put.
   Chrome dropped the fade ("opt-in disabled") on about half the clicks when the next page was shown while its deferred
   scripts were still loading, so the public layout's scripts hold the first frame (blocking="render"). Reduced motion
   turns the animation off. The editor's preview opts out (no-page-transition.css). Browsers without view transitions
   simply load the page. */
@view-transition{navigation:auto}
@media (prefers-reduced-motion: reduce){::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none!important}}
::view-transition-old(root){animation:page-out .2s ease-out both}
::view-transition-new(root){animation:page-in .38s cubic-bezier(.16,1,.3,1) both}
@keyframes page-out{to{opacity:0}}
@keyframes page-in{from{opacity:0;transform:translateY(10px)}}
.site-header{view-transition-name:site-header}

*,*::before,*::after{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
html.menu-open,html.image-open{overflow:hidden}
/* A word that does not fit its line breaks with a hyphen, by the page's language (G3 round 2); headings, the hero text,
   buttons, chips and the menu never do. */
body{margin:0;background:var(--paper);color:var(--ink);font:400 var(--text)/1.6 var(--font);overflow-wrap:break-word}
main{display:block;container-type:inline-size;overflow-x:clip}
main:focus{outline:none}
img,svg,video,iframe{max-width:100%}
img{height:auto}
/* Round 21: the interaction family. Every text link answers the same way, mouse and keyboard alike: its underline
   thickens and moves in to the words, and a red link turns ink. Links without an underline (menu, tabs, cards, buttons,
   rows) have their own state where they are styled, always on :hover and :focus-visible together. */
a{color:inherit;text-decoration-thickness:1px;text-underline-offset:.24em;transition:text-decoration-thickness .2s ease-out,text-underline-offset .2s ease-out,color .2s ease-out,background-size .35s var(--ease)}
a:is(:hover,:focus-visible){text-decoration-thickness:2px;text-underline-offset:.14em}
:is(.prose a:not(.button),.section-heading>a,.section-heading-actions>a,.text-link,.historical-link,.example-jumps a,.map-link a,.calendar-block a,.contact-actions a,.film-note a,.canva-poster figcaption a,.gallery-grid figcaption a,.archive-pages a,.member-find a,.about-documents-more a:not(.button),.search-suggestions a,.search-suggestion a,.return-home a,.cookie-notice a,.project-links a,.library-filters a,.page-title-label a):is(:hover,:focus-visible){color:var(--ink)}
a[href^="mailto:"],a[href^="tel:"]{overflow-wrap:anywhere}
button,input,select,textarea{font:inherit}
button{color:inherit;cursor:pointer}
h1,h2,h3,h4,p,figure,blockquote,dl,dd{margin:0}
h1,h2,h3,h4{font-weight:800;line-height:1.15;letter-spacing:-.025em;text-wrap:balance;overflow-wrap:break-word}
h2{font-size:clamp(1.75rem,1.2rem + 1.5vw,2.25rem)}
h3{font-size:1.375rem}
ul,ol{margin:0}
:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.skip-link{position:absolute;left:8px;top:8px;z-index:60;padding:12px 16px;background:var(--white);font-weight:800;transform:translateY(-200%)}
.skip-link:focus{transform:none}
.honeypot{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden;overflow-wrap:normal}

/* 2. Page width: header, content and footer share one container and one left and right edge (S1) ------------------- */

.header-inner,.inner-content,.homepage-content,.footer-inner,.footer-bottom,.about-band-inner,.newsletter-band-inner{width:min(var(--page),100% - 2 * var(--gutter));margin-inline:auto}
/* One 96 px step from the last section to the footer: the footer's own margin (G3 A8). */
.inner-content{padding:var(--s3) 0 0}
.inner-content>*+*{margin-top:var(--gap-block)}
/* Round 8: a section that follows a section is one section step below it on every page, whether the page groups its
   sections (.family-sections) or not. The title, its tabs and a search form stay one block step apart. */
.inner-content>:is(section,div)+:is(section,div){margin-top:var(--gap-section)}

/* 3. Header, menu and footer (S7, S9) ---------------------------------------------------------------------------- */

.site-header{position:relative;z-index:20;background:var(--paper);border-bottom:1px solid var(--line)}
.header-inner{display:flex;flex-wrap:wrap;align-items:center;gap:12px;min-height:72px}
.site-logo{flex:none;line-height:0}
.site-logo img{display:block;width:104px;height:39px}
.header-utilities{display:flex;align-items:center;gap:var(--s1);margin-left:auto}
.language-switch{display:inline-flex;align-items:center;gap:5px;min-height:44px;font-size:.875rem;white-space:nowrap;text-decoration:none}
.search-link{display:grid;place-items:center;min-width:44px;min-height:44px}
@media (width < 25em){
  .header-inner{gap:8px}
  .site-logo img{width:92px;height:35px}
  .header-utilities{gap:2px}
}
@media (width < 22.5em){.header-utilities .search-link{display:none}}
.menu-toggle:not([hidden]){display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:8px 14px;position:relative;z-index:50;background:var(--white);border:1px solid var(--line);border-radius:8px;font-weight:800}
.menu-toggle[aria-expanded="true"]{background:var(--ink);border-color:var(--ink);color:var(--white)}
.menu-toggle path{transform-box:fill-box;transform-origin:center;transition:transform .25s var(--ease),opacity .2s}
.menu-toggle[aria-expanded="true"] .menu-line-top{transform:translateY(5px) rotate(45deg)}
.menu-toggle[aria-expanded="true"] .menu-line-middle{opacity:0}
.menu-toggle[aria-expanded="true"] .menu-line-bottom{transform:translateY(-5px) rotate(-45deg)}
.nav-list{display:flex;flex-direction:column;margin:0;padding:0;list-style:none}
.nav-item{position:relative}
.nav-item>a{position:relative;display:inline-flex;align-items:center;min-height:44px;font-weight:800;text-decoration:none}
.nav-item>a::after{content:'';position:absolute;left:0;right:0;bottom:5px;height:3px;background:var(--red);transform:scaleX(0);transform-origin:left;transition:transform .15s ease-out}
.nav-item>a:is(:hover,:focus-visible)::after,.nav-item.is-current>a::after{transform:scaleX(1)}
.nav-sub{margin:0;list-style:none}
.nav-sub a{display:flex;align-items:center;min-height:44px;text-decoration:none}
.nav-sub-toggle{display:none}
.nav-chevron{transition:transform .2s var(--ease)}
.has-sub.is-open .nav-chevron{transform:rotate(180deg)}
.menu-contact{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s3);margin-top:var(--s4);padding-top:var(--s4);border-top:1px solid var(--line)}
.menu-actions{display:flex;flex-wrap:wrap;gap:12px}
.menu-actions a{display:inline-flex;align-items:center;gap:8px;min-height:48px;padding:10px 18px;border-radius:var(--radius-small);background:var(--red);color:var(--white);font-weight:800;text-decoration:none;transition:background-color .2s ease-out}
.menu-actions a:is(:hover,:focus-visible){background:var(--red-dark)}
.menu-contact address{font-style:normal}
.menu-utilities{display:flex;flex-wrap:wrap;gap:var(--s3)}
.menu-utilities a{display:inline-flex;align-items:center;min-height:44px;font-weight:800}
.icon{width:22px;height:22px;flex:none}

/* Phones and tablets: with scripting the menu is a full-screen panel with every page open; without it, a plain list. */
.site-navigation{flex:1 0 100%;padding-bottom:var(--s3)}
.site-navigation .nav-item{border-top:1px solid var(--line)}
.site-navigation .nav-item>a{font-size:1.5rem;padding:10px 0}
.site-navigation .nav-sub{margin:0 0 var(--s2);padding:0 0 0 var(--s2)}
.site-navigation .nav-sub a{font-size:1.125rem;font-weight:400;min-height:48px}
.site-navigation .nav-sub a[aria-current]{color:var(--red-dark);font-weight:800}
@media (scripting: enabled) and (width < 67.5625em){
  .site-navigation:not(.menu-open){display:none}
  .site-navigation.menu-open{position:fixed;inset:0;z-index:40;overflow-y:auto;padding:72px var(--gutter) 20px;background:var(--paper)}
  /* Round 7: Om ABF and Möjligheter open their pages as dropdowns from the arrow, so the whole menu fits the screen. */
  .site-navigation .nav-item{display:flex;flex-wrap:wrap;align-items:center}
  .site-navigation .nav-item>a{flex:0 1 auto;margin-right:auto;min-height:48px;padding:2px 0;font-size:1.3125rem}
  .site-navigation .nav-sub-toggle:not([hidden]){display:grid;place-items:center;width:48px;height:48px;margin-right:-12px;padding:0;border:0;border-radius:var(--radius-small);background:none;color:var(--ink)}
  .site-navigation .nav-sub-toggle:is(:hover,:focus-visible){background:var(--band-blue)}
  .site-navigation .nav-chevron{width:22px;height:22px}
  .site-navigation .has-sub:not(.is-open)>.nav-sub{display:none}
  .site-navigation .nav-sub{flex:1 0 100%;margin:0 0 10px}
  .site-navigation .nav-sub a{min-height:44px;font-size:1.0625rem}
  .menu-contact{display:flex;flex-wrap:wrap;align-items:center;gap:10px 20px;margin-top:var(--s2);padding-top:var(--s3)}
  .menu-actions{flex:1 0 100%}
  .menu-contact .social-links{order:1}
  .menu-utilities{gap:4px var(--s3)}
  .site-navigation.menu-open::before{content:'';position:fixed;top:0;left:0;right:0;height:5px;background:var(--rainbow)}
}
@media (width >= 37.5em){
  .header-inner{gap:var(--s3)}
  .site-logo img{width:130px;height:49px}
  .header-utilities{gap:var(--s2)}
}
@media (width >= 67.5625em){
  .menu-toggle:not([hidden]),.menu-contact{display:none}
  .site-navigation{flex:0 1 auto;margin-left:auto;padding:0}
  .header-utilities{margin-left:8px}
  .nav-list{flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px 26px}
  .site-navigation .nav-item{display:flex;align-items:center;border:0}
  .site-navigation .nav-item>a{font-size:1.0625rem;padding:8px 0}
  .nav-sub-toggle:not([hidden]){display:grid;place-items:center;width:26px;min-height:44px;padding:0;border:0;background:none}
  .site-navigation .nav-sub{position:absolute;top:calc(100% - 4px);left:-12px;z-index:30;display:none;min-width:250px;margin:0;padding:8px;background:var(--white);border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 8px 20px #00000013}
  .has-sub:is(:hover,:focus-within,.is-open):not(.is-closed)>.nav-sub{display:block}
  .site-navigation .nav-sub a{padding:8px 12px;border-radius:6px;font-size:1.0625rem;font-weight:800}
  .site-navigation .nav-sub a:is(:hover,:focus-visible),.site-navigation .nav-sub a[aria-current]{margin:0;padding-left:12px;border:0;background:#f5eeee}
}

.site-footer{position:relative;margin-top:var(--gap-section);padding:var(--band-pad) 0 calc(var(--s4) + var(--cookie-space, 0px));background:var(--band-blue)}
main:has(>.inner-content>.bleed:last-child,>.inner-content>:last-child>.bleed:last-child,>.newsletter-band:last-child)+.site-footer{margin-top:0}
.site-footer::before,.newsletter-band::before{content:'';position:absolute;top:0;left:0;right:0;height:5px;background:var(--rainbow);transform-origin:left}
.footer-inner{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s4)}
.footer-inner h2{margin-bottom:8px;font-size:1.125rem;font-weight:800;letter-spacing:-.02em}
.footer-inner>div>a{display:flex;align-items:center;min-height:32px;font-size:1rem}
.footer-inner p{margin-top:8px;font-size:1rem;line-height:1.6}
.footer-organisation{display:block;font-size:.8125rem;color:var(--muted)}
/* Round 17: the copyright line with the site's maker under it. */
.footer-legal{display:grid;gap:4px;justify-items:end;text-align:right}
.footer-credit{font-size:.875rem;color:var(--muted)}
.footer-credit a{color:var(--ink);font-weight:700}
.footer-funding img{display:block;width:230px}
.footer-bottom{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--s2);margin-top:var(--gap-block);padding-top:var(--s3);border-top:1px solid var(--line);font-size:.9375rem}
.social-links{display:flex;gap:var(--s1);margin:0;padding:0;list-style:none}
.social-links a{display:grid;place-items:center;width:44px;height:44px;border:1px solid var(--card-edge);border-radius:50%;background:var(--white);transition:background-color .2s ease-out,color .2s ease-out,border-color .2s ease-out,transform .25s var(--ease)}
.social-links a:is(:hover,:focus-visible){background:var(--ink);border-color:var(--ink);color:var(--white);transform:translateY(-2px)}
@media (width >= 37.5em){.footer-inner{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (width >= 75em){.footer-inner{grid-template-columns:1.3fr 1fr 1fr 1fr}}

/* 4. Rainbow and ribbon (section 3, R15, R25) ---------------------------------------------------------------------- */

/* The homepage hero is one picture drawn at 1366 x 447 px: rainbow, photo and text. From 1024 px it is that picture
   scaled to the screen width (1cqw = 1/100 of the hero width; G3 A4). Below 1024 px the text comes first and the right
   part of the picture follows: up to 756 px wide the part from x 610 scaled to the screen width, wider than that the
   picture at its own 1366 size, showing more of the bands to the left, so it is never enlarged and the bands still run
   off both screen edges. The drawing is never stretched (no preserveAspectRatio). */
.hero{position:relative;container-type:inline-size}
.hero-copy{width:min(var(--page),100% - 2 * var(--gutter));margin-inline:auto;padding-top:18px}
.hero h1{font-size:clamp(2.625rem,1.75rem + 3.2vw,3.75rem);font-weight:800;line-height:1.07;letter-spacing:-.035em}
.hero h1 span{display:block}
.hero-copy>p{max-width:34em;margin-top:15px;font-size:1rem;line-height:1.45}
/* Fix round 3, A3: a 2 px ring in the page colour, so the red edge never darkens where it crosses the blue band. */
.hero-button{margin-top:14px;box-shadow:0 0 0 2px var(--paper)}
.hero-button:hover{box-shadow:0 0 0 2px var(--paper),0 10px 18px -10px rgb(181 18 27 / .75)}
/* 10 Nov (Jonathan: the rainbow must not touch the line under the people): the stage is 14 units taller than the
   rainbow drawing (461 against 447), so the lilac band ends 8 units above the 6 px line. The drawing keeps its size. */
/* 1 Dec (Jonathan): the rainbow's right part is 40 units lower, so there is less room over the heads on the right.
   Below 1024 px that would add 40 units of empty page between the button and the bands, so the art starts that
   much higher there (40 units are 5.291cqw of the 180.688cqw stage and 7.028cqw of the phone's 240cqw stage). */
.hero-art{position:relative;overflow:hidden;height:min(60.979cqw,461px);margin-top:calc(40px - min(5.291cqw,40px))}
.hero-stage{position:absolute;top:0;right:0;width:min(180.688cqw,1366px);height:100%}
.hero-sky{position:absolute;inset:0}
.hero-rainbow,.hero-room-edge{position:absolute;top:0;left:0;width:100%;height:auto}
/* 1 Dec (Jonathan): the people stand in a room. The room is the stage's backdrop from x 150 (89.02% of the stage) and
   keeps its top edge. .hero-room-edge, drawn over it, is the page colour above the lilac band and fades out below it,
   so the room shows only below the bands at every width, with no clip path, and fades to the page colour as it nears
   them. The room also starts soft on its left, over its first 170 units, where the lilac band lies 8 units above the bottom line.
   The room starts 40 units (8.68%) below the stage's top: the rainbow's right part was lowered by that much the same
   day, and the room keeps its place under the bands. In the intro the room is not part of the rainbow wipe: it fades in with the people (see the intro rules below). */
.hero-room{position:absolute;top:8.68%;right:0;width:89.02%;height:100%;object-fit:cover;object-position:50% 0;-webkit-mask-image:linear-gradient(90deg,transparent 1.6%,#000 15.6%);mask-image:linear-gradient(90deg,transparent 1.6%,#000 15.6%)}
/* Round 21 (ABF asked for a picture showing more diversity; Jonathan: separate pictures that come in one at a time):
   the people as three cut-outs standing in a row at the stage's right edge, never wider than the screen. The pieces
   overlap by the same 90 units, the reading pair behind the other two, and their lower edge sits on the stage's bottom
   edge, where the blue events band starts. Round 22 (Mia: "en tonåring eller två"): two teenagers replace the man with
   the notebook, scaled so their heads match the others (about 230 units from hair to chin). Walkthrough 19 Nov: the
   teenagers talk with their heads up (piece 4). Positions are shares of the row: 2439 units wide, 921 high. */
.hero-photo{position:absolute;z-index:1;right:0;bottom:0;width:min(56%,100cqw);aspect-ratio:2439/921}
.hero-piece{position:absolute;bottom:0;display:block;height:auto}
/* Jonathan's pick, 10 Nov: the site's three-colour line runs in front of the people's lower edge, so they stand behind
   it, on the blue events band (--band-blue was made one step stronger the same day, so the band shows on any screen). */
.hero-art::after{content:'';position:absolute;z-index:2;left:0;right:0;bottom:0;height:6px;background:var(--rainbow);pointer-events:none}
.piece-1{z-index:1;left:0;width:38.46%}
.piece-2{left:34.77%;width:33.01%}
.piece-4{z-index:1;left:64.08%;width:35.92%}
/* On phones the stage is 240% of the screen, so the bands stay large. The row is one screen wide and shows the coffee
   pair and the teenagers (1724 units wide), so the faces stay large enough to read; the reading pair is left out there
   and, being lazy, never loads. */
@media (width < 37.5em){.hero-art{height:min(80.995cqw,461px);margin-top:calc(40px - min(7.028cqw,40px))}.hero-stage{width:min(240cqw,1366px)}.hero-photo{aspect-ratio:1724/921}.piece-1{width:54.41%}.piece-4{left:49.19%;width:50.81%}.piece-2{display:none}}
@media (width >= 64em){
  /* Fix round 3, A1: the text starts at the content edge, the logo's edge, and is sized in --hu: 1cqw (the picture's
     scale) up to the 1366 size, then at most 1.25 times that, reached between 1700 and 2560 px. Measured: any larger
     sooner and the paragraph runs into the blue band. The button keeps the shared 44 px height and padding. */
  .hero-copy{--hu:min(1cqw,clamp(13.66px,6.91px + .3971cqw,17.075px));position:absolute;z-index:2;left:max(var(--gutter),(100% - var(--page)) / 2);top:calc(2.3426 * var(--hu));width:auto;margin:0;padding:0}
  .hero h1{max-width:calc(60.761 * var(--hu));font-size:calc(5.1 * var(--hu));line-height:1.02}
  .hero-copy>p{max-width:calc(28.917 * var(--hu));margin-top:calc(1.0981 * var(--hu));font-size:calc(1.2445 * var(--hu))}
  .hero-button{margin-top:calc(1.0981 * var(--hu));font-size:calc(1.3177 * var(--hu))}
  .hero-art{height:auto;aspect-ratio:1366/461;margin-top:0}
  .hero-stage{width:100%}
}
/* Intro, timed as approved on 26 October: rainbow wipe 2.2 s; heading from 0.4 s; text and button from 0.6 s; the three
   people pieces from 0.6 s, 150 ms apart. intro.js sets the classes; none with reduced motion. 1 Dec (Jonathan): the
   wipe is the rainbow's alone, so the eye follows it; the room fades in from 0.6 s, as the people come up. The room's
   fade hangs on .intro-ready, which goes at 1.7 s, not on .sky-intro (2.6 s): a browser counts a picture as shown only
   once its fade is over, and the room is the page's largest picture, so the later class cost 0.9 s of measured load. */
@media (prefers-reduced-motion: no-preference){
  .sky-intro .hero-rainbow{animation:sky-wipe 2.2s cubic-bezier(.45,0,.25,1) both}
  .intro-ready .hero-room{animation:room-in 1.05s ease .6s both}
  .intro-ready .hero h1{animation:hero-reveal 1s var(--ease) .4s both}
  .intro-ready .hero-copy>p,.intro-ready .hero-button{animation:hero-reveal 1s var(--ease) .6s both}
  .intro-ready .hero-piece{animation:people-rise .6s var(--ease) .6s both}
  .intro-ready .piece-2{animation-delay:.75s}
  .intro-ready .piece-4{animation-delay:.9s}
}
@keyframes sky-wipe{from{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0)}}
@keyframes hero-reveal{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@keyframes people-rise{from{opacity:0;transform:translateY(65px)}to{opacity:1;transform:none}}
@keyframes room-in{from{opacity:0}}

/* The ribbon under page titles: the 1366 px ribbon (lines 13 px) scaled to the screen width from 1200 px, and its middle
   part at the 1366 size below that. It runs off both screen edges. */
.brand-ribbon{display:block;width:100cqw;max-width:none;height:auto;margin-inline:calc(50% - 50cqw)}
@media (width < 75em){.brand-ribbon{width:1366px;margin-inline:calc(50% - 683px)}}
@media (prefers-reduced-motion: no-preference){
  .brand-ribbon{-webkit-mask-image:linear-gradient(90deg,#000 42%,transparent 55%);mask-image:linear-gradient(90deg,#000 42%,transparent 55%);-webkit-mask-size:240% 100%;mask-size:240% 100%;animation:sweep-in 1.6s cubic-bezier(.45,0,.25,1) both}
  .site-navigation.menu-open::before{animation:stripe-in .9s var(--ease) both}
}
@keyframes sweep-in{from{-webkit-mask-position:100% 0;mask-position:100% 0}to{-webkit-mask-position:0 0;mask-position:0 0}}
@keyframes stripe-in{from{transform:scaleX(0)}}
/* Round 21, the motion language (site.js marks what starts below the first screen with data-reveal and adds .is-revealed
   as it comes into view; once arrived, both go and the element is back to its own styles). Transform and opacity only.
   Nothing is marked without scripts, without IntersectionObserver or with reduced motion, and print shows everything.
   - heading: a section's heading settles the last few pixels into place, so the eye finds where a new topic starts.
   - item: the items of a row (cards, steps, facts, photos, logos) arrive one after another, so they read as one set.
   - photo: a photo beside text opens from behind a curtain and settles from a slight zoom: the picture lands first.
   - stripe: the rainbow stripe on a band draws itself from the left, tying one band to the next. */
@media screen and (prefers-reduced-motion: no-preference){
  [data-reveal="heading"]{opacity:0;transform:translateY(16px)}
  [data-reveal="item"]{opacity:0;transform:translateY(24px)}
  [data-reveal].is-revealed{opacity:1;transform:none;transition:opacity .6s var(--ease) calc(var(--order,0) * 70ms),transform .75s var(--ease) calc(var(--order,0) * 70ms)}
  [data-reveal="photo"]{isolation:isolate}
  [data-reveal="photo"]::after{content:'';position:absolute;inset:0;z-index:2;background:var(--picture);transform-origin:50% 0;pointer-events:none}
  [data-reveal="photo"] img{transform:scale(1.12)}
  [data-reveal="photo"].is-revealed::after{transform:scaleY(0);transition:transform .85s cubic-bezier(.7,0,.2,1)}
  [data-reveal="photo"].is-revealed img{transform:none;transition:transform 1.4s var(--ease)}
  :is([data-reveal="stripe"],[data-reveal="photo"])::before{transform:scaleX(0)}
  :is([data-reveal="stripe"],[data-reveal="photo"]).is-revealed::before{transform:none;transition:transform 1s var(--ease) .15s}
}

/* 5. Title block (S6): menu-section label, title, one lead line, optional button, optional picture, ribbon below ----- */

.page-title{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s3) var(--s6);align-items:center;padding-top:var(--s2)}
.page-title-copy{container:title/inline-size}
.page-title-label{margin-bottom:4px;color:var(--red-dark);font-weight:800}
/* Round 8: a 44 px tap area that takes no room: the padding is given back by a negative margin. */
.page-title-label a{display:inline-block;padding-block:10px;margin-block:-10px;text-decoration:none}
.page-title-label a:is(:hover,:focus-visible){text-decoration:underline 2px;text-underline-offset:.14em}
.page-title h1{max-width:22ch;font-size:min(clamp(2.625rem,2.036rem + 2.418vw,4.25rem),13.5cqi);line-height:1.04}
.page-title-lead{max-width:var(--measure);margin-top:var(--s2);font-size:1.125rem;line-height:1.5}
.page-title-action{margin-top:var(--s3)}
.page-title-art{display:flex;justify-content:center}
.page-title-art>img{display:block;width:auto;max-height:240px;object-fit:contain}
.page-title-art .family-photo{width:100%}
.page-title-art .family-photo img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:var(--radius)}
.page-title>.brand-ribbon{grid-column:1/-1}
.page-title.has-wide-art .family-photo img{aspect-ratio:21/9}
/* Fix round 3, A8: a title block without a photo is centred (an event post's title stays left, beside its poster). */
/* Round 9: every page title is centred, its label right above it and its button right below, beside a photo too. */
:not(.post-content)>.page-title .page-title-copy{text-align:center}
:not(.post-content)>.page-title :is(h1,.page-title-lead){margin-inline:auto}
@media (width >= 37.5em){
  .page-title.has-art:not(.has-wide-art){grid-template-columns:minmax(0,1fr) minmax(0,.78fr)}
  .page-title-lead{font-size:1.25rem}
  .page-title-art>img{max-height:300px}
}
/* 1 Dec (Jonathan): beside a picture the ribbon is a sweep. It starts high on the left, right under the title's text,
   and runs down under the picture; its bands are thicker on the left (sweep_ribbon in page-heading.php). The drawing is
   as wide as the screen and its left end is 150 units higher than its right end. Title and picture both stand on the
   block's bottom line, so the text ends right above the high end and the picture right above the low end at every
   width. Below 600 px title and picture stack, and the ordinary ribbon stays. Screens only: print has no ribbon. */
.brand-ribbon--sweep{display:none}
@media screen and (width >= 37.5em){
  .ribbon-sweep{position:relative;isolation:isolate}
  .ribbon-sweep>.brand-ribbon:not(.brand-ribbon--sweep){display:none}
  .ribbon-sweep>.brand-ribbon--sweep{display:block;position:relative;z-index:-1;width:100cqw;margin-inline:calc(50% - 50cqw);margin-top:calc(-150 / 1366 * 100cqw)}
  .ribbon-sweep>:is(.page-title-copy,.page-title-art){align-self:end}
  .ribbon-sweep>.page-title-copy{padding-bottom:calc(150 / 1366 * 100cqw)}
}

/* 6. Shared parts ------------------------------------------------------------------------------------------------ */

/* Buttons: red with white text. A second action next to a button is a text link (the material page's look). */
.button,.library-filters button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:9px 20px;border:0;border-radius:var(--radius-small);background:var(--red);color:var(--white);font-weight:800;line-height:1.15;text-align:center;text-decoration:none;overflow-wrap:anywhere;transition:background-color .2s ease-out,transform .25s var(--ease),box-shadow .25s var(--ease)}
.button:is(:hover,:focus-visible),.library-filters button:is(:hover,:focus-visible){background:var(--red-dark);transform:translateY(-2px);box-shadow:0 10px 18px -10px rgb(181 18 27 / .75)}
.button:active{transform:translateY(0) scale(.98);box-shadow:none}
/* Round 6: a file's download in a list is an outlined button, so a page of documents is not a wall of red. Round 21:
   the second action beside a red button is the same outlined button (it was a loose underlined link). */
.button.button-secondary,.library-actions a:last-child,.colour-band-actions a:not(.button){display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:7px 18px;border:2px solid var(--red-dark);border-radius:var(--radius-small);background:var(--white);color:var(--red-dark);font-weight:800;line-height:1.15;text-align:center;text-decoration:none;overflow-wrap:anywhere;transition:background-color .2s ease-out,color .2s ease-out,transform .25s var(--ease)}
.button.button-secondary:is(:hover,:focus-visible),.library-actions a:last-child:is(:hover,:focus-visible),.colour-band-actions a:not(.button):is(:hover,:focus-visible){background:var(--red-dark);color:var(--white);transform:translateY(-2px);box-shadow:0 10px 18px -10px rgb(181 18 27 / .75)}
.text-link,.library-filters a,.historical-link{display:inline-flex;align-items:center;min-height:44px;padding:0;background:none;color:var(--red-dark);font-weight:800;text-decoration:underline}

/* Running text (S3): paragraphs and real lists at reading width, links in the dark red. */
.prose{overflow-wrap:break-word}
:is(.prose,.reading-body)>:is(p,h2,h3,h4,ul:not([class]),ol:not([class]),blockquote,table,dl){max-width:var(--measure)}
:is(.prose,.reading-body)>*+*{margin-top:1em}
:is(.prose,.reading-body)>h2{margin-top:1.5em}
.prose h3{margin-top:1.4em;font-size:1.25rem}
:is(.prose,.reading-body)>h2+*{margin-top:var(--s3)}
/* Round 8: a box starts and ends at its content. A first or last child's outer margin would add hidden space where the
   box is a grid or flex cell, since margins do not collapse out of those. */
:is(.prose,.reading-body,.family-section,.fund-section,.colour-band-copy,.text-aside>*)>:first-child{margin-top:0}
:is(.prose,.reading-body,.family-section,.fund-section,.colour-band-copy,.text-aside>*)>:last-child{margin-bottom:0}
.prose :is(ul,ol):not([class]){padding-left:1.3em}
.prose li+li{margin-top:.35em}
/* Items of a row inside running text start on one line (round 6b). */
.prose :is(.goal-steps,.icon-list,.grid,.plain-columns)>li+li{margin-top:0}
.prose li::marker{color:var(--red-dark)}
.prose a:not(.button){color:var(--red-dark);font-weight:800}
.prose img{border-radius:8px}
.prose table{width:100%;border-collapse:collapse;font-size:1rem}
.prose th,.prose td{padding:6px 10px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
.prose blockquote{padding:var(--s2) var(--s3);border-radius:var(--radius-small);background:var(--band-blue)}

/* Forms */
input[type="search"],input[type="email"],input[type="text"],select{width:100%;min-height:50px;padding:10px 14px;border:1px solid #7a7f86;border-radius:var(--radius-small);background:var(--white);color:#000;font-size:1.0625rem}
.form-row label,.site-search-form label,.archive-search label,.member-find label,.library-filters label{display:block;margin-bottom:6px;font-weight:800}
.search-fields,.archive-search>div,.member-find>div{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.search-fields input,.archive-search input,.member-find input{flex:1 1 14rem;width:auto;min-width:0}
.public-error{color:var(--red-dark);font-weight:800}

/* Grids (S4): columns follow the item count, never "as many as fit". Phones get one card per row and small items two or
   three; a short last row is centred and keeps the card width. Counted with :has(), so edited lists stay even. The count
   rules are wrapped in :where() so they weigh nothing and only their order decides (phones, then 600 px, then 1200 px). */
.grid,.filter-row,.link-buttons,.example-jumps{--gap:var(--s4);display:flex;flex-wrap:wrap;gap:var(--gap);padding:0;list-style:none}
:is(.grid,.filter-row,.link-buttons,.example-jumps){justify-content:center}
:is(.grid,.fact-strip,.filter-row,.link-buttons,.example-jumps)>*{flex:0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));min-width:0}
:where(.grid,.fact-strip){--cols:1}
:where(.grid--small,.grid--logos,.filter-row,.link-buttons,.example-jumps){--cols:2}
:where(.grid--small,.grid--logos,.filter-row,.link-buttons,.example-jumps):where(:has(>:nth-child(3n):last-child),:has(>:nth-child(5):last-child)){--cols:3}
:where(.fact-strip):where(:has(>:nth-child(2n):last-child)){--cols:2}
/* Fix round 3, A5: the homepage photos are two across on phones, four on wide screens (4 or 8 shown). */
:where(.home-gallery .gallery-grid){--cols:2;--gap:var(--s2)}
:where(.gallery-grid):where(:has(>:only-child)){--cols:1}
:where(.year-cards){--cols:2}
:where(.grid--small,.grid--logos,.filter-row,.link-buttons,.example-jumps){--gap:var(--s2)}
@media (width >= 37.5em){
  :where(.grid){--cols:2}
  :where(.grid):where(:has(>:nth-child(3n):last-child),:has(>:nth-child(5):last-child),:has(>:nth-child(7):last-child),:has(>:nth-child(11):last-child)){--cols:3}
  :where(.grid--small,.grid--logos,.fact-strip,.filter-row,.link-buttons,.example-jumps){--cols:4}
  :where(.grid--small,.grid--logos,.fact-strip,.filter-row,.link-buttons,.example-jumps):where(:has(>:nth-child(3n):last-child)){--cols:3}
  :where(.grid--small,.grid--logos,.fact-strip,.filter-row,.link-buttons,.example-jumps):where(:has(>:nth-child(2):last-child)){--cols:2}
  :where(.grid--small,.grid--logos,.filter-row,.link-buttons,.example-jumps):where(:has(>:nth-child(5):last-child)){--cols:5}
  :where(.gallery-grid):where(:has(>:only-child)){--cols:1}
  /* Event cards on tablets: two across, three from 900 px, whatever their number. */
  :where(.grid--events){--cols:2}
}
@media (width >= 56.25em){:where(.grid--events){--cols:3}}
@media (width >= 75em){
  :where(.grid){--cols:4}
  :where(.grid):where(:has(>:nth-child(3n):last-child)){--cols:3}
  :where(.grid):where(:has(>:nth-child(12n):last-child)){--cols:4}
  :where(.grid):where(:has(>:nth-child(2):last-child)){--cols:2}
  :where(.grid):where(:has(>:nth-child(5):last-child),:has(>:nth-child(10):last-child)){--cols:5}
  /* 23 Nov (Jonathan): event cards are always four across here, however many there are. Before, the number of events
     decided it (5 or 6 gave three across, 10 gave five), so the rows changed from week to week. Fewer than four stand
     centred at the same card size (round 6). */
  :where(.grid--events){--cols:4}
  :where(.member-grid){--cols:3}
  :where(.grid--small,.grid--logos,.filter-row,.link-buttons,.example-jumps):where(:has(>:nth-child(6):last-child),:has(>:nth-child(12):last-child)){--cols:6}
  :where(.grid--small,.grid--logos,.filter-row,.link-buttons,.example-jumps):where(:has(>:nth-child(7):last-child)){--cols:7}
  :where(.grid--small,.grid--logos,.filter-row,.link-buttons,.example-jumps):where(:has(>:nth-child(8):last-child)){--cols:8}
  :where(.grid--small,.grid--logos,.filter-row,.link-buttons,.example-jumps):where(:has(>:nth-child(9):last-child)){--cols:9}
  :where(.gallery-grid):where(:has(>:only-child)){--cols:1}
}
/* The lists also keep to the room they get. When a column would be narrower than its content needs (a long Swedish
   word, an address), the list drops to the next even layout of the same items (R2): 5 → 3+2, 4 → 2+2, 3 → one column.
   Each threshold is the columns × the item's least width + the gaps (cards 14.5rem, member cards 17.5rem, link cards
   13.75rem, tabs and chips 8.25rem, facts as measured). These rules only ever take columns away from the counts above. */
.grid,.fact-strip,.filter-row,.link-buttons,.example-jumps{container:list/inline-size}
@container list (width < 46rem){:where(.fact-strip:has(>:nth-child(4):last-child))>*{--cols:2}}
@container list (width < 31rem){:where(.fact-strip:has(>:nth-child(3):last-child))>*{--cols:1}}
@container list (width < 30rem){:where(.year-cards)>*{--cols:1}}
/* E8 (QA L8): a fact list stacks below 23 rem, where "medlemsorganisationen" no longer fits half the row. */
@container list (width < 23rem){:where(.fact-strip)>*{--cols:1}}
/* Three facts across: the text follows the strip's width a little, so "medlemsföreningar" fits from 31rem up. */
@container list (width >= 31rem){.fact-strip:has(>:nth-child(3):last-child)>li{font-size:clamp(1rem,(100cqi - 3rem) / 28.5,1.25rem)}}
@container list (width < 58rem){:where(.link-buttons:has(>:nth-child(4n):last-child))>*{--cols:2}}
@media (width >= 37.5em){
  @container list (width < 72.75rem){:where(.link-buttons:has(>:nth-child(5):last-child))>*{--cols:3}}
}
@container list (width < 43.25rem){:where(.link-buttons:has(>:nth-child(3n):last-child),.link-buttons:has(>:nth-child(5):last-child))>*{--cols:1}}
@container list (width < 28.5rem){:where(.link-buttons)>*{--cols:1}}
@container list (width < 26.75rem){:where(.example-jumps:has(>:nth-child(3n):last-child))>*{--cols:1}}
@media (width >= 37.5em){
  @container list (width < 56rem){:where(.member-grid)>*{--cols:2}}
  @container list (width < 47.5rem){
    :where(.grid:not(.grid--small,.grid--logos):is(:has(>:nth-child(3n):last-child),:has(>:nth-child(5):last-child),:has(>:nth-child(7):last-child),:has(>:nth-child(11):last-child)))>*{--cols:1}
    :where(.grid:not(.grid--small,.grid--logos):has(>:nth-child(6n):last-child))>*{--cols:2}
  }
  @container list (width < 31rem){:where(.grid:not(.grid--small,.grid--logos))>*{--cols:1}}
  @container list (width < 37rem){:where(.member-grid)>*{--cols:1}}
}
@media (width >= 75em){
  @container list (width < 80.5rem){:where(.grid:not(.grid--small,.grid--logos):has(>:nth-child(5):last-child))>*{--cols:3}}
}
/* 23 Nov (Jonathan): event cards keep one count per screen width, whatever their number: two across from 600 px, three
   from 900 px, four from 1200 px (a card is never narrower than its 14.5 rem). The rules above would give five events
   3 + 2 on a laptop and one per row on a tablet. The front page keeps its own layout. */
@media (width >= 37.5em){@container list (width >= 31rem){:where(.grid--events:not(.home-events *))>*{--cols:2}}}
@media (width >= 56.25em){:where(.grid--events:not(.home-events *))>*{--cols:3}}
@media (width >= 75em){:where(.grid--events:not(.home-events *))>*{--cols:4}}
/* 23 Nov (Jonathan): no card stands alone on the last row. When one would be left over, the last rows share it:
   5 → 3 + 2, 9 → 4 + 3 + 2, and on three columns 4 → 2 + 2, 7 → 3 + 2 + 2. The cards keep their size; a margin on
   each side of the shorter row makes the next card wrap. Two columns cannot share, so an odd count ends in one card. */
@media (width >= 75em){
  .grid--events:not(.home-events *)>:nth-child(4n+1):nth-last-child(5){margin-left:10%}
  .grid--events:not(.home-events *)>:nth-child(4n+3):nth-last-child(3){margin-right:10%}
}
@media (56.25em <= width < 75em){
  .grid--events:not(.home-events *)>:nth-child(3n+1):nth-last-child(4){margin-left:10%}
  .grid--events:not(.home-events *)>:nth-child(3n+2):nth-last-child(3){margin-right:10%}
}

/* Cards (S6, P15): one card look everywhere, the material page's: white, a thin line, rounded corners. */
/* Round 6: the edge is strong enough to read on the page colour and on a band; a card that is a link rises on hover. */
.event-card,.project-card,.person-card,.year-card,.contact-card,.member-entry,.fund-cards>.fund-section,.finding-links a,.end-card,.link-button,.search-empty{background:var(--white);border:1px solid var(--card-edge);border-radius:var(--radius)}
.contact-card,.member-entry,.fund-cards>.fund-section,.search-empty{padding:var(--s3)}
:is(.event-card,.end-card,.finding-links a,.link-button){transition:transform .35s var(--ease),box-shadow .35s var(--ease),border-color .2s ease-out}
:is(.event-card,.end-card,.finding-links a,.link-button):is(:hover,:focus-visible,:has(a:focus-visible)){transform:translateY(-4px);border-color:#8fa1b2;box-shadow:var(--lift)}

/* Tabs (round 6c): a menu section's pages, the archive's years and the search's result kinds are tabs on one thin line:
   the current one in ink with the menu's red bar under it (the header's own sign for the current page), the others in
   muted ink with the bar sliding in on hover. Centred when they fit; on a narrow screen one row that scrolls sideways,
   the current tab brought into view (site.js). Pill buttons are for small controls, not for navigation. */
:is(.section-tabs,.year-tabs,.search-tabs){position:relative;display:flex;flex-wrap:nowrap;justify-content:flex-start;gap:0 var(--s4);overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;margin-block:0;padding:0;border-bottom:1px solid var(--line);list-style:none}
:is(.section-tabs,.year-tabs,.search-tabs)::-webkit-scrollbar{display:none}
:is(.section-tabs,.year-tabs,.search-tabs)>:first-child{margin-left:auto}
:is(.section-tabs,.year-tabs,.search-tabs)>:last-child{margin-right:auto}
:is(.section-tabs,.year-tabs,.search-tabs) a{position:relative;flex:none;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:44px;min-height:48px;padding:0 4px;color:var(--muted);font-size:1rem;font-weight:800;line-height:1.2;white-space:nowrap;text-decoration:none;transition:color .2s ease-out}
:is(.section-tabs,.year-tabs,.search-tabs) a::after{content:'';position:absolute;left:0;right:0;bottom:0;height:3px;border-radius:3px 3px 0 0;background:var(--red);transform:scaleX(0);transform-origin:left;transition:transform .25s var(--ease)}
:is(.section-tabs,.year-tabs,.search-tabs) a:is(:hover,:focus-visible){color:var(--ink)}
:is(.section-tabs,.year-tabs,.search-tabs) a:is(:hover,:focus-visible,[aria-current])::after{transform:scaleX(1)}
:is(.section-tabs,.year-tabs,.search-tabs) a[aria-current]{color:var(--ink)}
:is(.section-tabs,.year-tabs,.search-tabs) a:focus-visible{outline-offset:-3px}
.link-button{display:flex;align-items:center;justify-content:center;min-height:64px;padding:12px 20px;font-size:1.125rem;font-weight:800;line-height:1.3;text-align:center;text-decoration:none}
.finding-links a{display:flex;flex-direction:column;justify-content:center;gap:4px;min-height:64px;padding:var(--s3);font-size:1.125rem;font-weight:800;text-decoration:none}
.finding-links span{font-size:1rem;font-weight:400;color:var(--muted)}
.filter-row a,.filter-row>span{display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:8px 4px;border:1px solid var(--card-edge);border-radius:var(--radius-small);background:var(--white);font-size:.9375rem;font-weight:800;text-align:center;line-height:1.2;text-decoration:none;transition:background-color .2s ease-out,border-color .2s ease-out,transform .25s var(--ease)}
.filter-row a:not([aria-current]):is(:hover,:focus-visible){border-color:var(--ink);background:var(--band-blue);transform:translateY(-2px)}
/* The archive's nine category chips fit one row at 1366 px with "Alla kategorier" on one line. */
.filter-chips{--gap:12px}
.filter-chips a,.filter-chips>span{font-size:.875rem}
/* Filter chips on phones: one size smaller, so "Studiecirkel" fits a third of the row (after the chip rule it overrides). */
@container list (width < 26rem){.filter-row a,.filter-row>span{font-size:.875rem}}
@container list (width < 20rem){.filter-row a,.filter-row>span{font-size:.8125rem}}
/* On the narrowest phones three equal category chips are too narrow for "Föreläsning": one per row (R2: even rows). */
/* Nine chips with counts need about 78 rem in one row; narrower, they go four per row (3 x 3 for nine or six, 3 + 2 for
   five), still even. */
@container list (width < 78rem){:where(.filter-chips)>*{--cols:4}:where(.filter-chips:has(>:nth-child(3n):last-child),.filter-chips:has(>:nth-child(5):last-child))>*{--cols:3}}
/* The archive chips carry a count (A9): two per row on a phone, and with an odd number "Alla kategorier" takes its
   own row, so no chip stands alone. */
@container list (width < 26rem){:where(.filter-chips)>*{--cols:2}:where(.filter-chips:has(>:nth-child(2n+1):last-child))>:first-child{--cols:1}}
@container list (width < 20rem){:where(.filter-chips)>*{--cols:1}}
.filter-row a[aria-current]{background:var(--ink);border-color:var(--ink);color:var(--white)}
/* Pickers (round 7): on a phone a row of tabs or chips is one dropdown, a native disclosure, so nothing scrolls
   sideways and the choice takes one line until it is opened. Desktop and tablet keep the row. */
.picker{display:none}
.picker>summary{display:flex;align-items:center;justify-content:center;gap:10px;min-height:52px;padding:8px 16px;border:1px solid var(--card-edge);border-radius:var(--radius-small);background:var(--white);font-weight:800;text-align:center;cursor:pointer;list-style:none;transition:border-color .2s ease-out,background-color .2s ease-out}
.picker>summary::-webkit-details-marker{display:none}
.picker>summary:is(:hover,:focus-visible){border-color:var(--ink);background:var(--band-blue)}
.picker-chevron{flex:none;transition:transform .25s var(--ease)}
.picker[open]>summary .picker-chevron{transform:rotate(180deg)}
.picker-list{display:grid;gap:2px;margin-top:6px;padding:6px;border:1px solid var(--card-edge);border-radius:var(--radius-small);background:var(--white)}
.picker-list>:is(a,span){display:flex;align-items:center;justify-content:center;gap:6px;min-height:46px;padding:4px 12px;border-radius:6px;text-align:center;text-decoration:none}
.picker-list>a{font-weight:800}
.picker-list>a:is(:hover,:focus-visible){background:var(--band-blue)}
.picker-list>a[aria-current]{background:var(--ink);color:var(--white)}
.picker-list>span{color:var(--muted)}
.picker-list span span{font-weight:400}
@media (width < 37.5em){
  :is(.section-tabs,.year-tabs,.search-tabs,.filter-chips):where(:has(+.picker)){display:none}
  .picker{display:block}
}
/* Round 22: a menu section of six pages or more (Möjligheter, Om ABF) needs up to about 830 px for its tabs in English, so
   below the 1024 px breakpoint its row is the picker too, instead of a row whose last tabs hide behind a sideways scroll. */
@media (width >= 37.5em) and (width < 64em){
  .section-tabs:has(>a:nth-child(6)):where(:has(+.picker)){display:none}
  .section-tabs:has(>a:nth-child(6))+.picker{display:block;max-width:28rem;margin-inline:auto}
}
/* Fix round 5, suggestion 5: a category with no posts in the chosen year is text, not a link: the same chip, dimmed. */
.filter-row>span{border-style:dashed;color:var(--muted)}
.search-tabs a span{font-weight:400}

/* Event card (S6): picture, date or status, title, time, place, one action. The title link covers the card. A post
   without a picture gets the same picture area in a rainbow tint with its date. */
.event-card{position:relative;display:flex;flex-direction:column;overflow:hidden}
.event-card:has(a:focus-visible){outline:3px solid var(--focus);outline-offset:3px}
.event-card h3 a:focus-visible{outline:none}
.event-card-picture,.project-picture{position:relative;display:grid;place-items:center;aspect-ratio:4/3;overflow:hidden;background:var(--picture)}
:is(.event-card-picture,.project-picture)>:is(picture,img){position:absolute;inset:0;width:100%;height:100%}
:is(.event-card-picture,.project-picture) img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .7s var(--ease)}
:is(.event-card,.project-card):is(:hover,:has(a:focus-visible)) :is(.event-card-picture,.project-picture) img{transform:scale(1.05)}
.event-card-picture.is-poster img{object-position:50% 0}
:is(.event-card-picture,.project-picture).is-small img{object-fit:scale-down}
.event-card-picture.is-empty{background:linear-gradient(135deg,var(--tint-blue),var(--band-mint) 50%,var(--band-lavender));font-size:1.75rem;font-weight:800;letter-spacing:-.03em;color:var(--ink)}
.event-card-body{display:flex;flex:1;flex-direction:column;gap:6px;padding:16px 18px 18px}
.event-card-when{font-size:1.375rem;font-weight:800;line-height:1.2;color:var(--red-dark)}
.event-card-notice,.event-card-published{font-size:.9375rem;font-weight:800;color:var(--muted)}
.event-card h3{font-size:1.25rem}
/* Round 21: a title that is its card's link draws an underline in from the left while the card is hovered or its link
   has keyboard focus (event, signpost, result and next-step cards), so the title says where the click goes. */
:is(.event-card h3 a,.signpost h2 a,.search-results h2 a,.project-body h3 a,.end-card strong){--underline:transparent;text-decoration:none;background:linear-gradient(var(--underline),var(--underline)) 0 100%/0 2px no-repeat;transition:background-size .4s var(--ease)}
:is(.event-card,.signpost,.search-results>li,.project-body,.end-card):is(:hover,:focus-visible,:has(a:focus-visible)) :is(h2 a,h3 a,strong){--underline:currentColor;background-size:100% 2px}
.event-card h3 a::after{content:'';position:absolute;inset:0;z-index:1}
.event-card:is(:hover,:has(a:focus-visible)) .event-card-action{text-decoration-thickness:2px;text-underline-offset:.14em}
.event-card-facts{display:grid;gap:2px;margin:0;padding:0;list-style:none;font-size:1rem;line-height:1.45;color:var(--muted)}
.event-card-facts li{display:flex;align-items:flex-start;gap:7px}
.event-card-facts svg{flex:none;width:16px;height:16px;margin-top:.2em}
/* Round 6: an event that takes sign-ups says so on its picture, so the list shows them at a glance (the Anmälan page went). */
/* Round 21: the same tag says "Ingen föranmälan" for an open activity, and stands in the facts card of the event's page. */
.event-tag{display:inline-block;padding:3px 11px;border-radius:var(--radius-small);background:var(--white);color:var(--red-dark);font-size:.875rem;font-weight:800;line-height:1.5;box-shadow:0 2px 8px -2px rgb(0 0 0 / .3)}
.event-card>.event-tag{position:absolute;top:12px;left:12px;z-index:2;pointer-events:none}
.event-card-action{margin-top:auto;padding-top:10px;color:var(--red-dark);font-weight:800;text-decoration:underline;text-underline-offset:.24em;transition:text-decoration-thickness .2s ease-out,text-underline-offset .2s ease-out}
.events-empty{max-width:var(--measure);margin-inline:auto;color:var(--muted);text-align:center}

/* Section heading: title with its link beside it; on phones the link sits under the title, at the left. */
.section-heading{display:flex;flex-direction:column;align-items:center;gap:12px var(--s3);margin-bottom:var(--s4);text-align:center}
.section-heading>a,.section-heading-actions>a{display:inline-flex;align-items:center;min-height:44px;color:var(--red-dark);font-weight:800}
.section-heading>h2{min-width:0}
.section-heading-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px 20px}

/* Fact strip (S6): big numbers or words with short labels; words never break. */
.fact-strip{--gap:var(--s4);display:flex;flex-wrap:wrap;gap:var(--gap);margin:var(--s4) 0;padding:0;list-style:none}
.fact-strip>li{font-size:1.25rem;font-weight:800;line-height:1.25;overflow-wrap:normal;hyphens:none;text-align:center}
/* Round 21 (Part C, Jonathan's example): a figure stands under a short bar in the rainbow's order (the pull quote's bar)
   instead of between two grey hairlines. Fact rows, the Om ABF timeline and the steps are one part. */
:is(.fact-strip,.teaser-timeline,.goal-steps)>li{--bar:var(--blue);padding-top:var(--s3);background:linear-gradient(var(--bar),var(--bar)) 50% 0/56px 5px no-repeat}
:is(.fact-strip,.teaser-timeline,.goal-steps)>li:nth-child(3n+2){--bar:var(--mint)}
:is(.fact-strip,.teaser-timeline,.goal-steps)>li:nth-child(3n){--bar:var(--lavender)}
.fact-strip strong{display:block;font-size:clamp(1.625rem,9cqi,2.75rem);font-weight:800;line-height:1.1;letter-spacing:-.025em;font-variant-numeric:tabular-nums}
.fact-strip :is(li,a)>span{display:block;margin-top:4px;font-size:.9375rem;font-weight:400;line-height:1.4;color:var(--muted)}
.fact-strip-label{margin-top:var(--s3);font-weight:800}
/* A fact that leads somewhere (Om ABF's address to the map, A12): the value is the link's underlined text. */
.fact-strip a{display:block;color:inherit;text-decoration:none}
.fact-strip a strong{color:var(--red-dark);text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:.15em;transition:color .2s ease-out}
.fact-strip a:is(:hover,:focus-visible) strong{color:var(--ink)}
/* Round 21: a counted number (site.js) keeps even digit widths, so a year runs without the line moving. */
.count-up{display:inline-block;font-variant-numeric:tabular-nums}

/* Text and photo (S6, round 6): the photo at 4:3 beside the text, the text centred against it; from one section to
   the next the photo changes sides, so a page reads as a rhythm, not a column of text with pictures pinned right. */
.text-photo{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s4)}
.text-photo>.family-photo img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:var(--radius)}
@media (width >= 64em){
  .text-photo{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:var(--s5) var(--s6);align-items:center}
  .family-section:nth-child(even) .text-photo>.family-photo{order:-1}
}

/* Text and side panel (S6, round 6): the text at reading width, its facts, steps, actions or list in a tinted panel
   beside it. On wide screens the panel takes the rest of the row and stays in view while the text scrolls, so the right
   half is never empty. Two halves of the same weight (.text-aside--half) have no panel. Under the text on phones. */
.text-aside{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s4)}
.text-aside>:last-child>*+*{margin-top:var(--s3)}
.text-aside>*{margin-block:0}
.text-aside:not(.text-aside--half)>:last-child{padding:var(--s4);border-radius:var(--radius);background:var(--band-blue)}
.text-aside:not(.text-aside--half)>:last-child .fact-strip{margin:0}
.text-aside:not(.text-aside--half)>:last-child>h3{font-size:1.375rem}
/* A panel of facts or actions has them on its centre axis (round 6b); a panel with a list keeps the list's left edge. */
.text-aside:not(.text-aside--half)>:last-child:has(>.fact-strip,>.family-actions){text-align:center}
.text-aside .family-photo img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:var(--radius-small)}
.text-aside .family-actions{flex-direction:column;align-items:center}
@media (width >= 75em){
  .text-aside{grid-template-columns:minmax(0,var(--measure)) minmax(0,34rem);justify-content:space-between;gap:var(--s6);align-items:center}
  .text-aside:not(.text-aside--half)>:last-child{padding:var(--s5)}
  /* Round 9: the heading stands at the top of the text column, so text and panel start and end as one row. The
     shorter side is centred against the taller one, and everything after them takes the full width. */
  .family-section:has(>h2+.text-aside:not(.text-aside--half)){display:grid;grid-template-columns:minmax(0,var(--measure)) minmax(var(--s6),1fr) minmax(0,34rem)}
  .family-section:has(>h2+.text-aside:not(.text-aside--half))>*{grid-column:1/-1}
  .family-section:has(>h2+.text-aside:not(.text-aside--half))>h2{grid-column:1;grid-row:1;align-self:end}
  .family-section>h2+.text-aside:not(.text-aside--half){display:contents}
  .family-section>h2+.text-aside:not(.text-aside--half)>:first-child{grid-column:1;grid-row:2;align-self:start}
  .family-section>h2+.text-aside:not(.text-aside--half)>:last-child{grid-column:3;grid-row:1/span 2;align-self:center}
  .text-aside--half{grid-template-columns:repeat(2,minmax(0,1fr));align-items:center}
  .text-aside .fact-strip>*{--cols:1}
}

/* Steps (S6): big numbers, a full-width row on desktop, stacked on phones. Four steps sit two by two. */
:has(>.goal-steps){container:steps/inline-size}
.goal-steps{counter-reset:step;display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s4);margin:var(--s4) 0;padding:0;list-style:none}
.goal-steps>li{counter-increment:step;display:grid;align-content:start;justify-items:center;gap:var(--s1);width:100%;max-width:var(--measure);margin-inline:auto;text-align:center}
.goal-steps>li::before{content:counter(step);font-size:2.5rem;font-weight:800;line-height:1;color:var(--red)}
.goal-steps:first-child{margin-top:0}
@media (width >= 37.5em){
  .goal-steps{grid-template-columns:repeat(3,minmax(0,1fr))}
  .goal-steps:has(>:nth-child(2n):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}
  @container steps (width < 38rem){.goal-steps{grid-template-columns:minmax(0,1fr)}}
}
.goal-heading{margin-top:var(--s4)}
/* Om ABF, "ABF vill" (round 6): the four aims as a list in the panel beside the text; they are aims, not steps. */
.goal-list{margin:var(--s3) 0 0;padding-left:1.3em}
.goal-list li+li{margin-top:.75em}
.goal-list li::marker{color:var(--red)}

/* Plain list in columns (S6) with brand-colour markers. */
.plain-columns{column-gap:var(--s5);margin:var(--s3) 0;padding-left:1.3em}
.plain-columns>li{margin:0 0 8px;break-inside:avoid}
.plain-columns>li:last-child{margin-bottom:0}
.plain-columns li::marker{color:var(--blue)}

/* Document card (S6): the material page's card. */
.library-results{container:library/inline-size;display:grid;grid-template-columns:minmax(0,1fr);margin:var(--s3) 0;padding:0;list-style:none}
.library-results>li{display:grid;grid-template-columns:50px minmax(0,1fr);gap:var(--s2) 22px;align-items:center;padding:25px 18px;background:var(--card);border-bottom:1px solid var(--card-line);transition:background-color .2s ease-out}
.library-results>li:is(:hover,:focus-within){background:var(--white)}
.library-file-mark{display:flex;align-items:flex-end;justify-content:center;width:50px;height:62px;padding-bottom:10px;background:var(--file);color:var(--file-ink);font-size:.75rem;font-weight:800;clip-path:polygon(0 0,72% 0,100% 18%,100% 100%,0 100%)}
.library-results :is(h2,h3){margin-bottom:6px;font-size:1.375rem}
.library-results li p{color:var(--muted)}
.library-results .version-label{margin-top:6px}
.library-actions{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:12px 20px}
.library-actions a:not(:last-child){display:inline-flex;align-items:center;min-height:44px;color:var(--focus);font-weight:800;text-decoration:underline}
.library-actions a:not(:last-child):is(:hover,:focus-visible){color:var(--ink)}
@media (width >= 37.5em){
  .library-results>li{grid-template-columns:54px minmax(0,1fr) auto}
  .library-actions{grid-column:auto;justify-content:flex-end}
  @container library (width < 44rem){.library-results>li{grid-template-columns:54px minmax(0,1fr)}.library-actions{grid-column:1/-1;justify-content:flex-start}}
}
/* The small card from 24 rem down: below that a 22 px "Verksamhetsberättelser" no longer fits beside the 54 px mark. */
@container library (width < 24rem){
  .library-results>li{grid-template-columns:36px minmax(0,1fr);column-gap:12px;padding-inline:14px}
  .library-file-mark{width:36px;height:45px;padding-bottom:6px;font-size:.75rem}
  .library-results :is(h2,h3){font-size:1rem}
}
.document-items{display:grid;grid-template-columns:minmax(0,1fr);margin:var(--s2) 0 0;padding:0;list-style:none}
.document-items>li{padding:0;background:var(--card);border-bottom:1px solid var(--card-line);transition:background-color .2s ease-out}
.document-items>li:has(a:is(:hover,:focus-visible)){background:var(--white)}
.document-items a{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:var(--s2);align-items:center;padding:18px;text-decoration:none}
.document-items a:focus-visible{outline-offset:-3px}
:is(.document-filetype,.library-file-mark,.document-download){transition:transform .35s var(--ease)}
.document-items a:is(:hover,:focus-visible) .document-filetype,.library-results>li:is(:hover,:focus-within) .library-file-mark{transform:translateY(-3px) rotate(-4deg)}
.document-items a:is(:hover,:focus-visible) .document-download{transform:translateY(3px)}
.document-items a:is(:hover,:focus-visible) .document-title{text-decoration:underline 2px;text-underline-offset:.14em}
.document-filetype{display:grid;place-items:end center;width:44px;height:54px;padding-bottom:8px;background:var(--file);color:var(--file-ink);font-size:.75rem;font-weight:800;clip-path:polygon(0 0,72% 0,100% 18%,100% 100%,0 100%)}
.document-title{display:block;font-weight:800}
.document-meta{display:block;color:var(--muted)}
.document-download{font-size:1.5rem;color:var(--red-dark)}
.document-group+.document-group{margin-top:var(--s4)}

/* Colour band (S6): the full content width, one band per message, its text with a logo or a document card beside it, so
   the band is never half empty (G3 A3). */
/* Colour band (S6, round 6): the text and its logo or document as two equal halves, a logo on a white plate in the
   middle of its half. A band's actions are centred under its text, on every band (A4). */
.colour-band{--band:var(--band-blue);display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s4);align-items:center;padding:var(--s4) var(--s3);border-radius:var(--radius);background:var(--band)}
.colour-band-copy{max-width:var(--measure);justify-self:center;text-align:center}
.colour-band-copy>*+*{margin-top:12px}
.colour-band-copy>h2+*{margin-top:var(--s3)}
.colour-band-copy>.prose>*{margin-inline:auto}
.colour-band-mark,.colour-band-logo{display:block;justify-self:center;width:min(360px,100%);padding:var(--s4);border-radius:var(--radius);background:var(--white)}
.colour-band-logo img{display:block;width:100%}
:is(.colour-band,.text-aside)>.library-results{margin:0}
.colour-band .library-results>li{background:var(--white);border:1px solid var(--card-edge);border-radius:var(--radius-small)}
.colour-band-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:12px 20px;margin-top:var(--s3)}
@media (width >= 37.5em){
  .colour-band{padding:var(--s5)}
  .colour-band:has(>.colour-band-mark,>.colour-band-logo,>.colour-band-photo,>.library-results){grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:var(--s6)}
}
/* Volontär (round 6): its two bands side by side as two equal cards on one band. */
.band-pair{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s4)}
.band-pair>.colour-band{grid-template-columns:minmax(0,1fr);align-content:start;background:var(--white);border:1px solid var(--card-edge)}
.band-pair .colour-band-copy{max-width:none}
.band-pair :is(.colour-band-mark,.colour-band-logo){padding:0;background:none}
@media (width >= 75em){.band-pair{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* A section on a full-width band (round 6): the colour runs to both screen edges, the content keeps the page width.
   Sections alternate the page colour and the band, so a long page has a rhythm. */
.bleed{padding-block:var(--band-pad);background:var(--band-blue);box-shadow:0 0 0 100vmax var(--band-blue);clip-path:inset(0 -100vmax)}
/* A centred section (round 6b): its heading, text, items and action share one centre axis. A section is centred when its
   content is a row of equal items (steps, rooms, tiles, a short row of cards, a map) or one short message; a text section
   keeps the left edge. Cards inside keep their own left-aligned text. */
.section-centred>:is(h2,h3,p,.prose),.section-centred .map-address{text-align:center}
.section-centred>.fund-kicker{display:block;width:fit-content;margin-inline:auto}
.section-centred>p,.section-centred>.prose>*{margin-inline:auto}
.section-centred .family-actions{justify-content:center}
/* Steps on a band (Studiecirklar's start, Medlemskap's joining): white boxes, the action under them. */
.steps-band .family-actions{margin-top:var(--s4)}
/* One short paragraph (Möjligheter, Samarbete) reads as the page's opening line. */
.lead-prose>p{max-width:40em;font-size:clamp(1.125rem,1rem + .5vw,1.375rem);line-height:1.55}
/* The heading of a text beside its photo stands in the text column (round 6b). */
.text-photo-copy>h2{margin-bottom:var(--s3)}
/* Round 9: every section heading is centred, on every screen. Running text keeps its left edge for reading, in a block
   centred under its heading; a short intro, a count line and a row of actions are centred. Reading pages and the
   headings inside cards keep their edge. */
:is(.family-section,.text-photo-copy,.about-documents,.library-group,.member-directory,.contact-details,.map-block,.calendar-block)>h2,.prose>h2{text-align:center}
.prose>:is(p,h2,h3,ul:not([class]),ol:not([class])){margin-inline:auto}
/* Varför medlem: its paragraphs in two columns on wide screens, its two actions under them. */
@media (width >= 75em){#section-benefits>.prose{columns:2;column-gap:var(--s7)}#section-benefits>.prose>p{max-width:none;break-inside:avoid}}
.family-section:has(>.text-aside--half)>.prose,.family-actions,.about-documents-more,.library-count,.search-count{text-align:center;justify-content:center}
.text-photo-copy>h2+p{margin-bottom:var(--s3)}

/* Notices and source-year labels */
.event-notice,.preview-notice,.translation-note{max-width:var(--measure);padding:12px 16px;border-radius:var(--radius-small);background:var(--tint-blue);font-weight:800}
.dated-fact,.history-label,.version-label,.tag,.fund-kicker,.search-kind,.person-note{display:inline-block;padding:4px 10px;border-radius:6px;background:var(--tint-blue);font-size:.875rem;font-weight:800;line-height:1.5;letter-spacing:0;color:var(--ink);overflow-wrap:anywhere}
.tag{margin-left:6px;vertical-align:middle}
.fund-kicker{display:block;width:fit-content}
.section-centred>.fund-kicker{margin-inline:auto}

/* Contents list: a right rail on wide screens, a compact "Hoppa till" list on phones. The text starts at the title's edge.
   The rail is the contents list, or a column holding a document's actions above it. */
.reading-contents,.statute-contents{padding:var(--s2) var(--s3);background:var(--card);border-radius:var(--radius);font-size:1rem}
.reading-contents-title,.statute-contents h2{margin-bottom:6px;font-size:1rem;font-weight:800;letter-spacing:0}
:is(.reading-contents,.statute-contents) a:not(.button){display:block;padding-block:10px;color:var(--ink);font-weight:800}
.statute-contents a:not(.button){display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:12px}
.statute-contents ol{margin:0;padding:0;list-style:none}
.statute-contents a span{font-weight:400;color:var(--muted);white-space:nowrap}
.reading-layout>*+*,.statutes>*+*,.reading-rail>*+*{margin-top:var(--s4)}
.reading-rail>p+p{margin-top:12px}
@media (width >= 75em){
  /* Round 6: the text and its contents list are one centred composition, not a column at the left edge and a list at
     the right edge with nothing between. */
  .reading-layout,.statutes{--body:var(--measure);display:grid;grid-template-columns:minmax(0,var(--body)) 280px;justify-content:center;gap:var(--s7);align-items:start}
  .history-text .reading-layout{--body:calc(var(--measure) + 8rem)}
  .reading-layout>*+*,.statutes>*+*{margin-top:0}
  .reading-layout>:first-child,.statute-contents{position:sticky;top:var(--s3);grid-column:2;grid-row:1}
  .reading-body,.statute-text{grid-column:1;grid-row:1}
}

/* Video card (S6): a 16:9 still without black bars that plays from YouTube (no cookies) on click. */
.film-card{min-width:0;max-width:600px}
.video-preview{position:relative;display:grid;place-items:center;aspect-ratio:16/9;overflow:hidden;border-radius:8px;background:var(--tint-blue)}
/* A still of an upright film keeps its top, where a poster has its title (as poster pictures on event cards do). */
.video-preview img,.video-preview picture{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 0;transition:transform .7s var(--ease)}
.film-card:is(:hover,:focus-within) .video-preview img{transform:scale(1.04)}
.video-preview button{position:absolute;z-index:1;left:12px;bottom:12px;display:flex;align-items:center;gap:10px;min-height:44px;padding:10px 16px;border:0;border-radius:var(--radius-small);background:var(--red);color:var(--white);font-size:.9375rem;font-weight:800;transition:background-color .2s ease-out,transform .25s var(--ease)}
.video-preview button:is(:hover,:focus-visible){background:var(--red-dark);transform:translateY(-2px)}
.embed-target iframe{display:block;border-radius:8px}
/* Round 9: the opened player takes the picture's place exactly. */
.video-preview[hidden]+.embed-target{margin-top:0}
.film-caption{margin-top:12px;font-weight:800;line-height:1.35}
.film-note{margin-top:4px;font-size:.875rem;color:var(--muted)}
.film-note a{color:var(--red-dark);font-weight:800}
.film-transcript{margin-top:var(--s3)}

/* Gallery (S6): real activity photos; a single photo at a proper size. Every thumbnail is the same 4:3 crop at the same
   size, so the rows are even (G3 A5); the full photo opens in the viewer. A thumbnail stays at most 300 px wide, so the
   smallest photos (240 px) are never shown larger than 1.25 times their file: 21 photos (7n) stand seven across once
   three across would be wider. */
.gallery-grid figure a{display:block;overflow:hidden;border-radius:8px}
.gallery-grid img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:8px;transition:transform .7s var(--ease)}
.gallery-grid figure a:is(:hover,:focus-visible) img{transform:scale(1.06)}
/* Photos that are not links move very little on hover (round 6): alive, without promising a click. */
.family-photo,.about-band-photo,.person-photo{position:relative;overflow:hidden;border-radius:var(--radius)}
/* Round 21 (Part C): a photo beside text stands on the brand stripe, the same one that tops the bands, so it is part of
   the page rather than a rounded picture dropped next to the words. */
:is(.about-band-photo,.text-photo>.family-photo)::before{content:'';position:absolute;left:0;right:0;bottom:0;z-index:3;height:6px;background:var(--rainbow);transform-origin:left;pointer-events:none}
:is(.family-photo,.about-band-photo,.person-photo) img{transition:transform 1.2s var(--ease)}
:is(.family-photo,.about-band-photo,.person-photo):hover img{transform:scale(1.03)}
@container list (width > 58.25rem){:where(.gallery-grid:has(>:nth-child(7n):last-child))>*{--cols:7}}
.gallery-grid:has(>:only-child)>figure{max-width:640px}
.gallery-grid figcaption{margin-top:6px;font-size:clamp(.75rem,(100cqi - 2rem) / 24.6,.875rem);line-height:1.4;overflow-wrap:anywhere}
.gallery-grid figcaption a{display:inline-flex;min-height:44px;color:var(--red-dark);font-weight:800}
.family-gallery h2{margin-bottom:var(--s4)}

/* Person card (S6): the same square photo for everyone, then name, role or years and text. */
.person-card{display:grid;grid-template-columns:120px minmax(0,1fr);align-content:start;align-items:center;gap:var(--s3);padding:var(--s3)}
.person-photo img{display:block;width:100%;aspect-ratio:1;object-fit:cover;border-radius:8px}
.person-name p{color:var(--muted)}
.person-text{grid-column:1/-1}
.person-note{margin-bottom:12px}
@media (width >= 37.5em){
  .person-card{grid-template-columns:200px minmax(0,1fr)}
  @container list (width < 50rem){.person-card{grid-template-columns:minmax(0,1fr)}.person-photo{max-width:200px}}
}
@container list (width < 20rem){.person-card{grid-template-columns:minmax(0,1fr)}.person-photo{max-width:160px}}

/* Lists of names or statements (round 7): an icon and the words, no box, so nothing looks like a button that does
   nothing. The list is centred as a block under its centred heading; its lines keep their left edge. */
.icon-list{margin:var(--s3) auto 0;padding:0;list-style:none;column-gap:var(--s6)}
.icon-list>li{display:flex;align-items:flex-start;gap:12px;margin:0 0 14px;break-inside:avoid;text-align:left}
/* Round 10: a list that ends its section adds no space after its last line (the section step stays the same). */
:is(.prose,.family-section)>.icon-list:last-child{margin-bottom:-14px}
.icon-list>li::before{content:'';flex:none;width:24px;height:24px;margin-top:.12em;background:var(--icon-colour,var(--blue));-webkit-mask:var(--icon) center/contain no-repeat;mask:var(--icon) center/contain no-repeat}
.room-list{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 20V6a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v14'/%3E%3Cpath d='M2 20h20'/%3E%3Cpath d='M14 12v.01'/%3E%3C/svg%3E");max-width:70rem;columns:11rem 5;font-weight:800}
.env-list{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z'/%3E%3Cpath d='M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12'/%3E%3C/svg%3E");--icon-colour:var(--mint-ink);max-width:58rem}
.check-list{column-gap:var(--s4);--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");max-width:70rem}
.room-calendar{margin-top:var(--s4);text-align:center}
/* Round 10: the EU strategy's goals, centred under their "Målen är:" line like Utrustning's list. */
.goal-icons{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l2.6 5.6 6.1.7-4.5 4.2 1.2 6L12 16.5 6.6 19.5l1.2-6-4.5-4.2 6.1-.7z'/%3E%3C/svg%3E");max-width:66rem;columns:17rem 3}
/* Round 9: the rooms are one row, centred under their heading (they wrap centred on smaller screens). */
.room-list{display:flex;flex-wrap:wrap;justify-content:center;gap:14px var(--s5);max-width:none;columns:auto}
/* Walkthrough 19 Nov: a list in two columns (Utrustning, Miljö, Volontär, Om ABF's list; Studiecirklar's rules on wide
   screens below). Each column flows on its own with the same gap between every item, no shared rows, and the first
   column takes the odd item (8 + 8 for 16): PHP marks the item that starts column two. One column on phones. */
@media (width >= 37.5em){
  :is(.check-list,.env-list,.plain-columns){columns:2}
  :is(.check-list,.env-list,.plain-columns)>.col-break{break-before:column;margin-top:0}
}
.room-list>li{margin:0}
/* Round 11: each room's icon says what it is; a room not named here keeps the door. */
.room-list>.room-coffee{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 8h1a4 4 0 1 1 0 8h-1'/%3E%3Cpath d='M3 8h14v9a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4Z'/%3E%3Cpath d='M6 2v2M10 2v2M14 2v2'/%3E%3C/svg%3E")}
.room-list>.room-screen{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='14' x='2' y='3' rx='2'/%3E%3Cpath d='M8 21h8M12 17v4'/%3E%3C/svg%3E")}
.room-list>.room-office{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16'/%3E%3Crect width='20' height='14' x='2' y='6' rx='2'/%3E%3C/svg%3E")}
.room-list>.room-people{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E")}
.room-list>.room-stairs{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h4.5v-4.5H12V12h4.5V7.5H21V3'/%3E%3C/svg%3E")}
.room-list>.room-rainbow{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 18a10 10 0 0 1 20 0'/%3E%3Cpath d='M6 18a6 6 0 0 1 12 0'/%3E%3Cpath d='M10 18a2 2 0 0 1 4 0'/%3E%3C/svg%3E")}
/* Round 22 (Mia): a room's colour in the booking calendar, the same swatch and word as the key above the calendar. The
   swatch has a dark edge, so yellow still shows on white; the word carries it for anyone who does not see the colour. */
.swatch{flex:none;display:inline-block;width:.875em;height:.875em;border-radius:50%;background:var(--swatch);box-shadow:inset 0 0 0 1px #11111559}
.swatch-d50000{--swatch:#d50000}.swatch-e4c441{--swatch:#e4c441}.swatch-0b8043{--swatch:#0b8043}.swatch-3f51b5{--swatch:#3f51b5}.swatch-7986cb{--swatch:#7986cb}
.room-name{display:block}
.room-colour{display:inline-flex;align-items:center;gap:6px;font-size:.9375rem;font-weight:400;color:var(--muted)}
.room-list>li:has(.room-colour){flex-wrap:wrap;column-gap:12px}
.calendar-key{margin:0 0 var(--s3);text-align:center}
.calendar-key>h3{margin:0 0 8px;font-size:1rem;font-weight:800;letter-spacing:0}
.calendar-key>ul{display:flex;flex-wrap:wrap;justify-content:center;gap:8px var(--s4);margin:0;padding:0;list-style:none}
.calendar-key li{display:inline-flex;align-items:center;gap:8px;margin:0}
.calendar-key-room{font-weight:800}
.calendar-key-word{color:var(--muted)}
/* On phones the rooms and the key are one column with one left edge, centred as a block (no row of two and one). */
@media (width < 37.5em){.calendar-key>ul,.room-list:has(.room-colour){display:grid;justify-content:center;justify-items:start}}
/* Round 22: Popup-kontor with its advert: the text beside the whole picture (never cropped), which opens large. */
/* Audit 16 Nov: with the advert the band keeps its one axis: heading, text and button centred in the text column, the
   button the section's usual step below the text, as in the band without a picture. */
.office-ad>.text-photo-copy{text-align:center}
.office-ad>.text-photo-copy>.prose>*{margin-inline:auto}
.office-ad>.text-photo-copy>p{margin-top:var(--s3)}
.office-ad .local-poster{justify-self:center}
.office-ad .local-poster img{width:auto;max-width:100%;max-height:min(80vh,44rem);border-radius:var(--radius)}
/* Round 21 (Jonathan: "looks half finished"): from tablets up a room is its icon in a tinted circle over its name, so
   the five rooms read as a row of things in the house and not as one thin line of words. */
@media (width >= 37.5em){
  .room-list{gap:var(--s3) var(--s4)}
  .room-list>li{flex-direction:column;align-items:center;gap:12px;width:9rem;font-size:1.125rem;font-weight:800;line-height:1.25;text-align:center;background:radial-gradient(circle 36px at 50% 36px,var(--room-tint,var(--band-blue)) 35.5px,transparent 36px)}
  .room-list>li::before{width:30px;height:30px;margin:21px 0}
  .room-list>li:nth-child(3n+2){--room-tint:var(--band-mint);--icon-colour:var(--mint-ink)}
  .room-list>li:nth-child(3n){--room-tint:var(--band-lavender)}
}
/* Round 9: Utrustning and Miljö side by side, one row of two sections on wide screens. Round 21: Miljö, the short one,
   is a mint panel beside the long list, so the pair no longer reads as one full column and one that stops early. */
@media (width >= 75em){
  .section-half:has(.env-list){align-self:start;padding:var(--s4);border-radius:var(--radius);background:var(--band-mint)}
  .family-sections:has(>.section-half){grid-template-columns:repeat(2,minmax(0,1fr));column-gap:var(--s6)}
  .family-sections:has(>.section-half)>:not(.section-half){grid-column:1/-1}
  .section-half .env-list{columns:auto}
}

/* Year list (S6): year and text, newest first. */
.award-years{container:awards/inline-size;margin:var(--s3) 0 0;padding:0;list-style:none}
.award-years>li{display:grid;grid-template-columns:7.5rem minmax(0,var(--measure));gap:var(--s2);padding:14px 0;border-top:1px solid var(--line)}
.award-year{font-weight:800;color:var(--red-dark);white-space:nowrap}
.award-years p+p{margin-top:6px}
/* A year beside its text needs 21.5rem for words like "utvecklingsverksamheten"; narrower, the year sits above. */
@container awards (width < 21.5rem){.award-years>li{grid-template-columns:minmax(0,1fr);gap:4px}}
@media (width >= 75em){.award-years{columns:2;column-gap:var(--s7)}.award-years>li{grid-template-columns:6rem minmax(0,1fr);break-inside:avoid}}

/* Map block (S6, C1): the map picture always visible, beside the house photo or the address, the same height. */
.map-block>h2{margin-bottom:var(--s3)}
:has(>.map-row){container:maprow/inline-size}
.map-row{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s3)}
.map-frame{aspect-ratio:8/5}
/* Until Google's map has painted, its frame shows a tinted area with a pin, never an empty white box (round 6c). */
.map-frame{border-radius:var(--radius);background:var(--band-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2351515a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-6.2-7-11.5a7 7 0 0 1 14 0C19 14.8 12 21 12 21z'/%3E%3Ccircle cx='12' cy='9.5' r='2.5'/%3E%3C/svg%3E") center/44px no-repeat}
.map-frame iframe{display:block;width:100%;height:100%;border:1px solid var(--line);border-radius:var(--radius);background:transparent}
.map-row>.family-photo img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:var(--radius)}
.map-address p{max-width:none}
.map-note{max-width:var(--measure);margin-top:var(--s2)}
.map-link a{display:inline-flex;align-items:center;min-height:44px;color:var(--red-dark);font-weight:800}
@media (width >= 37.5em){
  .map-row:has(>:nth-child(2)):not(:has(>.map-address)){grid-template-columns:minmax(0,2fr) minmax(0,1fr)}
  .map-row:has(>.map-address) .map-frame{aspect-ratio:21/8}
  .map-row>.family-photo{position:relative}
  .map-row>.family-photo img{position:absolute;inset:0;height:100%;aspect-ratio:auto}
  @container maprow (width < 44rem){
    .map-row:has(>:nth-child(2)){grid-template-columns:minmax(0,1fr)}
    .map-row>.family-photo img{position:static;height:auto;aspect-ratio:4/3}
  }
}

/* Image viewer (site.js): the poster or photo in a dialog with zoom and close. */
.image-viewer{width:min(96vw,1000px);max-width:96vw;max-height:95dvh;padding:0;overflow:auto;border:0;border-radius:12px;background:var(--white);color:var(--ink);box-shadow:0 20px 70px #0005}
.image-viewer::backdrop{background:#10141be8}
.image-viewer-bar{position:sticky;top:0;z-index:1;display:flex;align-items:center;gap:14px;padding:12px 18px;background:var(--white);border-bottom:1px solid #d2d5d5}
.image-viewer-bar strong{margin-right:auto;font-size:1.125rem}
.image-viewer-bar button{display:grid;place-items:center;flex:none;width:44px;height:44px;padding:0;border:0;border-radius:50%;transition:background-color .15s ease-out}
.image-viewer-zoom{background:#edf2f5;color:var(--ink)}
.image-viewer-zoom:is(:hover,:focus-visible){background:#dceaf5}
.image-viewer-close{background:var(--ink);color:var(--white)}
.image-viewer-close:is(:hover,:focus-visible){background:var(--red-dark)}
.image-viewer-zoom[aria-pressed="true"] .zoom-plus{display:none}
.image-viewer>img{display:block;width:auto;max-width:100%;height:auto;margin:0 auto;cursor:zoom-in}
.image-viewer-zoomed>img{max-width:none;cursor:zoom-out}
@media (prefers-reduced-motion: no-preference){.image-viewer[open]::backdrop{animation:fade-in .25s ease-out}}
@keyframes fade-in{from{opacity:0}}

/* 7. One short section per page ------------------------------------------------------------------------------------ */

/* Startsida (7.1) */
.homepage-content>section{margin-top:var(--gap-section)}
/* Round 17: the events band starts where the hero picture ends, so the people sit on it. */
.homepage-content>.home-events{margin-top:0}
/* Round 6: four events on a phone (the rest are a tap away in "Se alla arrangemang"). Round 21 (ABF): the homepage takes
   ten events and shows as many as fill whole rows: two by four rows from 600 px, four across from 1200 px, five across
   (all ten) from 1366 px. Fewer than ten events keep the four-across rows. */
@media (width < 37.5em){.home-events .event-card:nth-child(n+5){display:none}}
@media (width >= 37.5em){
  .home-events .event-cards:has(>:nth-child(9)){--cols:2}
  .home-events .event-card:nth-child(n+9){display:none}
}
@media (width >= 75em){.home-events .event-cards:has(>:nth-child(9)){--cols:4}}
@media (width >= 85.375em){
  .home-events .event-cards:has(>:nth-child(10)){--cols:5;--gap:var(--s3)}
  .home-events .event-cards:has(>:nth-child(10))>.event-card:nth-child(-n+10){display:flex}
}
.home-gallery h2,.home-partners h2{margin-bottom:var(--s3);text-align:center}
.volunteer-current>h2,.volunteer-archive>h2,.fund-history>h2{text-align:center}
:is(.volunteer-group-photo,.volunteer-single-photo){margin:var(--s4) auto}
.volunteer-group-photo{max-width:720px}
.volunteer-single-photo{max-width:200px;text-align:center}
:is(.volunteer-group-photo,.volunteer-single-photo) img{display:block;margin-inline:auto;border-radius:var(--radius)}
.volunteer-single-photo figcaption{margin-top:var(--s1);font-size:.875rem;color:var(--muted)}
.person-grid>.person-card:not(:has(>.person-photo)){grid-template-columns:minmax(0,1fr)}
.prose>h2:has(+.link-buttons){max-width:none;text-align:center}
/* Signposts (round 6): the title across the card, one short line, the action at the foot with the art beside it. The
   card rises and its art tilts on hover. */
.signpost{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 76px;grid-template-rows:auto 1fr auto;column-gap:12px;row-gap:12px;padding:24px 22px 20px;border-radius:var(--radius);transition:transform .35s var(--ease),box-shadow .35s var(--ease)}
.signpost h2{grid-column:1/-1;font-size:1.625rem;line-height:1.15;overflow-wrap:normal}
.signpost p{grid-column:1/-1;font-size:1.0625rem;line-height:1.5}
.signpost-action{grid-column:1;grid-row:3;align-self:end;padding-bottom:6px;color:var(--red-dark);font-weight:800;text-decoration:underline;text-underline-offset:.24em;transition:text-decoration-thickness .2s ease-out,text-underline-offset .2s ease-out}
.signpost img{grid-column:2;grid-row:3;align-self:end;width:76px;transition:transform .45s var(--ease)}
.signpost:is(:hover,:has(a:focus-visible)){transform:translateY(-4px);box-shadow:var(--lift)}
.signpost:is(:hover,:has(a:focus-visible)) img{transform:rotate(-8deg) scale(1.12)}
.signpost:is(:hover,:has(a:focus-visible)) .signpost-action{text-decoration-thickness:2px;text-underline-offset:.14em}
/* Fix round 5, suggestion 4: the heading is the card's link, so its name is the heading alone. As on the event cards,
   the link covers the card (the whole card stays clickable) and the focus ring goes around the card. */
.signpost h2 a::after{content:'';position:absolute;inset:0;z-index:1}
.signpost:has(a:focus-visible){outline:3px solid var(--focus);outline-offset:3px}
.signpost h2 a:focus-visible{outline:none}
.card-study{background:var(--tint-red)}
.card-volunteer{background:var(--tint-peach)}
.card-house{background:var(--tint-blue)}
.card-fund{background:var(--tint-green)}
.about-band{margin-top:var(--gap-section);padding:var(--band-pad) 0;background:var(--band-blue)}
/* Round 21 (Part C, Jonathan's example of the homemade look): Om ABF is one piece, not two halves: the photo on its
   stripe, and the words on a white card that overlaps the photo's edge (beside it on wide screens, over its foot on
   phones), topped by the band stripe. Both buttons sit on the card's centre axis. */
.about-band-inner{display:grid;grid-template-columns:minmax(0,1fr);align-items:center}
.about-band-photo img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover}
.about-band-copy{position:relative;z-index:4;margin:calc(-1 * var(--s5)) var(--s2) 0;padding:var(--s5) var(--s4) var(--s4);border-radius:var(--radius);background:var(--white);box-shadow:var(--raise);text-align:center}
.about-band-copy::before{content:'';position:absolute;top:0;left:var(--s4);right:var(--s4);height:5px;border-radius:0 0 3px 3px;background:var(--rainbow)}
.about-band-inner.no-photo>.about-band-copy{width:min(100%,48rem);margin:0 auto}
.about-band-copy>p{max-width:34em;margin:var(--s3) auto 0}
.about-band-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:12px var(--s4);margin-top:var(--s4)}
.newsletter-band{position:relative;margin-top:var(--gap-section);padding:var(--band-pad) 0;background:var(--band-blue)}
.newsletter-band-inner{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s4);align-items:center}
.newsletter-band-inner>:first-child{text-align:center}
.newsletter-band-inner>:first-child>p{margin-inline:auto}
.newsletter-band-inner p{max-width:34em;margin-top:var(--s3)}
.newsletter-form>label:not(.newsletter-consent){display:block;margin-bottom:6px;font-weight:800}
.newsletter-row{display:flex;gap:10px}
.newsletter-row input{flex:1}
.newsletter-consent{display:flex;align-items:flex-start;gap:9px;margin-top:14px;font-size:.9375rem;font-weight:400;line-height:1.45}
.newsletter-consent input{width:20px;height:20px;margin-top:2px;flex:none}
.partner-grid li{display:flex;align-items:center;justify-content:center;min-height:112px;padding:var(--s2);background:var(--white);border:1px solid var(--card-edge);border-radius:var(--radius);transition:transform .35s var(--ease),box-shadow .35s var(--ease),border-color .2s ease-out}
.partner-grid li:has(a):is(:hover,:has(a:focus-visible)){transform:translateY(-4px);border-color:#8fa1b2;box-shadow:var(--lift)}
.partner-grid img{display:block;max-height:72px;width:auto;object-fit:contain}
@media (width >= 37.5em){
  .newsletter-band-inner{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:var(--s5)}
  .about-band-copy{margin-inline:var(--s6);padding:var(--s6) var(--s5) var(--s5)}
}
@media (width >= 64em){
  .about-band-inner:not(.no-photo){grid-template-columns:repeat(12,minmax(0,1fr));padding-bottom:var(--s5)}
  .about-band-inner:not(.no-photo)>.about-band-photo{grid-column:1/9;grid-row:1}
  /* The card overlaps one column of the photo's lower edge, where the table is, so no face is covered. */
  .about-band-inner:not(.no-photo)>.about-band-copy{grid-column:8/13;grid-row:1;align-self:end;margin:0 0 calc(-1 * var(--s5));padding:var(--s6) var(--s5)}
}

/* Arrangemang, archives, Anmälan (7.2, 7.4, 7.5) */
.events-current>h2,.events-archive>h2{margin-bottom:var(--s3);text-align:center}
.events-archive>.archive-search{width:min(100%,44rem);margin-inline:auto}
.events-archive>.archive-count{text-align:center}
.events-band>.events-current+.events-current{margin-top:var(--gap-section)}
/* 23 Nov (Jonathan): the coming events are ordinary cards, four per row on a wide screen like every other list. */
.events-archive>*+*{margin-top:var(--s3)}
.archive-count,.library-count,.search-count,.archive-context,.archive-jump{color:var(--muted)}
/* Round 8: a count line sits one heading step above what it counts (Sök, Material, Arkiv, Medlemmar). */
.inner-content>:is(.search-count,.library-count)+*{margin-top:var(--s3)}
.archive-pages{display:flex;align-items:center;justify-content:center;gap:var(--s3);margin-top:var(--s5)}
.archive-pages a{display:inline-flex;align-items:center;min-height:44px;color:var(--red-dark);font-weight:800}
.archive-pages span{font-weight:800}
.signup-more{margin-top:var(--s3)}

/* Event post (7.3): poster left, facts and text right; on phones the poster comes first. */
.post-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s4)}
.post-content>*+*{margin-top:var(--s3)}
.post-content .page-title h1{font-size:clamp(2rem,1.6rem + 1.4vw,2.75rem)}
.local-poster{position:relative}
.poster-enlarge{position:relative;display:block}
.local-poster img{display:block;width:100%;border:1px solid var(--line)}
.poster-zoom-cue{position:absolute;top:16px;right:16px;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:#fffffff2;color:var(--ink);box-shadow:0 3px 14px #17232c26;pointer-events:none;transition:color .15s ease-out,transform .2s var(--ease)}
.poster-enlarge:is(:hover,:focus-visible) .poster-zoom-cue{color:var(--red-dark);transform:scale(1.08)}
/* A poster not yet saved as a picture: Canva's viewer in the poster's place, A4 like every such poster today, over the
   date tile, which shows through the empty frame until Canva paints (QA H2); the poster's link under it.
   ponytail: one shape; a design of another shape shows Canva's own margins until its picture is saved. */
.canva-frame{position:relative;aspect-ratio:1/1.4143;border:1px solid var(--line)}
.canva-frame>*{position:absolute;inset:0;width:100%;height:100%}
.canva-frame iframe{display:block;border:0;background:transparent}
.canva-poster figcaption{margin-top:8px}
.canva-poster figcaption a{display:inline-flex;align-items:center;min-height:44px;color:var(--red-dark);font-weight:800}
.post-media>*+*{margin-top:var(--s3)}
.post-media figure img{display:block;width:100%;border-radius:8px}
/* Round 21 (Jonathan: "this looks half finished"): the facts and the sign-up are one tinted panel under the site's
   three-colour line. Each fact is its label over its value and they flow in a row; the first one, the date or the days,
   leads on its own line. The sign-up button spans the panel. Centred on phones, like the title above it. */
.event-facts{position:relative;overflow:hidden;padding:calc(var(--s3) + 5px) var(--s3) var(--s3);border-radius:var(--radius);background:var(--band-blue)}
.event-facts::before{content:'';position:absolute;top:0;left:0;right:0;height:5px;background:var(--rainbow)}
.event-details{display:flex;flex-wrap:wrap;gap:var(--s2) var(--s4)}
.event-fact:first-child,.event-fact--wide{flex:1 0 100%}
.event-details dt{font-size:.875rem;font-weight:800;line-height:1.5;color:var(--muted)}
.event-details dd{font-size:1.125rem;line-height:1.4;overflow-wrap:anywhere}
.event-fact:first-child dd{font-size:1.625rem;font-weight:800;line-height:1.2;color:var(--red-dark);text-wrap:balance}
.event-signup{margin-top:var(--s3)}
.event-facts>.event-signup:first-child{margin-top:0}
.event-signup .button{display:flex;width:100%}
@media (width < 37.5em){.event-facts{text-align:center}.event-details{justify-content:center}}
/* The words lifted from a poster picture: open in the text column under a small quiet label, set off by one line. */
.poster-text{padding-top:var(--s3);border-top:1px solid var(--line)}
.poster-text>h2{margin-bottom:var(--s2);font-size:.9375rem;line-height:1.4;letter-spacing:0;color:var(--muted)}
/* A heading inside a post's own text sits on the column's left edge at panel-heading size (phones centre it). */
.source-links h2{font-size:1.375rem}
@media (width >= 37.5em){.post-content .prose>h2{font-size:1.375rem;text-align:start;margin-inline:0}}
.source-links ul{margin-top:8px;padding-left:1.3em}
.event-publication{margin-top:var(--s3);padding-top:var(--s2);border-top:1px solid var(--line);font-size:.9375rem;color:var(--muted)}
@media (width >= 37.5em){.post-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start}}
@media (width >= 75em){.post-layout{grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:var(--s5)}}

/* Om ABF and its family pages (7.6–7.18): every section at the full content width, text at reading width. */
.family-sections{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--gap-section)}
.family-section>h2{margin-bottom:var(--s3)}
.family-section>*+*:not(h2){margin-top:var(--s3)}
.about-intro>.fact-strip{margin-top:0;margin-bottom:var(--gap-block)}
.alliance-line{display:flex;flex-wrap:wrap;align-items:center;gap:var(--s3);max-width:var(--measure)}
.alliance-line p{flex:1 1 12rem;min-width:0}
.alliance-line figure{flex:none;width:120px}
/* Om ABF, Hur det började (round 6): three years from Historik as a short timeline in the rainbow's colours. */
.about-teaser{text-align:center}
.about-teaser-copy>*+*{margin-top:var(--s3)}
.about-teaser .prose>p{margin-inline:auto}
.teaser-timeline{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s4);margin:var(--s4) 0 0;padding:0;list-style:none;text-align:left}
.teaser-timeline li{display:grid;align-content:start;justify-items:center;gap:8px;text-align:center}
.teaser-timeline strong{font-size:2.75rem;font-weight:800;line-height:1;letter-spacing:-.025em}
@media (width >= 37.5em){.teaser-timeline{grid-template-columns:repeat(3,minmax(0,1fr))}}
.about-documents>h2{margin-bottom:var(--s3)}
.about-documents-more{display:flex;flex-wrap:wrap;align-items:center;gap:12px var(--s4)}
.about-documents-more a:not(.button){display:inline-flex;align-items:center;min-height:44px;color:var(--red-dark);font-weight:800}
.family-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px var(--s3)}

/* Historik, Bildning, Stadgar, Dataskydd, Tillgänglighet (7.7, 7.8, 7.13, 7.22) */
.reading-body>.history-label+h2{margin-top:12px}
.timeline-entry{display:grid;grid-template-columns:minmax(0,1fr);gap:4px}
.timeline-year{font-size:1.5rem;font-weight:800;line-height:1.1;letter-spacing:-.025em;color:var(--red-dark);white-space:nowrap}
.timeline-entry>p:not(.timeline-year){max-width:var(--measure)}
.history-signature{font-weight:800}
.prose .pull-quote,.pull-quote{max-width:28em;border-radius:0;margin-block:var(--s4);padding:var(--s3) 0 0;background:linear-gradient(var(--lavender),var(--lavender)) 0 0/56px 5px no-repeat;font-size:1.5rem;font-weight:800;line-height:1.35;letter-spacing:-.02em}
/* Bildning (round 21, Jonathan: "this page is broken in several places"): one centred column of text under the title.
   The lead, the paragraphs and the closing card share its left edge; before, a wider box, a centring rule and a floated
   quote pulled them onto three edges and let the quotes squeeze the text. From 1366 px a pull quote hangs in the right
   margin beside the paragraph it comes from, outside the column; narrower screens show it between the paragraphs. */
.reading-wrap{max-width:var(--measure);margin-inline:auto;font-size:clamp(1.125rem,1rem + .25vw,1.375rem)}
/* Long reading text grows with the screen (18 px on a small laptop, 22 px on a large monitor; the column is set in em,
   so it widens with it) and gets more air: Jonathan found it crammed on a 4K screen. */
.reading-text{line-height:1.7}
.reading-text>*+*{margin-top:1.15em}
@media (width >= 85.375em){.reading-text>:is(p,blockquote).pull-quote{float:right;clear:right;width:280px;margin:.25em calc(-280px - var(--s5)) var(--s3) var(--s5)}}
.reading-lead{font-size:1.3em;line-height:1.45}
.end-card{display:grid;grid-template-columns:minmax(0,1fr);gap:4px;max-width:var(--measure);margin-top:var(--gap-block);padding:var(--s3);text-decoration:none}
.end-card-label{font-size:.9375rem;font-weight:800;color:var(--red-dark)}
/* The title is only as wide as its words, so the hover underline sits under the title and does not cut across the card. */
.end-card strong{justify-self:start;font-size:1.5rem}
.statute-title{font-size:1.25rem;font-weight:800}
.statute-chapter{margin-top:var(--s5)}
.statute-chapter-number{color:var(--red-dark)}
.statute-section{max-width:var(--measure);margin-top:var(--s3)}
.statute-section h3{margin-bottom:8px;font-size:1.125rem}
.statute-section>*+*{margin-top:.8em}
.lettered{padding:0;list-style:none}
.lettered li+li{margin-top:.35em}
.statute-note{max-width:var(--measure);margin-top:var(--s5);font-size:.9375rem;color:var(--muted)}
/* Document text pages (7.24): a table wider than the text scrolls inside its own region (the region takes keyboard focus). */
.document-table{overflow-x:auto}
@media (width >= 75em){
  .history-text .reading-body{padding-left:8rem;background:linear-gradient(var(--lavender),var(--lavender)) 6.5rem 0/3px 100% no-repeat}
  .timeline-entry{position:relative;display:block}
  .timeline-year{position:absolute;top:-.05em;right:calc(100% + 2.5rem);text-align:right}
  .timeline-year::after{content:'';position:absolute;top:.3em;right:-1.5rem;width:13px;height:13px;border-radius:50%;background:var(--red);box-shadow:0 0 0 4px var(--paper)}
}

/* Styrelse, Medlemskap, Medlemmar (7.9–7.11) */
/* Round 8: one heading size per role on every page. A section heading has the h2 size; the heading of a card, a band card
   or a side panel has the signpost size; a small item's title (an event, a document, a person) has the h3 size. */
:is(.fund-cards>.fund-section,.colour-band-copy,.text-aside:not(.text-aside--half)>:last-child)>h2{font-size:min(1.625rem,9cqi)}
/* Styrelse (rebuilt 19 Nov): one compact role list, centred at the reading width. A description list: the role in the bold
   weight in a fixed left column, the names beside it one per line, a hairline between the rows. On phones the role stands
   on its own line over its names, on the same left edge. A name breaks only between words. */
.board-roles{width:100%;max-width:45rem;margin-inline:auto}
.role-list{margin:var(--s4) 0 0;border-top:1px solid var(--line)}
.role-list>div{display:grid;grid-template-columns:minmax(0,1fr);gap:0 var(--s4);padding:var(--s2) 0;border-bottom:1px solid var(--line)}
.role-list dt{font-weight:800}
.role-list dd{margin:0;-webkit-hyphens:none;hyphens:none}
.board-role{color:var(--muted)}
@media (width >= 37.5em){.role-list>div{grid-template-columns:14rem minmax(0,1fr)}.role-list dd{grid-column:2}}
.member-directory>h2{margin-bottom:var(--s3);text-align:center}
.member-find{max-width:40rem;margin-inline:auto}
.member-find label,.archive-search label{text-align:center}
.member-find a{display:inline-flex;align-items:center;min-height:44px;color:var(--red-dark);font-weight:800}
.member-letters{display:flex;flex-wrap:wrap;justify-content:center;gap:2px;margin:var(--s3) 0}
.member-letters>div{display:contents}
.member-letters a{display:grid;place-items:center;min-width:44px;min-height:44px;padding:0 8px;border-radius:var(--radius-small);color:var(--ink);font-weight:800;text-decoration:none;transition:background-color .2s ease-out,color .2s ease-out}
.member-letters a:is(:hover,:focus-visible){background:var(--band-blue)}
.member-letters a[aria-current]{background:var(--ink);color:var(--white)}
.member-letters a[hidden],.member-entry[hidden]{display:none}
.member-empty{text-align:center;color:var(--muted)}
.member-entry a{display:inline-flex;align-items:center;min-height:32px}
.member-directory>p[role="status"]{margin:var(--s3) 0;color:var(--muted);text-align:center}
.member-entry h3{font-size:1.25rem}
.member-entry>*+*{margin-top:8px}

/* Möjligheter, Studiecirklar, Volontär, Föreningshuset, Lokalbokning (7.12, 7.14, 7.15, 7.18, 7.19) */
.rules-list{max-width:var(--measure);padding-left:1.3em}
.rules-list li{break-inside:avoid}
@media (width >= 75em){.study-rules .rules-list{max-width:none;columns:2;column-gap:var(--s7)}.study-rules .rules-list>.col-break{break-before:column;margin-top:0}}
.rules-list li+li{margin-top:.35em}
.rooms-heading{margin-top:var(--s5)}

/* Volontär och Erasmus+ (7.15): year cards with one photo area of the same height. */
.year-card{display:flex;flex-direction:column;overflow:hidden}
.year-card-photos{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);aspect-ratio:4/3;min-height:0;overflow:hidden;background:var(--picture)}
.year-card-photos figure,.year-card-photos picture{height:100%}
.year-card-photos img{display:block;width:100%;height:100%;object-fit:cover}
.year-card-photos.is-empty{place-items:center;background:linear-gradient(135deg,var(--tint-blue),var(--band-mint) 50%,var(--band-lavender));font-size:1.5rem;font-weight:800;letter-spacing:-.03em}
.year-card-body{padding:var(--s2) 18px 18px}
.year-card-body h3{font-size:1.25rem;color:var(--red-dark)}
.year-card-body ul{margin-top:6px;padding:0;list-style:none}
.year-card-body .prose{margin-top:8px;font-size:.9375rem}
.calendar-block>h2{margin-bottom:var(--s3);text-align:center}
.calendar-block iframe{display:block;width:100%;height:600px;border:1px solid var(--line);border-radius:var(--radius);background:var(--white)}
/* WCAG audit F2: every frame (calendar, map, Canva, YouTube) shows the focus ring. A frame whose content holds the focus
   matches only :focus-within (measured in Chromium: not :focus, not :focus-visible). */
iframe:focus-within{outline:3px solid var(--focus);outline-offset:3px}
.calendar-links{display:flex;flex-wrap:wrap;justify-content:center;gap:8px var(--s3);margin-bottom:12px}
.calendar-block a{display:inline-flex;align-items:center;min-height:44px;color:var(--red-dark);font-weight:800}
/* The skip link shows when a keyboard reaches it (QA M3). */
.skip-calendar:not(:focus){position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Material, Minnesfond, Kontakt (7.16, 7.17, 7.20) */
.library-filters{display:grid;gap:16px;margin:8px 0 20px;padding:26px 0;border-bottom:1px solid var(--card-line);align-items:end}
.library-group h2{margin-bottom:var(--s3)}
.library-year{margin-top:var(--s4);padding-bottom:6px;border-bottom:2px solid var(--blue);font-size:1.375rem}
.material-projects>h2{margin-bottom:var(--s3);text-align:center}
.projects-intro{margin-bottom:var(--s4);text-align:center}
.project-card{display:flex;flex-direction:column;overflow:hidden}
.project-picture.is-empty{background:linear-gradient(135deg,var(--tint-blue),var(--band-mint) 50%,var(--band-lavender))}
.project-picture.is-empty .library-file-mark{width:84px;height:104px;padding-bottom:16px;font-size:1rem}
.material-films>.film-card{max-width:none}
.project-body{display:flex;flex-direction:column;gap:10px;padding:18px 20px 20px}
.project-body h3{font-size:1.25rem}
.project-thumbs{display:flex;flex-wrap:wrap;gap:8px}
.project-thumbs img{display:block;width:72px;height:72px;object-fit:cover;border-radius:6px}
.project-links{margin:0;padding:0;list-style:none}
.project-links a{display:inline-block;padding-block:10px;color:var(--red-dark);font-weight:800}
.project-format{font-weight:400}
.material-films{margin-top:var(--s5)}
.film-channel{margin-top:var(--s3);text-align:center}
/* Round 22: Projekt: ongoing projects on bands, one under the other; completed ones as Material's project cards. */
.project-group>h2{margin-bottom:var(--s4);text-align:center}
.project-group+.project-group{margin-top:var(--s6)}
.project-group>.colour-band+.colour-band{margin-top:var(--s4)}
.project-band .colour-band-copy>h3{font-size:min(1.625rem,9cqi)}
.project-band .colour-band-copy>h3+*{margin-top:var(--s2)}
/* Walkthrough 19 Nov: a project's links stand one under the other, so three never wrap as two and one alone. */
.project-band .colour-band-actions{flex-direction:column;align-items:center}
/* 30 Nov (Jonathan): a project's document card is centred, like everything else on its band. */
.project-band .library-results>li{display:flex;flex-direction:column;align-items:center;gap:var(--s2);text-align:center}
.project-band .library-actions{justify-content:center}
.projects-empty{margin-top:var(--s5);color:var(--muted);text-align:center}
/* 29 Nov: a project band shows the project picture beside its text; a project own page has its text, documents and the logo of its funder. */
.colour-band-photo{justify-self:center;width:min(480px,100%)}
.colour-band-photo img{display:block;width:100%;height:auto;border-radius:var(--radius-small)}
.project-page>.prose{max-width:var(--measure);margin-inline:auto}
.project-page>.prose>h2{text-align:start}
.project-intro-photo{width:min(460px,100% - 24px);margin-inline:auto}
.project-intro-photo img{display:block;margin-inline:auto}
.project-intro-photo figcaption{margin-top:var(--s1);font-size:.875rem;line-height:1.45;color:var(--muted);text-align:center}
.project-logo{width:min(280px,70%);margin-inline:auto}
.project-logo img{display:block;width:100%;height:auto}
/* Round 22: the search sits above the archive, a quiet compact row (no rule above it; the archive's heading follows). */
.library-search-archive{margin-top:var(--s5)}
.library-search-archive .library-filters{margin:0 0 8px;padding:20px 24px;border:1px solid var(--card-edge);border-radius:var(--radius);background:var(--band-blue)}
@media (width >= 37.5em){
  .library-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
  .library-filters>div:first-child{grid-column:1/-1}
}
@media (width >= 75em){
  .library-filters{grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr) auto auto}
  .library-filters>div:first-child{grid-column:auto}
}
/* In-page jumps (Minnesfond, round 6): quiet text links under the subpage row, not a second row of pills. */
.example-jumps{justify-content:center;gap:0 var(--s4);margin-top:var(--s2)}
.example-jumps>*{flex:0 0 auto}
.example-jumps a{display:inline-flex;align-items:center;min-height:44px;color:var(--red-dark);font-weight:800;text-decoration:underline}
.fund-reading{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--gap-section)}
.fund-section>h2{margin-bottom:var(--s3)}
.fund-section>*+*:not(h2){margin-top:var(--s2)}
.fund-note{font-size:.9375rem;color:var(--muted)}
.fund-steps>li>p{max-width:var(--measure)}
.contact-card h3{margin-bottom:8px}
.contact-card>p+p{margin-top:8px}
.contact-card>p{max-width:var(--measure)}
.contact-actions{display:grid}
.contact-actions a{display:flex;align-items:center;min-height:44px;color:var(--red-dark);font-weight:800}
.contact-details>h2{margin-bottom:var(--s3)}
/* Kontakt's four cards (G3 A7): the details at the metadata size (S3), so the longest line fits four across from 1366 px;
   narrower, two by two, and one per row where two would squeeze an e-mail address. */
.contact-cards .contact-card>p{font-size:1rem}
.contact-card .social-links{margin-top:8px}
@container list (width < 76.5rem){:where(.contact-cards:has(>:nth-child(4):last-child))>*{--cols:2}}
/* Five cards (a third contact, 10 Nov) never stand five across: an e-mail address broke in the middle at 235 px. Three and
   two, the short row centred. */
:where(.contact-cards:has(>:nth-child(5):last-child))>*{--cols:3}
@container list (width < 37.25rem){:where(.contact-cards)>*{--cols:1}}

/* Sök and 404 (7.21, 7.23) */
.site-search-form{max-width:44rem;margin-inline:auto}
.return-home{text-align:center}
.return-home a{display:inline-flex;align-items:center;min-height:44px}
.search-results{container:results/inline-size;display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s3);margin:0;padding:0;list-style:none}
.search-results>li{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s2);padding-bottom:var(--s3);border-bottom:1px solid var(--line)}
.search-results>li.has-thumb{grid-template-columns:96px minmax(0,1fr)}
.search-results>li>div>h2{margin-top:8px;font-size:1.375rem}
.search-results p{max-width:var(--measure);margin-top:6px}
.search-thumb img{display:block;width:96px;aspect-ratio:3/4;object-fit:cover;border-radius:6px}
/* On a phone the picture is smaller, so a long name such as "Parkgatan/Skillnadsgatan" still fits beside it. */
@container results (width < 22rem){.search-results>li.has-thumb{grid-template-columns:64px minmax(0,1fr)}.search-thumb img{width:64px}}
.search-empty>*+*{margin-top:12px}
.search-suggestions{display:flex;flex-wrap:wrap;gap:8px 20px}
.search-suggestions a,.return-home a{color:var(--red-dark);font-weight:800}
/* A15: "Menade du …?" above the results for the closest word. */
.search-suggestion{max-width:var(--measure);margin-top:var(--s3);font-size:1.125rem}
.search-suggestion a{color:var(--red-dark);font-weight:800}

/* Round 12, his picks from the rainbow ideas. ------------------------------------------------------------------ */
/* The title ribbon once more as a divider before the closing section of a long page (the map, the documents, the
   links, the materials, the record of grants); not before a coloured band, which has its own colour. */
@media screen{
  :is(.family-sections+section,.family-sections:has(>:nth-child(5))>section:last-child:not(.bleed),.fund-reading:has(>:nth-child(5))>section:last-child,.inner-content>section:nth-of-type(n+4):last-child:not(.bleed))::before{content:'';display:block;width:100vw;max-width:none;aspect-ratio:1366/88;margin:0 calc(50% - 50vw) var(--gap-block);background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1366 88' preserveAspectRatio='none' fill='none' stroke-width='13'%3E%3Cpath stroke='%233d95e2' d='M0 8H409.8C792.28 8 956.2 46 1366 46'/%3E%3Cpath stroke='%235ec5b4' d='M0 25H409.8C792.28 25 956.2 63 1366 63'/%3E%3Cpath stroke='%23c9bbf4' d='M0 42H409.8C792.28 42 956.2 80 1366 80'/%3E%3C/svg%3E") center/100% 100% no-repeat}
}
@media screen and (width < 75em){
  :is(.family-sections+section,.family-sections:has(>:nth-child(5))>section:last-child:not(.bleed),.fund-reading:has(>:nth-child(5))>section:last-child,.inner-content>section:nth-of-type(n+4):last-child:not(.bleed))::before{width:1366px;height:88px;aspect-ratio:auto;margin-inline:calc(50% - 683px)}
}
/* A big soft rainbow wave under the first section where a text stands beside its panel: it rises behind the panel on
   the right and runs low through its own space under the section on the left, so it never crosses the text. Wide
   screens only (on phones the columns stack and there is no empty side). */
@media screen and (width >= 75em){
  .family-section:has(>.text-aside:not(.text-aside--half)):not(.family-section:has(>.text-aside:not(.text-aside--half))~.family-section){position:relative;isolation:isolate;padding-bottom:120px}
  .family-section:has(>.text-aside:not(.text-aside--half)):not(.family-section:has(>.text-aside:not(.text-aside--half))~.family-section)::after{content:'';position:absolute;z-index:-1;left:50%;bottom:calc(-1 * var(--gap-section));width:100vw;height:calc(280px + var(--gap-section));transform:translateX(-50%);background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 460' preserveAspectRatio='none' fill='none' stroke-width='44'%3E%3Cpath stroke='%233d95e2' d='M-40 270C240 220 520 350 820 300S1180 60 1480 90'/%3E%3Cpath stroke='%235ec5b4' d='M-40 318C240 268 520 398 820 348S1180 108 1480 138'/%3E%3Cpath stroke='%23c9bbf4' d='M-40 366C240 316 520 446 820 396S1180 156 1480 186'/%3E%3C/svg%3E") center/100% 100% no-repeat;opacity:.3;pointer-events:none}
}

/* Phones (round 6c) ------------------------------------------------------------------------------------------------- */
@media (width < 37.5em){
  .page-title-copy{text-align:center}
  main :is(h2,h3):not(:is(.event-card,.member-entry,.contact-card,.library-results>li,.document-items>li,.person-card,.year-card,.fund-cards>.fund-section,.signpost,.project-card,.project-page>.prose,.search-results>li,.finding-links,.end-card,.picker) *){text-align:center}
  main :is(.history-label,.fund-kicker,.fact-strip-label){display:block;width:fit-content;margin-inline:auto}
  .canva-poster figcaption,.film-caption,.film-note{text-align:center}
  .about-documents-more{justify-content:center}
  .fund-cards .fund-kicker{margin-inline:0}
  @container list (width >= 30rem){:where(.film-grid)>*{--cols:2}}
  @container list (width >= 30rem){.film-grid .video-preview button{left:8px;bottom:8px;padding:8px 12px;font-size:.875rem}}
  .page-title :is(h1,.page-title-lead){margin-inline:auto}
  .section-heading{flex-direction:column;align-items:center;text-align:center}
  .section-heading-actions{justify-content:center}
  .newsletter-band-inner>div:first-child{text-align:center}
  .newsletter-band-inner>div:first-child>p{margin-inline:auto}
  .footer-inner,.footer-bottom{text-align:center}
  .footer-legal{justify-items:center;text-align:center}
  .footer-inner>div>a,.footer-bottom,.footer-bottom .social-links{justify-content:center}
  .footer-inner img{margin-inline:auto}
}
/* Below 1024 px the hero's text stands above its picture: centred like the page titles. */
@media (width < 64em){.hero-copy{text-align:center}.hero-copy>p{margin-inline:auto}.section-heading{flex-direction:column;align-items:center;text-align:center}.section-heading-actions{justify-content:center}}
/* A card without a picture keeps a short tinted strip on a phone, where cards stand one per row (round 6c). */
@container list (width < 30rem){.year-card-photos.is-empty{aspect-ratio:5/2}}
/* Phones (round 6c): an event card is one row, its picture beside its text, so a list of events reads like a calendar
   instead of a column of tall pictures; the title link still covers the card. Short facts stand side by side, the
   rooms 3 + 2 and the environment tiles 2 + 2 where they fit. */
@media (width < 37.5em){
  /* 23 Nov (Jonathan): event cards are two across on phones too, the picture above the text. A long Swedish word in a
     title (Julkranstillverkning) is hyphenated here, because the card is only about 160 px wide. */
  :where(.grid--events){--cols:2;--gap:12px}
  .event-card-picture.is-empty{padding:8px;font-size:1rem;text-align:center}
  .event-card-body{gap:3px;padding:10px 10px 12px}
  .event-card-when{font-size:1rem}
  .event-card h3{font-size:.9375rem;hyphens:auto;overflow-wrap:anywhere}
  .event-card-facts{font-size:.8125rem}
  .event-card-facts li{gap:5px}
  .event-card-facts svg{width:14px;height:14px}
  .event-card-action{padding-top:6px;font-size:.875rem}
  .event-card>.event-tag{top:6px;left:6px;padding:1px 7px;font-size:.75rem}
  .fact-strip strong{font-size:clamp(1.5rem,7cqi,2.25rem)}
  @container list (width >= 26rem){
    :where(.fact-strip--short:has(>:nth-child(3):last-child))>*{--cols:3}
    .fact-strip--short:has(>:nth-child(3):last-child) strong{font-size:clamp(1.375rem,6cqi,2rem)}
  }
}
/* Touch screens get 44 px rows in the footer too. */
@media (pointer: coarse){.footer-inner>div>a{min-height:44px}}

/* Accessibility and print ---------------------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}
@media (forced-colors: active){
  .button,.video-preview button,.menu-actions a,.social-links a,.event-card,.project-card,.signpost,.partner-grid li,.colour-band,.library-results>li,.cookie-notice,.text-aside:not(.text-aside--half)>:last-child{border:1px solid CanvasText!important}
  .site-footer::before,.newsletter-band::before,.hero-art::after,.event-facts::before{background:CanvasText!important}
  /* The room's edge is the light page colour, which the forced page background is not: the hero goes without the room. */
  .hero-room,.hero-room-edge{display:none}
  .filter-row a[aria-current]{border-width:3px!important}
  :is(.section-tabs,.year-tabs,.search-tabs,.picker-list) a[aria-current]{text-decoration:underline 3px}
}
@media print{
  .site-navigation,.header-utilities,.menu-toggle,.site-footer,.brand-ribbon,.hero-art,.image-viewer,.newsletter-band,.statute-contents,.reading-contents{display:none}
  body{background:var(--white)}
  .post-layout,.reading-layout,.statutes,.timeline-entry{display:block}
  .statute-section{break-inside:avoid}
}

/* A13: the cookie notice, a small card at the bottom of the window until OK. */
.cookie-notice{position:fixed;z-index:30;inset:auto var(--gutter) var(--gutter);display:flex;flex-wrap:wrap;align-items:center;gap:var(--s2) var(--s3);max-width:44rem;margin-inline:auto;padding:var(--s2) var(--s3);background:var(--white);border-radius:var(--radius);box-shadow:0 8px 28px -6px rgb(0 0 0 / .28)}
.cookie-notice[hidden]{display:none}
.cookie-notice p{flex:1 1 18rem;font-size:.9375rem;line-height:1.45}
.cookie-notice a{color:var(--red-dark);font-weight:800}
/* Front page, Från verksamheten: under the pictures, the button to the rest of them and the link to Facebook. */
.home-gallery-more{display:flex;flex-wrap:wrap;gap:var(--s2) var(--s3);align-items:center;justify-content:center;margin-top:var(--s4)}

/* 23 Nov, after the site review. */
/* The three places that did not answer the pointer now do, in the family's own way (round 21): the logo lifts a
   little, the language switch gets the underline every text link has, and a contents link turns red with its line. */
@media (prefers-reduced-motion: no-preference){.site-logo img{transition:transform .35s var(--ease)}}
.site-logo:is(:hover,:focus-visible) img{transform:translateY(-2px)}
.language-switch:is(:hover,:focus-visible){text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:.3em}
:is(.reading-contents,.statute-contents) a:not(.button):is(:hover,:focus-visible){color:var(--red-dark)}
/* An event card's picture area is square: a poster shows about its top two thirds instead of half, so far fewer
   titles are cut through. The large coming events and their side-by-side layout keep their own shape. */
.event-card-picture{aspect-ratio:1}
/* The cookie notice is one slim row on phones (it took about a fifth of the screen). */
@media (width < 37.5em){
  .cookie-notice{flex-wrap:nowrap;gap:12px;inset:auto 10px 10px;padding:10px 12px}
  .cookie-notice p{flex:1 1 0;font-size:.8125rem;line-height:1.35}
  .cookie-notice .button{flex:none;min-height:44px;padding-inline:14px}
}
