@font-face {
  font-family: "Raleway Local";
  src: url("/fonts/raleway-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans Local";
  src: url("/fonts/source-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans Local";
  src: url("/fonts/source-sans-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --charcoal: #2d2d2d;
  --charcoal-soft: #4a4b4d;
  --orange: #f4a855;
  --orange-deep: #d98228;
  --cream: #f7f4ee;
  --paper: #fffefa;
  --line: #dad6ce;
  --muted: #6d6e70;
  --green: #3f6659;
  --red: #a83c32;
  --red-soft: #fff1ef;
  --shadow: 0 18px 50px rgba(45, 45, 45, 0.08);
  --font-heading: "Raleway Local", "Avenir Next", system-ui, sans-serif;
  --font-body: "Source Sans Local", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(circle at 10% 5%, rgba(244, 168, 85, 0.13), transparent 30rem),
    var(--cream);
}

a {
  color: var(--charcoal);
  text-decoration-color: var(--orange-deep);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--orange-deep);
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a,
input,
textarea,
select {
  outline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--orange-deep);
}

.site-header {
  min-height: 82px;
  padding: 12px clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(45, 45, 45, 0.1);
  background: rgba(255, 254, 250, 0.88);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--charcoal);
  font: 700 1.4rem/1 var(--font-heading);
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 42px;
}

.study-label {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
}

.app-shell,
.admin-shell {
  width: min(100% - 32px, 900px);
  margin: 0 auto;
  padding: clamp(36px, 7vw, 84px) 0;
}

.admin-shell {
  width: min(100% - 40px, 1320px);
  padding-top: clamp(28px, 5vw, 64px);
}

.card {
  background: var(--paper);
  border: 1px solid rgba(45, 45, 45, 0.08);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.intro-card,
.admin-card,
.prose {
  padding: clamp(28px, 6vw, 64px);
}

.survey-card {
  padding: clamp(24px, 5vw, 52px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--orange-deep);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(2.1rem, 7vw, 4.1rem);
}

h2 {
  font-size: 1.45rem;
}

.lede {
  max-width: 42rem;
  margin: 0 0 30px;
  color: var(--charcoal-soft);
  font-size: clamp(1.12rem, 2vw, 1.35rem);
}

.compact {
  max-width: 44rem;
  color: var(--charcoal-soft);
}

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

.intro-grid > div {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  padding: 18px;
  border-radius: 14px;
  background: var(--cream);
}

.intro-grid strong,
.intro-grid span:last-child {
  grid-column: 2;
}

.intro-grid span:last-child {
  color: var(--muted);
  font-size: 0.9rem;
}

.intro-icon {
  grid-row: 1 / span 2;
  color: var(--orange-deep);
  font-size: 1.5rem;
}

.fine-print {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.preview-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 10px 16px;
  border-radius: 12px;
  color: #503413;
  background: #ffedce;
  font-size: 0.9rem;
}

.progress-wrap {
  margin-bottom: 18px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.progress-track {
  height: 8px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfdbd2;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--orange);
  transition: width 240ms ease;
}

.step-heading {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.step-heading h1 {
  font-size: clamp(1.9rem, 5vw, 3rem);
}

.step-heading p {
  max-width: 46rem;
  margin: 0;
  color: var(--charcoal-soft);
}

.question {
  min-width: 0;
  margin: 0;
  padding: 32px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.question:last-of-type {
  border-bottom: 0;
}

.question legend {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 0;
  font-weight: 700;
  font-size: 1.12rem;
}

.question-number {
  min-width: 30px;
  color: var(--orange-deep);
  font-family: var(--font-heading);
}

.question-help {
  margin: 8px 0 16px 42px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.option-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0 42px;
}

.option {
  position: relative;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  background: #fff;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.option:hover {
  border-color: #b8ad9c;
  transform: translateY(-1px);
}

.option.selected {
  border-color: var(--orange-deep);
  background: #fff7e9;
}

.option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-marker {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  display: grid;
  place-items: center;
  border: 2px solid #9a968e;
  border-radius: 50%;
  background: #fff;
}

input[type="checkbox"] + .option-marker {
  border-radius: 5px;
}

.option input:checked + .option-marker {
  border-color: var(--orange-deep);
  box-shadow: inset 0 0 0 5px #fff;
  background: var(--orange-deep);
}

.text-input,
.matrix-row select,
.stack input,
.stack textarea {
  width: calc(100% - 42px);
  min-height: 52px;
  margin: 16px 0 0 42px;
  padding: 12px 14px;
  border: 1px solid #aaa59c;
  border-radius: 10px;
  color: var(--charcoal);
  background: #fff;
}

textarea.text-input {
  min-height: 120px;
  resize: vertical;
}

.text-input:focus,
.matrix-row select:focus,
.stack input:focus,
.stack textarea:focus {
  border-color: var(--orange-deep);
}

.other-field {
  margin-top: 4px;
  padding: 12px 16px 16px;
  border-left: 3px solid var(--orange);
}

.other-field label {
  display: block;
  font-weight: 700;
}

.other-field .text-input {
  width: 100%;
  margin: 8px 0 0;
}

.matrix-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0 42px;
}

.matrix-row {
  min-height: 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.55fr);
  align-items: center;
  gap: 18px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.matrix-row span {
  font-weight: 700;
}

.matrix-row select {
  width: 100%;
  min-height: 44px;
  margin: 0;
}

.selection-count {
  margin: 12px 0 0 42px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 32px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  color: #20170d;
  background: var(--orange);
}

.button-primary:hover {
  color: #20170d;
  background: #efa046;
}

.button-secondary {
  color: var(--charcoal);
  border-color: #aaa59c;
  background: #fff;
}

.button-text {
  color: var(--charcoal);
  background: transparent;
}

.button-danger {
  color: var(--red);
  border-color: #d8aaa5;
  background: #fff;
}

.button-large {
  min-height: 56px;
  margin-top: 24px;
  padding-inline: 28px;
}

.button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.notice {
  margin: 20px 0;
  padding: 14px 16px;
  border-radius: 10px;
}

.notice-error {
  color: #6f241e;
  border: 1px solid #e4b4ae;
  background: var(--red-soft);
}

.notice-info {
  color: var(--ink);
  border: 1px solid #d7cfc1;
  background: var(--cream);
}

.question.error {
  margin-inline: -14px;
  padding-inline: 14px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--red-soft), transparent 80%);
}

.field-error {
  margin: 10px 0 0 42px;
  color: var(--red);
  font-size: 0.9rem;
  font-weight: 700;
}

.success-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 50%;
  color: white;
  background: var(--green);
  font-size: 1.7rem;
  font-weight: 700;
}

.follow-up-box {
  margin: 34px 0 20px;
  padding: 24px;
  border-radius: 16px;
  background: var(--cream);
}

.follow-up-box h2 {
  margin-top: 0;
}

.stack {
  display: grid;
  gap: 18px;
}

.stack .field,
.stack > label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.stack input,
.stack textarea {
  width: 100%;
  margin: 0;
}

.admin-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.admin-login {
  width: min(100%, 700px);
  margin: 0 auto;
}

.dashboard {
  display: grid;
  gap: 20px;
}

.dashboard-hero {
  position: relative;
  min-height: 315px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 28px;
  overflow: hidden;
  padding: clamp(28px, 5vw, 60px);
  border-radius: 24px;
  color: #fffaf1;
  background:
    linear-gradient(115deg, rgba(244, 168, 85, 0.08), transparent 45%),
    var(--charcoal);
  box-shadow: var(--shadow);
}

.dashboard-hero::after {
  position: absolute;
  right: -95px;
  bottom: -210px;
  width: 520px;
  height: 520px;
  content: "";
  border: 1px solid rgba(244, 168, 85, 0.36);
  border-radius: 50%;
  box-shadow:
    0 0 0 52px rgba(244, 168, 85, 0.05),
    0 0 0 104px rgba(244, 168, 85, 0.035);
  pointer-events: none;
}

.dashboard-hero .eyebrow {
  color: var(--orange);
}

.dashboard-hero h1 {
  max-width: 760px;
  margin-bottom: 16px;
  font-size: clamp(2.5rem, 6vw, 5.6rem);
  letter-spacing: -0.045em;
}

.dashboard-lede {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 250, 241, 0.72);
  font-size: 1.08rem;
}

.dashboard-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-actions .button {
  min-height: 42px;
  color: #fffaf1;
  border-color: rgba(255, 250, 241, 0.35);
  background: transparent;
}

.mode-badge {
  padding: 9px 13px;
  border: 1px solid rgba(255, 250, 241, 0.24);
  border-radius: 999px;
  color: #fffaf1;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  font-weight: 700;
}

.mode-badge-test {
  color: #2d2012;
  border-color: transparent;
  background: var(--orange);
}

.field-signal {
  position: absolute;
  z-index: 1;
  right: clamp(28px, 5vw, 60px);
  bottom: clamp(28px, 5vw, 50px);
  width: min(440px, calc(100% - 56px));
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 4px 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 250, 241, 0.28);
}

.field-signal-kicker {
  grid-row: 1 / span 2;
  color: var(--orange);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field-signal strong {
  font: 700 1.1rem/1.2 var(--font-heading);
}

.field-signal span:last-child {
  color: rgba(255, 250, 241, 0.64);
  font-size: 0.82rem;
}

.scope-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 254, 250, 0.72);
}

.scope-switcher a {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 20px;
  color: var(--muted);
  text-decoration: none;
}

.scope-switcher a + a {
  border-left: 1px solid var(--line);
}

.scope-switcher a.active {
  color: var(--charcoal);
  background: var(--paper);
  box-shadow: inset 0 -3px 0 var(--orange-deep);
}

.scope-switcher strong {
  color: inherit;
  font: 700 1.15rem/1 var(--font-heading);
}

/* HERO: a field-ready operating switch that makes study availability unmistakable */
.study-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.55fr);
  align-items: center;
  gap: 30px;
  padding: 24px 26px;
  border: 1px solid rgba(45, 45, 45, 0.13);
  border-left: 5px solid var(--orange-deep);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 12px 36px rgba(45, 45, 45, 0.05);
}

.study-control-live {
  color: #fffaf1;
  border-color: var(--charcoal);
  border-left-color: var(--orange);
  background: var(--charcoal);
}

.study-control-state {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 15px;
}

.status-light {
  width: 13px;
  height: 13px;
  margin-top: 6px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--orange-deep);
  box-shadow: 0 0 0 1px var(--orange-deep);
}

.study-control-live .status-light {
  background: #7ad5a2;
  box-shadow:
    0 0 0 1px #7ad5a2,
    0 0 22px rgba(122, 213, 162, 0.45);
}

.study-control h2 {
  margin: 0;
  font-size: 1.3rem;
}

.study-control p {
  margin: 7px 0 0;
  color: var(--charcoal-soft);
  font-size: 0.88rem;
}

.study-control small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.75rem;
}

.study-control-live .eyebrow {
  color: var(--orange);
}

.study-control-live p,
.study-control-live small {
  color: rgba(255, 250, 241, 0.68);
}

.mode-form {
  display: grid;
  gap: 12px;
  justify-items: stretch;
}

.mode-confirm {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--charcoal-soft);
  background: var(--cream);
  font-size: 0.82rem;
  cursor: pointer;
}

.mode-confirm input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--orange-deep);
}

.mode-confirm-blocked {
  cursor: not-allowed;
  opacity: 0.58;
}

.mode-blocker {
  margin: 0 !important;
  padding: 10px 12px;
  border-radius: 9px;
  color: #6f241e !important;
  background: var(--red-soft);
  font-size: 0.78rem !important;
}

.mode-return-note {
  margin: 0 !important;
  font-size: 0.8rem !important;
}

.study-control-live .mode-form .button-secondary {
  color: #fffaf1;
  border-color: rgba(255, 250, 241, 0.4);
  background: transparent;
}

.link-section {
  overflow: hidden;
}

.link-list {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.link-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(190px, 0.65fr) minmax(320px, 1.8fr) minmax(82px, auto);
  align-items: center;
  gap: 18px;
  padding: 15px 17px;
  background: #fff;
}

.link-row + .link-row {
  border-top: 1px solid var(--line);
}

.link-row-preview {
  background: #fff7e9;
}

.link-identity,
.link-count {
  display: grid;
}

.link-identity > span {
  font-weight: 700;
}

.link-identity small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.73rem;
}

.copy-field {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.copy-field input {
  min-width: 0;
  height: 42px;
  padding: 9px 12px;
  overflow: hidden;
  border: 1px solid #bcb6ac;
  border-right: 0;
  border-radius: 9px 0 0 9px;
  color: var(--charcoal-soft);
  background: var(--cream);
  font-size: 0.76rem;
  text-overflow: ellipsis;
}

.copy-field .button {
  min-height: 42px;
  padding: 8px 15px;
  border-radius: 0 9px 9px 0;
}

.copy-button.copied {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.link-count {
  justify-items: end;
}

.link-count strong {
  font: 700 1.15rem/1 var(--font-heading);
}

.link-count span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.7rem;
}

.link-footnote {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.sample-warning {
  display: flex;
  align-items: baseline;
  gap: 10px 14px;
  padding: 15px 18px;
  border: 1px solid #e1b66e;
  border-radius: 13px;
  color: #503413;
  background: #ffedce;
}

.sample-warning span {
  color: #705433;
}

.sample-warning-neutral {
  border-color: var(--line);
  color: var(--charcoal);
  background: rgba(255, 254, 250, 0.72);
}

.sample-warning-neutral span {
  color: var(--muted);
}

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

.metric-card,
.signal-card,
.panel,
.dashboard-section,
.empty-state {
  border: 1px solid rgba(45, 45, 45, 0.09);
  background: var(--paper);
  box-shadow: 0 12px 36px rgba(45, 45, 45, 0.055);
}

.metric-card,
.signal-card {
  min-width: 0;
  display: grid;
  align-content: start;
  padding: 22px;
  border-radius: 16px;
}

.metric-card > span,
.signal-card > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.metric-card strong,
.signal-card strong {
  margin: 11px 0 8px;
  font: 700 clamp(1.85rem, 4vw, 3.1rem)/1 var(--font-heading);
  letter-spacing: -0.04em;
}

.metric-card small,
.signal-card small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.dashboard-section {
  padding: clamp(24px, 4vw, 42px);
  border-radius: 20px;
}

.section-heading,
.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.section-heading {
  margin-bottom: 26px;
}

.section-heading h2,
.panel-heading h2,
.panel-heading h3 {
  margin: 0;
}

.section-heading > p {
  max-width: 460px;
  margin: 4px 0 0;
  color: var(--muted);
  text-align: right;
  font-size: 0.88rem;
}

.chart-grid,
.dashboard-lower-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  min-width: 0;
  padding: 24px;
  border-radius: 16px;
  box-shadow: none;
}

.panel-heading {
  min-height: 66px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h3 {
  font-size: 1.08rem;
}

.panel-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.panel-n {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.bar-list {
  display: grid;
  gap: 15px;
  margin-top: 20px;
}

.bar-row {
  min-width: 0;
}

.bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 7px;
  font-size: 0.83rem;
}

.bar-meta span {
  min-width: 0;
  color: var(--charcoal-soft);
}

.bar-meta strong {
  flex: 0 0 auto;
  font-size: 0.78rem;
}

.bar-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #ece8e0;
}

.bar-track span {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: var(--orange-deep);
}

.dashboard-lower-grid {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.response-notes {
  max-height: 490px;
  display: grid;
  gap: 0;
  overflow: auto;
  margin-top: 6px;
}

.response-notes article {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.response-notes article:last-child {
  border-bottom: 0;
}

.response-notes span {
  color: var(--orange-deep);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.response-notes p {
  margin: 7px 0 8px;
  color: var(--charcoal-soft);
}

.response-notes small,
.empty-note {
  color: var(--muted);
  font-size: 0.78rem;
}

.empty-state {
  min-height: 310px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}

.empty-state h2,
.empty-state p {
  margin: 8px 0 0;
}

.empty-state > p:last-child {
  max-width: 470px;
  color: var(--muted);
}

.empty-route {
  width: 190px;
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}

.empty-route::before,
.empty-route::after {
  height: 1px;
  flex: 1;
  content: "";
  background: var(--line);
}

.empty-route span {
  width: 9px;
  height: 9px;
  margin: 0 8px;
  border: 2px solid var(--orange-deep);
  border-radius: 50%;
  background: var(--paper);
}

.data-section {
  margin-top: 6px;
}

.export-groups {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 18px;
}

.export-groups > div {
  padding: 22px;
  border-radius: 14px;
  background: var(--cream);
}

.export-groups h3 {
  margin: 0;
  font-size: 1rem;
}

.export-groups p {
  margin: 7px 0 18px;
  color: var(--muted);
  font-size: 0.82rem;
}

.export-groups .export-list {
  margin: 0;
}

.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}

.danger-zone div {
  display: grid;
}

.danger-zone span {
  color: var(--muted);
  font-size: 0.8rem;
}

.admin-heading h1 {
  font-size: 2.4rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 28px 0;
}

.stats > div {
  display: grid;
  padding: 18px;
  border-radius: 12px;
  background: var(--cream);
}

.stats strong {
  font: 700 2rem/1 var(--font-heading);
}

.stats span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.85rem;
}

.export-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.site-footer {
  min-height: 76px;
  padding: 20px clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px 26px;
  color: var(--muted);
  font-size: 0.85rem;
}

.loading-card {
  display: grid;
  place-items: center;
  min-height: 220px;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #ded8cd;
  border-top-color: var(--orange-deep);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

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

@media (max-width: 700px) {
  html {
    font-size: 16px;
  }

  .site-header {
    min-height: 70px;
  }

  .brand img {
    width: 29px;
    height: 36px;
  }

  .study-label {
    max-width: 130px;
    text-align: right;
  }

  .app-shell,
  .admin-shell {
    width: min(100% - 20px, 900px);
    padding: 24px 0 46px;
  }

  .card {
    border-radius: 16px;
  }

  .intro-grid,
  .stats {
    grid-template-columns: 1fr;
  }

  .question-help,
  .option-list,
  .matrix-list,
  .selection-count,
  .text-input,
  .field-error {
    width: 100%;
    margin-left: 0;
  }

  .matrix-row {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .form-actions .button {
    width: 100%;
  }

  .admin-heading {
    display: grid;
  }

  .admin-shell {
    width: min(100% - 20px, 1320px);
  }

  .dashboard-hero {
    min-height: 430px;
    grid-template-columns: 1fr;
    padding: 26px;
  }

  .dashboard-actions {
    align-items: flex-start;
    justify-content: space-between;
  }

  .field-signal {
    right: 26px;
    bottom: 28px;
    width: calc(100% - 52px);
    grid-template-columns: 1fr;
  }

  .field-signal-kicker {
    grid-row: auto;
  }

  .scope-switcher,
  .study-control,
  .metric-grid,
  .signal-grid,
  .chart-grid,
  .dashboard-lower-grid,
  .export-groups {
    grid-template-columns: 1fr;
  }

  .study-control {
    align-items: stretch;
    padding: 22px;
  }

  .link-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .link-count {
    grid-template-columns: auto 1fr;
    justify-items: start;
    align-items: baseline;
    gap: 6px;
  }

  .scope-switcher a + a {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .sample-warning,
  .section-heading,
  .panel-heading,
  .danger-zone {
    display: grid;
  }

  .section-heading > p {
    text-align: left;
  }

  .dashboard-section {
    padding: 22px;
  }

  .panel {
    padding: 20px;
  }
}

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