/* Summary pages (canton / municipality). Loaded after the app stylesheet, which locks the
   viewport for the map: these pages scroll like a document. Tokens follow the suite theme
   (`.dark` / [data-theme=dark] on <html>, stamped by the engine's theme bootstrap). */
:root {
  --sa-bg: #f8fafc;
  --sa-surface: #ffffff;
  --sa-text: #0f172a;
  --sa-muted: #475569;
  --sa-line: #e2e8f0;
  --sa-accent: #dc2626;
  --sa-bar: #94a3b8;
  --sa-link: #b91c1c;
}
:root.dark,
:root[data-theme='dark'] {
  --sa-bg: #0f172a;
  --sa-surface: #111c33;
  --sa-text: #f1f5f9;
  --sa-muted: #94a3b8;
  --sa-line: #1e293b;
  --sa-bar: #64748b;
  --sa-link: #fca5a5;
}
html,
html body {
  height: auto !important;
  min-height: 100%;
  overflow: visible !important;
  padding: 0 !important;
}
html body {
  margin: 0;
  background: var(--sa-bg);
  color: var(--sa-text);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.55;
}
#root {
  height: auto;
  overflow: visible;
}
.sa-page {
  min-height: 100vh;
}
.sa-main {
  max-width: 56rem;
  margin: 0 auto;
  padding: 1rem 1rem 4rem;
}
.sa-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: var(--sa-muted);
}
.sa-crumbs li + li::before {
  content: '/';
  margin-right: 0.25rem;
  opacity: 0.6;
}
.sa-crumbs a,
.sa-links a,
.sa-table a {
  color: var(--sa-link);
  text-decoration: none;
}
.sa-crumbs a:hover,
.sa-links a:hover,
.sa-table a:hover {
  text-decoration: underline;
}
.sa-head h1 {
  margin: 0.75rem 0 0.25rem;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.2;
}
.sa-sub {
  margin: 0;
  color: var(--sa-muted);
}
.sa-section {
  margin-top: 2rem;
}
.sa-section h2 {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
}
.sa-section h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.05rem;
}
.sa-section p {
  margin: 0.5rem 0;
}
.sa-note {
  color: var(--sa-muted);
  font-size: 0.9rem;
}
.sa-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem;
  margin: 0;
}
.sa-figures > div {
  background: var(--sa-surface);
  border: 1px solid var(--sa-line);
  border-radius: 0.75rem;
  padding: 0.75rem 0.9rem;
}
.sa-figures dt {
  font-size: 0.8rem;
  color: var(--sa-muted);
}
.sa-figures dd {
  margin: 0.15rem 0 0;
  font-size: 1.5rem;
  font-weight: 700;
}
.sa-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--sa-surface);
  border: 1px solid var(--sa-line);
  border-radius: 0.5rem;
  font-size: 0.95rem;
}
.sa-table th,
.sa-table td {
  padding: 0.45rem 0.7rem;
  border-bottom: 1px solid var(--sa-line);
  text-align: left;
  vertical-align: middle;
}
.sa-table thead th {
  font-size: 0.8rem;
  color: var(--sa-muted);
  font-weight: 600;
}
.sa-table tbody th {
  font-weight: 500;
}
.sa-table tr:last-child > * {
  border-bottom: 0;
}
.sa-table .sa-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sa-share {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 8rem;
}
.sa-share > span:last-child {
  min-width: 2.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.sa-bar {
  flex: 1;
  height: 0.6rem;
  border-radius: 0.3rem;
  background: var(--sa-line);
  overflow: hidden;
}
.sa-bar > span {
  display: block;
  height: 100%;
  background: var(--sa-bar);
}
.sa-links {
  margin: 0;
  padding-left: 1.2rem;
}
.sa-links li {
  margin: 0.3rem 0;
}
.sa-scroll {
  overflow-x: auto;
  max-width: 100%;
}
.sa-main {
  overflow-wrap: anywhere;
}
@media (max-width: 40rem) {
  .sa-share {
    min-width: 0;
  }
  .sa-bar {
    min-width: 2.5rem;
  }
  .sa-table th,
  .sa-table td {
    padding: 0.4rem 0.5rem;
  }
}
@media (max-width: 40rem) {
  .sa-table--links th:nth-child(4),
  .sa-table--links td:nth-child(4) {
    display: none;
  }
  .sa-share {
    min-width: 6rem;
  }
}
