:root {
  color-scheme: light;
  --ink: #14213d;
  --muted: #5b6472;
  --paper: #f7f9fb;
  --panel: #ffffff;
  --line: #d8dee8;
  --teal: #0f766e;
  --blue: #2563eb;
  --amber: #b45309;
  --rose: #be123c;
  --green-soft: #d8f3ed;
  --blue-soft: #dbeafe;
  --amber-soft: #fef3c7;
  --shadow: 0 18px 45px rgba(20, 33, 61, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
  letter-spacing: 0;
}

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

a:hover {
  text-decoration: underline;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(16px, 4vw, 42px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  font-weight: 760;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
}

.brand-mark.large {
  width: 48px;
  height: 48px;
  font-size: 22px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 640;
}

.workspace {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 42px;
}

.workspace.narrow {
  width: min(960px, calc(100% - 32px));
}

.workspace-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 760;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
}

p {
  margin: 0;
}

.primary-action,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 10px 15px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 720;
  cursor: pointer;
  white-space: nowrap;
}

.text-action {
  color: var(--teal);
  font-weight: 760;
}

.primary-action:hover,
button:hover {
  background: #0f766e;
  text-decoration: none;
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.metrics-strip > div,
.rank-panel,
.detail-panel,
.boundary-band,
.visual-preview,
.report-grid article,
form,
.thank-you,
.legal {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metrics-strip > div {
  padding: 16px;
}

.metric-value {
  display: block;
  font-size: 30px;
  line-height: 1;
  font-weight: 820;
}

.metric-label {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.visual-preview {
  margin: 0 0 14px;
  overflow: hidden;
  background: #111827;
}

.visual-preview img {
  display: block;
  width: 100%;
  height: clamp(160px, 22vw, 260px);
  object-fit: contain;
  background: #0f172a;
}

.control-band {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 190px 190px;
  gap: 10px;
  margin-bottom: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}

textarea {
  resize: vertical;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.82fr) minmax(420px, 1.18fr);
  gap: 14px;
}

.rank-panel,
.detail-panel {
  min-width: 0;
  padding: 16px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.panel-head a {
  color: var(--teal);
  font-size: 14px;
  font-weight: 720;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--green-soft);
  color: #0f766e;
  font-size: 12px;
  font-weight: 760;
}

.score-list {
  display: grid;
  gap: 9px;
}

.score-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #fbfdff;
}

.score-title {
  min-width: 0;
  font-weight: 760;
  line-height: 1.25;
}

.score-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.bar {
  position: relative;
  height: 8px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ebf2;
}

.bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--blue), var(--amber));
}

.score-number {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 820;
}

.detail-list {
  display: grid;
  gap: 12px;
}

.detail-item {
  border-left: 4px solid var(--teal);
  padding: 4px 0 4px 13px;
}

.detail-item h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.25;
}

.detail-item p {
  color: var(--muted);
  font-size: 14px;
}

.tag-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 12px;
  font-weight: 720;
}

.boundary-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 14px;
  padding: 18px;
  background: #fdfefe;
}

.boundary-band.compact {
  grid-template-columns: 1fr;
}

.boundary-band p {
  margin-top: 7px;
  color: var(--muted);
}

.research-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.research-links a {
  display: grid;
  gap: 6px;
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.research-links strong {
  font-size: 16px;
}

.research-links span {
  color: var(--muted);
  font-size: 14px;
}

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

.report-grid.mini {
  margin: 18px 0;
}

.report-grid article {
  position: relative;
  padding: 20px;
  min-height: 212px;
}

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

.offer-panel,
.support-risk-band {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.offer-panel {
  padding: 20px;
}

.offer-panel.warning {
  border-color: #f4c7d4;
  background: #fff8fb;
}

.offer-panel h2 {
  margin-bottom: 10px;
}

.paid-forms,
.support-risk-band {
  margin-top: 14px;
}

.form-note {
  color: var(--muted);
  font-size: 14px;
}

.checkout-status {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 14px;
}

.checkout-status[data-tone="success"] {
  border-color: #99e6cf;
  background: var(--green-soft);
  color: var(--teal);
}

.checkout-status[data-tone="warn"] {
  border-color: #f8d675;
  background: var(--amber-soft);
  color: var(--amber);
}

.checkout-status[data-tone="error"] {
  border-color: #f4c7d4;
  background: #fff1f4;
  color: var(--rose);
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink);
  line-height: 1.4;
}

.check-row input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.support-risk-band form {
  box-shadow: none;
}

.report-grid h2 {
  max-width: calc(100% - 60px);
  margin-bottom: 12px;
}

.report-grid p {
  color: var(--muted);
}

.report-grid .muted {
  margin-top: 10px;
  color: #3f5167;
  font-weight: 650;
}

.score-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 820;
}

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

form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.single-form {
  width: min(680px, 100%);
}

.hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.legal {
  padding: 22px;
}

.content-page {
  display: grid;
  gap: 18px;
}

.content-page .lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

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

.content-grid > div,
.signal-table > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.content-grid p,
.signal-table span {
  color: var(--muted);
}

ul {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

li + li {
  margin-top: 6px;
}

.signal-table {
  display: grid;
  gap: 10px;
}

.signal-table > div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.legal h1 {
  margin-bottom: 14px;
  font-size: 34px;
}

.legal p + p {
  margin-top: 12px;
}

.center-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.thank-you {
  width: min(460px, 100%);
  padding: 28px;
  text-align: center;
}

.thank-you h1 {
  margin-top: 14px;
  font-size: 36px;
}

.thank-you p {
  margin: 12px 0 20px;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(16px, 4vw, 42px);
  color: var(--muted);
  font-size: 14px;
}

.site-footer span:last-child {
  display: flex;
  gap: 14px;
}

@media (max-width: 860px) {
  .topbar,
  .workspace-head,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    flex-wrap: wrap;
  }

  .metrics-strip,
  .control-band,
  .map-layout,
  .boundary-band,
  .research-links,
  .offer-layout,
  .report-grid,
  .form-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .workspace {
    margin-top: 20px;
  }

  .primary-action {
    width: 100%;
  }

  .signal-table > div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .workspace,
  .workspace.narrow {
    width: min(100% - 20px, 1180px);
  }

  h1 {
    font-size: 32px;
  }

  .metrics-strip > div,
  .rank-panel,
  .detail-panel,
  .boundary-band,
  .report-grid article,
  form {
    padding: 14px;
  }
}
