:root {
  color-scheme: light;
  --page: #f6f7f5;
  --surface: #ffffff;
  --surface-muted: #eff2ef;
  --ink: #1d2925;
  --ink-soft: #66736d;
  --line: #dde2dd;
  --field-bg: #f5f7f5;
  --field-line: #a3b3a6;
  --field-line-focus: #3d6b30;
  --field-ring: rgb(61 107 48 / 14%);
  --card-line: #c3cec4;
  --card-hover-line: #3d6b30;
  --card-hover-bg: #eef2ee;
  --panel-shadow: 0 20px 45px rgb(29 41 37 / 12%);
  --primary: #3d6b30;
  --primary-deep: #2f5525;
  --mint: #e8f0e9;
  --info: #2a6796;
  --info-deep: #1f4d73;
  --info-soft: #a1c4e7;
  --info-soft-hover: #8fb9e0;
  --info-tint: #e9f1f9;
  --info-line: #a9c8e4;
  --amber: #8a5a18;
  --amber-soft: #fbf1dc;
  --red: #a63e38;
  --red-soft: #fbe9e6;
  font-family: "Inter", Arial, ui-sans-serif, system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #8fb57e;
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.page-shell {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  font-size: 0;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a,
.footer a {
  color: var(--ink-soft);
  font-size: 13px;
  text-decoration: none;
}

.main-nav a:hover,
.footer a:hover {
  color: var(--primary);
}

.main-nav a.active-nav {
  color: var(--primary-deep);
  font-weight: 700;
}

.hero {
  padding: 66px 0 34px;
  max-width: 780px;
}

.page-intro {
  max-width: 820px;
  padding: 52px 0 26px;
}

.page-intro h1 {
  margin-bottom: 12px;
  font-size: clamp(32px, 4vw, 46px);
}

.page-intro .hero-copy {
  font-size: 14px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.14em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 15px;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.06em;
}

h1 span {
  color: var(--primary);
}

.hero-copy {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.65;
}

.search-panel,
.results-panel,
.freshness-section {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.search-panel {
  padding: 24px;
  border-color: var(--card-line);
  box-shadow: var(--panel-shadow);
}

.search-label {
  display: block;
  margin-bottom: 9px;
  font-size: 13px;
  font-weight: 650;
}

.search-row {
  display: flex;
  gap: 10px;
}

.search-row input {
  min-width: 0;
  flex: 1;
  height: 54px;
  padding: 0 16px;
  border: 1.5px solid var(--field-line);
  border-radius: 12px;
  background: var(--field-bg);
  color: var(--ink);
  font-size: 15px;
}

.search-row input::placeholder {
  color: #84938b;
}

.search-row input:focus,
.filters select:focus,
.filters input:focus,
.as-of-control input:focus,
.as-of-control select:focus,
.article-search:focus,
.compare-picker-label select:focus {
  outline: none;
  border-color: var(--field-line-focus);
  box-shadow: 0 0 0 4px var(--field-ring);
}

.primary-button {
  min-width: 116px;
  height: 54px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  background: var(--info-soft);
  box-shadow: 0 6px 14px rgb(42 103 150 / 18%);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  transition: transform .16s ease, box-shadow .16s ease;
}

.primary-button:hover {
  background: var(--info-soft-hover);
  box-shadow: 0 10px 20px rgb(42 103 150 / 22%);
  transform: translateY(-1px);
}

.primary-button:active {
  transform: translateY(0);
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr)) minmax(160px, 0.9fr);
  gap: 11px;
  margin-top: 17px;
}

.filters label {
  display: grid;
  gap: 6px;
}

.filters label span {
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.law-filters {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.changes-filters {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.filters select,
.filters input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 10px;
  border: 1.5px solid var(--field-line);
  border-radius: 10px;
  background: var(--field-bg);
  color: var(--ink);
  font-size: 13px;
}

.search-hint {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: clamp(40px, 7vw, 88px);
}

.results-panel {
  overflow: hidden;
}

.results-panel {
  padding: 21px 19px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: 20px;
  letter-spacing: -0.04em;
}

.result-count {
  display: block;
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 11px;
  text-align: center;
}

.results-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.result-item {
  min-width: 0;
  position: relative;
}

.result-item.has-source .result-title {
  padding-right: 128px;
}

.result-link {
  width: 100%;
  display: grid;
  gap: 11px;
  padding: 19px 21px;
  border: 1.5px solid var(--card-line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  text-align: left;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.result-link:hover {
  border-color: var(--card-hover-line);
  background: var(--card-hover-bg);
  box-shadow: 0 12px 28px rgb(16 50 37 / 12%);
  transform: translateY(-2px);
}

.result-link:hover .result-title {
  color: var(--primary-deep);
}

.result-title {
  display: block;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.result-meta .badge {
  min-height: 24px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
}

.result-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.result-fact {
  min-width: 120px;
  display: grid;
  gap: 3px;
}

.result-fact-label {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.result-fact-value {
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.result-source-link {
  position: absolute;
  top: 19px;
  right: 21px;
  display: inline-flex;
  color: var(--primary);
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
}

.result-source-link:hover {
  text-decoration: underline;
}

.result-excerpt {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.badge,
.mode-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: #52615a;
  font-size: 10px;
  font-weight: 650;
}

.badge.current {
  background: #d9eacb;
  color: var(--primary-deep);
}

.badge.pending-change,
.badge.stale {
  background: #f6e5bf;
  color: #7a4d10;
}

.badge.unverified,
.badge.source-unavailable,
.badge.repealed {
  background: #f7dcd6;
  color: #93332e;
}

.quiet-button,
.tab-button {
  border: 1.5px solid var(--field-line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  transition: border-color .16s ease, background .16s ease;
}

.quiet-button {
  width: 100%;
  min-height: 40px;
  margin-top: 12px;
}

.quiet-button:hover,
.tab-button:hover {
  background: var(--surface-muted);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.pagination .quiet-button {
  width: auto;
  min-width: 104px;
  margin-top: 0;
}

.quiet-button:disabled {
  opacity: .45;
  cursor: default;
}

.page-label {
  font-size: 12px;
  color: var(--ink-soft);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.source-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 13px;
  color: var(--info);
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
}

.source-link:hover {
  text-decoration: underline;
}

.detail-tabs {
  display: flex;
  gap: 7px;
  padding: 0 26px 16px;
  border-bottom: 1px solid var(--card-line);
}

.tab-button {
  min-height: 35px;
  padding: 0 11px;
  color: var(--ink-soft);
}

.tab-button.active {
  border-color: transparent;
  background: var(--info-soft);
  box-shadow: 0 4px 10px rgb(42 103 150 / 18%);
  color: var(--ink);
}

.detail-note {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--card-line);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  background: var(--field-bg);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
}

.legal-text {
  max-height: 520px;
  overflow: auto;
  margin: 0;
  padding: 22px;
  border: 1px solid var(--card-line);
  border-radius: 12px;
  background: var(--field-bg);
  color: #28352f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.history-controls {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  gap: 8px;
  margin: 14px 0;
}

.history-controls label {
  display: grid;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 10px;
}

.history-controls select {
  min-width: 0;
  height: 36px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  font-size: 11px;
}

.history-timeline {
  position: relative;
  display: grid;
  gap: 7px;
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.history-timeline::before {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 4px;
  width: 2px;
  background: var(--card-line);
  content: "";
}

.history-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.5;
}

.history-timeline li.selected .history-entry {
  padding: 10px 12px;
  border: 1px solid var(--card-hover-line);
  border-radius: 10px;
  background: var(--card-hover-bg);
}

.history-timeline li.selected .history-entry > strong {
  color: var(--primary-deep);
}

.history-entry {
  display: grid;
  gap: 5px;
}

.history-current-label {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: #cde9da;
  color: var(--primary-deep);
  font-size: 10px;
  font-weight: 700;
}

.history-entry > strong {
  color: var(--ink);
  font-size: 11px;
}

.history-entry-details {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.45;
}

.history-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 8px 0 12px;
}

.compare-picker-label {
  display: grid;
  flex: 1;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 650;
}

.compare-picker-label select {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 8px;
  border: 1.5px solid var(--field-line);
  border-radius: 9px;
  background: var(--field-bg);
  color: var(--ink);
  font: inherit;
}

.history-action {
  width: auto;
  min-height: 38px;
  margin: 0;
  padding: 0 12px;
  font-size: 12px;
}

.history-source {
  margin: 0;
  font-size: 10px;
}

.timeline-dot {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  background: var(--surface);
}

.history-timeline li.selected .timeline-dot {
  background: var(--primary);
  box-shadow: 0 0 0 3px var(--mint);
}

.diff-output {
  margin: 0;
  max-height: 62vh;
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--card-line);
  border-radius: 10px;
  background: var(--field-bg);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.diff-output ins {
  background: #d9f2df;
  color: #125c30;
  margin: 0 0.1em;
  padding: 0 0.1em;
  text-decoration: none;
}

.diff-output del {
  background: #f9dfdc;
  color: #8b302a;
  margin: 0 0.1em;
  padding: 0 0.1em;
  text-decoration: line-through;
}

.diff-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 12px;
  white-space: normal;
}

.diff-legend-scope {
  font-weight: 700;
}

.diff-version-label {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--ink);
  font-size: 11px;
  font-weight: 650;
}

.diff-version-label.deleted {
  background: var(--red-soft);
  color: var(--red);
}

.diff-version-label.inserted {
  background: var(--mint);
  color: var(--primary-deep);
}

.badge.selected-version.latest-version {
  background: var(--mint);
  color: var(--primary-deep);
}

.badge.selected-version.previous-version {
  background: var(--red-soft);
  color: var(--red);
}

.diff-container {
  display: grid;
  gap: 16px;
  margin-top: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfb;
}

.diff-container > .diff-legend {
  margin: 0;
}

.law-change {
  display: grid;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.law-change h3 {
  margin: 0;
  font-size: 16px;
}

.law-change > .history-entry-details {
  margin: 0;
}

.relation-map {
  display: grid;
  gap: 9px;
  margin-bottom: 14px;
}

.map-focus {
  width: 100%;
  padding: 13px;
  border: 1px solid #b8d5c3;
  border-radius: 10px;
  background: #f0f8f2;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  text-align: left;
}

.map-branches {
  display: grid;
  gap: 8px;
  padding-left: 16px;
  border-left: 2px solid #d5e5d9;
}

.map-branch {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}

.map-relation {
  color: var(--ink-soft);
  font-size: 10px;
}

.map-node {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--ink);
  font-size: 11px;
  font-weight: 650;
  text-align: left;
}

.map-node:hover {
  border-color: #b8d5c3;
  background: #f7fbf8;
}

.relation-evidence {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.5;
}

.freshness-section {
  margin-top: 18px;
  padding: 22px;
}

.recent-changes-section {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.change-feed {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 17px 0 0;
  padding: 0;
  list-style: none;
}

.change-card {
  min-height: 110px;
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 6px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
}

.change-card:hover {
  border-color: #b8d5c3;
  background: #f7fbf8;
}

.change-date {
  color: var(--primary);
  font-size: 10px;
  font-weight: 750;
}

.change-card strong {
  font-size: 12px;
  line-height: 1.4;
}

.change-description {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.4;
}

.law-groups {
  display: grid;
  gap: 14px;
}

.law-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.law-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 19px;
  border-bottom: 1px solid var(--line);
}

.law-group-heading h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.035em;
}

.law-group-heading span {
  color: var(--ink-soft);
  font-size: 11px;
}

.law-card-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 12px;
}

.law-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
}

.law-card:hover {
  border-color: #b8d5c3;
  background: #f7fbf8;
}

.law-card-title {
  font-size: 12px;
  line-height: 1.45;
}

.law-card-meta,
.law-card-excerpt {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.5;
}

.law-card-excerpt {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.changes-page-feed {
  grid-template-columns: 1fr;
  margin-top: 0;
}

.changes-page-feed .change-card {
  min-height: auto;
  padding: 15px 17px;
}

.page-load-more {
  display: block;
  min-width: 220px;
  margin: 14px auto 0;
  height: 42px;
  font-size: 12px;
}

.change-filter-actions {
  display: flex;
  gap: 9px;
  margin-top: 14px;
}

.change-filter-actions .primary-button {
  width: auto;
  min-width: 140px;
  height: 40px;
  font-size: 12px;
}

.empty-state {
  padding: 20px;
  border: 1px dashed var(--card-line);
  border-radius: 10px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
  list-style: none;
  text-align: center;
}

.law-page {
  padding: 20px 0 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
}

.back-link:hover {
  background: var(--surface);
  text-decoration: underline;
}

.law-toolbar {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
  padding: 24px;
  border: 1.5px solid var(--card-line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--panel-shadow);
}

.law-toolbar-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--card-line);
}

.law-toolbar-document {
  min-width: 0;
}

.law-toolbar-document h1 {
  max-width: 1100px;
  margin: 0 0 10px;
  font-size: clamp(28px, 3.5vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.law-toolbar-document .hero-copy {
  max-width: 900px;
  margin-bottom: 0;
  font-size: 14px;
}

.law-toolbar-document .badge-row {
  margin-top: 14px;
}

.law-toolbar-status {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 9px;
}

.law-toolbar-status .source-link {
  margin-top: 0;
}

.law-toolbar-controls {
  display: grid;
  grid-template-columns: minmax(150px, 170px) minmax(170px, 1fr) auto;
  align-items: end;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--card-line);
  border-radius: 12px;
  background: var(--field-bg);
}

.law-toolbar .as-of-control {
  min-width: 0;
}

.as-of-control {
  position: relative;
  display: grid;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 650;
}

.as-of-control input,
.as-of-control select {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 10px;
  border: 1.5px solid var(--field-line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.as-of-control .native-date-picker {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0;
  overflow: hidden;
  border: 0;
  opacity: 0;
  clip-path: inset(50%);
  pointer-events: none;
  white-space: nowrap;
}

.law-toolbar .primary-button {
  height: 42px;
  min-width: 148px;
  font-size: 13px;
}

.law-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.26fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.law-layout.single-document {
  grid-template-columns: minmax(0, 1fr);
}

.article-sidebar,
.law-document {
  min-width: 0;
  border: 1.5px solid var(--card-line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--panel-shadow);
}

.article-sidebar {
  position: sticky;
  top: 14px;
  padding: 22px;
}

.article-sidebar .section-heading {
  align-items: center;
}

.article-sidebar .result-count {
  flex: 0 0 auto;
  padding: 4px 10px;
  border: 1px solid var(--card-line);
  border-radius: 999px;
  background: var(--field-bg);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.article-sidebar h2,
.law-document-heading h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.035em;
}

.article-search-label {
  display: block;
  margin: 18px 0 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.article-search {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1.5px solid var(--field-line);
  border-radius: 10px;
  background: var(--field-bg);
  font: inherit;
}

.article-list {
  display: grid;
  gap: 7px;
  max-height: 68vh;
  overflow: auto;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.article-list-item button {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.article-list-item button:hover {
  border-color: var(--card-line);
  background: var(--card-hover-bg);
  color: var(--primary-deep);
}

.article-list-item button.selected {
  border-color: var(--card-hover-line);
  background: var(--card-hover-bg);
  box-shadow: inset 3px 0 0 var(--primary);
  color: var(--primary-deep);
}

.article-list-item button.selected .article-number {
  color: var(--primary-deep);
}

.article-number {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

.law-document {
  min-height: 640px;
  overflow: hidden;
}

.law-document-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px 16px;
}

.law-document-heading > div {
  min-width: 0;
  flex: 1;
}

.law-document-heading .result-count {
  flex: 0 0 auto;
  padding: 4px 10px;
  border: 1px solid var(--card-line);
  border-radius: 999px;
  background: var(--field-bg);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.fullscreen-button {
  width: auto;
  min-width: 150px;
  height: 42px;
  padding: 0 16px;
  font-size: 13px;
}

.law-tabs {
  gap: 10px;
  padding: 0 26px 16px;
}

.law-panel {
  padding: 22px 26px 28px;
}

.law-panel .legal-text {
  min-height: 360px;
  max-height: 66vh;
  font-size: 16px;
  line-height: 1.9;
}

.law-tabs .tab-button {
  min-height: 42px;
  padding: 0 16px;
  font-size: 14px;
}

.text-comparison-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--card-line);
  border-radius: 12px;
  background: var(--field-bg);
}

.text-comparison-controls .compare-picker-label {
  min-width: 0;
  font-size: 12px;
}

.text-comparison-controls .compare-picker-label select {
  height: 42px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
}

.text-comparison-controls .primary-button {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  height: 42px;
  margin: 0;
  font-size: 12px;
}

.side-by-side-diff {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.side-by-side-pane {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--card-line);
  border-radius: 10px;
  background: var(--surface);
}

.side-by-side-version {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--card-line);
  background: var(--field-bg);
}

.side-by-side-version strong {
  font-size: 13px;
}

.side-by-side-version span {
  color: var(--ink-soft);
  font-size: 11px;
}

.side-by-side-version .side-by-side-source {
  margin-top: 0;
  font-size: 11px;
}

.side-by-side-text {
  max-height: 62vh;
  overflow: auto;
  margin: 0;
  padding: 16px;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  color: #28352f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.law-page:fullscreen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100%;
  max-width: none;
  height: 100vh;
  overflow: auto;
  margin: 0;
  padding: 18px 24px 24px;
  background: var(--page);
}

.law-page:fullscreen .law-layout {
  min-height: calc(100vh - 270px);
}

.law-page:fullscreen .article-sidebar {
  max-height: calc(100vh - 290px);
  overflow: auto;
}

.law-page:fullscreen .law-document {
  min-height: calc(100vh - 270px);
}

.law-page:fullscreen .law-panel .legal-text {
  min-height: calc(100vh - 430px);
  max-height: calc(100vh - 430px);
}

.law-empty {
  padding: 25px 20px;
  border: 1px dashed var(--card-line);
  border-radius: 10px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .law-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
  }

  .article-list {
    max-height: 40vh;
  }
}

@media (max-width: 640px) {
  .law-toolbar {
    padding: 18px;
  }

  .law-toolbar-header {
    grid-template-columns: 1fr;
  }

  .law-toolbar-status {
    justify-items: start;
  }

  .law-document-heading {
    flex-direction: column;
    align-items: start;
    padding: 20px 18px 14px;
  }

  .law-tabs,
  .detail-tabs {
    padding: 0 18px 14px;
  }

  .law-panel {
    padding: 18px;
  }

  .article-sidebar {
    padding: 18px;
  }
}

.freshness-section .section-heading {
  align-items: center;
}

.mode-badge {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.freshness-summary {
  margin: 14px 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.freshness-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.freshness-stat {
  min-width: 118px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.freshness-stat strong {
  display: block;
  margin-bottom: 3px;
  font-size: 17px;
}

.freshness-stat span {
  color: var(--ink-soft);
  font-size: 10px;
}

.disclaimer {
  margin: 15px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.5;
}

.footer {
  display: flex;
  justify-content: space-between;
  padding: 22px 0 34px;
  color: var(--ink-soft);
  font-size: 11px;
}

@media (max-width: 980px) {
  .filters {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }

  .law-toolbar-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .law-toolbar-status {
    display: flex;
    flex-wrap: wrap;
    justify-items: start;
    align-items: center;
  }

  .law-toolbar-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .text-comparison-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .text-comparison-controls .primary-button {
    grid-column: 1 / -1;
  }

  .workspace-grid {
    grid-template-columns: minmax(0, 1fr);
  }

}

@media (max-width: 740px) {
  .page-shell {
    width: min(100% - 28px, 620px);
  }

  .topbar {
    min-height: 64px;
  }

  .main-nav {
    gap: 12px;
  }

  .main-nav a {
    font-size: 11px;
  }

  .main-nav a:last-child {
    display: none;
  }

  .main-nav a[href="#freshness"] {
    display: none;
  }

  .hero {
    padding: 44px 0 25px;
  }

  .hero-copy {
    font-size: 14px;
  }

  .search-panel {
    padding: 16px;
  }

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .law-layout {
    grid-template-columns: 1fr;
  }

  .law-document-heading {
    flex-wrap: wrap;
    padding: 22px 22px 16px;
  }

  .law-tabs {
    padding: 0 22px 16px;
  }

  .law-panel {
    padding: 22px;
  }

  .side-by-side-diff {
    grid-template-columns: 1fr;
  }

  .law-filters,
  .changes-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .law-card-list {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
  }

  .article-list {
    max-height: 260px;
  }

  .results-panel {
    min-height: auto;
  }

}

@media (max-width: 420px) {
  .page-shell {
    width: calc(100% - 20px);
  }

  .brand {
    gap: 7px;
    font-size: 17px;
  }

  .main-nav {
    gap: 9px;
  }

  .main-nav a {
    font-size: 10px;
  }

  .search-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary-button {
    width: 100%;
  }

  .filters {
    grid-template-columns: 1fr 1fr;
  }

  .history-controls {
    grid-template-columns: 1fr 1fr;
  }

  .history-controls button {
    grid-column: 1 / -1;
  }

  .law-toolbar .primary-button {
    width: 100%;
  }

  .law-document-heading {
    align-items: start;
  }

  .change-feed {
    grid-template-columns: 1fr;
  }

  .change-filter-actions {
    display: grid;
  }

  .change-filter-actions .primary-button {
    width: 100%;
  }

  .detail-tabs {
    padding-left: 16px;
    padding-right: 16px;
  }

  .footer {
    gap: 12px;
    font-size: 10px;
  }
}


/* Landing values ported verbatim from skeleton (what specula.vision
   inherits): skeleton_public.css (#navbar, .btn-header, .public-header-text,
   body font, overflow-x), tokens.css (@font-face + --skeleton-font-family)
   and skeleton_landing.css (section-1, marquee, steps, features, HELP/STUDY
   headlines, .btn-btn-2, card-faq text-section3, .footer, scroll-sections).
   PaxLex product content (hero title/search, sections, footer text) is kept;
   only the styling values changed. Where PaxLex markup differs structurally
   (text brand instead of logo image, no languages menu, taller hero),
   the deviation is noted inline. */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter/InterVariable.woff2") format("woff2");
}
:root { --skeleton-font-family: "Inter", Arial, sans-serif; }
html, body { overflow-x: hidden; scroll-behavior: smooth; }
body { font-family: var(--skeleton-font-family); }
.header, .topbar { position: sticky; top: 0; z-index: 100; background: #000; border-bottom: 1px solid #000; }
.brand, .topbar .brand { color: #fff; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; padding: 10px 16px; }
.topbar .main-nav a { color: #fff; }
.topbar .main-nav a:hover, .topbar .main-nav a.active-nav { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
/* Deviation from skeleton: skeleton fixes section-1 to calc(100dvh - 91px);
   PaxLex hero content (title + search form) is taller than skeleton's media
   hero, so only min-height is kept to avoid overflow on small screens. */
.landing-page > .section-1 { min-height: calc(100vh - var(--landing-header-height, 91px)); min-height: calc(100dvh - var(--landing-header-height, 91px)); box-sizing: border-box; }
.landing-page > .section-1 .text-section1 { box-sizing: border-box; height: 100%; min-height: 100%; padding-bottom: calc(var(--landing-marquee-height, 57px) + var(--landing-marquee-bottom, 4px)); }
.landing-page .search-panel { width: 100%; max-width: 880px; margin: 0 auto; text-align: left; }
@media (prefers-reduced-motion: reduce) { .marquee .track { animation: none; } }
@media only screen and (min-width: 992px) { .landing-page > .section-1, .landing-page > .section-3, .landing-page > .section-2, .landing-page > .section-2-mobile, .landing-page > .section-4, .landing-page > .section-5, .landing-page > .section-6 { scroll-snap-align: start; scroll-snap-stop: always; } .landing-page > .workspace-grid { scroll-snap-align: start; scroll-snap-stop: always; } }
@media only screen and (min-width: 992px) { .landing-page > .section-2 { display: flex !important; align-items: center; justify-content: center; height: auto; min-height: calc(100vh - var(--landing-header-height, 91px)); min-height: calc(100dvh - var(--landing-header-height, 91px)); box-sizing: border-box; padding: 0; } .landing-page > .section-2 .features-section { width: 100%; } .landing-page > .section-2 .features-grid { width: 100%; max-width: 1100px; height: auto; } }
@media only screen and (max-width: 991.98px) { .landing-page > .section-2-mobile { min-height: 100vh; box-sizing: border-box; padding-top: var(--landing-header-height, 91px); display: flex !important; flex-direction: column; justify-content: flex-start; align-items: stretch; } .landing-page > .section-2-mobile .features-section { width: 100%; } .landing-page > .section-2-mobile .features-section > .container { width: 100%; max-width: none; } }


/* Neo (index) story style: values from skeleton_landing_story.css, the
   default landing_style=story that specula.vision runs. PaxLex markup
   differs (text brand, search form instead of demo/pricing/journal, footer
   columns), so story values are adapted onto the existing section classes
   with body.landing-story-document-scoped selectors; the landing-story-*
   classes themselves are verbatim from skeleton. Dark-mode vars and pricing
   rules are unused (no header toggle, no pricing content) and omitted. */
:root {
  --landing-story-ink: #202737;
  --landing-story-muted: #374151;
  --landing-story-paper: #ffffff;
  --landing-story-soft: #eff5fa;
  --landing-story-line: #dfe8ee;
  --landing-story-accent: #557b99;
  --landing-story-card-surface: #ffffff;
  --landing-story-card-border: #dfe5e0;
  --landing-story-card-shadow: 0 8px 20px rgb(32 39 55 / 8%);
  --landing-story-badge-ink: #315774;
  --landing-story-inverse-surface: #000000;
  --landing-story-inverse-text: #ffffff;
  --landing-story-inverse-muted: #bdbdbd;
  --landing-story-inverse-line: #444444;
}
body.landing-story-document { background: var(--landing-story-paper); color: var(--landing-story-ink); line-height: 1.5; }
body.landing-story-document a { color: inherit; }
.landing-story-container { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.landing-story-header { position: relative; z-index: 20; border-bottom: 1px solid var(--landing-story-line); background: var(--landing-story-paper); }
.landing-story-header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand join" "navigation navigation"; min-height: 74px; align-items: center; gap: 10px clamp(10px, 1.8vw, 20px); padding-block: 10px; }
.landing-story-header-inner.landing-story-container { width: 100%; max-width: none; margin-inline: 0; padding-inline: clamp(16px, 3vw, 40px); box-sizing: border-box; }
.landing-story-header-inner[data-layout="single"] { grid-template-columns: max-content minmax(0, 1fr) max-content; grid-template-areas: "brand navigation join"; }
.landing-story-header-inner[data-layout="single"] .landing-story-nav { justify-content: flex-start; flex-wrap: nowrap; }
.landing-story-brand { display: inline-flex; min-width: 0; grid-area: brand; align-items: center; gap: 9px; flex-wrap: wrap; row-gap: 4px; }
.landing-story-brand-link { display: inline-flex; min-width: 0; flex: 0 1 auto; align-items: center; gap: 9px; text-decoration: none; }
.landing-story-brand-link span { overflow-wrap: anywhere; font-size: 19px; font-weight: 700; letter-spacing: -.025em; }
.landing-story-theme-switcher { display: inline-flex; align-items: center; gap: 1px; padding: 2px; border: 1px solid var(--landing-story-line); border-radius: 99px; color: var(--landing-story-muted); font: 700 9px/1 Arial, sans-serif; letter-spacing: .07em; text-transform: uppercase; }
.landing-story-theme-choice { padding: 2px 6px; border-radius: 99px; color: inherit; text-decoration: none; }
.landing-story-theme-choice[aria-current="page"] { background: var(--landing-story-ink); color: var(--landing-story-paper); }
.landing-story-theme-choice:not([aria-current="page"]):hover { background: var(--landing-story-soft); color: var(--landing-story-ink); }
.landing-story-nav { display: flex; min-width: 0; grid-area: navigation; align-items: center; justify-content: center; gap: 8px clamp(12px, 2vw, 24px); flex-wrap: wrap; }
.landing-story-nav a { max-width: 100%; font-size: 15px; overflow-wrap: anywhere; text-decoration: none; text-underline-offset: 4px; }
.landing-story-nav a:hover, .landing-story-nav a:focus-visible { text-decoration: underline; }
.landing-story-button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 0 20px; border: 1px solid var(--landing-story-ink); border-radius: 999px; background: var(--landing-story-ink); color: var(--landing-story-paper) !important; font-size: 15px; font-weight: 700; line-height: 1.25; text-align: center; text-decoration: none; transition: background-color .15s ease, color .15s ease; }
.landing-story-header-actions { display: flex; grid-area: join; align-items: center; justify-self: end; gap: 8px; }
.landing-story-button:hover { background: var(--landing-story-paper); color: var(--landing-story-ink) !important; }
.landing-story-header a:focus-visible, .landing-story-header button:focus-visible, .landing-story-page a:focus-visible, .landing-story-page summary:focus-visible { outline: 2px solid var(--landing-story-accent); outline-offset: 3px; }
@font-face { font-family: "Pixelify Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/pixelify-sans/latin-ext.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Pixelify Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/pixelify-sans/latin.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+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
.landing-story-hora-band { --landing-story-hora-tile-width: 240px; height: 82px; margin: 0 auto; overflow: hidden; border-bottom: 1px solid var(--landing-story-line); background-image: url("images/shared/hora-marquee.svg"); background-position: 0 0; background-repeat: repeat-x; background-size: var(--landing-story-hora-tile-width) 80px; animation: landing-story-hora-marquee 18s linear infinite; }
@keyframes landing-story-hora-marquee { to { background-position: calc(0px - var(--landing-story-hora-tile-width)) 0; } }
.landing-story-page .landing-story-hora-caption { display: flex; box-sizing: border-box; min-height: 36px; align-items: center; justify-content: center; max-width: 1160px; margin: 0 auto; padding: 6px 24px; color: var(--landing-story-muted); font-family: "Pixelify Sans", "Courier New", monospace; font-size: clamp(0.625rem, 1.05vw, 0.8125rem); font-weight: 400; line-height: 1.2; letter-spacing: 0.04em; text-align: center; text-wrap: balance; }
.landing-story-page { min-width: 0; flex: 1 0 auto; }
.landing-story-page h1, .landing-story-page h2, .landing-story-page h3, .landing-story-page p, .landing-story-page figure { margin: 0; }
.landing-story-page h1, .landing-story-page h2, .landing-story-page h3 { color: var(--landing-story-ink); overflow-wrap: anywhere; }
.landing-story-page h1 { max-width: 16ch; font-size: clamp(2.8rem, 6vw, 4.625rem); font-weight: 600; line-height: .98; letter-spacing: -.035em; }
.landing-story-page h2 { max-width: 19ch; margin-bottom: clamp(1.5rem, 3vw, 1.875rem); font-size: clamp(2.25rem, 4.6vw, 3.375rem); font-weight: 500; line-height: 1.02; letter-spacing: -.025em; }
.landing-story-page h3 { font-size: 1.3125rem; font-weight: 600; line-height: 1.15; }
.landing-story-page p { font-size: 1.0625rem; line-height: 1.6; }
body.landing-story-document .eyebrow { color: var(--landing-story-accent); }
/* Hero: skeleton centers title + lead + media (landing-story-demo); PaxLex
   centers title + lead + search form instead. The marquee is paleo-only. */
body.landing-story-document .landing-story-hero-wrap { background: var(--landing-story-paper); padding-block: clamp(54px, 7vw, 88px); }
body.landing-story-document .landing-story-hero-wrap .container-fluid { width: min(1160px, calc(100% - 48px)); margin-inline: auto; padding-inline: 0; }
body.landing-story-document .text-section1 { display: flex; flex-direction: column; align-items: center; gap: clamp(30px, 4vw, 46px); max-width: 860px; margin: 0 auto; text-align: center; }
body.landing-story-document .hero-lead { max-width: 52ch; margin: 20px auto 0; color: var(--landing-story-muted); font-size: clamp(1.0625rem, 2vw, 1.1875rem); line-height: 1.6; text-align: center; }
body.landing-story-document .search-panel { width: min(1040px, 100%); margin-inline: auto; border: 1px solid var(--landing-story-card-border); border-radius: 13px; background: var(--landing-story-card-surface); box-shadow: var(--landing-story-card-shadow); }
body.landing-story-document .headline-marquee { display: none; }
/* Sections sit on the story gradient; section-2 (features) uses the default
   blue accent, section-3 (how it works) and section-5 (faq) the green one. */
.landing-story-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.landing-story-section-heading h2 { margin-bottom: 0; }
.landing-story-page .landing-story-section-intro { max-width: 43ch; color: var(--landing-story-muted); font-size: 17px; line-height: 1.6; }
.landing-story-sections { background: linear-gradient(180deg, #f3f7f8 0%, #f1f5ee 50%, #f5f8f1 100%); }
body.landing-story-document .container { width: min(1160px, calc(100% - 48px)); max-width: 1160px; margin-inline: auto; padding-inline: 0; }
body.landing-story-document .section-2, body.landing-story-document .section-3, body.landing-story-document .section-5, body.landing-story-document .section-audience, body.landing-story-document .section-journal, body.landing-story-document .section-freshness { --landing-story-section-accent: #527795; --landing-story-section-highlight: #9fc4e4; --landing-story-section-line: #e0ebf3; --landing-story-section-soft: #eaf3fa; padding-block: clamp(56px, 7vw, 82px); border-top: 1px solid var(--landing-story-section-line); background: transparent; }
body.landing-story-document .section-3 { --landing-story-section-accent: #5d784d; --landing-story-section-highlight: #b2d68c; --landing-story-section-line: #e4ecd9; --landing-story-section-soft: #eff6e8; }
body.landing-story-document .section-5 { --landing-story-section-accent: #5d784d; --landing-story-section-highlight: #b2d68c; --landing-story-section-line: #e4ecd9; --landing-story-section-soft: #eff6e8; }
body.landing-story-document .section-freshness { --landing-story-section-accent: #5d784d; --landing-story-section-highlight: #b2d68c; --landing-story-section-line: #e4ecd9; --landing-story-section-soft: #eff6e8; }
body.landing-story-document .landing-story-infrastructure { --landing-story-section-accent: #5d784d; --landing-story-section-highlight: #b2d68c; --landing-story-section-line: #e4ecd9; --landing-story-section-soft: #eff6e8; padding-block: clamp(56px, 7vw, 82px); border-top: 1px solid var(--landing-story-section-line); background: transparent; }
/* Infrastructure grid + cards: verbatim from skeleton. */
.landing-story-feature-grid { display: grid; gap: 15px; margin: 0; padding: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.landing-story-feature { min-width: 0; padding: 21px; border: 1px solid var(--landing-story-card-border); border-radius: 16px; background: var(--landing-story-card-surface); box-shadow: var(--landing-story-card-shadow); }
.landing-story-feature h3 { margin-top: 0; }
.landing-story-feature p { margin-top: 8px; color: var(--landing-story-muted); }
@media (max-width: 1024px) { .landing-story-infrastructure .landing-story-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; } }
@media (max-width: 575.98px) { .landing-story-infrastructure .landing-story-feature-grid { grid-template-columns: 1fr; } }
body.landing-story-document .section-2 .eyebrow { display: none; }
/* Audience word chips are paleo-only; neo uses the story h2 + intro text. */
/* Steps: canonical skeleton landing-story-steps (01/02/03 circles + connector). */
body.landing-story-document .landing-story-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; list-style: none; margin: 0; padding: 0; }
body.landing-story-document .landing-story-step { position: relative; min-width: 0; }
body.landing-story-document .landing-story-step:not(:last-child)::after { position: absolute; top: 15px; inset-inline-start: 32px; inset-inline-end: -32px; height: 2px; background: var(--landing-story-section-line); content: ""; }
body.landing-story-document .landing-story-step-number { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--landing-story-section-highlight); border-radius: 50%; background: var(--landing-story-section-soft); color: var(--landing-story-section-accent); font-size: 12px; font-weight: 700; line-height: 1; }
body.landing-story-document .landing-story-step h3 { margin-top: 13px; color: var(--landing-story-ink); }
body.landing-story-document .landing-story-step p { margin-top: 8px; color: var(--landing-story-muted); }
/* Features: skeleton's 2-column product-feature rows (border-top, no cards). */
body.landing-story-document .landing-story-product-feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 48px; margin: 0; }
body.landing-story-document .landing-story-product-feature { min-width: 0; padding-top: 16px; border-top: 1px solid var(--landing-story-section-line); }
body.landing-story-document .landing-story-product-feature h3 { margin-top: 0; }
body.landing-story-document .landing-story-product-feature p { margin-top: 8px; color: var(--landing-story-muted); font-size: 1.0625rem; line-height: 1.6; }
/* Freshness stats take the infrastructure card slot (3 columns). */
body.landing-story-document .freshness-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
body.landing-story-document .freshness-stat { min-width: 0; padding: 21px; border: 1px solid var(--landing-story-card-border); border-radius: 16px; background: var(--landing-story-card-surface); box-shadow: var(--landing-story-card-shadow); }
body.landing-story-document .freshness-stat strong { display: block; font-size: 1.3125rem; font-weight: 600; line-height: 1.15; color: var(--landing-story-ink); }
body.landing-story-document .freshness-stat span { display: block; margin-top: 8px; color: var(--landing-story-muted); font-size: 1.0625rem; line-height: 1.6; }
/* FAQ: verbatim from skeleton. */
.landing-story-faq-container { max-width: 900px; }
.landing-story-faq-list details { border-top: 1px solid var(--landing-story-section-line); }
.landing-story-faq-list details:last-child { border-bottom: 1px solid var(--landing-story-section-line); }
.landing-story-faq-list summary { display: flex; min-height: 56px; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 2px; font-size: clamp(1rem, 1.6vw, 1.1875rem); font-weight: 600; cursor: pointer; list-style: none; overflow-wrap: anywhere; }
.landing-story-faq-list summary::-webkit-details-marker { display: none; }
.landing-story-faq-list summary::after { flex: 0 0 auto; color: var(--landing-story-section-accent); content: "+"; font-size: 24px; }
.landing-story-faq-list details[open] summary::after { content: "−"; }
.landing-story-faq-answer { padding: 0 2px 20px; color: var(--landing-story-muted); }
.landing-story-faq-answer p, .landing-story-faq-answer li { font-size: 1.0625rem; line-height: 1.6; }
.landing-story-faq-answer a { color: var(--landing-story-accent); text-decoration: underline; text-underline-offset: 2px; }
/* Closing (verbatim from skeleton): PaxLex keeps its centered closing block
   and button text; only the surface, heading and button values change. */
.landing-story-closing { border-top: 1px solid var(--landing-story-inverse-line); background: var(--landing-story-inverse-surface); color: var(--landing-story-inverse-text); }
.landing-story-closing-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 39px; }
.landing-story-closing h2 { margin-bottom: 0; color: inherit; }
.landing-story-closing p { max-width: 55ch; margin-top: 8px; color: var(--landing-story-inverse-muted); }
.landing-story-closing .landing-story-button { flex: 0 0 auto; border-color: var(--landing-story-paper); background: var(--landing-story-paper); color: var(--landing-story-ink) !important; }
.landing-story-closing .landing-story-button:hover { background: var(--landing-story-soft); }
.landing-story-footer { --landing-story-footer-line: var(--landing-story-inverse-line); --landing-story-footer-muted: var(--landing-story-inverse-muted); padding-block: 28px 36px; border-top: 1px solid var(--landing-story-footer-line); background: var(--landing-story-inverse-surface); color: var(--landing-story-inverse-text); }
.landing-story-footer a { color: inherit; text-decoration: none; text-underline-offset: 3px; }
.landing-story-footer a:hover, .landing-story-footer a:focus-visible { text-decoration: underline; }
.landing-story-footer a:focus-visible { outline: 2px solid var(--landing-story-inverse-text); outline-offset: 3px; }
.landing-story-footer-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; flex-wrap: wrap; padding-block: 20px 8px; }
.landing-story-footer-brand-contact { display: flex; align-items: center; gap: 12px; }
.landing-story-footer-brand { display: inline-flex; flex: 0 0 auto; }
.landing-story-footer-brand img { display: block; width: auto; max-width: 100px; height: 42px; object-fit: contain; }
.landing-story-footer-tagline { margin: 0 !important; color: var(--landing-story-footer-muted); font-size: 17px !important; line-height: 1.6; }
.landing-story-footer-email, .landing-story-footer-links a { font-size: 14px; }
.landing-story-footer-links { display: flex; gap: 10px 18px; flex-wrap: wrap; }
.landing-story-footer-meta { padding-top: 14px; text-align: center; }
.landing-story-footer-company { display: flex; justify-content: center; flex-wrap: wrap; margin: 0; color: var(--landing-story-footer-muted); font-size: 12px !important; line-height: 1.45 !important; text-align: center; }
.landing-story-footer-company span + span::before { content: " | "; white-space: pre; }
.landing-story-footer-trust { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px 18px; margin-top: 8px; padding-block: 14px; border-top: 1px solid var(--landing-story-footer-line); }
.landing-story-footer-trust .footer-provider-logo { display: block; width: auto; max-width: 100%; }
.landing-story-footer-trust .footer-provider-logo-small { height: 30px; }
.landing-story-footer-trust .footer-provider-logo-gdpr { width: 140px; height: 80px; margin-inline: -16px; object-fit: cover; object-position: center; }
.landing-story-footer-regulatory-link { display: block; flex: 0 1 206px; max-width: 100%; }
.landing-story-footer-trust .footer-provider-logo-regulatory { width: 100%; height: auto; margin: 0; }
body.landing-story-document .landing-story-footer .footer-source-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
@media (max-width: 950px) {
  .landing-story-header-inner { gap: 13px; }
  .landing-story-nav { gap: 12px; }
  .landing-story-nav a { font-size: 14px; }
}
@media (max-width: 1024px) {
  .landing-story-header-inner { gap: 10px; }
  .landing-story-nav { gap: 12px 20px; }
}
@media (max-width: 760px) {
  body.landing-story-document .text-section1 { gap: 32px; }
  body.landing-story-document .landing-story-hero-wrap { padding-block: 54px; }
  body.landing-story-document .landing-story-steps { grid-template-columns: 1fr; gap: 24px; }
  body.landing-story-document .freshness-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .landing-story-footer-main { align-items: center; flex-direction: column; padding-block: 8px; text-align: center; }
  .landing-story-footer-brand-contact { max-width: 100%; }
  .landing-story-footer-brand-contact > div { min-width: 0; overflow-wrap: anywhere; }
  .landing-story-footer-links { justify-content: center; }
  body.landing-story-document .landing-story-step { padding-inline-start: 46px; }
  body.landing-story-document .landing-story-step h3 { margin-top: 0; }
  body.landing-story-document .landing-story-step-number { position: absolute; top: 0; inset-inline-start: 0; }
  body.landing-story-document .landing-story-step:not(:last-child)::after { top: 32px; inset-inline-start: 15px; inset-inline-end: auto; bottom: -24px; width: 2px; height: auto; }
  .landing-story-closing-inner { align-items: center; flex-direction: column; padding-block: 32px; text-align: center; }
  .landing-story-closing h2, .landing-story-closing p { margin-inline: auto; }
}
@media (max-width: 575.98px) {
  .landing-story-container { width: calc(100% - 32px); }
  body.landing-story-document .container { width: calc(100% - 32px); }
  .landing-story-brand-link span { font-size: 17px; }
  .landing-story-page h1 { font-size: clamp(2.8125rem, 12vw, 3.625rem); }
  body.landing-story-document .hero-lead { font-size: 1.0625rem; }
  .landing-story-button { padding-inline: 16px; font-size: 14px; }
  body.landing-story-document .section-2, body.landing-story-document .section-3, body.landing-story-document .section-5, body.landing-story-document .section-audience, body.landing-story-document .section-journal, body.landing-story-document .section-freshness { padding-block: 52px; }
  body.landing-story-document .landing-story-product-feature-grid { grid-template-columns: 1fr; }
  body.landing-story-document .freshness-stats { grid-template-columns: 1fr; }
}
/* Skeleton switches data-layout="single" by measuring with header JS; PaxLex
   has no such script, so the stacked two-row layout returns below 1024px and
   the single row is only used where all five nav items fit. */
@media (max-width: 1023.98px) {
  .landing-story-header-inner[data-layout="single"] { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand join" "navigation navigation"; }
  .landing-story-header-inner[data-layout="single"] .landing-story-nav { justify-content: center; flex-wrap: wrap; }
}
/* Dark mode: verbatim from skeleton. */
html.landing-story-dark-mode {
    color-scheme: dark;
    --landing-story-ink: #f0f3f6;
    --landing-story-muted: #c1cbd4;
    --landing-story-paper: #141b23;
    --landing-story-soft: #202a34;
    --landing-story-line: #394754;
    --landing-story-accent: #a8c9e6;
    --landing-story-card-surface: #1a242e;
    --landing-story-card-border: #3b4a57;
    --landing-story-card-shadow: 0 8px 20px rgb(0 0 0 / 28%);
    --landing-story-badge-ink: #d5e9f6;
    --landing-story-inverse-surface: #090e13;
    --landing-story-inverse-text: #f0f3f6;
    --landing-story-inverse-muted: #c1cbd4;
    --landing-story-inverse-line: #394754;
}

html.landing-story-dark-mode .landing-story-sections {
    background: linear-gradient(
        180deg,
        #151e26 0%,
        #171f1d 50%,
        #181f1b 100%
    );
}

html.landing-story-dark-mode .landing-story-section {
    --landing-story-section-accent: #a8c9e6;
    --landing-story-section-highlight: #54758e;
    --landing-story-section-line: #33424e;
    --landing-story-section-soft: #1d2b37;
}

html.landing-story-dark-mode .landing-story-how,
html.landing-story-dark-mode .landing-story-infrastructure,
html.landing-story-dark-mode .landing-story-faq {
    --landing-story-section-accent: #b8d995;
    --landing-story-section-highlight: #667e51;
    --landing-story-section-line: #394832;
    --landing-story-section-soft: #232e21;
}

html.landing-story-dark-mode body.landing-story-document .section-2,
html.landing-story-dark-mode body.landing-story-document .section-3,
html.landing-story-dark-mode body.landing-story-document .section-5,
html.landing-story-dark-mode body.landing-story-document .section-audience,
html.landing-story-dark-mode body.landing-story-document .section-journal,
html.landing-story-dark-mode body.landing-story-document .section-freshness {
    --landing-story-section-accent: #a8c9e6;
    --landing-story-section-highlight: #54758e;
    --landing-story-section-line: #33424e;
    --landing-story-section-soft: #1d2b37;
}

html.landing-story-dark-mode body.landing-story-document .section-3,
html.landing-story-dark-mode body.landing-story-document .section-5,
html.landing-story-dark-mode body.landing-story-document .section-freshness {
    --landing-story-section-accent: #b8d995;
    --landing-story-section-highlight: #667e51;
    --landing-story-section-line: #394832;
    --landing-story-section-soft: #232e21;
}

/* Legacy PaxLex vars bridge (neo only). */
html.landing-story-dark-mode body.landing-story-document {
    --page: #141b23;
    --surface: #1a242e;
    --surface-muted: #202a34;
    --ink: #f0f3f6;
    --ink-soft: #c1cbd4;
    --line: #3b4a57;
    --field-bg: #232f3b;
    --field-line: #5a7186;
    --field-line-focus: #a8c9e6;
    --field-ring: rgb(168 201 230 / 18%);
    --card-line: #4b6072;
    --card-hover-line: #a8c9e6;
    --card-hover-bg: #202a34;
    --panel-shadow: 0 20px 45px rgb(0 0 0 / 40%);
}

html.landing-story-dark-mode body.landing-story-document .search-row input::placeholder {
    color: var(--landing-story-muted);
}

html.landing-story-dark-mode body.landing-story-document .result-link:hover {
    box-shadow: 0 12px 28px rgb(0 0 0 / 35%);
}

/* Theme toggle: verbatim from skeleton. */
.landing-story-theme-toggle {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--landing-story-ink);
    border-radius: 99px;
    background: var(--landing-story-ink);
    color: var(--landing-story-paper);
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.landing-story-theme-icon {
    display: block;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
}

.landing-story-theme-icon[data-light-icon] {
    display: none;
}

html.landing-story-dark-mode .landing-story-theme-icon[data-dark-icon] {
    display: none;
}

html.landing-story-dark-mode .landing-story-theme-icon[data-light-icon] {
    display: block;
}

.landing-story-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.landing-story-theme-toggle[hidden] {
    display: none;
}

.landing-story-theme-toggle:hover {
    background: var(--landing-story-paper);
    color: var(--landing-story-ink);
}

/* Despre: interactive import diagram */
.diagram-section {
  max-width: 1160px;
  margin: 0 auto;
  padding: 8px 24px 0;
}

.diagram-flow {
  margin-top: 32px;
}

.diagram-nodes {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.diagram-nodes > li {
  flex: 1 1 0;
  min-width: 0;
}

.diagram-nodes > li[aria-hidden="true"] {
  flex: 0 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.diagram-node {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.diagram-node:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.diagram-node[aria-selected="true"] {
  border-color: var(--info-soft);
  background: var(--info-soft);
  color: #1a2b3c;
}

.diagram-node.is-done {
  border-color: var(--primary);
}

.diagram-node-no {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
}

.diagram-node[aria-selected="true"] .diagram-node-no {
  background: #1a2b3c;
  border-color: #1a2b3c;
  color: #a1c4e7;
}

.diagram-node.is-done .diagram-node-no {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.diagram-node-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

.diagram-node-stat {
  font-family: "SFMono-Regular", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
}

.diagram-node[aria-selected="true"] .diagram-node-stat {
  color: #1a2b3c;
}

.diagram-arrow {
  position: relative;
  width: 100%;
  height: 2px;
  background: var(--line);
}

.diagram-arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--line);
  border-right: 2px solid var(--line);
  transform: translateY(-50%) rotate(45deg);
}

.diagram-detail {
  margin-top: 20px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  min-height: 220px;
}

.diagram-detail-body h2 {
  margin: 0 0 10px;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.diagram-detail-body p {
  max-width: 760px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.6;
}

.diagram-caption {
  max-width: 760px;
  margin: 18px auto 0;
  padding: 0 24px 40px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 860px) {
  .diagram-nodes {
    flex-direction: column;
    align-items: stretch;
  }

  .diagram-nodes > li[aria-hidden="true"] {
    flex: 0 0 28px;
  }

  .diagram-arrow {
    width: 2px;
    height: 100%;
    margin: 0 auto;
  }

  .diagram-arrow::after {
    right: auto;
    left: 50%;
    top: auto;
    bottom: -1px;
    transform: translateX(-50%) rotate(135deg);
  }

  .diagram-node {
    flex-direction: row;
    align-items: center;
    text-align: left;
  }

  .diagram-node-stat {
    margin-left: auto;
  }
}

.pipeline-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 20px 0 0;
}

.pipeline-facts div {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}

.pipeline-facts dt {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pipeline-facts dd {
  margin: 4px 0 0;
  font-size: 13.5px;
  font-weight: 650;
}


