:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #eef4f7;
  --text: #17202a;
  --muted: #607083;
  --line: #d8e0e8;
  --primary: #006d77;
  --primary-dark: #004f59;
  --green: #2f855a;
  --amber: #b7791f;
  --red: #b42318;
  --ink: #243447;
  --shadow: 0 10px 26px rgba(29, 45, 68, .08);
}

* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(214, 231, 241, .78), transparent 32%),
    linear-gradient(180deg, #f7fafc 0%, var(--bg) 28%, #edf3f8 100%);
}

.topbar {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0;
}
h2 {
  margin-bottom: 0;
  font-size: 18px;
  letter-spacing: 0;
}
h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.system-status,
.mode-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #a7d8dd;
  border-radius: 8px;
  background: #e6f6f8;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.workspace {
  width: min(1480px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 22px 0 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.order-form,
.result-column {
  display: grid;
  gap: 18px;
  align-content: start;
}

.result-column {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  align-items: start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.workflow-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  grid-template-areas:
    "badge title"
    "badge meta";
  align-items: center;
  justify-items: start;
  gap: 2px 12px;
  min-height: 74px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  padding: 14px 18px;
  border-bottom: 3px solid transparent;
  color: #8a96a3;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-align: left;
}

.workflow-step span {
  grid-area: badge;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
}

.workflow-step strong,
.workflow-step small {
  display: block;
}

.workflow-step strong {
  grid-area: title;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.workflow-step small {
  grid-area: meta;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.workflow-step:last-child {
  border-right: 0;
}

.workflow-step.is-complete {
  color: var(--primary);
}

.workflow-step.is-complete strong {
  color: var(--primary-dark);
}

.workflow-step.is-active,
.workflow-step:focus-visible,
.workflow-step:hover {
  border-bottom-color: #0072bc;
  color: #0067ad;
}

.visual-explainer {
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
}

.visual-story {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.visual-story article {
  display: grid;
  grid-template-rows: 132px auto;
  min-height: 248px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.visual-story img {
  width: 100%;
  height: 132px;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
  background: #eef4f7;
}

.visual-story div {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 12px;
}

.visual-story strong,
.visual-story span {
  display: block;
}

.visual-story strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.visual-story span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-copy {
  max-width: 760px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stage-panel.is-active {
  animation: stage-reveal .22s ease;
}

.stage-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e5edf3;
}

.stage-actions span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.grid {
  display: grid;
  gap: 12px;
}
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.wide-field { margin-top: 12px; }

.sr-only-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

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

input:not([type="range"]):not([type="checkbox"]),
select,
textarea {
  width: 100%;
  border: 1px solid #c8d4df;
  border-radius: 6px;
  color: var(--text);
  background: #fff;
  padding: 10px 11px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 109, 119, .13);
}

textarea { resize: vertical; }

.switch-row,
.dry-run {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
}
.switch-row.compact {
  margin: 0;
  white-space: nowrap;
}

.lens-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.lens-option {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 8px;
  min-height: 176px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfdff;
  color: var(--ink);
  padding: 18px;
  text-align: left;
}

.lens-option.is-selected {
  border-color: #0072bc;
  box-shadow: inset 0 0 0 2px #0072bc, var(--shadow);
}

.lens-option strong,
.lens-option small {
  display: block;
}

.lens-option small {
  color: var(--muted);
}

.lens-diagram {
  position: relative;
  width: 100%;
  height: 78px;
  display: block;
  border: 1px solid #d4e0ea;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbfd, #edf3f8);
  overflow: hidden;
}

.lens-diagram::before,
.lens-diagram::after,
.lens-diagram i {
  content: "";
  position: absolute;
}

.lens-diagram::before {
  inset: 14px 18px;
  border: 2px solid #90a8bf;
  border-radius: 999px;
}

.lens-diagram i {
  top: 10px;
  bottom: 10px;
  left: 50%;
  width: 2px;
  background: rgba(122, 147, 171, .6);
  transform: translateX(-50%);
}

.lens-none::before {
  border-style: dashed;
}

.lens-none i {
  display: none;
}

.lens-mono::after {
  left: 18px;
  right: 18px;
  top: 50%;
  height: 2px;
  background: rgba(0, 109, 119, .32);
  transform: translateY(-50%);
}

.lens-progressive::after {
  inset: 18px 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(59, 130, 246, .14), rgba(0, 109, 119, .2), rgba(217, 119, 6, .14));
}

.lens-bifocal::after {
  left: 22px;
  right: 22px;
  bottom: 22px;
  height: 12px;
  border-top: 2px solid rgba(0, 109, 119, .3);
  border-radius: 0 0 14px 14px;
  background: rgba(217, 119, 6, .12);
}

@keyframes stage-reveal {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.challenge-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.priority-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) 340px;
  gap: 16px;
  align-items: start;
}

.challenge-flow {
  display: grid;
  gap: 12px;
  align-content: start;
}

.experience-mode-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
  gap: 12px;
  align-items: center;
  border: 1px solid #cfe0ea;
  border-radius: 8px;
  background: #f7fbfd;
  padding: 12px;
}

.experience-mode-selector {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.experience-mode {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 2px;
  border-color: #cbd8e3;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.experience-mode.is-selected {
  border-color: var(--primary);
  background: #eaf7f7;
  box-shadow: inset 0 0 0 2px rgba(0, 109, 119, .16);
  color: var(--primary-dark);
}

.experience-mode:disabled {
  opacity: .58;
  cursor: not-allowed;
}

.experience-mode strong,
.experience-mode small,
.device-readiness span {
  display: block;
}

.experience-mode strong {
  font-size: 13px;
}

.experience-mode small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.device-readiness {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.device-readiness i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #7c8b98;
}

.device-readiness[data-status="ready"] i {
  background: var(--green);
}

.device-readiness[data-status="warning"] i {
  background: #b7791f;
}

.challenge-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}

.challenge-progress button {
  height: 38px;
  min-height: 38px;
  border-color: #cfdae4;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.challenge-progress button.is-active,
.challenge-progress button.is-complete {
  border-color: var(--primary);
  background: #eefafa;
  color: var(--primary-dark);
}

.challenge-progress button.is-locked {
  opacity: .5;
  cursor: not-allowed;
}

.visual-test {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #dce6ee;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55);
}

.visual-test > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.92) contrast(.96);
}

.visual-test::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 31, 52, .18), transparent 42%, rgba(8, 31, 52, .2));
  pointer-events: none;
}

.visual-test-copy {
  position: absolute;
  z-index: 2;
  left: 18px;
  top: 18px;
  max-width: 420px;
  border-radius: 8px;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px);
  padding: 12px 14px;
}

.visual-test-copy h3 {
  margin: 0;
  font-size: 20px;
}

.visual-test-copy p:not(.eyebrow) {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.visual-choice-grid {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 10px;
}

.visual-choice-grid .challenge-choice {
  position: relative;
  min-height: 128px;
  overflow: hidden;
  display: grid;
  align-content: end;
  border: 2px solid rgba(255,255,255,.86);
  background: #fff;
  padding: 0;
  color: #fff;
  text-align: left;
}

.visual-choice-grid .challenge-choice img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.88);
}

.visual-choice-grid .challenge-choice span {
  position: relative;
  z-index: 1;
  display: block;
  background: linear-gradient(180deg, transparent, rgba(8,31,52,.82));
  padding: 48px 10px 10px;
  font-size: 13px;
  font-weight: 900;
}

.visual-choice-grid .challenge-choice.is-selected {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(0,109,119,.68), 0 16px 34px rgba(15, 35, 55, .28);
}

.visual-choice-grid .challenge-choice.is-selected::after,
.test-hotspot.is-selected::after,
.ab-card .softwide-choice.is-selected::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 10px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0,109,119,.78);
}

.test-hotspot {
  position: absolute;
  z-index: 3;
  min-width: 86px;
  min-height: 42px;
  border: 2px solid rgba(255,255,255,.9);
  border-radius: 999px;
  background: rgba(255,255,255,.86);
  color: var(--primary-dark);
  box-shadow: 0 12px 30px rgba(15, 35, 55, .2);
  text-align: center;
}

.test-hotspot.is-selected {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 5px rgba(0,109,119,.22), 0 14px 34px rgba(15, 35, 55, .3);
}

.hotspot-monitor { left: 14%; top: 36%; }
.hotspot-paper { left: 43%; bottom: 21%; }
.hotspot-phone { right: 18%; bottom: 18%; }
.hotspot-return { right: 18%; top: 35%; }
.hotspot-sign { left: 44%; top: 26%; }
.hotspot-nav { left: 46%; bottom: 20%; }
.hotspot-side { right: 10%; top: 42%; }
.hotspot-distance { left: 58%; top: 15%; }

.motion-test .visual-test-copy {
  max-width: 500px;
}

.motion-arena {
  position: absolute;
  z-index: 3;
  inset: 0;
}

.motion-target {
  --x: 50%;
  --y: 50%;
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 52px;
  min-width: 52px;
  height: 52px;
  min-height: 52px;
  border: 2px solid rgba(255,255,255,.9);
  border-radius: 999px;
  background: rgba(8,31,52,.2);
  box-shadow: 0 8px 24px rgba(8,31,52,.22), inset 0 0 0 9px rgba(255,255,255,.2);
  padding: 0;
  transform: translate(-50%, -50%);
  opacity: .68;
}

.motion-target.is-active {
  border-color: #fff;
  background: rgba(0,109,119,.92);
  box-shadow: 0 0 0 8px rgba(255,255,255,.28), 0 12px 30px rgba(8,31,52,.34);
  opacity: 1;
}

.motion-target.is-complete {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  border-color: rgba(255,255,255,.88);
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(255,255,255,.24);
  opacity: .9;
}

.motion-target:disabled {
  cursor: default;
}

.motion-cursor {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 24px;
  display: none;
  border: 3px solid #fff;
  border-radius: 999px;
  background: #0072bc;
  box-shadow: 0 0 0 5px rgba(0,114,188,.24), 0 8px 20px rgba(8,31,52,.28);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.motion-arena.is-motion .motion-cursor {
  display: block;
}

.motion-console {
  position: absolute;
  z-index: 5;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 8px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
  padding: 10px;
}

.motion-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe7ed;
}

.motion-progress i {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--primary);
  transition: width .2s ease;
}

.motion-console strong {
  color: var(--ink);
  font-size: 12px;
  white-space: nowrap;
}

.challenge-nav {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.challenge-nav span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.softwide-test {
  display: grid;
  align-content: end;
  padding: 86px 18px 18px;
  background: linear-gradient(180deg, #f7fafc, #e7eef5);
}

.softwide-test::after {
  display: none;
}

.ab-visual-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.ab-card {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  border: 1px solid #d7e2ec;
  border-radius: 8px;
  background: #fff;
}

.ab-card img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  filter: saturate(.86);
}

.ab-context {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 999px;
  background: rgba(255,255,255,.86);
  color: var(--primary-dark);
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ab-card::before,
.ab-card::after {
  content: "";
  position: absolute;
  top: 14%;
  bottom: 10%;
  width: 34%;
  border: 3px dashed rgba(255,255,255,.88);
  filter: drop-shadow(0 1px 0 rgba(0, 84, 122, .45));
  pointer-events: none;
}

.ab-card::before {
  left: 18%;
  border-right: 0;
  border-radius: 0 0 0 72%;
}

.ab-card::after {
  right: 18%;
  border-left: 0;
  border-radius: 0 0 72% 0;
}

.ab-card .softwide-choice {
  position: absolute;
  bottom: 12px;
  width: calc(50% - 18px);
  min-height: 42px;
  text-align: center;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
}

.ab-card .softwide-choice[data-soft-wide="soft"] {
  left: 12px;
}

.ab-card .softwide-choice[data-soft-wide="wide"] {
  right: 12px;
}

.challenge-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  padding: 16px;
}

.challenge-card h3,
.challenge-card p {
  margin-bottom: 0;
}

.challenge-card p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.choice-grid,
.task-strip {
  display: grid;
  gap: 10px;
}

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

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

.challenge-choice,
.challenge-action,
.softwide-choice {
  min-height: 52px;
  border-color: #cbd8e3;
  background: #fff;
  color: var(--ink);
  text-align: left;
  font-size: 13px;
}

.challenge-choice,
.challenge-action {
  display: grid;
  align-content: center;
}

.challenge-choice.is-selected,
.challenge-action.is-selected,
.softwide-choice.is-selected {
  border-color: var(--primary);
  background: #eefafa;
  color: var(--primary-dark);
  box-shadow: inset 0 0 0 2px rgba(0, 109, 119, .18);
}

.softwide-card {
  background:
    linear-gradient(90deg, rgba(0,109,119,.06), transparent 42%),
    linear-gradient(180deg, #fff, #fbfdff);
}

.softwide-grid {
  display: grid;
  gap: 8px;
}

.softwide-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) repeat(2, minmax(92px, .55fr));
  gap: 8px;
  align-items: center;
}

.softwide-row > span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.challenge-result {
  display: grid;
  gap: 12px;
  align-content: start;
  position: static;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  padding: 14px;
}

.clinical-workbench {
  margin-bottom: 14px;
}

.challenge-scoreboard {
  display: grid;
  gap: 8px;
}

.challenge-score {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 58px;
  gap: 8px;
  align-items: center;
  border: 1px solid #e0e8ef;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.challenge-score span {
  display: grid;
  place-items: center;
  min-height: 32px;
  border-radius: 999px;
  background: #eef8fa;
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 900;
}

.challenge-score strong {
  color: var(--ink);
  font-size: 13px;
}

.challenge-score i {
  grid-column: 1 / -1;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--green));
}

.challenge-score small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.challenge-insight {
  margin: 0;
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  background: #eefafa;
  color: var(--primary-dark);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
}

.challenge-json {
  border-top: 1px solid #dbe5ed;
  padding-top: 10px;
}

.challenge-json summary {
  font-size: 12px;
}

.challenge-json pre {
  max-height: 210px;
  margin-bottom: 0;
  font-size: 11px;
}

.stage-warning {
  min-height: 18px;
  flex: 1;
  margin: 0;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.is-invalid {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, .12);
}

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

.priority-card {
  display: grid;
  grid-template-columns: 42px 118px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 98px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  padding: 12px;
  cursor: grab;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.priority-card.is-dragging {
  opacity: .58;
  transform: scale(.99);
}

.priority-card.is-drop-target {
  border-color: #0072bc;
  box-shadow: inset 0 0 0 2px rgba(0, 114, 188, .24);
}

.rank-number {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 2px solid #0072bc;
  border-radius: 999px;
  background: #f7fbfe;
  color: #0067ad;
  font-size: 17px;
  font-weight: 900;
}

.activity-photo-wrap {
  position: relative;
  min-height: 76px;
  overflow: hidden;
  border: 1px solid #d7e3ed;
  border-radius: 8px;
  background: #f7fafc;
}

.activity-photo {
  width: 100%;
  height: 76px;
  display: block;
  object-fit: cover;
  filter: saturate(.92) contrast(.98);
}

.activity-photo-wrap span {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: var(--primary-dark);
  padding: 4px 8px;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.activity-photo-wrap b {
  color: var(--ink);
}

.priority-card-copy strong,
.priority-card-copy span,
.priority-card-copy small {
  display: block;
}

.priority-card-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.priority-card-copy small {
  margin-top: 8px;
  color: var(--primary-dark);
}

.score-strip {
  height: 7px;
  margin-top: 8px;
  border-radius: 999px;
  background: #e6edf2;
  overflow: hidden;
}

.score-strip i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #0ea5a4);
}

.rank-actions {
  display: grid;
  gap: 6px;
}

.rank-actions button {
  min-height: 34px;
  padding: 0 6px;
  border-color: #c8d4df;
  background: #f8fbfd;
  color: var(--primary-dark);
  font-size: 12px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

.score-console {
  display: grid;
  gap: 12px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 14px;
}

.score-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.text-button {
  min-height: 32px;
  padding: 4px 8px;
  border: 0;
  color: #0067ad;
  background: transparent;
  font-size: 12px;
}

.score-row {
  --score: 0%;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px 12px;
  overflow: hidden;
  border: 1px solid #e0e7ee;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(0, 109, 119, .12) var(--score), #fff var(--score));
  padding: 10px;
}

.score-row input {
  grid-column: 1 / -1;
}

.score-row output {
  color: var(--primary-dark);
  font-weight: 900;
  text-align: right;
}

.manual-priorities {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
}
summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
}

.priority-preview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.priority-chip {
  min-height: 74px;
  display: grid;
  gap: 4px;
  align-content: center;
  border: 1px solid #b9dce1;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  background: #f4fbfc;
  padding: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}
.priority-chip b {
  font-size: 18px;
  color: var(--primary-dark);
}
.priority-chip strong {
  display: block;
}
.priority-chip small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.design-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 14px;
  align-items: start;
  margin-bottom: 12px;
}

.scene-visualizer {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
}

.scene-tabs {
  display: grid;
  gap: 10px;
  align-content: start;
}

.scene-tabs button {
  position: relative;
  min-height: 92px;
  overflow: hidden;
  display: grid;
  align-content: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #102033;
  color: #fff;
  padding: 0;
  text-align: left;
}

.scene-tabs button.is-active {
  border-color: #0072bc;
  box-shadow: 0 0 0 3px rgba(0, 114, 188, .24);
}

.scene-tabs button img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .72;
}

.scene-tabs button span {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  background: linear-gradient(180deg, transparent, rgba(8,31,52,.86));
  padding: 38px 8px 8px;
  font-size: 11px;
  font-weight: 900;
}

.interactive-vision {
  --near: 50%;
  --wide: 120px;
  --blur: 10px;
  --corridor-stroke: 2.4px;
  position: relative;
  min-height: 540px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid #cad8e2;
  border-radius: 8px;
  background: #102033;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}

.interactive-vision > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 540px;
  display: block;
  object-fit: cover;
  opacity: 1;
  filter: saturate(1.02) contrast(1.04);
}

.field-grid,
.field-label,
.focus-window {
  display: none;
}

.interactive-vision::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 35%, rgba(255,255,255,.08) 66%, rgba(255,255,255,.28) 100%),
    linear-gradient(90deg, rgba(255,255,255,.26), transparent 18%, transparent 82%, rgba(255,255,255,.26));
  pointer-events: none;
  z-index: 1;
}

.progressive-overlay {
  position: absolute;
  z-index: 3;
  inset: 0 2% -1%;
  width: 96%;
  height: 101%;
  overflow: visible;
  pointer-events: none;
}

.lens-outline-path {
  fill: rgba(255,255,255,.035);
  stroke: rgba(255,255,255,.96);
  stroke-width: .9;
  vector-effect: non-scaling-stroke;
}

.fixed-guide-path {
  fill: none;
  stroke: rgba(255,255,255,.78);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-dasharray: 5 4;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 0 rgba(0, 84, 122, .42));
}

.corridor-path {
  fill: none;
  stroke: rgba(0, 113, 188, .98);
  stroke-width: var(--corridor-stroke);
  stroke-linecap: round;
  stroke-dasharray: 5 3;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,.88)) drop-shadow(0 0 5px rgba(0,84,122,.26));
}

.interactive-vision.hide-corridor .corridor-path {
  display: none;
}

.blur-zone {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  width: clamp(34%, calc(54% - var(--wide) / 7), 48%);
  backdrop-filter: blur(var(--blur));
  background: rgba(255,255,255,.08);
  pointer-events: none;
}

.blur-zone.left {
  left: 0;
  clip-path: polygon(0 0, 78% 0, 56% 34%, 42% 52%, 56% 72%, 78% 100%, 0 100%);
}

.blur-zone.right {
  right: 0;
  clip-path: polygon(22% 0, 100% 0, 100% 100%, 22% 100%, 44% 72%, 58% 52%, 44% 34%);
}

.balance-panel {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-items: center;
  gap: 14px 18px;
}

.balance-panel h3,
.balance-panel button {
  grid-column: 1 / -1;
  width: 100%;
}

.vertical-control {
  min-height: 270px;
  justify-items: center;
  text-align: center;
}

.vertical-control span {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.vertical-control strong {
  display: grid;
  place-items: center;
  width: 42px;
  height: 30px;
  margin: 0 auto;
  border-radius: 999px;
  background: #eef8fa;
  color: var(--primary-dark);
}

.vertical-control input[type="range"] {
  width: 34px;
  height: 178px;
  writing-mode: vertical-lr;
  direction: rtl;
}

.vertical-control small {
  max-width: 112px;
  font-size: 10px;
  line-height: 1.25;
}

.map-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.map-summary span {
  display: grid;
  gap: 3px;
  min-height: 62px;
  border: 1px solid #d8e4ec;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.map-summary b,
.map-summary small {
  display: block;
}

.map-summary b {
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 900;
}

.map-summary small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.corridor-line {
  position: absolute;
  top: 22%;
  bottom: 0;
  width: 44%;
  border: 3px dashed rgba(0, 109, 119, .58);
  border-top: 0;
  pointer-events: none;
}

.corridor-line.left {
  left: 17%;
  border-right: 0;
  border-radius: 0 0 0 70%;
  transform: skewY(-12deg);
}

.corridor-line.right {
  right: 17%;
  border-left: 0;
  border-radius: 0 0 70% 0;
  transform: skewY(12deg);
}

.interactive-vision.hide-corridor .corridor-line {
  display: none;
}

.sliders {
  display: grid;
  gap: 20px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 16px;
}
small {
  color: var(--muted);
  font-weight: 700;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 900;
}
button.primary {
  color: #fff;
  background: var(--primary);
}
button.primary:hover { background: var(--primary-dark); }
button.secondary {
  color: var(--primary-dark);
  background: #fff;
  border-color: #94c7cd;
}
button:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.result-column {
  position: static;
  height: auto;
}

.result-collapsible {
  padding: 0;
}

.result-collapsible > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

.result-collapsible > summary::-webkit-details-marker {
  display: none;
}

.result-collapsible > summary span,
.result-collapsible > summary strong,
.result-collapsible > summary small {
  display: block;
}

.result-collapsible > summary .eyebrow {
  margin: 0 0 4px;
  font-style: normal;
}

.result-collapsible > summary strong {
  color: var(--ink);
  font-size: 17px;
}

.result-collapsible > summary small {
  border: 1px solid #cfe0ea;
  border-radius: 999px;
  color: var(--primary-dark);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

.result-content {
  border-top: 1px solid var(--line);
  padding: 18px;
}

.result-top {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.result-top p:last-child {
  color: var(--muted);
  margin-bottom: 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.metric-grid div {
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px;
}
.metric-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.metric-grid strong {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 15px;
}

.priority-map {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
}
.map-row {
  display: grid;
  grid-template-columns: 32px minmax(150px, 1fr) minmax(90px, .8fr) 58px;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid #edf1f5;
}
.map-row:first-of-type { border-top: none; }
.map-row > b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eef8fa;
  color: var(--primary-dark);
  font-size: 13px;
}
.map-row strong,
.map-row span { display: block; }
.map-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.map-bar {
  height: 9px;
  border-radius: 999px;
  background: #e5edf2;
  overflow: hidden;
}
.map-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--green));
}

.clinical-note {
  margin-bottom: 14px;
  border-left: 4px solid var(--amber);
  border-radius: 6px;
  background: #fff8e6;
  color: #6b4b12;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
}

.technical {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
pre {
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid #cad6df;
  border-radius: 8px;
  padding: 12px;
  background: #101828;
  color: #e7f0f8;
  font-size: 12px;
}

.recent-orders {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}
.recent-order {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfdff;
}
.recent-order strong,
.recent-order span {
  display: block;
}
.recent-order span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.recent-order code {
  color: var(--primary-dark);
  font-weight: 900;
}

@media (max-width: 980px) {
  .design-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .workspace,
  .challenge-layout,
  .result-column,
  .priority-workbench {
    grid-template-columns: 1fr;
  }
  .lens-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .result-column {
    position: static;
  }
  .challenge-result {
    position: static;
  }
}

@media (max-width: 860px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }
  .workspace {
    width: min(100% - 20px, 1480px);
    padding-top: 12px;
  }
  .grid.three,
  .grid.five,
  .priority-preview,
  .lens-picker,
  .choice-grid,
  .task-strip,
  .visual-choice-grid,
  .ab-visual-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }
  .challenge-progress {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .experience-mode-bar {
    grid-template-columns: 1fr;
  }
  .visual-test {
    min-height: 620px;
  }
  .visual-test-copy {
    left: 12px;
    right: 12px;
    top: 12px;
    max-width: none;
  }
  .visual-choice-grid {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
  .visual-choice-grid .challenge-choice {
    min-height: 96px;
  }
  .ab-card,
  .ab-card img {
    min-height: 240px;
  }
  .challenge-nav {
    grid-template-columns: 1fr;
  }
  .workflow-steps {
    grid-template-columns: 1fr;
  }
  .workflow-step {
    padding: 12px 14px;
  }
  .priority-card,
  .map-row,
  .recent-order {
    grid-template-columns: 1fr;
  }
  .activity-photo-wrap {
    min-height: 150px;
  }
  .activity-photo {
    height: 150px;
  }
  .map-summary {
    grid-template-columns: 1fr;
  }
  .rank-actions {
    grid-template-columns: repeat(2, 1fr);
  }
  .softwide-row {
    grid-template-columns: 1fr;
  }
  .stage-actions,
  .actions {
    display: grid;
  }
  .scene-visualizer {
    grid-template-columns: 1fr;
  }
  .scene-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .interactive-vision,
  .interactive-vision > img {
    min-height: 320px;
  }
  .interactive-vision {
    width: 100%;
    aspect-ratio: auto;
  }
  .progressive-overlay {
    inset: 4px 8px 0;
    width: calc(100% - 16px);
    height: 100%;
  }
  .section-head {
    display: grid;
  }
  .switch-row.compact {
    white-space: normal;
  }
}

@media (max-width: 560px) {
  .challenge-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .experience-mode-selector {
    grid-template-columns: 1fr;
  }
  .motion-console {
    left: 12px;
    right: 12px;
    bottom: 12px;
    grid-template-columns: 1fr;
  }
  .motion-console strong {
    white-space: normal;
  }
  .visual-test {
    min-height: 700px;
  }
  .test-hotspot {
    min-width: 74px;
    min-height: 38px;
    padding-inline: 10px;
    font-size: 12px;
  }
  .hotspot-monitor { left: 8%; top: 34%; }
  .hotspot-paper { left: 34%; bottom: 28%; }
  .hotspot-phone { right: 8%; bottom: 18%; }
  .hotspot-return { right: 8%; top: 36%; }
  .hotspot-sign { left: 34%; top: 24%; }
  .hotspot-nav { left: 32%; bottom: 22%; }
  .hotspot-side { right: 6%; top: 44%; }
  .hotspot-distance { left: 50%; top: 15%; }
}

/* Marketing experience refresh */
:root {
  --bg: #f3f5f3;
  --surface: #ffffff;
  --surface-2: #edf1ee;
  --text: #18211f;
  --muted: #64706c;
  --line: #d9dfdc;
  --primary: #08766c;
  --primary-dark: #075c55;
  --green: #2d7d59;
  --amber: #b56c27;
  --red: #b42318;
  --ink: #1e2926;
  --accent: #d95f4b;
  --shadow: 0 16px 42px rgba(24, 33, 31, .08);
}

body {
  background: var(--bg);
  color: var(--text);
}

.topbar {
  min-height: 92px;
  flex-direction: row;
  align-items: center;
  padding: 18px max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid #e0e5e2;
  background: rgba(255, 255, 255, .96);
}

.brand-lockup {
  display: grid;
  gap: 2px;
}

.brand-lockup .eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 10px;
}

.brand-lockup h1 {
  color: #14201d;
  font-size: 20px;
  font-weight: 800;
}

.brand-lockup > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.system-status {
  display: none;
}

.professional-toggle {
  min-height: 40px;
  border: 1px solid #cfd7d3;
  background: #fff;
  color: #3c4945;
  font-size: 12px;
}

.workspace {
  width: min(1180px, calc(100vw - 40px));
  padding: 26px 0 56px;
  gap: 28px;
}

.order-form {
  gap: 22px;
}

.panel,
.stage-panel {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.workflow-steps {
  position: relative;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.workflow-steps::before {
  content: "";
  position: absolute;
  top: 21px;
  left: 16.66%;
  right: 16.66%;
  height: 1px;
  background: #cbd4d0;
}

.workflow-step {
  position: relative;
  grid-template-columns: 44px minmax(0, 1fr);
  min-height: 66px;
  border: 0;
  background: transparent;
  padding: 0 18px;
  color: #8d9894;
}

.workflow-step span {
  z-index: 1;
  width: 44px;
  height: 44px;
  border: 1px solid #cbd4d0;
  background: var(--bg);
  color: #7d8985;
}

.workflow-step strong {
  color: #596560;
  font-size: 14px;
}

.workflow-step small {
  color: #84908c;
  font-size: 11px;
}

.workflow-step.is-active,
.workflow-step.is-complete,
.workflow-step:focus-visible,
.workflow-step:hover {
  border: 0;
  color: var(--primary);
}

.workflow-step.is-active span,
.workflow-step.is-complete span {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.workflow-step.is-active strong,
.workflow-step.is-complete strong {
  color: #18312c;
}

.section-head {
  margin-bottom: 22px;
}

.section-head .eyebrow,
.visual-test-copy .eyebrow {
  margin-bottom: 7px;
  color: var(--accent);
  letter-spacing: .08em;
}

.section-head h2 {
  color: #15201d;
  font-size: 30px;
  line-height: 1.14;
}

.section-copy {
  margin-top: 8px;
  color: #68736f;
  font-size: 15px;
  font-weight: 500;
}

.lens-picker {
  gap: 12px;
  margin-top: 8px;
}

.lens-option {
  min-height: 142px;
  align-content: end;
  gap: 5px;
  border: 1px solid #d5dcd8;
  border-radius: 8px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 5px 20px rgba(30, 41, 38, .04);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.lens-option:hover {
  transform: translateY(-2px);
  border-color: #aebbb5;
}

.lens-option.is-selected {
  border-color: var(--primary);
  background: #f6fbf9;
  box-shadow: inset 0 0 0 2px var(--primary), 0 10px 24px rgba(8, 118, 108, .1);
}

.lens-option strong {
  font-size: 16px;
}

.lens-option small {
  font-size: 12px;
  font-weight: 600;
}

.lens-diagram {
  width: 58px;
  height: 42px;
  border: 0;
  border-radius: 6px;
  background: #edf2ef;
}

.lens-diagram::before {
  inset: 8px 7px;
}

.lens-diagram i {
  top: 6px;
  bottom: 6px;
}

.professional-prep,
.professional-order {
  margin-top: 18px;
  border-top: 1px solid #dbe1de;
  border-bottom: 1px solid #dbe1de;
  background: rgba(255, 255, 255, .45);
}

.professional-prep summary,
.professional-order summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 2px;
  color: #34413d;
  font-size: 13px;
}

.professional-prep summary span,
.professional-prep summary small,
.professional-order summary span,
.professional-order summary small {
  display: block;
}

.professional-prep summary small,
.professional-order summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.professional-prep-content,
.professional-order-content {
  padding: 4px 2px 18px;
}

.stage-actions {
  margin-top: 22px;
  padding-top: 0;
  border: 0;
}

.stage-actions > span {
  color: #77827e;
}

button {
  border-radius: 6px;
  padding: 10px 16px;
  font-weight: 750;
}

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

.challenge-flow {
  gap: 16px;
}

.challenge-progress {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid #d6ddda;
  scroll-margin-top: 18px;
}

.challenge-progress button {
  height: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #7b8782;
  font-size: 12px;
}

.challenge-progress button b {
  font: inherit;
}

.challenge-progress button span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid #c8d1cd;
  border-radius: 50%;
  font-size: 10px;
}

.challenge-progress button.is-active,
.challenge-progress button.is-complete {
  border-color: var(--primary);
  background: transparent;
  color: var(--primary-dark);
}

.challenge-progress button.is-complete span,
.challenge-progress button.is-active span {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.visual-test {
  min-height: 630px;
  border: 0;
  border-radius: 8px;
  background: #cfd8d3;
  box-shadow: var(--shadow);
}

.visual-test > img {
  filter: saturate(.96) contrast(1.02);
}

.visual-test::after {
  background: linear-gradient(180deg, rgba(9, 20, 17, .64) 0%, rgba(9, 20, 17, .06) 44%, rgba(9, 20, 17, .64) 100%);
}

.visual-test-copy {
  top: 32px;
  left: 34px;
  max-width: 610px;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  padding: 0;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .32);
}

.visual-test-copy h3 {
  max-width: 580px;
  color: #fff;
  font-size: 30px;
  line-height: 1.16;
}

.visual-test-copy p:not(.eyebrow) {
  color: rgba(255, 255, 255, .9);
  font-size: 14px;
  font-weight: 600;
}

.visual-choice-grid {
  left: 24px;
  right: 24px;
  bottom: 24px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.visual-choice-grid .challenge-choice {
  min-height: 164px;
  border: 2px solid rgba(255, 255, 255, .74);
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(9, 20, 17, .18);
}

.visual-choice-grid .challenge-choice span {
  padding: 68px 12px 12px;
  font-size: 14px;
}

.visual-choice-grid .challenge-choice.is-selected {
  border-color: #fff;
  box-shadow: 0 0 0 4px var(--accent), 0 16px 30px rgba(9, 20, 17, .28);
}

.visual-choice-grid .challenge-choice.is-selected::after,
.test-hotspot.is-selected::after,
.ab-card .softwide-choice.is-selected::after {
  background: var(--accent);
  box-shadow: 0 0 0 4px #fff;
}

.test-hotspot {
  min-width: 94px;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: #20312c;
  box-shadow: 0 10px 25px rgba(9, 20, 17, .22);
}

.test-hotspot.is-selected {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 5px rgba(217, 95, 75, .26), 0 12px 28px rgba(9, 20, 17, .28);
}

.transition-choice-grid {
  position: absolute;
  z-index: 3;
  left: 24px;
  right: 24px;
  bottom: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.transition-choice {
  position: relative;
  min-width: 0;
  min-height: 250px;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  align-content: stretch;
  gap: 0;
  border: 2px solid rgba(255, 255, 255, .82);
  border-radius: 6px;
  background: #fff;
  padding: 0 0 14px;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 14px 30px rgba(9, 20, 17, .22);
}

.transition-images {
  min-height: 176px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  margin-bottom: 12px;
}

.transition-images img {
  width: 100%;
  height: 100%;
  min-width: 0;
  object-fit: cover;
}

.transition-images img:first-child {
  border-right: 2px solid #fff;
}

.transition-choice strong,
.transition-choice small {
  display: block;
  overflow-wrap: anywhere;
  padding: 0 13px;
}

.transition-choice strong {
  font-size: 14px;
  line-height: 1.25;
}

.transition-choice small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.transition-choice.is-selected {
  border-color: #fff;
  background: #fff;
  box-shadow: 0 0 0 4px var(--accent), 0 18px 34px rgba(9, 20, 17, .3);
}

.transition-choice.is-selected::after {
  content: "✓";
  position: absolute;
  right: 12px;
  top: 12px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 3px #fff;
}

.motion-console {
  left: 24px;
  right: 24px;
  bottom: 24px;
  border: 0;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 12px 30px rgba(9, 20, 17, .2);
}

.motion-target.is-active {
  background: var(--accent);
}

.challenge-nav {
  grid-template-columns: auto 1fr auto;
  padding-top: 2px;
}

.challenge-warning {
  min-height: 18px;
}

.softwide-test {
  min-height: 630px;
  padding: 122px 24px 24px;
  background: #e9eeeb;
}

.softwide-test .visual-test-copy {
  color: var(--ink);
  text-shadow: none;
}

.softwide-test .visual-test-copy h3 {
  color: var(--ink);
}

.softwide-test .visual-test-copy p:not(.eyebrow) {
  color: var(--muted);
}

.ab-visual-grid {
  gap: 14px;
}

.ab-card {
  min-height: 390px;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(24, 33, 31, .1);
}

.ab-card img {
  min-height: 390px;
}

.ab-card .softwide-choice strong,
.ab-card .softwide-choice small {
  display: block;
  line-height: 1.2;
}

.ab-card .softwide-choice strong {
  font-size: 12px;
}

.ab-card .softwide-choice small {
  margin-top: 2px;
  color: inherit;
  font-size: 9px;
  font-weight: 700;
}

.ab-card .softwide-choice {
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, .82);
  background: rgba(255, 255, 255, .94);
  text-align: center;
  white-space: normal;
}

.ab-card .softwide-choice.is-selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.softwide-test .challenge-insight {
  display: none;
}

.design-grid {
  grid-template-columns: minmax(0, 1fr) 245px;
  gap: 18px;
}

.scene-visualizer {
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}

.scene-tabs button {
  min-height: 100px;
  border: 2px solid transparent;
  border-radius: 6px;
  background: #16231f;
}

.scene-tabs button.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(217, 95, 75, .22);
}

.interactive-vision {
  aspect-ratio: 4 / 3;
  width: 100%;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.interactive-vision > img {
  min-height: 0;
}

.balance-panel {
  align-self: stretch;
  border-left: 1px solid #d8dfdc;
  padding: 8px 0 8px 18px;
}

.map-line-legend {
  grid-column: 1 / -1;
  width: 100%;
  display: flex;
  gap: 12px;
  justify-content: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.map-line-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.map-line-legend span::before {
  content: "";
  width: 24px;
  border-top: 3px dashed currentColor;
}

.map-line-legend .recommended {
  color: #6d7773;
}

.map-line-legend .personalized {
  color: #008bd2;
}

.balance-panel h3 {
  color: #26332f;
  font-size: 14px;
}

.vertical-control strong {
  border-radius: 5px;
  background: #dcece7;
}

.professional-order {
  margin-top: 22px;
}

.result-column {
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  padding-top: 4px;
  border-top: 1px solid #d8dfdc;
}

.result-column .panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  padding: 18px;
}

@media (max-width: 900px) {
  .workspace {
    width: min(100% - 28px, 1180px);
  }

  .topbar {
    padding: 16px 20px;
  }

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

  .visual-test {
    min-height: 620px;
  }

  .visual-choice-grid {
    display: flex;
    overflow-x: auto;
    padding: 4px;
    scroll-snap-type: x mandatory;
  }

  .visual-choice-grid .challenge-choice {
    min-width: 160px;
    scroll-snap-align: start;
  }

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

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

  .scene-tabs {
    grid-template-columns: repeat(5, minmax(100px, 1fr));
    overflow-x: auto;
    padding: 3px;
  }

  .scene-tabs button {
    min-height: 84px;
  }

  .scene-tabs button span {
    overflow-wrap: anywhere;
  }

  .balance-panel {
    min-height: auto;
    border-top: 1px solid #d8dfdc;
    border-left: 0;
    padding: 20px 0 0;
  }

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

@media (max-width: 620px) {
  .topbar {
    min-height: 0;
    flex-direction: row;
    align-items: center;
    padding: 14px;
  }

  .brand-lockup h1 {
    font-size: 15px;
  }

  .brand-lockup > span {
    display: none;
  }

  .professional-toggle {
    min-height: 36px;
    max-width: 122px;
    padding: 7px 9px;
    font-size: 10px;
  }

  .workspace {
    width: calc(100% - 20px);
    padding-top: 16px;
  }

  .workflow-steps::before {
    top: 17px;
  }

  .workflow-step {
    grid-template-columns: 34px;
    grid-template-areas:
      "badge"
      "title";
    justify-items: center;
    gap: 7px;
    padding: 0 2px;
    text-align: center;
  }

  .workflow-step span {
    width: 34px;
    height: 34px;
  }

  .workflow-step strong {
    font-size: 10px;
  }

  .workflow-step small {
    display: none;
  }

  .section-head h2 {
    font-size: 24px;
  }

  .section-copy {
    font-size: 13px;
  }

  .lens-picker {
    gap: 8px;
  }

  .lens-option {
    min-height: 132px;
    padding: 14px;
  }

  .lens-option strong {
    font-size: 14px;
  }

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

  .stage-actions {
    grid-template-columns: 1fr auto;
  }

  .stage-actions .stage-warning {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .challenge-progress button {
    height: 45px;
    min-height: 45px;
    gap: 5px;
    padding: 6px 2px;
    font-size: 9px;
  }

  .challenge-progress button span {
    width: 19px;
    height: 19px;
  }

  .visual-test {
    min-height: 590px;
  }

  .visual-test-copy {
    top: 22px;
    left: 20px;
    right: 20px;
  }

  .visual-test-copy h3 {
    font-size: 23px;
  }

  .visual-choice-grid {
    left: 14px;
    right: 14px;
    bottom: 18px;
  }

  .test-hotspot {
    min-width: 78px;
    min-height: 40px;
    padding-inline: 10px;
    font-size: 11px;
  }

  .hotspot-monitor { left: 6%; top: 38%; }
  .hotspot-paper { left: 23%; bottom: 27%; }
  .hotspot-phone { right: 5%; bottom: 18%; }
  .hotspot-return { right: 6%; top: 40%; }

  .motion-console {
    left: 14px;
    right: 14px;
    bottom: 14px;
    grid-template-columns: 1fr;
  }

  .softwide-test {
    min-height: auto;
    padding: 118px 12px 14px;
  }

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

  .ab-card,
  .ab-card img {
    min-height: 290px;
  }

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

  .challenge-nav span {
    grid-column: 1 / -1;
    grid-row: 1;
  }

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

  .scene-tabs {
    grid-template-columns: repeat(5, minmax(92px, 1fr));
    overflow-x: auto;
    padding: 3px;
  }

  .scene-tabs button {
    min-height: 74px;
  }

  .interactive-vision,
  .interactive-vision > img {
    min-height: 360px;
  }

  .professional-prep summary,
  .professional-order summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Clear priority ranking and progressive-map geometry */
.rank-guide {
  position: absolute;
  z-index: 3;
  left: 24px;
  right: 24px;
  bottom: 202px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.rank-guide span {
  min-height: 58px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-areas:
    "rank role"
    "rank value";
  align-items: center;
  gap: 1px 9px;
  border: 1px solid rgba(255, 255, 255, .48);
  border-radius: 6px;
  background: rgba(18, 31, 27, .62);
  color: #fff;
  padding: 8px 10px;
  backdrop-filter: blur(8px);
}

.rank-guide b {
  grid-area: rank;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  font-size: 13px;
}

.rank-guide em {
  grid-area: role;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.rank-guide strong {
  grid-area: value;
  overflow: hidden;
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-guide span.is-filled {
  border-color: rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .94);
  color: var(--ink);
}

.rank-guide span.is-filled b {
  background: var(--accent);
  color: #fff;
}

.rank-guide span.is-filled strong {
  color: var(--ink);
}

.ranked-day-test .challenge-choice.is-selected::after {
  content: attr(data-rank);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 0 0 4px #fff;
}

.lens-outline-path {
  fill: none;
  stroke: rgba(255, 255, 255, .98);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .26));
}

.fixed-guide-path {
  stroke: rgba(255, 255, 255, .9);
  stroke-width: 3;
  stroke-dasharray: 10 4;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 1px rgba(0, 53, 80, .48));
}

.corridor-area-path {
  fill: rgba(0, 126, 190, .045);
  stroke: none;
}

.corridor-path {
  stroke: #008bd2;
  stroke-width: var(--corridor-stroke);
  stroke-dasharray: 10 4;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 1px #fff) drop-shadow(0 1px 4px rgba(0, 56, 92, .48));
}

.progressive-overlay image {
  opacity: .98;
}

.interactive-vision.hide-corridor .fixed-guide-path,
.interactive-vision.hide-corridor .corridor-area-path {
  display: none;
}

@media (max-width: 760px) {
  .transition-choice-grid {
    grid-template-columns: 1fr;
  }

  .transition-choice {
    min-height: 120px;
    grid-template-columns: 42% minmax(0, 1fr);
    grid-template-rows: 1fr 1fr;
    padding: 0;
  }

  .transition-images {
    grid-row: 1 / -1;
    min-height: 120px;
    margin: 0 12px 0 0;
  }
}

#storageStatus[data-status="ready"] {
  color: var(--green);
}

#storageStatus[data-status="error"] {
  color: var(--red);
}

.save-status {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.save-status[data-status="working"] {
  color: var(--primary-dark);
}

.save-status[data-status="success"] {
  color: var(--green);
}

.save-status[data-status="error"] {
  color: var(--red);
}

@media (max-width: 620px) {
  .rank-guide {
    left: 14px;
    right: 14px;
    bottom: 198px;
    gap: 5px;
  }

  .rank-guide span {
    min-height: 62px;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 1px 5px;
    padding: 6px;
  }

  .rank-guide b {
    width: 23px;
    height: 23px;
  }

  .rank-guide em {
    font-size: 8px;
  }

  .rank-guide strong {
    font-size: 9px;
  }
}

/* Control VR: vinculación única, envío remoto y recepción de resultados. */
.vr-admin-panel {
  grid-column: 1 / -1;
  overflow: hidden;
  border-color: #c9dfe4;
  background:
    linear-gradient(135deg, rgba(0, 109, 119, .055), transparent 36%),
    var(--surface);
}

.vr-admin-head {
  align-items: center;
}

.vr-admin-intro {
  max-width: 780px;
  margin: 10px 0 16px;
  color: var(--muted);
}

.vr-connection-pill,
.vr-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border: 1px solid #ccd8df;
  border-radius: 999px;
  padding: 4px 10px;
  color: #526675;
  background: #f3f6f8;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.vr-connection-pill::before {
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.vr-connection-pill[data-state="ready"] {
  color: #176b4a;
  border-color: #a7d9c3;
  background: #ecf9f2;
}

.vr-connection-pill[data-state="error"] {
  color: #986115;
  border-color: #e8c98d;
  background: #fff8e8;
}

.vr-pairing-box {
  margin-bottom: 16px;
  border: 1px solid #cfe0e5;
  border-radius: 8px;
  background: rgba(250, 253, 254, .92);
}

.vr-pairing-box > summary {
  padding: 12px 14px;
  color: var(--primary-dark);
  cursor: pointer;
  font-weight: 900;
}

.vr-inline-form {
  display: grid;
  grid-template-columns: minmax(180px, .75fr) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 4px 14px 12px;
}

.vr-inline-form label,
.vr-session-form label {
  display: grid;
  gap: 5px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.vr-form-message {
  display: block;
  min-height: 18px;
  padding: 0 14px 10px;
}

.vr-form-message[data-state="success"] { color: var(--green); }
.vr-form-message[data-state="error"] { color: var(--red); }

.vr-admin-grid {
  display: grid;
  grid-template-columns: minmax(300px, .75fr) minmax(440px, 1.25fr);
  gap: 16px;
  align-items: start;
}

.vr-session-form,
.vr-latest {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  padding: 14px;
}

.vr-session-form {
  display: grid;
  gap: 11px;
}

.vr-block-heading {
  display: grid;
  gap: 2px;
  margin-bottom: 8px;
}

.vr-block-heading strong { color: var(--ink); font-size: 15px; }
.vr-block-heading small { font-size: 11px; }

.vr-patient-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 10px;
}

.vr-session-form .vr-form-message { padding: 0; }

.vr-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, .65fr) auto auto;
  gap: 8px;
  margin: 10px 0;
}

.vr-filters input,
.vr-filters select,
.vr-filters button { min-height: 38px; }

.vr-session-summary {
  margin: -2px 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.vr-session-list {
  display: grid;
  gap: 8px;
  max-height: 470px;
  overflow: auto;
  padding-right: 3px;
}

.vr-session-card,
.vr-empty {
  border: 1px solid #d9e3e8;
  border-radius: 8px;
  background: #fbfdfe;
  padding: 11px;
}

.vr-empty {
  color: var(--muted);
  text-align: center;
}

.vr-session-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.vr-session-main > div { min-width: 0; }
.vr-session-main strong,
.vr-session-main span { display: block; }
.vr-session-main strong { color: var(--ink); }
.vr-session-main > div span { margin-top: 2px; color: var(--muted); font-size: 11px; }

.vr-status[data-tone="running"] { color: #075d82; border-color: #9ed2e3; background: #e9f7fb; }
.vr-status[data-tone="attention"] { color: #986115; border-color: #e8c98d; background: #fff8e8; }
.vr-status[data-tone="ready"],
.vr-status[data-tone="done"] { color: #176b4a; border-color: #a7d9c3; background: #ecf9f2; }

.vr-session-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
}

.vr-session-meta code {
  color: var(--primary-dark);
  font-family: "Cascadia Mono", Consolas, monospace;
}

.vr-session-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 9px;
}

.vr-session-actions button {
  min-height: 34px;
  padding: 6px 11px;
}

.vr-session-detail {
  margin-top: 12px;
  border: 1px solid #b9d7e3;
  border-radius: 10px;
  background: #f6fbfd;
  padding: 14px;
}

.vr-session-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 11px;
  border-bottom: 1px solid #d5e5eb;
}

.vr-session-detail-head div,
.vr-session-detail-head small,
.vr-session-detail-head strong { display: block; }
.vr-session-detail-head small { color: var(--primary); font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.vr-session-detail-head strong { margin-top: 2px; color: var(--ink); font-size: 17px; }

.vr-detail-identity {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 0;
}

.vr-detail-identity > span,
.vr-detail-identity small,
.vr-detail-identity strong { display: block; min-width: 0; }
.vr-detail-identity small { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.vr-detail-identity strong { margin-top: 2px; overflow-wrap: anywhere; color: var(--ink); font-size: 12px; }
.vr-detail-identity .vr-status { display: inline-flex; }

.vr-detail-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.vr-detail-metrics span {
  min-width: 0;
  border: 1px solid #d7e6eb;
  border-radius: 7px;
  background: #fff;
  padding: 9px;
}

.vr-detail-metrics b,
.vr-detail-metrics small { display: block; overflow-wrap: anywhere; }
.vr-detail-metrics b { color: var(--primary-dark); font-size: 13px; }
.vr-detail-metrics small { margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 800; }

.vr-detail-pending,
.vr-detail-notes {
  margin: 0;
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  padding: 10px;
  font-size: 11px;
}

.vr-detail-notes { margin-top: 8px; }
.vr-detail-notes strong { display: block; margin-bottom: 3px; color: var(--ink); }
.vr-detail-id { display: block; margin-top: 9px; color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }

.vr-assign-form {
  display: grid;
  grid-template-columns: 1fr minmax(130px, .65fr) auto;
  gap: 7px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #cedbe1;
}

.vr-assign-form:not(.is-compact) {
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  margin-top: 0;
  padding: 0 0 12px;
  border-top: 0;
  border-bottom: 1px dashed #cedbe1;
}

.vr-assign-form label { color: var(--muted); font-size: 10px; font-weight: 800; }
.vr-assign-form label input { display: block; width: 100%; margin-top: 4px; }
.vr-editor-heading { display: grid; grid-column: 1 / -1; gap: 2px; }
.vr-editor-heading strong { color: var(--ink); font-size: 13px; }
.vr-editor-heading small { color: var(--muted); font-size: 10px; font-weight: 600; }

.admin-provider-mark.vr { background: #e8f7fb; color: var(--primary-dark); }
.admin-vr-device-card { align-self: stretch; }
.admin-vr-pairing-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
}
.admin-vr-pairing-guide span {
  position: relative;
  display: grid;
  min-height: 66px;
  align-content: center;
  gap: 3px;
  border: 1px solid #d4e5eb;
  border-radius: 8px;
  background: linear-gradient(145deg, #fff 0%, #eff8fa 100%);
  padding: 9px 10px 9px 45px;
}
.admin-vr-pairing-guide b {
  position: absolute;
  left: 11px;
  top: 50%;
  display: grid;
  width: 25px;
  height: 25px;
  transform: translateY(-50%);
  place-items: center;
  border-radius: 50%;
  background: var(--primary-dark);
  color: #fff;
  font-size: 11px;
}
.admin-vr-pairing-guide small { color: var(--primary); font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.admin-vr-pairing-guide strong { color: var(--ink); font-size: 10px; line-height: 1.35; }
.admin-vr-pairing-form { display: grid; grid-template-columns: .72fr 1fr 1fr auto; gap: 9px; align-items: end; }
.admin-vr-pairing-form label { display: grid; gap: 5px; color: var(--ink); font-size: 11px; font-weight: 800; }
.admin-vr-pairing-form select,
.admin-vr-pairing-form input,
.admin-vr-pairing-form button { min-height: 39px; }
.admin-vr-pairing-form #vrPairingCode { color: var(--primary-dark); font-size: 18px; font-weight: 900; letter-spacing: .12em; text-align: center; }
.admin-vr-device-card .vr-form-message { padding: 7px 0 3px; }
.admin-vr-list-head { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.admin-vr-list-head button { min-height: 34px; }
.admin-vr-device-list { display: grid; gap: 7px; margin-top: 9px; }
.admin-vr-device-row { display: grid; grid-template-columns: 10px minmax(150px, 1fr) minmax(210px, 1.2fr) minmax(110px, .65fr) auto; gap: 9px; align-items: end; border: 1px solid var(--line); border-radius: 7px; background: #fbfdfe; padding: 9px; }
.admin-vr-device-row div,
.admin-vr-device-row span { min-width: 0; }
.admin-vr-device-row strong,
.admin-vr-device-row small { display: block; overflow-wrap: anywhere; }
.admin-vr-device-row strong { color: var(--ink); font-size: 11px; }
.admin-vr-device-row small { color: var(--muted); font-size: 9px; }
.admin-vr-device-state { width: 8px; height: 8px; border-radius: 50%; background: #aebbc1; }
.admin-vr-device-state[data-online="true"] { background: var(--green); box-shadow: 0 0 0 3px rgba(23, 107, 74, .12); }
.admin-vr-device-customer { display: grid; gap: 3px; color: var(--muted); font-size: 9px; font-weight: 800; }
.admin-vr-device-customer select { width: 100%; min-height: 34px; color: var(--ink); font-size: 10px; }
.admin-vr-device-row button { min-height: 34px; white-space: nowrap; }
.admin-vr-device-empty { border: 1px dashed var(--line); border-radius: 7px; color: var(--muted); padding: 11px; text-align: center; font-size: 10px; }

.vr-profile-summary {
  margin: 2px 0 10px;
  border: 1px solid #b8d8e4;
  border-radius: 10px;
  background: linear-gradient(145deg, #fff 0%, #eef8fb 100%);
  padding: 16px;
}

.vr-profile-summary > small:first-child { color: var(--primary); font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.vr-profile-summary h3 { margin: 4px 0 7px; color: var(--primary-dark); font-size: 21px; }
.vr-profile-summary p { margin: 4px 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.vr-profile-summary .vr-profile-headline { color: var(--ink); font-size: 13px; font-weight: 800; }
.vr-profile-summary h4 { margin: 14px 0 6px; color: var(--ink); font-size: 11px; }

.vr-profile-facts,
.vr-profile-breakdown { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 12px; }
.vr-profile-facts span,
.vr-profile-breakdown span { border: 1px solid #d7e6eb; border-radius: 7px; background: rgba(255,255,255,.85); padding: 10px; }
.vr-profile-facts small,
.vr-profile-facts strong,
.vr-profile-facts em,
.vr-profile-breakdown small,
.vr-profile-breakdown strong,
.vr-profile-breakdown em { display: block; }
.vr-profile-facts small,
.vr-profile-breakdown small { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.vr-profile-facts strong,
.vr-profile-breakdown strong { margin-top: 3px; color: var(--ink); font-size: 12px; }
.vr-profile-facts em,
.vr-profile-breakdown em { margin-top: 3px; color: var(--muted); font-size: 9px; font-style: normal; }
.vr-profile-note { margin-top: 10px; border-left: 3px solid var(--primary); background: #fff; padding: 9px 10px; color: var(--ink); font-size: 11px; line-height: 1.45; }
.vr-profile-method { display: block; margin-top: 12px; color: var(--muted); font-size: 9px; }
.vr-profile-empty { margin: 0; }

.vr-technical-detail { margin: 10px 0; border: 1px solid #d7e6eb; border-radius: 8px; background: #fff; padding: 9px 11px; }
.vr-technical-detail summary { cursor: pointer; color: var(--primary-dark); font-size: 11px; font-weight: 800; }
.vr-technical-detail .vr-detail-metrics { margin-top: 10px; }

.vr-assign-form input,
.vr-assign-form button { min-height: 36px; }

@media (max-width: 980px) {
  .vr-admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .vr-inline-form,
  .vr-patient-grid,
  .vr-filters,
  .vr-assign-form { grid-template-columns: 1fr; }
  .vr-assign-form:not(.is-compact),
  .vr-profile-facts,
  .vr-profile-breakdown { grid-template-columns: 1fr; }
  .vr-detail-identity,
  .vr-detail-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vr-session-main { align-items: stretch; flex-direction: column; }
  .vr-status { align-self: flex-start; }
  .admin-vr-pairing-form,
  .admin-vr-pairing-guide,
  .admin-vr-device-row { grid-template-columns: 1fr; }
  .admin-vr-device-state { display: none; }
}

/* Authenticated optical workspace */
body.auth-pending {
  overflow: hidden;
}

body.auth-pending > .topbar,
body.auth-pending > .workspace,
body.auth-pending > .print-report,
body.auth-pending > .login-shell {
  visibility: hidden;
}

.auth-splash {
  display: none;
}

body.auth-pending > .auth-splash {
  position: fixed;
  z-index: 110;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 30%, rgba(0, 109, 119, .09), transparent 34%),
    #edf2f5;
}

.auth-splash > div {
  display: grid;
  justify-items: center;
  gap: 10px;
  color: var(--muted);
  text-align: center;
}

.auth-splash img {
  width: 190px;
  height: auto;
  margin-bottom: 14px;
}

.auth-splash span {
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .09em;
}

.auth-splash strong {
  color: var(--ink);
  font-size: 15px;
}

body.auth-locked {
  overflow: hidden;
}

.vr-admin-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid #8fc9ce;
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--primary-dark);
  background: #eef9fa;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.vr-admin-shortcut:hover,
.vr-admin-shortcut:focus-visible {
  border-color: var(--primary);
  background: #e1f5f6;
}

.login-shell,
.password-shell {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #edf2f5;
}

.password-shell {
  background: rgba(226, 235, 240, .97);
}

.password-panel {
  width: min(520px, 100%);
}

.password-panel label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.login-panel {
  width: min(440px, 100%);
  display: grid;
  gap: 22px;
  border: 1px solid #cbd8df;
  border-top: 5px solid var(--primary);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 55px rgba(17, 47, 63, .16);
  padding: 30px;
}

.login-panel > img {
  width: 180px;
  height: auto;
}

.login-panel h1 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 25px;
}

.login-panel p {
  margin-bottom: 0;
  color: var(--muted);
}

.login-panel > small {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label,
.login-form input {
  width: 100%;
}

.login-error {
  min-height: 18px;
  margin: 0;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
}

.session-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 12px;
  border-right: 1px solid var(--line);
}

.session-user span,
.session-user strong,
.session-user small {
  display: block;
}

.session-user strong {
  color: var(--ink);
  font-size: 12px;
}

.session-user small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.session-user button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 11px;
}

input[readonly] {
  border-color: #d5e0e5;
  background: #f3f6f7;
  color: #395466;
}

.report-email-actions {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  background: #f7fafb;
}

.report-email-actions label,
.report-email-actions input {
  width: 100%;
}

.report-email-buttons {
  display: flex;
  align-items: end;
  gap: 8px;
}

.report-email-buttons button {
  min-height: 42px;
  white-space: nowrap;
}

.report-email-actions > small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
}

.report-email-actions > small[data-status="success"] { color: var(--green); }
.report-email-actions > small[data-status="error"] { color: var(--red); }

.recent-order-actions {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.recent-order-actions button {
  min-height: 32px;
  padding: 5px 9px;
  font-size: 11px;
}

@media (max-width: 760px) {
  .session-user {
    width: 100%;
    justify-content: space-between;
    border-right: 0;
    padding-right: 0;
  }

  .report-email-actions {
    grid-template-columns: 1fr;
  }

  .report-email-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .report-email-actions > small {
    grid-column: auto;
  }

  .recent-order-actions {
    justify-items: stretch;
  }
}

/* Guided distance, duration and benefit tests */
.distance-pair-test > img {
  filter: saturate(.86) contrast(.94) brightness(.72);
}

.distance-pair-workspace {
  position: absolute;
  z-index: 3;
  inset: 164px 24px 24px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.pair-rank-guide {
  position: static;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.distance-pair-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.distance-pair-choice {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(128px, .85fr);
  border: 2px solid rgba(255, 255, 255, .8);
  border-radius: 6px;
  background: rgba(255, 255, 255, .97);
  padding: 0;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 12px 26px rgba(9, 20, 17, .22);
}

.pair-images {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
}

.pair-images::after {
  content: "↔";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 12px rgba(9, 20, 17, .24);
}

.pair-images img {
  width: 100%;
  height: 100%;
  min-width: 0;
  object-fit: cover;
}

.pair-images img:first-child {
  border-right: 2px solid #fff;
}

.pair-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 14px;
}

.pair-copy strong,
.pair-copy small {
  overflow-wrap: anywhere;
}

.pair-copy strong {
  font-size: 14px;
  line-height: 1.25;
}

.pair-copy small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.3;
}

.distance-pair-choice.is-selected {
  border-color: #fff;
  box-shadow: 0 0 0 4px var(--accent), 0 18px 34px rgba(9, 20, 17, .3);
}

.distance-pair-choice.is-selected::after {
  content: attr(data-rank);
  position: absolute;
  right: 10px;
  top: 10px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 0 0 3px #fff;
}

.duration-choice-grid {
  position: absolute;
  z-index: 3;
  left: 24px;
  right: 24px;
  bottom: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.duration-choice {
  position: relative;
  min-width: 0;
  min-height: 292px;
  overflow: hidden;
  display: grid;
  align-content: end;
  border: 2px solid rgba(255, 255, 255, .82);
  border-radius: 6px;
  background: #1c2d28;
  padding: 0;
  color: #fff;
  text-align: left;
  box-shadow: 0 14px 30px rgba(9, 20, 17, .24);
}

.duration-choice > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.9) contrast(1.02);
}

.duration-choice > span {
  position: relative;
  z-index: 2;
  min-height: 92px;
  display: grid;
  align-content: end;
  gap: 4px;
  background: linear-gradient(180deg, transparent, rgba(9, 20, 17, .94) 42%);
  padding: 42px 15px 15px;
}

.duration-choice strong,
.duration-choice small {
  display: block;
  overflow-wrap: anywhere;
}

.duration-choice strong {
  font-size: 15px;
}

.duration-choice small {
  color: rgba(255, 255, 255, .8);
  font-size: 10px;
  font-weight: 700;
}

.duration-choice.is-selected {
  border-color: #fff;
  box-shadow: 0 0 0 4px var(--accent), 0 18px 34px rgba(9, 20, 17, .3);
}

.duration-choice.is-selected::after {
  content: "✓";
  position: absolute;
  z-index: 3;
  right: 12px;
  top: 12px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 0 0 3px #fff;
}

.softwide-test .ab-card::before,
.softwide-test .ab-card::after {
  display: none;
}

.softwide-test .ab-card .softwide-choice {
  left: 12px;
  right: 12px;
  width: auto;
  min-height: 62px;
  display: grid;
  align-content: center;
  padding: 9px 12px;
  text-align: left;
}

.softwide-test .ab-card .softwide-choice[data-soft-wide="soft"] {
  bottom: 84px;
}

.softwide-test .ab-card .softwide-choice[data-soft-wide="wide"] {
  bottom: 12px;
}

.softwide-test .ab-card .softwide-choice strong {
  font-size: 13px;
}

.softwide-test .ab-card .softwide-choice small {
  margin-top: 3px;
  font-size: 9px;
  line-height: 1.25;
}

@media (max-width: 760px) {
  .distance-pair-test {
    min-height: 700px;
  }

  .distance-pair-workspace {
    inset: 156px 14px 16px;
    gap: 9px;
  }

  .pair-rank-guide {
    gap: 6px;
  }

  .distance-pair-grid {
    gap: 8px;
  }

  .distance-pair-choice {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(86px, 1fr) auto;
  }

  .pair-copy {
    min-height: 58px;
    align-content: start;
    padding: 8px 9px;
  }

  .pair-copy strong {
    font-size: 11px;
  }

  .pair-copy small {
    font-size: 8px;
  }

  .duration-choice-grid {
    top: 154px;
    bottom: 18px;
    left: 14px;
    right: 14px;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 9px;
  }

  .duration-choice {
    min-height: 0;
    grid-template-columns: 42% minmax(0, 1fr);
    align-content: stretch;
  }

  .duration-choice > img {
    position: relative;
    min-height: 100%;
  }

  .duration-choice > span {
    min-height: 0;
    align-content: center;
    background: #16231f;
    padding: 12px;
  }

  .duration-choice strong {
    font-size: 12px;
  }

  .softwide-test .ab-card,
  .softwide-test .ab-card img {
    min-height: 330px;
  }
}

/* Four-stage journey and visual habit builder */
.workflow-steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.workflow-steps::before {
  left: 12.5%;
  right: 12.5%;
}

.lens-option {
  min-height: 286px;
  grid-template-rows: 180px auto auto;
  align-content: start;
  overflow: hidden;
  gap: 6px;
  padding: 0 16px 16px;
}

.lens-option strong,
.lens-option small {
  width: 100%;
}

.lens-option strong {
  margin-top: 7px;
}

.lens-photo {
  position: relative;
  width: calc(100% + 32px);
  height: 180px;
  margin-left: -16px;
  display: block;
  overflow: hidden;
  background: #e8eeeb;
}

.lens-photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(10, 25, 21, .25));
}

.lens-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 32%;
  transition: transform .25s ease;
}

.lens-option:hover .lens-photo img,
.lens-option.is-selected .lens-photo img {
  transform: scale(1.025);
}

.lens-option.is-selected .lens-photo::before {
  content: "✓";
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .9);
}

.habits-head {
  align-items: center;
}

.habit-toolbar {
  display: flex;
  gap: 8px;
}

.icon-action {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #cfd8d4;
  border-radius: 6px;
  background: #fff;
  color: var(--primary-dark);
  padding: 0;
  font-size: 21px;
  line-height: 1;
}

.icon-action:disabled {
  opacity: .35;
}

.habit-experience {
  display: grid;
  gap: 14px;
}

.habit-percentage-summary {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  align-items: center;
  gap: 22px;
  border: 1px solid #d4dfda;
  border-radius: 6px;
  background: #f3f7f5;
  padding: 16px 18px;
  transition: border-color .18s ease, background .18s ease;
}

.habit-percentage-summary span,
.habit-percentage-summary small,
.habit-percentage-summary strong {
  display: block;
}

.habit-percentage-summary small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.habit-percentage-summary strong {
  margin-top: 2px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.habit-percentage-summary p {
  margin: 0;
  color: #53635d;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.habit-percentage-summary.is-complete {
  border-color: #71a497;
  background: #edf7f3;
}

.habit-percentage-summary.is-complete p {
  color: #12695e;
}

.habit-total-track {
  height: 12px;
  overflow: hidden;
  border: 1px solid #d4ddd9;
  border-radius: 6px;
  background: #e3e9e6;
}

.habit-total-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #3978a8;
  transition: width .18s ease, background .18s ease;
}

.habit-total-track.is-complete i {
  background: #147d72;
}

.habit-scene-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.habit-scene {
  position: relative;
  min-width: 0;
  min-height: 310px;
  overflow: hidden;
  display: grid;
  align-content: end;
  border: 2px solid transparent;
  border-radius: 6px;
  background: #15231f;
  padding: 0;
  color: #fff;
  text-align: left;
  box-shadow: 0 10px 24px rgba(14, 29, 24, .13);
}

.habit-scene::after {
  content: "";
  position: absolute;
  inset: 32% 0 0;
  background: linear-gradient(180deg, transparent, rgba(8, 20, 16, .95));
}

.habit-scene img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.86) contrast(1.02);
  transition: transform .2s ease;
}

.habit-scene > span {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 4px;
  padding: 18px 13px 8px;
}

.habit-scene strong,
.habit-scene small {
  display: block;
  overflow-wrap: anywhere;
}

.habit-scene strong {
  font-size: 14px;
}

.habit-scene small {
  color: rgba(255, 255, 255, .75);
  font-size: 9px;
  font-weight: 700;
}

.habit-scene output {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  min-width: 50px;
  min-height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 999px;
  background: rgba(11, 27, 22, .78);
  padding: 4px 9px;
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  backdrop-filter: blur(6px);
}

.habit-percent-control {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 34px minmax(48px, 1fr) 34px;
  align-items: center;
  gap: 7px;
  padding: 0 10px 14px;
}

.habit-percent-control button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 50%;
  background: rgba(8, 24, 19, .78);
  padding: 0;
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
  backdrop-filter: blur(5px);
}

.habit-percent-control button:hover:not(:disabled),
.habit-percent-control button:focus-visible {
  border-color: #fff;
  background: #fff;
  color: #173f36;
}

.habit-percent-control button:disabled {
  opacity: .32;
}

.habit-percent-control input[type="range"] {
  width: 100%;
  height: 26px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.habit-percent-control input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #4eb6a7 0 var(--range-progress, 0%), rgba(255, 255, 255, .38) var(--range-progress, 0%) 100%);
}

.habit-percent-control input[type="range"]::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  margin-top: -7px;
  appearance: none;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #147d72;
  box-shadow: 0 2px 8px rgba(4, 20, 15, .35);
}

.habit-percent-control input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .38);
}

.habit-percent-control input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: 3px;
  background: #4eb6a7;
}

.habit-percent-control input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #147d72;
  box-shadow: 0 2px 8px rgba(4, 20, 15, .35);
}

.habit-scene:hover img,
.habit-scene:focus-visible img {
  transform: scale(1.035);
}

.habit-scene.is-used {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(219, 99, 74, .2), 0 14px 28px rgba(14, 29, 24, .18);
}

.habit-result-band {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-top: 1px solid #dbe3df;
  border-bottom: 1px solid #dbe3df;
  padding: 12px 0;
}

.habit-result-band > span,
.habit-result-band small,
.habit-result-band strong {
  display: block;
}

.habit-result-band small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.habit-result-band strong {
  margin-top: 3px;
  color: var(--ink);
  font-size: 15px;
}

.habit-mix {
  min-width: min(58%, 650px);
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.habit-mix span {
  display: grid;
  grid-template-columns: 8px auto;
  align-items: center;
  gap: 5px;
  color: #43504c;
  font-size: 10px;
  font-weight: 800;
}

.habit-mix i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--mix-color, var(--primary));
}

.habit-mix span[data-activity="pc"] { --mix-color: #147d72; }
.habit-mix span[data-activity="driving"] { --mix-color: #d96c4b; }
.habit-mix span[data-activity="phone"] { --mix-color: #3978a8; }
.habit-mix span[data-activity="reading"] { --mix-color: #a37a28; }
.habit-mix span[data-activity="outdoor"] { --mix-color: #65784c; }

@media (max-width: 900px) {
  .lens-option {
    min-height: 270px;
  }

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

  .habit-scene {
    min-height: 230px;
  }
}

@media (max-width: 620px) {
  .workflow-step strong {
    font-size: 9px;
  }

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

  .lens-option {
    min-height: 232px;
    grid-template-rows: 138px auto auto;
    padding: 0 11px 12px;
  }

  .lens-photo {
    width: calc(100% + 22px);
    height: 138px;
    margin-left: -11px;
  }

  .lens-option strong {
    font-size: 12px;
  }

  .lens-option small {
    font-size: 9px;
  }

  .habits-head {
    align-items: flex-start;
  }

  .habit-percentage-summary {
    grid-template-columns: auto 1fr;
    gap: 10px 16px;
  }

  .habit-percentage-summary p {
    grid-column: 1 / -1;
    white-space: normal;
  }

  .habit-scene-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .habit-scene {
    min-height: 250px;
  }

  .habit-scene strong {
    font-size: 11px;
  }

  .habit-result-band {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .habit-mix {
    min-width: 0;
    justify-content: flex-start;
  }

  .habits-stage .stage-actions {
    display: grid;
    grid-template-columns: auto 1fr auto;
  }

  .habits-stage .stage-warning {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 440px) {
  .habit-scene-grid {
    grid-template-columns: 1fr;
  }

  .habit-scene {
    min-height: 230px;
  }
}

/* Simplified effort and improvement tests */
.effort-choice-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.effort-choice-grid .duration-choice {
  min-height: 270px;
}

.goal-choice-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.goal-choice {
  position: relative;
  min-width: 0;
  min-height: 360px;
  overflow: hidden;
  display: grid;
  align-content: end;
  border: 2px solid #fff;
  border-radius: 6px;
  background: #172722;
  padding: 0;
  color: #fff;
  text-align: left;
  white-space: normal;
  box-shadow: 0 12px 26px rgba(9, 20, 17, .18);
}

.goal-choice > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.88) contrast(1.02);
  transition: transform .2s ease;
}

.goal-choice > span {
  position: relative;
  z-index: 2;
  min-height: 116px;
  display: grid;
  align-content: end;
  gap: 6px;
  background: linear-gradient(180deg, transparent, rgba(8, 21, 17, .96) 40%);
  padding: 48px 16px 18px;
}

.goal-choice strong,
.goal-choice small {
  display: block;
  overflow-wrap: anywhere;
}

.goal-choice strong {
  font-size: 15px;
  line-height: 1.25;
}

.goal-choice small {
  color: rgba(255, 255, 255, .78);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

.goal-choice:hover > img,
.goal-choice:focus-visible > img {
  transform: scale(1.025);
}

.goal-choice.is-selected {
  border-color: #fff;
  background: #172722;
  color: #fff;
  box-shadow: 0 0 0 4px var(--accent), 0 18px 34px rgba(9, 20, 17, .26);
}

.goal-choice.is-selected::after {
  content: "✓";
  position: absolute;
  z-index: 4;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 0 0 3px #fff;
}

@media (max-width: 900px) {
  .effort-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(190px, auto));
  }

  .effort-choice-grid .duration-choice {
    min-height: 190px;
  }
}

@media (max-width: 760px) {
  .softwide-test {
    min-height: 690px;
  }

  .goal-choice-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

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

  .effort-choice-grid .duration-choice {
    min-height: 0;
  }

  .goal-choice {
    min-height: 170px;
    grid-template-columns: 42% minmax(0, 1fr);
    align-content: stretch;
  }

  .goal-choice > img {
    position: relative;
    min-height: 100%;
  }

  .goal-choice > span {
    min-height: 0;
    align-content: center;
    background: #172722;
    padding: 14px;
  }
}

@media (max-width: 520px) {
  .adaptive-demand-test {
    min-height: 920px;
  }

  .effort-choice-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, minmax(0, 1fr));
  }

  .effort-choice-grid .duration-choice {
    grid-template-columns: 40% minmax(0, 1fr);
    align-content: stretch;
  }

  .effort-choice-grid .duration-choice > img {
    position: relative;
    min-height: 100%;
  }

  .effort-choice-grid .duration-choice > span {
    min-height: 0;
    align-content: center;
    background: #16231f;
    padding: 12px;
  }
}

/* Lentimop brand system */
:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #eef3f7;
  --text: #212934;
  --muted: #515b69;
  --line: #dbe2ea;
  --primary: #35baf2;
  --primary-dark: #0a1e2c;
  --green: #65bc7b;
  --amber: #c0830b;
  --ink: #0a1e2c;
  --accent: #35baf2;
  --shadow: 0 14px 34px rgba(10, 30, 44, .09);
}

body {
  font-family: "Source Sans 3", "Source Sans Pro", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

h1,
h2,
h3,
button,
.workflow-step strong {
  font-family: "Montserrat", "Segoe UI", sans-serif;
}

.topbar {
  min-height: 96px;
  border-top: 4px solid var(--primary);
  border-bottom: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 5px 18px rgba(10, 30, 44, .05);
}

.brand-lockup {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 20px;
}

.lentimop-logo {
  width: 176px;
  height: auto;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-product {
  min-width: 0;
  display: grid;
  gap: 3px;
  border-left: 1px solid #c7d1dc;
  padding-left: 20px;
}

.brand-lockup .brand-product h1 {
  margin: 0;
  color: var(--primary-dark);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.15;
}

.brand-product span {
  color: #72849c;
  font-size: 11px;
  font-weight: 700;
}

.professional-toggle {
  border-color: #a8dff6;
  background: #fff;
  color: var(--primary-dark);
}

.professional-toggle:hover,
.professional-toggle:focus-visible {
  border-color: var(--primary);
  background: #eef9fe;
}

.workflow-steps::before {
  background: #cbd6e1;
}

.workflow-step {
  color: #7f8795;
}

.workflow-step span {
  border-color: #bdc9d5;
  background: var(--bg);
  color: #72849c;
}

.workflow-step strong {
  color: #515b69;
}

.workflow-step small {
  color: #7f8795;
}

.workflow-step.is-active span,
.workflow-step.is-complete span,
.challenge-progress button.is-active span,
.challenge-progress button.is-complete span {
  border-color: var(--primary);
  background: var(--primary);
  color: #071a27;
}

.workflow-step.is-active strong,
.workflow-step.is-complete strong,
.challenge-progress button.is-active,
.challenge-progress button.is-complete {
  color: var(--primary-dark);
}

.section-head .eyebrow,
.visual-test-copy .eyebrow,
.eyebrow {
  color: #1172c1;
}

.section-head h2,
.section-head h3,
.habit-result-band strong {
  color: var(--primary-dark);
}

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

.lens-option {
  border-color: var(--line);
  box-shadow: 0 7px 20px rgba(10, 30, 44, .05);
}

.lens-option:hover {
  border-color: #91cfe9;
}

.lens-option.is-selected {
  border-color: var(--primary);
  background: #f2fbff;
  box-shadow: inset 0 0 0 2px var(--primary), 0 12px 26px rgba(17, 114, 193, .12);
}

.lens-option.is-selected::after,
.distance-pair-choice.is-selected::after,
.duration-choice.is-selected::after,
.goal-choice.is-selected::after {
  background: var(--primary);
  color: var(--primary-dark);
}

.professional-prep,
.professional-order {
  border-color: var(--line);
  background: rgba(255, 255, 255, .58);
}

.habit-percentage-summary {
  border-color: #cfdae5;
  background: #f2f6f9;
}

.habit-percentage-summary.is-complete {
  border-color: #79cdec;
  background: #eef9fe;
}

.habit-percentage-summary.is-complete p {
  color: #1172c1;
}

.habit-total-track {
  border-color: #c9d5df;
  background: #dbe2ea;
}

.habit-total-track i,
.habit-total-track.is-complete i {
  background: var(--primary);
}

.habit-scene,
.duration-choice,
.goal-choice,
.scene-tabs button {
  background: var(--primary-dark);
}

.habit-scene::after,
.duration-choice > span,
.goal-choice > span {
  background: linear-gradient(180deg, transparent, rgba(10, 30, 44, .97) 44%);
}

.habit-scene.is-used {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(53, 186, 242, .24), 0 14px 28px rgba(10, 30, 44, .16);
}

.habit-percent-control button {
  background: rgba(10, 30, 44, .86);
}

.habit-percent-control button:hover:not(:disabled),
.habit-percent-control button:focus-visible {
  color: var(--primary-dark);
}

.habit-percent-control input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, var(--primary) 0 var(--range-progress, 0%), rgba(255, 255, 255, .4) var(--range-progress, 0%) 100%);
}

.habit-percent-control input[type="range"]::-webkit-slider-thumb,
.habit-percent-control input[type="range"]::-moz-range-thumb {
  background: #1172c1;
}

.habit-percent-control input[type="range"]::-moz-range-progress {
  background: var(--primary);
}

.habit-result-band {
  border-color: var(--line);
}

.habit-mix span {
  color: #515b69;
}

.habit-mix span[data-activity="pc"] { --mix-color: #35baf2; }
.habit-mix span[data-activity="driving"] { --mix-color: #e8875b; }
.habit-mix span[data-activity="phone"] { --mix-color: #1172c1; }
.habit-mix span[data-activity="reading"] { --mix-color: #8c70b3; }
.habit-mix span[data-activity="outdoor"] { --mix-color: #65bc7b; }

.distance-pair-choice.is-selected,
.duration-choice.is-selected,
.goal-choice.is-selected {
  border-color: #fff;
  box-shadow: 0 0 0 4px var(--primary), 0 18px 34px rgba(10, 30, 44, .26);
}

.visual-test {
  background: #dbe2ea;
  box-shadow: 0 14px 34px rgba(10, 30, 44, .13);
}

.visual-test::after {
  background: linear-gradient(180deg, rgba(10, 30, 44, .68) 0%, rgba(10, 30, 44, .05) 44%, rgba(10, 30, 44, .7) 100%);
}

.softwide-test {
  background: #eef3f7;
}

.softwide-test .visual-test-copy h3 {
  color: var(--primary-dark);
}

.softwide-test .visual-test-copy p:not(.eyebrow) {
  color: var(--muted);
}

button.primary {
  background: var(--primary-dark);
}

button.primary:hover,
button.primary:focus-visible {
  background: #1172c1;
}

button.secondary {
  border-color: #9bdaf3;
  color: var(--primary-dark);
}

button.secondary:hover,
button.secondary:focus-visible {
  border-color: var(--primary);
  background: #eef9fe;
}

.balance-panel {
  border-color: var(--line);
}

.scene-tabs button.is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(53, 186, 242, .24);
}

@media (max-width: 620px) {
  .topbar {
    padding: 12px 14px;
  }

  .brand-lockup {
    gap: 12px;
  }

  .lentimop-logo {
    width: 130px;
  }

  .brand-product {
    padding-left: 12px;
  }

  .brand-lockup .brand-product h1 {
    font-size: 11px;
  }

  .brand-product span {
    display: none;
  }
}

@media (max-width: 470px) {
  .brand-product {
    display: none;
  }
}

/* Printable personalized report */
.report-actions {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.report-actions span,
.report-actions strong,
.report-actions small {
  display: block;
}

.report-actions strong {
  color: var(--ink);
  font-size: 14px;
}

.report-actions small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.report-actions button {
  flex: 0 0 auto;
}

.print-report {
  display: none;
}

@media (max-width: 620px) {
  .report-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

.app-section-tabs {
  position: sticky;
  z-index: 45;
  top: 0;
  width: min(1480px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 16px auto 0;
  border: 1px solid #cddbe2;
  border-radius: 10px;
  background: rgba(247, 251, 252, .96);
  box-shadow: 0 9px 26px rgba(20, 51, 68, .11);
  padding: 6px;
  backdrop-filter: blur(16px);
}

.app-section-tabs.has-admin {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.app-section-tabs button {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: #526a77;
  font-size: 12px;
}

.app-section-tabs button span {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid #b9cbd3;
  border-radius: 999px;
  font-size: 9px;
}

.app-section-tabs button:hover,
.app-section-tabs button:focus-visible {
  border-color: #9ecbd0;
  background: #eef8f9;
  color: var(--primary-dark);
}

.app-section-tabs button.is-active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 109, 119, .2);
}

.app-section-tabs button.is-active span {
  border-color: rgba(255, 255, 255, .58);
}

.result-column {
  display: contents;
}

[data-app-panel="professional"],
[data-app-panel="vr"],
[data-app-panel="config"] {
  grid-column: 1 / -1;
}

.report-archive-panel {
  order: -1;
}

.report-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-top: 16px;
}

.report-search-form label {
  display: grid;
  gap: 6px;
  color: #38505e;
  font-size: 12px;
  font-weight: 800;
}

.report-search-form input {
  min-height: 44px;
  font-size: 14px;
}

.report-search-form button {
  min-height: 44px;
}

.report-search-summary {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.report-search-results .recent-order {
  min-height: 72px;
  padding: 13px 15px;
}

.report-search-results .recent-order small {
  display: block;
  margin-top: 5px;
  color: #0875a0;
  font-size: 10px;
  font-weight: 800;
}

.general-test-main {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 13px;
}

.general-test-source {
  width: 44px;
  height: 34px;
  display: grid !important;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #9bcbd0;
  border-radius: 7px;
  background: #e9f7f8;
  color: #075e68;
  font-size: 10px !important;
  font-weight: 950 !important;
  letter-spacing: .05em;
}

.general-test-source[data-source="vr"] {
  border-color: #aabce1;
  background: #eef2fb;
  color: #365f9e;
}

.general-test-row[data-test-source="vr"] {
  border-left: 4px solid #5278bc;
}

.general-test-row[data-test-source="web"] {
  border-left: 4px solid var(--primary);
}

.store-settings-panel {
  display: grid;
  gap: 18px;
}

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

.store-setting-card {
  display: grid;
  align-content: start;
  gap: 16px;
  border: 1px solid #cddce3;
  border-radius: 9px;
  background: #fafdfe;
  padding: 20px;
}

.store-setting-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.store-setting-heading > div,
.store-setting-heading strong,
.store-setting-heading small {
  display: block;
}

.store-setting-heading strong {
  color: var(--ink);
  font-size: 15px;
}

.store-setting-heading small,
.logo-file-field small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.settings-icon {
  width: 48px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #e3f3f5;
  color: var(--primary-dark);
  font-size: 10px;
  font-weight: 950;
}

.branding-preview {
  min-height: 108px;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  border: 1px solid #d7e3e8;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.branding-preview img {
  width: 100%;
  max-width: 180px;
  max-height: 72px;
  object-fit: contain;
  object-position: left center;
}

.branding-preview span,
.branding-preview strong,
.branding-preview small {
  display: block;
}

.branding-preview strong {
  color: var(--ink);
}

.branding-preview small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.logo-file-field {
  display: grid;
  gap: 7px;
  color: #38505e;
  font-size: 12px;
  font-weight: 800;
}

.store-setting-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.store-setting-message {
  min-height: 17px;
  color: var(--muted);
}

.store-setting-message[data-state="success"] { color: var(--green); }
.store-setting-message[data-state="error"] { color: var(--red); }

.vr-device-settings .vr-inline-form {
  margin: 0;
}

body[data-app-section-active="admin"] .workspace {
  display: none;
}

.admin-workspace {
  width: min(1480px, calc(100vw - 32px));
  margin: 0 auto 54px;
  display: grid;
  gap: 18px;
  border-top: 4px solid var(--primary);
  border-radius: 10px;
  background: #edf4f7;
  box-shadow: 0 18px 46px rgba(20, 51, 68, .12);
  padding: 24px;
}

.admin-titlebar,
.admin-card-head,
.admin-searchbar,
.admin-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-titlebar p:last-child {
  max-width: 760px;
  margin: 7px 0 0;
  color: var(--muted);
}

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

.admin-card {
  display: grid;
  align-content: start;
  gap: 14px;
  border: 1px solid #cddce3;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(22, 53, 72, .06);
  padding: 20px;
}

.admin-card label {
  display: grid;
  gap: 6px;
  color: #38505e;
  font-size: 12px;
  font-weight: 800;
}

.admin-card input,
.admin-card select {
  width: 100%;
}

.admin-card-head {
  justify-content: flex-start;
}

.admin-card-head > div {
  display: grid;
  gap: 3px;
}

.admin-card-head strong {
  color: var(--ink);
  font-size: 16px;
}

.admin-card-head small,
.admin-note {
  color: var(--muted);
  font-size: 11px;
}

.admin-provider-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e2f4f5;
  color: var(--primary-dark);
  font-weight: 950;
}

.admin-provider-mark.omega {
  background: #e9effa;
  color: #365f9e;
  font-size: 22px;
}

.admin-provider-mark.email {
  background: #e6f5ee;
  color: #17734b;
  font-size: 20px;
}

.admin-email-card {
  grid-column: 1 / -1;
}

.admin-email-primary-grid,
.admin-email-smtp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-email-smtp-grid {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.admin-field-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-card details {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
}

.admin-card details summary {
  cursor: pointer;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}

.admin-card details .admin-field-pair {
  margin-top: 12px;
}

.admin-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.admin-message {
  min-height: 17px;
  color: var(--muted);
}

.admin-message[data-state="success"] { color: var(--green); }
.admin-message[data-state="error"] { color: var(--red); }

.admin-duration-field {
  display: flex;
  align-items: center;
  gap: 9px;
}

.admin-duration-field input {
  width: 110px;
}

.admin-duration-field small {
  color: var(--muted);
  font-weight: 700;
}

.customer-manager {
  gap: 16px;
}

.customer-manager-head {
  justify-content: space-between;
}

.admin-inline-form,
.admin-searchbar {
  display: flex;
  gap: 9px;
}

.admin-inline-form input,
.admin-searchbar input {
  min-width: 250px;
}

.admin-searchbar {
  justify-content: flex-start;
}

.admin-searchbar input {
  width: min(480px, 100%);
}

.customer-admin-list {
  display: grid;
  gap: 8px;
}

.customer-admin-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.25fr) minmax(90px, .55fr) minmax(75px, .45fr) minmax(150px, 1fr) minmax(125px, .7fr) minmax(120px, .65fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #d9e3e8;
  border-radius: 7px;
  padding: 12px;
}

.customer-admin-row > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.customer-admin-row small {
  color: #738692;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.customer-admin-row strong,
.customer-admin-row span {
  overflow: hidden;
  color: #304754;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-identity strong {
  color: var(--ink);
  font-size: 13px;
}

.customer-status > span {
  justify-self: start;
  border-radius: 999px;
  padding: 4px 8px;
  background: #edf8f2;
  color: #176b4a;
  font-weight: 900;
}

.customer-status > span[data-active="false"] {
  background: #f4f0ee;
  color: #8c443d;
}

.customer-row-actions {
  display: flex !important;
  flex-direction: column;
}

.customer-row-actions button {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 10px;
}

.admin-design-manager,
.admin-session-trace {
  gap: 16px;
}

.admin-design-head {
  justify-content: space-between;
}

.admin-design-list {
  display: grid;
  gap: 8px;
  max-height: 620px;
  overflow: auto;
  padding-right: 3px;
}

.admin-design-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) minmax(125px, .7fr) minmax(135px, .75fr) minmax(160px, .9fr) minmax(110px, .6fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #d9e3e8;
  border-left: 4px solid var(--primary);
  border-radius: 7px;
  background: #fbfdfe;
  padding: 12px;
}

.admin-design-row > div,
.admin-design-identity,
.admin-design-identity strong,
.admin-design-identity span,
.admin-design-row small,
.admin-design-row code { min-width: 0; display: block; }
.admin-design-row small { color: #738692; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.admin-design-row span,
.admin-design-row code { margin-top: 3px; overflow: hidden; color: #304754; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.admin-design-identity strong { overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.admin-design-identity b { color: var(--primary-dark); }
.admin-design-row code { color: #076d93; font-family: "Cascadia Mono", Consolas, monospace; font-weight: 800; }

.admin-design-detail {
  border: 1px solid #aad4e2;
  border-radius: 9px;
  background: #f4fafc;
  padding: 15px;
}

.admin-design-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #d4e5eb;
}

.admin-design-detail-head div,
.admin-design-detail-head small,
.admin-design-detail-head strong { display: block; }
.admin-design-detail-head small { color: var(--primary); font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.admin-design-detail-head strong { margin-top: 2px; color: var(--ink); font-size: 18px; }

.admin-design-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 13px 0;
}

.admin-design-detail-grid span {
  min-width: 0;
  border: 1px solid #d8e6eb;
  border-radius: 7px;
  background: #fff;
  padding: 9px;
}

.admin-design-detail-grid small,
.admin-design-detail-grid strong { display: block; overflow-wrap: anywhere; }
.admin-design-detail-grid small { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.admin-design-detail-grid strong { margin-top: 3px; color: var(--ink); font-size: 12px; }

.admin-json-detail pre,
.admin-trace-grid pre {
  max-height: 360px;
  overflow: auto;
  margin: 10px 0 0;
  border-radius: 6px;
  background: #102f43;
  color: #d9f2f7;
  padding: 12px;
  font: 10px/1.5 "Cascadia Mono", Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.admin-trace-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-empty {
  border: 1px dashed #bdcdd5;
  border-radius: 8px;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1120px) {
  .integration-admin-grid { grid-template-columns: 1fr; }
  .admin-email-card { grid-column: auto; }
  .admin-email-primary-grid,
  .admin-email-smtp-grid { grid-template-columns: 1fr; }
  .customer-admin-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-design-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-trace-grid { grid-template-columns: 1fr; }
  .customer-row-actions { flex-direction: row !important; }
}

@media (max-width: 700px) {
  .app-section-tabs {
    width: calc(100vw - 16px);
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(118px, 1fr);
    overflow-x: auto;
  }
  .app-section-tabs button { min-height: 44px; }
  .admin-workspace { width: min(100% - 16px, 1480px); padding: 14px; }
  .admin-titlebar,
  .customer-manager-head,
  .admin-searchbar,
  .admin-inline-form { align-items: stretch; flex-direction: column; }
  .admin-field-pair,
  .customer-admin-row,
  .admin-design-row,
  .admin-design-detail-grid { grid-template-columns: 1fr; }
  .admin-inline-form input,
  .admin-searchbar input { width: 100%; min-width: 0; }
  .store-settings-grid,
  .report-search-form { grid-template-columns: 1fr; }
  .branding-preview { grid-template-columns: 1fr; }
  .general-test-row { grid-template-columns: 1fr; }
  .general-test-main { align-items: start; }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  html,
  body {
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    background: #ffffff;
  }

  body.report-ready > :not(.print-report) {
    display: none !important;
  }

  body.report-ready > .print-report {
    display: block !important;
  }

  .print-report,
  .print-report * {
    box-sizing: border-box;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .print-report {
    width: 210mm;
    min-height: 297mm;
    color: #173042;
    background: #ffffff;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 9pt;
    line-height: 1.35;
  }

  .print-report-sheet {
    width: 210mm;
    min-height: 297mm;
    display: flex;
    flex-direction: column;
    gap: 4mm;
    padding: 10mm 12mm 8mm;
  }

  .report-header {
    min-height: 17mm;
    display: grid;
    grid-template-columns: 42mm minmax(0, 1fr) auto;
    align-items: center;
    gap: 5mm;
    padding-bottom: 4mm;
    border-bottom: .6mm solid #0b6382;
  }

  .report-header img {
    width: 40mm;
    max-height: 15mm;
    height: auto;
    object-fit: contain;
    object-position: left center;
  }

  .report-header div span,
  .report-profile-band small,
  .report-section-heading small,
  .report-meta-grid small,
  .report-design-facts small,
  .report-footer span {
    display: block;
    color: #557080;
    font-size: 7pt;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  .report-header h1 {
    margin: 1mm 0 0;
    color: #15384d;
    font-size: 16pt;
    line-height: 1.1;
  }

  .report-header time {
    color: #557080;
    font-size: 7.5pt;
    text-align: right;
  }

  .report-meta-grid {
    display: grid;
    grid-template-columns: 1.25fr .8fr 1fr 1fr 1fr .9fr;
    gap: 0;
    border-top: .25mm solid #d7e2e7;
    border-bottom: .25mm solid #d7e2e7;
  }

  .report-meta-grid > span {
    min-width: 0;
    padding: 2.5mm 2mm;
    border-left: .25mm solid #d7e2e7;
  }

  .report-meta-grid > span:first-child {
    border-left: 0;
  }

  .report-meta-grid strong {
    display: block;
    overflow-wrap: anywhere;
    margin-top: .8mm;
    color: #173042;
    font-size: 8.5pt;
  }

  .report-profile-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 47mm;
    align-items: center;
    gap: 7mm;
    padding: 4mm 5mm;
    border-left: 1.5mm solid #0b7594;
    background: #edf7f8;
  }

  .report-profile-band h2 {
    margin: 1mm 0;
    color: #0e566e;
    font-size: 15pt;
  }

  .report-profile-band p {
    margin: 0;
    color: #365666;
    font-size: 8.5pt;
  }

  .report-profile-band > span {
    min-width: 0;
    padding-left: 5mm;
    border-left: .25mm solid #b8d9df;
  }

  .report-profile-band > span strong,
  .report-profile-band > span em {
    display: block;
    overflow-wrap: anywhere;
  }

  .report-profile-band > span strong {
    margin-top: 1mm;
    color: #173042;
    font-size: 9pt;
  }

  .report-profile-band > span em {
    margin-top: 1mm;
    color: #397164;
    font-size: 7.5pt;
    font-style: normal;
    font-weight: 800;
  }

  .report-design-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.72fr) minmax(46mm, .72fr);
    gap: 5mm;
    break-inside: avoid;
  }

  .report-map-block,
  .report-design-facts,
  .report-habits,
  .report-priorities {
    min-width: 0;
    border-top: .5mm solid #173f55;
    padding-top: 2.5mm;
  }

  .report-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4mm;
    margin-bottom: 2mm;
  }

  .report-section-heading span,
  .report-section-heading strong {
    display: block;
  }

  .report-section-heading strong {
    margin-top: .5mm;
    color: #173042;
    font-size: 10pt;
  }

  .report-section-heading code {
    color: #0b6382;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 8pt;
    font-weight: 900;
    white-space: nowrap;
  }

  .report-progressive-map {
    display: block;
    width: 100%;
    height: 46mm;
  }

  .report-map-labels text {
    fill: #173f55;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .5px;
  }

  .report-map-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5mm;
    margin-top: 1.5mm;
    color: #415e6c;
    font-size: 6.5pt;
    font-weight: 700;
  }

  .report-map-legend span {
    display: inline-flex;
    align-items: center;
    gap: 1.2mm;
    white-space: nowrap;
  }

  .report-map-legend span::before {
    content: "";
    width: 2.7mm;
    height: 2.7mm;
    border-radius: 50%;
    background: #1769a6;
  }

  .report-map-legend [data-zone="intermediate"]::before { background: #2a9d8f; }
  .report-map-legend [data-zone="near"]::before { background: #e6ad32; }
  .report-map-legend [data-zone="peripheral"]::before { background: #d75b59; }

  .report-design-facts {
    display: grid;
    align-content: start;
    gap: 3mm;
  }

  .report-design-facts > span {
    position: relative;
    min-height: 15mm;
    padding: 2.5mm 12mm 2.5mm 3mm;
    border-left: .8mm solid #2591a7;
    background: #f2f7f8;
  }

  .report-design-facts > span strong {
    display: block;
    margin-top: 1mm;
    color: #173042;
    font-size: 9pt;
  }

  .report-design-facts > span > b {
    position: absolute;
    top: 50%;
    right: 3mm;
    color: #0b6382;
    font-size: 15pt;
    transform: translateY(-50%);
  }

  .report-distance-split {
    display: grid;
    gap: 1mm;
    padding-top: 1mm;
  }

  .report-distance-split span {
    display: flex;
    justify-content: space-between;
    padding: 1.2mm 0;
    border-bottom: .25mm solid #dce5e9;
    color: #45616f;
    font-size: 8pt;
  }

  .report-distance-split span b {
    color: #173042;
  }

  .report-design-facts p {
    margin: 0;
    color: #617784;
    font-size: 7pt;
  }

  .report-data-grid {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 6mm;
    break-inside: avoid;
  }

  .report-habit-row {
    margin-top: 1.6mm;
  }

  .report-habit-row > span {
    display: flex;
    justify-content: space-between;
    gap: 3mm;
    color: #365361;
    font-size: 7.5pt;
  }

  .report-habit-row > span b {
    color: #173042;
  }

  .report-habit-row > i {
    height: 2.2mm;
    display: block;
    overflow: hidden;
    margin-top: .7mm;
    background: #e8eef1;
  }

  .report-habit-row > i em {
    height: 100%;
    display: block;
  }

  .report-priorities table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 7.5pt;
  }

  .report-priorities th,
  .report-priorities td {
    padding: 1.5mm 1mm;
    border-bottom: .25mm solid #dce5e9;
    text-align: left;
  }

  .report-priorities th {
    color: #617784;
    font-size: 6.5pt;
    text-transform: uppercase;
  }

  .report-priorities th:first-child,
  .report-priorities td:first-child {
    width: 9mm;
    text-align: center;
  }

  .report-priorities th:nth-child(3),
  .report-priorities td:nth-child(3) {
    width: 23mm;
  }

  .report-priorities th:last-child,
  .report-priorities td:last-child {
    width: 14mm;
    text-align: right;
  }

  .report-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8mm;
    margin-top: auto;
    padding-top: 3mm;
    border-top: .25mm solid #bccbd2;
    color: #617784;
  }

  .report-footer p {
    max-width: 140mm;
    margin: 0;
    font-size: 6.7pt;
  }

  .report-footer span {
    flex: 0 0 auto;
    color: #0b6382;
    white-space: nowrap;
  }
}

/* Three-step visual test */
.challenge-progress {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.distance-pair-test {
  min-height: 480px;
}

.distance-pair-workspace {
  inset: 140px 18px 18px;
  grid-template-rows: minmax(0, 1fr);
}

.distance-pair-choice.is-selected::after {
  content: "✓";
}

@media (max-width: 760px) {
  .distance-pair-test {
    min-height: 650px;
  }

  .distance-pair-workspace {
    inset: 150px 14px 16px;
  }
}
