/* Design tokens. Photo-first, cool and calm: a cool grey canvas under a faint teal and indigo glow,
   frosted-glass surfaces with a lit top edge, near-black primary buttons, teal for links and
   highlights, Inter Tight for headings and figures over Inter for text, semantic colours only for
   status and stage. 4/8-point spacing; type scale 12/14/16/20/26/36/56.
   Colours are RGB triplets so a tint is rgb(var(--rgb-ink) / .04). Dark mode redefines the tokens. */
:root {
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 72px;
  --t12: 12px; --t14: 14px; --t16: 16px; --t20: 20px; --t26: 26px; --t36: 36px; --t52: 56px;
  --radius: 10px; --radius-l: 18px; --radius-xl: 28px; --pill: 999px;
  --target: 44px;
  --font-display: "Inter Tight", "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --rgb-paper: 240 242 245; --rgb-surface: 255 255 255; --rgb-ink: 14 17 22; --rgb-hair: 222 226 232; --rgb-grey: 92 98 110;
  --rgb-accent: 13 116 107; --rgb-glow-1: 45 212 191; --rgb-glow-2: 129 140 248; --rgb-glow-3: 251 191 36;
  /* glass: a translucent surface, its blur, a lit top edge and a hairline that holds it on photos */
  --glass: rgb(var(--rgb-surface) / .62); --glass-strong: rgb(var(--rgb-surface) / .8); --glass-blur: saturate(1.7) blur(22px);
  --edge: inset 0 1px 0 rgb(255 255 255 / .85), inset 0 0 0 1px rgb(var(--rgb-ink) / .06);
  --primary: rgb(var(--rgb-ink));
  --on-primary: #FFFFFF;
  --primary-edge: 0 1px 2px rgb(var(--rgb-ink) / .18), 0 8px 20px -10px rgb(var(--rgb-ink) / .45);
  --bg: rgb(var(--rgb-paper)); --surface: rgb(var(--rgb-surface)); --surface-2: rgb(var(--rgb-ink) / .05);
  --tint: rgb(var(--rgb-ink) / .035); --tint-2: rgb(var(--rgb-ink) / .07);
  --text: rgb(var(--rgb-ink)); --text-2: rgb(var(--rgb-grey)); --border: rgb(var(--rgb-hair)); --strong: rgb(var(--rgb-ink));
  --line: rgb(var(--rgb-ink) / .08);
  --accent: rgb(var(--rgb-accent)); --on-accent: #FFFFFF; --accent-tint: rgb(var(--rgb-accent) / .09);
  /* status: text colour (AA on its tint and on the canvas), tint, and a marker colour */
  --open: #0E6B3D; --open-bg: rgb(19 128 75 / .12); --open-mark: #13804B;
  --waiting: #8A5200; --waiting-bg: rgb(184 110 0 / .13); --waiting-mark: #B86E00;
  --closed: #B00E28; --closed-bg: rgb(200 16 46 / .10); --closed-mark: #C8102E;
  --unknown: #55565C; --unknown-bg: rgb(var(--rgb-ink) / .06); --unknown-mark: #8A8B92;
  /* pipeline stages */
  --stage-planned: #4F3E8C; --stage-planned-bg: rgb(94 74 168 / .11);
  --stage-permit: #1F4BB8; --stage-permit-bg: rgb(36 81 214 / .10);
  --stage-construction: #8A5200; --stage-construction-bg: rgb(184 110 0 / .14);
  --stage-first: #0E6B3D; --stage-first-bg: rgb(19 128 75 / .13);
  --stage-done: #55565C; --stage-done-bg: rgb(var(--rgb-ink) / .06);
  --shadow: var(--edge), 0 1px 2px rgb(var(--rgb-ink) / .04), 0 12px 32px -18px rgb(var(--rgb-ink) / .22);
  --lift: var(--edge), 0 2px 6px rgb(var(--rgb-ink) / .06), 0 36px 64px -24px rgb(var(--rgb-ink) / .4);
  --ring: 0 0 0 4px rgb(var(--rgb-accent) / .18);
  --scrim: linear-gradient(180deg, rgb(0 0 0 / 0) 40%, rgb(0 0 0 / .55) 100%);
  --header: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --rgb-paper: 9 11 14; --rgb-surface: 28 31 37; --rgb-ink: 236 238 242; --rgb-hair: 50 54 62; --rgb-grey: 158 164 176;
    --rgb-accent: 94 234 212; --on-accent: #04302B; --rgb-glow-1: 20 184 166; --rgb-glow-2: 99 102 241; --rgb-glow-3: 245 158 11;
    --glass: rgb(var(--rgb-surface) / .55); --glass-strong: rgb(var(--rgb-surface) / .78);
    --edge: inset 0 1px 0 rgb(255 255 255 / .07), inset 0 0 0 1px rgb(255 255 255 / .06);
    --primary: #F2F4F7; --on-primary: #0B0E12;
    --primary-edge: 0 8px 20px -10px rgb(0 0 0 / .8);
    --line: rgb(255 255 255 / .08);
    --open: #6FD09A; --open-bg: rgb(111 208 154 / .14); --open-mark: #4FBF82;
    --waiting: #EBB25E; --waiting-bg: rgb(235 178 94 / .15); --waiting-mark: #E0A040;
    --closed: #FF8A94; --closed-bg: rgb(255 138 148 / .14); --closed-mark: #F06272;
    --unknown: #B7B8BF; --unknown-bg: rgb(238 238 240 / .08); --unknown-mark: #8E8F96;
    --stage-planned: #C2B5F5; --stage-planned-bg: rgb(194 181 245 / .14);
    --stage-permit: #A9C0FF; --stage-permit-bg: rgb(143 172 255 / .14);
    --stage-construction: #EBB25E; --stage-construction-bg: rgb(235 178 94 / .15);
    --stage-first: #6FD09A; --stage-first-bg: rgb(111 208 154 / .14);
    --stage-done: #B7B8BF; --stage-done-bg: rgb(238 238 240 / .08);
    --shadow: var(--edge), 0 12px 32px -16px rgb(0 0 0 / .7);
    --lift: var(--edge), 0 36px 64px -20px rgb(0 0 0 / .95);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --rgb-paper: 9 11 14; --rgb-surface: 28 31 37; --rgb-ink: 236 238 242; --rgb-hair: 50 54 62; --rgb-grey: 158 164 176;
  --rgb-accent: 94 234 212; --on-accent: #04302B; --rgb-glow-1: 20 184 166; --rgb-glow-2: 99 102 241; --rgb-glow-3: 245 158 11;
  --glass: rgb(var(--rgb-surface) / .55); --glass-strong: rgb(var(--rgb-surface) / .78);
  --edge: inset 0 1px 0 rgb(255 255 255 / .07), inset 0 0 0 1px rgb(255 255 255 / .06);
  --primary: #F2F4F7; --on-primary: #0B0E12;
  --primary-edge: 0 8px 20px -10px rgb(0 0 0 / .8);
  --line: rgb(255 255 255 / .08);
  --open: #6FD09A; --open-bg: rgb(111 208 154 / .14); --open-mark: #4FBF82;
  --waiting: #EBB25E; --waiting-bg: rgb(235 178 94 / .15); --waiting-mark: #E0A040;
  --closed: #FF8A94; --closed-bg: rgb(255 138 148 / .14); --closed-mark: #F06272;
  --unknown: #B7B8BF; --unknown-bg: rgb(238 238 240 / .08); --unknown-mark: #8E8F96;
  --stage-planned: #C2B5F5; --stage-planned-bg: rgb(194 181 245 / .14);
  --stage-permit: #A9C0FF; --stage-permit-bg: rgb(143 172 255 / .14);
  --stage-construction: #EBB25E; --stage-construction-bg: rgb(235 178 94 / .15);
  --stage-first: #6FD09A; --stage-first-bg: rgb(111 208 154 / .14);
  --stage-done: #B7B8BF; --stage-done-bg: rgb(238 238 240 / .08);
  --shadow: var(--edge), 0 12px 32px -16px rgb(0 0 0 / .7);
  --lift: var(--edge), 0 36px 64px -20px rgb(0 0 0 / .95);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header) + var(--s2)); }
body {
  margin: 0; color: var(--text);
  /* A faint glow behind the glass, fixed so it does not scroll with the page */
  background:
    radial-gradient(1100px 620px at 8% -8%, rgb(var(--rgb-glow-1) / .13), transparent 62%),
    radial-gradient(900px 560px at 98% 4%, rgb(var(--rgb-glow-2) / .11), transparent 60%),
    radial-gradient(900px 700px at 60% 112%, rgb(var(--rgb-glow-3) / .07), transparent 60%),
    var(--bg);
  background-attachment: fixed; font: var(--t16)/1.55 var(--font);
  font-feature-settings: "cv11", "ss01"; min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
::selection { background: rgb(var(--rgb-accent) / .25); }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0 0 var(--s2); line-height: 1.15; font-weight: 600; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: var(--t36); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; } h2 { font-size: var(--t20); } h3 { font-size: var(--t16); }
p { margin: 0 0 var(--s2); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
small, .muted { color: var(--text-2); font-size: var(--t14); }
.small { font-size: var(--t12); }
.kicker { font-size: var(--t14); font-weight: 600; letter-spacing: 0; color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--s2); top: -100px; z-index: 50; background: var(--surface); padding: var(--s1) var(--s2); border-radius: var(--radius); box-shadow: var(--lift); }
.skip:focus { top: var(--s1); }

/* Header: translucent, sticky, the current page as a filled pill */
.topbar {
  position: sticky; top: 0; z-index: 20; background: rgb(var(--rgb-paper) / .6); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(1.8) blur(18px); backdrop-filter: saturate(1.8) blur(18px);
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s2); padding: 4px var(--s2) 0;
}
.brand { display: flex; align-items: center; gap: 10px; min-height: var(--target); color: var(--text);
  text-decoration: none; font-weight: 700; font-size: var(--t16); letter-spacing: -.02em; flex: 1 1 0; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand svg { flex: none; }
.brand svg rect { fill: rgb(var(--rgb-ink)); }
.brand svg path { stroke: rgb(var(--rgb-paper)); }
.tools { display: flex; gap: 2px; }
.tools .btn { border-radius: var(--pill); }
.tools .lang-select { width: auto; padding: 0 10px; border-color: transparent; background: transparent; border-radius: var(--pill);
  font-size: var(--t14); font-weight: 600; cursor: pointer; }
.nav { order: 3; flex: 1 0 100%; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding: 4px 0 8px; margin: 0 calc(-1 * var(--s1)); }
.nav a { flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; position: relative; border-radius: var(--pill);
  color: var(--text-2); text-decoration: none; font-size: var(--t14); font-weight: 500; transition: background .2s var(--ease), color .2s var(--ease); }
.nav a::after { content: ""; position: absolute; inset: -4px 0; } /* 44px to tap, 36px to see */
.nav a:hover { color: var(--text); background: var(--tint); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface); font-weight: 600; box-shadow: var(--shadow); }
.nav .count { margin-left: 6px; min-height: 20px; padding: 0 7px; background: var(--accent); color: var(--on-accent); }
@media (min-width: 1100px) {
  .topbar { flex-wrap: nowrap; height: var(--header); padding: 0 var(--s3); }
  .brand { flex: none; margin-right: var(--s2); }
  .nav { order: 0; flex: 1 1 auto; padding: 0; margin: 0; }
}
/* Nine pages fit beside the brand from 1100px when the pills are a little narrower and the brand
   shows only its mark; its name stays for screen readers, and every page names itself in its head. */
@media (min-width: 1100px) and (max-width: 1639px) {
  .nav a { padding: 0 8px; }
  .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Buttons and controls: pills, 44px high */
.btn, button.btn, a.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s1);
  min-height: var(--target); min-width: var(--target); padding: 0 18px; border-radius: var(--pill);
  border: 1px solid transparent; background: var(--glass-strong); box-shadow: var(--edge), 0 1px 2px rgb(var(--rgb-ink) / .05);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); color: var(--text); font: inherit; font-size: var(--t14);
  font-weight: 600; cursor: pointer; text-decoration: none; transition: border-color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { background: var(--surface); box-shadow: var(--edge), 0 6px 16px -8px rgb(var(--rgb-ink) / .3); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--primary); color: var(--on-primary); border-color: transparent; box-shadow: var(--primary-edge); }
.btn.primary:hover { background: var(--primary); opacity: .88; box-shadow: var(--primary-edge); }
.btn.quiet { border-color: transparent; background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.btn.quiet:hover { background: var(--tint-2); }
.btn[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); box-shadow: var(--primary-edge); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s1); }
input[type="search"], input[type="number"], input[type="text"], select {
  min-height: var(--target); padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font: inherit; font-size: var(--t16); width: 100%;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
input:hover, select:hover { border-color: rgb(var(--rgb-grey) / .6); }
input:focus-visible, select:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--ring); border-radius: var(--radius); }
label.field { display: grid; gap: 6px; font-size: var(--t14); font-weight: 600; color: var(--text); }
label.field > select, label.field > input { font-weight: 400; }
.check { display: flex; align-items: center; gap: 10px; min-height: var(--target); font-size: var(--t14); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex: none; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-size: var(--t14); font-weight: 600; color: var(--text); margin-bottom: 4px; padding: 0; }

/* Layout */
main { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: var(--s3) var(--s2) var(--s6); }
@media (min-width: 720px) { main { padding: var(--s5) var(--s4) var(--s6); } }
main:focus { outline: none; }
main.wide { max-width: none; padding: 0; }
.page-head { display: grid; gap: var(--s3); align-items: center; margin-bottom: var(--s4); }
.page-head h1 { margin-bottom: var(--s1); font-size: var(--t36); }
.page-head p { color: var(--text-2); max-width: 60ch; margin: 0; font-size: var(--t16); }
@media (min-width: 720px) { .page-head h1 { font-size: 44px; } .page-head p { font-size: 18px; } }
@media (min-width: 900px) { .page-head:has(.illus) { grid-template-columns: 1fr minmax(280px, 420px); } }
/* An aerial photo picked from the data for the page; without one the slot takes no space. */
.illus { position: relative; overflow: hidden; border-radius: var(--radius-l); background: var(--tint); margin: 0; }
.illus img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.illus:empty { display: none; }
.page-head .illus { aspect-ratio: 16 / 7; box-shadow: var(--shadow); }
@media (min-width: 900px) { .page-head .illus { aspect-ratio: 16 / 10; } }
.grid { display: grid; gap: var(--s2); grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.stack { display: grid; gap: var(--s2); }
.card { background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-l); padding: var(--s3); min-width: 0; box-shadow: var(--shadow); }
.card > h2 { font-size: var(--t20); font-weight: 600; letter-spacing: -.02em; color: var(--text); display: flex; align-items: center; gap: var(--s1); margin-bottom: var(--s2); }
.card .num, .num { font-family: var(--font-display); font-size: var(--t36); font-weight: 700; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }

/* Facts: a definition list, label above value on phones and beside it on wider cards */
.facts { display: grid; gap: 0 var(--s3); grid-template-columns: minmax(120px, 36%) 1fr; margin: 0; }
.facts dt { color: var(--text-2); font-size: var(--t14); font-weight: 500; padding: 12px 0; border-top: 1px solid var(--line); }
.facts dd { margin: 0; display: flex; align-items: flex-start; gap: var(--s1); min-width: 0; overflow-wrap: anywhere; padding: 11px 0; border-top: 1px solid var(--line); }
.facts dt:first-of-type, .facts dd:first-of-type { border-top: 0; }
.facts dd > .v { flex: 1; min-width: 0; }
@media (max-width: 479px) {
  .facts { grid-template-columns: 1fr; }
  .facts dt { padding: 12px 0 0; }
  .facts dd { border-top: 0; padding: 2px 0 12px; }
}
.src { position: relative; flex: none; width: 24px; height: 24px; border-radius: 50%; border: 0;
  background: var(--tint-2); color: var(--text-2); font-size: 11px; font-weight: 700; cursor: pointer; padding: 0; line-height: 1; font-family: Georgia, serif; font-style: italic; transition: background .2s, color .2s; }
.src::after { content: ""; position: absolute; inset: -10px; }
.src:hover { color: var(--on-accent); background: var(--accent); }
/* A label before a value inside running text: "Vergabe: Bisher" */
.lv { display: block; }
.lv > b { font-weight: 600; color: var(--text); }

/* Badges: status and stage carry colour, always with their text and a shape */
.badge { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 2px 10px; border-radius: var(--pill);
  font-size: var(--t12); font-weight: 600; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.badge.st-open, .badge.st-waiting-list, .badge.st-project-only, .badge.st-closed, .badge.st-unknown,
.badge[class*="pl-"] { padding-left: 8px; }
.badge.st-open::before, .badge.st-waiting-list::before, .badge.st-project-only::before, .badge.st-closed::before, .badge.st-unknown::before,
.badge[class*="pl-"]::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.badge.st-waiting-list::before, .badge.st-project-only::before { border-radius: 1px; }
.badge.st-closed::before { border-radius: 0; height: 2px; width: 8px; }
.badge.st-unknown::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.st-open { background: var(--open-bg); color: var(--open); }
.st-waiting-list, .st-project-only { background: var(--waiting-bg); color: var(--waiting); }
.st-closed { background: var(--closed-bg); color: var(--closed); }
.st-unknown { background: var(--unknown-bg); color: var(--unknown); }
.pl-planned { background: var(--stage-planned-bg); color: var(--stage-planned); }
.pl-permit { background: var(--stage-permit-bg); color: var(--stage-permit); }
.pl-construction { background: var(--stage-construction-bg); color: var(--stage-construction); }
.pl-first-occupancy { background: var(--stage-first-bg); color: var(--stage-first); }
.pl-done { background: var(--stage-done-bg); color: var(--stage-done); }
.badge.pl-planned::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.badge.pl-permit::before { background: linear-gradient(90deg, currentColor 50%, transparent 50%); box-shadow: inset 0 0 0 1.5px currentColor; }
.badge.pl-construction::before { border-radius: 1px; transform: rotate(45deg); }
.badge.pl-done::before { border-radius: 0; width: 8px; height: 2px; }
/* A badge sitting on a photo: an opaque surface so it reads on any picture */
.on-photo .badge, .badge.on-photo { background: rgb(var(--rgb-surface) / .94); box-shadow: 0 2px 8px rgb(0 0 0 / .18); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--s1) 0; }
.chip { display: inline-flex; align-items: center; gap: var(--s1); min-height: 32px; padding: 0 10px 0 14px;
  border-radius: var(--pill); background: var(--accent-tint); color: var(--accent); border: 0; font: inherit; font-size: var(--t14); font-weight: 600; cursor: pointer; transition: background .2s; }
.chip:hover { background: rgb(var(--rgb-accent) / .16); }
.chip::after { content: "×"; font-size: var(--t16); }
.chip { position: relative; }
.chip::before { content: ""; position: absolute; inset: -6px 0; } /* 44px to tap, 32px to see */

/* Aerial photos: always with the swisstopo credit on the picture */
.aerial { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--tint); aspect-ratio: 3 / 2; }
.aerial img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.aerial.failed img { opacity: 0; } /* offline: the tinted frame keeps its place, no broken-image icon */
.credit, figcaption.credit { position: absolute; right: 8px; bottom: 8px; padding: 2px 7px; border-radius: var(--pill); line-height: 1.4;
  font-size: 10px; font-weight: 500; color: #fff; background: rgb(0 0 0 / .55); pointer-events: none; white-space: nowrap; }
.aerial.none { display: grid; place-items: center; color: var(--text-2); font-size: var(--t12); text-align: center; padding: var(--s2);
  background: repeating-linear-gradient(135deg, var(--tint), var(--tint) 6px, transparent 6px, transparent 12px); }

/* States */
.state { text-align: center; padding: var(--s5) var(--s3); color: var(--text-2); }
.state svg { color: rgb(var(--rgb-grey) / .5); margin-bottom: var(--s2); }
.state h2 { color: var(--text); font-size: var(--t20); }
.skeleton { background: linear-gradient(90deg, var(--tint), var(--tint-2), var(--tint)); background-size: 200% 100%;
  animation: shimmer 1.2s infinite; border-radius: var(--radius-l); min-height: var(--s6); }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
main > * { animation: rise .45s var(--ease) both; }

/* Footer */
.footer { border-top: 1px solid var(--line); color: var(--text-2); font-size: var(--t12); padding: var(--s4) var(--s2) var(--s5); }
.footer p { max-width: 1216px; margin: 0 auto var(--s1); }

/* Dialog and toast */
dialog { border: 0; border-radius: var(--radius-l); box-shadow: var(--lift); padding: var(--s3); max-width: min(560px, calc(100vw - var(--s4)));
  background: var(--surface); color: var(--text); }
dialog::backdrop { background: rgb(10 10 12 / .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
dialog blockquote { margin: var(--s2) 0; padding-left: var(--s2); border-left: 3px solid var(--accent); }
.toast { position: fixed; left: 50%; bottom: var(--s3); transform: translate(-50%, 8px); background: var(--text); color: var(--bg);
  padding: 10px 18px; border-radius: var(--pill); font-size: var(--t14); font-weight: 500; z-index: 60; opacity: 0; pointer-events: none;
  box-shadow: var(--lift); transition: opacity .2s var(--ease), transform .2s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .topbar, .footer, .no-print, .toast { display: none !important; }
  body { background: #fff; color: #000; }
  .card { border: 1px solid #ccc; box-shadow: none; break-inside: avoid; }
  main { padding: 0; }
  main > * { animation: none; }
}
