/* urakkahaku.fi shared stylesheet (owner W2). The look: docs/mockups/*.dc.html. Rules and the font set
   (5 self-hosted faces, metric-matched fallbacks, 2 preloads) are explained in templates/base.html. Comments here
   are shipped to every reader: keep them short. Orange (--accent) only as a button fill with ink text. */

/* fonts */

@font-face {
  font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/barlow-latin-400-normal.b0a8ad37ac.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: "Barlow"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/barlow-latin-ext-400-normal.122b24bc2a.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: "Barlow"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/static/fonts/barlow-latin-600-normal.4b52ddd483.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: "Barlow"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/static/fonts/barlow-latin-ext-600-normal.b7f099c421.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: "Barlow"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/fonts/barlow-latin-700-normal.2d797dd8b3.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: "Barlow"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/fonts/barlow-latin-ext-700-normal.88c786d5fa.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: "Barlow Semi Condensed"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/fonts/barlow-semi-condensed-latin-700-normal.fb958c8c20.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: "Barlow Semi Condensed"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/fonts/barlow-semi-condensed-latin-ext-700-normal.109b73c772.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: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/ibm-plex-mono-latin-400-normal.08949f728d.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: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/ibm-plex-mono-latin-ext-400-normal.6bc0f226a5.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;
}

/* metric-matched local fallbacks (templates/base.html); nothing is downloaded for these */
@font-face {
  font-family: "Barlow Fallback"; font-style: normal; font-weight: 400; font-display: swap;
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("LiberationSans"), local("Arimo"), local("Helvetica");
  size-adjust: 96.94%; ascent-override: 103.16%; descent-override: 20.63%; line-gap-override: 0%;
}
@font-face {
  font-family: "Barlow Fallback"; font-style: normal; font-weight: 600; font-display: swap;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("LiberationSans-Bold"), local("Arimo Bold"), local("Helvetica Bold");
  size-adjust: 91.78%; ascent-override: 108.96%; descent-override: 21.79%; line-gap-override: 0%;
}
@font-face {
  font-family: "Barlow Fallback"; font-style: normal; font-weight: 700; font-display: swap;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("LiberationSans-Bold"), local("Arimo Bold"), local("Helvetica Bold");
  size-adjust: 92.72%; ascent-override: 107.85%; descent-override: 21.57%; line-gap-override: 0%;
}
@font-face {
  font-family: "Barlow Semi Condensed Fallback"; font-style: normal; font-weight: 700; font-display: swap;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("LiberationSans-Bold"), local("Arimo Bold"), local("Helvetica Bold");
  size-adjust: 84.54%; ascent-override: 118.29%; descent-override: 23.66%; line-gap-override: 0%;
}
@font-face {
  font-family: "IBM Plex Mono Fallback"; font-style: normal; font-weight: 400; font-display: swap;
  src: local("Courier New"), local("CourierNewPSMT"), local("Liberation Mono"), local("LiberationMono"), local("Cousine");
  size-adjust: 100%; ascent-override: 102.5%; descent-override: 27.5%; line-gap-override: 0%;
}

/* tokens */

:root {
  color-scheme: light;      /* the approved look is light only: form controls stay light too */
  /* colour (contrast on white unless noted) */
  --ink: #0f2440;            /* body text 15.6:1 */
  --ink-2: #2b3f58;          /* secondary text 10.7:1 */
  --ink-3: #1c2f47;          /* official text 13.6:1 */
  --muted: #4a5d75;          /* meta text 6.7:1, 6.3:1 on --soft */
  --line: #dbe6f1;           /* borders */
  --line-soft: #e6eef6;      /* table rows, fact separators */
  --line-strong: #c9d8e8;    /* input and chip borders */
  --soft: #f3f8fd;           /* light bands */
  --chip: #e8f1fa;           /* trade tags (navy text 10.2:1) */
  --brand: #0b6fb0;          /* links 5.4:1, 5.0:1 on --soft */
  --navy: #06396b;           /* brand dark: active chips, the Urakkavahti box, footer */
  --navy-2: #0a4a87;         /* navy hover */
  --accent: #f5821f;         /* buttons only, ink text 6.0:1 */
  --accent-hover: #ff9a45;   /* ink text 7.4:1 */
  --accent-2: #ffb35c;       /* the eyebrow on navy (mockup) 6.6:1 */
  --on-navy: #e6eef7;        /* 9.9:1 on navy */
  --on-navy-2: #d6e4f2;      /* 9.0:1 on navy */
  --new: #157a43;            /* 5.4:1 */
  --new-bg: #eaf6ef;         /* --new on it 4.9:1 */
  --new-line: #b7dfc7;
  --warn-bg: #fff4e5;        /* --warn-fg on it 6.3:1 */
  --warn-fg: #8a4b00;
  --warn-line: #f3c98b;
  --urgent-bg: #fdecea;      /* --urgent-fg on it 7.2:1 */
  --urgent-fg: #9b1c13;
  --urgent-line: #f1c2bd;
  --later-bg: #eef5fb;       /* navy on it 10.6:1 */
  --dashed: #9db8d3;
  --white: #ffffff;
  --focus: #0b6fb0;          /* focus ring on light surfaces (5.4:1) */
  --focus-on-dark: #ffffff;  /* focus ring on navy (11.6:1) */

  /* type */
  --font-body: "Barlow", "Barlow Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Barlow Semi Condensed", "Barlow Semi Condensed Fallback", "Barlow", "Barlow Fallback", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "IBM Plex Mono Fallback", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* shape */
  --radius-lg: 16px;
  --radius: 14px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --radius-pill: 999px;
  --shadow-search: 0 6px 24px rgba(6, 57, 107, 0.08);
  --shadow-hover: 0 4px 16px rgba(6, 57, 107, 0.08);
  --ring: 0 0 0 3px rgba(11, 111, 176, 0.35);

  /* layout */
  --wrap: 1200px;
  --gutter: 24px;
  --grid: linear-gradient(rgba(11, 111, 176, 0.07) 1px, transparent 1px) 0 0 / 32px 32px,
          linear-gradient(90deg, rgba(11, 111, 176, 0.07) 1px, transparent 1px) 0 0 / 32px 32px;
}

@media (max-width: 600px) { :root { --gutter: 16px; } }

/* base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
  font-family: var(--font-body); font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--white);
  font-synthesis: style; overflow-wrap: break-word;
}
main { flex: 1 0 auto; padding-bottom: 32px; }
#sisalto:focus { outline: none; }
a { color: var(--brand); text-underline-offset: 0.15em; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
svg { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.2; text-wrap: pretty; }   /* not balance: it splits "LVI-urakat" and "2027-2029" at the hyphen */
h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 2.4vw + 22px, 42px); line-height: 1.08; hyphens: auto; }
h2 { font-size: 22px; line-height: 1.25; }
h3 { font-size: 19px; line-height: 1.3; }
strong, b, th { font-weight: 700; }
small { font-size: 13.5px; }
table { border-collapse: collapse; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
code, kbd, samp { font-family: var(--font-mono); font-weight: 400; font-size: 0.9em; }

/* form controls (inputs of the search form and the filters; specificity 0 so page partials win) */
button, input, select, textarea { font: inherit; color: inherit; }
:where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"], [type="submit"], [type="reset"], [type="button"], [type="image"], [type="hidden"]), select, textarea) {
  min-height: 44px; max-width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); background: var(--white); color: var(--ink);
}
:where(input, select, textarea):focus-visible { border-color: var(--brand); outline-offset: 1px; }
:where(textarea) { min-height: 96px; resize: vertical; }
:where(input[type="checkbox"], input[type="radio"]) { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--navy); }
::placeholder { color: var(--muted); opacity: 1; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { padding: 0; font-weight: 700; }

/* helpers */

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: var(--gutter); top: -200px; z-index: 100; padding: 10px 16px; border-radius: 0 0 var(--radius-xs) var(--radius-xs);
  background: var(--navy); color: var(--white); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 0; color: var(--white); }
.staging-note { margin: 0; padding: 6px var(--gutter); background: var(--warn-bg); color: var(--warn-fg); border-bottom: 1px solid var(--warn-line); font-size: 14px; font-weight: 600; text-align: center; }
.eyebrow { margin: 0; font-family: var(--font-mono); font-weight: 400; font-size: 13px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--brand); }
.mono { font-family: var(--font-mono); font-weight: 400; font-size: 13.5px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* buttons */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border: 1px solid transparent; border-radius: var(--radius-sm); background: var(--white); color: var(--ink);
  font: inherit; font-weight: 700; line-height: 1.3; text-align: center; text-decoration: none; cursor: pointer;
}
.button--accent { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.button--accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--ink); }
.button--primary { background: var(--navy); border-color: var(--navy); color: var(--white); }
.button--primary:hover { background: var(--navy-2); border-color: var(--navy-2); color: var(--white); }
.button--outline { background: var(--white); border-color: var(--navy); color: var(--navy); }
.button--outline:hover { background: var(--soft); color: var(--navy); }
.button--light { background: var(--white); border-color: var(--line-strong); color: var(--ink); font-weight: 600; }
.button--light:hover { border-color: var(--brand); color: var(--navy); }
.button:disabled, .button[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

/* layout */

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding-top: 48px; padding-bottom: 48px; }
.section--soft { background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--grid { background: var(--grid), var(--soft); border-bottom: 1px solid var(--line); }
.hero { display: flex; flex-direction: column; gap: 22px; padding-top: 56px; padding-bottom: 44px; }
.hero > * { margin: 0; }
.hero__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 3.2vw + 18px, 54px); line-height: 1.04; max-width: 840px; }
.hero__lead { font-size: 19px; max-width: 680px; color: var(--ink-2); }
.hero--compact { gap: 14px; padding-top: 22px; padding-bottom: 30px; }
.hero--compact .hero__title { font-size: clamp(32px, 2.8vw + 16px, 50px); max-width: 900px; }
.layout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.layout__main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.layout__aside { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.layout__main > *, .layout__aside > * { margin-top: 0; margin-bottom: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack > * { margin-top: 0; margin-bottom: 0; }
.cluster { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cluster > * { margin: 0; }
.panel { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); }
.panel > * { margin-top: 0; margin-bottom: 0; }
.panel--soft { background: var(--soft); border-color: var(--soft); }
.panel--dashed { border-style: dashed; border-color: var(--dashed); }
.link-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.link-list a { display: inline-block; padding: 2px 0; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; padding: 0; list-style: none; }
.stat { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; }
.stat__value { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat--soon .stat__value { color: var(--warn-fg); }
.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px 28px; }
.facts__item { min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.facts__label { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.facts__value { margin: 0; overflow-wrap: anywhere; }
.facts__note { margin: 0; font-size: 13.5px; color: var(--warn-fg); }
.facts--inline { display: flex; flex-wrap: wrap; gap: 10px 36px; }
.facts--inline .facts__item { padding-top: 0; border-top: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.tiles > * { min-width: 0; }
.tiles > li { display: flex; }
.tiles > li > .tile { flex: 1 1 auto; }
.tile { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; min-width: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); color: var(--ink); text-decoration: none; }
a.tile:hover { border-color: var(--brand); box-shadow: var(--shadow-hover); color: var(--ink); }
.tile__title { min-width: 0; font-size: 17px; font-weight: 600; hyphens: auto; }   /* a long name pushes the count to its own line */
.tile__count { flex: none; font-family: var(--font-mono); font-weight: 400; font-size: 13.5px; color: var(--brand); white-space: nowrap; }
.prose { display: block; max-width: 760px; }   /* block flow even on a flex element (class="layout__main prose") */
.prose > * { margin-top: 0; margin-bottom: 0; }
.prose > * + * { margin-top: 1em; }
.prose > h2 { margin-top: 1.8em; font-size: 24px; }
.prose > h3 { margin-top: 1.5em; font-size: 19px; }
.prose > h2 + *, .prose > h3 + * { margin-top: 0.5em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.35em; }

/* header */

.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-top: 12px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand__mark { flex: none; width: 36px; height: 36px; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: 0.2px; }
.brand__accent { color: var(--brand); }
.brand__tagline { margin-top: 4px; font-size: 12px; color: var(--muted); }
.main-nav { order: 3; flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 0 18px; font-weight: 500; }
.main-nav a { padding: 4px 0; color: var(--ink); text-decoration: none; }
.main-nav a:hover { color: var(--brand); text-decoration: underline; }
.main-nav a[aria-current="page"] { color: var(--brand); font-weight: 700; }
.site-header__cta { flex: none; gap: 0.25em; padding: 10px 16px; font-size: 15px; }

/* phones: brand and button (shown once signup opens) share the first row, the nav fits one row from 375 px; under
   400 px the button reads "Urakkavahti" (the hidden "Tilaa" stays in its accessible name) */
@media (max-width: 599px) {
  .main-nav { gap: 0 12px; font-size: 15px; }
  .site-header__cta { padding: 9px 12px; font-size: 14px; }
}
@media (max-width: 399px) {
  .site-header__cta-verb { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 374px) {
  .brand { gap: 8px; }
  .brand__mark { width: 30px; height: 30px; }
  .brand__name { font-size: 23px; }
  .brand__tagline { font-size: 11px; }
  .main-nav { font-size: 14px; }
}
@media (min-width: 960px) {
  .site-header__inner { gap: 14px 32px; padding-top: 14px; padding-bottom: 14px; }
  .brand { margin-right: 0; }
  .main-nav { order: 0; flex: 1 1 auto; gap: 6px 24px; }
  .site-header__cta { padding: 11px 18px; }
}

/* footer */

.site-footer { background: var(--navy); color: var(--on-navy); }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 24px 48px; padding-top: 40px; padding-bottom: 40px; font-size: 14.5px; line-height: 1.6; }
.site-footer__about { flex: 2 1 340px; min-width: 0; }
.site-footer__about p { margin: 8px 0 0; }
.site-footer__about .site-footer__name { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.3; color: var(--white); }
.site-footer__nav { flex: 1 1 200px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.site-footer__nav a { padding: 2px 0; color: var(--white); }
.site-footer__nav a:hover { color: var(--white); text-decoration-thickness: 2px; }
.site-footer :focus-visible { outline-color: var(--focus-on-dark); }

/* tags, badges, chips */

.tag {
  display: inline-flex; align-items: center; padding: 1px 8px; border: 1px solid var(--chip); border-radius: var(--radius-pill);
  background: var(--chip); color: var(--navy); font-size: 12.5px; font-weight: 600; line-height: 1.5; white-space: nowrap;
}
.badge {
  display: inline-flex; align-items: center; padding: 1px 8px; border: 1px solid transparent; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700; line-height: 1.5; white-space: nowrap;
}
.badge--new { background: var(--new); border-color: var(--new); color: var(--white); }
.badge--change { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-fg); }
.badge--status, .badge--suorahankinta, .badge--muutos, .badge--muu { background: var(--white); border-color: var(--line-strong); color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.badge--avoin { background: var(--navy); border-color: var(--navy); color: var(--white); font-weight: 700; }
.badge--ennakko, .badge--suunnitelma { background: var(--chip); border-color: var(--chip); color: var(--navy); }
.badge--ratkaistu, .badge--jalki { background: var(--new-bg); border-color: var(--new-line); color: var(--new); }
.badge--keskeytetty, .badge--poistettu { background: var(--urgent-bg); border-color: var(--urgent-line); color: var(--urgent-fg); }
.badge--korvattu { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-fg); }
.badge--paattynyt, .badge--ei-maaraaikaa { background: var(--soft); border-color: var(--line); color: var(--muted); }

.chip {
  display: inline-flex; align-items: baseline; gap: 8px; padding: 6px 13px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill); background: var(--white); color: var(--ink); font-size: 15px; font-weight: 600;
  line-height: 1.5; text-decoration: none;
}
a.chip:hover { border-color: var(--brand); color: var(--navy); }
.chip__count { font-family: var(--font-mono); font-weight: 400; font-size: 13px; color: var(--muted); }
.chip--trade { gap: 6px; padding: 4px 11px; border-color: var(--chip); background: var(--chip); color: var(--navy); font-size: 14px; }
a.chip--trade:hover { border-color: var(--brand); background: var(--chip); }
.chip--segment { gap: 5px; padding: 3px 11px; border-radius: var(--radius-xs); font-size: 14.5px; }
.chip.chip--active { background: var(--navy); border-color: var(--navy); color: var(--white); }
a.chip.chip--active:hover { background: var(--navy-2); border-color: var(--navy-2); color: var(--white); }
.chip--active .chip__count { color: var(--on-navy-2); }
.chip--segment .chip__count { font: inherit; color: inherit; }

/* notice card */

.notice-card {
  position: relative; display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
}
.notice-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-hover); }
.notice-card__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.notice-card__body > * { margin: 0; }
.notice-card__tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.notice-card__tags:not(:has(*)) { display: none; }
.notice-card__title { margin: 0; font-size: 19px; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; }
.notice-card__title a { color: var(--ink); text-decoration: none; }
.notice-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); }
.notice-card__title a:hover, .notice-card:hover .notice-card__title a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; }
.notice-card__title a:focus-visible { outline: none; }
.notice-card__title a:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 2px; }
.notice-card__buyer { margin: 0; font-size: 15px; color: var(--ink-2); }
.notice-card__lots { margin: 0; padding: 6px 10px; border-radius: var(--radius-xs); background: var(--soft); color: var(--ink-2); font-size: 14px; }
.notice-card__meta { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; color: var(--muted); }
.notice-card__aside { flex: 0 0 116px; display: flex; flex-direction: column; align-items: stretch; }
.notice-card__aside .badge { justify-content: center; padding: 4px 8px; border-radius: var(--radius-sm); line-height: 1.3; text-align: center; white-space: normal; }
.notice-card--compact { flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 14px 18px; border-radius: var(--radius-md); }
.notice-card--compact .notice-card__title a::after { border-radius: var(--radius-md); }
.notice-card--compact .notice-card__body { flex: 1 1 360px; gap: 4px; }
.notice-card--compact .notice-card__title { font-size: 18px; }
.notice-card--compact .notice-card__aside { flex: 0 0 auto; align-items: flex-start; }

/* countdown (fmt.Countdown: urgency urgent <= 3 days, soon <= 7, later, ended) */

.dl { display: flex; flex-direction: column; align-items: center; padding: 10px 8px; border: 1px solid transparent; border-radius: var(--radius-md); line-height: 1.25; text-align: center; }
.dl--urgent { background: var(--urgent-bg); color: var(--urgent-fg); }
.dl--soon { background: var(--warn-bg); color: var(--warn-fg); }
.dl--later { background: var(--later-bg); color: var(--navy); }
.dl--ended { background: var(--soft); color: var(--muted); }
.dl__days { font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.dl--card.dl--ended .dl__days { font-size: 22px; }
.dl__caption { margin-top: 3px; font-size: 12px; font-weight: 600; }
.dl__when { margin-top: 6px; font-family: var(--font-mono); font-weight: 400; font-size: 12px; }
.dl__date, .dl__time { white-space: nowrap; }   /* a narrow box breaks before "klo", never inside */
.dl__label { font-size: 14px; font-weight: 700; }
.dl__note { margin-top: 6px; font-size: 13.5px; }
.dl--pill { display: inline-flex; flex-direction: row; align-items: baseline; gap: 6px; padding: 5px 12px; border-radius: var(--radius-sm); font-size: 14.5px; font-weight: 700; white-space: nowrap; }
.dl--pill .dl__when { margin-top: 0; font-size: 13px; }
.dl--large { align-items: flex-start; gap: 2px; padding: 20px 22px; border-radius: var(--radius-lg); text-align: left; }
.dl--large .dl__days { font-size: 44px; line-height: 1.05; }
.dl--large .dl__when { margin-top: 0; font-size: 15px; }

/* section head, breadcrumbs, pagination, empty state */

.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.section-head__title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 32px; line-height: 1.1; }
.section-head__link { font-weight: 600; }
.breadcrumbs { font-size: 14px; color: var(--muted); }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.breadcrumbs li { min-width: 0; overflow-wrap: anywhere; }
.breadcrumbs li + li::before { content: "›"; content: "›" / ""; padding: 0 7px; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 6px; }
.pagination a {
  display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 7px 10px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-xs); background: var(--white); color: var(--ink);
  text-decoration: none; font-variant-numeric: tabular-nums;
}
.pagination a:hover { border-color: var(--brand); color: var(--navy); }
.pagination a[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: var(--white); font-weight: 700; }
.pagination__item { font-weight: 400; }
.pagination__prev, .pagination__next { padding-left: 12px; padding-right: 12px; font-weight: 600; }
.pagination__gap { padding: 0 4px; color: var(--muted); }
.empty-state { padding: 28px 24px; border: 1px dashed var(--dashed); border-radius: var(--radius); background: var(--white); color: var(--ink-2); text-align: center; }
.empty-state__title { margin: 0 0 6px; font-size: 18px; font-weight: 700; color: var(--ink); }
.empty-state__text { max-width: 560px; margin: 0 auto; }
.empty-state__action { margin: 10px 0 0; font-weight: 600; }

/* tables */

.table-wrap {
  overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md);
  /* scroll shadows: an edge darkens while more columns are hidden that way (narrow screens) */
  background:
    linear-gradient(90deg, var(--white) 30%, rgba(255, 255, 255, 0)) 0 0 / 28px 100% no-repeat local,
    linear-gradient(270deg, var(--white) 30%, rgba(255, 255, 255, 0)) 100% 0 / 28px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(6, 57, 107, 0.16), rgba(6, 57, 107, 0)) 0 0 / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(6, 57, 107, 0.16), rgba(6, 57, 107, 0)) 100% 0 / 12px 100% no-repeat scroll,
    var(--white);
}
.data-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.data-table th { padding: 10px 14px; background: var(--soft); color: var(--ink-2); font-size: 13.5px; text-align: left; vertical-align: bottom; white-space: nowrap; }
.data-table td { padding: 10px 14px; border-top: 1px solid var(--line-soft); vertical-align: top; }
.data-table th.num, .data-table td.num { text-align: right; }
.data-table td.mono { white-space: nowrap; }
.award-table { min-width: 640px; }
.award-table__lot, .award-table__winner { display: block; }
.award-table__lot { font-size: 13.5px; color: var(--muted); }
.award-table__intended { display: block; font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.table-note { margin: 0; font-size: 13.5px; color: var(--muted); }

/* official text and sources */

.verbatim { max-width: 760px; padding: 4px 0 4px 18px; border-left: 3px solid var(--line-strong); color: var(--ink-3); white-space: pre-line; overflow-wrap: anywhere; }
.source-note { margin: 0; font-size: 13.5px; color: var(--muted); }

/* the Urakkavahti box and the ProLaskenta box */

.vahti-box { display: flex; flex-direction: column; gap: 14px; padding: 26px 24px; border-radius: var(--radius-lg); background: var(--navy); color: var(--white); }
.vahti-box > * { margin: 0; }
.vahti-box__eyebrow { font-family: var(--font-mono); font-weight: 400; font-size: 12px; letter-spacing: 0.8px; color: var(--accent-2); }
.vahti-box__title { font-family: var(--font-display); font-weight: 700; font-size: 29px; line-height: 1.1; color: var(--white); }
.vahti-box__text { color: var(--on-navy-2); }
.vahti-box__action { align-self: stretch; }
.vahti-box a:not(.button) { color: var(--white); }
.vahti-box :focus-visible { outline-color: var(--focus-on-dark); }
.prolaskenta-box { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); }
.prolaskenta-box > * { margin: 0; }
.prolaskenta-box__body { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.prolaskenta-box__body > * { margin: 0; }
.prolaskenta-box__eyebrow { font-family: var(--font-mono); font-weight: 400; font-size: 12px; letter-spacing: 0.8px; color: var(--brand); }
.prolaskenta-box__title { font-family: var(--font-body); font-weight: 700; font-size: 21px; line-height: 1.25; }
.prolaskenta-box__text { font-size: 15px; color: var(--ink-2); }
.prolaskenta-box__action { flex: 1 1 auto; }
.prolaskenta-box__note { flex: 1 1 100%; font-size: 13px; color: var(--muted); }

/* error pages */

.error-page { padding-top: 56px; padding-bottom: 56px; }
.error-page h1 { margin: 8px 0; font-size: clamp(34px, 3vw + 20px, 42px); }

/* narrow screens */

@media (max-width: 599px) {
  .section { padding-top: 32px; padding-bottom: 32px; }
  .hero { gap: 16px; padding-top: 32px; padding-bottom: 28px; }
  .hero--compact { gap: 12px; padding-top: 18px; padding-bottom: 24px; }
  .hero__lead { font-size: 17px; }
  .section-head__title { font-size: 26px; }
  .panel { padding: 18px 16px; }
  .vahti-box { padding: 22px 18px; }
  .vahti-box__title { font-size: 26px; }
  .prolaskenta-box { padding: 18px 16px; }
  .notice-card { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; }
  .notice-card--compact .notice-card__body { flex: 0 1 auto; }
  .notice-card__aside { flex: none; align-items: flex-start; }
  .notice-card__aside .dl--card { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0 8px; width: 100%; padding: 7px 12px; text-align: left; }
  .notice-card__aside .dl--card .dl__days { font-size: 22px; }
  .notice-card__aside .dl--card .dl__caption { margin-top: 0; }
  .notice-card__aside .dl--card .dl__when { margin-top: 0; margin-left: auto; font-size: 13px; }
  .dl--large { padding: 16px 18px; }
  .dl--large .dl__days { font-size: 38px; }
  .error-page { padding-top: 36px; padding-bottom: 36px; }
}

/* other media */

@media (forced-colors: active) {
  .chip--active, .pagination a[aria-current="page"], .main-nav a[aria-current="page"] { outline: 2px solid CanvasText; outline-offset: 1px; }
  .notice-card__title a:focus-visible::after { outline-color: Highlight; }
}
@media print {
  .skip-link, .staging-note, .main-nav, .site-header__cta, .vahti-box, .prolaskenta-box, .pagination { display: none !important; }
  body { background: #fff; color: #000; }
  .section--soft, .section--grid { background: none; }
  .site-footer { border-top: 1px solid #888; background: none; color: #000; }
  .site-footer a, .site-footer__about .site-footer__name { color: #000; }
  .notice-card, .panel, .table-wrap, .dl { break-inside: avoid; }
  .notice-card:hover { box-shadow: none; }
}

/* --- css/pages/buyer.css --- */
/* Buyer pages /hankkija/<y-tunnus>-<slug>/ (owner: builder W5; templates/buyer.html). Appended to the one served
   stylesheet by app/web/assets.py and scoped by the body class .page-buyer. Shared components and the layout
   vocabulary (hero--compact, facts--inline, layout, panel) come from static/css/site.css; this file only places
   them as in docs/mockups/Hankkija.dc.html. */

.page-buyer .buyer-hero { gap: 12px; padding-bottom: 28px; }
.page-buyer .buyer-hero__title { overflow-wrap: anywhere; }
.page-buyer .buyer-facts { margin-top: 4px; }
.page-buyer .buyer-facts__number { text-align: left; }

.page-buyer .buyer-body { padding-top: 28px; padding-bottom: 16px; }
.page-buyer .buyer-section-title { font-size: 30px; }
.page-buyer .buyer-links { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 24px; font-weight: 600; }

.page-buyer .buyer-summary { gap: 10px; padding: 18px 20px; border-radius: var(--radius); }
.page-buyer .buyer-summary__title { margin: 0; font-size: 17px; }
.page-buyer .buyer-summary__list { margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.page-buyer .buyer-summary__row { display: flex; justify-content: space-between; gap: 12px; }
.page-buyer .buyer-summary__row dd { margin: 0; font-weight: 600; }
.page-buyer .buyer-summary__note { margin: 0; font-size: 13px; color: var(--muted); }

.page-buyer .buyer-awards { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; padding-bottom: 40px; }
.page-buyer .buyer-awards .section-head { align-items: center; gap: 10px 16px; }
.page-buyer .buyer-awards .section-head__title { font-size: 30px; }
.page-buyer .buyer-awards__more { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.page-buyer .buyer-awards__more a { font-weight: 600; }

@media (max-width: 599px) {
  .page-buyer .buyer-section-title,
  .page-buyer .buyer-awards .section-head__title { font-size: 26px; }
  .page-buyer .buyer-body { padding-top: 22px; }
  /* site.css turns every card into a column below 600 px, where the compact body's flex-basis of 360px became a
     360 px height; reported to W2 (site.css), this keeps the buyer page right until the shared rule changes */
  .page-buyer .notice-card--compact .notice-card__body { flex: 0 1 auto; }
}

/* --- css/pages/content.css --- */
/* Content pages and error pages (owner: builder W6; Phase 3): /urakkavahti/, /tietoa/, /tietosuoja/, /kayttoehdot/
   (body class page-content; templates/pages/) and templates/errors/ (body class page-error). Appended to the one
   stylesheet by app/web/assets.py; every rule is scoped by one of the two body classes. The band, lead, prose,
   panels, facts and chips are the shared classes of static/css/site.css (W2); this file adds only the page parts:
   the steps and the notes of the band (docs/mockups/Vahti.dc.html), the how-it-works grid, the consent quote, the
   draft's open points, and the error page's search form and links. Weights used: Barlow 400/600/700 and Barlow
   Semi Condensed 700 only (the faces site.css loads). No layout shift: nothing here waits for data or images. */

/* --- the band: steps and notes ------------------------------------------------------------------------------------ */

.page-content .content-steps { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 4px 0 0; padding: 0; list-style: none; }
.page-content .content-steps li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.page-content .content-steps__num {
  display: inline-flex; flex: none; align-items: center; justify-content: center; width: 28px; height: 28px;
  border-radius: 50%; background: var(--navy); color: var(--white); font-size: 14px; font-weight: 700; line-height: 1;
}
.page-content .content-note {
  max-width: 760px; padding: 12px 16px; border: 1px solid var(--line-strong); border-left: 4px solid var(--navy);
  border-radius: var(--radius-md); background: var(--white); color: var(--ink-2);
}
.page-content .content-note strong { color: var(--ink); }
.page-content .content-note--draft { border-color: var(--warn-line); border-left-color: var(--warn-fg); background: var(--warn-bg); color: var(--warn-fg); }
.page-content .content-note--draft strong { color: var(--warn-fg); }

/* --- body ------------------------------------------------------------------------------------------------------- */

.page-content .prose > h2:first-child { margin-top: 0; }     /* level with the aside (site.css gives every h2 1.8em) */
.page-content .prose h2[id], .page-content .prose h3[id] { scroll-margin-top: 16px; }
.page-content .prose :target { background: var(--soft); border-radius: var(--radius-xs); box-shadow: 0 0 0 6px var(--soft); }
.page-content .content-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 18px 28px; }
.page-content .content-grid__item { min-width: 0; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.page-content .content-grid__item h3 { margin: 0 0 6px; font-size: 18px; }
.page-content .content-grid__item p { margin: 0; color: var(--ink-2); }

.page-content .content-consent { margin-left: 0; margin-right: 0; padding: 14px 18px; border-left: 3px solid var(--navy); border-radius: 0 var(--radius-md) var(--radius-md) 0; background: var(--soft); }
.page-content .content-consent__text { margin: 0; color: var(--ink-3); }
.page-content .content-consent__text p { margin: 0; }
.page-content .content-consent__caption { margin-top: 8px; font-size: 14px; color: var(--muted); }

.page-content .content-aside__title { font-size: 20px; }
.page-content .content-aside__subtitle { margin-top: 6px; font-size: 15px; color: var(--ink-2); }

.page-content .content-table { min-width: 620px; }
.page-content .content-table td:first-child { font-weight: 600; }

.page-content .content-open { padding-bottom: 48px; }
.page-content .content-open__box {
  max-width: 760px; padding: 18px 22px; border: 1px dashed var(--warn-line); border-radius: var(--radius-lg);
  background: var(--warn-bg); color: var(--warn-fg);
}
.page-content .content-open__title { margin: 0 0 8px; font-size: 18px; color: var(--warn-fg); }
.page-content .content-open__box ul { margin: 0; padding-left: 1.3em; }
.page-content .content-open__box li + li { margin-top: 4px; }

/* --- error pages ------------------------------------------------------------------------------------------------ */

.page-error .error-page { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.page-error .error-page > * { margin: 0; max-width: 760px; }
.page-error .error-page__message { font-size: 19px; color: var(--ink-2); }
.page-error .error-search { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; max-width: 560px; }
.page-error .error-search input { flex: 1 1 240px; min-width: 0; font-size: 17px; }
.page-error .error-search .button { flex: none; padding-left: 26px; padding-right: 26px; }
.page-error .error-page__links ul { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; list-style: none; font-weight: 600; }

/* --- narrow screens --------------------------------------------------------------------------------------------- */

@media (max-width: 599px) {
  .page-content .content-steps { gap: 8px 18px; }
  .page-content .content-note { padding: 10px 14px; }
  .page-content .content-open { padding-bottom: 32px; }
  .page-content .content-open__box { padding: 16px; }
  .page-error .error-page__message { font-size: 17px; }
}

@media print {
  .page-content .content-note, .page-content .content-open__box { border-color: #888; background: none; color: #000; }
  .page-error .error-search { display: none; }
}

/* --- css/pages/home.css --- */
/* The front page (owner: builder W3; templates/home.html). Appended to the one served stylesheet by
   app/web/assets.py and scoped by the body class .page-home. Layout as in docs/mockups/Main.dc.html; the shared
   components (chips, cards, tiles, the Urakkavahti and ProLaskenta boxes) and the layout vocabulary come from
   static/css/site.css. No images; every box has its size before the fonts arrive, so nothing shifts. */

/* --- hero: eyebrow, h1, lead, the search form, tabs, trade chips ------------------------------------------------- */

.page-home .home-search {
  display: flex; flex-wrap: wrap; gap: 10px; max-width: 960px; padding: 10px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--white);
  box-shadow: var(--shadow-search);
}
.page-home .home-search__q { flex: 3 1 300px; min-width: 0; padding: 12px 14px; border-color: var(--line); font-size: 17px; }
.page-home .home-search__alue { flex: 1 1 180px; min-width: 0; padding: 12px; border-color: var(--line); }
.page-home .home-search__submit { flex: 0 0 auto; padding: 12px 30px; font-size: 17px; }
.page-home .home-tabs { gap: 8px; }
.page-home .home-trades { gap: 8px; }
.page-home .home-trades__label { margin-right: 4px; font-size: 14px; font-weight: 600; color: var(--muted); }

/* --- newest open notices beside the Urakkavahti box --------------------------------------------------------------- */

.page-home .home-main { padding-top: 48px; padding-bottom: 48px; }
.page-home .home-aside { align-self: flex-start; }

/* --- the trade grid ---------------------------------------------------------------------------------------------- */

.page-home .home-trade-grid .stack { gap: 18px; }
.page-home .home-trade-grid__lead { max-width: 720px; color: var(--ink-2); }

/* --- "Tietoa, jota Hilman haku ei kokoa" -------------------------------------------------------------------------- */

.page-home .home-facts { display: flex; flex-direction: column; gap: 22px; padding-top: 52px; padding-bottom: 32px; }
.page-home .home-facts > h2 { margin: 0; }
.page-home .home-facts__grid { display: flex; flex-wrap: wrap; gap: 28px; }
.page-home .home-facts__item { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.page-home .home-facts__item > h3 { margin: 0; font-size: 20px; }
.page-home .home-facts__item > p { margin: 0; color: var(--ink-2); }

/* --- the ProLaskenta box ------------------------------------------------------------------------------------------- */

.page-home .home-cta { padding-top: 16px; padding-bottom: 60px; }

@media (max-width: 599px) {
  .page-home .home-search__submit { flex: 1 1 100%; }
  .page-home .home-main { padding-top: 32px; padding-bottom: 32px; }
  .page-home .home-facts { padding-top: 36px; }
}

/* --- css/pages/hubs.css --- */
/* Trade hubs, region pages and /ammattialat/ (owner: builder W5; templates/hubs/). Appended to the one served
   stylesheet by app/web/assets.py and scoped by the body classes .page-hub (hubs and region pages) and .page-trades.
   The shared components (chips, cards, tables, the Urakkavahti and ProLaskenta boxes) and the layout vocabulary
   (hero--compact, stats, layout, panel, link-list, prose) come from static/css/site.css; this file only places them
   as in docs/mockups/Ala.dc.html. No images, so nothing shifts while the page loads. */

/* --- hub and region pages ------------------------------------------------------------------------------------ */

.page-hub .hub-hero .stats { font-size: 16px; }
.page-hub .hub-regions { gap: 8px; }
.page-hub .hub-regions .chip { font-size: 14.5px; padding: 6px 13px; }

/* "Muut maakunnat": a disclosure without script; closed it is one more chip in the row, open it takes the full row
   and lists the rest below its summary */
.page-hub .hub-regions__more { flex: 0 1 auto; min-width: 0; }
.page-hub .hub-regions__more[open] { flex: 1 1 100%; }
.page-hub .hub-regions__toggle { cursor: pointer; list-style: none; }
.page-hub .hub-regions__toggle::-webkit-details-marker { display: none; }
.page-hub .hub-regions__toggle::after { content: "▾"; font-size: 12px; color: var(--muted); }
.page-hub .hub-regions__more[open] > .hub-regions__toggle::after { content: "▴"; }
.page-hub .hub-regions__more[open] > .hub-regions__toggle { border-color: var(--brand); }
.page-hub .hub-regions__list { margin-top: 8px; gap: 8px; }

.page-hub .hub-note { margin: 0; font-size: 13.5px; color: var(--muted); }

.page-hub .hub-body { padding-top: 28px; padding-bottom: 24px; }
.page-hub .hub-list-head { align-items: center; gap: 10px 16px; }
.page-hub .hub-list-head__title { font-size: 30px; }
.page-hub .hub-all { margin: 0; font-weight: 600; }

.page-hub .hub-panel { gap: 8px; padding: 18px 20px; border-radius: var(--radius); }
.page-hub .hub-panel__title { margin: 0; font-size: 17px; }
.page-hub .hub-feeds a { font-weight: 600; }

.page-hub .hub-awards { display: flex; flex-direction: column; gap: 12px; padding-top: 24px; padding-bottom: 12px; }
.page-hub .hub-awards .section-head__title { font-size: 30px; }

.page-hub .hub-guide { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px 48px; padding-top: 28px;
  padding-bottom: 24px; }
.page-hub .hub-guide__text { flex: 2 1 480px; min-width: 0; max-width: 720px; }
.page-hub .hub-guide__text > h2:first-child { margin-top: 0; }
.page-hub .hub-guide > .prolaskenta-box { flex: 1 1 300px; min-width: 0; }

@media (max-width: 599px) {
  .page-hub .hub-list-head__title,
  .page-hub .hub-awards .section-head__title { font-size: 26px; }
  .page-hub .hub-body { padding-top: 22px; }
  .page-hub .hub-guide__text { flex-basis: 100%; }
}

/* --- /ammattialat/ -------------------------------------------------------------------------------------------- */

.page-trades .trades-section { padding-top: 32px; padding-bottom: 16px; display: flex; flex-direction: column;
  gap: 14px; }
.page-trades .trades-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }

/* one card per hub: the title link covers the whole card */
.page-trades .trades-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); }
.page-trades .trades-card:hover { border-color: var(--brand); }
.page-trades .trades-card:focus-within { outline: 3px solid var(--brand); outline-offset: 2px; }
.page-trades .trades-card__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
  gap: 4px 12px; }
.page-trades .trades-card__title { margin: 0; font-size: 17px; font-weight: 600; }
.page-trades .trades-card__link { color: var(--ink); text-decoration: none; }
.page-trades .trades-card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.page-trades .trades-card__link:focus-visible { outline: none; }
.page-trades .trades-card:hover .trades-card__link { color: var(--navy); text-decoration: underline; }
.page-trades .trades-card__lead { margin: 0; font-size: 14.5px; color: var(--ink-2); }

.page-trades .trades-about { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 24px 48px;
  padding-top: 40px; padding-bottom: 24px; }
.page-trades .trades-about__text { flex: 2 1 480px; min-width: 0; }
.page-trades .trades-about__text > h2:first-child { margin-top: 0; }
.page-trades .trades-about > .vahti-box { flex: 1 1 300px; min-width: 0; }

/* --- css/pages/notice.css --- */
/* The notice page /ilmoitus/<id>/<slug>/ (owner: builder W4). Look: docs/mockups/Ilmoitus.dc.html.
   Every rule is scoped by the body class .page-notice and uses the tokens of css/site.css. Layout: one column on
   narrow screens (actions, main, side); from 960 px a grid with the main column on the left and the aside on the
   right (actions in the first row, the ProLaskenta box and the source below them). No layout shift: no images, the
   countdown box has fixed type sizes. Orange stays a button colour (site.css rule): a changed timeline step uses the
   warning colours. */

/* --- hero ----------------------------------------------------------------------------------------------------- */

.page-notice .notice-hero { background: var(--soft); border-bottom: 1px solid var(--line); }
.page-notice .notice-hero__inner { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; padding-bottom: 28px; }
.page-notice .notice-hero__inner > * { margin: 0; }
.page-notice .notice-hero__tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.page-notice .notice-hero__title { max-width: 900px; overflow-wrap: anywhere; }
.page-notice .notice-hero__buyer { font-size: 18px; color: var(--ink-2); overflow-wrap: anywhere; }
.page-notice .notice-hero__buyer a { font-weight: 600; }
.page-notice .notice-hero__buyer-name { font-weight: 600; color: var(--ink); }
.page-notice .notice-alert {
  max-width: 900px; padding: 10px 14px; border: 1px solid var(--warn-line); border-radius: var(--radius-sm);
  background: var(--warn-bg); color: var(--warn-fg); font-size: 15px;
}
.page-notice .notice-alert a { color: var(--warn-fg); font-weight: 600; }

/* --- layout --------------------------------------------------------------------------------------------------- */

.page-notice .notice-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 28px; padding-bottom: 24px; }
.page-notice .notice-main { min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.page-notice .notice-main > * { margin: 0; }
.page-notice .notice-actions { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.page-notice .notice-actions > * { margin: 0; }
.page-notice .notice-side { min-width: 0; display: flex; flex-direction: column; gap: 18px; }

@media (min-width: 960px) {
  .page-notice .notice-layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); grid-template-rows: auto 1fr;
    column-gap: 32px; row-gap: 18px; align-items: start;
  }
  .page-notice .notice-main { grid-column: 1; grid-row: 1 / span 2; }
  .page-notice .notice-actions { grid-column: 2; grid-row: 1; }
  .page-notice .notice-side { grid-column: 2; grid-row: 2; }
}

/* --- the aside ------------------------------------------------------------------------------------------------ */

.page-notice .notice-actions .button { width: 100%; }
.page-notice .notice-actions__note { font-size: 13.5px; color: var(--warn-fg); }
.page-notice .notice-actions__hint { margin-top: -4px; font-size: 13.5px; color: var(--muted); }
.page-notice .notice-actions__vahti { align-self: center; padding: 4px 0; font-size: 15px; font-weight: 600; text-align: center; }
.page-notice .notice-side .prolaskenta-box { gap: 10px 32px; }
.page-notice .notice-source { display: flex; flex-direction: column; gap: 4px; padding: 0 4px; font-size: 13.5px; color: var(--muted); }
.page-notice .notice-source p { margin: 0; }
.page-notice .notice-source a { font-weight: 600; }

/* --- sections --------------------------------------------------------------------------------------------------- */

.page-notice .notice-section { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.page-notice .notice-section > * { margin: 0; }
.page-notice .notice-main h2 { margin: 0; font-size: 22px; }
.page-notice .notice-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.page-notice .notice-section-head__label { font-size: 13.5px; color: var(--muted); }
.page-notice .notice-section-head__link { font-size: 15px; font-weight: 600; }

/* facts */
.page-notice .notice-facts h2 { margin-bottom: 2px; }
.page-notice .notice-facts__muted { font-size: 13.5px; color: var(--muted); }
.page-notice .notice-facts__official {
  margin-top: 4px; padding-left: 10px; border-left: 2px solid var(--line-strong); color: var(--ink-3);
  font-size: 14.5px; white-space: pre-line;
}

/* trades by lot */
.page-notice .notice-trades { gap: 10px; }
.page-notice .notice-trades__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.page-notice .notice-trades__list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; font-size: 15.5px; }
.page-notice .notice-trades__tag {
  padding: 1px 9px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--white);
  color: var(--navy); font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.page-notice .notice-trades__text { flex: 1 1 300px; min-width: 0; overflow-wrap: anywhere; }
.page-notice .notice-trades__line { margin: 0; font-size: 15.5px; font-weight: 600; color: var(--navy); }
.page-notice .notice-trades__note { margin: 0; font-size: 13.5px; color: var(--muted); }

/* official text */
.page-notice .notice-text__heading { margin-top: 8px; font-size: 17px; }
.page-notice .notice-text__subheading { margin: 10px 0 6px; font-size: 15px; }
.page-notice .notice-text__empty { color: var(--muted); }
.page-notice .notice-text__more { max-width: 778px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); }
.page-notice .notice-text__more > summary { cursor: pointer; font-weight: 600; overflow-wrap: anywhere; }
.page-notice .notice-text__more[open] > summary { margin-bottom: 10px; }
.page-notice .notice-text__more .verbatim + .verbatim { margin-top: 10px; }

/* lots and results */
.page-notice .notice-lots__table { min-width: 620px; }
.page-notice .notice-lots__name { min-width: 180px; font-weight: 600; overflow-wrap: break-word; }
.page-notice .notice-lots__name .badge { margin-left: 4px; vertical-align: 1px; }
.page-notice .notice-lots__cpv { font-family: var(--font-mono); font-size: 13.5px; }
.page-notice .notice-results__table { min-width: 600px; }
.page-notice .notice-results__lot { min-width: 170px; font-weight: 600; overflow-wrap: break-word; }
.page-notice .notice-results__winner { display: block; }
.page-notice .notice-results__winner + .notice-results__winner { margin-top: 4px; }
.page-notice .notice-results__ytunnus { color: var(--muted); font-size: 13.5px; }
.page-notice .notice-results__outcome { display: block; color: var(--ink-2); }

/* timeline */
.page-notice .notice-timeline__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.page-notice .notice-timeline__step { display: flex; gap: 14px; }
.page-notice .notice-timeline__track { flex: 0 0 18px; display: flex; flex-direction: column; align-items: center; }
.page-notice .notice-timeline__dot {
  flex: none; width: 14px; height: 14px; margin-top: 5px; border: 2px solid var(--navy); border-radius: 50%;
  background: var(--navy);
}
.page-notice .notice-timeline__line { flex: 1 1 auto; width: 2px; min-height: 18px; background: var(--line); }
.page-notice .notice-timeline__step:last-child .notice-timeline__line { background: transparent; }
.page-notice .notice-timeline__body { flex: 1 1 auto; min-width: 0; padding-bottom: 16px; }
.page-notice .notice-timeline__head { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.page-notice .notice-timeline__date { font-family: var(--font-mono); font-size: 13.5px; color: var(--muted); }
.page-notice .notice-timeline__name { font-weight: 700; color: var(--ink); }
.page-notice a.notice-timeline__name { color: var(--brand); }
.page-notice .notice-timeline__current {
  padding: 0 8px; border-radius: var(--radius-pill); background: var(--chip); color: var(--navy); font-size: 12.5px;
  font-weight: 600;
}
.page-notice .notice-timeline__text { margin: 0; font-size: 15px; color: var(--ink-2); overflow-wrap: anywhere; }
.page-notice .notice-timeline__step--current .notice-timeline__dot { box-shadow: 0 0 0 3px var(--chip); }
.page-notice .notice-timeline__step--changed .notice-timeline__dot { border-color: var(--warn-fg); background: var(--warn-fg); }
.page-notice .notice-timeline__step--changed .notice-timeline__name { color: var(--warn-fg); }
.page-notice .notice-timeline__step--pending .notice-timeline__dot,
.page-notice .notice-timeline__step--gap .notice-timeline__dot { border-color: var(--dashed); background: var(--white); }
.page-notice .notice-timeline__step--pending .notice-timeline__name,
.page-notice .notice-timeline__step--gap .notice-timeline__name { color: var(--muted); }

/* history */
.page-notice .notice-history__empty { color: var(--muted); }

@media (max-width: 599px) {
  /* the last crumb is the whole official title right above the h1 that shows it verbatim: hidden on phones (never
     cut), so the deadline and the actions come up; the BreadcrumbList JSON-LD keeps it */
  .page-notice .breadcrumbs li:last-child { display: none; }
  .page-notice .notice-hero__inner { padding-top: 16px; padding-bottom: 22px; }
  .page-notice .notice-hero__buyer { font-size: 17px; }
  .page-notice .notice-layout { gap: 24px; padding-top: 22px; }
  .page-notice .notice-main { gap: 24px; }
}

@media print {
  .page-notice .notice-actions .button, .page-notice .notice-actions__vahti { display: none; }
  .page-notice .notice-text__more { border: 0; padding: 0; }
}

/* --- css/pages/search.css --- */
/* The search page /haku (owner: builder W3; templates/search.html). Appended to the one served stylesheet by
   app/web/assets.py and scoped by the body class .page-search. Layout as in docs/mockups/Haku.dc.html: a light band
   with the search bar and the tabs, then the filter column beside the results. Without JavaScript: on narrow
   screens the filter column is folded behind a CSS-only switch (a hidden checkbox and its label), so the results
   come first; from 900 px on it is always open, and the switch and its label are display:none (no keyboard stop that
   does nothing). Form controls are 16 px: iOS Safari zooms the page into any smaller field it focuses. */

.page-search main { background: var(--soft); }

/* --- search bar and tabs ----------------------------------------------------------------------------------------- */

.page-search .search-top__inner { display: flex; flex-direction: column; gap: 14px; padding-top: 22px; padding-bottom: 8px; }
.page-search .search-bar {
  display: flex; flex-wrap: wrap; gap: 10px; padding: 8px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--white);
}
.page-search .search-bar__q { flex: 3 1 300px; min-width: 0; padding: 11px 14px; border-color: var(--line); font-size: 17px; }
.page-search .search-bar__submit { flex: 0 0 auto; padding: 11px 28px; }
.page-search .search-tabs { gap: 8px; }

/* --- filter column ----------------------------------------------------------------------------------------------- */

.page-search .search-body { gap: 24px; padding-top: 14px; padding-bottom: 56px; }
.page-search .search-filters { flex: 1 1 260px; }
.page-search .search-filters__panel { gap: 20px; padding: 20px; border-radius: var(--radius); }
.page-search .search-filter { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.page-search .search-filter__legend { margin-bottom: 6px; font-size: 15px; font-weight: 700; }
.page-search .search-filter__option { display: flex; align-items: center; gap: 8px; min-height: 30px; font-size: 15px; cursor: pointer; }
.page-search .search-filter__label { flex: 1 1 auto; min-width: 0; }
.page-search .search-filter__count { flex: none; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.page-search .search-filter__more { display: flex; flex-direction: column; gap: 6px; }
.page-search .search-filter__summary { cursor: pointer; color: var(--brand); font-size: 15px; font-weight: 600; }
.page-search .search-filter__more-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.page-search .search-filter__note { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.page-search .search-filter__range { display: flex; gap: 8px; }
.page-search .search-filter__amount { flex: 1 1 0; min-width: 0; padding: 8px 10px; font-size: 16px; }
.page-search .search-filter__text { width: 100%; padding: 9px 10px; font-size: 16px; }
.page-search .search-filters__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.page-search .search-filters__clear { font-size: 14.5px; font-weight: 600; }
.page-search .search-filters__switch, .page-search .search-filters__toggle { display: none; }

/* --- results ----------------------------------------------------------------------------------------------------- */

.page-search .search-results { gap: 14px; }
.page-search .search-results__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.page-search .search-results__title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.page-search .search-results__title > h1 { margin: 0; font-size: 30px; line-height: 1.1; }
.page-search .search-results__terms { margin: 0; font-size: 14.5px; color: var(--muted); }
.page-search .search-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.page-search .search-sort__label { font-size: 14.5px; color: var(--muted); }
.page-search .search-sort__select { padding: 8px 10px; font-size: 16px; }
.page-search .search-sort__submit { padding: 8px 14px; font-size: 14.5px; }

.page-search .search-active {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white);
}
.page-search .search-active__label { margin-right: 4px; font-size: 14.5px; color: var(--ink-2); }
.page-search .search-active__none { font-size: 14.5px; color: var(--muted); }
.page-search .search-active .chip { padding: 4px 10px; border-color: var(--chip); background: var(--chip); color: var(--navy); font-size: 14px; }
.page-search .search-active__links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-left: auto; }
.page-search .search-active__vahti-group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.page-search .search-active__vahti { padding: 9px 14px; font-size: 14.5px; }
.page-search .search-active__note { font-size: 13.5px; color: var(--muted); }
.page-search .search-active__feed { font-size: 14.5px; font-weight: 600; }

.page-search .search-notice {
  padding: 12px 16px; border: 1px solid var(--warn-line); border-radius: var(--radius-md);
  background: var(--warn-bg); color: var(--warn-fg);
}
.page-search .search-notice__title { margin: 0; font-weight: 600; }
.page-search .search-notice__list { margin: 6px 0 0; padding-left: 1.2em; }

/* --- narrow screens: the results first, the filters behind the switch --------------------------------------------- */

@media (max-width: 899px) {
  .page-search .search-filters__switch { display: inline-block; }
  .page-search .search-filters__toggle { display: inline-flex; align-self: flex-start; }
  .page-search .search-filters__switch:focus-visible + .search-filters__toggle { outline: 3px solid var(--focus); outline-offset: 2px; }
  .page-search .search-filters__switch:not(:checked) ~ .search-filters__panel { display: none; }
  .page-search .search-filters__switch:checked + .search-filters__toggle { border-color: var(--navy); }
  .page-search .search-filters { gap: 10px; }
}
@media (max-width: 599px) {
  .page-search .search-bar__submit { flex: 1 1 100%; }
  .page-search .search-results__title > h1 { font-size: 26px; }
  .page-search .search-active__links { margin-left: 0; }
}

/* --- css/pages/vahti.css --- */
/* Urakkavahti (owner: E1; docs/VAHTI.md §5-§7): the form partial (block .vahti-form, on /urakkavahti/ inside
   .page-content and on the vahti pages) and the token pages (body class page-vahti). Appended to the one stylesheet
   by app/web/assets.py. The look: docs/mockups/Vahti.dc.html (the form card, the trade and region pills, the
   manage box). Colours are site.css tokens only (WCAG AA pairs noted there); orange is a button fill with ink text.
   The honeypot is hidden here, never by an inline style (CSP). No layout shift: the Turnstile box keeps its height
   before the widget loads. Weights 400/600/700 only (the faces site.css loads). */

/* --- the form ------------------------------------------------------------------------------------------------- */

.vahti-form {
  display: grid; gap: 22px; max-width: 860px; padding: 26px; border: 1px solid var(--line);
  border-radius: var(--radius-lg); background: var(--white);
}
.vahti-form .vahti-form__title { margin: 0; font-family: var(--font-display); font-size: 30px; line-height: 1.1; }
.vahti-form .vahti-form__group { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.vahti-form .vahti-form__group legend { padding: 0; margin-bottom: 8px; font-weight: 700; }
.vahti-form .vahti-form__group--inline { flex-direction: row; flex-wrap: wrap; gap: 8px 24px; }
.vahti-form .vahti-form__group--inline legend { flex-basis: 100%; }
.vahti-form .vahti-form__choices { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.vahti-form .vahti-form__choice { display: flex; align-items: flex-start; gap: 8px; min-height: 26px; }
.vahti-form .vahti-form__choice input { margin-top: 3px; }
.vahti-form .vahti-form__choices--pills { gap: 8px; }
.vahti-form .vahti-form__pill {
  align-items: center; min-height: 0; padding: 7px 13px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill); background: var(--white); color: var(--ink); font-size: 15px; font-weight: 600;
  cursor: pointer;
}
.vahti-form .vahti-form__pill input { width: 16px; height: 16px; margin-top: 0; accent-color: var(--accent); }
.vahti-form .vahti-form__pill:hover { border-color: var(--brand); }
.vahti-form .vahti-form__pill:has(input:checked) { border-color: var(--navy); background: var(--navy); color: var(--white); }
.vahti-form .vahti-form__pill:has(input:focus-visible) { box-shadow: var(--ring); }
.vahti-form .vahti-form__choice--changes { margin-top: 4px; }
.vahti-form .vahti-form__pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 22px 40px; }
.vahti-form .vahti-form__fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px 24px; }
.vahti-form .vahti-form__field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.vahti-form .vahti-form__field label { font-weight: 700; }
.vahti-form .vahti-form__field input { width: 100%; box-sizing: border-box; }
.vahti-form .vahti-form__field--email { max-width: 460px; }
.vahti-form .vahti-form__field input[aria-invalid="true"] { border-color: var(--urgent-fg); }
.vahti-form .vahti-form__optional { color: var(--muted); font-weight: 400; }
.vahti-form .vahti-form__hint { margin: 0; color: var(--muted); font-size: 14px; }
.vahti-form .vahti-form__error { margin: 0; color: var(--urgent-fg); font-size: 14px; font-weight: 600; }
.vahti-form .vahti-form__consent { display: flex; align-items: flex-start; gap: 10px; max-width: 760px; color: var(--ink-3); font-size: 15px; }
.vahti-form .vahti-form__consent input { width: 20px; height: 20px; margin-top: 2px; }
.vahti-form .vahti-form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.vahti-form .vahti-form__turnstile { width: 300px; max-width: 100%; min-height: 65px; }
.vahti-form .vahti-form__submit { padding: 12px 30px; font-size: 17px; }
.vahti-form .vahti-form__errors { padding: 12px 16px; border: 1px solid var(--warn-line); border-left: 4px solid var(--warn-fg); border-radius: var(--radius-md); background: var(--warn-bg); color: var(--warn-fg); }
.vahti-form .vahti-form__errors p, .vahti-form .vahti-form__errors ul { margin: 0; }
.vahti-form .vahti-form__errors ul { padding-left: 1.2em; }
.vahti-form .vahti-form__pilot { margin: 0; padding: 10px 14px; border-left: 4px solid var(--navy); background: var(--soft); }
.vahti-form .vahti-form__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 600px) {
  .vahti-form { padding: 18px 16px; }
  .vahti-form .vahti-form__title { font-size: 26px; }
}

/* --- the token pages --------------------------------------------------------------------------------------------- */

.page-vahti .vahti-page { display: flex; flex-direction: column; gap: 18px; max-width: 900px; }
.page-vahti .vahti-page > * { margin-top: 0; margin-bottom: 0; }
.page-vahti .vahti-action { margin: 0; }
.page-vahti .vahti-note { margin: 0; max-width: 760px; color: var(--muted); font-size: 14px; }
.page-vahti .vahti-back { margin: 0; font-weight: 600; }
.page-vahti .vahti-consent { margin: 0; max-width: 760px; padding: 14px 18px; border-left: 3px solid var(--navy); border-radius: 0 var(--radius-md) var(--radius-md) 0; background: var(--soft); color: var(--ink-3); }
.page-vahti .vahti-summary { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); }
.page-vahti .vahti-summary p { margin: 0; }
.page-vahti .vahti-summary__label { color: var(--muted); font-size: 14px; font-weight: 600; }
.page-vahti .vahti-summary__value { font-size: 17px; font-weight: 700; }
.page-vahti .vahti-form__errors { padding: 12px 16px; border: 1px solid var(--warn-line); border-left: 4px solid var(--warn-fg); border-radius: var(--radius-md); background: var(--warn-bg); color: var(--warn-fg); }
.page-vahti .vahti-form__errors ul { margin: 0; padding-left: 1.2em; }

/* --- the manage page --------------------------------------------------------------------------------------------- */

.page-vahti .vahti-manage { overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--white); }
.page-vahti .vahti-manage__head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding: 16px 22px;
  border-bottom: 1px solid var(--line); background: var(--soft);
}
.page-vahti .vahti-manage__key { color: var(--muted); }
.page-vahti .vahti-manage__change { margin-left: 6px; font-weight: 600; }
.page-vahti .vahti-manage__count { margin-left: auto; color: var(--muted); font-size: 14px; }
.page-vahti .vahti-manage__paused { margin: 0; padding: 12px 22px; border-bottom: 1px solid var(--warn-line); background: var(--warn-bg); color: var(--warn-fg); font-weight: 600; }
.page-vahti .vahti-manage__empty { margin: 0; padding: 18px 22px; border-bottom: 1px solid var(--line-soft); color: var(--ink-2); }
.page-vahti .vahti-manage__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 16px 22px; }
.page-vahti .vahti-manage__add { font-weight: 700; }
.page-vahti .vahti-manage__full { color: var(--muted); font-size: 14px; }
.page-vahti .vahti-manage__spacer { flex: 1 1 auto; }

.page-vahti .vahti-watches { margin: 0; padding: 0; list-style: none; }
.page-vahti .vahti-watch { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 16px 22px; border-bottom: 1px solid var(--line-soft); }
.page-vahti .vahti-watch__text { display: flex; flex: 1 1 380px; flex-direction: column; gap: 2px; min-width: 0; }
.page-vahti .vahti-watch__name { font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.page-vahti .vahti-watch__details { color: var(--ink-2); font-size: 14.5px; overflow-wrap: anywhere; }
.page-vahti .vahti-watch__stats { color: var(--muted); font-size: 13.5px; }
.page-vahti .vahti-watch__state { color: var(--warn-fg); font-weight: 600; }
.page-vahti .vahti-watch--paused .vahti-watch__name { color: var(--ink-2); }
.page-vahti .vahti-watch__actions { display: flex; flex-wrap: wrap; gap: 8px; }

.page-vahti .vahti-inline { display: inline-flex; margin: 0; }
.page-vahti .vahti-button { min-height: 38px; padding: 7px 12px; font-size: 14.5px; }
.page-vahti .vahti-button--danger { color: var(--urgent-fg); }
.page-vahti .vahti-button--danger:hover { border-color: var(--urgent-fg); color: var(--urgent-fg); }
.page-vahti .vahti-link-button {
  min-height: 44px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.page-vahti .vahti-link-button:hover { color: var(--navy); }
.page-vahti .vahti-link-button--danger, .page-vahti .vahti-link-button--danger:hover { color: var(--urgent-fg); font-weight: 700; }

.page-vahti .vahti-frequency { display: flex; flex-direction: column; gap: 10px; }
.page-vahti .vahti-frequency__title { margin: 0; font-size: 20px; }
.page-vahti .vahti-frequency__form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.page-vahti .vahti-frequency__choices { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; border: 0; }
.page-vahti .vahti-frequency .vahti-form__choice { display: flex; align-items: center; gap: 8px; min-height: 26px; }

@media (max-width: 600px) {
  .page-vahti .vahti-manage__head, .page-vahti .vahti-watch, .page-vahti .vahti-manage__foot { padding-left: 16px; padding-right: 16px; }
  .page-vahti .vahti-manage__count { margin-left: 0; }
}
