/* SIGNAL external demo — framework-free with centrally synced WEAVIST assets. */

* {
  box-sizing: border-box;
}

body {
  line-height: 1.5;
}

h1, h2, h3, p {
  margin: 0 0 0.75rem;
}

.card {
  margin-bottom: 1.25rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--color-border);
  background: var(--color-card);
}

.url-row,
.checkbox-group,
.checkbox-pill,
.stat,
.check-title,
.check-controls {
  display: flex;
}

.url-row {
  align-items: center;
}

.query-row {
  display: grid;
  align-items: center;
  margin-bottom: 0.5rem;
}

.remove-query-btn {
  border: 1px solid var(--color-border);
  background: white;
  color: var(--color-muted);
  cursor: pointer;
}

.remove-query-btn:hover {
  border-color: var(--color-fail);
  color: var(--color-fail);
}

.checkbox-group {
  flex-wrap: wrap;
}

.checkbox-pill {
  align-items: center;
  border: 1px solid var(--color-border);
  background: white;
  cursor: pointer;
  gap: 0.4rem;
}

.checkbox-pill input {
  margin: 0;
}

.draft-banner,
.error-banner,
.pending-banner {
  margin: 0.75rem 0;
  padding: 0.65rem 0.85rem;
  border: 1px solid;
  font-size: 0.84rem;
}

.draft-banner {
  border-color: #fde68a;
  background: #fef3c7;
  color: #92400e;
}

.error-banner {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.pending-banner {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e40af;
}

.btn-primary,
.btn-secondary {
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  color: white;
}

.btn-primary:disabled,
.btn-secondary:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.btn-primary.is-loading::before {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-right: 0.5em;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: white;
  border-radius: 50%;
  content: "";
  vertical-align: -0.1em;
  animation: spin 0.6s linear infinite;
}

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

.stat {
  flex-direction: column;
  gap: 0.2rem;
}

.badge {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  color: white;
  font-size: 0.78rem;
  font-weight: 650;
}

.priority-P0 { background: #dc2626; }
.priority-P1 { background: #ea580c; }
.priority-P2 { background: #ca8a04; }
.priority-P3 { background: #64748b; }
.priority-P4 { background: #9ca3af; }

.rung-bar-label,
.rung-accordion > summary {
  display: flex;
  justify-content: space-between;
}

.rung-bar-label .rung-score,
.rung-bar-label .unscored,
.rung-accordion > summary .rung-score {
  color: var(--color-muted);
}

.rung-bar-label .unscored {
  font-style: italic;
}

.bar-track {
  position: relative;
  overflow: hidden;
}

.bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
}

.rung-accordion {
  border-top: 1px solid var(--color-border);
}

.rung-accordion > summary,
.notes-card summary {
  cursor: pointer;
}

.check-row {
  display: grid;
  align-items: start;
  gap: 0.75rem;
}

.check-row.status-pass { border-left-color: var(--color-pass); }
.check-row.status-partial { border-left-color: var(--color-partial); }
.check-row.status-fail { border-left-color: var(--color-fail); }
.check-row.status-unknown { border-left-color: var(--color-unknown); }
.check-row.status-not-applicable {
  border-left-color: var(--color-na);
  background: var(--color-na-bg);
}

.check-title,
.check-controls {
  flex-direction: column;
}

.check-title {
  gap: 0.15rem;
}

.check-controls {
  gap: 0.4rem;
}

.check-name {
  font-size: 0.9rem;
  font-weight: 650;
}

.check-id {
  color: var(--color-muted);
  font-size: 0.78rem;
}

.notes-log {
  overflow: auto;
  max-height: 240px;
  margin-top: 0.6rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  font-size: 0.78rem;
  white-space: pre-wrap;
}

/* ---- WEAVIST external preview direction ---- */

:root {
  --ink: #39344f;
  --paper: #f3f0e9;
  --blue: #2797a0;
  --blue-light: #7fc9cf;
  --green: #64f6aa;
  --line: rgba(17, 19, 25, 0.17);
  --line-dark: rgba(255, 255, 255, 0.16);
  --muted: #656870;
  --white: #fff;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang TC", "Microsoft JhengHei", sans-serif;
  --serif: Iowan Old Style, Baskerville, "Times New Roman", "Noto Serif TC", serif;
  --color-bg: var(--paper);
  --color-card: var(--white);
  --color-border: var(--line);
  --color-text: var(--ink);
  --color-muted: var(--muted);
  --color-primary: var(--blue);
  --color-primary-dark: #2445d8;
  --radius: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  text-rendering: optimizeLegibility;
}

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

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

::selection {
  color: white;
  background: var(--blue);
}

[hidden] {
  display: none !important;
}

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 4.75rem);
  border-bottom: 1px solid var(--line);
  background: rgba(243, 240, 233, 0.96);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--ink);
  letter-spacing: 0.08em;
}

.weave-mark {
  width: 28px;
  height: 28px;
  margin-right: 0.75rem;
  object-fit: contain;
}

.brand-product {
  font-size: 0.94rem;
  font-weight: 800;
}

.brand-byline {
  margin-left: 0.7rem;
  padding-left: 0.7rem;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
}

.brand-byline b {
  color: var(--blue);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.header-actions form {
  margin: 0;
}

.preview-status {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.67rem;
  font-weight: 700;
  gap: 0.55rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.preview-status i {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(100, 246, 170, 0.18);
}

.text-button {
  min-height: 44px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
}

.app-shell {
  width: auto;
  max-width: none;
  margin: 0;
}

.setup-surface {
  display: grid;
  min-height: calc(100vh - 76px);
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.55fr);
}

.setup-intro {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 6vw, 6rem) clamp(1.5rem, 4.5vw, 5.5rem);
  background: var(--ink);
  color: white;
}

.setup-intro::after {
  position: absolute;
  right: -35%;
  bottom: -18%;
  width: 75%;
  aspect-ratio: 1;
  border: 1px solid rgba(146, 167, 255, 0.25);
  border-radius: 50%;
  box-shadow: 0 0 0 5rem rgba(49, 87, 255, 0.04),
    0 0 0 10rem rgba(49, 87, 255, 0.025);
  content: "";
}

.eyebrow {
  display: flex;
  align-items: center;
  margin: 0 0 2rem;
  color: #b8bbc4;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow > span {
  width: 7px;
  height: 7px;
  margin-right: 0.65rem;
  background: var(--blue);
}

.setup-intro h1 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(2.35rem, 4.4vw, 5rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.setup-intro h1 em {
  color: var(--blue-light);
  font-family: var(--serif);
  font-weight: 400;
}

.setup-lede {
  max-width: 470px;
  margin: 2.1rem 0 0;
  color: #b9bbc2;
  font-size: 1rem;
  line-height: 1.75;
}

.step-rail {
  position: relative;
  z-index: 1;
  display: grid;
  max-width: 470px;
  margin: clamp(4rem, 8vh, 7rem) 0 0;
  padding: 0;
  list-style: none;
}

.step-rail li {
  display: grid;
  min-height: 72px;
  align-items: center;
  border-top: 1px solid var(--line-dark);
  color: #70737c;
  grid-template-columns: 3rem 1fr auto;
}

.step-rail li:last-child {
  border-bottom: 1px solid var(--line-dark);
}

.step-rail li.is-active {
  color: white;
}

.step-rail li > span,
.section-index {
  margin: 0;
  color: var(--blue-light);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.step-rail strong {
  font-size: 0.9rem;
}

.step-rail small {
  font-size: 0.75rem;
  font-weight: 500;
}

.privacy-note {
  position: relative;
  z-index: 1;
  max-width: 420px;
  margin: 2rem 0 0;
  color: #858894;
  font-size: 0.76rem;
  line-height: 1.65;
}

.setup-panel {
  padding: clamp(2.5rem, 6vw, 6.5rem) clamp(1.5rem, 6vw, 7rem);
}

.panel-heading,
.step-heading,
.label-row,
.submit-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.panel-heading {
  margin-bottom: 2.4rem;
}

.panel-heading h2,
.step-heading h2 {
  margin: 0.45rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3vw, 2.8rem);
  font-weight: 400;
  letter-spacing: -0.03em;
}

.method-chip {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  white-space: nowrap;
}

.form-step {
  padding: 0 0 2.5rem;
}

.goal-step {
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.step-heading {
  margin-bottom: 2rem;
}

.step-heading > p {
  max-width: 280px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

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

.field {
  margin-bottom: 1.35rem;
}

.field--wide {
  grid-column: 1 / -1;
}

.field > label,
.label-row > label {
  display: block;
  margin-bottom: 0.5rem;
  color: #353840;
  font-size: 0.82rem;
  font-weight: 750;
}

.label-row {
  align-items: center;
  margin-bottom: 0.5rem;
}

.label-row > label {
  margin: 0;
}

.label-row .text-button {
  min-height: auto;
  font-size: 0.76rem;
}

.optional {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}

input[type="text"],
input[type="url"],
input[type="date"],
input[type="password"],
select {
  min-height: 48px;
  padding: 0.72rem 0.82rem;
  border: 1px solid rgba(17, 19, 25, 0.28);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  font-size: 0.92rem;
}

input:hover,
select:hover {
  border-color: var(--ink);
}

input:focus,
select:focus {
  border-color: var(--blue);
  outline: 2px solid var(--blue);
  outline-offset: 0;
}

.url-row {
  gap: 0;
}

.url-row input {
  min-height: 58px;
  padding-left: 1rem;
  background: white;
  font-size: 1rem;
}

.url-row .btn-primary {
  min-width: 230px;
}

.btn-primary,
.btn-secondary {
  min-height: 48px;
  padding: 0.72rem 1.1rem;
  border-radius: 0;
  font-size: 0.84rem;
  font-weight: 750;
  transition: background 160ms ease, border-color 160ms ease,
    color 160ms ease, transform 160ms ease;
}

.btn-primary {
  border-color: var(--blue);
  background: var(--blue);
}

.btn-primary:hover:not(:disabled) {
  background: var(--ink);
  border-color: var(--ink);
  transform: translateY(-1px);
}

.btn-secondary {
  border-color: var(--ink);
  background: transparent;
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.query-columns,
.query-row {
  grid-template-columns: minmax(220px, 2.4fr) minmax(92px, 0.7fr)
    minmax(78px, 0.6fr) minmax(120px, 0.9fr) 44px;
}

.query-columns {
  display: grid;
  padding: 0 0.4rem 0.35rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.query-row {
  gap: 0.45rem;
}

.remove-query-btn {
  width: 44px;
  height: 48px;
  border-radius: 0;
}

.checkbox-group {
  gap: 0.5rem;
}

.checkbox-pill {
  min-height: 44px;
  padding: 0.52rem 0.8rem;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.5);
  font-size: 0.78rem;
}

.checkbox-pill:has(input:checked) {
  border-color: var(--blue);
  background: rgba(49, 87, 255, 0.08);
  color: #1733b2;
}

.draft-banner,
.error-banner,
.pending-banner {
  border-radius: 0;
}

.draft-banner {
  margin-bottom: 1.75rem;
  border-color: rgba(49, 87, 255, 0.28);
  background: rgba(49, 87, 255, 0.08);
  color: #24337d;
}

.draft-banner > span {
  margin-right: 0.65rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input.draft-filled,
select.draft-filled {
  border-color: var(--blue);
  background: rgba(49, 87, 255, 0.075);
}

.field-hint {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

.submit-row {
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.submit-row p {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  font-weight: 750;
}

.submit-row div > span {
  color: var(--muted);
  font-size: 0.74rem;
}

.submit-row .btn-primary {
  min-width: 165px;
}

.manual-link {
  min-height: 44px;
  margin-top: 0.75rem;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.76rem;
}

.activity-panel {
  display: flex;
  align-items: center;
  margin: 1.25rem 0;
  padding: 1rem;
  border: 1px solid rgba(49, 87, 255, 0.3);
  background: rgba(49, 87, 255, 0.06);
  gap: 1rem;
}

.activity-mark {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 2px solid var(--blue-light);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.activity-panel strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.82rem;
}

.activity-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

/* assessment results */

.dashboard-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 6rem) clamp(1.25rem, 4vw, 4.75rem);
}

.result-header,
.section-title-row,
.export-card {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.result-header {
  margin-bottom: 2rem;
}

.result-header h1 {
  margin: 0.5rem 0 0.25rem;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.result-domain {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.dashboard-section .card {
  margin-bottom: 1.5rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.headline-card {
  display: grid;
  overflow: hidden;
  min-height: 320px;
  padding: 0 !important;
  background: var(--ink) !important;
  color: white;
  grid-template-columns: minmax(250px, 0.7fr) minmax(0, 1.3fr);
}

.score-lockup {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.75rem, 4vw, 3.5rem);
  border-right: 1px solid var(--line-dark);
}

.score-kicker {
  color: var(--blue-light);
  font-family: var(--mono);
  font-size: 0.67rem;
  font-weight: 750;
  letter-spacing: 0.13em;
}

.score-lockup strong {
  color: white;
  font-family: var(--serif);
  font-size: clamp(5rem, 10vw, 9rem);
  font-weight: 400;
  letter-spacing: -0.08em;
  line-height: 0.75;
}

.score-lockup small {
  margin-left: 0.25rem;
  color: #747782;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0;
}

.headline-summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.75rem, 4vw, 3.5rem);
}

.headline-text {
  max-width: 720px;
  margin: 0 0 2rem;
  color: white;
  font-family: var(--serif);
  font-size: clamp(1.65rem, 3.2vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.headline-card .stat-grid {
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-dark);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.headline-card .stat-label {
  color: #858894;
  font-family: var(--mono);
  font-size: 0.61rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.headline-card .stat-value {
  color: white;
  font-size: 1rem;
}

.headline-card .badge {
  align-self: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0;
  background: transparent;
  color: white;
}

.coverage-note {
  margin: 1.5rem 0 0;
  color: #9da0aa;
  font-size: 0.72rem;
  line-height: 1.55;
}

.rungs-card {
  display: grid;
  grid-template-columns: 1fr repeat(5, minmax(110px, 1fr));
  gap: 1.5rem;
}

.rungs-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
}

.rung-bar {
  margin: 0;
}

.rung-bar-label {
  min-height: 2.4rem;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.04em;
}

.bar-track {
  height: 5px;
  border-radius: 0;
  background: #e3e0d9;
}

.bar-fill {
  border-radius: 0;
}

.bar-raw {
  background: var(--blue-light);
}

.bar-gated {
  height: 2px;
  top: auto;
  background: var(--blue);
}

.signals-section {
  margin: clamp(4rem, 8vw, 7rem) 0;
}

.section-title-row {
  margin-bottom: 1.5rem;
}

.section-title-row h2,
.export-card h2 {
  margin: 0.4rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.5vw, 3.1rem);
  font-weight: 400;
  letter-spacing: -0.04em;
}

.section-support {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.55;
}

.ladder-save-copy {
  max-width: 360px;
  text-align: right;
}

.save-state {
  display: inline-flex;
  align-items: center;
  margin-top: 0.55rem;
  color: #28724a;
  font-family: var(--mono);
  font-size: 0.63rem;
  gap: 0.45rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.save-state::before {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  content: "";
}

.save-state.is-error {
  color: var(--color-fail);
}

.save-state.is-error::before {
  background: var(--color-fail);
}

.signal-list {
  border-top: 1px solid var(--ink);
}

.signal-card {
  display: grid;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 64px minmax(0, 1fr);
}

.signal-order {
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.signal-meta {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.63rem;
  gap: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.signal-meta .badge {
  border-radius: 0;
}

.signal-main h3 {
  max-width: 850px;
  margin: 0.8rem 0 0.5rem;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.7vw, 2.45rem);
  font-weight: 400;
  letter-spacing: -0.025em;
}

.signal-gap {
  max-width: 880px;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.signal-plan {
  display: grid;
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.signal-plan > div {
  padding: 1.15rem 1.25rem 0 0;
}

.signal-plan > div + div {
  padding-left: 1.25rem;
  border-left: 1px solid var(--line);
}

.signal-plan span {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.61rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signal-plan strong,
.signal-plan p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.55;
}

.signal-deps {
  margin: 1rem 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.65rem;
}

.ladder-card {
  margin-top: 4rem;
}

.rung-accordion {
  padding: 0;
  border-color: var(--line);
}

.rung-accordion:first-of-type {
  border-top: 1px solid var(--ink);
}

.rung-accordion > summary {
  min-height: 64px;
  align-items: center;
  padding: 0 0.75rem;
  font-family: var(--serif);
  font-size: 1.25rem;
}

.rung-accordion[open] > summary {
  color: var(--blue);
}

.check-list {
  margin: 0;
  padding-bottom: 1rem;
}

.check-row {
  margin: 0 0 0.45rem;
  padding: 0.9rem;
  border: 0;
  border-left: 3px solid var(--color-unknown);
  border-radius: 0;
  background: #f7f5f0;
  grid-template-columns: 1.2fr 0.9fr 1.5fr;
}

.check-evidence {
  line-height: 1.55;
}

.notes-card summary {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.notes-log {
  border-radius: 0;
  background: #eeece6;
}

.export-card {
  align-items: center;
  margin-top: 1.5rem;
}

.export-card h2 {
  font-size: 1.8rem;
}

.export-card p:last-child {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.empty-state {
  margin: 0 !important;
}

.app-footer {
  display: grid;
  min-height: 90px;
  align-items: center;
  padding: 1.5rem clamp(1.25rem, 4vw, 4.75rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  grid-template-columns: 1fr 1fr 1fr;
}

.app-footer span:nth-child(2) {
  text-align: center;
}

.app-footer a {
  justify-self: end;
  border-bottom: 1px solid var(--line);
}

/* access gate */

.access-page {
  background: var(--ink);
}

.access-shell {
  display: grid;
  max-width: none;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
}

.access-story {
  position: relative;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 5vw, 5rem);
  color: white;
}

.access-story::before,
.access-story::after {
  position: absolute;
  top: 50%;
  left: 67%;
  width: min(50vw, 640px);
  aspect-ratio: 1;
  border: 1px solid rgba(146, 167, 255, 0.22);
  border-radius: 50%;
  content: "";
  transform: translate(-50%, -50%);
}

.access-story::after {
  width: min(32vw, 400px);
  border-color: rgba(146, 167, 255, 0.38);
  box-shadow: 0 0 100px rgba(49, 87, 255, 0.16);
}

.brand--light {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  color: white;
}

.brand--light .brand-byline {
  border-color: var(--line-dark);
  color: #aeb1ba;
}

.access-copy {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: auto 0;
}

.access-copy h1 {
  margin: 0;
  font-size: clamp(3.25rem, 7vw, 7.5rem);
  letter-spacing: -0.065em;
  line-height: 0.86;
}

.access-copy h1 em {
  color: var(--blue-light);
  font-family: var(--serif);
  font-weight: 400;
}

.access-copy > p:last-child {
  max-width: 490px;
  margin: 2.5rem 0 0;
  color: #aeb1ba;
  font-size: 1rem;
  line-height: 1.7;
}

.access-signal {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  color: #858894;
  font-family: var(--mono);
  font-size: 0.6rem;
  gap: 1rem;
  letter-spacing: 0.12em;
}

.access-signal i {
  width: clamp(1.5rem, 5vw, 5rem);
  height: 1px;
  background: rgba(146, 167, 255, 0.5);
}

.access-form-panel {
  display: grid;
  align-items: center;
  padding: clamp(2rem, 6vw, 7rem);
  background: var(--paper);
}

.access-form-wrap {
  width: min(100%, 430px);
  margin: 0 auto;
}

.access-form-wrap h2 {
  margin: 0.55rem 0 1rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 400;
  letter-spacing: -0.04em;
}

.access-form-wrap > p:not(.section-index):not(.access-privacy) {
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.65;
}

.access-error {
  padding: 0.8rem;
  border-left: 3px solid var(--color-fail);
  background: #fff0ef;
  color: #8c1c18;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
  margin-top: 0.25rem;
}

.access-privacy {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  text-align: center;
}

@media (max-width: 1000px) {
  .setup-surface {
    grid-template-columns: 1fr;
  }

  .setup-intro {
    min-height: auto;
  }

  .setup-intro h1 {
    font-size: clamp(2.8rem, 8vw, 5rem);
  }

  .step-rail {
    margin-top: 3rem;
  }

  .access-shell {
    grid-template-columns: 1fr 420px;
  }

  .rungs-card {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .rungs-card h2 {
    grid-column: 1 / -1;
  }

  .headline-card {
    grid-template-columns: minmax(220px, 0.6fr) minmax(0, 1.4fr);
  }
}

@media (max-width: 760px) {
  .app-header {
    min-height: 68px;
  }

  .brand-byline,
  .preview-status,
  .query-columns {
    display: none;
  }

  .setup-intro,
  .setup-panel {
    padding: 2.25rem 1.25rem;
  }

  .setup-intro h1 {
    font-size: clamp(2.4rem, 13vw, 4rem);
  }

  .step-rail li {
    grid-template-columns: 2.5rem 1fr;
  }

  .step-rail small {
    display: none;
  }

  .panel-heading,
  .step-heading,
  .submit-row,
  .result-header,
  .section-title-row,
  .export-card {
    align-items: stretch;
    flex-direction: column;
  }

  .form-grid,
  .query-row {
    grid-template-columns: 1fr;
  }

  .field--wide {
    grid-column: auto;
  }

  .query-row {
    position: relative;
    padding: 0 52px 1rem 0;
    border-bottom: 1px solid var(--line);
  }

  .remove-query-btn {
    position: absolute;
    top: 0;
    right: 0;
  }

  .url-row {
    flex-direction: column;
    gap: 0.6rem;
  }

  .url-row .btn-primary,
  .submit-row .btn-primary {
    width: 100%;
    min-width: 0;
  }

  .app-footer {
    gap: 0.65rem;
    grid-template-columns: 1fr;
  }

  .app-footer span:nth-child(2),
  .app-footer a {
    justify-self: start;
    text-align: left;
  }

  .access-shell {
    grid-template-columns: 1fr;
  }

  .access-story {
    min-height: 46vh;
    padding: 1.5rem 1.25rem 2rem;
  }

  .access-copy h1 {
    font-size: clamp(3rem, 16vw, 5rem);
  }

  .access-signal {
    margin-top: 2.5rem;
  }

  .access-form-panel {
    padding: 3rem 1.25rem;
  }

  .dashboard-section {
    padding-top: 2.5rem;
  }

  .result-header .btn-secondary,
  .section-title-row .btn-secondary,
  .export-card .btn-secondary {
    width: 100%;
  }

  .headline-card {
    grid-template-columns: 1fr;
  }

  .score-lockup {
    min-height: 220px;
    border-right: 0;
    border-bottom: 1px solid var(--line-dark);
  }

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

  .rungs-card {
    grid-template-columns: 1fr;
  }

  .rungs-card h2 {
    grid-column: auto;
  }

  .signal-card {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .signal-meta {
    flex-wrap: wrap;
  }

  .signal-plan {
    grid-template-columns: 1fr;
  }

  .signal-plan > div + div {
    padding-left: 0;
    border-left: 0;
  }

  .check-row {
    grid-template-columns: 1fr;
  }

  .ladder-save-copy {
    max-width: none;
    text-align: left;
  }
}

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