/* ================================================================
   Dislocation Monitor — local build
   Parchment / charcoal / brass visual system.
   ================================================================ */

:root {
  --parchment: #f7f5f0;
  --charcoal: #1a1918;
  --slate: #6b6560;
  --brass: #9c8b6e;
  --brass-ink: #6f6250;
  --linen: #efece5;
  --stone: #d8d3cb;
  --graphite: #3d3935;
  --paper: #fffefa;
  --accent: #c4510a;
  --accent-dark: #a8430a;
  --green: #047857;
  --amber: #b45309;
  --violet: #4338ca;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  --hairline: 1px solid var(--stone);
  --gutter: 48px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  background:
    radial-gradient(circle at 12% 0%, rgba(156, 139, 110, 0.09), transparent 32rem),
    linear-gradient(180deg, #faf8f4 0%, var(--parchment) 100%);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

img,
svg {
  display: block;
}

::selection {
  background: rgba(196, 81, 10, 0.18);
  color: var(--charcoal);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.muted {
  color: var(--slate);
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--linen);
  border: 1px solid var(--stone);
  padding: 1px 5px;
}

/* ─── Shell & wrapper ───────────────────────────────────────── */

.site-shell {
  min-height: 100vh;
}

.site-wrapper {
  max-width: 1080px;
  margin: 0 auto;
  min-height: 100vh;
  background: rgba(247, 245, 240, 0.94);
  border-left: 1px solid var(--stone);
  border-right: 1px solid var(--stone);
  box-shadow: 0 22px 64px rgba(26, 25, 24, 0.07);
  display: flex;
  flex-direction: column;
}

#site-main {
  flex: 1;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  transform: translateY(-160%);
  background: var(--charcoal);
  color: var(--parchment);
  padding: 9px 14px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.skip-link:focus {
  transform: translateY(0);
}

/* ─── Navigation ────────────────────────────────────────────── */

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px var(--gutter);
  border-bottom: 1px solid var(--stone);
  background: rgba(247, 245, 240, 0.72);
  position: relative;
  z-index: 20;
}

.wordmark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--charcoal);
  border-bottom: 2px solid var(--brass);
  padding-bottom: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.wordmark:hover {
  color: var(--graphite);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid var(--stone);
  padding: 8px 11px;
  color: var(--slate);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-toggle:hover {
  border-color: var(--charcoal);
  color: var(--charcoal);
}

.nav-links-wrap {
  margin-left: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  white-space: nowrap;
}

.nav-links a {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--slate);
  padding: 10px 0;
  transition: color 0.15s ease;
}

.nav-links a::after {
  content: '';
  display: block;
  width: 0;
  height: 1px;
  background: var(--charcoal);
  transition: width 0.2s ease;
}

.nav-links a:hover {
  color: var(--charcoal);
}

.nav-links a:hover::after,
.nav-links a[aria-current='page']::after {
  width: 100%;
}

.nav-links a[aria-current='page'] {
  color: var(--charcoal);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--charcoal);
  color: var(--parchment);
  padding: 8px 13px;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--charcoal);
  transition: background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.nav-cta svg {
  transition: transform 0.15s ease;
}

.nav-cta:hover {
  background: var(--graphite);
  border-color: var(--graphite);
}

.nav-cta:hover svg {
  transform: translateX(2px);
}

/* ─── Sync status ───────────────────────────────────────────── */

.sync-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate);
  border: 1px solid var(--stone);
  background: rgba(255, 255, 255, 0.42);
  padding: 5px 9px;
  line-height: 1.4;
  white-space: nowrap;
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sync-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.sync-status--live .sync-dot {
  box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.12);
  animation: livePulse 2.6s ease-in-out infinite;
}

.sync-status--sample .sync-dot {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.12);
}

.sync-status--fixture .sync-dot {
  background: var(--violet);
  box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.12);
}

@keyframes livePulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.12);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(4, 120, 87, 0.02);
  }
}

/* ─── Shared type & buttons ─────────────────────────────────── */

.eyebrow,
.section-label {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brass-ink);
}

.eyebrow {
  margin-bottom: 18px;
}

.section-label {
  margin-bottom: 12px;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--charcoal);
}

h1 {
  font-size: clamp(42px, 5.4vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 22px;
  line-height: 1.25;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 0;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
  text-decoration: none;
  background: transparent;
  color: var(--charcoal);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn svg {
  flex-shrink: 0;
}

.btn--solid {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.btn--solid:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn--outline {
  border-color: var(--stone);
  background: rgba(255, 255, 255, 0.44);
  color: var(--charcoal);
}

.btn--outline:hover {
  border-color: var(--charcoal);
  background: rgba(255, 255, 255, 0.8);
}

.btn--small {
  padding: 9px 13px;
  font-size: 11px;
}

.btn.is-loading {
  opacity: 0.65;
  pointer-events: none;
}

[hidden] {
  display: none !important;
}

.btn.is-loading svg {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brass-ink);
  width: max-content;
  max-width: 100%;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.text-link:hover {
  color: var(--charcoal);
  border-bottom-color: var(--brass);
}

/* ─── Home hero ─────────────────────────────────────────────── */

.hero {
  border-bottom: 1px solid var(--stone);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.24) 0%, transparent 55%),
    radial-gradient(circle at 85% 15%, rgba(156, 139, 110, 0.08), transparent 24rem);
}

.hero--home {
  padding: 80px var(--gutter) 68px;
}

.hero-copy {
  max-width: 820px;
}

.hero h1 {
  color: var(--graphite);
  max-width: 15ch;
}

.hero-desc {
  margin-top: 22px;
  max-width: 610px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--slate);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 30px;
}

.hero-actions .btn {
  min-width: 178px;
}

.hero-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 25px;
  font-size: 10.5px;
  color: var(--slate);
}

.hero-foot-sep {
  color: var(--stone);
}

/* ─── Stats ─────────────────────────────────────────────────── */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--stone);
}

.stat {
  padding: 24px var(--gutter);
  border-right: 1px solid var(--stone);
  min-width: 0;
}

.stat:last-child {
  border-right: 0;
}

.stat-number {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 500;
  line-height: 0.95;
  color: var(--charcoal);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  margin-top: 7px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--slate);
}

.stat-note {
  margin-top: 3px;
  font-size: 9.5px;
  line-height: 1.4;
  color: var(--brass-ink);
}

.page-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-self: start;
  border: 1px solid var(--stone);
  background: rgba(255, 255, 255, 0.38);
}

.page-hero-stats .stat {
  padding: 18px 20px;
  border-right: 1px solid var(--stone);
  border-bottom: 1px solid var(--stone);
}

.page-hero-stats .stat:nth-child(2n) {
  border-right: 0;
}

.page-hero-stats .stat:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.page-hero-stats .stat-number {
  font-size: 29px;
}

.page-hero-stats .stat-label {
  font-size: 10.5px;
}

.page-hero-stats .stat-note {
  font-size: 9px;
}

/* ─── Notice ────────────────────────────────────────────────── */

.notice {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  padding: 16px var(--gutter);
  border-bottom: 1px solid var(--stone);
  background: linear-gradient(90deg, rgba(180, 83, 9, 0.07), rgba(255, 255, 255, 0.2));
}

.notice-icon {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
  color: var(--brass-ink);
  margin-top: 1px;
}

.notice-body strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--graphite);
}

.notice-body p {
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--slate);
}

.notice-body a {
  color: var(--brass-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.notice-body a:hover {
  color: var(--charcoal);
}

.notice--partial {
  background: linear-gradient(90deg, rgba(156, 139, 110, 0.12), rgba(255, 255, 255, 0.2));
}

.notice--attrib {
  background: linear-gradient(90deg, rgba(90, 120, 150, 0.09), rgba(255, 255, 255, 0.2));
}

/* ─── Source status ─────────────────────────────────────────── */

.source-status {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--stone);
  background: var(--linen);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  line-height: 1.6;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--slate);
}

.source-status--ok {
  color: var(--green);
  background: rgba(4, 120, 87, 0.07);
  border-color: rgba(4, 120, 87, 0.24);
}

.source-status--partial {
  color: var(--amber);
  background: rgba(180, 83, 9, 0.08);
  border-color: rgba(180, 83, 9, 0.26);
}

.source-status--error {
  color: #9b2c2c;
  background: rgba(155, 44, 44, 0.07);
  border-color: rgba(155, 44, 44, 0.24);
}

.source-status--skipped {
  color: var(--slate);
  background: rgba(107, 101, 96, 0.07);
}

.source-status--fixture {
  color: var(--brass-ink);
  background: rgba(156, 139, 110, 0.1);
  border-color: rgba(156, 139, 110, 0.3);
}

/* ─── Sections ──────────────────────────────────────────────── */

.feature-section,
.coverage-section,
.method-section,
.cta-section,
.database-section,
.feed-section {
  border-bottom: 1px solid var(--stone);
}

.feature-section,
.coverage-section {
  padding: 56px var(--gutter);
}

.section-heading {
  max-width: 660px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin-bottom: 8px;
}

.section-heading p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--slate);
  max-width: 58ch;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.feature-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--stone);
  background: rgba(255, 255, 255, 0.48);
  padding: 28px;
  min-width: 0;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.feature-card:hover {
  box-shadow: 0 8px 26px rgba(26, 25, 24, 0.06);
  transform: translateY(-1px);
}

.feature-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.feature-top .section-label {
  margin-bottom: 8px;
}

.feature-top h3 {
  font-size: 28px;
  line-height: 1.1;
}

.feature-desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--slate);
  margin-bottom: 18px;
  max-width: 52ch;
}

.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(4, 120, 87, 0.35);
  color: var(--green);
  background: rgba(4, 120, 87, 0.05);
  padding: 4px 8px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(196, 81, 10, 0.35);
  color: var(--brass-ink);
  background: rgba(196, 81, 10, 0.05);
  padding: 4px 8px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.preview-list {
  border-top: 1px solid var(--stone);
  margin-bottom: 20px;
}

.preview-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) 13px;
  align-items: center;
  gap: 10px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--stone);
  color: var(--slate);
  transition: background 0.15s ease;
}

.preview-row:hover {
  background: rgba(239, 236, 229, 0.45);
}

.preview-time {
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.preview-main {
  min-width: 0;
}

.preview-company {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-meta {
  display: block;
  font-size: 9px;
  color: var(--slate);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-date {
  font-size: 8.5px;
  color: var(--slate);
  white-space: nowrap;
}

.feature-card .text-link {
  margin-top: auto;
}

.category-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.cloud-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--stone);
  background: rgba(255, 255, 255, 0.45);
  padding: 6px 9px;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--graphite);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.cloud-chip span {
  color: var(--brass-ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.cloud-chip:hover {
  border-color: var(--charcoal);
  background: #fff;
}

.market-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  margin-bottom: 18px;
  border: 1px solid var(--stone);
  background: var(--stone);
}

.market-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.55);
  transition: background 0.15s ease;
}

.market-chip:hover {
  background: #fff;
}

.market-chip-code {
  flex-shrink: 0;
  min-width: 28px;
  padding: 1px 5px;
  border: 1px solid var(--stone);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-align: center;
  color: var(--graphite);
  background: var(--linen);
}

.market-chip-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.4;
}

.market-chip-body strong {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--charcoal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.market-chip-body em {
  font-style: normal;
  font-size: 11px;
  color: var(--slate);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.market-chip-count {
  margin-left: auto;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1;
  color: var(--brass-ink);
  font-variant-numeric: tabular-nums;
}

.market-chip--ca .market-chip-code {
  color: #7a3b32;
  background: #f5e9e4;
  border-color: #e3cfc7;
}

.market-chip--au .market-chip-code {
  color: #7a5a20;
  background: #f6efe0;
  border-color: #e6d9bd;
}

.market-chip--hk .market-chip-code {
  color: #355a63;
  background: #e9f0f1;
  border-color: #cfdde0;
}

.market-chip--uk .market-chip-code {
  color: #3f4a6b;
  background: #eceef4;
  border-color: #d5d9e5;
}

.market-chip--ch .market-chip-code {
  color: #8a2b2b;
  background: #f8e8e8;
  border-color: #e7cccc;
}

.market-chip--jp .market-chip-code {
  color: #4b3a6b;
  background: #efe9f6;
  border-color: #dcd0ea;
}

.market-chip--se .market-chip-code {
  color: #2f5a3a;
  background: #e9f2e9;
  border-color: #cfe0d0;
}

.market-chip--no .market-chip-code {
  color: #7a4528;
  background: #f6ece5;
  border-color: #e4d2c4;
}

.market-chip--dk .market-chip-code {
  color: #8a2f4a;
  background: #f8e9ee;
  border-color: #e7cdd7;
}

.market-chip--fi .market-chip-code {
  color: #2f5570;
  background: #e9f0f5;
  border-color: #cfdee7;
}

.market-chip--de .market-chip-code {
  color: #5a5f22;
  background: #f2f2e4;
  border-color: #e0e0c8;
}

.coverage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.coverage-card {
  border: 1px solid var(--stone);
  padding: 24px;
  background: rgba(255, 255, 255, 0.35);
}

.coverage-num {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1;
  color: var(--brass);
  margin-bottom: 18px;
}

.coverage-card h3 {
  font-size: 21px;
  margin-bottom: 8px;
}

.coverage-card p {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--slate);
  margin-bottom: 16px;
}

.coverage-forms {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.method-section {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  padding: 48px var(--gutter);
}

.method-copy h2 {
  margin-bottom: 12px;
}

.method-copy p {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--slate);
  max-width: 58ch;
  margin-bottom: 18px;
}

.method-points {
  border: 1px solid var(--stone);
  background: rgba(255, 255, 255, 0.44);
  padding: 22px 24px;
  align-self: start;
}

.method-point {
  padding: 15px 0;
  border-top: 1px solid var(--stone);
}

.method-point:first-child {
  border-top: 0;
  padding-top: 0;
}

.method-point:last-child {
  padding-bottom: 0;
}

.method-point strong {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--charcoal);
}

.method-point span {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--slate);
}

.cta-section {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding: 48px var(--gutter);
  background: linear-gradient(180deg, rgba(239, 236, 229, 0.48), rgba(255, 255, 255, 0.16));
}

.cta-section h2 {
  font-size: 34px;
  margin-bottom: 6px;
}

.cta-section p {
  font-size: 13px;
  color: var(--slate);
}

.cta-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.cta-section--compact {
  padding-top: 42px;
  padding-bottom: 42px;
}

/* ─── Page hero ─────────────────────────────────────────────── */

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 38px;
  align-items: end;
  padding: 60px var(--gutter) 52px;
  border-bottom: 1px solid var(--stone);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.2), transparent 60%),
    radial-gradient(circle at 90% 12%, rgba(156, 139, 110, 0.075), transparent 22rem);
}

.page-hero-copy {
  min-width: 0;
}

.page-hero h1 {
  font-size: clamp(38px, 4.6vw, 56px);
  color: var(--graphite);
  max-width: 14ch;
}

.page-hero-desc {
  margin-top: 18px;
  max-width: 570px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--slate);
}

.page-hero .hero-actions {
  margin-top: 24px;
}

.page-hero--about {
  display: block;
  padding-top: 64px;
  padding-bottom: 56px;
}

.page-hero--about h1 {
  max-width: none;
}

/* ─── Feed page ─────────────────────────────────────────────── */

.feed-section {
  padding: 46px var(--gutter) 48px;
}

.feed-heading-row,
.database-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.feed-heading-row h2,
.database-heading h2 {
  font-size: 32px;
}

.feed-heading-note,
.database-heading-note {
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--slate);
  padding-bottom: 5px;
  white-space: nowrap;
}

.filter-panel {
  border: 1px solid var(--stone);
  background: rgba(255, 255, 255, 0.46);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 6px;
  border-bottom: 1px solid var(--stone);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--slate);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease;
}

.chip:hover {
  background: var(--linen);
  color: var(--charcoal);
}

.chip.is-active {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--parchment);
}

.chip-count {
  font-size: 8.5px;
  font-variant-numeric: tabular-nums;
  opacity: 0.65;
}

.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 11px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--stone);
  background: #fff;
  color: var(--slate);
  flex: 1 1 230px;
  min-width: 180px;
}

.search-box svg {
  flex-shrink: 0;
  opacity: 0.65;
}

.search-box input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
  color: var(--charcoal);
}

.search-box input::placeholder {
  color: #9a938c;
}

.search-box:focus-within {
  border-color: var(--charcoal);
}

.select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 38px;
  border: 1px solid var(--stone);
  background: #fff;
}

.select-wrap select {
  appearance: none;
  border: 0;
  outline: 0;
  background: transparent;
  height: 100%;
  padding: 0 30px 0 11px;
  font-size: 10.5px;
  color: var(--graphite);
  cursor: pointer;
  max-width: 240px;
}

.select-wrap::after {
  content: '';
  position: absolute;
  right: 10px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-right: 1px solid var(--slate);
  border-bottom: 1px solid var(--slate);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.select-wrap:focus-within {
  border-color: var(--charcoal);
}

.filter-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px 12px;
  background: var(--linen);
  border-top: 1px solid var(--stone);
  font-size: 9.5px;
  letter-spacing: 0.03em;
  color: var(--slate);
}

.filter-summary {
  color: var(--brass-ink);
}

.filter-updated {
  margin-left: auto;
  color: var(--slate);
}

.feed-list {
  border: 1px solid var(--stone);
  border-top: 0;
  background: rgba(255, 255, 255, 0.28);
}

.feed-item {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 20px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--stone);
  transition: background 0.15s ease;
}

.feed-item:last-child {
  border-bottom: 0;
}

.feed-item:hover {
  background: rgba(255, 255, 255, 0.55);
}

.feed-rail {
  padding-top: 2px;
}

.feed-rail time {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--graphite);
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.feed-date {
  display: block;
  margin-top: 2px;
  font-size: 8.5px;
  color: var(--slate);
  line-height: 1.4;
}

.feed-main {
  min-width: 0;
}

.feed-topline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 7px;
}

.feed-market {
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--slate);
}

.market-badge {
  display: inline-block;
  min-width: 26px;
  padding: 1px 5px;
  border: 1px solid var(--stone);
  background: var(--linen);
  color: var(--graphite);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-align: center;
  white-space: nowrap;
}

.market-badge--ca {
  color: #7a3b32;
  background: #f5e9e4;
  border-color: #e3cfc7;
}

.market-badge--au {
  color: #7a5a20;
  background: #f6efe0;
  border-color: #e6d9bd;
}

.market-badge--hk {
  color: #355a63;
  background: #e9f0f1;
  border-color: #cfdde0;
}

.market-badge--uk {
  color: #3f4a6b;
  background: #eceef4;
  border-color: #d5d9e5;
}

.market-badge--ch {
  color: #8a2b2b;
  background: #f8e8e8;
  border-color: #e7cccc;
}

.market-badge--jp {
  color: #4b3a6b;
  background: #efe9f6;
  border-color: #dcd0ea;
}

.market-badge--se {
  color: #2f5a3a;
  background: #e9f2e9;
  border-color: #cfe0d0;
}

.market-badge--no {
  color: #7a4528;
  background: #f6ece5;
  border-color: #e4d2c4;
}

.market-badge--dk {
  color: #8a2f4a;
  background: #f8e9ee;
  border-color: #e7cdd7;
}

.market-badge--fi {
  color: #2f5570;
  background: #e9f0f5;
  border-color: #cfdee7;
}

.market-badge--de {
  color: #5a5f22;
  background: #f2f2e4;
  border-color: #e0e0c8;
}

.feed-company {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 5px;
}

.company-cell {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.company-cell a {
  color: var(--charcoal);
  font-size: inherit;
  font-weight: inherit;
  text-decoration: none;
}

.company-cell a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--brass);
}

.ticker {
  display: inline-block;
  border: 1px solid var(--stone);
  padding: 0 5px;
  font-family: var(--sans);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.55;
  color: var(--brass-ink);
  background: rgba(255, 255, 255, 0.55);
  vertical-align: 1px;
}

.exchange {
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--slate);
  text-transform: uppercase;
}

.feed-headline {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--graphite);
  max-width: 78ch;
  margin-bottom: 3px;
}

.feed-summary {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--slate);
  max-width: 78ch;
}

.feed-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 11px;
}

.feed-bottom .source-block {
  margin-left: auto;
}

.source-block {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.deal-source {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px 6px;
  font-size: 10px;
  color: var(--slate);
}

.deal-source-label {
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.deal-source-link,
.deal-source-name {
  color: var(--graphite);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.deal-source-sep {
  color: var(--slate);
}

.td-details .deal-source {
  display: flex;
  margin-top: 4px;
}

.source-attrib {
  font-size: 8.5px;
  letter-spacing: 0.03em;
  color: var(--slate);
  text-align: right;
}

.td-source .source-attrib {
  display: block;
  margin-top: 2px;
  font-size: 8px;
  text-align: left;
  white-space: nowrap;
}

.source-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brass-ink);
  white-space: nowrap;
}

.source-link:hover {
  color: var(--charcoal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pill,
.form-pill {
  display: inline-block;
  border: 1px solid var(--stone);
  background: rgba(255, 255, 255, 0.5);
  padding: 1px 6px;
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.055em;
  line-height: 1.6;
  text-transform: uppercase;
  white-space: nowrap;
}

.form-pill {
  font-weight: 600;
  letter-spacing: 0.03em;
  border-color: var(--stone);
  color: var(--graphite);
  background: var(--linen);
}

/* ─── Buyer chip (M&A rows only) ────────────────────────────── */

.buyer-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  padding: 0 7px;
  border: 1px solid var(--stone);
  background: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  line-height: 1.6;
  white-space: nowrap;
  overflow: hidden;
}

.buyer-chip-type {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.buyer-chip-name {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--graphite);
  overflow: hidden;
  text-overflow: ellipsis;
}

.buyer-chip--strategic {
  color: #047857;
  border-color: rgba(4, 120, 87, 0.3);
  background: rgba(4, 120, 87, 0.05);
}

.buyer-chip--financial {
  color: #6d28d9;
  border-color: rgba(109, 40, 217, 0.28);
  background: rgba(109, 40, 217, 0.05);
}

.detail-buyer {
  display: block;
  margin-top: 4px;
}

.filter-legend {
  margin-top: 10px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--slate);
  max-width: 92ch;
}

.filter-legend strong {
  font-weight: 600;
  color: var(--graphite);
}

.db-legend-note {
  margin-top: 8px;
}

.db-legend-note .buyer-chip {
  vertical-align: 1px;
}

.pill--activist,
.form-pill--activist {
  color: #9a3f05;
  border-color: rgba(180, 83, 9, 0.35);
  background: rgba(180, 83, 9, 0.06);
}

.pill--acquisitions,
.form-pill--acquisitions {
  color: #1d4ed8;
  border-color: rgba(29, 78, 216, 0.28);
  background: rgba(29, 78, 216, 0.055);
}

.pill--tender,
.form-pill--tender {
  color: #0e7490;
  border-color: rgba(14, 116, 144, 0.3);
  background: rgba(14, 116, 144, 0.055);
}

.pill--going-private,
.form-pill--going-private {
  color: #4338ca;
  border-color: rgba(67, 56, 202, 0.28);
  background: rgba(67, 56, 202, 0.055);
}

.pill--bankruptcies,
.form-pill--bankruptcies {
  color: #7f1d1d;
  border-color: rgba(127, 29, 29, 0.3);
  background: rgba(127, 29, 29, 0.06);
}

.pill--strategic-reviews,
.form-pill--strategic-reviews {
  color: #a16207;
  border-color: rgba(161, 98, 7, 0.3);
  background: rgba(161, 98, 7, 0.06);
}

.pill--liquidations,
.form-pill--liquidations {
  color: #57534e;
  border-color: rgba(87, 83, 78, 0.32);
  background: rgba(87, 83, 78, 0.06);
}

.pill--restructurings,
.form-pill--restructurings {
  color: #c2410c;
  border-color: rgba(194, 65, 12, 0.3);
  background: rgba(194, 65, 12, 0.065);
}

.pill--capital-returns,
.form-pill--capital-returns {
  color: #166534;
  border-color: rgba(22, 101, 52, 0.3);
  background: rgba(22, 101, 52, 0.06);
}

.pill--spinoffs,
.form-pill--spinoffs {
  color: #7e22ce;
  border-color: rgba(126, 34, 206, 0.26);
  background: rgba(126, 34, 206, 0.05);
}

.pill--delistings,
.form-pill--delistings {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.26);
  background: rgba(185, 28, 28, 0.05);
}

.pill--corporate-events,
.form-pill--corporate-events {
  color: #047857;
  border-color: rgba(4, 120, 87, 0.28);
  background: rgba(4, 120, 87, 0.055);
}

.empty-state {
  border: 1px solid var(--stone);
  border-top: 0;
  padding: 48px 24px;
  text-align: center;
  background: rgba(255, 255, 255, 0.3);
}

.empty-state h3 {
  font-size: 24px;
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 12.5px;
  color: var(--slate);
  margin-bottom: 16px;
}

.load-more-row {
  display: flex;
  justify-content: center;
  padding-top: 18px;
}

.load-more-row .btn {
  min-width: 160px;
}

.update-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--stone);
}

.update-card {
  display: flex;
  gap: 14px;
  padding: 30px var(--gutter);
  border-right: 1px solid var(--stone);
  background: rgba(255, 255, 255, 0.18);
}

.update-card:last-child {
  border-right: 0;
}

.update-icon {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--brass);
  line-height: 1;
  flex-shrink: 0;
}

.update-card strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-bottom: 4px;
}

.update-card p {
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--slate);
}

/* ─── Database ──────────────────────────────────────────────── */

.database-section {
  padding: 46px var(--gutter) 50px;
}

.database-heading {
  margin-bottom: 18px;
}

.db-toolbar {
  border: 1px solid var(--stone);
  background: rgba(255, 255, 255, 0.46);
}

.db-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 11px;
  border-bottom: 1px solid var(--stone);
}

.search-box--wide {
  flex: 1 1 260px;
}

.db-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 9px 12px;
  background: var(--linen);
  font-size: 9.5px;
  letter-spacing: 0.03em;
  color: var(--slate);
}

.db-meta-sep {
  color: var(--stone);
}

.table-wrap {
  border: 1px solid var(--stone);
  border-top: 0;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.4);
  -webkit-overflow-scrolling: touch;
}

.db-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  font-size: 11px;
}

.db-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--linen);
  border-bottom: 1px solid var(--stone);
  padding: 10px 9px;
  text-align: left;
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  white-space: nowrap;
}

.db-table td {
  padding: 9px;
  border-bottom: 1px solid rgba(216, 211, 203, 0.72);
  color: var(--slate);
  vertical-align: middle;
}

.db-table tbody tr:last-child td {
  border-bottom: 0;
}

.db-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.55);
}

.db-table .td-company {
  min-width: 180px;
  max-width: 280px;
}

.db-table .td-company .company-cell a,
.db-table .td-company .company-cell > span {
  font-size: 12px;
  font-weight: 600;
  color: var(--charcoal);
}

.db-table .td-date {
  white-space: nowrap;
}

.db-table .td-date > span {
  display: block;
  line-height: 1.4;
}

.db-table .td-market {
  width: 42px;
  text-align: center;
  white-space: nowrap;
}

.db-table .td-details {
  min-width: 200px;
  max-width: 340px;
}

.detail-headline {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.5;
  color: var(--graphite);
}

.td-time {
  font-size: 8.5px;
  color: var(--slate);
}

.db-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.db-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 0 0;
}

.db-footer-info {
  font-size: 10px;
  letter-spacing: 0.03em;
  color: var(--slate);
}

.pagination {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.page-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--stone);
  background: rgba(255, 255, 255, 0.4);
  color: var(--slate);
  font-size: 11px;
  line-height: 1;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--charcoal);
  color: var(--charcoal);
}

.page-btn.is-current {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--parchment);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-ellipsis {
  min-width: 22px;
  text-align: center;
  font-size: 11px;
  color: var(--slate);
}

.page-ellipsis {
  padding: 0 3px;
  font-size: 11px;
  color: var(--slate);
}

.db-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  border-top: 1px solid var(--stone);
  margin-top: 26px;
  padding-top: 22px;
}

.db-legend strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-bottom: 5px;
}

.db-legend p {
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--slate);
  max-width: 52ch;
}

.no-script-note {
  padding: 10px 12px;
  border: 1px solid var(--stone);
  border-bottom: 0;
  background: var(--linen);
  font-size: 11px;
  color: var(--slate);
}

/* ─── About / docs ──────────────────────────────────────────── */

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--stone);
}

.method-card {
  padding: 34px var(--gutter);
  border-right: 1px solid var(--stone);
  background: rgba(255, 255, 255, 0.28);
}

.method-card:last-child {
  border-right: 0;
}

.method-num {
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1;
  color: var(--brass);
  margin-bottom: 20px;
}

.method-card h2 {
  font-size: 26px;
  margin-bottom: 8px;
}

.method-card p {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--slate);
  margin-bottom: 14px;
  max-width: 38ch;
}

.doc-section {
  padding: 48px var(--gutter);
  border-bottom: 1px solid var(--stone);
}

.doc-heading {
  max-width: 680px;
  margin-bottom: 26px;
}

.doc-heading h2 {
  margin-bottom: 8px;
}

.doc-heading p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--slate);
}

.setup-steps {
  list-style: none;
  border-top: 1px solid var(--stone);
}

.setup-steps > li {
  padding: 24px 0;
  border-bottom: 1px solid var(--stone);
}

.step-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  border: 1px solid var(--stone);
  background: rgba(255, 255, 255, 0.5);
  font-family: var(--serif);
  font-size: 16px;
  color: var(--brass-ink);
  flex-shrink: 0;
}

.step-head h3 {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.setup-steps p {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--slate);
  margin-top: 9px;
  max-width: 78ch;
}

.code-block {
  background: var(--charcoal);
  color: #efece5;
  border: 1px solid #2d2a27;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  margin: 10px 0;
}

.code-block code {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.plain-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 620px;
}

.plain-table th {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--stone);
  background: var(--linen);
  color: var(--slate);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plain-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--stone);
  color: var(--slate);
  vertical-align: top;
  line-height: 1.6;
}

.plain-table tbody tr:last-child td {
  border-bottom: 0;
}

.plain-table .coverage-form {
  white-space: nowrap;
}

.coverage-type {
  font-weight: 500;
  color: var(--graphite);
}

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

.caveat {
  border: 1px solid var(--stone);
  padding: 22px;
  background: rgba(255, 255, 255, 0.35);
}

.caveat h3 {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--charcoal);
}

.caveat p {
  font-size: 12px;
  line-height: 1.65;
  color: var(--slate);
}

/* ─── Home: concept, situations, coverage ───────────────────── */

.story-section {
  padding: 54px var(--gutter);
  border-bottom: 1px solid var(--stone);
}

.story-head {
  max-width: 720px;
  margin-bottom: 28px;
}

.story-head h2 {
  margin-bottom: 10px;
}

.story-head p {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--slate);
  max-width: 60ch;
}

.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.75fr);
  gap: 40px;
  align-items: start;
}

.story-copy p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--slate);
  max-width: 64ch;
}

.story-copy p + p {
  margin-top: 14px;
}

.story-copy strong {
  color: var(--charcoal);
  font-weight: 600;
}

.story-aside {
  border: 1px solid var(--stone);
  background: var(--paper);
  padding: 24px;
}

.aside-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-ink);
  margin-bottom: 12px;
}

.aside-title {
  display: block;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.25;
  color: var(--charcoal);
}

.aside-meta {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--slate);
}

.story-aside p {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--slate);
}

.story-aside .aside-note {
  padding-top: 12px;
  border-top: 1px solid var(--stone);
  font-size: 11.5px;
}

.criteria-list {
  list-style: none;
}

.criteria-list li {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--stone);
  font-size: 12px;
  line-height: 1.6;
  color: var(--slate);
}

.criteria-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.criteria-list li:last-child {
  padding-bottom: 0;
}

.criteria-list span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--brass-ink);
  padding-top: 2px;
}

.balance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.balance-card {
  border: 1px solid var(--stone);
  background: var(--paper);
  padding: 22px;
}

.balance-card h3 {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.balance-card ul {
  list-style: none;
}

.balance-card li {
  padding: 10px 0;
  border-top: 1px solid var(--stone);
  font-size: 12px;
  line-height: 1.65;
  color: var(--slate);
}

.balance-card li:first-child {
  border-top: 0;
  padding-top: 0;
}

.balance-card li:last-child {
  padding-bottom: 0;
}

.balance-card strong {
  color: var(--charcoal);
  font-weight: 600;
}

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

.situation-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--stone);
  background: var(--paper);
  padding: 22px;
}

.situation-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.situation-head h3 {
  font-size: 20px;
}

.situation-count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--brass-ink);
  font-variant-numeric: tabular-nums;
}

.situation-copy {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--slate);
}

.situation-notes {
  margin-top: 14px;
  border-top: 1px solid var(--stone);
}

.situation-note {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--stone);
}

.note-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass-ink);
  padding-top: 2px;
}

.situation-note p {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--slate);
}

.situation-card .text-link {
  margin-top: 14px;
  font-size: 11.5px;
}

.situation-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--stone);
}

.situation-foot p {
  font-size: 12px;
  color: var(--slate);
}

.story-section .market-strip {
  margin-top: 28px;
  margin-bottom: 0;
}

.market-strip--home {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.market-strip--home .market-chip-body strong,
.market-strip--home .market-chip-body em {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.risk-block {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--stone);
}

.risk-head {
  max-width: 640px;
  margin-bottom: 16px;
}

.risk-head h3 {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 4px;
}

.risk-head p {
  font-size: 12px;
  line-height: 1.65;
  color: var(--slate);
}

.risk-footnote {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--slate);
  max-width: 78ch;
}

/* ─── Home: disclaimer ──────────────────────────────────────── */

.disclaimer-block {
  padding: 52px var(--gutter) 58px;
  border-bottom: 1px solid var(--stone);
  background: var(--linen);
}

.disclaimer-head {
  max-width: 720px;
  margin-bottom: 26px;
}

.disclaimer-head h2 {
  margin-bottom: 8px;
}

.disclaimer-head p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--slate);
}

.disclaimer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 28px;
}

.disclaimer-item {
  border-top: 1px solid var(--stone);
  padding-top: 14px;
}

.disclaimer-item h3 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 6px;
}

.disclaimer-item p {
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--slate);
}

.disclaimer-foot {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--stone);
  font-size: 11px;
  line-height: 1.7;
  color: var(--slate);
  max-width: 100ch;
}

.disclaimer-foot a {
  color: var(--brass-ink);
  border-bottom: 1px solid var(--stone);
}

.disclaimer-foot a:hover {
  color: var(--charcoal);
  border-bottom-color: var(--brass);
}

@media (max-width: 920px) {
  .story-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .balance-grid,
  .situation-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .story-section,
  .disclaimer-block {
    padding-left: 24px;
    padding-right: 24px;
  }

  .situation-note {
    grid-template-columns: 1fr;
    gap: 2px;
  }

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

/* ─── 404 ───────────────────────────────────────────────────── */

.notfound {
  padding: 100px var(--gutter) 110px;
  max-width: 760px;
}

.notfound h1 {
  font-size: clamp(40px, 5vw, 58px);
  margin-bottom: 16px;
  color: var(--graphite);
}

.notfound p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--slate);
  max-width: 540px;
}

/* ─── Footer ────────────────────────────────────────────────── */

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--stone);
  background: linear-gradient(180deg, rgba(239, 236, 229, 0.28), rgba(239, 236, 229, 0.52));
}

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr 0.9fr 0.9fr;
  gap: 36px;
  padding: 38px var(--gutter) 30px;
}

.footer-brand strong {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-bottom: 7px;
}

.footer-brand p {
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--slate);
  max-width: 36ch;
  margin-bottom: 12px;
}

.footer-status {
  display: flex;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-heading {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-bottom: 3px;
}

.footer-col a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--slate);
  width: max-content;
  max-width: 100%;
}

.footer-col a:hover {
  color: var(--charcoal);
}

.footer-bottom {
  padding: 14px var(--gutter) 20px;
  border-top: 1px solid var(--stone);
  background: linear-gradient(180deg, var(--linen), rgba(239, 236, 229, 0.55));
}

.footer-copy {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--slate);
  margin-bottom: 5px;
}

.footer-disclaimer {
  font-size: 11px;
  line-height: 1.7;
  color: var(--slate);
  max-width: 92ch;
}

/* ─── Utility overlays ──────────────────────────────────────── */

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--stone);
  background: rgba(247, 245, 240, 0.92);
  color: var(--graphite);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  backdrop-filter: blur(4px);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: var(--charcoal);
  color: var(--charcoal);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 60;
  transform: translateX(-50%) translateY(8px);
  background: var(--charcoal);
  color: var(--parchment);
  border: 1px solid var(--graphite);
  padding: 10px 16px;
  font-size: 11px;
  letter-spacing: 0.02em;
  max-width: calc(100vw - 32px);
  box-shadow: 0 10px 30px rgba(26, 25, 24, 0.18);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── Responsive ────────────────────────────────────────────── */

@media (max-width: 1080px) {
  :root {
    --gutter: 36px;
  }

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

  .site-nav {
    padding: 18px var(--gutter);
    gap: 18px;
  }

  .nav-links {
    gap: 15px;
  }

  .wordmark {
    font-size: 17.5px;
  }

  .sync-status {
    max-width: 190px;
  }

  .hero--home {
    padding-top: 68px;
  }
}

@media (max-width: 920px) {
  .page-hero {
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: start;
    padding-top: 52px;
    padding-bottom: 44px;
  }

  .page-hero-stats {
    max-width: 560px;
  }

  .page-hero h1 {
    max-width: 18ch;
  }

  .feature-grid,
  .coverage-grid {
    grid-template-columns: 1fr;
  }

  .method-section {
    grid-template-columns: 1fr;
    gap: 24px;
  }

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

  .method-card {
    border-right: 0;
    border-bottom: 1px solid var(--stone);
    padding: 28px var(--gutter);
  }

  .method-card:last-child {
    border-bottom: 0;
  }

  .update-strip {
    grid-template-columns: 1fr;
  }

  .update-card {
    border-right: 0;
    border-bottom: 1px solid var(--stone);
    padding: 22px var(--gutter);
  }

  .update-card:last-child {
    border-bottom: 0;
  }

  .footer-main {
    grid-template-columns: 1.4fr 0.9fr 0.9fr 0.9fr;
    gap: 22px;
  }
}

@media (max-width: 900px) {
  .site-nav {
    flex-wrap: wrap;
    gap: 10px 14px;
    padding: 14px 20px;
  }

  .wordmark {
    order: 1;
    font-size: 16px;
    letter-spacing: 0.07em;
    white-space: normal;
    line-height: 1.15;
    max-width: 210px;
  }

  .nav-toggle {
    display: inline-flex;
    order: 3;
  }

  .nav-actions {
    order: 2;
    margin-left: auto;
    gap: 8px;
  }

  .nav-actions .sync-status {
    display: none;
  }

  .nav-cta {
    padding: 8px 11px;
    font-size: 9px;
  }

  .nav-links-wrap {
    order: 4;
    display: none;
    width: 100%;
    margin-left: 0;
  }

  .site-nav.is-open .nav-links-wrap {
    display: block;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px 0;
    border-top: 1px solid var(--stone);
    margin-top: 2px;
  }

  .nav-links a {
    display: block;
    padding: 12px 2px;
    font-size: 11px;
    border-bottom: 1px solid var(--linen);
  }

  .nav-links li:last-child a {
    border-bottom: 0;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-toggle[aria-expanded='true'] {
    background: var(--charcoal);
    color: var(--parchment);
    border-color: var(--charcoal);
  }
}

@media (max-width: 720px) {
  :root {
    --gutter: 24px;
  }

  h1 {
    font-size: clamp(34px, 9vw, 46px);
  }

  h2 {
    font-size: 27px;
  }

  .hero--home {
    padding: 46px 24px 40px;
  }

  .hero h1 {
    max-width: none;
  }

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

  .hero-actions {
    margin-top: 24px;
  }

  .hero-actions .btn {
    min-width: 0;
    flex: 1 1 auto;
  }

  .hero-foot {
    margin-top: 20px;
  }

  .stat {
    padding: 18px 16px;
  }

  .stat-number {
    font-size: 29px;
  }

  .stat-label {
    font-size: 10px;
  }

  .stat-note {
    font-size: 8.5px;
  }

  .feature-section,
  .coverage-section,
  .database-section,
  .feed-section,
  .doc-section {
    padding: 36px 24px;
  }

  .feature-card {
    padding: 22px;
  }

  .feature-top h3 {
    font-size: 25px;
  }

  .preview-row {
    grid-template-columns: max-content minmax(0, 1fr) 13px;
  }

  .preview-date {
    display: none;
  }

  .method-section {
    padding: 36px 24px;
  }

  .cta-section {
    flex-direction: column;
    align-items: flex-start;
    padding: 36px 24px;
  }

  .cta-actions {
    width: 100%;
  }

  .cta-actions .btn {
    flex: 1 1 auto;
  }

  .page-hero {
    padding: 40px 24px 34px;
    gap: 24px;
  }

  .page-hero h1 {
    max-width: none;
  }

  .page-hero-desc {
    font-size: 13.5px;
  }

  .page-hero-stats {
    width: 100%;
  }

  .notice {
    padding: 14px 24px;
  }

  .feed-heading-row,
  .database-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .feed-heading-row h2,
  .database-heading h2 {
    font-size: 27px;
  }

  .feed-heading-note,
  .database-heading-note {
    padding-bottom: 0;
  }

  .filter-row {
    padding: 9px;
  }

  .search-box {
    flex-basis: 100%;
  }

  .select-wrap {
    flex: 1 1 150px;
  }

  .select-wrap select {
    width: 100%;
    max-width: none;
  }

  .filter-row .btn {
    flex: 1 1 auto;
  }

  .filter-status {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .filter-updated {
    margin-left: 0;
  }

  .feed-item {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 17px 18px;
  }

  .feed-rail {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 0;
  }

  .feed-date {
    margin-top: 0;
  }

  .feed-company {
    font-size: 14px;
  }

  .feed-summary {
    font-size: 12px;
  }

  .feed-bottom {
    margin-top: 9px;
  }

  .db-controls {
    padding: 9px;
  }

  .db-controls .select-wrap {
    flex: 1 1 145px;
  }

  .db-footer {
    padding-top: 14px;
  }

  .pagination {
    gap: 3px;
  }

  .page-btn {
    min-width: 28px;
    height: 28px;
  }

  .db-legend,
  .caveat-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .doc-section {
    padding: 36px 24px;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 28px 24px 24px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    padding: 14px 24px 18px;
  }

  .footer-brand p {
    max-width: none;
  }

  .notfound {
    padding: 64px 24px 80px;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
  }
}

@media (max-width: 520px) {
  .wordmark {
    max-width: 180px;
    font-size: 15px;
  }

  .nav-cta {
    padding: 7px 10px;
    font-size: 8.5px;
  }

  .nav-toggle {
    padding: 7px 9px;
    font-size: 9px;
  }

  .stat-strip {
    grid-template-columns: 1fr;
  }

  .stat {
    border-right: 0;
    border-bottom: 1px solid var(--stone);
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 14px 24px;
  }

  .stat:last-child {
    border-bottom: 0;
  }

  .stat-number {
    font-size: 26px;
    flex-shrink: 0;
  }

  .stat-label {
    margin-top: 0;
  }

  .stat-note {
    display: none;
  }

  .page-hero-stats {
    grid-template-columns: 1fr 1fr;
  }

  .page-hero-stats .stat {
    display: block;
    border-bottom: 1px solid var(--stone);
    padding: 14px;
  }

  .page-hero-stats .stat:nth-child(2n) {
    border-right: 0;
  }

  .page-hero-stats .stat:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .page-hero-stats .stat-number {
    font-size: 25px;
  }

  .page-hero-stats .stat-label {
    font-size: 9.5px;
  }

  .page-hero-stats .stat-note {
    display: block;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .cta-actions {
    flex-direction: column;
  }

  .filter-row .btn {
    flex: 1 1 100%;
  }

  .chip-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .chip {
    flex-shrink: 0;
  }

  .feed-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .db-controls .select-wrap,
  .db-controls .btn {
    flex: 1 1 100%;
  }

  .db-controls .search-box {
    flex-basis: 100%;
  }

  .step-head {
    align-items: flex-start;
  }

  .code-block {
    font-size: 10.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
