:root {
  /* Citizen Centric design tokens */
  --color-blue: #215bb3;
  --color-blue-deep: #113d7d;
  --color-blue-hover: #174a96;
  --color-blue-soft: #eaf1fc;
  --color-copper: #c66a2f;
  --color-copper-hover: #ab5823;
  --color-copper-active: #8e4519;
  --color-navy: #15304a;
  --color-surface: #ffffff;
  --color-surface-muted: #f5f8fc;
  --color-page: #f4f7fb;
  --color-border: #d7e0ea;
  --color-border-strong: #c7d4e5;
  --color-text: #15304a;
  --color-text-muted: #5f7083;
  --color-success: #246e57;
  --color-warning: #8b5b11;
  --color-error: #b83d3d;
  --color-info: #1f5d91;
  --color-focus: rgba(33, 91, 179, 0.24);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;

  --type-xs: 0.75rem;
  --type-sm: 0.875rem;
  --type-base: 1rem;
  --type-md: 1.08rem;
  --type-lg: 1.25rem;
  --type-xl: clamp(1.75rem, 2.4vw, 2.15rem);

  --radius-1: 10px;
  --radius-2: 14px;
  --radius-3: 18px;
  --radius-pill: 999px;

  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.72) inset;
  --shadow-2: 0 8px 24px rgba(23, 50, 84, 0.06);
  --shadow-3: 0 16px 40px rgba(23, 50, 84, 0.08);

  --control-height: 42px;
  --control-height-compact: 36px;
  --content-width: 1360px;
  --content-width-narrow: 980px;

  --transition-fast: 120ms ease;
  --transition-standard: 160ms ease;

  --bg: var(--color-page);
  --surface: var(--color-surface);
  --surface-muted: var(--color-surface-muted);
  --border: var(--color-border);
  --text: var(--color-text);
  --text-muted: var(--color-text-muted);
  --brand-950: var(--color-blue-deep);
  --brand-900: var(--color-blue-hover);
  --brand-800: var(--color-blue);
  --brand-700: #2f6cd0;
  --brand-soft: var(--color-blue-soft);
  --accent: var(--color-copper);
  --accent-hover: var(--color-copper-hover);
  --danger: var(--color-error);
  --success: var(--color-success);
  --shadow: var(--shadow-2);
  --radius-sm: var(--radius-1);
  --radius-md: var(--radius-2);
  --radius-lg: var(--radius-3);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: radial-gradient(circle at 0% 0%, #f8fbff 0, var(--bg) 42%), var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Aptos", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: var(--brand-800);
  text-underline-offset: 2px;
}

a:hover {
  color: var(--brand-950);
}

.app-shell {
  min-height: 100vh;
}

.app-header {
  min-height: 80px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--space-5);
  align-items: center;
  padding: var(--space-3) var(--space-6);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-logo {
  width: 42px;
  height: auto;
  display: block;
  background: transparent;
  object-fit: contain;
}

.public-brand .brand-logo {
  width: 34px;
}

.public-brand .brand-logo--wordmark {
  width: min(320px, 100%);
}

.brand strong {
  display: block;
  font-size: var(--type-lg);
  line-height: 1.1;
  font-weight: 700;
  color: var(--text);
}

.brand small {
  display: block;
  font-size: var(--type-xs);
  color: var(--text-muted);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.study-nav {
  display: flex;
  gap: .4rem;
  overflow-x: auto;
  padding: .25rem 0 .75rem;
  margin-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}
.study-nav a { flex: 0 0 auto; padding: .5rem .7rem; color: var(--color-navy); font-weight: 700; text-decoration: none; border-radius: .4rem; }
.study-nav a:hover, .study-nav a:focus-visible { background: var(--color-sky-soft); outline: 2px solid transparent; }

.nav a {
  position: relative;
  padding: 9px 11px;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.nav a:hover {
  background: var(--brand-soft);
  border-color: #c9d7f0;
  color: var(--brand-900);
}

.nav a.active {
  background: var(--brand-soft);
  color: var(--brand-950);
  border-color: #bfd0ef;
}

.nav a.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -6px;
  height: 3px;
  border-radius: 999px;
  background: var(--color-copper);
}

.nav-menu { position: relative; }
.nav-menu summary { cursor: pointer; list-style: none; padding: .5rem .7rem; font-weight: 700; color: var(--color-navy); }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu__items { position: absolute; z-index: 20; min-width: 12rem; padding: .4rem; background: #fff; border: 1px solid var(--color-border); border-radius: .5rem; box-shadow: 0 8px 18px rgba(21,48,74,.16); }
.nav-menu__items a { display: block; white-space: nowrap; }

.header-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  justify-content: flex-end;
}

.header-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-org {
  font-size: var(--type-sm);
  color: var(--text-muted);
  font-weight: 600;
}

.signout-button {
  width: auto;
  min-height: 38px;
  background: transparent;
  color: var(--brand-900);
  border-color: #c7d6ea;
}

.main {
  width: min(var(--content-width), calc(100vw - 48px));
  margin: 0 auto;
  padding: var(--space-6) 0 var(--space-10);
}

.page-header {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  max-width: var(--content-width-narrow);
}

.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--text);
  letter-spacing: 0.002em;
}

h1 {
  margin-bottom: 0;
  font-size: var(--type-xl);
  line-height: 1.15;
  font-weight: 700;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
  line-height: 1.25;
  font-weight: 600;
}

h3 {
  margin-bottom: 6px;
  font-size: 1.08rem;
  font-weight: 600;
}

.page-description {
  max-width: 70ch;
  margin: 0;
  color: var(--text-muted);
}

.page-badge,
.header-role {
  font-size: 0.75rem;
}

.page-badge {
  background: var(--brand-soft);
  color: var(--brand-900);
}

.header-role {
  background: #eef2f7;
  color: var(--text-muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.metrics .card {
  border-left: 4px solid var(--brand-soft);
}

.hero,
.summary-card,
.action-card,
.wizard-card,
.card--data,
.card--hero,
.card--empty,
.card--warning {
  position: relative;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow);
}

.card--hero {
  padding: var(--space-6);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.card--action {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-color: #d3dff0;
}

.card--warning {
  background: linear-gradient(180deg, #ffffff 0%, #fffaf2 100%);
  border-color: #ebd8bf;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: var(--space-4);
}

.summary-card {
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  border: 1px solid #d6e0ef;
  min-inline-size: 0;
  min-height: 140px;
  display: grid;
  gap: var(--space-2);
  align-content: start;
}

.summary-card--primary {
  border-color: #c8d8f1;
  background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
}

.summary-card--accent {
  border-color: #edd1bb;
  background: linear-gradient(180deg, #ffffff 0%, #fff3ea 100%);
}

.summary-label {
  color: var(--text-muted);
  font-size: var(--type-sm);
  font-weight: 600;
}

.summary-value {
  min-inline-size: 0;
  max-inline-size: 100%;
  overflow-wrap: anywhere;
  font-size: clamp(1.35rem, 2.1vw, 2.4rem);
  line-height: 1.1;
  font-weight: 700;
  color: var(--text);
}

.summary-note {
  color: var(--text-muted);
  font-size: var(--type-sm);
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-5);
}

.hero-copy {
  max-width: 70ch;
}

.hero-actions,
.action-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.action-list {
  display: grid;
  gap: var(--space-2);
}

.action-item {
  display: grid;
  gap: 4px;
  padding: 14px 15px;
  border-radius: var(--radius-1);
  border: 1px solid #d8e3f1;
  text-decoration: none;
  background: #fbfcff;
}

.action-item strong {
  color: var(--text);
  font-weight: 600;
}

.action-item span {
  color: var(--text-muted);
  font-size: var(--type-sm);
}

.dashboard-follow-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.activity-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.activity-feed__item {
  display: grid;
  gap: 4px;
  padding: 14px 15px;
  border: 1px solid #d8e3f1;
  border-radius: var(--radius-1);
  background: #fbfcff;
}

.activity-feed__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.empty--compact {
  padding: 14px;
  text-align: left;
}

.section {
  margin-top: var(--space-5);
}

.section-compact {
  margin-top: 0;
}

.compact-details {
  background: #f8fbff;
}

.pilot-callout {
  border-left: 4px solid var(--accent);
}

.wizard-hero {
  display: grid;
  gap: var(--space-4);
  max-width: var(--content-width-narrow);
}

.wizard-form {
  max-width: var(--content-width-narrow);
}

.wizard-progress {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.wizard-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #e6edf7;
  color: var(--brand-900);
  font-size: 0.8rem;
  font-weight: 700;
}

.wizard-step.is-active {
  background: var(--brand-800);
  color: #fff;
}

.wizard-step.is-complete {
  background: #dfe9f8;
  color: var(--brand-900);
}

.wizard-step.is-optional {
  background: #f4eadf;
  color: #8f4e1d;
}

.onboarding-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.onboarding-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #2e4d43;
}

.onboarding-list li::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 999px;
  border: 2px solid #90aea3;
}

.onboarding-list li.done::before {
  background: #2f7a62;
  border-color: #2f7a62;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.metric {
  margin-top: var(--space-1);
  font-size: clamp(1.8rem, 2.5vw, 2.25rem);
  line-height: 1.1;
  font-weight: 800;
  color: var(--brand-900);
}

.table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

.table th,
.table td {
  padding: 14px 12px;
  border-bottom: 1px solid #e6edf6;
  text-align: left;
  vertical-align: top;
  font-size: 0.93rem;
}

.table th {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  white-space: nowrap;
}

.table tbody tr {
  transition: background-color var(--transition-fast);
}

.table tbody tr:hover {
  background: #fafcff;
}

.table tr:last-child td {
  border-bottom: 0;
}

.row {
  display: flex;
  gap: var(--space-3);
  align-items: flex-end;
  flex-wrap: wrap;
}

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

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

.actions,
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.inline-form {
  display: inline;
  margin: 0;
}

.tabs {
  margin-bottom: var(--space-3);
  border-bottom: 1px solid #dbe5f0;
}

.tabs a {
  padding: 9px 10px;
  border-bottom: 3px solid transparent;
  text-decoration: none;
  color: var(--text-muted);
}

.tabs a[aria-current="page"] {
  border-bottom-color: var(--brand-700);
  color: var(--brand-900);
  font-weight: 700;
}

.organisation-row--archived {
  background: #f5f7fa;
  color: var(--text-muted);
}

.field {
  display: grid;
  gap: 6px;
  min-width: 180px;
  flex: 1;
}

.field label {
  font-size: var(--type-sm);
  font-weight: 600;
  color: var(--text);
}

.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea,
input[type="file"],
textarea,
select,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="range"] {
  width: 100%;
  border: 1px solid #c9d7e7;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  padding: 11px 12px;
  font: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input[type="range"] {
  padding: 0;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
input:focus,
select:focus,
textarea:focus,
button:focus,
.btn:focus,
.nav a:focus,
summary:focus {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.btn,
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--control-height);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 15px;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  background: var(--brand-800);
  color: #fff;
  transition: background-color var(--transition-fast), transform 0.05s ease, border-color var(--transition-fast);
}

.btn:hover,
button:hover,
.button:hover {
  background: var(--brand-900);
}

.btn:active,
button:active,
.button:active {
  transform: translateY(1px);
}

.secondary,
.btn.secondary,
button.secondary {
  background: var(--surface-muted);
  color: var(--brand-900);
  border-color: #c8d6e8;
}

.secondary:hover,
.btn.secondary:hover,
button.secondary:hover {
  background: #e2ebf7;
}

.ghost {
  width: 100%;
  background: transparent;
  border: 1px solid #c8d6e8;
  color: var(--brand-900);
}

.btn.tertiary,
button.tertiary,
.tertiary {
  background: transparent;
  color: var(--brand-900);
  border-color: transparent;
}

.btn.icon,
button.icon,
.icon-button {
  min-height: var(--control-height-compact);
  width: var(--control-height-compact);
  padding: 0;
  border-radius: 999px;
}

.danger,
button.danger,
.btn.danger {
  background: #fbeaea;
  color: #8a2727;
  border-color: #efcdcd;
}

.ghost:hover {
  background: var(--brand-soft);
}

button.danger,
.btn.danger,
.danger {
  background: #f7e8e8;
  color: #842323;
  border-color: #edcbcb;
}

button.danger:hover,
.btn.danger:hover,
.danger:hover {
  background: #f2dddd;
}

button.mini,
.btn.mini {
  min-height: 34px;
  padding: 8px 12px;
  font-size: 0.83rem;
}

button[disabled],
.btn[aria-disabled="true"],
button.is-loading {
  opacity: 0.78;
  cursor: not-allowed;
}

button.is-loading::after,
.btn.is-loading::after {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: rgba(255, 255, 255, 0.98);
  animation: spin 0.8s linear infinite;
}

.notice,
.error,
.success {
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid;
  padding: 10px 12px;
  font-size: 0.92rem;
}

.notice {
  background: #fff6ea;
  color: #7a5315;
  border-color: #efd9b1;
}

.notice.neutral {
  background: #eef3f8;
  color: #36506d;
  border-color: #d3deeb;
}

.error {
  background: #fbeaea;
  color: #7f2626;
  border-color: #f0c5c5;
}

.success {
  background: #eef8f3;
  color: var(--success);
  border-color: #c7e3d5;
}

.notice.info {
  background: #eef5fb;
  color: var(--color-info);
  border-color: #d1e2f3;
}

.notice.warning {
  background: #fff7ea;
  color: var(--color-warning);
  border-color: #f0ddb4;
}

.empty {
  background: #f8fbff;
  border: 1px dashed #c9d8e7;
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
}

.empty-actions {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef3f8;
  color: #36506d;
  font-size: 0.76rem;
  font-weight: 700;
}

.badge.live,
.badge.active,
.badge.submitted,
.badge.accepted,
.badge.clean {
  background: #e8f0ff;
  color: var(--brand-900);
}

.badge.pending,
.badge.draft,
.badge.prospective {
  background: #fcefdc;
  color: #8a5317;
}

.badge.closed,
.badge.revoked,
.badge.archived,
.badge.failed,
.badge.rejected {
  background: #f2e6e6;
  color: #7e2c2c;
}

.badge.info {
  background: #edf4fb;
  color: var(--color-info);
}

.badge.warning {
  background: #fff3dc;
  color: var(--color-warning);
}

.login-wrap {
  min-height: calc(100vh - 56px);
  display: grid;
  place-items: center;
  padding: 26px 14px;
}

.login-card {
  width: min(520px, 100%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px;
}

.participant-app-access-wrap {
  background: linear-gradient(145deg, #123d78, #215bb3);
}

.app-access-code {
  margin: 22px 0;
  border: 2px solid var(--brand-700);
  border-radius: var(--radius-md);
  background: #f4f7fb;
  padding: 18px 12px;
  color: var(--brand-900);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(1.15rem, 5vw, 1.55rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-align: center;
  overflow-wrap: anywhere;
}

.public-back-link {
  display: inline-block;
  margin-bottom: 20px;
  font-size: var(--type-sm);
  font-weight: 700;
  text-decoration: none;
}

.public-site {
  background: #fff;
}

.public-container {
  width: min(1180px, calc(100vw - 48px));
  margin: 0 auto;
}

.legal-centre,
.legal-document {
  max-width: 820px;
  padding-top: 64px;
  padding-bottom: 72px;
}

.legal-centre-grid {
  display: grid;
  gap: 18px;
  margin-top: 32px;
}

.legal-centre-card,
.legal-toc {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 24px;
}

.legal-centre-card h2,
.legal-toc h2 {
  margin-top: 0;
}

.legal-meta {
  color: var(--text-muted);
  font-size: var(--type-sm);
  font-weight: 700;
}

.legal-toc {
  margin: 36px 0;
  background: #f6f9fe;
}

.legal-toc ol { margin-bottom: 0; }
.legal-toc-level-3 { margin-left: 22px; }
.legal-document-section { scroll-margin-top: 120px; }
.legal-document-section h2 { margin-top: 44px; }
.legal-document-section h3 { margin-top: 28px; }
.legal-document-section p,
.legal-document-section li { max-width: 74ch; line-height: 1.65; }
.document-body { white-space: pre-wrap; line-height: 1.65; }

@media print {
  .public-header, .public-footer, .skip-link, .legal-toc { display: none; }
  .legal-centre, .legal-document { width: 100%; max-width: none; padding: 0; }
  .legal-document-section { break-inside: avoid; }
  a { color: #000; text-decoration: underline; }
}

.public-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: 102px;
  padding: 14px max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(199, 212, 229, 0.8);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.public-site-brand .brand-logo {
  width: clamp(230px, 20vw, 290px);
  height: auto;
}

.portal-brand .brand-logo--wordmark {
  width: clamp(220px, 25vw, 300px);
  height: auto;
}

.public-nav {
  display: flex;
  justify-content: center;
  gap: 22px;
}

.public-nav a {
  color: var(--text-muted);
  font-size: var(--type-sm);
  font-weight: 700;
  text-decoration: none;
}

.public-nav a:hover {
  color: var(--brand-900);
}

.public-signin {
  min-height: 42px;
  padding: 9px 16px;
}

.public-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 9vw, 126px) 0 clamp(70px, 8vw, 112px);
  background:
    radial-gradient(circle at 82% 18%, rgba(198, 106, 47, 0.12), transparent 24%),
    radial-gradient(circle at 8% 6%, rgba(33, 91, 179, 0.13), transparent 30%),
    linear-gradient(145deg, #f6f9fe 0%, #fff 53%, #fdf8f4 100%);
}

.public-hero::after {
  content: "";
  position: absolute;
  right: -140px;
  bottom: -220px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(198, 106, 47, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 54px rgba(198, 106, 47, 0.035), 0 0 0 108px rgba(33, 91, 179, 0.025);
  pointer-events: none;
}

.public-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.85fr);
  align-items: center;
  gap: clamp(46px, 8vw, 100px);
}

.public-hero-copy {
  max-width: 680px;
}

.public-kicker {
  margin: 0 0 14px;
  color: var(--color-copper-active);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.public-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.65rem, 4.8vw, 4.35rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.public-lead {
  max-width: 62ch;
  margin: 26px 0 0;
  color: #4d6278;
  font-size: clamp(1.08rem, 1.6vw, 1.28rem);
  line-height: 1.65;
}

.public-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.public-actions .btn {
  min-height: 50px;
  padding: 12px 20px;
}

.public-primary {
  background: var(--brand-800);
  color: #fff;
  border-color: var(--brand-800);
  box-shadow: 0 8px 20px rgba(33, 91, 179, 0.17);
}

.public-primary:hover {
  background: var(--brand-900);
  color: #fff;
  border-color: var(--brand-900);
}

.public-action-note {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: var(--type-sm);
}

.public-product-preview {
  position: relative;
  display: grid;
  gap: 20px;
  padding: 26px;
  border: 1px solid rgba(181, 199, 222, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 54px rgba(21, 48, 74, 0.13);
}

.public-product-preview > * {
  min-width: 0;
}

.public-product-preview::before {
  display: none;
}

.preview-topline,
.preview-message,
.participant-preview-head,
.participant-task {
  display: flex;
  align-items: center;
  gap: 12px;
}

.preview-topline {
  color: var(--text-muted);
  font-size: var(--type-sm);
  font-weight: 700;
}

.preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-800);
}

.preview-dot.copper {
  background: var(--accent);
}

.preview-status {
  margin-left: auto;
  border-radius: 999px;
  background: #e7f3ed;
  color: var(--success);
  padding: 4px 9px;
  font-size: 0.72rem;
}

.preview-question {
  display: grid;
  gap: 10px;
  border-radius: 18px;
  background: #f2f6fc;
  padding: 20px;
}

.preview-question strong {
  font-size: 1.18rem;
  line-height: 1.35;
}

.preview-label {
  color: var(--brand-800);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.preview-response {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.preview-response span {
  display: block;
  height: 7px;
  border-radius: 99px;
  background: #cdd9e8;
}

.preview-response .short {
  width: 62%;
}

.preview-excerpt {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.preview-excerpt blockquote {
  margin: 0;
  color: #344e67;
  font-size: 0.92rem;
  line-height: 1.58;
}

.research-codes {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.research-code-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.research-code-list span {
  max-width: 100%;
  border: 1px solid #afc5e2;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  background: #eaf1fb;
  padding: 6px 10px 6px 8px;
  color: var(--brand-900);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}

.research-analysis-note {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.preview-insight {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.preview-insight p,
.preview-insight small {
  margin: 0;
}

.preview-insight p {
  color: #344e67;
  font-size: 0.92rem;
  line-height: 1.5;
}

.preview-insight small {
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.preview-signals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.preview-signals div {
  display: grid;
  gap: 2px;
  border-right: 1px solid var(--border);
}

.preview-signals div:last-child {
  border-right: 0;
}

.preview-signals strong {
  font-size: 1.05rem;
}

.preview-signals span {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.preview-message {
  align-items: flex-start;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.preview-message p {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--type-sm);
}

.preview-message strong {
  color: var(--text);
}

.preview-avatar {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-900);
  font-size: 0.72rem;
  font-weight: 800;
}

.public-trust-strip {
  border-top: 1px solid #e4eaf2;
  border-bottom: 1px solid #e4eaf2;
  background: #fff;
}

.trust-items {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.trust-items span {
  padding: 20px 18px;
  border-right: 1px solid #e4eaf2;
  color: #52677c;
  font-size: var(--type-sm);
  font-weight: 700;
  text-align: center;
}

.trust-items span:last-child {
  border-right: 0;
}

.public-section {
  padding: clamp(76px, 9vw, 120px) 0;
  scroll-margin-top: 84px;
}

.public-section-soft {
  background: linear-gradient(135deg, #f4f8fd, #f9fbfe 55%, #fff8f3);
}

.public-section-heading {
  max-width: 820px;
  margin: 0 auto 52px;
  text-align: center;
}

.public-section-heading.align-left {
  margin: 0;
  text-align: left;
}

.public-section h2,
.public-cta h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 3.8vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.public-section-heading > p:last-child,
.public-lead-sm,
.public-cta p {
  color: var(--text-muted);
  font-size: 1.08rem;
}

.public-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.public-steps article {
  min-height: 252px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  padding: 26px;
  box-shadow: 0 12px 35px rgba(21, 48, 74, 0.055);
}

.step-number {
  display: block;
  margin-bottom: 34px;
  color: var(--color-copper);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.public-steps h3 {
  font-size: 1.22rem;
}

.public-steps p,
.responsible-cards p {
  margin-bottom: 0;
  color: var(--text-muted);
}

.public-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.public-card-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.public-card-grid article {
  min-height: 220px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  padding: 26px;
}

.public-card-grid h3 {
  margin-top: 14px;
  font-size: 1.18rem;
  line-height: 1.35;
}

.public-card-grid p {
  margin-bottom: 0;
  color: var(--text-muted);
}

.card-label {
  color: var(--color-copper-active);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.public-section-note {
  max-width: 900px;
  margin: 34px auto 0;
  border-left: 3px solid var(--color-copper);
  padding: 4px 0 4px 18px;
  color: var(--text-muted);
  font-size: var(--type-sm);
}

.public-split,
.responsible-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(50px, 9vw, 116px);
}

.public-split--top {
  align-items: start;
}

.public-checks {
  display: grid;
  gap: 14px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.public-checks li {
  position: relative;
  padding-left: 32px;
  color: #344e67;
  font-weight: 650;
}

.public-checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e5f2ec;
  color: var(--success);
  font-size: 0.75rem;
  font-weight: 900;
}

.public-checks--substantial {
  margin-top: 0;
}

.public-checks--substantial li {
  font-weight: 400;
}

.public-checks--substantial strong {
  color: var(--text);
}

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

.decision-panel {
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  background: #f8fbff;
  padding: clamp(28px, 4vw, 42px);
}

.decision-panel--influence {
  border-color: #e4cdbd;
  background: #fffaf6;
}

.decision-panel h3 {
  margin: 16px 0 12px;
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
  line-height: 1.25;
}

.decision-panel p {
  color: var(--text-muted);
}

.decision-panel ul {
  display: grid;
  gap: 9px;
  margin: 22px 0 0;
  padding-left: 20px;
}

.participant-preview {
  display: grid;
  gap: 12px;
  border: 1px solid #ccd9e9;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.92);
  padding: 24px;
  box-shadow: 0 26px 60px rgba(21, 48, 74, 0.13);
}

.participant-preview-head {
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
}

.participant-preview-head div,
.participant-task div {
  display: grid;
}

.participant-preview small,
.participant-task small {
  color: var(--text-muted);
}

.participant-task {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 15px;
}

.participant-task > span {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f0f4fa;
  color: var(--brand-900);
  font-size: var(--type-sm);
  font-weight: 800;
}

.participant-task.is-complete > span {
  background: #e5f2ec;
  color: var(--success);
}

.responsible-grid {
  align-items: start;
}

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

.responsible-cards article {
  min-height: 170px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fbfcff;
  padding: 22px;
}

.responsible-cards strong {
  color: var(--brand-950);
  font-size: 1.05rem;
}

.public-cta {
  padding: 28px 0 90px;
}

.public-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--brand-950), #215bb3);
  padding: clamp(32px, 5vw, 60px);
  box-shadow: 0 24px 60px rgba(17, 61, 125, 0.2);
}

.public-cta h2,
.public-cta p {
  color: #fff;
}

.public-cta .public-kicker {
  color: #efb38b;
}

.public-cta .public-actions {
  flex: 0 0 auto;
  margin-top: 0;
}

.public-cta .public-primary {
  background: #fff;
  color: var(--brand-950);
  border-color: #fff;
  box-shadow: none;
}

.public-cta .secondary {
  border-color: rgba(255, 255, 255, 0.55);
  background: transparent;
  color: #fff;
}

.public-footer {
  border-top: 1px solid #174a8b;
  background: linear-gradient(145deg, #123d78, #215bb3);
  padding: 54px 0 26px;
}

.public-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.public-footer-main {
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) minmax(180px, 0.7fr) minmax(180px, 0.7fr);
  align-items: start;
  gap: clamp(36px, 7vw, 88px);
}

.public-footer-brand p {
  max-width: 390px;
  margin: 22px 0 0;
  color: #e5efff;
}

.public-footer-group {
  display: grid;
  align-content: start;
  gap: 10px;
}

.public-footer-group h2 {
  margin: 0 0 6px;
  color: #fff;
  font-size: var(--type-sm);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-placeholder {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e5efff;
  font-size: var(--type-sm);
}

.public-footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  margin-top: 42px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  padding-top: 22px;
}

.public-footer-bottom small {
  color: #e5efff;
}

.public-footer a {
  color: #fff;
  font-size: var(--type-sm);
  font-weight: 700;
  text-decoration: none;
}

.public-footer .footer-wordmark-image {
  display: block;
  width: min(280px, 100%);
  max-width: 100%;
  height: auto;
  background: transparent;
  object-fit: contain;
}

.text-link {
  font-weight: 600;
}

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

.control-row,
.check {
  --control-row-input: 1.2rem;
  display: inline-grid;
  grid-template-columns: var(--control-row-input) minmax(0, 1fr);
  column-gap: var(--space-2);
  align-items: start;
  width: fit-content;
  max-width: 100%;
  color: #3c514a;
  cursor: pointer;
}

.control-row input[type="checkbox"],
.control-row input[type="radio"],
.check input[type="checkbox"],
.check input[type="radio"] {
  box-sizing: border-box;
  inline-size: 1.1rem;
  block-size: 1.1rem;
  min-inline-size: 1.1rem;
  margin: 0.22rem 0 0;
  padding: 0;
  accent-color: var(--brand-800);
  justify-self: start;
}

fieldset.field {
  min-width: 0;
  padding: var(--space-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}

fieldset.field legend {
  padding: 0 var(--space-1);
  font-weight: 700;
}

.control-row,
.check {
  padding: 4px 2px;
}

.control-row:has(input:focus-visible),
.check:has(input:focus-visible) {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.methodology-options,
.methodology-guidance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr));
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.methodology-choice,
.methodology-guidance-card {
  min-inline-size: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  padding: var(--space-3);
}

.methodology-choice {
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr);
  column-gap: var(--space-3);
  align-items: start;
  width: 100%;
  color: var(--text);
  cursor: pointer;
}

.methodology-choice:hover {
  border-color: #a9bddb;
  background: #f8fbff;
}

.methodology-choice:has(input:focus-visible) {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.methodology-choice input[type="checkbox"],
.methodology-choice input[type="radio"] {
  inline-size: 1.1rem;
  block-size: 1.1rem;
  min-inline-size: 1.1rem;
  margin: 0.25rem 0 0;
  accent-color: var(--brand-800);
}

.methodology-choice__content {
  min-inline-size: 0;
  display: grid;
  gap: 3px;
}

.methodology-choice__title {
  color: var(--text);
  font-size: var(--type-base);
  line-height: 1.35;
}

.methodology-choice__description,
.methodology-choice__supports {
  color: var(--text-muted);
  font-size: var(--type-sm);
  line-height: 1.45;
}

.methodology-choice__supports > span {
  color: var(--text);
  font-weight: 650;
}

.breadcrumbs {
  margin: 0 0 var(--space-3);
  color: var(--text-muted);
  font-size: var(--type-sm);
}

.breadcrumbs span { padding: 0 5px; }

.workspace-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.workspace-nav > a,
.workspace-nav__links a {
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 650;
  text-decoration: none;
}

.workspace-nav > a:hover,
.workspace-nav > a[aria-current="page"],
.workspace-nav__links a:hover,
.workspace-nav__links a[aria-current="page"] {
  background: var(--brand-soft);
  color: var(--brand-950);
}

.workspace-nav__group {
  display: grid;
  gap: 2px;
  padding-inline-start: 8px;
  border-inline-start: 1px solid var(--border);
}

.workspace-nav__heading {
  padding-inline: 11px;
  color: var(--text-muted);
  font-size: .88rem;
  font-weight: 650;
  line-height: 1.4;
}

.workspace-nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.study-analysis-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-4);
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.study-analysis-nav a {
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 650;
  text-decoration: none;
}

.study-analysis-nav a:hover,
.study-analysis-nav a[aria-current="page"] {
  background: var(--brand-soft);
  color: var(--brand-950);
}

.workbench-journey,
.study-tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}

.workbench-journey article,
.study-tool-grid article {
  min-width: 0;
  padding: var(--space-4);
  border: 1px solid #d6e0ef;
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}

.workbench-journey h3,
.study-tool-grid h3 { margin: 4px 0 var(--space-2); }
.workbench-journey .eyebrow { color: var(--brand-800); }
.study-tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.study-tool-links { display: flex; flex-wrap: wrap; gap: 6px 12px; }

.research-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); }
.metric-card { padding: var(--space-4); border: 1px solid #d6e0ef; border-radius: var(--radius-sm); background: var(--surface); display: grid; gap: 4px; }
.metric-card span, .metric-card__date { color: var(--text-muted); font-size: var(--type-sm); }
.metric-card strong { color: var(--brand-900); font-size: 1.8rem; line-height: 1.2; }
.metric-card strong.metric-card__date { font-size: 1rem; color: var(--text); }
.source-summary { padding: var(--space-3) 0; border-bottom: 1px solid #e6edf6; }
.source-summary:last-child { border-bottom: 0; }
.source-summary > span { margin-left: var(--space-2); }
.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); align-items: end; }
.filter-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; }
.result-count { margin: var(--space-4) 0; color: var(--text-muted); font-weight: 600; }
.entry-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-5); box-shadow: var(--shadow); margin-top: var(--space-4); }
.entry-card__header { display: flex; gap: var(--space-3); justify-content: space-between; align-items: start; border-bottom: 1px solid #e6edf6; margin-bottom: var(--space-3); }
.entry-card__header h2 { font-size: 1.15rem; margin-bottom: 2px; }
.entry-card__header p { margin: 0 0 var(--space-3); color: var(--text-muted); }
.entry-card__header time { color: var(--text-muted); font-size: var(--type-sm); white-space: nowrap; }
.entry-context { display: flex; gap: var(--space-2); flex-wrap: wrap; margin: 0 0 var(--space-3); color: var(--text-muted); font-size: var(--type-sm); }
.entry-context span { background: var(--surface-muted); padding: 3px 7px; border-radius: 4px; }
.entry-card__body { white-space: pre-wrap; max-width: 82ch; }
.code-list { display: flex; gap: 6px; flex-wrap: wrap; margin: var(--space-4) 0 0; }
.code-chip, .file-chip { display: inline-flex; border: 1px solid #cbd9ed; background: var(--brand-soft); border-radius: var(--radius-pill); padding: 3px 8px; font-size: var(--type-sm); text-decoration: none; }
.entry-evidence { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid #e6edf6; }
.entry-evidence h3 { font-size: 1rem; }
.evidence-strip { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; }
.evidence-strip img { display: block; width: 112px; height: 84px; border: 1px solid var(--border); border-radius: 6px; object-fit: cover; }
.participant-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.participant-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-5); }
.participant-card h2 { font-size: 1.15rem; }
.evidence-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.evidence-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.evidence-card > div:last-child { padding: var(--space-3); }
.evidence-card h2 { font-size: 1rem; overflow-wrap: anywhere; }
.evidence-card__preview img { display: block; width: 100%; height: 180px; object-fit: cover; background: var(--surface-muted); }
.evidence-card__file { display: grid; place-items: center; min-height: 140px; padding: var(--space-3); background: var(--surface-muted); color: var(--text-muted); overflow-wrap: anywhere; }
.theme-list { display: grid; }
.theme-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) 0; border-bottom: 1px solid #e6edf6; }
.theme-row:last-child { border-bottom: 0; }
.theme-row h3, .theme-row p { margin: 0; }
.pagination { display: flex; align-items: center; justify-content: center; gap: var(--space-3); margin-top: var(--space-5); }
.dossier-nav { display: flex; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-4); }

details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fbfcfe;
  padding: 10px;
}

details + details,
.activity + .activity {
  margin-top: 10px;
}

summary {
  cursor: pointer;
}

.context-help {
  margin-bottom: 18px;
  max-width: 980px;
  background: rgba(255, 255, 255, 0.78);
}

.context-help summary {
  font-weight: 600;
  color: var(--brand-900);
}

.context-help summary::-webkit-details-marker {
  display: none;
}

.context-help summary::marker {
  content: "";
}

.context-help summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #c8d6e8;
  background: #f7faff;
}

.context-help summary::before {
  content: "?";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-900);
  font-size: 0.72rem;
  font-weight: 700;
}

.context-help-body {
  margin-top: 10px;
}

.wizard-steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.wizard-steps li {
  position: relative;
  padding-left: 36px;
}

.wizard-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-900);
  font-weight: 700;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
}

.empty-actions {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

pre {
  white-space: pre-wrap;
  max-width: 680px;
  margin: 0;
}

.muted {
  color: var(--text-muted);
}

.portal-wrap {
  min-height: 100vh;
  background: var(--bg);
}

.portal-head {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  padding: 14px max(18px, calc((100vw - 1020px) / 2));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.portal-summary {
  display: grid;
  gap: 2px;
  text-align: right;
}

.portal-signout {
  margin-top: 4px;
}

.portal-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.portal-links a {
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  padding: 7px 12px;
  font-weight: 700;
  text-decoration: none;
}

.portal-main {
  max-width: 1020px;
  margin: 0 auto;
  padding: 22px 18px 32px;
}

.activity-card {
  margin-bottom: 14px;
}

.submitted-answer {
  white-space: pre-wrap;
}

.submitted-choices {
  margin: 12px 0 0;
  padding-left: 24px;
}

.choice-group,
.ranking-group {
  display: grid;
  gap: 10px;
  margin: 0;
  border: 0;
  padding: 0;
}

.choice-group legend,
.ranking-group legend {
  margin-bottom: 4px;
  font-weight: 700;
}

.choice-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 10px 12px;
  cursor: pointer;
}

.choice-option input {
  width: 20px;
  height: 20px;
  margin-top: 1px;
}

.evidence-summary {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.evidence-summary > div,
.evidence-state {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.evidence-name {
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.evidence-download {
  min-height: var(--control-height-compact);
  padding: 7px 11px;
}

.privacy-card details {
  border-top: 1px solid var(--border);
  padding: 14px 0;
}

.privacy-action {
  border-top: 1px solid var(--border);
  padding: 14px 0;
}

.privacy-action h3 {
  margin-bottom: 6px;
}

.privacy-card summary {
  cursor: pointer;
  font-weight: 700;
}

.conversation {
  display: grid;
  gap: 10px;
}

.message {
  max-width: 80%;
  border-radius: 12px;
  background: #e8efec;
  padding: 12px;
}

.message.researcher {
  margin-left: auto;
  background: #dff4e8;
}

.message.note {
  background: #fff0d5;
  border: 1px dashed #b67e2a;
}

.message p {
  margin: 5px 0;
}

.message-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.message-workspace-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.message-workspace-summary h2 {
  margin-bottom: 4px;
}

.message-workspace-summary p:last-child {
  margin-bottom: 0;
}

.message-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(190px, 1fr) minmax(170px, 0.8fr) auto;
  align-items: end;
  gap: 12px;
}

.conversation-index {
  display: grid;
  gap: 10px;
}

.conversation-row {
  display: grid;
  grid-template-columns: auto minmax(160px, 0.8fr) minmax(240px, 1.4fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 88px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 15px 18px;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-1);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.conversation-row:hover {
  border-color: #b8cae2;
  color: inherit;
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}

.conversation-row.is-unread {
  border-left: 4px solid var(--accent);
  background: linear-gradient(90deg, #fffaf6, #fff 20%);
}

.conversation-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand-950);
  font-weight: 800;
}

.conversation-identity,
.conversation-study {
  display: grid;
  gap: 2px;
}

.conversation-row small {
  color: var(--text-muted);
}

.conversation-state {
  justify-self: end;
}

.conversation-breadcrumb {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.conversation-breadcrumb a {
  font-weight: 700;
  text-decoration: none;
}

.message-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.8fr);
  align-items: start;
  gap: 18px;
}

.conversation-thread {
  min-height: 220px;
  max-height: 680px;
  overflow-y: auto;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 18px 4px;
}

.conversation-thread .message {
  width: min(82%, 700px);
  padding: 14px 16px;
}

.message-composer label,
.internal-notes-panel form label {
  display: grid;
  gap: 2px;
}

.message-composer button {
  justify-self: start;
  width: auto;
}

.internal-notes-panel {
  position: sticky;
  top: 98px;
}

.privacy-boundary {
  border: 1px solid #e7c99f;
  border-radius: var(--radius-sm);
  background: #fff7eb;
  padding: 12px 14px;
}

.privacy-boundary p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: var(--type-sm);
}

.internal-note-list {
  display: grid;
  gap: 10px;
}

.internal-note-card {
  border: 1px dashed #d6a969;
  border-radius: var(--radius-sm);
  background: #fffaf2;
  padding: 13px 14px;
}

.internal-note-card p {
  margin: 0 0 6px;
  white-space: pre-wrap;
}

.internal-note-card small {
  color: var(--text-muted);
}

.conversation-actions {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.app-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: center;
  background: #f8fbff;
  display: flex;
  justify-content: center;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.app-footer span,
.app-footer small {
  font-weight: 700;
}

.page-description + .card,
.page-header + .notice,
.page-header + .success,
.page-header + .error {
  margin-top: 0;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 1000;
  border-radius: 8px;
  background: #fff;
  color: var(--brand-900);
  padding: 10px 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.skip-link:focus {
  top: 12px;
}

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

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

@media (max-width: 1350px) and (min-width: 1181px) {
  .app-header {
    gap: 12px;
    padding-inline: 20px;
  }

  .nav {
    gap: 2px;
    flex-wrap: nowrap;
  }

  .nav a {
    padding: 7px 8px;
    font-size: var(--type-sm);
  }

  .header-meta {
    gap: 10px;
  }
}

@media (max-width: 1180px) {
  .main {
    width: min(100vw - 32px, 1360px);
    padding: 20px 0 36px;
  }

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

  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .app-header {
    grid-template-columns: auto 1fr;
    row-gap: 12px;
  }

  .header-meta {
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .public-header {
    padding-inline: 24px;
  }

  .public-nav {
    gap: 14px;
  }

  .public-nav a {
    font-size: 0.8rem;
  }

  .public-steps {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 900px) {
  .app-header {
    grid-template-columns: 1fr;
    justify-items: start;
    padding: 14px 16px;
  }

  .nav {
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .header-meta {
    width: 100%;
    justify-content: space-between;
  }

  .main {
    width: min(100vw - 24px, 1360px);
  }

  .summary-grid,
  .dashboard-follow-up {
    grid-template-columns: 1fr;
  }

  .portal-head {
    padding: 14px 16px;
    flex-direction: column;
    align-items: flex-start;
  }

  .portal-summary {
    text-align: left;
  }

  .page-title-row {
    align-items: flex-start;
  }

  .wizard-progress {
    gap: 8px;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .research-metrics, .filter-grid, .participant-grid, .evidence-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workbench-journey,
  .study-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .entry-card__header { display: grid; }

  .message-filters,
  .message-workspace-grid {
    grid-template-columns: 1fr;
  }

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

  .conversation-study {
    grid-column: 2 / -1;
  }

  .internal-notes-panel {
    position: static;
  }

  .public-header {
    grid-template-columns: 1fr auto;
  }

  .public-nav {
    display: none;
  }

  .public-hero-grid,
  .public-split,
  .responsible-grid {
    grid-template-columns: 1fr;
  }

  .public-hero-copy {
    max-width: 760px;
  }

  .public-product-preview {
    width: min(620px, 94%);
    margin: 0 auto;
    transform: none;
  }

  .trust-items {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-items span:nth-child(2) {
    border-right: 0;
  }

  .trust-items span:nth-child(-n + 2) {
    border-bottom: 1px solid #e4eaf2;
  }

  .public-cta-inner {
    display: grid;
  }

  .public-cta .public-actions {
    justify-content: flex-start;
  }

  .public-footer-inner {
    grid-template-columns: 1fr;
  }

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

  .public-footer-main {
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 680px) {
  .main {
    width: min(100vw - 16px, 1360px);
    padding: 16px 0 28px;
  }

  .card {
    padding: 16px;
  }

  .card--hero,
  .wizard-card,
  .action-card,
  .summary-card {
    padding: 16px;
  }

  .row {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .field,
  .small {
    min-width: 0;
    max-width: none;
  }

  .workspace-nav, .study-analysis-nav { flex-wrap: nowrap; overflow-x: auto; }
  .workspace-nav > a, .workspace-nav__group, .workspace-nav__links a, .study-analysis-nav a { flex: 0 0 auto; }
  .workspace-nav__links { flex-wrap: nowrap; }
  .research-metrics, .filter-grid, .participant-grid, .evidence-gallery { grid-template-columns: 1fr; }
  .workbench-journey, .study-tool-grid { grid-template-columns: 1fr; }
  .theme-row { align-items: flex-start; flex-direction: column; }
  .dossier-nav { flex-direction: column; }
  .dossier-nav .btn { width: 100%; }

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

  .section-head {
    gap: 10px;
  }

  .app-header {
    gap: 10px;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav a {
    flex: 0 0 auto;
  }

  .page-title-row {
    align-items: flex-start;
  }

  .header-meta {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .signout-button {
    width: auto;
  }

  .table {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }

  .table td {
    white-space: normal;
    min-width: 120px;
  }

  .login-card {
    padding: 22px;
    width: min(560px, 100%);
  }

  .portal-main {
    padding: 14px;
  }

  .portal-head {
    padding: 14px;
    flex-direction: column;
    align-items: flex-start;
  }

  .message {
    max-width: 100%;
  }

  .message-workspace-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .message-workspace-summary .btn {
    width: 100%;
  }

  .conversation-row {
    grid-template-columns: auto 1fr;
    padding: 14px;
  }

  .conversation-study,
  .conversation-state {
    grid-column: 1 / -1;
  }

  .conversation-state {
    justify-self: start;
  }

  .conversation-breadcrumb {
    display: grid;
  }

  .conversation-thread .message {
    width: 100%;
  }

  .wizard-hero,
  .context-help {
    max-width: 100%;
  }

  .public-container {
    width: min(100vw - 28px, 1180px);
  }

  .public-header {
    min-height: 82px;
    gap: 8px;
    padding: 10px 12px;
  }

  .public-site-brand .brand-logo {
    width: clamp(150px, 48vw, 210px);
  }

  .public-signin {
    min-height: 38px;
    padding: 7px 8px;
    font-size: 0.74rem;
  }

  .public-hero {
    padding: 64px 0 72px;
  }

  .public-hero h1 {
    font-size: clamp(2.35rem, 12vw, 3.4rem);
  }

  .public-actions {
    display: grid;
  }

  .public-actions .btn {
    width: 100%;
  }

  .public-product-preview {
    width: 100%;
    padding: 18px;
    border-radius: 22px;
  }

  .preview-excerpt blockquote {
    font-size: 0.88rem;
  }

  .preview-signals strong {
    font-size: 1.18rem;
  }

  .trust-items,
  .public-steps,
  .responsible-cards,
  .public-card-grid,
  .public-footer-main {
    grid-template-columns: 1fr;
  }

  .trust-items span {
    border-right: 0;
    border-bottom: 1px solid #e4eaf2;
  }

  .trust-items span:last-child {
    border-bottom: 0;
  }

  .public-section {
    padding: 72px 0;
  }

  .public-section-heading {
    margin-bottom: 36px;
    text-align: left;
  }

  .public-steps article {
    min-height: 0;
  }

  .step-number {
    margin-bottom: 20px;
  }

  .portal-brand .brand-logo--wordmark {
    width: min(220px, 66vw);
  }

  .public-cta {
    padding-bottom: 56px;
  }

  .public-cta-inner {
    border-radius: 22px;
    padding: 28px 22px;
  }

  .public-footer {
    padding-top: 42px;
  }

  .public-footer-main {
    gap: 34px;
  }

  .public-footer-bottom {
    display: grid;
    gap: 10px;
    margin-top: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
.image-region-stage { position: relative; display: inline-block; max-width: 100%; touch-action: none; }
.image-region-stage img { display: block; max-width: 100%; height: auto; }
.image-region-box { position: absolute; border: 3px solid #8b2f97; background: rgb(139 47 151 / 18%); pointer-events: none; }
.image-region-box--draft { border-style: dashed; }

.canvas-tools__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1.5rem; align-items: start; }
.canvas-zoom { display: flex; gap: .55rem; align-items: center; }
.canvas-zoom button { min-width: 2.75rem; }
.analysis-canvas__viewport { overflow: auto; max-height: 72vh; border: 1px solid var(--border, #ccd5df); border-radius: 12px; background: #f5f7fa; }
.analysis-canvas__surface { --canvas-scale: 1; position: relative; width: 4300px; height: 4300px; transform: scale(var(--canvas-scale)); transform-origin: top left; background-image: radial-gradient(circle, #c7d1dc 1px, transparent 1px); background-size: 24px 24px; }
.analysis-canvas__edges { position: absolute; inset: 0; width: 4300px; height: 4300px; overflow: visible; pointer-events: none; }
.analysis-canvas__edges line { stroke: #345b83; stroke-width: 3; stroke-dasharray: 8 5; }
.analysis-canvas__node { position: absolute; width: 240px; min-height: 150px; z-index: 2; padding: 1rem; border: 2px solid #345b83; border-radius: 12px; background: #fff; box-shadow: 0 6px 18px rgb(24 50 74 / 14%); }
.analysis-canvas__node.is-dragging { z-index: 3; box-shadow: 0 10px 28px rgb(24 50 74 / 24%); }
.analysis-canvas__node h3 { margin: .2rem 0 .5rem; }
.analysis-canvas__node .eyebrow { margin: .4rem 0 0; text-transform: uppercase; font-size: .72rem; letter-spacing: .06em; color: #52677c; }
.analysis-canvas__move { cursor: grab; width: 100%; padding: .35rem .6rem; touch-action: none; }
.analysis-canvas__move:active { cursor: grabbing; }
.canvas-position-form { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.canvas-position-form button { grid-column: 1 / -1; }
.analysis-canvas__empty { position: absolute; top: 2rem; left: 2rem; width: min(520px, calc(100vw - 8rem)); padding: 1.5rem; border: 2px dashed #8293a5; border-radius: 12px; background: #fff; }
