/* Canonical SEO article stylesheet — Asuntoanalyysi.
 *
 * SINGLE source of brand/chrome truth for static SEO pages. Pages are
 * GENERATED from scripts/lib/render-seo-page.mjs and link ONLY this file.
 * They cannot drift from the live app brand.
 *
 * Header + footer are a 1:1 port of the live React shell
 * (src/components/shell/Header.jsx, Footer.jsx): charcoal masthead with a
 * Newsreader cream wordmark and a circle-arrow "Aloita analyysi" link;
 * charcoal footer with the serif wordmark, Tili/Käytännöt/Yhteys columns
 * and the legal bar. Tokens mirror src/index.css exactly. Top and bottom
 * are identical on every static page, matching the landing page.
 *
 * Body is the white editorial surface. Content is flush-left to the same
 * gutter as the masthead wordmark (news/blog alignment), not centred.
 *
 * NO cream warmth. NO uppercase text-transform. NO font-variant-caps
 * small-caps (it rendered labels as broken squished caps). NO middot.
 * NO em/en-dash in generated copy. Sentence case only.
 */

:root {
  /* Light surface (mirrors --color-white* in src/index.css) */
  --paper:        #ffffff;
  --paper-deep:   #f0f0f0;
  --paper-edge:   #e5e5e5;

  /* Ink on white (mirrors --color-ink*) */
  --ink:          oklch(20% 0.012 240);
  --ink-muted:    oklch(42% 0.008 240);
  --ink-subtle:   oklch(58% 0.006 240);

  --rule:         oklch(84% 0.005 85);

  /* Dark surface (mirrors --color-charcoal / --color-rule-dark) */
  --charcoal:     oklch(16% 0.01 240);
  --rule-dark:    oklch(28% 0.01 240);

  /* Text on charcoal (mirrors --color-cream / -muted / -subtle) */
  --on-charcoal:        #ffffff;
  --on-charcoal-muted:  #d4d4d4;
  --on-charcoal-subtle: #a3a3a3;

  /* Bronze accent (mirrors --color-bronze) */
  --bronze:       oklch(58% 0.09 65);

  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter Tight', Inter, system-ui, -apple-system, sans-serif;

  /* Shell container = Tailwind max-w-6xl (72rem) + px-6 gutter, exactly
     as Header.jsx / Footer.jsx. The article shares this container so the
     prose left edge aligns with the masthead wordmark. */
  --container: 72rem;
  --pad:       1.5rem;
  /* Editorial reading measure, flush-left within the container. */
  --measure:   44rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;            /* 17px */
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01' 1;
  text-rendering: optimizeLegibility;
}

/* ── Site header — 1:1 with Header.jsx (charcoal masthead) ──────────── */

.site-header {
  background: var(--charcoal);
  position: sticky;
  top: 0;
  z-index: 40;
}

.site-header .inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-header a.logo {
  font-family: var(--font-serif);
  font-size: 1.375rem;             /* 22px, matches sm:text-[22px] */
  font-weight: 400;                /* font-normal — NOT 500 */
  line-height: 1;
  letter-spacing: -0.025em;        /* tracking-tight */
  font-variation-settings: 'opsz' 40;
  color: var(--on-charcoal);
  text-decoration: none;
}

.site-header a.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;             /* 14px */
  letter-spacing: -0.01em;
  color: var(--on-charcoal);
  text-decoration: none;
  transition: color 200ms ease;
}

.site-header a.cta span {
  white-space: nowrap;
}

.site-header a.cta:hover {
  color: var(--bronze);
}

/* ── Article — shares the masthead container, prose flush-left ──────── */

/* The article IS the reading-measure column, centred in the viewport
   (symmetric gutters), matching the live landing page. Children flow
   full-width within it, so per-element `margin: 0 0 Xrem` no longer
   fights a child-level centring rule. */
article {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 4rem var(--pad) 5.5rem;
}

article > * {
  max-width: 100%;
}

.breadcrumb {
  font-size: 0.8125rem;
  color: var(--ink-subtle);
  margin: 0 0 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.breadcrumb a {
  color: var(--ink-subtle);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--bronze);
}

.breadcrumb .sep {
  color: var(--ink-subtle);
  opacity: 0.55;
}

h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.125rem, 5vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.021em;
  font-weight: 500;
  font-variation-settings: 'opsz' 60;
  color: var(--ink);
  margin: 0 0 1.25rem;
  text-wrap: balance;
}

.lead {
  font-family: var(--font-serif);
  font-size: 1.3125rem;
  line-height: 1.55;
  font-weight: 400;
  font-variation-settings: 'opsz' 16;
  color: var(--ink);
  margin: 0 0 2.5rem;
}

/* Reviewer / byline line under the lead (E-E-A-T signal). */
.byline {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--ink-subtle);
  margin: -1.75rem 0 2.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

h2 {
  font-family: var(--font-serif);
  font-size: 1.6875rem;
  line-height: 1.2;
  letter-spacing: -0.014em;
  font-weight: 500;
  font-variation-settings: 'opsz' 40;
  color: var(--ink);
  margin: 3.25rem 0 1rem;
  text-wrap: balance;
}

h3 {
  font-family: var(--font-sans);
  font-size: 1.1875rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.006em;
  color: var(--ink);
  margin: 2rem 0 0.625rem;
}

p {
  margin: 0 0 1.125rem;
}

article a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--bronze);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 140ms ease;
}

article a:hover {
  color: var(--bronze);
}

ul,
ol {
  margin: 0 0 1.25rem;
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.5rem;
}

li::marker {
  color: var(--ink-subtle);
}

strong {
  font-weight: 600;
  color: var(--ink);
}

/* ── Definition block — white, left bronze rule (no grey fill) ──────── */

.definition {
  background: var(--paper);
  border-left: 3px solid var(--bronze);
  padding: 0.25rem 0 0.25rem 1.5rem;
  margin: 1.75rem 0 2.25rem;
}

.definition p {
  margin: 0;
}

.definition p + p {
  margin-top: 0.875rem;
}

/* ── Callout (promoted money sentence, bronze rule, no fill) ─────────── */

.callout {
  border-left: 3px solid var(--bronze);
  padding: 0.25rem 0 0.25rem 1.25rem;
  margin: 1.75rem 0 2rem;
  font-family: var(--font-serif);
  font-size: 1.1875rem;
  line-height: 1.5;
  font-weight: 500;
  color: var(--ink);
}

/* ── Cost / data tables (clean bordered, editorial) ─────────────────── */

.table-wrap {
  margin: 1.75rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  /* table-layout: auto so columns size to content; long Finnish compounds
     (Tietoliikennekaapelointi, Rakennusautomaatio, Lämmitysjärjestelmä)
     get the room they need, narrow numeric columns ("85") shrink to fit.
     If a row still overflows the container, .table-wrap scrolls. The
     previous `table-layout: fixed` distributed width equally and forced
     mid-syllable breaks on the label column. */
}

caption {
  text-align: left;
  font-size: 0.8125rem;
  color: var(--ink-subtle);
  margin-bottom: 0.625rem;
}

/* Source footnote under a data table. Small, muted, consistent across
   all SEO pages so reader brains stop registering it as body content
   and learn to skim past as attribution. Use `<p class="table-source">`
   directly after a `</div>` closing a `.table-wrap`. */
.table-source {
  font-size: 0.75rem;
  color: var(--ink-subtle);
  margin: -1rem 0 1.75rem 0;
  line-height: 1.45;
}

thead th {
  text-align: left;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--ink-muted);
  border-bottom: 2px solid var(--ink);
  padding: 0.625rem 0.875rem;
  vertical-align: bottom;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

tbody td {
  border-bottom: 1px solid var(--rule);
  padding: 0.75rem 0.875rem;
  vertical-align: top;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

tbody tr:last-child td {
  border-bottom: 1px solid var(--paper-edge);
}

tbody td:first-child {
  font-weight: 500;
  /* First-column labels are long Finnish compounds (Lämmitysjärjestelmä,
     Rakennusautomaatio, Vedenkulutuksen etäluettavuus). With
     table-layout: auto (set on `table`) the column sizes to content, so
     the only remaining wrap case is a single word longer than the
     container. Hyphens: auto delegates to the browser's Finnish
     hyphenation dictionary (renderer sets lang="fi" on <html>); on
     browsers without it, overflow-wrap: break-word falls back to a
     word-boundary break, never mid-syllable. */
  min-width: 12ch;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

/* ── CTA card — charcoal conversion block (matches the dark CTA on the
      landing page; this is the one intentional dark body block) ─────── */

.cta-card {
  background: var(--charcoal);
  color: var(--on-charcoal);
  padding: 2rem 2.25rem;
  margin: 3rem 0 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.cta-card p {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--on-charcoal);
  max-width: 34ch;
}

.cta-card a {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background: var(--on-charcoal);
  color: var(--charcoal);
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.75rem 1.5rem;
  white-space: nowrap;
  transition: background 150ms ease, color 150ms ease;
}

.cta-card a:hover {
  background: var(--bronze);
  color: var(--on-charcoal);
}

/* ── Related links — white, hairline-separated (no grey box) ────────── */

.related {
  margin: 3.5rem 0 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
}

.related h2 {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink-muted);
  margin: 0 0 1rem;
}

.related ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.related li {
  margin-bottom: 0.625rem;
}

.related li:last-child {
  margin-bottom: 0;
}

.related a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--bronze);
  text-underline-offset: 0.18em;
}

.related a:hover {
  color: var(--bronze);
}

/* ── Sources + reviewer line (small, muted) ─────────────────────────── */

.sources {
  margin-top: 3.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.sources h2 {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink-muted);
  margin: 0 0 1rem;
}

.sources ol {
  padding-left: 1.25rem;
  margin: 0;
}

.sources li {
  margin-bottom: 0.625rem;
  line-height: 1.55;
}

.sources .updated {
  font-size: 0.8125rem;
  color: var(--ink-subtle);
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--paper-edge);
}

/* ── Site footer — 1:1 with Footer.jsx (charcoal) ───────────────────── */

.site-footer {
  background: var(--charcoal);
}

.site-footer .inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.site-footer .foot-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2.5rem;
  padding: 4rem 0 2.5rem;
  border-top: 1px solid var(--rule-dark);
}

.site-footer .foot-brand {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.025em;
  font-size: 28px;
  line-height: 1.1;
  font-variation-settings: 'opsz' 40;
  color: var(--on-charcoal);
  margin: 0;
}

.site-footer .foot-cols {
  display: grid;
  grid-template-columns: auto auto;
  gap: 2rem 3rem;
  text-align: right;
}

.site-footer .foot-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.site-footer .foot-col-label {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--on-charcoal-subtle);
  margin: 0 0 0.75rem;
}

.site-footer .foot-col a {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--on-charcoal-muted);
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: color 160ms ease;
}

.site-footer .foot-col a:last-child {
  margin-bottom: 0;
}

.site-footer .foot-col a:hover {
  color: var(--bronze);
}

.site-footer .foot-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule-dark);
}

.site-footer .foot-legal span {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--on-charcoal-subtle);
}

/* ── Lead photo (one real, free-licensed image) ─────────────────────── */

.page-photo {
  margin: 0 0 2.5rem;
}

.page-photo-inline {
  margin: 3rem 0;
}

/* Founder portrait: a face, not a hero. Constrained, left-aligned. */
.page-photo-portrait {
  max-width: 11rem;
  margin: 0 0 2rem;
}

.page-photo-portrait img {
  border-radius: 0;
}

.page-photo img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--paper-deep);
}

.page-photo-credit {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--ink-subtle);
  margin: 0.5rem 0 0;
}

.page-photo-credit a {
  color: var(--ink-subtle);
  text-decoration: underline;
  text-decoration-color: var(--bronze);
  text-underline-offset: 0.16em;
}

.page-photo-credit a:hover {
  color: var(--bronze);
}

/* ── Content hub (/oppaat) list ─────────────────────────────────────── */

.hub ul {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.hub li {
  margin: 0 0 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.hub li:last-child {
  border-bottom: none;
}

.hub li a {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

.hub li a:hover {
  color: var(--bronze);
}

.hub-desc {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--ink-subtle);
  margin-top: 0.375rem;
}

/* ── Focus visible (bronze ring, works on light + charcoal) ─────────── */

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 3px;
  border-radius: 0;
}

/* ── Wider gutter on larger viewports (matches sm:px-8) ──────────────── */

@media (min-width: 40rem) {
  :root {
    --pad: 2rem;
  }
}

/* ── Mobile (single column, left-aligned footer) ────────────────────── */

@media (max-width: 40rem) {
  :root {
    --pad: 1.25rem;
  }

  article {
    padding-top: 2.5rem;
    padding-bottom: 4rem;
  }

  .lead {
    font-size: 1.1875rem;
  }

  .byline {
    margin: -1.25rem 0 2rem;
  }

  h2 {
    margin-top: 2.5rem;
  }

  .cta-card {
    padding: 1.5rem 1.375rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-card a {
    align-self: stretch;
    justify-content: center;
  }

  .site-footer .foot-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }

  .site-footer .foot-cols {
    text-align: left;
  }

  .site-footer .foot-col {
    align-items: flex-start;
  }
}

/* ── Print (clean, ink on white, no chrome) ─────────────────────────── */

@media print {
  @page {
    margin: 18mm 16mm;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
    line-height: 1.45;
  }

  .site-header,
  .site-footer,
  .cta-card,
  .related {
    display: none !important;
  }

  article,
  article > * {
    max-width: 100%;
    padding: 0;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .definition {
    border-left: 2px solid #000;
  }

  h1, h2, h3 {
    page-break-after: avoid;
    break-after: avoid;
  }

  tr, li {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  thead th {
    border-bottom: 1.5px solid #000;
  }

  tbody td {
    border-bottom: 1px solid #999;
  }
}

/* ── Reduced motion ─────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* ── Vastuunjakohaku — inline interactive search on /vastuunjakotaulukko.
      Editorial card: light surface, bronze accents, charcoal CTA tokens
      reused from the rest of the chrome. No new brand surface, no new
      fonts. Result cards stack vertically; verdict pill encodes
      osakas / yhtio / jaettu with a colour-blind-safe colour + label. */

.vastuu-search {
  background: var(--paper-deep);
  border-left: 3px solid var(--bronze);
  padding: 1.5rem 1.75rem;
  margin: 1.75rem 0 2rem;
}

.vastuu-search-title {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  margin: 0 0 0.5rem;
}

.vastuu-search-help {
  margin: 0 0 1rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

.vastuu-search-input-row {
  margin: 0 0 0.75rem;
}

.vastuu-search-input {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 0.7rem 0.9rem;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 0;
  appearance: none;
  cursor: text;
  transition: border-color 150ms ease;
}

.vastuu-search-input:hover {
  border-color: var(--bronze);
}

.vastuu-search-input:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 1px;
  border-color: var(--bronze);
}

.vastuu-search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.25rem;
}

.vastuu-search-chip {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--rule);
  padding: 0.32rem 0.7rem;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.vastuu-search-chip:hover,
.vastuu-search-chip:focus-visible {
  background: var(--charcoal);
  color: var(--on-charcoal);
  border-color: var(--charcoal);
  outline: none;
}

/* Density redesign: borderless rows, hairline divider, rectangular pills.
   See docs/superpowers/specs/2026-05-18-vastuunjako-density-design.html. */
.vastuu-search-results {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0.25rem 1.1rem;
  margin-top: 0.875rem;
}

.vastuu-search-results:empty {
  display: none;
}

.vastuu-card {
  padding: 0.85rem 0;
}

.vastuu-card + .vastuu-card {
  border-top: 1px solid var(--rule);
}

.vastuu-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin: 0 0 0.35rem;
}

.vastuu-card-title-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem;
  min-width: 0;
}

.vastuu-card-tyo {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}

.vastuu-card-verdict {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.18rem 0.6rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.vastuu-verdict-yhtio {
  background: oklch(94% 0.05 145);
  color: oklch(28% 0.08 145);
  border: 1px solid oklch(70% 0.09 145);
}

.vastuu-verdict-osakas {
  background: oklch(95% 0.04 245);
  color: oklch(30% 0.08 245);
  border: 1px solid oklch(70% 0.08 245);
}

.vastuu-verdict-jaettu {
  background: oklch(95% 0.04 75);
  color: oklch(30% 0.09 75);
  border: 1px solid oklch(70% 0.09 75);
}

.vastuu-card-rationale {
  margin: 0 0 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink);
}

/* Default-visible bronze-underlined click-out to Finlex. The whole
   pinpoint string ("AOYL 4 luku 2 §") plus a small "→ Finlex" affordance. */
.vastuu-card-pinpoint-link {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--ink-muted);
  text-decoration: underline;
  text-decoration-color: var(--bronze);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  margin: 0;
}

.vastuu-card-pinpoint-link:hover {
  color: var(--bronze);
}

/* Plain-text pinpoint fallback when the row has no Finlex URL. */
.vastuu-card-pinpoint {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--ink-subtle);
  font-weight: 500;
}

/* Inline scenario tag sits next to the title. Load-bearing on derivative
   rows: tells the reader at a glance that this answer is for a special
   case (vaurio, ilmoittamaton muutos, vakuutus, yhtiöjärjestys, ...). */
.vastuu-card-scenario-tag {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--paper-deep);
  color: var(--ink-muted);
  border: 1px solid var(--paper-edge);
}

/* Disclosure: verbatim AOYL § quote + huom + oikeuskäytäntö cases live
   here so the collapsed card stays four lines. Summary text names what's
   inside (e.g. "Lue AOYL 4:2 ja oikeustapaukset: KKO 2003:80") rather
   than a generic label. */
.vastuu-card-details {
  margin: 0.5rem 0 0;
}

.vastuu-card-details-summary {
  cursor: pointer;
  list-style: none;
  padding: 0.2rem 0;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.vastuu-card-details-summary::-webkit-details-marker {
  display: none;
}

.vastuu-card-details-summary::before {
  content: "+ ";
  color: var(--bronze);
  font-weight: 600;
}

.vastuu-card-details[open] .vastuu-card-details-summary::before {
  content: "− ";
}

.vastuu-card-details-summary:hover {
  color: var(--ink);
}

.vastuu-card-details-body {
  margin: 0.5rem 0 0;
}

/* Verbatim Finlex/Pelastuslaki § snippet inside the disclosure body. */
.vastuu-card-lainsitaatti {
  margin: 0 0 0.55rem;
  padding: 0.5rem 0.85rem;
  border-left: 2px solid var(--bronze);
  background: var(--paper-deep);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink);
}

.vastuu-card-lainsitaatti-cite {
  display: block;
  margin-top: 0.4rem;
  font-style: normal;
  font-size: 0.75rem;
  color: var(--ink-subtle);
}

.vastuu-card-lainsitaatti-cite a {
  color: var(--ink-muted);
  text-decoration: underline;
  text-decoration-color: var(--bronze);
  text-underline-offset: 2px;
}

.vastuu-card-lainsitaatti-cite a:hover {
  color: var(--bronze);
}

/* Huom inside disclosure: plain muted paragraph, no tinted block. */
.vastuu-card-huom {
  margin: 0 0 0.55rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink-muted);
}

/* Oikeuskäytäntö cases inside disclosure. The disclosure summary already
   names what's inside, so we drop the redundant uppercase header. */
.vastuu-card-oikeuskaytanto {
  margin: 0;
}

.vastuu-card-oikeuskaytanto-item {
  margin: 0 0 0.3rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink);
}

.vastuu-card-oikeuskaytanto-case {
  font-weight: 600;
}

.vastuu-card-oikeuskaytanto-case[href] {
  text-decoration: underline;
  text-decoration-color: var(--bronze);
  text-underline-offset: 2px;
  color: var(--ink);
}

.vastuu-card-oikeuskaytanto-case[href]:hover {
  color: var(--bronze);
}

.vastuu-search-empty {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

.vastuu-search-meta {
  margin: 0.875rem 0 0;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--ink-subtle);
}

.vastuu-search-full-cta {
  margin: 1.1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-family: var(--font-sans);
  font-size: 0.875rem;
}

.vastuu-search-full-cta a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--bronze);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.vastuu-search-full-cta a:hover {
  color: var(--bronze);
  text-decoration-thickness: 2px;
}

@media (max-width: 36rem) {
  .vastuu-search { padding: 1.1rem 1.1rem; }
  .vastuu-card-head { flex-direction: column; align-items: flex-start; }
}

/* ── Page-scoped vastuujakohaku (Widget A) — same shell, narrower scope.
      Used on per-renovation pages with inlineToolOptions.filter set. The
      hub at /vastuunjakotaulukko renders without this class and keeps the
      original unfiltered styling. Polish round may drop the bronze
      left-rule here to differentiate scoped vs hub; for now we keep the
      visual hint via `.vastuu-search-scoped`. */
.vastuu-search-scoped {
  /* Inherits everything from .vastuu-search. Reserved for the polish
     round (drop bronze rule etc.); behaviour is unchanged by default. */
}

/* ── Widget B — AOYL päätös-aikajana (vertical stepper) ───────────────── */

.aoyl-aikajana {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--bronze);
  padding: 1.4rem 1.6rem;
  margin: 1.75rem 0 2rem;
}

.aoyl-aikajana-title {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  color: var(--ink);
}

.aoyl-aikajana-help {
  margin: 0 0 1.2rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink-muted);
}

.aoyl-aikajana ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: aoyl-aikajana;
}

.aoyl-aikajana ol li {
  position: relative;
  padding: 0 0 1.1rem 2.8rem;
  border-left: 1px solid var(--rule);
  margin-left: 1rem;
  counter-increment: aoyl-aikajana;
}

.aoyl-aikajana ol li:last-child {
  padding-bottom: 0;
  border-left: 1px solid transparent;
}

.aoyl-aikajana ol li::before {
  content: counter(aoyl-aikajana);
  position: absolute;
  left: -1rem;
  top: -0.2rem;
  width: 2rem;
  height: 2rem;
  background: var(--charcoal);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
}

.aoyl-aikajana h3 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.3rem;
  color: var(--ink);
}

.aoyl-aikajana p {
  margin: 0 0 0.35rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink);
}

.aoyl-aikajana-pin {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--ink-muted);
  text-decoration: underline;
  text-decoration-color: var(--bronze);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.aoyl-aikajana-pin:hover {
  color: var(--bronze);
}

/* ── Widget C — stock-age cohort bars ─────────────────────────────────── */

.cohort-bars {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 1.4rem 1.6rem;
  margin: 1.75rem 0 2rem;
}

.cohort-bars-title {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 0.9rem;
  color: var(--ink);
}

.cohort-bars-row {
  display: grid;
  grid-template-columns: 7rem 1fr 9rem;
  gap: 0.7rem;
  align-items: center;
  padding: 0.45rem 0;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
}

.cohort-bars-row:first-of-type {
  border-top: 0;
}

.cohort-bars-range {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--ink);
}

.cohort-bars-track {
  background: var(--paper-deep);
  height: 1.4rem;
  position: relative;
  border: 1px solid var(--paper-edge);
}

.cohort-bars-fill {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  color: var(--paper);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-sans);
  background: var(--ink-subtle);
}

.cohort-bars-row-past .cohort-bars-fill { background: var(--ink-subtle); }
.cohort-bars-row-urgent .cohort-bars-fill,
.cohort-bars-row-peak .cohort-bars-fill { background: var(--bronze); }
.cohort-bars-row-near .cohort-bars-fill { background: var(--ink-muted); }
.cohort-bars-row-future .cohort-bars-fill {
  background: var(--paper-edge);
  color: var(--ink-muted);
}

.cohort-bars-status {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.cohort-bars-row-urgent .cohort-bars-status,
.cohort-bars-row-peak .cohort-bars-status {
  color: var(--bronze);
  font-weight: 600;
}

.cohort-bars-footnote {
  margin: 1rem 0 0;
  font-size: 0.78rem;
  color: var(--ink-subtle);
  line-height: 1.55;
}

@media (max-width: 44rem) {
  .cohort-bars-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

