:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --bg: #08090b;
  --panel: #14171c;
  --panel-2: #1e232a;
  --text: #f5f7fa;
  --muted: #aeb7c3;
  --line: #323a45;
  --accent: #55d6be;
  --accent-2: #ffcf5c;
  --accent-3: #7aa2ff;
  --ink: #06120f;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

::selection {
  background: rgb(16 175 202 / 24%);
  color: #173f96;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--bg);
}

html {
  -webkit-tap-highlight-color: rgb(16 175 202 / 18%);
  scroll-behavior: smooth;
}

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

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

button,
.primary-link,
.secondary-link {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #242a32;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  min-height: 44px;
  padding: 0 14px;
}

button:hover:not(:disabled),
.secondary-link:hover {
  border-color: #10afca;
  background: #e9f9fc;
  color: #173f96;
}

button:focus-visible,
a:focus-visible,
.primary-link:focus-visible,
.secondary-link:focus-visible {
  outline: 3px solid rgb(16 175 202 / 24%);
  outline-offset: 3px;
}

button:active:not(:disabled),
.primary-link:active,
.secondary-link:active {
  border-color: #10afca;
  background: #e9f9fc;
  color: #173f96;
}

.danger-link {
  border-color: #f0b8b2;
  background: #fff6f5;
  color: #b42318;
}

.danger-link:hover:not(:disabled) {
  border-color: #e5483f;
  background: #ffe8e6;
}

button:disabled {
  color: #69727d;
  cursor: not-allowed;
}

.shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  border-bottom: 1px solid var(--line);
  background: rgb(8 9 11 / 92%);
  padding: 0 32px;
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.brand span {
  color: var(--accent);
  font-size: 22px;
  font-weight: 900;
}

.brand small {
  color: var(--muted);
  font-weight: 700;
}

nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

nav a {
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
  padding: 10px 12px;
}

nav a:hover {
  background: #1b2027;
  color: var(--text);
}

.home-page {
  min-height: calc(100vh - 64px);
  overflow: auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: 40px;
  min-height: calc(100vh - 64px);
  padding: 72px clamp(24px, 5vw, 72px) 40px;
}

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

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 840px;
  font-size: clamp(34px, 4.4vw, 64px);
  line-height: 1.02;
}

.word-stack {
  display: grid;
  gap: 2px;
  margin: 0 0 26px;
  font-size: clamp(48px, 8vw, 116px);
  font-weight: 950;
  line-height: 0.88;
  letter-spacing: 0;
}

.word-stack span {
  display: block;
}

.word-stack span:nth-child(2) {
  color: var(--accent);
}

.word-stack span:nth-child(3) {
  color: var(--accent-2);
}

.hero p {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.65;
}

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

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
}

.primary-link {
  border-color: transparent;
  background: var(--accent);
  color: var(--ink);
}

.hero-visual {
  display: grid;
  place-items: center;
  min-height: 520px;
}

.demo-orbit {
  position: relative;
  width: min(560px, 100%);
  aspect-ratio: 1;
}

.phone-frame {
  position: absolute;
  left: 0;
  top: 12%;
  z-index: 2;
  width: 38%;
  aspect-ratio: 0.52;
  border: 2px solid #465462;
  border-radius: 28px;
  background:
    radial-gradient(circle at 45% 33%, #f5f7fa 0 8px, transparent 9px),
    radial-gradient(circle at 62% 33%, #f5f7fa 0 8px, transparent 9px),
    linear-gradient(180deg, #202832, #0f1318);
  box-shadow: 0 32px 70px rgb(0 0 0 / 35%);
}

.phone-frame::before {
  content: "";
  position: absolute;
  left: 33%;
  top: 8px;
  width: 34%;
  height: 5px;
  border-radius: 999px;
  background: #56616d;
}

.face-dot {
  position: absolute;
  top: 33%;
  width: 16px;
  height: 16px;
  border: 3px solid var(--accent);
  border-radius: 50%;
}

.face-dot.left {
  left: 37%;
}

.face-dot.right {
  left: 58%;
}

.gaze-ray {
  position: absolute;
  left: 58%;
  top: 34%;
  width: 250px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: rotate(10deg);
  transform-origin: left center;
}

.screen-card {
  position: absolute;
  right: 0;
  bottom: 6%;
  width: 72%;
  aspect-ratio: 1.25;
  border: 1px solid #3e4855;
  border-radius: 8px;
  background:
    radial-gradient(circle at 24% 35%, #fff 0 9px, transparent 10px),
    radial-gradient(circle at 76% 35%, #fff 0 9px, transparent 10px),
    radial-gradient(circle at 50% 50%, #55d6be 0 12px, transparent 13px),
    #050607;
  box-shadow: 0 28px 80px rgb(0 0 0 / 35%);
}

.screen-card span,
.screen-card i,
.screen-card b {
  position: absolute;
  display: block;
  border-radius: 999px;
}

.screen-card span {
  left: 12%;
  right: 12%;
  top: 50%;
  height: 2px;
  background: #39434e;
}

.screen-card i {
  left: 15%;
  top: 18%;
  width: 70%;
  height: 2px;
  background: #39434e;
  transform: rotate(90deg);
}

.screen-card b {
  left: 49%;
  top: 46%;
  width: 16%;
  height: 16%;
  border: 2px solid var(--accent-2);
  transform: translate(-50%, -50%);
}

.workflow-band {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr);
  align-items: start;
  gap: 32px;
  border-top: 1px solid var(--line);
  background: #101318;
  padding: 62px clamp(24px, 5vw, 72px);
}

.workflow-band h2 {
  margin: 0;
  font-size: clamp(30px, 4.4vw, 60px);
  line-height: 1.02;
}

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

.workflow div {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171c22;
  min-height: 148px;
  padding: 18px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.workflow div:hover {
  border-color: var(--accent);
  background: #1d252d;
  transform: translateY(-4px);
}

.workflow strong {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
}

.business-section,
.team-section {
  border-top: 1px solid var(--line);
  padding: 72px clamp(24px, 5vw, 72px);
}

.team-section {
  background: #101318;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 72px);
  line-height: 1.08;
}

.section-heading p:not(.eyebrow) {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0 18px;
}

.metric-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171c22;
  min-height: 170px;
  padding: 22px;
  transition:
    transform 180ms ease,
    border-color 180ms ease;
}

.metric-grid article:hover {
  border-color: var(--accent-2);
  transform: translateY(-4px);
}

.metric-grid strong {
  display: block;
  color: var(--accent-2);
  font-size: clamp(42px, 7vw, 92px);
  line-height: 0.95;
}

.metric-grid span {
  color: var(--muted);
  font-weight: 700;
}

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

.interactive-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 280px;
  gap: 14px;
  margin: 28px 0 18px;
}

.product-tabs {
  display: grid;
  gap: 10px;
}

.info-tab {
  justify-content: flex-start;
  border-color: var(--line);
  background: #171c22;
  color: var(--muted);
  text-align: left;
}

.info-tab.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--ink);
}

.info-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171c22;
  padding: 28px;
}

.info-panel h3 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3vw, 42px);
}

.info-panel p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.business-grid article,
.team-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 26px;
}

.business-grid h3,
.team-grid h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.business-grid p,
.team-grid p,
.team-grid li {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.member-header {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.member-header strong {
  font-size: clamp(28px, 3vw, 44px);
}

.member-header span {
  color: var(--accent);
  font-weight: 900;
}

.team-grid ul {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding-left: 20px;
}

.ticker {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--accent);
  color: var(--ink);
  white-space: nowrap;
}

.ticker div {
  display: inline-flex;
  gap: 32px;
  min-width: max-content;
  padding: 18px 0;
  animation: ticker 22s linear infinite;
}

.ticker span {
  font-size: 18px;
  font-weight: 950;
  text-transform: uppercase;
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* Public landing page refresh */
body {
  line-height: 1.65;
}

.topbar {
  border-bottom: 1px solid rgb(30 64 175 / 12%);
  background: rgb(255 255 255 / 86%);
  color: #102033;
}

.brand {
  align-items: center;
}

.brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brand span {
  color: #173f96;
  font-size: 21px;
  letter-spacing: 0;
}

.nav-menu {
  gap: 6px;
}

.nav-menu a,
.nav-dropdown > button {
  border: 0;
  background: transparent;
  color: #496174;
  font-size: 14px;
  font-weight: 850;
  min-height: 38px;
  padding: 8px 12px;
}

.nav-menu a:hover,
.nav-dropdown:hover > button,
.nav-dropdown:focus-within > button {
  background: #e9f7fb;
  color: #173f96;
}

.nav-dropdown {
  position: relative;
  z-index: 101;
}

.nav-dropdown::after {
  content: "";
  position: absolute;
  left: -8px;
  right: -8px;
  top: 100%;
  height: 16px;
}

.nav-dropdown-menu {
  position: absolute;
  z-index: 102;
  right: 0;
  top: calc(100% + 6px);
  display: grid;
  gap: 4px;
  width: 244px;
  border: 1px solid #d9e7ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgb(16 32 51 / 14%);
  opacity: 0;
  padding: 8px;
  pointer-events: none;
  transform: translateY(-6px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  color: #17334a;
  line-height: 1.35;
  padding: 11px 12px;
}

.home-page {
  background:
    linear-gradient(180deg, #f8fdff 0%, #fff 42%, #eef8fc 100%);
  color: #102033;
}

.landing-hero {
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  gap: clamp(42px, 7vw, 96px);
  min-height: calc(100vh - 64px);
  padding: clamp(68px, 9vw, 116px) clamp(24px, 6vw, 86px) 52px;
}

.landing-hero .hero-copy {
  max-width: 700px;
}

.landing-hero .eyebrow,
.story-section .eyebrow,
.steps-section .eyebrow,
.business-section .eyebrow,
.team-section .eyebrow {
  color: #10afca;
  letter-spacing: 0.14em;
}

.landing-hero h1 {
  max-width: 760px;
  color: #122a44;
  font-size: clamp(46px, 7vw, 94px);
  line-height: 1.06;
}

.landing-hero p:not(.eyebrow) {
  max-width: 600px;
  color: #4d6477;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.75;
}

.landing-hero .primary-link,
.landing-hero .secondary-link {
  border-radius: 999px;
  min-width: 144px;
  min-height: 48px;
}

.landing-hero .primary-link {
  background: #173f96;
  color: #fff;
}

.landing-hero .secondary-link {
  border-color: #bcd9e6;
  background: #fff;
  color: #173f96;
}

.landing-visual {
  position: relative;
  min-height: min(58vw, 590px);
}

.hero-logo {
  position: absolute;
  right: 4%;
  top: 0;
  width: min(42vw, 390px);
  filter: drop-shadow(0 26px 40px rgb(23 63 150 / 18%));
  animation: floatLogo 6s ease-in-out infinite;
}

.signal-board {
  position: absolute;
  left: 0;
  right: 8%;
  bottom: 5%;
  border: 1px solid #d4e7ef;
  border-radius: 8px;
  background: rgb(255 255 255 / 84%);
  box-shadow: 0 30px 80px rgb(16 32 51 / 14%);
  padding: clamp(24px, 4vw, 44px);
  backdrop-filter: blur(16px);
}

.signal-board svg {
  display: block;
  width: 100%;
  height: auto;
}

.signal-board path {
  fill: none;
  stroke: #10afca;
  stroke-linecap: round;
  stroke-width: 7;
}

.signal-board circle {
  fill: #173f96;
}

.signal-dot,
.signal-cross {
  position: absolute;
  top: 34%;
  width: 22px;
  height: 22px;
}

.signal-dot {
  border: 3px solid #173f96;
  border-radius: 50%;
}

.signal-dot.left {
  left: 10%;
}

.signal-dot.right {
  right: 10%;
}

.signal-cross {
  left: 50%;
  transform: translateX(-50%);
}

.signal-cross::before,
.signal-cross::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 999px;
  background: #102033;
  transform: translate(-50%, -50%);
}

.signal-cross::before {
  width: 34px;
  height: 4px;
}

.signal-cross::after {
  width: 4px;
  height: 34px;
}

.signal-labels {
  display: flex;
  justify-content: space-between;
  color: #6a7d8d;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.light-ticker {
  border-color: #d7e8ef;
  background: #173f96;
  color: #fff;
}

.story-section,
.steps-section,
.business-section,
.team-section {
  border-top: 1px solid #d7e8ef;
  padding: clamp(82px, 12vw, 150px) clamp(24px, 6vw, 86px);
}

.story-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 0.75fr);
  gap: clamp(32px, 7vw, 90px);
  align-items: start;
  background: #fff;
}

.story-copy {
  position: sticky;
  top: 112px;
}

.story-copy h2,
.section-heading h2 {
  color: #122a44;
  font-size: clamp(38px, 6vw, 80px);
  line-height: 1.12;
}

.story-copy p:not(.eyebrow),
.section-heading p:not(.eyebrow) {
  color: #536b7d;
  font-size: 19px;
  line-height: 1.85;
}

.story-cards {
  display: grid;
  gap: 18px;
}

.story-cards details,
.step-stack article,
.light-grid article,
.team-grid article,
.info-panel {
  border: 1px solid #d7e8ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgb(16 32 51 / 8%);
}

.story-cards details {
  padding: 24px 26px;
}

.story-cards summary {
  color: #173f96;
  cursor: pointer;
  font-size: 24px;
  font-weight: 900;
}

.story-cards p {
  margin: 16px 0 0;
  color: #536b7d;
  font-size: 17px;
  line-height: 1.85;
}

.steps-section,
.team-section {
  background: #eef8fc;
}

.compact {
  max-width: 760px;
  margin-bottom: 34px;
}

.step-stack {
  display: grid;
  gap: 22px;
}

.step-stack article {
  display: grid;
  grid-template-columns: 92px minmax(180px, 0.42fr) minmax(0, 1fr);
  align-items: baseline;
  gap: 20px;
  padding: clamp(24px, 4vw, 42px);
}

.step-stack span {
  color: #10afca;
  font-size: 18px;
  font-weight: 950;
}

.step-stack h3 {
  margin: 0;
  color: #122a44;
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1.08;
}

.step-stack p {
  margin: 0;
  color: #536b7d;
  font-size: 18px;
  line-height: 1.75;
}

.business-section {
  background: #fff;
}

.interactive-grid.airy {
  grid-template-columns: 180px minmax(0, 1fr) 260px;
  gap: 20px;
  margin: 34px 0 26px;
}

.info-tab {
  border-color: #d7e8ef;
  background: #fff;
  color: #536b7d;
}

.info-tab.is-active {
  border-color: #10afca;
  background: #e9f9fc;
  color: #173f96;
}

.info-panel {
  padding: clamp(26px, 4vw, 44px);
}

.info-panel h3 {
  color: #122a44;
  line-height: 1.16;
}

.info-panel p:not(.eyebrow) {
  color: #536b7d;
  line-height: 1.85;
}

.light-grid {
  gap: 20px;
  margin-top: 28px;
}

.light-grid article {
  padding: 30px;
}

.light-grid h3,
.team-grid h3 {
  color: #122a44;
}

.light-grid p,
.team-grid p,
.team-grid li {
  color: #536b7d;
  line-height: 1.8;
}

.member-header strong {
  color: #122a44;
  line-height: 1.15;
}

.member-header span {
  color: #10afca;
}

.reveal-section {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 700ms ease,
    transform 700ms ease;
}

.reveal-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes floatLogo {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-16px);
  }
}

.viewer-page {
  height: calc(100vh - 64px);
  overflow: hidden;
}

.forum-page {
  min-height: calc(100vh - 64px);
  background: #f8fdff;
  color: #102033;
}

.forum-shell {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(46px, 8vw, 92px) 0;
}

.forum-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.forum-header h1 {
  margin: 0;
  color: #122a44;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.08;
}

.forum-header p:not(.eyebrow) {
  max-width: 640px;
  color: #536b7d;
  font-size: 18px;
  line-height: 1.75;
}

.forum-userbar,
.empty-state {
  border: 1px solid #d7e8ef;
  border-radius: 8px;
  background: #fff;
  color: #536b7d;
  padding: 14px 18px;
}

.forum-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.post-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  min-height: 86px;
  border: 1px solid #d7e8ef;
  border-radius: 8px;
  background: #fff;
  color: #122a44;
  padding: 18px 20px;
  text-align: left;
  box-shadow: 0 18px 50px rgb(16 32 51 / 7%);
}

.post-row:hover {
  border-color: #10afca;
  background: #f8fdff;
}

.post-row strong {
  display: block;
  font-size: 20px;
}

.patient-name {
  display: inline-block;
  margin-top: 6px;
  color: #536b7d;
  font-weight: 800;
}

.post-meta,
.detail-actions,
.modal-actions,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.new-badge,
.done-badge,
.lock-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
  padding: 0 10px;
}

.new-badge {
  background: #173f96;
  color: #fff;
}

.done-badge {
  background: #e9f9fc;
  color: #173f96;
}

.lock-badge {
  border: 1px solid #d7e8ef;
  color: #536b7d;
}

.forum-menu-item {
  justify-content: flex-start;
  border: 0;
  background: transparent;
  color: #17334a;
  min-height: 40px;
  padding: 11px 12px;
  text-align: left;
}

.forum-menu-item:hover {
  background: #e9f7fb;
  color: #173f96;
}

.nav-dropdown-menu .forum-menu-item:hover,
.nav-dropdown-menu .forum-menu-item:focus-visible,
.nav-dropdown-menu .forum-menu-item:active {
  border-color: #10afca;
  background: #e9f9fc;
  color: #173f96;
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgb(16 32 51 / 46%);
  padding: 20px;
}

.modal-layer[hidden] {
  display: none;
}

.modal-card {
  display: grid;
  gap: 16px;
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  border: 1px solid #d7e8ef;
  border-radius: 8px;
  background: #fff;
  color: #102033;
  padding: 26px;
  box-shadow: 0 30px 90px rgb(16 32 51 / 28%);
}

.modal-card h2 {
  margin: 0;
  color: #122a44;
  font-size: clamp(28px, 4vw, 44px);
}

.modal-card label,
.select-label {
  display: grid;
  gap: 8px;
  color: #536b7d;
  font-size: 13px;
  font-weight: 900;
}

.modal-card input:not([type="radio"]) {
  min-height: 44px;
  border: 1px solid #d7e8ef;
  border-radius: 8px;
  background: #f8fdff;
  color: #102033;
  font: inherit;
  padding: 0 12px;
}

.modal-card input[type="radio"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
}

.role-fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 10px;
  row-gap: 6px;
  border: 1px solid #d7e8ef;
  border-radius: 8px;
  margin: 0;
  padding: 10px 12px 12px;
}

.role-fieldset legend {
  color: #173f96;
  font-weight: 950;
  padding: 0 6px;
}

.role-fieldset label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}

.admin-code {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.auth-card[data-mode="login"] .signup-only {
  display: none;
}

.auth-card .modal-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-card .modal-actions button {
  width: 100%;
}

.auth-card .modal-actions .primary-link {
  border-color: #55d6be;
  background: #55d6be;
  color: #07322f;
}

.auth-card .modal-actions .primary-link:hover:not(:disabled),
.auth-card .modal-actions .primary-link:focus-visible {
  border-color: #10afca;
  background: #dff8f8;
  color: #173f96;
}

.auth-card .modal-actions .primary-link:active:not(:disabled) {
  border-color: #10afca;
  background: #e9f9fc;
  color: #173f96;
}

.modal-card:not(.auth-card) .modal-actions {
  justify-content: center;
}

.modal-card:not(.auth-card) .modal-actions button {
  min-width: 170px;
}

.modal-card:not(.auth-card) .modal-actions .primary-link {
  border-color: #55d6be;
  background: #55d6be;
  color: #07322f;
}

.modal-card:not(.auth-card) .modal-actions .primary-link:hover:not(:disabled),
.modal-card:not(.auth-card) .modal-actions .primary-link:focus-visible,
.modal-card:not(.auth-card) .modal-actions .secondary-link:hover:not(:disabled),
.modal-card:not(.auth-card) .modal-actions .secondary-link:focus-visible {
  border-color: #10afca;
  background: #e9f9fc;
  color: #173f96;
}

.modal-card input[type="file"] {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 11px 12px;
}

.modal-card input[type="file"]::file-selector-button {
  border: 1px solid #d7e8ef;
  border-radius: 8px;
  background: #e9f9fc;
  color: #173f96;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  margin-right: 12px;
  padding: 8px 12px;
}

.modal-card input[type="file"]::file-selector-button:hover {
  border-color: #10afca;
  background: #dff8f8;
}

.modal-message {
  min-height: 22px;
  margin: 0;
  color: #536b7d;
  line-height: 1.5;
}

.auth-notice {
  justify-self: start;
  min-height: 0;
  border: 1px solid #d7e8ef;
  border-radius: 999px;
  background: #f2fbfd;
  color: #173f96;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  padding: 7px 11px;
}

.modal-message[data-tone="error"] {
  color: #b42318;
}

.auth-notice[data-tone="error"] {
  border-color: #f0b8b2;
  background: #fff6f5;
}

.modal-message[data-tone="success"] {
  color: #177245;
}

.auth-notice[data-tone="success"] {
  border-color: #a9eadf;
  background: #effcf9;
}

.post-info {
  display: grid;
  gap: 10px;
  margin: 0;
}

.post-info div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 14px;
  border-bottom: 1px solid #eef3f6;
  padding-bottom: 10px;
}

.post-info dt {
  color: #536b7d;
  font-weight: 900;
}

.post-info dd {
  margin: 0;
  color: #102033;
  font-weight: 800;
}

.post-detail {
  display: grid;
  gap: 18px;
}

.permission-box {
  border: 1px solid #d7e8ef;
  border-radius: 8px;
  background: #f8fdff;
  padding: 22px;
}

.admin-result-form,
.result-details {
  display: grid;
  gap: 14px;
  border: 1px solid #d7e8ef;
  border-radius: 8px;
  background: #f8fdff;
  padding: 18px;
}

.result-details summary {
  color: #173f96;
  cursor: pointer;
  font-size: 20px;
  font-weight: 950;
}

.viewer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  height: 100%;
}

.viewer-main {
  display: grid;
  place-items: center;
  min-width: 0;
  background: #050607;
  padding: 24px;
}

#gazeCanvas,
#gazeCanvas2 {
  --viewer-aspect: 1.4019;
  width: min(100%, calc((100vh - 112px) * var(--viewer-aspect)));
  max-height: calc(100vh - 112px);
  aspect-ratio: var(--viewer-aspect);
  border: 1px solid #3d4652;
  border-radius: 8px;
  background: #000;
}

.viewer-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-left: 1px solid var(--line);
  background: var(--panel);
  padding: 24px;
}

.viewer-panel h1 {
  margin: 0;
  font-size: 28px;
}

.viewer-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.file-drop {
  display: grid;
  place-items: center;
  min-height: 76px;
  border: 1px dashed #607080;
  border-radius: 8px;
  background: #1a2027;
  cursor: pointer;
}

.file-drop input {
  display: none;
}

.file-drop span {
  color: var(--accent);
  font-weight: 900;
}

.select-label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #242a32;
  color: var(--text);
  font: inherit;
  padding: 0 10px;
}

.viewer-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.viewer-stats div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 12px;
}

.viewer-stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.viewer-stats strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  overflow-wrap: anywhere;
}

.viewer-note {
  margin-top: auto;
  font-size: 13px;
}

.experiment-page {
  height: calc(100vh - 64px);
  overflow: hidden;
}

.app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  height: 100%;
  min-height: 560px;
  background: var(--bg);
}

:fullscreen .topbar {
  display: none;
}

:fullscreen .experiment-page,
:fullscreen .app {
  height: 100vh;
}

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

:fullscreen .panel {
  display: none;
}

:fullscreen .stage {
  height: 100vh;
}

.stage {
  position: relative;
  min-width: 0;
  height: 100%;
  background: #000;
  overflow: hidden;
  isolation: isolate;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-left: 1px solid var(--line);
  background: var(--panel);
  padding: 24px;
}

.panel h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
}

#phaseText {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.status-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 12px;
  min-width: 0;
}

.status-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.status-grid strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 18px;
}

.progress {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #262d36;
  overflow: hidden;
}

.progress div {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 180ms ease;
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
}

#spaceButton {
  grid-column: span 2;
  background: var(--accent);
  color: var(--ink);
}

.back-link {
  display: flex;
  grid-column: span 2;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
}

.flash {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

.flash.is-active {
  opacity: 1;
}

.fixation,
.dot,
.stimulus,
.finish-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.fixation {
  display: none;
  width: 44px;
  height: 44px;
}

.fixation::before,
.fixation::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 2px;
  background: #fff;
  transform: translate(-50%, -50%);
}

.fixation::before {
  width: 44px;
  height: 4px;
}

.fixation::after {
  width: 4px;
  height: 44px;
}

.dot {
  display: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 0 12px rgb(85 214 190 / 20%),
    0 0 34px rgb(85 214 190 / 50%);
}

.stimulus {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow:
    0 0 0 10px rgb(255 207 92 / 18%),
    0 0 44px rgb(255 207 92 / 45%);
}

.finish-mark {
  display: none;
  width: 80px;
  height: 80px;
  border: 8px solid var(--accent);
  border-radius: 50%;
}

.finish-mark::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 12px;
  width: 22px;
  height: 40px;
  border: solid var(--accent);
  border-width: 0 8px 8px 0;
  transform: rotate(45deg);
}

[data-phase="calibration"] .dot,
[data-phase="validation"] .dot,
[data-phase="trial-ready"] .fixation,
[data-phase="trial-active"] .fixation,
[data-phase="trial-active"] .stimulus,
[data-phase="complete"] .finish-mark {
  display: block;
}

[data-phase="trial-active"] .fixation {
  opacity: 0.45;
}

@media (max-width: 980px) {
  .hero,
  .workflow-band,
  .workflow,
  .metric-grid,
  .interactive-grid,
  .business-grid,
  .team-grid,
  .viewer-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    min-height: 420px;
  }

  .workflow {
    gap: 8px;
  }

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

  .story-section,
  .interactive-grid.airy,
  .step-stack article {
    grid-template-columns: 1fr;
  }

  .story-copy {
    position: static;
  }

  .landing-visual {
    min-height: 480px;
  }
}

@media (max-width: 900px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 12px 16px;
  }

  .nav-menu {
    flex-wrap: wrap;
    width: 100%;
  }

  .nav-dropdown {
    position: static;
  }

  .nav-dropdown::after {
    display: none;
  }

  .nav-dropdown-menu {
    left: 16px;
    right: 16px;
    width: auto;
  }

  .experiment-page {
    height: auto;
    min-height: calc(100vh - 100px);
    overflow: auto;
  }

  .viewer-page {
    height: auto;
    min-height: calc(100vh - 100px);
    overflow: auto;
  }

  .viewer-layout {
    min-height: calc(100vh - 100px);
  }

  .viewer-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .app {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 100vh;
  }

  .stage {
    height: auto;
    min-height: 58vh;
  }

  .panel {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 16px;
  }

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

  .panel h1 {
    font-size: 23px;
  }
}

@media (max-width: 620px) {
  nav {
    flex-wrap: wrap;
  }

  .landing-hero {
    padding-top: 52px;
  }

  .landing-hero h1 {
    font-size: clamp(40px, 13vw, 64px);
  }

  .hero-logo {
    width: min(68vw, 300px);
  }

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

  .status-grid,
  .controls {
    grid-template-columns: 1fr 1fr;
  }
}

/* Refinements after desktop/mobile review */
.story-section,
.steps-section,
.business-section,
.benefit-section,
.contact-section,
.team-section {
  scroll-margin-top: 88px;
}

.benefit-section {
  border-top: 1px solid #d7e8ef;
  background: #eef8fc;
  padding: clamp(82px, 12vw, 150px) clamp(24px, 6vw, 86px);
}

.contact-section {
  border-top: 1px solid #d7e8ef;
  background: #eef8fc;
  padding: clamp(82px, 10vw, 132px) clamp(24px, 6vw, 86px);
}

.team-section {
  background: #fff;
}

.benefit-section .eyebrow,
.contact-section .eyebrow {
  color: #10afca;
  letter-spacing: 0.14em;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  min-height: 58px;
  border: 1px solid #bcd9e6;
  border-radius: 999px;
  background: #fff;
  color: #173f96;
  font-size: clamp(20px, 3vw, 34px);
  font-weight: 950;
  line-height: 1.2;
  padding: 0 24px;
  box-shadow: 0 18px 50px rgb(16 32 51 / 8%);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.light-ticker div {
  gap: clamp(42px, 7vw, 88px);
  padding: 22px 0;
  animation: ticker 30s linear infinite;
}

.light-ticker span {
  flex: 0 0 auto;
}

.step-stack article {
  align-items: center;
  min-height: 148px;
}

.step-stack h3,
.step-stack p {
  align-self: center;
}

.interactive-grid.airy {
  grid-template-columns: minmax(190px, 0.32fr) minmax(0, 1fr);
  max-width: 1160px;
}

.product-tabs {
  align-content: start;
}

.product-tabs .info-tab {
  min-height: 86px;
  padding: 0 24px;
}

.product-tabs .info-tab:hover,
.product-tabs .info-tab:focus-visible,
.product-tabs .info-tab.is-active,
.product-tabs .info-tab.is-active:hover,
.product-tabs .info-tab.is-active:focus-visible {
  border-color: #10afca;
  background: #e9f9fc;
  color: #173f96;
}

.product-tabs .info-tab:focus-visible {
  outline: 3px solid rgb(16 175 202 / 24%);
  outline-offset: 2px;
}

.light-grid article {
  display: grid;
  align-content: center;
  min-height: 180px;
}

@media (max-width: 980px) {
  .benefit-section,
  .contact-section,
  .story-section,
  .steps-section,
  .business-section,
  .team-section {
    scroll-margin-top: 128px;
  }

  .step-stack article {
    align-items: start;
    min-height: 0;
  }
}

@media (max-width: 620px) {
  .landing-visual {
    min-height: 300px;
    margin-top: 0;
  }

  .hero-logo {
    left: 50%;
    right: auto;
    top: 10px;
    width: min(62vw, 245px);
    transform: translateX(-50%);
    animation: mobileFloatLogo 3.8s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
  }

  .signal-board {
    display: none;
  }

  .business-section {
    overflow: hidden;
  }

  .interactive-grid.airy {
    display: grid;
    grid-template-columns: 1fr;
    max-width: none;
    gap: 18px;
    margin-top: 22px;
  }

  .product-tabs {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .product-tabs .info-tab {
    min-height: 76px;
    justify-content: center;
    padding: 0 10px;
    text-align: center;
  }

  .info-panel {
    width: 100%;
    padding: 26px;
  }

  .info-panel h3 {
    font-size: clamp(28px, 11vw, 44px);
  }

  .info-panel p:not(.eyebrow) {
    font-size: 17px;
  }

  .contact-link {
    width: 100%;
    justify-content: center;
    font-size: clamp(18px, 5.4vw, 24px);
    padding: 0 16px;
  }

  .mci-nav {
    display: none;
  }

  .forum-header,
  .post-row {
    align-items: stretch;
    flex-direction: column;
  }

  .forum-shell {
    width: min(100% - 28px, 1120px);
  }

  .role-fieldset,
  .admin-code,
  .post-info div {
    grid-template-columns: 1fr;
  }

  .modal-card {
    padding: 20px;
  }
}

@keyframes mobileFloatLogo {
  0%,
  100% {
    transform: translate(-50%, 0);
  }

  50% {
    transform: translate(-50%, -13px) scale(1.035);
  }
}
