:root {
  color-scheme: light;
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-soft: #f9fbff;
  --border: #e1e7f0;
  --border-strong: #cfd9e8;
  --text: #181d26;
  --muted: #5f6f86;
  --accent: #1b61c9;
  --accent-soft: #edf4ff;
  --badge-bg: #eef4ff;
  --badge-text: #1b61c9;
  --shadow: rgba(0, 0, 0, 0.04) 0 8px 30px, rgba(45, 127, 249, 0.08) 0 1px 3px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: radial-gradient(circle at top left, #ffffff 0%, var(--bg) 45%, #eef4fc 100%);
  color: var(--text);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.page-shell { min-height: 100vh; }
.container { width: min(1120px, calc(100vw - 32px)); margin: 0 auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(223, 231, 241, 0.95);
}
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #eaf2ff 0%, #dceaff 100%);
  box-shadow: inset 0 0 0 1px #d3e1f8;
  font-size: 22px;
}
.brand strong { display: block; font-size: 1rem; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: .82rem; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: var(--text);
}
.nav-links a:hover {
  background: var(--surface);
  border-color: var(--border);
  text-decoration: none;
}
.nav-icon { font-size: 1rem; }
.page-content { padding: 36px 0 60px; }
.site-footer { padding: 0 0 26px; }
.footer-inner {
  display: flex;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: .92rem;
}
.hero, .card, .empty-card, .detail-head-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.hero {
  padding: 34px;
  margin-bottom: 30px;
}
.hero-home {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 24px;
}
.hero-copy h1,
.section-header h1,
.detail-head h1 {
  margin: 0;
  font-size: clamp(2rem, 4.6vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .86rem;
  font-weight: 600;
}
.lede {
  color: var(--muted);
  max-width: 800px;
  line-height: 1.75;
  font-size: 1.03rem;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.button-primary,
.button-secondary,
.filters button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
}
.button-primary,
.filters button {
  background: var(--accent);
  color: white;
}
.button-primary:hover,
.filters button:hover { text-decoration: none; background: #1758b6; }
.button-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.button-secondary:hover { text-decoration: none; background: var(--surface-soft); }
.hero-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
}
.hero-panel-title,
.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-weight: 700;
}
.stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.stats-vertical {
  flex-direction: column;
}
.stat {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-width: 160px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-soft);
}
.stat-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  font-size: 1.15rem;
}
.stat span {
  display: block;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
}
.stat label {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin: 10px 0 18px;
}
.page-head { margin-bottom: 14px; }
.text-link { font-weight: 600; }
.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 24px;
}
.input-wrap,
.select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrap.wide { min-width: min(520px, 100%); }
.input-wrap input,
.select-wrap select {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  padding: 0 14px 0 42px;
  font-size: .98rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.input-wrap input { min-width: min(420px, 100%); }
.select-wrap select { min-width: 170px; appearance: none; }
.input-icon {
  position: absolute;
  left: 14px;
  color: var(--muted);
  pointer-events: none;
}
.list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
}
.card, .empty-card { padding: 22px; }
.list-card, .record-card { transition: transform .15s ease, box-shadow .15s ease; }
.list-card:hover, .record-card:hover { transform: translateY(-2px); box-shadow: rgba(27,97,201,.12) 0 10px 28px; }
.compact-card h2,
.list-card h2,
.record-card h2 {
  margin: 0;
  font-size: 1.15rem;
}
.card-summary,
.record-text { color: #33425b; line-height: 1.72; }
.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}
.meta-top { margin-bottom: 14px; }
.meta-bottom { margin-top: 16px; }
.meta-stack {
  display: grid;
  gap: 10px;
  color: #26344d;
}
.meta-list { margin-top: 8px; }
.align-right { text-align: right; }
.badge, .relation-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .84rem;
  font-weight: 600;
}
.badge {
  background: var(--badge-bg);
  color: var(--badge-text);
  border: 1px solid #d4e3ff;
}
.relation-pill {
  background: #f5f7fb;
  color: #50617b;
  border: 1px solid #dde5f0;
}
.muted { color: var(--muted); }
.icon-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.detail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.detail-head-card {
  padding: 24px;
}
.detail-summary {
  min-width: 240px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.repeater-card { margin-bottom: 20px; }
.warning-card {
  margin-bottom: 20px;
  border-color: #f3c97a;
  background: linear-gradient(180deg, #fffaf0 0%, #fff5dd 100%);
}
.phone-interface-card {
  margin-bottom: 20px;
  border-color: #a9d1ff;
  background: linear-gradient(180deg, #f5fbff 0%, #edf6ff 100%);
}
.legal-warning-card .card-head h2 {
  color: #8a4b00;
}
.legal-list {
  margin-top: 12px;
}
.repeater-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.repeater-row {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}
.empty-card {
  text-align: center;
  padding: 36px 24px;
}
.empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--accent-soft);
  font-size: 1.5rem;
}
.feature-callout { max-width: 760px; margin: 0 auto; }
.plain-list {
  margin: 0;
  padding-left: 22px;
  color: #33425b;
}
.plain-list li + li { margin-top: 10px; }
p { line-height: 1.74; }
h2 { margin: 0; font-size: 1.28rem; }

@media (max-width: 860px) {
  .hero-home { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav {
    flex-direction: column;
    align-items: start;
  }
  .nav-links { width: 100%; }
  .align-right { text-align: left; }
  .footer-inner {
    flex-direction: column;
    align-items: center;
  }
  .filters { flex-direction: column; }
  .input-wrap input,
  .select-wrap select,
  .input-wrap.wide {
    width: 100%;
    min-width: 100%;
  }
}
