/*
  Stylesheet of the canton and municipality pages (src/area/render/article.ts). The pages ship
  no app script and none of the app's CSS, so this file is the whole design: system fonts, the
  suite's slate and sky tokens, light by default and dark under <html class="dark"> (set before
  paint by the engine's theme bootstrap). The build plugin copies it to dist/assets/area-<hash>.css.
*/
:root {
  --ra-bg: #ffffff;
  --ra-surface: #f8fafc;
  --ra-border: #e2e8f0;
  --ra-text: #334155;
  --ra-strong: #0f172a;
  --ra-muted: #64748b;
  --ra-link: #0369a1;
  --ra-bar: #0284c7;
  --ra-track: #e2e8f0;
  --ra-note-bg: #f0f9ff;
  --ra-note-border: #bae6fd;
  --ra-warn-bg: #fffbeb;
  --ra-warn-border: #fcd34d;
  --ra-accent: #ef4444;
}
html.dark {
  --ra-bg: #0f172a;
  --ra-surface: #1e293b;
  --ra-border: #334155;
  --ra-text: #cbd5e1;
  --ra-strong: #f8fafc;
  --ra-muted: #94a3b8;
  --ra-link: #7dd3fc;
  --ra-bar: #38bdf8;
  --ra-track: #22354c;
  --ra-note-bg: rgba(56, 189, 248, 0.1);
  --ra-note-border: rgba(56, 189, 248, 0.25);
  --ra-warn-bg: rgba(252, 211, 77, 0.1);
  --ra-warn-border: rgba(252, 211, 77, 0.25);
}
html {
  color-scheme: light;
}
html.dark {
  color-scheme: dark;
}
body {
  margin: 0;
  background: var(--ra-bg);
  color: var(--ra-text);
  font:
    15px/1.6 ui-sans-serif,
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  -webkit-text-size-adjust: 100%;
}
.ra {
  min-height: 100vh;
}
.ra *,
.ra *::before,
.ra *::after {
  box-sizing: border-box;
}
.ra a {
  color: var(--ra-link);
  text-underline-offset: 2px;
}
.ra-header {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid var(--ra-border);
  background: var(--ra-surface);
}
.ra-brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.ra .ra-brand {
  color: var(--ra-strong);
}
.ra-wm {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.ra-oo {
  color: var(--ra-accent);
}
.ra-maplink {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 500;
}
.ra-main {
  max-width: 64rem;
  margin: 0 auto;
  padding: 16px 16px 48px;
}
.ra-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--ra-muted);
}
.ra-crumbs li + li::before {
  content: '/';
  margin-right: 6px;
}
.ra-crumbs a {
  display: inline-block;
  padding: 10px 0;
}
.ra h1 {
  margin: 4px 0 4px;
  color: var(--ra-strong);
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.ra h2 {
  margin: 0 0 8px;
  color: var(--ra-strong);
  font-size: 17px;
  line-height: 1.3;
}
.ra h3 {
  margin: 16px 0 4px;
  color: var(--ra-strong);
  font-size: 13px;
}
.ra section {
  margin-top: 32px;
  break-inside: avoid;
}
.ra p {
  margin: 0 0 10px;
}
.ra-sub {
  color: var(--ra-muted);
  font-size: 14px;
}
.ra-notice {
  padding: 10px 12px;
  border: 1px solid var(--ra-warn-border);
  border-radius: 8px;
  background: var(--ra-warn-bg);
  font-size: 14px;
}
.ra .ra-figs {
  margin-top: 20px;
}
.ra-hero dt,
.ra-fig dt {
  color: var(--ra-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ra-hero dl,
.ra-fig dl {
  margin: 0;
}
.ra-hero dd {
  margin: 4px 0 0;
  color: var(--ra-strong);
  font-size: 44px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.ra-hero p,
.ra-fig p {
  margin: 4px 0 0;
  color: var(--ra-muted);
  font-size: 12px;
}
.ra-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}
.ra-fig {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--ra-border);
  border-radius: 12px;
  background: var(--ra-surface);
}
.ra-fig dd {
  margin: 2px 0 0;
  color: var(--ra-strong);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.ra-scroll {
  overflow-x: auto;
}
.ra table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.ra caption {
  padding-bottom: 6px;
  color: var(--ra-muted);
  font-size: 12px;
  text-align: left;
}
.ra th,
.ra td {
  padding: 8px 8px;
  border-bottom: 1px solid var(--ra-border);
  text-align: right;
  vertical-align: top;
}
.ra th[scope='row'],
.ra thead th:first-child {
  text-align: left;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.ra thead th {
  color: var(--ra-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ra-opt {
  display: none;
}
.ra-bar {
  display: block;
  height: 6px;
  margin-top: 4px;
  overflow: hidden;
  border-radius: 0 3px 3px 0;
  background: var(--ra-track);
}
.ra-bar > span {
  display: block;
  height: 100%;
  border-radius: 0 3px 3px 0;
  background: var(--ra-bar);
}
.ra td .ra-bar {
  margin-left: auto;
  width: 96px;
}
.ra-note-small {
  margin-top: 8px;
  color: var(--ra-muted);
  font-size: 12px;
}
.ra figure {
  margin: 12px 0 0;
}
.ra-chart {
  display: block;
  width: 100%;
  max-width: 40rem;
  height: 120px;
  border-bottom: 1px solid var(--ra-border);
}
.ra-chart path {
  fill: var(--ra-bar);
}
.ra-chart line {
  stroke: var(--ra-strong);
  stroke-width: 1.5;
  stroke-dasharray: 3 3;
  vector-effect: non-scaling-stroke;
}
.ra figcaption {
  display: flex;
  justify-content: space-between;
  max-width: 40rem;
  color: var(--ra-muted);
  font-size: 11px;
}
.ra-bands {
  display: grid;
  gap: 2px;
  max-width: 24rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.ra-bands li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  border-bottom: 1px solid var(--ra-border);
}
.ra-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ra-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.ra-cta {
  margin-top: 32px;
}
.ra-cta a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--ra-bar);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
}
.ra .ra-cta a {
  color: #082f49;
}
@media (min-width: 640px) {
  .ra-main {
    padding: 24px 24px 64px;
  }
  .ra h1 {
    font-size: 32px;
  }
  .ra-kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .ra-opt {
    display: table-cell;
  }
  .ra-links a {
    min-height: 32px;
  }
}
@media print {
  .ra-header,
  .ra-cta {
    display: none;
  }
  .ra {
    --ra-bg: #ffffff;
    --ra-text: #000000;
  }
}
