:root {
  --bg: #eef2f8;
  --panel: #ffffff;
  --panel-soft: #f7f9fd;
  --ink: #102747;
  --muted: #5f718d;
  --line: #d8e0ec;
  --brand: #0b3b75;
  --brand-strong: #082a57;
  --brand-soft: #e9f0fb;
  --accent: #f1c232;
  --accent-deep: #d5aa17;
  --accent-soft: #fff6d6;
  --danger: #8f2f34;
  --danger-soft: #f8e3e5;
  --shadow: 0 18px 42px rgba(8, 42, 87, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(11, 59, 117, 0.08), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 55%, #edf1f7 100%);
  line-height: 1.6;
}

.wrap {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
}

body[data-device-profile="laptop"] .wrap {
  width: min(1180px, calc(100% - 2.25rem));
}

body[data-device-profile="laptop"][data-screen-ratio="wide"] .wrap {
  width: min(1240px, calc(100% - 2.5rem));
}

body[data-device-profile="mobile"] {
  font-size: 0.98rem;
}

body[data-device-profile="mobile"] .wrap {
  width: min(100%, calc(100% - 1rem));
}

.site-header {
  position: relative;
  overflow: hidden;
  padding: 2.25rem 0 2rem;
  color: #fff;
  background:
    linear-gradient(128deg, rgba(255, 255, 255, 0.06) 0%, transparent 42%),
    linear-gradient(135deg, var(--brand-strong) 0%, var(--brand) 58%, #19518d 100%);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: auto -10% 18% auto;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(241, 194, 50, 0.18) 0%, rgba(241, 194, 50, 0) 70%);
  pointer-events: none;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--accent) 0%, #f6d86f 48%, var(--accent-deep) 100%);
}

.site-header .wrap,
.panel-header,
.button-row,
.filter-bar,
.grid {
  display: flex;
  gap: 1rem;
}

.header-inner,
.panel-header,
.filter-bar {
  justify-content: space-between;
  align-items: flex-start;
}

.grid {
  flex-wrap: wrap;
}

.landing-shell {
  display: grid;
  gap: 1.35rem;
}

.two-up > * {
  flex: 1 1 320px;
}

.admin-grid > * {
  flex: 1 1 420px;
}

.eyebrow {
  margin: 0 0 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--brand);
  font-weight: 700;
}

h1, h2, h3, h4 {
  margin: 0 0 0.75rem;
  line-height: 1.2;
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.site-header .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.site-header h1 {
  margin-bottom: 0;
  max-width: 16ch;
}

.header-brand {
  max-width: 34rem;
}

.header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.site-main {
  padding: 2.2rem 0 3.2rem;
}

body[data-device-profile="mobile"] .site-header {
  padding: 1.35rem 0 1.15rem;
}

body[data-device-profile="mobile"][data-screen-ratio="tall"] .site-header {
  padding: 1.1rem 0 1rem;
}

body[data-device-profile="mobile"] .header-inner,
body[data-device-profile="mobile"] .panel-header,
body[data-device-profile="mobile"] .filter-bar,
body[data-device-profile="mobile"] .comprehension-header {
  flex-direction: column;
  align-items: flex-start;
}

body[data-device-profile="mobile"] .header-meta {
  width: 100%;
  justify-content: flex-start;
}

body[data-device-profile="mobile"] .header-brand {
  max-width: none;
}

body[data-device-profile="mobile"] .site-main {
  padding: 1.15rem 0 1.85rem;
  min-height: calc(var(--viewport-height, 100vh) - 7rem);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  border-radius: 18px;
  padding: 1.4rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

body[data-device-profile="mobile"] .panel {
  padding: 1rem;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(8, 42, 87, 0.1);
}

body[data-device-profile="mobile"] .participant-stage h2 {
  font-size: 1.55rem;
  margin-bottom: 0.65rem;
}

body[data-device-profile="mobile"] .participant-stage h3 {
  font-size: 1.08rem;
  margin-bottom: 0.45rem;
}

body[data-device-profile="mobile"] .participant-stage p {
  margin-top: 0;
}

body[data-device-profile="mobile"] .participant-stage .eyebrow {
  margin-bottom: 0.35rem;
}

body[data-device-profile="mobile"] .textarea-meta {
  flex-direction: column;
  align-items: flex-start;
}

body[data-device-profile="mobile"] .voice-justification-controls {
  flex-direction: column;
}

body[data-device-profile="mobile"] .voice-justification-controls button {
  width: 100%;
}

body[data-device-profile="mobile"] .voice-justification-inline,
body[data-device-profile="mobile"] .voice-justification-dialog-header {
  flex-direction: column;
  align-items: flex-start;
}

body[data-device-profile="mobile"] .admin-overlay-dialog,
body[data-device-profile="mobile"] .voice-justification-dialog {
  width: min(100%, 100%);
  padding: 0.95rem;
}

body[data-device-profile="mobile"] .scenario-upload-row {
  grid-template-columns: minmax(0, 1fr);
}

.landing-panel {
  max-width: 760px;
  border-top-color: var(--accent);
}

.narrow {
  max-width: 760px;
}

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

.landing-intro {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1.2rem;
}

.landing-intro p {
  margin: 0;
}

.stack {
  display: grid;
  gap: 1rem;
}

.participant-stage {
  width: 100%;
}

.stage-form {
  display: grid;
  gap: 1rem;
}

.stage-actions {
  margin-top: 1.15rem;
}

label span,
legend {
  display: block;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.stage-form label {
  display: grid;
  gap: 0.45rem;
}

.textarea-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem 1rem;
}

.justification-guidance,
.justification-counter,
.justification-minimum,
.justification-paste-notice,
.justification-paste-warning {
  margin: 0;
}

.justification-counter {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-weight: 700;
}

.justification-counter [data-justification-count] {
  display: inline;
  margin: 0;
}

.justification-counter.is-under-minimum {
  color: var(--danger);
}

.justification-minimum {
  color: var(--danger);
  font-weight: 700;
}

.justification-paste-notice,
.justification-paste-warning {
  color: var(--danger);
  font-weight: 600;
}

.justification-counter.is-hidden,
.justification-minimum.is-hidden,
.justification-paste-warning.is-hidden {
  display: none;
}

.voice-justification-copy {
  display: grid;
  gap: 0.25rem;
}

.voice-justification-copy p,
.voice-justification-status {
  margin: 0;
}

.voice-justification-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.voice-justification-preview {
  display: grid;
  gap: 0.45rem;
}

.voice-justification-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.voice-justification-inline p {
  margin: 0;
}

.voice-justification-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.voice-justification-overlay.is-hidden {
  display: none;
}

.admin-overlay {
  position: fixed;
  inset: 0;
  z-index: 1150;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.admin-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 26, 56, 0.52);
}

.admin-overlay-dialog {
  position: relative;
  z-index: 1;
  width: min(42rem, 100%);
  max-height: calc(100vh - 2rem);
  display: grid;
  gap: 0.9rem;
  padding: 1.1rem 1.15rem;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 52px rgba(8, 42, 87, 0.22);
}

.scenario-upload-list {
  display: grid;
  gap: 0.75rem;
}

.scenario-upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem);
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
}

.scenario-upload-file {
  display: grid;
  gap: 0.25rem;
}

.scenario-upload-file strong {
  color: var(--brand-strong);
}

.scenario-upload-file code {
  width: fit-content;
}

.voice-justification-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 26, 56, 0.48);
}

.voice-justification-dialog {
  position: relative;
  z-index: 1;
  width: min(42rem, 100%);
  display: grid;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 52px rgba(8, 42, 87, 0.22);
}

.voice-justification-overlay.is-unsupported .voice-justification-dialog {
  border-color: rgba(143, 47, 52, 0.2);
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
}

.voice-justification-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.9rem;
}

body.voice-overlay-open {
  overflow: hidden;
}

body.admin-overlay-open {
  overflow: hidden;
}

input[type="text"],
input[type="password"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.82rem 0.95rem;
  font: inherit;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(11, 59, 117, 0.45);
  box-shadow: 0 0 0 4px rgba(241, 194, 50, 0.22);
  background: #fffefa;
}

input[type="radio"],
input[type="checkbox"] {
  accent-color: var(--brand);
}

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-strong) 100%);
  color: #fff;
  padding: 0.82rem 1.3rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(8, 42, 87, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

button:hover,
.button-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(8, 42, 87, 0.2);
}

button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.button-row {
  flex-wrap: wrap;
  align-items: flex-start;
}

body[data-device-profile="mobile"] .button-row {
  gap: 0.75rem;
}

body[data-device-profile="mobile"] .button-row > button,
body[data-device-profile="mobile"] .button-row > .button-link,
body[data-device-profile="mobile"] .toolbar-inline-form > button {
  min-height: 2.9rem;
}

body[data-device-profile="mobile"] .stage-form > button,
body[data-device-profile="mobile"] .stage-actions > button,
body[data-device-profile="mobile"] .stage-actions > .button-link {
  width: 100%;
}

.button-row.compact {
  gap: 0.6rem;
}

.language-switch {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.15rem;
}

body[data-device-profile="mobile"] .language-switch {
  flex-wrap: wrap;
}

.language-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(11, 59, 117, 0.16);
  border-radius: 999px;
  color: var(--brand);
  text-decoration: none;
  background: var(--panel-soft);
  font-weight: 700;
}

body[data-device-profile="mobile"] .language-switch a {
  flex: 1 1 4.25rem;
}

body[data-device-profile="mobile"] input[type="text"],
body[data-device-profile="mobile"] input[type="password"],
body[data-device-profile="mobile"] select,
body[data-device-profile="mobile"] textarea {
  font-size: 16px;
  padding: 0.9rem 0.95rem;
}

.language-switch a.active {
  background: var(--accent-soft);
  border-color: rgba(241, 194, 50, 0.45);
  color: var(--brand-strong);
}

.admin-subtle {
  max-width: 760px;
  padding: 0.9rem 1.1rem;
  background: rgba(255, 255, 255, 0.86);
  border-top-color: rgba(11, 59, 117, 0.35);
}

.admin-disclosure summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.95rem;
  list-style: none;
}

.admin-disclosure summary::-webkit-details-marker {
  display: none;
}

.admin-disclosure summary::before {
  content: "+";
  display: inline-block;
  width: 1rem;
  margin-right: 0.35rem;
  color: var(--accent);
  font-weight: 700;
}

.admin-disclosure[open] summary::before {
  content: "-";
}

.admin-disclosure-body {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(11, 59, 117, 0.1);
}

.notice {
  border-radius: 14px;
  padding: 0.95rem 1rem;
  background: var(--accent-soft);
  border: 1px solid rgba(241, 194, 50, 0.28);
  border-left: 5px solid var(--accent);
  margin-bottom: 1rem;
}

.notice-error {
  background: var(--danger-soft);
  border-color: rgba(143, 47, 52, 0.18);
  border-left-color: var(--danger);
}

.session-chip {
  display: grid;
  gap: 0.15rem;
  min-width: 11rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  padding: 0.7rem 0.95rem;
  font-size: 0.9rem;
  backdrop-filter: blur(6px);
}

body[data-device-profile="mobile"] .session-chip {
  min-width: min(100%, 12rem);
  flex: 1 1 11rem;
  padding: 0.65rem 0.85rem;
}

.session-chip span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.session-chip strong {
  color: #fff;
  font-weight: 700;
}

.section-block + .section-block {
  margin-top: 1rem;
}

.section-block p:last-child {
  margin-bottom: 0;
}

.scenario-box,
.choice-card,
.round-admin-card,
pre {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.scenario-box,
.round-admin-card {
  padding: 1rem 1.05rem;
  margin-bottom: 1rem;
}

.scenario-box {
  background:
    linear-gradient(180deg, rgba(11, 59, 117, 0.02) 0%, rgba(11, 59, 117, 0.05) 100%),
    #fff;
  border-left: 5px solid var(--accent);
}

.choices {
  display: grid;
  gap: 0.85rem;
  border: none;
  padding: 0;
  margin: 0;
}

.question-card {
  margin: 0;
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.comprehension-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
}

.comprehension-header h2 {
  margin-bottom: 0;
}

.attempt-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(13, 59, 120, 0.06);
  color: var(--brand-strong);
  white-space: nowrap;
}

.attempt-badge span {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.attempt-badge strong {
  font-size: 1rem;
  line-height: 1;
}

.consent-summary {
  display: grid;
  gap: 0.8rem;
  margin: 1.1rem 0;
}

.consent-summary-item {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.consent-summary-item p,
.consent-details p {
  margin: 0;
}

.consent-details {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 1.1rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
}

body[data-device-profile="mobile"] .consent-summary,
body[data-device-profile="mobile"] .consent-details,
body[data-device-profile="mobile"] .question-options,
body[data-device-profile="mobile"] .landing-intro {
  gap: 0.75rem;
}

body[data-device-profile="mobile"] .consent-summary-item,
body[data-device-profile="mobile"] .consent-details,
body[data-device-profile="mobile"] .scenario-box,
body[data-device-profile="mobile"] .question-card,
body[data-device-profile="mobile"] .likert-group,
body[data-device-profile="mobile"] .round-admin-card {
  padding: 0.9rem;
}

body[data-device-profile="mobile"] .attempt-badge {
  align-self: flex-start;
}

.likert-group {
  margin: 0.55rem 0 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.likert-group legend {
  padding: 0;
}

.likert-scale {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.45rem;
}

body[data-device-profile="mobile"] .likert-scale {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.likert-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.35rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.likert-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  margin: 0;
}

.likert-option span {
  font-weight: 700;
}

body[data-device-profile="mobile"] .likert-option {
  min-height: 4.2rem;
  padding: 0.55rem 0.3rem;
}

.likert-endpoints {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.86rem;
}

body[data-device-profile="mobile"] .likert-endpoints {
  flex-direction: column;
  gap: 0.35rem;
}

body[data-device-profile="mobile"] textarea {
  min-height: 8.5rem;
}

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

.question-card legend {
  padding: 0 0.2rem;
}

.question-card-flagged {
  border-color: rgba(143, 47, 52, 0.42);
  background: linear-gradient(180deg, #fff 0%, #fdf5f5 100%);
}

.question-options {
  display: grid;
  gap: 0.75rem;
}

.question-flag {
  margin: 0.75rem 0 0;
  color: var(--danger);
  font-weight: 700;
}

.choice-card {
  padding: 1rem 1rem 1rem 0.95rem;
  display: grid;
  gap: 0.4rem;
  background: var(--panel-soft);
  border-left: 4px solid transparent;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.choice-card:hover {
  transform: translateY(-1px);
  border-left-color: var(--brand);
  box-shadow: 0 12px 24px rgba(8, 42, 87, 0.08);
}

.round-choice-card {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.choice-copy {
  display: grid;
  gap: 0.35rem;
}

.choice-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  margin: 0;
}

body[data-device-profile="mobile"] .choice-card {
  padding: 0.9rem 0.9rem 0.9rem 0.85rem;
}

.choice-label {
  font-weight: 700;
  color: var(--brand);
}

.inline-check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.inline-check span {
  margin: 0;
  font-weight: 400;
}

body[data-device-profile="mobile"] .inline-check {
  gap: 0.65rem;
}

body[data-device-profile="mobile"] .inline-check input[type="checkbox"],
body[data-device-profile="mobile"] .inline-check input[type="radio"] {
  margin-top: 0.2rem;
}

.choice-card:focus-within,
.likert-option:focus-within {
  outline: 3px solid rgba(255, 221, 0, 0.45);
  outline-offset: 2px;
}

.choice-card.is-selected,
.choice-card:has(input[type="radio"]:checked),
.likert-option.is-selected,
.likert-option:has(input[type="radio"]:checked) {
  background: #001E45;
  border-color: #001E45;
  border-left-color: #FFDD00;
  box-shadow: 0 14px 28px rgba(0, 30, 69, 0.24);
  color: #FFDD00;
}

.choice-card.is-selected .choice-copy span,
.choice-card:has(input[type="radio"]:checked) .choice-copy span,
.choice-card.is-selected.inline-check span,
.choice-card:has(input[type="radio"]:checked).inline-check span,
.likert-option.is-selected span,
.likert-option:has(input[type="radio"]:checked) span {
  color: #FFDD00;
}

.filter-bar {
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.session-toolbar {
  overflow-x: auto;
  margin-bottom: 0.75rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-soft);
}

body[data-device-profile="mobile"] .session-toolbar {
  padding: 0.85rem;
}

.session-toolbar-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: max-content;
}

body[data-device-profile="mobile"] .session-toolbar-row {
  flex-wrap: wrap;
  min-width: 0;
}

.toolbar-group,
.toolbar-inline-form {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.65rem;
  align-items: center;
}

body[data-device-profile="mobile"] .toolbar-group,
body[data-device-profile="mobile"] .toolbar-inline-form,
body[data-device-profile="mobile"] .compact-select {
  flex-wrap: wrap;
}

.toolbar-divider {
  width: 1px;
  height: 2rem;
  background: rgba(11, 59, 117, 0.12);
}

body[data-device-profile="mobile"] .toolbar-divider,
body[data-device-profile="mobile"] .toolbar-spacer {
  display: none;
}

.toolbar-spacer {
  flex: 1 0 2rem;
}

.compact-check {
  gap: 0.4rem;
  margin-bottom: 0;
}

.compact-check span {
  margin-bottom: 0;
  font-weight: 600;
}

.compact-select {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.compact-select span {
  margin-bottom: 0;
  font-weight: 700;
}

.compact-select select {
  min-width: 9rem;
}

body[data-device-profile="mobile"] .compact-select select,
body[data-device-profile="mobile"] .grow,
body[data-device-profile="mobile"] .resume-access-card {
  width: 100%;
  min-width: 0;
}

.danger-outline {
  background: linear-gradient(180deg, #fff7f7 0%, #f7e8e8 100%);
  color: #8a2d33;
  border: 1px solid rgba(138, 45, 51, 0.22);
  box-shadow: none;
}

.danger-outline:hover {
  box-shadow: 0 10px 20px rgba(143, 47, 52, 0.08);
}

.session-toolbar-note {
  margin: 0 0 1rem;
}

.grow {
  flex: 1 1 280px;
}

.table-wrap {
  overflow-x: auto;
}

body[data-device-profile="mobile"] .table-wrap {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 14px;
  overflow: hidden;
}

thead {
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-strong) 100%);
  color: #fff;
}

th,
td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 0.8rem 0.6rem;
  vertical-align: top;
}

body[data-device-profile="mobile"] th,
body[data-device-profile="mobile"] td {
  padding: 0.75rem 0.55rem;
}

.table-sort-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.table-sort-link:hover {
  text-decoration: underline;
}

.table-sort-link.is-active {
  color: #fff3c8;
}

.sort-indicator {
  font-size: 0.82rem;
  opacity: 0.95;
}

tbody tr:nth-child(even) {
  background: rgba(11, 59, 117, 0.03);
}

.session-select-cell {
  width: 3.5rem;
}

.resume-access-card {
  min-width: 18rem;
}

.resume-access-copy,
.resume-route {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.copy-source {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.resume-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}

code {
  display: inline-block;
  padding: 0.18rem 0.4rem;
  border-radius: 8px;
  background: rgba(11, 59, 117, 0.06);
  color: var(--brand-strong);
  word-break: break-word;
}

pre {
  padding: 1rem;
  overflow-x: auto;
  white-space: pre-wrap;
  background: var(--panel-soft);
}

.secondary-button {
  background: linear-gradient(180deg, #f7f9fd 0%, #e9eef7 100%);
  border-color: rgba(11, 59, 117, 0.12);
  color: var(--brand-strong);
  box-shadow: none;
}

.secondary-button:hover {
  box-shadow: 0 10px 20px rgba(8, 42, 87, 0.08);
}

.small-button {
  padding: 0.58rem 0.95rem;
  font-size: 0.9rem;
}

.danger {
  background: var(--danger);
  box-shadow: 0 12px 24px rgba(143, 47, 52, 0.18);
}

details summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 700;
}

.round-panel {
  max-width: 860px;
}

.round-panel h2,
.narrow h2,
.panel h2 {
  color: var(--brand-strong);
}

body[data-device-profile="mobile"][data-screen-ratio="tall"] .landing-shell,
body[data-device-profile="mobile"][data-screen-ratio="tall"] .stack {
  gap: 0.85rem;
}

body[data-device-profile="mobile"][data-orientation="landscape"] .header-meta {
  gap: 0.55rem;
}

body[data-device-profile="mobile"][data-orientation="landscape"] .likert-scale {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

body[data-device-profile="mobile"][data-orientation="landscape"] .session-chip {
  min-width: 9.5rem;
}

@media (max-width: 720px) {
  .header-inner,
  .panel-header,
  .filter-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-meta {
    width: 100%;
    justify-content: flex-start;
  }

  .comprehension-header {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .likert-endpoints {
    flex-direction: column;
    gap: 0.35rem;
  }
}
