/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

/* ── Tokens ────────────────────────────────────────────────────────────── */
:root {
  --c-bg:        #ffffff;
  --c-surface:   #f9fafb;
  --c-border:    #e5e7eb;
  --c-border-md: #d1d5db;
  --c-text:      #111827;
  --c-muted:     #6b7280;
  --c-primary:   #4f46e5;
  --c-primary-h: #4338ca;
  --c-success:   #059669;
  --c-danger:    #dc2626;
  --c-warn:      #d97706;
  --c-hero-bg:   #0d0d1a;

  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  16px;
  --r-xl:  24px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.14);
}

/* ── Base ──────────────────────────────────────────────────────────────── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
}

h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.025em;
}

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

img { max-width: 100%; display: block; }

/* ── Layout ────────────────────────────────────────────────────────────── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Nav ───────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 26, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  letter-spacing: -0.03em;
}

.nav__logo-mark {
  width: 30px;
  height: 30px;
  background: var(--c-primary);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__link {
  color: rgba(255,255,255,.7);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  transition: color .15s;
}

.nav__link:hover { color: #fff; }

.nav__cta {
  background: var(--c-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--r-sm);
  transition: background .15s, box-shadow .15s;
}

.nav__cta:hover {
  background: var(--c-primary-h);
  box-shadow: 0 0 0 3px rgba(79,70,229,.3);
}

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  background: var(--c-hero-bg);
  padding: 100px 0 88px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(79,70,229,.35) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(16,185,129,.15) 0%, transparent 50%);
  pointer-events: none;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(79,70,229,.18);
  border: 1px solid rgba(79,70,229,.4);
  border-radius: 999px;
  color: #a5b4fc;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 14px;
  margin-bottom: 28px;
  letter-spacing: 0.01em;
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  background: #6366f1;
  border-radius: 50%;
  flex-shrink: 0;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 58px);
  color: #fff;
  max-width: 760px;
  margin-bottom: 20px;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #818cf8, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__sub {
  color: rgba(255,255,255,.65);
  font-size: 18px;
  max-width: 600px;
  margin-bottom: 40px;
  line-height: 1.65;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero__stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.hero__stat-num {
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 2px;
}

.hero__stat-label {
  color: rgba(255,255,255,.5);
  font-size: 13px;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  transition: background .15s, box-shadow .15s, transform .1s;
  line-height: 1;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 3px; }

.btn-primary {
  background: var(--c-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--c-primary-h);
  box-shadow: 0 0 0 4px rgba(79,70,229,.25), var(--shadow-sm);
}

.btn-outline-light {
  background: transparent;
  color: rgba(255,255,255,.85);
  border: 1.5px solid rgba(255,255,255,.2);
}
.btn-outline-light:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.35);
}

.btn-outline {
  background: #fff;
  color: var(--c-text);
  border: 1.5px solid var(--c-border-md);
}
.btn-outline:hover {
  border-color: #9ca3af;
  box-shadow: var(--shadow-sm);
}

.btn-lg {
  font-size: 16px;
  padding: 14px 28px;
}

/* ── Section ───────────────────────────────────────────────────────────── */
.section { padding: 88px 0; }
.section--alt { background: var(--c-surface); }

.section__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: 12px;
}

.section__title {
  font-size: clamp(26px, 3.5vw, 38px);
  color: var(--c-text);
  margin-bottom: 16px;
  max-width: 600px;
}

.section__sub {
  color: var(--c-muted);
  font-size: 17px;
  max-width: 560px;
  line-height: 1.65;
  margin-bottom: 56px;
}

/* ── Risk Banner ───────────────────────────────────────────────────────── */
.risk-banner {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--r-lg);
  padding: 24px 32px;
  margin-bottom: 0;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.risk-banner__icon {
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.risk-banner__title {
  font-size: 16px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 6px;
}

.risk-banner__text {
  font-size: 14px;
  color: #78350f;
  line-height: 1.6;
}

.risk-banner__text strong {
  font-weight: 700;
}

/* ── How It Works ──────────────────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(16.667% + 16px);
  right: calc(16.667% + 16px);
  height: 2px;
  background: linear-gradient(90deg, var(--c-primary), #34d399);
  opacity: .3;
}

.step {
  text-align: center;
  padding: 0 16px;
}

.step__num {
  width: 56px;
  height: 56px;
  background: var(--c-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 20px;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 6px rgba(79,70,229,.12);
}

.step h3 {
  font-size: 17px;
  margin-bottom: 10px;
}

.step p {
  font-size: 15px;
  color: var(--c-muted);
  line-height: 1.6;
}

/* ── Features ──────────────────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 28px 32px;
  transition: border-color .2s, box-shadow .2s;
}

.feature-card:hover {
  border-color: #a5b4fc;
  box-shadow: 0 0 0 3px rgba(79,70,229,.07), var(--shadow-md);
}

.feature-card__icon {
  width: 44px;
  height: 44px;
  background: rgba(79,70,229,.1);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.feature-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.65;
}

/* ── State Coverage ────────────────────────────────────────────────────── */
.states-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 40px;
}

.state-chip {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.state-chip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.state-chip__dot--active { background: var(--c-success); }
.state-chip__dot--upcoming { background: var(--c-warn); }

/* ── Pricing ───────────────────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.pricing-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: 32px;
  transition: box-shadow .2s;
}

.pricing-card:hover { box-shadow: var(--shadow-md); }

.pricing-card--featured {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 1px var(--c-primary), var(--shadow-lg);
  position: relative;
}

.pricing-card__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--c-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.pricing-card__tier {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 16px;
}

.pricing-card__price {
  margin-bottom: 6px;
}

.pricing-card__amount {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--c-text);
  line-height: 1;
}

.pricing-card__amount sup {
  font-size: 22px;
  font-weight: 700;
  vertical-align: super;
  letter-spacing: 0;
}

.pricing-card__period {
  font-size: 15px;
  color: var(--c-muted);
  margin-bottom: 20px;
}

.pricing-card__desc {
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.6;
  margin-bottom: 28px;
  min-height: 48px;
}

.pricing-card__divider {
  height: 1px;
  background: var(--c-border);
  margin-bottom: 24px;
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--c-text);
  line-height: 1.5;
}

.pf-check {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--c-success);
}

.pricing-card .btn {
  width: 100%;
  justify-content: center;
}

/* ── CTA Section ───────────────────────────────────────────────────────── */
.cta-section {
  background: var(--c-hero-bg);
  padding: 88px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 50% 50%, rgba(79,70,229,.2) 0%, transparent 60%);
  pointer-events: none;
}

.cta-section h2 {
  font-size: clamp(28px, 4vw, 44px);
  color: #fff;
  margin-bottom: 16px;
  position: relative;
}

.cta-section p {
  color: rgba(255,255,255,.6);
  font-size: 18px;
  margin-bottom: 36px;
  position: relative;
}

.cta-section .hero__actions { justify-content: center; position: relative; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.footer {
  background: #09090f;
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 48px 0 32px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.03em;
}

.footer__brand-text {
  color: rgba(255,255,255,.45);
  font-size: 13px;
  line-height: 1.65;
  max-width: 280px;
}

.footer__col-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  margin-bottom: 16px;
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__links a {
  font-size: 14px;
  color: rgba(255,255,255,.55);
  transition: color .15s;
}

.footer__links a:hover { color: #fff; }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.07);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer__copy {
  font-size: 13px;
  color: rgba(255,255,255,.3);
}

.footer__legal {
  display: flex;
  gap: 24px;
}

.footer__legal a {
  font-size: 13px;
  color: rgba(255,255,255,.3);
  transition: color .15s;
}

.footer__legal a:hover { color: rgba(255,255,255,.6); }

/* ── Compliance Preview ────────────────────────────────────────────────── */
.preview-block {
  background: #0d1117;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: 48px;
}

.preview-block__header {
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.preview-block__dots {
  display: flex;
  gap: 6px;
}

.preview-block__dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.preview-block__body {
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.preview-col__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  margin-bottom: 12px;
}

.preview-col__input {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r-sm);
  padding: 14px;
  height: 160px;
  font-size: 12px;
  color: rgba(255,255,255,.55);
  line-height: 1.6;
  overflow: hidden;
}

.preview-col__output {
  background: rgba(16,185,129,.07);
  border: 1px solid rgba(16,185,129,.2);
  border-radius: var(--r-sm);
  padding: 14px;
  height: 160px;
  font-size: 12px;
  color: rgba(255,255,255,.7);
  line-height: 1.6;
  overflow: hidden;
}

.preview-flag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  margin: 2px;
}

.preview-flag--fail {
  background: rgba(220,38,38,.2);
  color: #f87171;
  border: 1px solid rgba(220,38,38,.3);
}

.preview-flag--pass {
  background: rgba(5,150,105,.2);
  color: #34d399;
  border: 1px solid rgba(5,150,105,.3);
}

/* ── Mobile ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav__links { display: none; }

  .hero { padding: 72px 0 64px; }
  .hero__stats { gap: 24px; }

  .steps {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .steps::before { display: none; }

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

  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card--featured { margin-top: 12px; }

  .preview-block__body { grid-template-columns: 1fr; }
  .preview-col__input { height: 120px; }
  .preview-col__output { height: 120px; }

  .footer__inner { grid-template-columns: 1fr; gap: 32px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }

  .section { padding: 64px 0; }
  .section__sub { margin-bottom: 40px; }

  .risk-banner { flex-direction: column; gap: 12px; }
}

@media (max-width: 480px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

/* ── Check page ────────────────────────────────────────────────────────────── */
.check-header {
  background: var(--c-hero-bg);
  border-bottom: 1px solid rgba(255,255,255,.07);
  padding: 48px 0 40px;
}

.check-header__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.check-header__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6366f1;
  margin-bottom: 10px;
}

.check-header__title {
  font-size: clamp(24px, 3.5vw, 36px);
  color: #fff;
  margin-bottom: 10px;
}

.check-header__sub {
  color: rgba(255,255,255,.55);
  font-size: 16px;
  max-width: 560px;
  line-height: 1.65;
}

.check-header__rules-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-sm);
  color: rgba(255,255,255,.5);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 4px;
}

/* ── Check body layout ─────────────────────────────────────────────────────── */
.check-body {
  background: var(--c-surface);
  min-height: calc(100vh - 200px);
  padding: 40px 0 80px;
}

.check-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

/* ── Check card ─────────────────────────────────────────────────────────────── */
.check-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 28px;
  margin-bottom: 20px;
}

.check-card__step {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.check-card__step-num {
  width: 26px;
  height: 26px;
  background: var(--c-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.check-card__step-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
}

/* ── Textarea ───────────────────────────────────────────────────────────────── */
.check-textarea {
  width: 100%;
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  color: var(--c-text);
  resize: vertical;
  transition: border-color .15s, box-shadow .15s;
  min-height: 200px;
}

.check-textarea::placeholder { color: #9ca3af; }

.check-textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}

.check-textarea-hint {
  font-size: 12px;
  color: var(--c-muted);
  margin-top: 8px;
}

/* ── State quick actions ────────────────────────────────────────────────────── */
.state-quick-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.sqb {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  color: var(--c-text);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  transition: background .12s, border-color .12s;
  line-height: 1;
}

.sqb:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.sqb--danger {
  color: var(--c-danger);
  border-color: rgba(220,38,38,.25);
  background: rgba(220,38,38,.04);
}

.sqb--danger:hover {
  background: rgba(220,38,38,.1);
  border-color: rgba(220,38,38,.5);
}

.sqb-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-muted);
  margin-left: auto;
  padding: 4px 0;
}

.sqb-count--active { color: var(--c-primary); }

/* ── State grid toggles ─────────────────────────────────────────────────────── */
.state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}

.state-toggle {
  cursor: pointer;
  display: block;
}

/* visually hidden but still focusable for keyboard users */
.state-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.state-toggle input:focus-visible + .state-toggle__body {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.25);
}

.state-toggle__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 9px 11px;
  transition: background .12s, border-color .12s, box-shadow .12s;
}

.state-toggle:hover .state-toggle__body {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.state-toggle input:checked + .state-toggle__body {
  background: rgba(79,70,229,.07);
  border-color: var(--c-primary);
  box-shadow: 0 0 0 1px var(--c-primary);
}

.state-toggle__code {
  font-size: 13px;
  font-weight: 800;
  color: var(--c-text);
  letter-spacing: 0.02em;
}

.state-toggle input:checked + .state-toggle__body .state-toggle__code {
  color: var(--c-primary);
}

.state-toggle__name {
  font-size: 11px;
  color: var(--c-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.state-toggle__upcoming {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--c-warn);
}

/* ── Check button ────────────────────────────────────────────────────────────── */
.btn-check {
  width: 100%;
  justify-content: center;
  font-size: 16px;
  padding: 14px 28px;
}

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

.check-form-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(220,38,38,.06);
  border: 1px solid rgba(220,38,38,.2);
  border-radius: var(--r-md);
  color: var(--c-danger);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 16px;
  margin-top: 12px;
}

/* ── Results panel ───────────────────────────────────────────────────────────── */
.check-results-col {
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
}

/* ── Empty / loading ─────────────────────────────────────────────────────────── */
.results-empty {
  background: var(--c-bg);
  border: 1px dashed var(--c-border-md);
  border-radius: var(--r-lg);
  padding: 56px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.results-empty__icon { color: var(--c-border-md); margin-bottom: 4px; }

.results-empty__title {
  font-size: 16px;
  font-weight: 700;
  color: #9ca3af;
}

.results-empty__sub {
  font-size: 14px;
  color: var(--c-muted);
  max-width: 260px;
  line-height: 1.6;
}

.results-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 56px 32px;
}

.results-loading__text {
  font-size: 14px;
  color: var(--c-muted);
  font-weight: 500;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--c-border);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

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

/* ── Results summary ─────────────────────────────────────────────────────────── */
.results-summary {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  margin-bottom: 16px;
}

.results-summary--fail {
  border-color: rgba(220,38,38,.3);
  background: rgba(220,38,38,.03);
}

.results-summary--pass {
  border-color: rgba(5,150,105,.3);
  background: rgba(5,150,105,.03);
}

.rs-verdict {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
  padding: 5px 12px;
  border-radius: 999px;
}

.rs-verdict--fail {
  background: rgba(220,38,38,.1);
  color: var(--c-danger);
  border: 1px solid rgba(220,38,38,.2);
}

.rs-verdict--pass {
  background: rgba(5,150,105,.1);
  color: var(--c-success);
  border: 1px solid rgba(5,150,105,.2);
}

.rs-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.rs-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rs-stat__num {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.rs-stat__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--c-muted);
}

.rs-stat--fail  .rs-stat__num { color: var(--c-danger); }
.rs-stat--pass  .rs-stat__num { color: var(--c-success); }
.rs-stat--warn  .rs-stat__num { color: var(--c-warn); }
.rs-stat--danger .rs-stat__num { color: var(--c-danger); font-size: 13px; }

/* ── Detections row ──────────────────────────────────────────────────────────── */
.results-detections {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 18px 24px;
  margin-bottom: 16px;
}

.rd-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 12px;
}

.rd-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rd-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--r-sm);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid;
}

.rd-pill--found {
  background: rgba(5,150,105,.08);
  border-color: rgba(5,150,105,.25);
  color: #065f46;
}

.rd-pill--missing {
  background: rgba(220,38,38,.06);
  border-color: rgba(220,38,38,.2);
  color: var(--c-danger);
}

.rd-pill__icon {
  font-size: 11px;
  opacity: .7;
}

.rd-pill__status {
  font-weight: 500;
  opacity: .75;
}

/* ── Section label ───────────────────────────────────────────────────────────── */
.results-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 10px;
  padding: 0 2px;
}

/* ── State result cards ──────────────────────────────────────────────────────── */
.results-states {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rstate-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 16px 18px;
  transition: box-shadow .15s;
}

.rstate-card:hover { box-shadow: var(--shadow-sm); }

.rstate-card--fail { border-left: 3px solid var(--c-danger); }
.rstate-card--pass { border-left: 3px solid var(--c-success); }

.rstate-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.rstate-card__identity {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.rstate-code {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--c-text);
}

.rstate-name {
  font-size: 13px;
  color: var(--c-muted);
  font-weight: 500;
}

.rstate-upcoming {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: rgba(217,119,6,.1);
  color: var(--c-warn);
  border: 1px solid rgba(217,119,6,.25);
  border-radius: 4px;
  padding: 1px 6px;
  vertical-align: middle;
}

.rstate-verdict {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.rstate-verdict--pass {
  background: rgba(5,150,105,.1);
  color: var(--c-success);
}

.rstate-verdict--fail {
  background: rgba(220,38,38,.1);
  color: var(--c-danger);
}

.rstate-violations {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.rstate-violation {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12.5px;
  line-height: 1.5;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  color: var(--c-danger);
  background: rgba(220,38,38,.05);
  border: 1px solid rgba(220,38,38,.12);
}

.rstate-violation--high {
  color: var(--c-warn);
  background: rgba(217,119,6,.05);
  border-color: rgba(217,119,6,.15);
}

.rstate-violation--medium {
  color: #6b7280;
  background: rgba(107,114,128,.06);
  border-color: rgba(107,114,128,.15);
}

.rstate-violation svg { flex-shrink: 0; margin-top: 2px; }

.rstate-card__meta {
  border-top: 1px solid var(--c-border);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rstate-statute {
  font-size: 11.5px;
  color: var(--c-muted);
  font-weight: 500;
  line-height: 1.5;
}

.rstate-penalty {
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.5;
}

.rstate-pra-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--c-danger);
  background: rgba(220,38,38,.07);
  border: 1px solid rgba(220,38,38,.2);
  border-radius: 4px;
  padding: 3px 8px;
  margin-top: 4px;
  width: fit-content;
}

/* ── Block generator ─────────────────────────────────────────────────────────── */
.generate-section { margin-top: 20px; }

.generate-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  font-size: 14px;
  color: var(--c-muted);
  font-weight: 500;
}

.spinner--sm { width: 18px; height: 18px; border-width: 2px; }

.generate-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(220,38,38,.06);
  border: 1px solid rgba(220,38,38,.2);
  border-radius: var(--r-md);
  color: var(--c-danger);
  font-size: 14px;
  padding: 14px 18px;
  line-height: 1.5;
}

.block-panel {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.block-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px 16px;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface);
}

.block-panel__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 5px;
}

.block-panel__sub {
  font-size: 13px;
  color: var(--c-muted);
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.block-panel__placeholder-warn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #92400e;
  font-weight: 600;
}

.block-panel__all-set {
  color: var(--c-success);
  font-weight: 600;
}

.btn-copy-block {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--c-text);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s;
  line-height: 1;
}

.btn-copy-block:hover { background: #374151; }
.btn-copy-block:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 3px; }
.btn-copy-block--copied { background: var(--c-success); }

.block-placeholder-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  padding: 11px 24px;
  font-size: 13px;
  color: #92400e;
  line-height: 1.5;
}

.block-placeholder-note svg { flex-shrink: 0; margin-top: 1px; }

.placeholder-mark {
  background: #fef08a;
  color: #713f12;
  border-radius: 3px;
  padding: 0 2px;
  font-style: normal;
}

.placeholder-mark--inline {
  background: #fef08a;
  color: #713f12;
  border-radius: 3px;
  padding: 1px 5px;
  font-weight: 600;
  font-style: normal;
}

.block-sections {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.block-section__header { margin-bottom: 10px; }

.block-section__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.block-section__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--c-text);
}

.block-section__badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.block-state-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .03em;
  background: rgba(79,70,229,.08);
  color: var(--c-primary);
  border: 1px solid rgba(79,70,229,.2);
  border-radius: 4px;
  padding: 1px 6px;
}

.block-section__note {
  font-size: 11.5px;
  color: #9ca3af;
  line-height: 1.5;
  font-style: italic;
}

.block-section__body {
  position: relative;
  background: #f8fafc;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
}

.block-text-pre {
  font-family: 'SF Mono', 'Fira Mono', 'Roboto Mono', ui-monospace, monospace;
  font-size: 12.5px;
  line-height: 1.75;
  color: #1f2937;
  padding: 14px 56px 14px 16px;
  white-space: pre-wrap;
  word-break: break-word;
  background: transparent;
  margin: 0;
}

.block-section-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--c-bg);
  border: 1px solid var(--c-border-md);
  border-radius: var(--r-sm);
  color: var(--c-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 9px;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
  white-space: nowrap;
  line-height: 1;
  font-family: inherit;
}

.block-section-copy:hover {
  background: var(--c-text);
  border-color: var(--c-text);
  color: #fff;
}

.block-section-copy:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }

.block-panel__footer {
  border-top: 1px solid var(--c-border);
  padding: 11px 24px;
  background: var(--c-surface);
}

.block-panel__footer-meta {
  font-size: 11.5px;
  color: #9ca3af;
  line-height: 1.5;
}

/* ── Check page mobile ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .check-layout {
    grid-template-columns: 1fr;
  }
  .check-results-col {
    position: static;
    max-height: none;
    overflow-y: visible;
  }
}

@media (max-width: 600px) {
  .check-header { padding: 32px 0 28px; }
  .check-card { padding: 20px 16px; }
  .state-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .rs-stats { gap: 14px; }
  .rd-pills { gap: 6px; }
  .check-body { padding: 24px 0 60px; }
}

/* ── Auth pages ───────────────────────────────────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - 60px);
  background: var(--c-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.auth-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-md);
}

.auth-card__logo {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.auth-card__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--c-text);
  text-align: center;
  margin-bottom: 8px;
}

.auth-card__sub {
  font-size: 14px;
  color: var(--c-muted);
  text-align: center;
  margin-bottom: 28px;
}

.auth-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--r-md);
  color: var(--c-danger);
  font-size: 13.5px;
  padding: 10px 14px;
  margin-bottom: 20px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
}

.auth-label-hint {
  font-weight: 400;
  color: var(--c-muted);
}

.auth-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--c-border-md);
  border-radius: var(--r-md);
  font-size: 15px;
  font-family: inherit;
  color: var(--c-text);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}

.auth-input:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}

.auth-input::placeholder { color: #9ca3af; }

.auth-submit {
  width: 100%;
  justify-content: center;
  font-size: 15px;
  padding: 12px;
  margin-top: 4px;
}

.auth-footer-text {
  font-size: 13.5px;
  color: var(--c-muted);
  text-align: center;
  margin-top: 20px;
}

.auth-legal {
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
  margin-top: 14px;
  line-height: 1.6;
}

.auth-link {
  color: var(--c-primary);
  font-weight: 500;
}

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

/* ── History page ─────────────────────────────────────────────────────────────── */
.history-page {
  min-height: calc(100vh - 60px);
  background: var(--c-surface);
  padding: 48px 0 80px;
}

.history-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.history-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 8px;
}

.history-sub {
  font-size: 14px;
  color: var(--c-muted);
  max-width: 520px;
  line-height: 1.6;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  transition: border-color .15s, box-shadow .15s;
  text-decoration: none;
  color: inherit;
}

.history-row:hover {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.08), var(--shadow-sm);
}

.history-row__left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  flex: 1;
}

.history-verdict {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.history-verdict--pass {
  background: #d1fae5;
  color: var(--c-success);
}

.history-verdict--fail {
  background: #fee2e2;
  color: var(--c-danger);
}

.history-row__meta {
  min-width: 0;
}

.history-row__hash {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--c-muted);
  margin-bottom: 4px;
}

.history-hash {
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 12px;
  background: var(--c-surface);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--c-border);
}

.history-row__states {
  font-size: 13px;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.history-row__state-count {
  color: var(--c-muted);
  font-size: 12px;
  margin-left: 4px;
}

.history-row__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.history-row__stats {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.history-stat {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.history-stat--fail   { background: #fee2e2; color: var(--c-danger); }
.history-stat--pass   { background: #d1fae5; color: var(--c-success); }
.history-stat--warn   { background: #fef3c7; color: var(--c-warn); }
.history-stat--review { background: #ede9fe; color: #7c3aed; }

.history-row__date {
  font-size: 12px;
  color: var(--c-muted);
  text-align: right;
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-row__rules {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  color: var(--c-muted);
}

.history-row__arrow {
  color: var(--c-border-md);
}

/* History empty state */
.history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 80px 24px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
}

.history-empty__icon {
  margin-bottom: 20px;
  color: var(--c-border-md);
}

.history-empty__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 8px;
}

.history-empty__sub {
  font-size: 14px;
  color: var(--c-muted);
  max-width: 400px;
  line-height: 1.6;
}

/* ── Audit record page ────────────────────────────────────────────────────────── */
.record-page {
  background: var(--c-surface);
  min-height: calc(100vh - 60px);
  padding: 32px 0 80px;
}

.record-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
}

.record-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-muted);
  transition: color .15s;
}

.record-back:hover { color: var(--c-text); }

.record-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.record-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--c-border);
}

.record-id {
  font-size: 18px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 6px;
}

.record-timestamp {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--c-muted);
}

.record-verdict {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  white-space: nowrap;
}

.record-verdict--pass { background: #d1fae5; color: var(--c-success); }
.record-verdict--fail { background: #fee2e2; color: var(--c-danger); }

.record-meta-strip {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--c-border);
  overflow-x: auto;
}

.record-meta-item {
  flex: 1;
  min-width: 120px;
  padding: 16px 20px;
  border-right: 1px solid var(--c-border);
}

.record-meta-item:last-child { border-right: none; }

.record-meta-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 4px;
}

.record-meta-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text);
}

.record-meta-value code {
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 13px;
}

.record-meta-value--danger { color: var(--c-danger); }
.record-meta-value--success { color: var(--c-success); }
.record-meta-value--warn    { color: var(--c-warn); }

.record-review-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fef3c7;
  border-bottom: 1px solid #fde68a;
  color: #92400e;
  font-size: 13.5px;
  font-weight: 500;
  padding: 12px 24px;
}

.record-section {
  padding: 24px 28px;
  border-bottom: 1px solid var(--c-border);
}

.record-section:last-child { border-bottom: none; }

.record-section__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 16px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.record-section__subtitle {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--c-muted);
}

.record-states {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.record-placeholder-note {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--r-md);
  color: #92400e;
  font-size: 13px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

.record-block-section {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 12px;
}

.record-block-section:last-child { margin-bottom: 0; }

.record-block-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--c-border);
  background: #fff;
}

.record-block-section__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
}

.record-block-section__badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.record-block-section__note {
  font-size: 12px;
  color: var(--c-muted);
  padding: 6px 14px 0;
  background: #fff;
}

.record-block-pre {
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--c-text);
  padding: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

.record-legal {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: 16px 28px;
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.6;
}

/* ── Audit save banner (in check page) ────────────────────────────────────────── */
.audit-saved-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: var(--r-md);
  padding: 12px 16px;
  margin-top: 16px;
  font-size: 13.5px;
  color: #166534;
}

.audit-saved-banner__left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.audit-saved-banner__link {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-success);
  text-decoration: underline;
  white-space: nowrap;
}

.audit-signup-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: var(--r-md);
  padding: 12px 16px;
  margin-top: 16px;
  font-size: 13.5px;
  color: #3730a3;
}

.audit-signup-banner__left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.audit-signup-banner a {
  font-weight: 600;
  color: var(--c-primary);
  text-decoration: underline;
}

/* ── History mobile ───────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .history-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .history-row__right { align-items: flex-start; }
  .history-row__date { text-align: left; }
  .record-meta-strip { flex-wrap: wrap; }
  .record-meta-item { min-width: 50%; }
  .record-states { grid-template-columns: 1fr; }
  .record-card__header { flex-direction: column; align-items: flex-start; }
}

/* ── Nav badge ───────────────────────────────────────────────────────────────── */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f59e0b;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  line-height: 1;
  vertical-align: middle;
  margin-left: 3px;
}

.nav__link--alert { color: #fbbf24 !important; }

/* ── History monitoring alert ─────────────────────────────────────────────────── */
.hist-mon-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--r-md);
  padding: 14px 20px;
  margin-bottom: 24px;
  font-size: 14px;
  color: #78350f;
}

.hist-mon-alert__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.hist-mon-alert__text {
  flex: 1;
  min-width: 0;
}

.hist-mon-alert__text strong { color: #92400e; }

.hist-mon-alert__link {
  color: var(--c-primary);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
}

.hist-mon-alert__link:hover { text-decoration: underline; }

/* ── Monitoring page ─────────────────────────────────────────────────────────── */
.mon-page {
  padding: 48px 0 80px;
  min-height: calc(100vh - 60px);
}

.mon-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

.mon-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--c-text);
  margin-bottom: 8px;
  letter-spacing: -0.025em;
}

.mon-sub {
  color: var(--c-muted);
  font-size: 15px;
  max-width: 620px;
  line-height: 1.65;
}

/* alert banner */
.mon-alert {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--r-md);
  padding: 16px 20px;
  margin-bottom: 32px;
  font-size: 14px;
  color: #78350f;
  line-height: 1.55;
}

.mon-alert__icon { flex-shrink: 0; margin-top: 2px; }
.mon-alert__body strong { color: #92400e; }

/* section */
.mon-section { margin-bottom: 12px; }

.mon-section__hd {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.mon-section__title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--c-muted);
}

.mon-section__count {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--c-muted);
  padding: 1px 8px;
}

/* records needing review */
.mon-records {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mon-record {
  background: var(--c-bg);
  border: 1px solid #fde68a;
  border-radius: var(--r-md);
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  transition: opacity .25s, transform .25s;
}

.mon-record:hover { border-color: #f59e0b; box-shadow: var(--shadow-sm); }

.mon-record__body { flex: 1; min-width: 0; }

.mon-record__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--c-muted);
}

.mon-record__num {
  font-size: 12px;
  font-weight: 700;
  color: var(--c-primary);
  background: rgba(79,70,229,.08);
  border-radius: var(--r-sm);
  padding: 2px 7px;
}

.mon-record__states { font-weight: 500; color: var(--c-text); }
.mon-record__dot { color: var(--c-border-md); }
.mon-record__ver { font-size: 12px; font-family: 'Courier New', monospace; }

.mon-record__changes {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mon-change {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  padding: 7px 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--r-sm);
}

.mon-change__state {
  font-size: 11px;
  font-weight: 700;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 4px;
  padding: 1px 6px;
  color: #92400e;
  flex-shrink: 0;
}

.mon-change__note { color: var(--c-text); flex: 1; min-width: 0; }
.mon-change__eff { font-size: 12px; color: var(--c-muted); white-space: nowrap; }

/* record actions */
.mon-record__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ok/empty state */
.mon-ok {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 64px 0 48px;
  gap: 12px;
}

.mon-ok__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--c-text);
}

.mon-ok__sub {
  font-size: 14px;
  color: var(--c-muted);
  max-width: 400px;
  line-height: 1.65;
}

/* changelog feed */
.mon-changelog {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
}

.mon-log-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--c-border);
}

.mon-log-row:last-child { border-bottom: none; }
.mon-log-row:hover { background: var(--c-surface); }

.mon-log-state {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(79,70,229,.1);
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 800;
  color: var(--c-primary);
  letter-spacing: 0.03em;
}

.mon-log-body { flex: 1; min-width: 0; }
.mon-log-note { font-size: 14px; color: var(--c-text); margin-bottom: 4px; line-height: 1.5; }
.mon-log-meta { font-size: 12px; color: var(--c-muted); }

.mon-changelog-empty {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 20px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.6;
}

.mon-changelog-empty svg { flex-shrink: 0; margin-top: 2px; }

/* small button size */
.btn-sm {
  font-size: 13px;
  padding: 7px 14px;
}

/* ghost button */
.btn-ghost {
  background: transparent;
  color: var(--c-muted);
  border: 1.5px solid var(--c-border);
}
.btn-ghost:hover {
  border-color: var(--c-border-md);
  color: var(--c-text);
  background: var(--c-surface);
}

/* monitoring mobile */
@media (max-width: 700px) {
  .mon-header { flex-direction: column; }
  .mon-record { flex-direction: column; }
  .mon-record__actions { align-self: stretch; }
  .mon-record__actions .btn { flex: 1; justify-content: center; }
}

/* ── Meter bar (check page) ──────────────────────────────────────────────── */
.meter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--r-md);
  padding: 10px 14px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.meter-bar--depleted {
  background: #fff7ed;
  border-color: #fed7aa;
}

.meter-bar__info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.meter-bar__track {
  width: 80px;
  height: 5px;
  background: #e0f2fe;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}

.meter-bar--depleted .meter-bar__track { background: #fed7aa; }

.meter-bar__fill {
  height: 100%;
  background: #0ea5e9;
  border-radius: 999px;
  transition: width .4s ease;
}

.meter-bar__fill--full { background: #f97316; }

.meter-bar__msg {
  font-size: 13px;
  color: #0369a1;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meter-bar--depleted .meter-bar__msg { color: #92400e; }

.meter-bar__cta {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--c-primary);
  padding: 5px 12px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s;
}

.meter-bar__cta:hover { background: var(--c-primary-h); }

.meter-bar__link {
  font-size: 12px;
  font-weight: 600;
  color: #0369a1;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color .15s;
}

.meter-bar__link:hover { color: #0284c7; text-decoration: underline; }
.meter-bar--depleted .meter-bar__link { color: #92400e; }

/* ── Upgrade gate panel ──────────────────────────────────────────────────── */
.upgrade-gate {
  background: #fff;
  border: 1.5px solid var(--c-border-md);
  border-radius: var(--r-xl);
  padding: 36px 32px 28px;
  text-align: center;
}

.upgrade-gate__icon {
  width: 56px;
  height: 56px;
  background: rgba(79,70,229,.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--c-primary);
}

.upgrade-gate__icon--warn {
  background: rgba(217,119,6,.1);
  color: var(--c-warn);
}

.upgrade-gate__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 10px;
}

.upgrade-gate__sub {
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.65;
  max-width: 420px;
  margin: 0 auto 24px;
}

.upgrade-gate__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.upgrade-gate__plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  text-align: left;
  border-top: 1px solid var(--c-border);
  padding-top: 24px;
  margin-top: 4px;
}

.upgrade-gate__plans:has(.upgrade-plan:only-child) {
  grid-template-columns: repeat(2, 1fr);
}

/* fallback for 2-plan gate (when only 2 cards shown) */
.upgrade-gate__plans.two-plans {
  grid-template-columns: repeat(2, 1fr);
}

.upgrade-plan {
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upgrade-plan--starter {
  border-color: var(--c-primary);
  background: rgba(79,70,229,.03);
}

.upgrade-plan__badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--c-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.upgrade-plan__tier {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.upgrade-plan__price {
  font-size: 26px;
  font-weight: 800;
  color: var(--c-text);
  letter-spacing: -0.03em;
  line-height: 1;
}

.upgrade-plan__price span {
  font-size: 14px;
  font-weight: 500;
  color: var(--c-muted);
}

.upgrade-plan__features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.upgrade-plan__features li {
  font-size: 12.5px;
  color: var(--c-text);
  padding-left: 14px;
  position: relative;
  line-height: 1.4;
}

.upgrade-plan__features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--c-success);
  font-weight: 700;
  font-size: 11px;
}

/* ── Pricing page ─────────────────────────────────────────────────────────── */
.pricing-page-hero {
  background: var(--c-hero-bg);
  padding: 72px 0 56px;
  position: relative;
  overflow: hidden;
}

.pricing-page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% -10%, rgba(79,70,229,.3) 0%, transparent 60%);
  pointer-events: none;
}

.pricing-page-hero .section__label { position: relative; }

.pricing-page-hero__title {
  font-size: clamp(30px, 4.5vw, 48px);
  color: #fff;
  max-width: 640px;
  margin-bottom: 18px;
  position: relative;
}

.pricing-page-hero__sub {
  color: rgba(255,255,255,.6);
  font-size: 17px;
  max-width: 560px;
  line-height: 1.65;
  margin-bottom: 32px;
  position: relative;
}

.pricing-page-hero__sub em {
  font-style: normal;
  color: rgba(255,255,255,.85);
  font-weight: 600;
}

.pricing-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  position: relative;
}

.pricing-trust__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,.6);
}

.pricing-card__note {
  font-size: 12px;
  color: var(--c-muted);
  text-align: center;
  margin-top: 10px;
}

/* ── Pricing why section ─────────────────────────────────────────────────── */
.pricing-why {
  margin-top: 72px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: 40px 44px;
}

.pricing-why__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 28px;
}

.pricing-why__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.pricing-why__item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.pricing-why__icon {
  width: 36px;
  height: 36px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.pricing-why__item-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 6px;
}

.pricing-why__item-text {
  font-size: 13.5px;
  color: var(--c-muted);
  line-height: 1.65;
}

/* ── FAQ section ─────────────────────────────────────────────────────────── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 760px;
}

.faq-item {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.faq-item__q {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text);
  padding: 18px 24px;
  cursor: default;
}

.faq-item__a {
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.65;
  padding: 0 24px 18px;
}

/* ── Upgrade page ────────────────────────────────────────────────────────── */
.upgrade-page {
  background: var(--c-surface);
  min-height: calc(100vh - 100px);
  padding: 48px 0 80px;
}

.upgrade-usage {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--r-lg);
  padding: 16px 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.upgrade-usage__icon { flex-shrink: 0; }

.upgrade-usage__text {
  font-size: 14px;
  color: #78350f;
  font-weight: 500;
  flex: 1;
  min-width: 200px;
}

.upgrade-usage__bar {
  width: 120px;
  height: 6px;
  background: #fde68a;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}

.upgrade-usage__fill {
  height: 100%;
  background: #f97316;
  border-radius: 999px;
}

.upgrade-page__title {
  font-size: 28px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 12px;
}

.upgrade-page__sub {
  font-size: 16px;
  color: var(--c-muted);
  max-width: 600px;
  line-height: 1.65;
  margin-bottom: 8px;
}

.upgrade-page__back {
  margin-top: 32px;
}

/* Responsive adjustments for new feature #7 elements */
@media (max-width: 768px) {
  .upgrade-gate { padding: 28px 20px 20px; }
  .upgrade-gate__plans { grid-template-columns: 1fr; }
  .meter-bar { gap: 8px; }
  .meter-bar__track { display: none; }
  .pricing-why { padding: 28px 24px; }
  .pricing-why__grid { grid-template-columns: 1fr; gap: 20px; }
  .upgrade-usage { flex-direction: column; align-items: flex-start; gap: 10px; }
  .upgrade-usage__bar { width: 100%; }
}

@media (max-width: 480px) {
  .upgrade-gate__actions { flex-direction: column; }
  .upgrade-gate__actions .btn { width: 100%; justify-content: center; }
}

/* ── Global polish layer ──────────────────────────────────────────────────── */

/* Branded text selection */
::selection {
  background: rgba(79,70,229,.18);
  color: var(--c-text);
}

/* Thin branded scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--c-border-md) transparent;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--c-border-md);
  border-radius: 999px;
  border: 2px solid var(--c-bg);
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--c-muted); }

/* Accessible keyboard focus ring for links and quick-action buttons.
   Scoped to NOT touch .btn / inputs / copy buttons, which already define
   their own focus treatment — avoids a doubled ring. */
a:focus-visible,
.sqb:focus-visible,
.faq-item__q:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* Subtle page entrance */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

body { animation: fadeIn .24s ease both; }

/* ── 404 page ─────────────────────────────────────────────────────────────── */
.notfound {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 64vh;
  padding: 48px 24px;
}

.notfound__code {
  font-size: 72px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--c-primary);
  opacity: .18;
  margin-bottom: 12px;
}

.notfound__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 10px;
}

.notfound__sub {
  font-size: 15px;
  color: var(--c-muted);
  line-height: 1.6;
  max-width: 420px;
  margin-bottom: 28px;
}

.notfound__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

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