/* =====================================================================
   wiwpl.org — Fundacja Wspierania Integracji Wietnamczyków w Polsce
   One stylesheet · no JavaScript · no external resources
   Mobile first: 360 → 768 → 1200 px · light + dark · reduced motion
   ===================================================================== */

/* ---------- 1. Fonts (self-hosted Be Vietnam Pro, SIL OFL 1.1) -------
   Put the 9 .woff2 files in /media/fonts/. Each weight is split into
   latin / latin-ext (Polish) / vietnamese; the browser downloads only
   the parts a page needs.                                               */
@font-face {
  font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/media/fonts/be-vietnam-pro-vietnamese-400-normal.woff2") format("woff2");
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}
@font-face {
  font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/media/fonts/be-vietnam-pro-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/media/fonts/be-vietnam-pro-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/media/fonts/be-vietnam-pro-vietnamese-600-normal.woff2") format("woff2");
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}
@font-face {
  font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/media/fonts/be-vietnam-pro-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/media/fonts/be-vietnam-pro-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/media/fonts/be-vietnam-pro-vietnamese-700-normal.woff2") format("woff2");
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}
@font-face {
  font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/media/fonts/be-vietnam-pro-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/media/fonts/be-vietnam-pro-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ---------- 2. Palette ---------------------------------------------- */
/* Token meanings:
   --bg          page background
   --card        cards, hero
   --ink         body text
   --muted       secondary text
   --line        borders
   --brand       structure: links, headings, active menu
   --on-brand    text on --brand
   --brand-soft  tinted surfaces (1.5% box, note)
   --accent      red: dates, CTA button
   --on-accent   text on --accent
   --sun         yellow: stripe, dots, focus halo — never text on light
   --head-bg     header background
   --head-ink    header text
   --foot-bg     footer background
   --foot-ink    footer text
   --foot-muted  footer small text
   --brand-arm   blue arm of the logo motif (EU)
   --focus       focus ring
   --focus-halo  outer focus halo
   Alternatives: swap this block for one from wiwpl-palettes.css. */
/* Palette “Papier” — Light header, blue structure, deep-blue footer
   WCAG 2.2 contrast, light:
     Body text                  --ink on --bg: 15.68:1
     Text on card               --ink on --card: 17.07:1
     Muted on bg                --muted on --bg: 6.21:1
     Muted on card              --muted on --card: 6.77:1
     Links/headings on bg       --brand on --bg: 9.7:1
     Links on card              --brand on --card: 10.56:1
     Dates/accent on bg         --accent on --bg: 5.71:1
     Accent on card             --accent on --card: 6.22:1
     Active menu item           --on-brand on --brand: 10.56:1
     CTA button                 --on-accent on --accent: 6.22:1
     Brand on tint              --brand on --brand-soft: 9.09:1
     Text on tint               --ink on --brand-soft: 14.69:1
     Header text                --head-ink on --head-bg: 10.56:1
     Footer text                --foot-ink on --foot-bg: 14.11:1
     Footer small text          --foot-muted on --foot-bg: 9.09:1
     Focus ring (≥3:1)          --focus on --bg: 9.7:1
   dark:
     Body text                  --ink on --bg: 15.95:1
     Text on card               --ink on --card: 14.6:1
     Muted on bg                --muted on --bg: 7.97:1
     Muted on card              --muted on --card: 7.3:1
     Links/headings on bg       --brand on --bg: 9.32:1
     Links on card              --brand on --card: 8.53:1
     Dates/accent on bg         --accent on --bg: 8.1:1
     Accent on card             --accent on --card: 7.42:1
     Active menu item           --on-brand on --brand: 9.32:1
     CTA button                 --on-accent on --accent: 8.38:1
     Brand on tint              --brand on --brand-soft: 7.47:1
     Text on tint               --ink on --brand-soft: 12.78:1
     Header text                --head-ink on --head-bg: 12.0:1
     Footer text                --foot-ink on --foot-bg: 16.6:1
     Footer small text          --foot-muted on --foot-bg: 8.3:1
     Focus ring (≥3:1)          --focus on --bg: 12.81:1
   --sun (yellow) is decoration only: never text on light backgrounds. */
:root {
  --bg:         #F8F5EE;
  --card:       #FFFFFF;
  --ink:        #161B2E;
  --muted:      #555B6D;
  --line:       #E2DCCF;
  --brand:      #0030A8;
  --on-brand:   #FFFFFF;
  --brand-soft: #E9EEFA;
  --accent:     #C01717;
  --on-accent:  #FFFFFF;
  --sun:        #F0D800;
  --head-bg:    #FFFFFF;
  --head-ink:   #0030A8;
  --foot-bg:    #0B2370;
  --foot-ink:   #FFFFFF;
  --foot-muted: #C5CFEE;
  --focus:      #0030A8;
  --brand-arm:  #0030A8;
  --focus-halo: #F0D800;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg:         #0F1320;
    --card:       #171C2C;
    --ink:        #ECEEF3;
    --muted:      #A4AABB;
    --line:       #2A3146;
    --brand:      #9DB6FF;
    --on-brand:   #0F1320;
    --brand-soft: #1D2645;
    --accent:     #FF8A7E;
    --on-accent:  #1A0B0A;
    --sun:        #F0D800;
    --head-bg:    #141A2B;
    --head-ink:   #C9D6FF;
    --foot-bg:    #0A0E19;
    --foot-ink:   #ECEEF3;
    --foot-muted: #A4AABB;
    --focus:      #F0D800;
    --brand-arm:  #8EA9FF;
    --focus-halo: transparent;
  }
}


:root {
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto,
          "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --wrap: 1160px;
  --gutter: 20px;
  /* THE MOTIF — the logo's three figures, each a head with arms
     outstretched, holding hands in one embrace: red arms + yellow head
     (Vietnam), red arms + white head (Poland), blue arms + yellow head (EU). Used as a line ("--arms"),
     a small mark before section headings and a faint ring in the hero.  */
  --head-ring: color-mix(in srgb, var(--ink) 30%, transparent);
  --arms:
    radial-gradient(circle, var(--sun) 0 4px, transparent 4.5px) calc(16.667% - 6px) 50% / 10px 10px no-repeat,
    radial-gradient(circle, #fff 0 3px, var(--head-ring) 3.2px 4.5px, transparent 5px) 50% 50% / 10px 10px no-repeat,
    radial-gradient(circle, var(--sun) 0 4px, transparent 4.5px) calc(83.333% + 6px) 50% / 10px 10px no-repeat,
    linear-gradient(var(--accent) 0 0) 0 50% / calc(33.333% - 6px) 4px no-repeat,
    linear-gradient(var(--accent) 0 0) 50% 50% / calc(33.333% - 6px) 4px no-repeat,
    linear-gradient(var(--brand-arm) 0 0) 100% 50% / calc(33.333% - 6px) 4px no-repeat;
  --mark:
    radial-gradient(circle, var(--sun) 0 3.5px, transparent 4px) 6.5px 50% / 8px 8px no-repeat,
    radial-gradient(circle, #fff 0 2.5px, var(--head-ring) 2.7px 3.8px, transparent 4.2px) 30.5px 50% / 8px 8px no-repeat,
    radial-gradient(circle, var(--sun) 0 3.5px, transparent 4px) 54.5px 50% / 8px 8px no-repeat,
    linear-gradient(var(--accent) 0 0) 0 50% / 21px 3px no-repeat,
    linear-gradient(var(--accent) 0 0) 24px 50% / 21px 3px no-repeat,
    linear-gradient(var(--brand-arm) 0 0) 48px 50% / 21px 3px no-repeat;
  color-scheme: light dark;
}
@media (min-width: 768px)  { :root { --gutter: 32px; } }
@media (min-width: 1200px) { :root { --gutter: 40px; } }

/* ---------- 3. Base -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;          /* 17 px */
  line-height: 1.65;             /* room for stacked Vietnamese tones: ỗ ậ ừ */
  font-feature-settings: "kern";
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 1200px) { body { font-size: 1.125rem; } }

/* Long Polish words: hyphenate by language, never overflow */
:lang(pl) { hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 8 4 3; }
:lang(vi) { hyphens: manual; }   /* Vietnamese words are short syllables */

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  line-height: 1.25;             /* never below 1.2: tone marks collide */
  font-weight: 700;
  color: var(--ink);
  text-wrap: balance;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(1.75rem, 1.25rem + 2.4vw, 2.875rem); }
h2 { font-size: clamp(1.375rem, 1.15rem + 1vw, 1.875rem); }
h3 { font-size: clamp(1.125rem, 1.05rem + .4vw, 1.3125rem); }

p, ul, ol, dl, figure { margin: 0 0 1em; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }

img { max-width: 100%; height: auto; display: block; }

time, .when { font-variant-numeric: tabular-nums; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 7px var(--focus-halo);
  border-radius: 4px;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 10;
  background: var(--brand); color: var(--on-brand);
  padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600;
}
.skip:focus { top: 8px; }

/* ---------- 4. Header ----------------------------------------------- */
header {
  position: relative;
  background: var(--head-bg);
  color: var(--head-ink);
  border-bottom: 1px solid var(--line);
}
header::before {                 /* three arms, one line — always on a light band */
  content: ""; display: block; height: 22px; padding: 6px var(--gutter);
  background: var(--arms), var(--card);
  background-origin: content-box;
}
header .head-row {
  display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap;
  padding-block: 12px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  flex: 1 1 100%; min-width: 0;
  color: var(--head-ink); text-decoration: none;
}
.brand img {                     /* the logo always sits on its own white disc */
  width: 52px; height: 52px; flex: none;
  background: #fff; border-radius: 50%; padding: 3px;
  box-shadow: 0 0 0 1px var(--line);
}
.brand strong {
  display: block; font-size: .9375rem; line-height: 1.3; font-weight: 700;
  hyphens: manual;               /* the name is never hyphenated */
}
.brand .alt {                    /* the foundation name in the 2nd language */
  display: none; font-size: .8125rem; line-height: 1.35; font-weight: 400;
  opacity: .82;
}

.lang { display: flex; gap: 4px; margin-left: auto; }
.lang a {
  display: inline-grid; place-items: center;
  min-width: 44px; min-height: 44px; padding: 0 8px;
  border-radius: var(--radius-sm);
  color: var(--head-ink); text-decoration: none;
  font-size: .875rem; font-weight: 600; letter-spacing: .04em;
}
.lang a:hover { background: color-mix(in srgb, var(--head-ink) 10%, transparent); }
.lang a[aria-current] { box-shadow: inset 0 0 0 2px currentColor; }

/* CSS-only mobile menu: <details class="navtoggle"> sits before nav.menu.
   Closed → menu hidden (needs :has). No :has support → menu simply shows. */
.navtoggle { flex: none; }
.navtoggle summary {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 14px; width: max-content;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--head-ink); font-weight: 600; cursor: pointer;
  list-style: none;
}
.navtoggle summary::-webkit-details-marker { display: none; }
.navtoggle summary::before {      /* three bars, or a cross when open */
  content: ""; width: 18px; height: 12px;
  background:
    linear-gradient(currentColor 0 0) top / 100% 2px no-repeat,
    linear-gradient(currentColor 0 0) center / 100% 2px no-repeat,
    linear-gradient(currentColor 0 0) bottom / 100% 2px no-repeat;
}
.navtoggle[open] summary::before {
  background:
    linear-gradient(45deg, transparent 45%, currentColor 45% 55%, transparent 55%),
    linear-gradient(-45deg, transparent 45%, currentColor 45% 55%, transparent 55%);
  height: 16px; width: 16px;
}
header:has(.navtoggle:not([open])) nav.menu { display: none; }

nav.menu {
  display: flex; flex-direction: column; gap: 2px;
  padding-bottom: 12px;
}
nav.menu a {
  display: flex; align-items: center; min-height: 46px; padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--head-ink); text-decoration: none; font-weight: 600;
  line-height: 1.3;
}
nav.menu a:hover { background: color-mix(in srgb, var(--head-ink) 9%, transparent); }
nav.menu a.on { background: var(--brand); color: var(--on-brand); }
nav.menu a.give::after {          /* "Support us – 1.5%": a small yellow dot */
  content: ""; width: 8px; height: 8px; margin-left: 8px; flex: none;
  border-radius: 50%; background: var(--sun);
  box-shadow: 0 0 0 1.5px var(--head-bg), 0 0 0 2.5px color-mix(in srgb, var(--head-ink) 35%, transparent);
}

@media (min-width: 768px) {
  .brand { flex: 1 1 0; }
  .brand img { width: 64px; height: 64px; }
  .brand strong { font-size: 1.0625rem; }
  .brand .alt { display: block; }
  .navtoggle { display: none; }
  header:has(.navtoggle:not([open])) nav.menu,
  nav.menu {
    display: flex; flex-direction: row; flex-wrap: wrap; gap: 4px;
    padding-block: 8px 12px;
    border-top: 1px solid color-mix(in srgb, var(--head-ink) 16%, transparent);
  }
  nav.menu a { min-height: 44px; padding: 6px 14px; font-size: .9375rem; }
}
@media (min-width: 1200px) {
  header .head-row { padding-block: 16px; }
  .brand strong { font-size: 1.1875rem; }
  nav.menu { gap: 6px; }
}

/* ---------- 5. Page frame ------------------------------------------- */
main { display: block; padding-block: 24px 56px; }
@media (min-width: 768px) { main { padding-block: 36px 72px; } }

.crumb {
  display: flex; flex-wrap: wrap; gap: 4px 8px;
  margin: 0 0 16px; padding: 0; list-style: none;
  font-size: .875rem; color: var(--muted);
}
.crumb a { color: var(--muted); }
.crumb > * + *::before { content: "/"; margin-right: 8px; opacity: .6; }

/* section headings carry a tiny three-colour mark */
h2.sec {
  display: flex; flex-direction: column; gap: 10px;
  margin: 40px 0 18px;
  font-size: clamp(1.25rem, 1.1rem + .7vw, 1.625rem);
}
h2.sec::before { content: ""; width: 69px; height: 8px; background: var(--mark); }

/* ---------- 6. Home: hero + 1.5% box -------------------------------- */
.hero {
  position: relative; overflow: hidden;
  padding: 28px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.hero h1 { margin-bottom: .35em; max-width: 22ch; color: var(--brand); }
.hero .alt { margin: 0 0 14px; color: var(--muted); font-size: 1rem; line-height: 1.5; }
.tagline {
  margin: 0; max-width: 46ch;
  font-size: clamp(1.0625rem, 1rem + .4vw, 1.25rem); line-height: 1.5;
}
/* "vòng tay lớn": the logo's three figures as one ring beside the hero text (≥768 px) */
.hero {
  --ring-a: color-mix(in srgb, var(--accent) 42%, var(--card));
  --ring-b: color-mix(in srgb, var(--brand-arm) 42%, var(--card));
  --h1: var(--sun);
  --h2: #fff;
  --h3: var(--sun);
  --hr: color-mix(in srgb, var(--ink) 22%, var(--card));
}
.hero::before, .hero::after {
  content: ""; position: absolute; display: none; pointer-events: none;
  width: 240px; height: 240px; right: 40px; top: calc(50% - 120px);
}
.hero::after {
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    transparent 0 6deg, var(--ring-a) 6deg 114deg, transparent 114deg 126deg,
    var(--ring-b) 126deg 234deg, transparent 234deg 246deg,
    var(--ring-a) 246deg 354deg, transparent 354deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 20px), #000 calc(100% - 19px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 20px), #000 calc(100% - 19px));
}
.hero::before {
  z-index: 1; width: 264px; height: 264px; right: 28px; top: calc(50% - 132px);
  background:
    radial-gradient(circle at 37px 77px, var(--h1) 0 15px, var(--hr) 15px 16.5px, transparent 17px),
    radial-gradient(circle at 227px 77px, var(--h2) 0 15px, var(--hr) 15px 16.5px, transparent 17px),
    radial-gradient(circle at 132px 242px, var(--h3) 0 15px, var(--hr) 15px 16.5px, transparent 17px);
}
.hero > * { position: relative; z-index: 2; }

/* the foundation's motto, in two languages:
   <p class="motto"><span lang="pl">aby klaskać potrzebne są obydwie ręce…</span>
                    <span lang="vi">để vỗ tay cần hai bàn tay…</span></p> */
.motto {
  display: grid; gap: 2px; margin: 22px 0 0; padding-top: 18px;
  max-width: 40ch;
  border-top: 1px solid var(--line);
  font-size: 1.0625rem; line-height: 1.45;
}
.motto::before { content: ""; width: 69px; height: 8px; margin-bottom: 8px; background: var(--mark); }
.motto > :first-child { font-weight: 700; color: var(--ink); font-size: 1.125em; }
.motto > * + * { color: var(--muted); }
.motto > *::before { content: "“"; }
.motto > *::after { content: "”"; }
.motto > :lang(pl)::before { content: "„"; }

aside.cta {
  margin-top: 16px; padding: 22px;
  background: var(--brand-soft);
  border-radius: var(--radius);
  display: grid; gap: 10px; align-content: start;
}
aside.cta h2 { margin: 0; font-size: 1.25rem; color: var(--brand); }
aside.cta p { margin: 0; }
aside.cta .krs {
  font-size: .875rem; color: var(--muted); font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
}
aside.cta .krs strong {
  display: block; margin-top: 2px;
  font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem); letter-spacing: .04em;
  color: var(--ink); font-variant-numeric: tabular-nums;
  user-select: all;               /* one tap selects the whole KRS number */
  text-transform: none;
}
aside.cta a.btn, aside.cta > a:last-child {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 10px 20px; margin-top: 6px;
  background: var(--accent); color: var(--on-accent);
  border-radius: 999px; font-weight: 700; text-decoration: none;
}
aside.cta a.btn:hover, aside.cta > a:last-child:hover {
  background: color-mix(in srgb, var(--accent) 88%, var(--ink));
}

@media (min-width: 768px) {
  .hero { padding: 44px 40px; }
  .hero { padding-right: 320px; min-height: 340px; }
  .hero::before, .hero::after { display: block; }
}
/* the 1.5% box becomes a horizontal band under the hero */
@media (min-width: 768px) {
  aside.cta {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "h h" "p p" "krs btn";
    align-items: center; column-gap: 32px; padding: 26px 32px;
  }
}
@media (min-width: 1200px) {
  .hero { padding: 56px 400px 56px 56px; }
  .hero::after { right: 72px; }
  .hero::before { right: 60px; }
  aside.cta {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "h krs btn" "p krs btn";
    column-gap: 48px; padding: 28px 40px;
  }
}
@media (min-width: 768px) {
  aside.cta h2 { grid-area: h; }
  aside.cta > p:not(.krs) { grid-area: p; max-width: 62ch; }
  aside.cta .krs { grid-area: krs; }
  aside.cta a.btn, aside.cta > a:last-child { grid-area: btn; margin-top: 0; justify-self: end; }
}

/* ---------- 7. News grid + cards ------------------------------------ */
.grid {
  display: grid; gap: 14px;
  grid-template-columns: minmax(0, 1fr);
  margin: 0; padding: 0; list-style: none;
}
.card {
  position: relative;
  display: grid; gap: 4px 14px; align-content: start;
  grid-template-columns: minmax(0, 1fr);
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card:has(img.thumb) { grid-template-columns: minmax(0, 1fr) 96px; }
.card img.thumb {
  grid-column: 2; grid-row: 1 / span 2;
  width: 96px; height: 96px; object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
}
.card time, .card .when {
  font-size: .8125rem; font-weight: 600; color: var(--accent);
  letter-spacing: .02em;
}
.card h3 { margin: 0; font-size: 1.0625rem; line-height: 1.35; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* whole card clickable */
.card:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.card:hover h3 a { color: var(--brand); text-decoration: underline; text-decoration-thickness: 1px; }
.card:has(a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 7px var(--focus-halo); }
.card a:focus-visible { outline: none; box-shadow: none; }
.card p {
  margin: 4px 0 0; font-size: .9375rem; line-height: 1.55; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card:has(img.thumb) p { grid-column: 1 / -1; }

@media (min-width: 768px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .card, .card:has(img.thumb) {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 20px 20px; overflow: hidden;
  }
  .card img.thumb {
    grid-column: 1; grid-row: auto; order: -1;
    width: calc(100% + 40px); max-width: none; height: auto; aspect-ratio: 16 / 9;
    margin: 0 -20px 12px; border-radius: 0;
  }
  .card:not(:has(img.thumb)) { padding-top: 20px; }
  /* cards without a photo: a calm text card with a larger title */
  .card:not(:has(img.thumb)) h3 { font-size: 1.25rem; }
  .card:not(:has(img.thumb)) p { -webkit-line-clamp: 5; }
  .card h3 { font-size: 1.125rem; }
}
@media (min-width: 1200px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
}

.allnews {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; margin-top: 22px; padding: 10px 20px;
  border: 1.5px solid var(--brand); border-radius: 999px;
  color: var(--brand); font-weight: 600; text-decoration: none;
}
.allnews:hover { background: var(--brand); color: var(--on-brand); }

.empty {
  padding: 32px 20px; text-align: center;
  border: 1.5px dashed var(--line); border-radius: var(--radius);
  color: var(--muted);
}

.lead { max-width: 60ch; color: var(--muted); font-size: 1.125rem; line-height: 1.55; }

/* ---------- 8. News archive ----------------------------------------- */
.rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.row {
  display: grid; gap: 2px 24px;
  grid-template-columns: minmax(0, 1fr);
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}
.row .when { font-size: .875rem; font-weight: 600; color: var(--accent); }
.row .what { font-weight: 600; line-height: 1.4; }
.row .what a { color: var(--ink); text-decoration: none; }
.row .what a:hover { color: var(--brand); text-decoration: underline; }
.row:hover { background: color-mix(in srgb, var(--brand-soft) 60%, transparent); }
.rows h2.sec, .rows + h2.sec { margin-top: 32px; }
@media (min-width: 768px) {
  .row { grid-template-columns: 9.5em minmax(0, 1fr); align-items: baseline; padding: 14px 12px; }
}

/* ---------- 9. Article + static content ----------------------------- */
.content { max-width: 70ch; }
.content h1 { color: var(--ink); }
.content h1 + time, .content .when {
  display: block; margin: -4px 0 20px; color: var(--accent); font-weight: 600; font-size: .9375rem;
}
.content h3 { margin-top: 1.6em; }
.content ul, .content ol { padding-left: 1.4em; }
.content li { margin-bottom: .35em; }
.content li::marker { color: var(--brand); font-weight: 700; }
.content blockquote {
  margin: 1.4em 0; padding: 4px 0 4px 18px;
  border-left: 3px solid var(--brand); color: var(--muted);
}
.content p > img:only-child { border-radius: var(--radius); }
.content figure img { border-radius: var(--radius); }
.content figcaption { margin-top: 6px; font-size: .875rem; color: var(--muted); }
.content hr { border: 0; height: 8px; width: 69px; margin: 2em 0; background: var(--mark); }
.content table { width: 100%; border-collapse: collapse; font-size: .9375rem; display: block; overflow-x: auto; }
.content th, .content td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.content dl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px 20px; }
.content dt { font-weight: 600; color: var(--muted); font-size: .875rem; margin-top: 10px; }
.content dd { margin: 0; font-variant-numeric: tabular-nums; }
@media (min-width: 768px) {
  .content dl { grid-template-columns: max-content minmax(0, 1fr); }
  .content dt { margin-top: 0; }
}

/* Photo gallery: any paragraph holding 2+ images becomes a grid.
   Counts that do not fill the last row let the first photo span wider,
   so the grid never has a hole (works for 2–11+ photos).               */
.content p:has(> img + img) {
  display: grid; gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-block: 1.4em;
}
.content p:has(> img + img) > img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius-sm); background: var(--brand-soft);
}
/* 2 columns: odd count → first photo full width */
.content p:has(> img + img) > img:first-of-type:nth-last-of-type(odd) {
  grid-column: 1 / -1; aspect-ratio: 16 / 9;
}
@media (min-width: 768px) {
  .content p:has(> img + img) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .content p:has(> img + img) > img:first-of-type:nth-last-of-type(odd) { grid-column: auto; aspect-ratio: 4 / 3; }
  /* 3 columns: count = 3n+1 → first photo full width; 3n+2 → first spans two */
  .content p:has(> img + img) > img:first-of-type:nth-last-of-type(3n+1) { grid-column: 1 / -1; aspect-ratio: 21 / 9; }
  .content p:has(> img + img) > img:first-of-type:nth-last-of-type(3n+2) { grid-column: span 2; aspect-ratio: auto; height: 100%; }
  /* exactly two photos: simply side by side */
  .content p:has(> img:first-of-type:nth-last-of-type(2)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content p:has(> img:first-of-type:nth-last-of-type(2)) > img:first-of-type { grid-column: auto; grid-row: auto; aspect-ratio: 4 / 3; height: auto; }
}

/* "No translation yet; showing the Polish original." */
.note {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 0 0 24px; padding: 12px 16px;
  background: var(--brand-soft); color: var(--ink);
  border-radius: var(--radius-sm);
  font-size: .9375rem; line-height: 1.5;
}
.note::before {
  content: "i"; flex: none;
  display: grid; place-items: center; width: 22px; height: 22px; margin-top: 1px;
  border-radius: 50%; background: var(--brand); color: var(--on-brand);
  font-weight: 700; font-size: .8125rem; font-style: normal; line-height: 1;
}

/* Team portraits (optional helper: ul.people > li > img + strong + span) */
.people {
  display: grid; gap: 18px; margin: 1.2em 0; padding: 0; list-style: none;
  grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
}
.content .people { max-width: none; }
.people li { margin: 0; }
.people img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--radius); background: var(--brand-soft); margin-bottom: 10px;
}
.people strong { display: block; line-height: 1.3; }
.people span { display: block; color: var(--muted); font-size: .9375rem; line-height: 1.45; }

/* ---------- 10. Footer ---------------------------------------------- */
footer {
  background: var(--foot-bg); color: var(--foot-ink);
  padding-block: 0 28px;
  font-size: .9375rem; line-height: 1.6;
}
footer::before {
  content: ""; display: block; height: 22px; padding: 6px var(--gutter); margin-bottom: 28px;
  background: var(--arms), var(--card);
  background-origin: content-box;
  border-top: 1px solid var(--line);
}
footer a { color: var(--foot-ink); }
footer p { margin: 0 0 8px; }
footer .reg, footer small {
  display: block; color: var(--foot-muted); font-size: .875rem;
  font-variant-numeric: tabular-nums;
}
footer .reg span { white-space: nowrap; }  /* keep "KRS 0000563924" together */
footer :focus-visible { outline-color: var(--foot-ink); }

/* ---------- 11. Motion ---------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  a, .card, nav.menu a, .allnews, aside.cta a {
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- 12. Print ----------------------------------------------- */
@media print {
  header nav, .navtoggle, .lang, .allnews { display: none !important; }
  body { background: #fff; color: #000; }
  footer { background: none; color: #000; }
}

/* ---------- 13. Forms (wiwpl.org addition, 2026-12-05) -------------
   Not part of the "Papier" design package: appended for the contest
   registration form (/thanhlich/dang-ky). Sections 1–12 above are the
   design file unchanged.                                               */
form.reg { max-width: 70ch; }
form.reg fieldset {
  margin: 0 0 22px; padding: 18px 18px 6px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card);
}
form.reg legend { padding: 0 6px; font-weight: 700; color: var(--brand); }
form.reg .f { display: grid; gap: 6px; margin: 0 0 16px; }
form.reg label, form.reg .q { font-weight: 600; line-height: 1.4; }
form.reg .hint { margin: 0; font-size: .875rem; color: var(--muted); line-height: 1.45; }
form.reg .req { color: var(--accent); }
form.reg input[type=text], form.reg input[type=email], form.reg input[type=tel],
form.reg input[type=date], form.reg textarea {
  width: 100%; min-height: 46px; padding: 10px 12px;
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1.5px solid color-mix(in srgb, var(--ink) 28%, transparent);
  border-radius: var(--radius-sm);
}
form.reg textarea { min-height: 7.5em; resize: vertical; }
form.reg input:focus-visible, form.reg textarea:focus-visible { border-color: var(--brand); }
form.reg .choice { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; font-weight: 400; }
form.reg .choice input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--brand); }
form.reg .measure { display: grid; gap: 10px 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { form.reg .measure { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
form.reg .err { margin: 0; font-size: .9375rem; font-weight: 600; color: var(--accent); }
form.reg .f:has(.err) input, form.reg .f:has(.err) textarea { border-color: var(--accent); }
form.reg .errors { padding: 12px 16px; margin: 0 0 22px; border-left: 4px solid var(--accent); background: var(--brand-soft); border-radius: var(--radius-sm); }
form.reg button {
  display: inline-flex; align-items: center; min-height: 48px; padding: 10px 24px;
  font: inherit; font-weight: 700; cursor: pointer;
  background: var(--accent); color: var(--on-accent);
  border: 0; border-radius: 999px;
}
form.reg button:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- 14. Thanh lịch 2027: home page banner (wiwpl.org addition, 2026-12-05; trimmed 2026-12-06) -------
   Event identity of InfoLog #469 § 5 for the banner on the Foundation home page: xanh ngọc #063B3F, vàng #E9B949,
   trắng ngà #FFF8F0, hồng sen #C2185B as a thin accent; fixed colours in light and dark mode (ivory on teal
   11.7:1, gold on teal and teal on gold 6.7:1). The /thanhlich/ pages themselves use their own stylesheet
   /media/thanhlich/thanhlich-theme.css (InfoLog #509), so their former rules (hero, timeline, body, cta) are gone. */
.tl-banner {
  --tl-teal: #063B3F; --tl-gold: #E9B949; --tl-ivory: #FFF8F0; --tl-lotus: #C2185B;
  position: relative; overflow: hidden;
  padding: 28px 22px;
  background: var(--tl-teal); color: var(--tl-ivory);
  border-radius: var(--radius);
  border-top: 6px solid var(--tl-gold);
}
.tl-banner::after {          /* thin lotus-pink rule under the gold one */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--tl-lotus);
}
.tl-kicker {
  margin: 0 0 10px; color: var(--tl-gold);
  font-size: .875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.tl-theme {
  margin: 0; padding-top: 14px; max-width: 40ch;
  border-top: 1px solid color-mix(in srgb, var(--tl-gold) 55%, var(--tl-teal));
  color: var(--tl-gold); font-weight: 600; font-style: italic;
  font-size: clamp(1.0625rem, 1rem + .4vw, 1.25rem); line-height: 1.45;
}
.tl-banner .btn {
  display: inline-flex; align-items: center; min-height: 48px; padding: 10px 22px;
  background: var(--tl-gold); color: var(--tl-teal);
  border-radius: 999px; font-weight: 700; text-decoration: none;
}
.tl-banner .btn:hover { background: var(--tl-ivory); }
.tl-banner .btn:focus-visible, .tl-banner h2 a:focus-visible {
  outline: 3px solid var(--tl-ivory); outline-offset: 3px;
}

/* home page banner (until the final gala, views.home tl_banner) */
.tl-banner { margin-top: 16px; display: grid; gap: 8px; align-content: start; }
.tl-banner h2 { margin: 0; font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); }
.tl-banner h2 a { color: var(--tl-ivory); text-decoration: none; }
.tl-banner h2 a:hover { text-decoration: underline; }
.tl-banner .tl-kicker { margin: 0; }
.tl-banner .tl-theme { padding-top: 8px; }
.tl-banner p { margin: 0; }
.tl-banner .btn { justify-self: start; margin-top: 6px; }

/* ---------- 15. Registration photos (wiwpl.org addition, 2026-12-05, InfoLog #505 P0) ---------- */
form.reg input[type=file] {
  display: block; width: 100%; max-width: 100%; padding: 10px;
  font: inherit; color: var(--ink);
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius-sm);
}
form.reg input[type=file]::file-selector-button {
  margin-right: 12px; padding: 8px 16px; min-height: 40px;
  font: inherit; font-weight: 600; cursor: pointer;
  color: var(--on-brand); background: var(--brand); border: 0; border-radius: 999px;
}
form.reg input[type=file]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
form.reg .f:has(.err) input[type=file] { border-color: var(--accent); border-style: solid; }
form.reg .kept {
  margin: 0 0 12px; padding: 10px 14px; font-weight: 600;
  background: var(--brand-soft); border-left: 4px solid var(--brand); border-radius: var(--radius-sm);
}
