:root {
  --paper: #E9EDEF;
  --card: #F6F8F9;
  --ink: #0F1E33;
  --muted: #4A5A6E;
  --line: #B9C4CD;
  --grid: rgba(15, 30, 51, .06);
  --signal: #F2B705;
  --on-signal: #0F1E33;
  --route: #2552C9;
  --ok: #2E7D4F;
  --warn: #9A6200;
  --alarm: #B42F25;
  --t1: #14317F; --t2: #2552C9; --t3: #4C78DE; --t4: #86A5E8; --t5: #B8CAF0; --t6: #D3DAE2;
  --display: "Archivo", system-ui, sans-serif;
  --body: "Archivo", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0D1724; --card: #13202F; --ink: #E6ECF1; --muted: #9AA9BA; --line: #2D3D51;
    --grid: rgba(230, 236, 241, .05); --route: #8DB0FF; --ok: #5FBF85; --warn: #E0A43A; --alarm: #FF7A6E;
    --t1: #B8CAF0; --t2: #86A5E8; --t3: #5A84E0; --t4: #3A62BF; --t5: #2A4785; --t6: #2D3D51;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0D1724; --card: #13202F; --ink: #E6ECF1; --muted: #9AA9BA; --line: #2D3D51;
  --grid: rgba(230, 236, 241, .05); --route: #8DB0FF; --ok: #5FBF85; --warn: #E0A43A; --alarm: #FF7A6E;
  --t1: #B8CAF0; --t2: #86A5E8; --t3: #5A84E0; --t4: #3A62BF; --t5: #2A4785; --t6: #2D3D51;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.55 var(--body); font-variation-settings: "wdth" 100;
}
a { color: var(--route); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--route); outline-offset: 2px; }
code, .num { font-family: var(--mono); font-size: .92em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--signal); color: var(--on-signal); padding: 8px 12px; z-index: 10; }
.skip:focus { top: 12px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 6.4vw, 4.6rem); font-weight: 820; font-variation-settings: "wdth" 125; max-width: 15ch; letter-spacing: -.025em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 780; font-variation-settings: "wdth" 118; }
h3 { font-size: 1.15rem; font-weight: 750; font-variation-settings: "wdth" 112; }
.eyebrow { font: 500 .78rem/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 14px; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 60ch; margin: 18px 0 0; }
.note, .help { color: var(--muted); font-size: .9rem; margin: 8px 0 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: var(--radius); border: 2px solid transparent; font: 700 .95rem/1 var(--body);
  font-variation-settings: "wdth" 108; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .12s ease, background-color .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn-signal { background: var(--signal); color: var(--on-signal); }
.btn-signal:hover { background: #FFC524; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-line:hover { border-color: var(--ink); }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 1.05rem; }

.top, main > section, .foot { width: min(1120px, 100% - 32px); margin-inline: auto; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 1.05rem/1 var(--display); font-variation-settings: "wdth" 115; }
.brand b { font-weight: 850; }
.brand svg circle { fill: var(--ink); }
.brand svg circle:nth-child(2) { fill: var(--signal); }
.brand svg path { stroke: var(--ink); stroke-width: 1.6; fill: none; }
.top nav { display: flex; align-items: center; gap: 22px; }
.top nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; }
.top nav a:not(.btn):hover { text-decoration: underline; }
@media (max-width: 640px) { .top nav a:not(.btn) { display: none; } .top .btn { min-height: 40px; padding: 0 12px; font-size: .85rem; } }

/* Hero: survey sheet */
.hero {
  position: relative; padding: clamp(36px, 7vw, 84px) clamp(16px, 4vw, 48px) 40px; margin-top: 8px;
  border: 1px solid var(--line); border-radius: 10px; background-color: var(--card);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
}
.search { display: flex; gap: 10px; margin-top: 32px; max-width: 680px; }
.search input {
  flex: 1; min-width: 0; min-height: 56px; padding: 0 18px; font: 500 1.15rem var(--mono);
  color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius);
}
.search input::placeholder { color: var(--muted); opacity: .7; }
.search .btn { min-height: 56px; padding: 0 24px; font-size: 1.05rem; }
@media (max-width: 480px) { .search { flex-direction: column; } }

/* Signature: the log-rank ladder */
.ladder { margin: 44px 0 0; max-width: 900px; }
.ladder-scale { position: relative; container-type: inline-size; height: 18px; border: 2px solid var(--ink); border-radius: 3px; background:
  repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 10%); }
.ladder-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ink); transition: width .9s cubic-bezier(.2, .7, .2, 1); }
.ladder-marker { position: absolute; top: -10px; bottom: -10px; left: 0; width: 4px; margin-left: -2px; background: var(--signal); box-shadow: 0 0 0 2px var(--ink); transition: left .9s cubic-bezier(.2, .7, .2, 1); }
.ladder-marker span {
  /* Shift by --a% of its own width: left-aligned at 0, right-aligned at 100, so it never leaves the scale. */
  position: absolute; bottom: calc(100% + 6px); left: 2px; transform: translateX(calc(var(--a, 50) * -1%));
  transition: transform .9s cubic-bezier(.2, .7, .2, 1);
  white-space: nowrap; max-width: 100cqw; overflow: hidden; text-overflow: ellipsis;
  background: var(--ink); color: var(--paper); font: 600 .78rem/1 var(--mono); padding: 5px 7px; border-radius: 3px;
}
.ladder-ticks { position: relative; list-style: none; margin: 0; padding: 0; height: 44px; }
.ladder-ticks li { position: absolute; top: 6px; transform: translateX(-50%); text-align: center; font-family: var(--mono); line-height: 1.25; }
.ladder-ticks li:nth-child(1) { left: 0; transform: none; text-align: left; }
.ladder-ticks li:nth-child(2) { left: 25%; }
.ladder-ticks li:nth-child(3) { left: 50%; }
.ladder-ticks li:nth-child(4) { left: 75%; }
.ladder-ticks li:nth-child(5) { left: 100%; transform: translateX(-100%); text-align: right; }
.ladder-ticks b { display: block; font-size: .85rem; }
.ladder-ticks span { display: block; font-size: .72rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 560px) { .ladder-ticks li:nth-child(2n) span { display: none; } }
.ladder figcaption { color: var(--muted); font-size: .88rem; max-width: 70ch; margin-top: 8px; }

.status:not(:empty) { margin-top: 22px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper); }
.status[data-kind="error"] { border-color: var(--alarm); border-left-width: 5px; }
.status[data-kind="busy"]::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 10px; border-radius: 50%; background: var(--signal); animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .25; } }
.status[data-kind="ok"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; padding: 0; border: 0; }

/* Report */
.report { padding: 48px 0 8px; outline: none; }
.r-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 18px; }
.r-head h2 { font-family: var(--mono); font-weight: 500; font-variation-settings: normal; letter-spacing: -.02em; overflow-wrap: anywhere; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 20px; margin: 0; }
.stats div { padding: 20px 0; border-bottom: 1px solid var(--line); }
.stats dt { font-size: .82rem; color: var(--muted); }
.stats dd { margin: 4px 0 0; font: 500 1.6rem/1.1 var(--mono); }
.stats dd small { display: block; font: 400 .78rem var(--body); color: var(--muted); margin-top: 4px; }
.stats .lead { grid-column: span 2; }
.stats .lead dd { font-family: var(--display); font-weight: 850; font-size: 3rem; font-variation-settings: "wdth" 125; white-space: nowrap; }

.panel { margin-top: 28px; padding: 22px clamp(16px, 3vw, 28px); background: var(--card); border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.panel-sub { color: var(--muted); font-size: .92rem; margin: 6px 0 16px; max-width: 70ch; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.split .panel { margin-top: 28px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.tiers { display: flex; height: 26px; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.tiers span { min-width: 2px; }
.tier-0 { background: var(--t1); } .tier-1 { background: var(--t2); } .tier-2 { background: var(--t3); }
.tier-3 { background: var(--t4); } .tier-4 { background: var(--t5); } .tier-5 { background: var(--t6); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin: 12px 0 0; font-size: .88rem; }
.legend li { display: flex; align-items: center; gap: 7px; }
.legend i { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
.legend .num { color: var(--muted); }
.profile-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 28px; margin-top: 26px; }
@media (max-width: 860px) { .profile-grid { grid-template-columns: 1fr; } }
.profile-grid h4 { margin: 0 0 10px; font-size: .78rem; font-family: var(--mono); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bars li { display: grid; grid-template-columns: 5.5em 1fr 4.5em; align-items: center; gap: 8px; font-size: .88rem; }
.bars .bar { height: 10px; background: var(--paper); border-radius: 2px; overflow: hidden; }
.bars .bar i { display: block; height: 100%; background: var(--t2); }
.bars .num { text-align: right; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.chip { font: 500 .78rem/1 var(--mono); padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.risk { display: inline-block; font: 700 .85rem/1 var(--body); text-transform: uppercase; letter-spacing: .06em; padding: 6px 10px; border-radius: 4px; color: var(--paper); }
.risk-low { background: var(--ok); } .risk-medium { background: var(--warn); } .risk-high { background: var(--alarm); }
.kv { display: grid; grid-template-columns: auto auto; justify-content: start; gap: 6px 18px; margin: 12px 0 0; font-size: .9rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-family: var(--mono); }

.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font: 500 .74rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 8px 8px 0; border-bottom: 1px solid var(--line); }
td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--grid); vertical-align: middle; }
td.dom { font-family: var(--mono); overflow-wrap: anywhere; }
td.dom a { color: var(--ink); text-decoration: none; }
td.dom a:hover { color: var(--route); text-decoration: underline; }
th.r, td.r { text-align: right; font-family: var(--mono); }
.auth { display: inline-flex; align-items: center; gap: 8px; }
.auth i { width: 44px; height: 6px; background: var(--paper); border-radius: 3px; overflow: hidden; position: relative; }
.auth i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w, 0); background: var(--ink); }

.changes { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 12px; }
@media (max-width: 860px) { .changes { grid-template-columns: 1fr; } }
.delta { font: 500 1.5rem var(--mono); }
.delta.up { color: var(--ok); } .delta.down { color: var(--alarm); }

.gap-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.gap-form fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; flex: 1; }
.gap-form label { display: grid; gap: 4px; font-size: .82rem; color: var(--muted); flex: 1 1 180px; }
.gap-form input { min-height: 44px; padding: 0 12px; font: 500 .95rem var(--mono); color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius); }
.gap-form input:focus { border-color: var(--ink); }
#r-gap table { margin-top: 18px; }

.upsell { margin-top: 28px; display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 22px clamp(16px, 3vw, 28px); border: 2px dashed var(--ink); border-radius: 10px; }
.upsell p { margin: 0; max-width: 70ch; }

/* Suite */
.suite { padding: clamp(56px, 9vw, 110px) 0 0; }
.suite-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 40px; border-top: 2px solid var(--ink); }
.suite-grid article { padding: 22px 22px 26px 0; border-bottom: 1px solid var(--line); }
.suite-grid article:not(:nth-child(3n)) { border-right: 1px solid var(--line); margin-right: 22px; }
@media (max-width: 900px) {
  .suite-grid { grid-template-columns: 1fr 1fr; }
  .suite-grid article:not(:nth-child(3n)) { border-right: 0; margin-right: 0; }
  .suite-grid article:nth-child(odd) { border-right: 1px solid var(--line); margin-right: 22px; }
}
@media (max-width: 600px) { .suite-grid { grid-template-columns: 1fr; } .suite-grid article:nth-child(odd) { border-right: 0; margin-right: 0; } }
.suite-grid ul { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; font-size: .93rem; }
.suite-grid li { padding-left: 16px; position: relative; }
.suite-grid li::before { content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 1.5px var(--ink); }
.suite-cta { margin: 36px 0 0; }
.suite-cta-wrap {
  margin: 36px 0 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.foot { margin-top: 80px; padding: 22px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }

/* Progress Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 30, 51, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
}
:root[data-theme="dark"] .modal-backdrop,
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .modal-backdrop {
    background: rgba(5, 10, 18, 0.78);
  }
}
.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  width: 100%;
  max-width: 480px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: clamp(20px, 4vw, 28px);
  box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--line);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop.is-open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 600 0.76rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 9px;
  border-radius: 4px;
  background: rgba(37, 82, 201, 0.1);
  color: var(--route);
  border: 1px solid var(--route);
}
.modal-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  animation: pulse-dot 1.2s ease-in-out infinite alternate;
}
@keyframes pulse-dot {
  from { opacity: 0.3; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1.2); }
}

.modal-close {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.modal-close:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--ink);
}

.pm-title {
  font-size: 1.35rem;
  font-weight: 780;
  margin: 0 0 6px;
  letter-spacing: -0.015em;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.pm-domain-text {
  font-family: var(--mono);
  color: var(--route);
}
.pm-desc {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 20px;
  line-height: 1.4;
}

/* Progress Bar */
.pm-bar-wrap {
  margin: 0 0 20px;
}
.pm-bar {
  height: 9px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.pm-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--route), var(--signal));
  border-radius: 6px;
  transition: width 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
  position: relative;
}
.pm-bar-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: bar-shimmer 1.8s infinite;
}
@keyframes bar-shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.pm-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 0.82rem;
}
.pm-step-text {
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 10px;
}
.pm-pct {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
}

/* Steps list */
.pm-steps {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.pm-step-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--muted);
  transition: color 0.2s ease, opacity 0.2s ease;
  opacity: 0.65;
}
.pm-step-item.is-active {
  color: var(--ink);
  font-weight: 600;
  opacity: 1;
}
.pm-step-item.is-done {
  color: var(--ink);
  opacity: 0.95;
}

.pm-step-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pm-step-label {
  line-height: 1.25;
}
.pm-step-sub {
  font-size: 0.74rem;
  color: var(--route);
  font-family: var(--mono);
  font-weight: 500;
  display: none;
  animation: fade-sub 0.3s ease;
}
@keyframes fade-sub {
  from { opacity: 0; transform: translateY(-2px); }
  to { opacity: 1; transform: translateY(0); }
}
.pm-step-item.is-active .pm-step-sub {
  display: block;
}
.pm-step-item.is-done .pm-step-sub {
  display: none;
}

.pm-step-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  position: relative;
  box-sizing: border-box;
  margin-top: 1px;
}
.pm-step-item.is-active .pm-step-icon {
  border: 2px solid rgba(37, 82, 201, 0.2);
  border-top-color: var(--route);
  border-right-color: var(--route);
  background: transparent;
  box-shadow: 0 0 10px rgba(37, 82, 201, 0.25);
  animation: step-spin 0.8s linear infinite;
}
@keyframes step-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.pm-step-item.is-active .pm-step-icon::before {
  content: "";
  display: none;
}
.pm-step-item.is-done .pm-step-icon {
  animation: pop-check 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid var(--ok);
  background: var(--ok);
  box-shadow: none;
}
@keyframes pop-check {
  0% { transform: scale(0.6); }
  60% { transform: scale(1.18); }
  100% { transform: scale(1); }
}
.pm-step-item.is-done .pm-step-icon::before {
  content: "✓";
  display: block;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}

.pm-foot {
  margin-top: 14px;
  text-align: center;
}
.pm-hint {
  font-size: 0.76rem;
  color: var(--muted);
  font-family: var(--mono);
  transition: color 0.3s ease;
}
.pm-hint.is-deep {
  color: var(--warn);
  font-weight: 600;
  animation: pulse-hint 1.4s ease-in-out infinite alternate;
}
@keyframes pulse-hint {
  from { opacity: 0.75; }
  to { opacity: 1; }
}

/* Sample Report Modal */
.sample-modal-card {
  max-width: 1040px;
  max-height: 92vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 24px clamp(16px, 3vw, 28px);
}
.srm-header { margin: 4px 0 16px; }
.srm-title {
  font-size: 1.45rem;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -.02em;
}
.srm-desc {
  font-size: .88rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
  max-width: 86ch;
}

/* Tabs */
.srm-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--line);
  padding-bottom: 0;
  margin-bottom: 14px;
  overflow-x: auto;
}
.srm-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font: 600 .86rem var(--body);
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s ease;
}
.srm-tab:hover { color: var(--ink); }
.srm-tab.is-active {
  color: var(--route);
  border-bottom-color: var(--route);
}
.srm-tab-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  font: 700 .7rem var(--mono);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.srm-tab.is-active .srm-tab-num {
  background: var(--route);
  border-color: var(--route);
  color: #fff;
}

/* Dynamic Benefit Box */
.srm-benefit-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.srm-benefit-header {
  margin-bottom: 12px;
}
.srm-benefit-badge {
  display: inline-block;
  font: 700 .72rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(37, 82, 201, 0.1);
  color: var(--route);
  border: 1px solid var(--route);
  margin-bottom: 6px;
}
.srm-benefit-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 6px;
  line-height: 1.3;
}
.srm-benefit-desc {
  font-size: .86rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}
.srm-benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 768px) {
  .srm-benefit-grid { grid-template-columns: 1fr; }
}
.srm-benefit-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
}
.srm-benefit-item-icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.srm-benefit-item-body b {
  display: block;
  font-size: .82rem;
  color: var(--ink);
  margin-bottom: 2px;
}
.srm-benefit-item-body span {
  display: block;
  font-size: .76rem;
  color: var(--muted);
  line-height: 1.35;
}

/* Image viewer */
.srm-view-container {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.04);
  margin-bottom: 16px;
}
.srm-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  font-size: .78rem;
  flex-wrap: wrap;
  gap: 8px;
}
.srm-active-pill {
  font-weight: 600;
  color: var(--ink);
  font-family: var(--mono);
}
.srm-zoom-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--paper);
  color: var(--route);
  border: 1.5px solid var(--route);
  padding: 4px 10px;
  border-radius: 5px;
  font: 700 .76rem var(--mono);
  cursor: pointer;
  transition: all .15s ease;
}
.srm-zoom-trigger-btn:hover {
  background: var(--route);
  color: #fff;
}
.srm-frame {
  position: relative;
  max-height: 480px;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--paper);
  cursor: zoom-in;
}
.srm-frame-overlay {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 5;
  pointer-events: none;
}
.srm-overlay-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 5px 12px;
  font: 600 .75rem var(--mono);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: transform .2s ease;
}
.srm-frame:hover .srm-overlay-pill {
  transform: scale(1.04);
}
.srm-img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity .2s ease;
}

/* Comparison Section */
.srm-comparison-section {
  margin: 18px 0 20px;
}
.srm-comp-title {
  font-size: 1.15rem;
  font-weight: 820;
  color: var(--ink);
  margin: 0 0 12px;
  letter-spacing: -.01em;
}
.srm-comp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 768px) {
  .srm-comp-grid { grid-template-columns: 1fr; gap: 14px; }
}
.srm-comp-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
}
.srm-comp-free {
  background: var(--paper);
  border: 1px solid var(--line);
  opacity: .92;
}
.srm-comp-pro {
  border: 2px solid var(--route);
  border-top: 4px solid var(--route);
  background: var(--card);
  box-shadow: 0 8px 24px rgba(37, 82, 201, 0.12);
  position: relative;
}
.srm-comp-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.srm-comp-tier {
  font: 750 .76rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}
.srm-comp-tier.is-highlight {
  color: #fff;
  background: var(--route);
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 800;
  font-size: .78rem;
  box-shadow: 0 2px 6px rgba(37, 82, 201, 0.35);
  letter-spacing: .03em;
}
.srm-comp-domain {
  font: 600 .8rem var(--mono);
  color: var(--muted);
}
.srm-comp-pro .srm-comp-domain {
  color: var(--route);
  font-weight: 750;
}
.srm-comp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.srm-comp-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .85rem;
  line-height: 1.45;
  color: var(--ink);
  padding: 3px 6px;
  border-radius: 6px;
  transition: background .15s ease;
}
.srm-comp-pro .srm-comp-list li:hover {
  background: rgba(37, 82, 201, 0.05);
}
.srm-comp-item-text {
  flex: 1;
}
.srm-comp-item-text b {
  display: inline;
  font-weight: 750;
  color: var(--ink);
  margin-right: 4px;
}
.srm-comp-item-text span {
  display: inline;
  color: var(--ink);
  opacity: .8;
  font-size: .83rem;
}
.srm-comp-free .srm-comp-item-text span {
  color: var(--muted);
  opacity: 1;
}
.srm-comp-list li.is-missing {
  color: var(--muted);
  opacity: .75;
}
.srm-comp-list li.is-missing .srm-comp-item-text b {
  color: var(--muted);
  font-weight: 600;
}
.srm-comp-list li.is-missing .srm-comp-item-text span {
  color: var(--muted);
  opacity: .85;
}
.srm-icon-ok {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(46, 125, 79, 0.14);
  color: var(--ok);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 2px;
}
.srm-icon-no {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(180, 47, 37, 0.1);
  color: var(--alarm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Lightbox Modal */
.sample-lightbox-modal {
  z-index: 1200;
  padding: 16px;
  background: rgba(6, 11, 20, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.lightbox-dialog {
  width: 100%;
  max-width: 96vw;
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.lightbox-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.lightbox-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.lightbox-badge {
  font: 700 .72rem var(--mono);
  color: var(--route);
  background: rgba(37, 82, 201, 0.1);
  border: 1px solid var(--route);
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}
.lightbox-title {
  font-size: .95rem;
  font-weight: 780;
  color: var(--ink);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.lightbox-body {
  flex: 1;
  max-height: calc(96vh - 90px);
  overflow: auto;
  background: #090e17;
  padding: 12px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  cursor: zoom-out;
}
.lightbox-img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.lightbox-foot {
  padding: 8px 16px;
  background: var(--card);
  border-top: 1px solid var(--line);
  font: 600 .74rem var(--mono);
  color: var(--muted);
  text-align: center;
}

/* Footer */
.srm-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.srm-footer-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.srm-footer-info span {
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink);
}
.srm-footer-subnote {
  font-size: .74rem;
  color: var(--muted);
  font-family: var(--mono);
}
.srm-footer-cta {
  display: flex;
  gap: 10px;
}

/* Teaser card in report */
.sample-teaser-card {
  margin-top: 24px;
  padding: 22px clamp(16px, 3vw, 26px);
  background: var(--card);
  border: 2px dashed var(--route);
  border-radius: 10px;
}
.stc-badge {
  font: 700 .74rem var(--mono);
  color: var(--route);
  letter-spacing: .08em;
  margin-bottom: 6px;
}
.sample-teaser-card h4 {
  font-size: 1.15rem;
  font-weight: 780;
  margin: 0 0 6px;
  color: var(--ink);
}
.sample-teaser-card p {
  font-size: .9rem;
  color: var(--muted);
  margin: 0 0 16px;
  max-width: 70ch;
  line-height: 1.45;
}
.stc-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
