:root {
  --bg: #f3f6fb;
  --card: #ffffff;
  --text: #132238;
  --muted: #667791;
  --line: #d7e0ea;
  --brand: #1d5fd0;
  --brand-soft: #eaf2ff;
  --danger: #ffe5e5;
  --success: #e4f7e7;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Arial, sans-serif; color: var(--text); background: var(--bg); }
a { color: inherit; text-decoration: none; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.topbar { background: #0f1c2f; color: #fff; padding: 14px 0; position: sticky; top: 0; z-index: 50; }
.brand { font-size: 22px; font-weight: 800; }
.nav { display: flex; gap: 18px; flex-wrap: wrap; }
.nav a { color: rgba(255,255,255,.86); }
.main-pad { padding: 24px 0 40px; }
.row { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.start { align-items: flex-start; }
.wrap { flex-wrap: wrap; }
.gap16 { gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: 0 10px 28px rgba(15,28,47,.05); margin-bottom: 18px; }
.mini-card { background: #f7f9fc; border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.hero h1, .card h1 { margin: 0 0 10px; }
.eyebrow { display: inline-block; margin-bottom: 10px; padding: 6px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 13px; font-weight: 700; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.actions.vertical { flex-direction: column; }
.btn, .link-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 16px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 700; border: 0; cursor: pointer; }
.btn.secondary, .link-btn { background: #e9eef8; color: #1e3558; }
.list { margin: 0; padding-left: 18px; line-height: 1.7; }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.compact .mini-card { text-align: center; }
.muted { color: var(--muted); }
.narrow { max-width: 760px; }
.form { display: grid; gap: 16px; }
label { display: grid; gap: 8px; font-weight: 600; }
input, textarea, select { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; background: #fff; }
textarea { min-height: 110px; resize: vertical; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.flash-wrap { display: grid; gap: 10px; margin-bottom: 16px; }
.flash { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); }
.flash.success { background: var(--success); }
.flash.error { background: var(--danger); }
.module-block + .module-block { margin-top: 18px; }
.module-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip { padding: 10px 14px; border-radius: 999px; background: #eef4ff; color: #15489f; font-weight: 700; }
.chip.alt { background: #f5f7fa; color: #334a68; }
.vision-stage, .special-stage { display: grid; place-items: center; min-height: 420px; }
.stage-caption { margin-bottom: 16px; color: var(--muted); }
.dark-stage { background: #0a0a0a; color: #fff; }
.optotype-row { display: flex; align-items: center; justify-content: center; gap: .16em; flex-wrap: nowrap; min-height: 250px; }
.optotype-row > * { opacity: var(--optotype-opacity, 1); }
.symbol-optotype { font-weight: 500; line-height: 1; }
.landolt-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
}
.landolt-ring {
  width: 1em;
  height: 1em;
  display: block;
  overflow: visible;
}
.landolt-arc {
  fill: none;
  stroke: currentColor;
  stroke-width: 20;
  stroke-linecap: butt;
  stroke-dasharray: 231.33 20;
  stroke-dashoffset: 0;
}
.dark-stage .landolt-arc {
  stroke: #fff;
}
.special-image { max-width: min(100%, 640px); height: auto; border-radius: 18px; }
@media (max-width: 900px) {
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .nav { margin-top: 8px; }
}


small.muted { display: block; margin-top: 4px; font-weight: 500; }
.calibration-card {
  margin: 22px 0 26px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfcfe 0%, #f5f8fc 100%);
}
.calibration-card h2 {
  margin: 0 0 6px;
  font-size: 20px;
}
.calibration-help {
  max-width: 620px;
  margin: 0;
}
.calibration-badge {
  padding: 10px 14px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #1d5fd0;
  font-weight: 700;
  white-space: nowrap;
}
.calibration-stage {
  margin-top: 18px;
  padding: 24px 18px 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px dashed #bfd0ea;
}
.calibration-ruler {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.tick {
  width: 4px;
  height: 46px;
  border-radius: 999px;
  background: #0f1c2f;
  flex: 0 0 auto;
}
.calibration-bar-wrap {
  flex: 0 1 min(100%, 720px);
  width: min(100%, 720px);
}
.calibration-bar {
  width: 100%;
  height: 18px;
  border-radius: 4px;
  background: repeating-linear-gradient(
    90deg,
    #111 0,
    #111 20px,
    #fff 20px,
    #fff 40px
  );
  border: 2px solid #111;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}
.calibration-labels {
  margin-top: 10px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  font-size: 14px;
}
@media (max-width: 700px) {
  .calibration-stage {
    padding: 18px 12px 14px;
  }
  .calibration-ruler {
    gap: 8px;
  }
  .tick {
    height: 38px;
  }
  .calibration-bar {
    height: 14px;
  }
  .calibration-labels {
    grid-template-columns: 1fr;
    text-align: center;
  }
}


.metrics-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.metric-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 14px 16px;
}
.metric-box.compact {
  min-width: 0;
}
.metric-label {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}
.metric-value {
  font-size: 24px;
  font-weight: 800;
}
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 900px) {
  .metrics-grid,
  .metrics-strip {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .metrics-grid,
  .metrics-strip {
    grid-template-columns: 1fr;
  }
  .metric-value {
    font-size: 20px;
  }
}


.nav-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.visus-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.visus-chip {
  min-width: 92px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #f7f9fc;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.visus-chip.active {
  background: #eaf2ff;
  border-color: #9fbef7;
  box-shadow: inset 0 0 0 1px rgba(29,95,208,.08);
}
.visus-chip-main {
  font-size: 16px;
  font-weight: 800;
  color: #163e84;
}
.visus-chip-sub {
  font-size: 12px;
  color: var(--muted);
}

.table-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.table-card { border: 1px solid var(--line); border-radius: 18px; padding: 18px; background: #fbfcfe; }
.table-card-head h3 { margin: 0 0 4px; }
.compact-nav .visus-chip { min-width: 88px; }
@media (max-width: 900px) { .table-grid { grid-template-columns: 1fr; } }


.small-note { margin-top: 6px; }

.stage-standard {
  background: #ffffff;
  color: #111111;
}
.stage-contrast {
  background: #ffffff;
  color: #111111;
}
.stage-night {
  background: #282828;
  color: #f5f5f5;
}
.stage-night .stage-caption,
.stage-night .muted {
  color: rgba(255,255,255,.78);
}
.stage-night .optotype-row > * {
  opacity: 1;
}
.stage-night .symbol-optotype,
.stage-night .landolt-ring,
.stage-night .landolt-arc {
  color: #000000;
  stroke: #000000;
}

.table-card .small-note {
  min-height: 36px;
}


.chart-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}
.control-panel {
  position: sticky;
  top: 84px;
  align-self: start;
}
.panel-block + .panel-block {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.panel-title {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 10px;
}
.visus-nav.vertical {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.visus-nav.vertical .visus-chip {
  width: 100%;
  min-width: 0;
}
.wide-actions .btn {
  width: 100%;
}
.main-stage-card {
  min-height: 76vh;
}
.compact-info-card {
  margin-top: 0;
}
.compact-text p {
  margin: 0 0 8px;
}
@media (max-width: 980px) {
  .chart-shell {
    grid-template-columns: 1fr;
  }
  .control-panel {
    position: static;
  }
  .main-stage-card {
    min-height: 60vh;
  }
}


.stable-panel {
  min-height: 76vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.chart-main {
  display: grid;
  grid-template-rows: minmax(520px, 76vh) auto;
  gap: 18px;
  min-width: 0;
}
.stage-layout-fixed {
  display: grid;
  grid-template-rows: auto 1fr;
  align-items: stretch;
}
.stage-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}
.stage-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 4px;
}
.stage-subtitle {
  color: var(--muted);
  font-size: 14px;
}
.top-nav-block,
.panel-quick-actions {
  padding-top: 0;
}
.no-divider {
  border-top: 0 !important;
  margin-top: 0 !important;
}
.top-nav-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ghost-btn {
  visibility: hidden;
  pointer-events: none;
}
.visus-bottom-card {
  margin-bottom: 0;
}
.visus-bottom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 10px;
}
.visus-bottom-grid .visus-chip {
  min-width: 0;
  width: 100%;
}
.compact-text p strong {
  display: inline;
}
@media (max-width: 980px) {
  .chart-main {
    grid-template-rows: minmax(420px, 58vh) auto;
  }
  .stable-panel {
    min-height: auto;
  }
  .stage-header {
    flex-direction: column;
  }
}


.stage-viewport {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 12px 20px;
}
.optotype-row {
  transform: none !important;
  transform-origin: center center;
  max-width: 100%;
  max-height: none;
}
.stage-layout-fixed {
  overflow: hidden;
}
.stage-layout-fixed .stage-header {
  flex: 0 0 auto;
}
.stage-layout-fixed .stage-viewport {
  min-height: 0;
}
.symbol-optotype,
.landolt-wrap {
  flex: 0 0 auto;
}


.chart-shell {
  display: grid;
  grid-template-columns: 328px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.control-panel.stable-panel {
  position: sticky;
  top: 86px;
}
.panel-block {
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}
.panel-block.no-divider {
  border-top: 0;
  padding-top: 0;
  margin-top: 18px;
}
.top-nav-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.wide-actions > * {
  width: 100%;
}
.ghost-btn {
  opacity: .55;
  pointer-events: none;
}
.compact-text p {
  margin: 0 0 8px;
}
.panel-title {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 10px;
}
.chart-main {
  min-width: 0;
}
.main-stage-card.stage-layout-fixed {
  min-height: 660px;
  align-content: start;
}
.stage-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.stage-title {
  font-size: 20px;
  font-weight: 800;
}
.stage-subtitle {
  margin-top: 6px;
  color: var(--muted);
}
.stage-viewport {
  width: 100%;
  min-height: 430px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.visus-bottom-card {
  margin-top: 18px;
}
.visus-bottom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 10px;
}
.special-layout-fixed .stage-caption {
  max-width: 420px;
}
.special-viewport {
  width: 100%;
  min-height: 430px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0 0;
}
.stage-special-image {
  max-width: 100%;
  max-height: 470px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.stage-standard .stage-special-image,
.stage-contrast .stage-special-image,
.stage-night .stage-special-image {
  image-rendering: auto;
}
.stage-night {
  background: #282828;
  color: #000;
}
.stage-night .stage-title,
.stage-night .stage-subtitle,
.stage-night .stage-caption {
  color: #dfe5ef;
}
@media (max-width: 1100px) {
  .chart-shell {
    grid-template-columns: 1fr;
  }
  .control-panel.stable-panel {
    position: static;
  }
}

/* v8.6 special tests: RG / SF / KT */
.special-viewport {
  width: 100%;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0 0;
}
.special-canvas {
  position: relative;
  width: min(100%, 1100px);
  height: min(70vh, 760px);
  min-height: 480px;
  overflow: hidden;
}
.special-render-duochrome_split .special-canvas,
.special-render-astigmatism_fan .special-canvas {
  border: 1px solid #cfd8e3;
  background: #f7f7f7;
}
.special-render-cross_test .special-canvas {
  background: #000;
}

.duochrome-canvas { background: #ffffff; }
.duochrome-half {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
}
.duochrome-half.red { left: 0; background: #ff1616; }
.duochrome-half.green { right: 0; background: #05c92b; }
.duo-ring {
  position: absolute;
  width: 12%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.35vw solid #000;
  box-shadow: inset 0 0 0 0.28vw transparent;
}
.duo-ring::before,
.duo-ring::after {
  content: '';
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  border: 0.32vw solid #000;
}
.duo-ring::after { inset: 24%; }
.duo-ring-top-left { left: 24%; top: 9%; }
.duo-ring-top-center { left: 46%; top: 12%; width: 8%; border-width: 1vw; }
.duo-ring-top-center::before { border-width: 0.22vw; }
.duo-ring-top-center::after { border-width: 0.22vw; }
.duo-ring-top-right { right: 24%; top: 9%; }
.duo-ring-bottom-left { left: 24%; bottom: 9%; }
.duo-ring-bottom-center { left: 46%; bottom: 12%; width: 8%; border-width: 1vw; }
.duo-ring-bottom-center::before { border-width: 0.22vw; }
.duo-ring-bottom-center::after { border-width: 0.22vw; }
.duo-ring-bottom-right { right: 24%; bottom: 9%; }
.duo-digit {
  position: absolute;
  font-size: clamp(64px, 8vw, 130px);
  line-height: 1;
  color: #000;
  font-weight: 400;
}
.d1 { left: 19%; top: 33%; }
.d2 { left: 38%; top: 33%; }
.d3 { left: 58%; top: 33%; }
.d4 { left: 78%; top: 33%; }
.d5 { left: 19%; top: 57%; }
.d6 { left: 38%; top: 57%; }
.d7 { left: 58%; top: 57%; }
.d8 { left: 78%; top: 57%; }

.astigmatism-canvas {
  background: #f1f1f1;
}
.astig-center-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1vw solid #000;
}
.astig-center-ring::before,
.astig-center-ring::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 0.22vw solid #000;
}
.astig-center-ring::before { inset: 16%; }
.astig-center-ring::after { inset: 28%; }
.astig-ray {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.38vw;
  height: 31%;
  background: #000;
  transform-origin: center bottom;
  transform: translate(-50%, -100%) rotate(var(--deg));
}
.astig-label {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  font-size: clamp(30px, 3.4vw, 58px);
  color: #000;
  transform: rotate(var(--deg)) translateY(-19vw) rotate(calc(var(--deg) * -1));
}

.cross-canvas {
  background: #000;
}
.cross-line {
  position: absolute;
  left: 50%;
  top: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.cross-line.vertical {
  color: #bf0000;
  width: clamp(20px, 2.4vw, 34px);
  height: 52%;
}
.cross-line.horizontal {
  color: #00a419;
  width: 52%;
  height: clamp(20px, 2.4vw, 34px);
}

@media (max-width: 1100px) {
  .special-canvas {
    height: min(62vh, 620px);
    min-height: 420px;
  }
  .duo-ring { border-width: 1.8vw; }
  .duo-ring::before,
  .duo-ring::after { border-width: 0.4vw; }
  .astig-center-ring { border-width: 1.4vw; }
  .astig-center-ring::before,
  .astig-center-ring::after { border-width: 0.32vw; }
  .astig-ray { width: 0.6vw; }
}


/* v8.7: larger special-test viewport and SVG scenes */
.special-layout-fixed {
  min-height: 760px;
}
.special-layout-fixed .special-viewport {
  min-height: 620px;
  padding: 4px 0 0;
}
.special-svg-frame {
  width: min(100%, 1240px);
  height: min(78vh, 860px);
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  background: transparent;
  border: 0;
}
.special-svg {
  display: block;
  width: 100%;
  height: 100%;
}
.special-svg-wide {
  aspect-ratio: 5 / 4;
}
.special-svg-square {
  aspect-ratio: 1 / 1;
}
.cross-svg-frame {
  background: #000;
}
.stage-special-image {
  max-height: 620px;
}
@media (max-width: 1100px) {
  .special-layout-fixed { min-height: 660px; }
  .special-layout-fixed .special-viewport { min-height: 500px; }
  .special-svg-frame {
    height: min(64vh, 680px);
    min-height: 420px;
  }
}


/* v8.9: stable special-test sizing across screens */
.chart-shell {
  grid-template-columns: 320px minmax(0, 1fr);
}
.chart-main {
  min-width: 0;
}
.special-layout-fixed {
  min-height: auto;
}
.special-layout-fixed .stage-header {
  margin-bottom: 10px;
}
.special-layout-fixed .special-viewport {
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
.special-svg-frame {
  width: 100%;
  min-height: 0;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
}
.special-svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 68vh;
}
.special-svg-wide {
  width: min(100%, 920px);
}
.special-svg-square {
  width: min(100%, 720px);
}
.cross-svg-frame .special-svg-square {
  width: min(100%, 760px);
  max-height: 64vh;
}
.image-frame {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stage-special-image {
  width: auto;
  height: auto;
  max-width: min(100%, 920px);
  max-height: 62vh;
  object-fit: contain;
}
.special-render-astigmatism_svg .special-svg-square {
  width: min(100%, 760px);
  max-height: 66vh;
}
.special-render-duochrome_svg .special-svg-wide {
  width: min(100%, 980px);
  max-height: 62vh;
}
@media (max-width: 1200px) {
  .chart-shell {
    grid-template-columns: 300px minmax(0, 1fr);
  }
  .special-svg-wide,
  .special-render-duochrome_svg .special-svg-wide,
  .stage-special-image {
    max-width: 100%;
  }
}
@media (max-width: 1100px) {
  .chart-shell {
    grid-template-columns: 1fr;
  }
  .special-svg {
    max-height: none;
  }
  .stage-special-image {
    max-height: 56vh;
  }
}


/* v8.10: larger special-test stage and maximized astigmatism screen */
.special-layout-fixed {
  min-height: 78vh;
}
.special-layout-fixed .special-viewport {
  min-height: 68vh;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.special-layout-fixed .stage-header {
  margin-bottom: 6px;
}
.special-svg-frame,
.image-frame {
  width: 100%;
  min-height: 68vh;
}
.special-svg {
  max-height: 74vh;
}
.special-svg-wide {
  width: min(100%, 1180px);
}
.special-svg-square {
  width: min(100%, 900px);
}
.cross-svg-frame .special-svg-square {
  width: min(100%, 940px);
  max-height: 72vh;
}
.stage-special-image {
  max-width: min(100%, 1120px);
  max-height: 72vh;
}
.special-render-duochrome_svg .special-svg-wide {
  width: min(100%, 1160px);
  max-height: 72vh;
}
.special-render-astigmatism_svg .stage-header {
  display: none;
}
.special-render-astigmatism_svg .special-viewport {
  min-height: 74vh;
}
.special-render-astigmatism_svg .special-svg-frame {
  min-height: 74vh;
}
.special-render-astigmatism_svg .special-svg-square {
  width: min(100%, 980px);
  max-height: 78vh;
}
@media (max-width: 1400px) {
  .special-svg-wide {
    width: min(100%, 1080px);
  }
  .special-svg-square {
    width: min(100%, 840px);
  }
  .special-render-astigmatism_svg .special-svg-square {
    width: min(100%, 900px);
  }
}
@media (max-width: 1100px) {
  .special-layout-fixed {
    min-height: auto;
  }
  .special-layout-fixed .special-viewport,
  .special-svg-frame,
  .image-frame {
    min-height: 54vh;
  }
  .special-svg,
  .stage-special-image {
    max-height: 60vh;
  }
  .special-render-astigmatism_svg .special-viewport,
  .special-render-astigmatism_svg .special-svg-frame {
    min-height: 58vh;
  }
}

/* v8.11: truly larger special tests + cropped image assets */
.render-astigmatism_svg .stage-header {
  margin-bottom: 0;
}
.render-astigmatism_svg .stage-subtitle {
  display: none;
}
.special-layout-fixed {
  min-height: 78vh;
}
.special-layout-fixed .special-viewport {
  min-height: 70vh;
  align-items: center;
  justify-content: center;
}
.special-layout-fixed .image-frame,
.special-layout-fixed .special-svg-frame {
  width: 100%;
  height: 70vh;
  min-height: 560px;
}
.special-layout-fixed .stage-special-image {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}
.special-layout-fixed .special-svg {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
}
.render-duochrome_svg .special-svg-wide {
  width: 100%;
  height: 100%;
}
.render-cross_svg .cross-svg-frame {
  background: #000;
}
.render-cross_svg .cross-svg-frame .special-svg-square {
  width: 100%;
  height: 100%;
}
.render-astigmatism_svg .special-viewport,
.render-astigmatism_svg .special-svg-frame {
  min-height: 74vh;
  height: 74vh;
}
.render-astigmatism_svg .special-svg-square {
  width: 100%;
  height: 100%;
}
@media (max-width: 1100px) {
  .special-layout-fixed .special-viewport,
  .special-layout-fixed .image-frame,
  .special-layout-fixed .special-svg-frame {
    min-height: 58vh;
    height: 58vh;
  }
  .render-astigmatism_svg .special-viewport,
  .render-astigmatism_svg .special-svg-frame {
    min-height: 62vh;
    height: 62vh;
  }
}


/* v8.12: ClickOptics branding + larger special scenes */
:root {
  --bg: #eef0f3;
  --card: #ffffff;
  --text: #1d1f23;
  --muted: #6d727a;
  --line: #d7dbe1;
  --brand: #d63f33;
  --brand-dark: #a72d25;
  --brand-soft: #fbe9e7;
  --panel-soft: #f4f5f7;
}
body {
  background: linear-gradient(180deg, #f2f3f5 0%, #eceff3 100%);
}
.topbar {
  background: #ffffff;
  color: var(--text);
  border-bottom: 3px solid var(--brand);
  box-shadow: 0 8px 24px rgba(0,0,0,.05);
}
.brand {
  color: #14171b;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: .01em;
}
.nav a {
  color: #3e434a;
  font-weight: 700;
}
.nav a:hover {
  color: var(--brand);
}
.card {
  border: 1px solid #d9dde4;
  box-shadow: 0 12px 30px rgba(20, 23, 27, .04);
}
.eyebrow {
  background: #f4f5f7;
  color: var(--brand);
}
.btn {
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  box-shadow: 0 8px 18px rgba(214,63,51,.18);
}
.btn.secondary, .link-btn {
  background: #f2f3f6;
  color: #2f343b;
  border: 1px solid #dde2ea;
  box-shadow: none;
}
.visus-chip.active {
  background: #fff1ef;
  border-color: #f1b9b4;
}
.visus-chip-main {
  color: var(--brand-dark);
}
.compact-info-card h2,
.card h2,
.stage-title {
  color: #111316;
}

/* make special-test art the priority */
.special-layout-fixed {
  min-height: clamp(650px, 82vh, 940px);
  padding: 14px 14px 12px;
}
.special-layout-fixed .special-viewport {
  min-height: clamp(520px, 76vh, 860px);
  height: clamp(520px, 76vh, 860px);
  padding: 0;
  align-items: flex-start;
  justify-content: center;
}
.special-layout-fixed .special-viewport::before {
  content: none;
}
.special-layout-fixed .image-frame,
.special-layout-fixed .special-svg-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  align-items: flex-start;
  justify-content: center;
}
.special-layout-fixed .stage-special-image,
.special-layout-fixed .special-svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
}
.special-layout-fixed .stage-special-image {
  image-rendering: auto;
}
.special-render-image .stage-special-image {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
}
.render-astigmatism_svg .special-viewport,
.render-astigmatism_svg .special-svg-frame {
  min-height: clamp(580px, 80vh, 920px);
  height: clamp(580px, 80vh, 920px);
}
.render-astigmatism_svg .special-svg-square {
  width: 100%;
  height: 100%;
}
.render-cross_svg .special-svg-square,
.render-duochrome_svg .special-svg-wide {
  width: 100%;
  height: 100%;
}
.special-canvas,
.image-frame,
.special-svg-frame {
  overflow: hidden;
}
.special-render-image .image-frame {
  padding-top: 0;
}
.special-render-image .stage-special-image {
  transform: scale(1.06);
  transform-origin: center top;
}
.render-astigmatism_svg .special-svg {
  transform: scale(1.04);
  transform-origin: center top;
}
.stage-caption,
.stage-subtitle {
  display: none !important;
}
@media (max-width: 1100px) {
  .special-layout-fixed {
    min-height: auto;
  }
  .special-layout-fixed .special-viewport,
  .special-layout-fixed .image-frame,
  .special-layout-fixed .special-svg-frame {
    min-height: 58vh;
    height: 58vh;
  }
  .render-astigmatism_svg .special-viewport,
  .render-astigmatism_svg .special-svg-frame {
    min-height: 62vh;
    height: 62vh;
  }
  .special-render-image .stage-special-image,
  .render-astigmatism_svg .special-svg {
    transform: none;
  }
}

/* v8.13: black labels + original media assets + no top special captions */
.eyebrow {
  color: #1d1f23;
}
.visus-chip-main {
  color: #1d1f23;
}
.visus-chip.active .visus-chip-main {
  color: #1d1f23;
}
.nav a:hover {
  color: #1d1f23;
}
.stage-layout-fixed .stage-header {
  display: none !important;
}
.special-layout-fixed {
  padding-top: 10px;
}
.special-layout-fixed .special-viewport {
  min-height: clamp(560px, 80vh, 980px);
  height: clamp(560px, 80vh, 980px);
  align-items: center;
  justify-content: center;
}
.special-layout-fixed .image-frame,
.special-layout-fixed .special-svg-frame {
  align-items: center;
}
.special-layout-fixed .stage-special-image,
.special-layout-fixed .special-svg {
  object-position: center center;
}
.special-render-image .stage-special-image {
  transform: none;
}
.render-image .image-frame {
  background: transparent;
}
.render-image .stage-special-image {
  max-width: 100%;
  max-height: 100%;
}
@media (max-width: 1100px) {
  .special-layout-fixed .special-viewport,
  .special-layout-fixed .image-frame,
  .special-layout-fixed .special-svg-frame {
    min-height: 62vh;
    height: 62vh;
  }
}

/* v8.18 auth + admin + clean home */
.brand-light { background: #ffffff; color: #121212; border-bottom: 2px solid #d63f33; }
.brand-dark { color: #111111; }
.nav-dark a { color: #343434; font-weight: 700; }
.nav-dark a:hover { color: #d63f33; }
.topbar.brand-light { box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.eyebrow.neutral { background: #f2f3f5; color: #111; }
.clean-home { min-height: 180px; display: flex; align-items: center; }
.auth-shell { min-height: calc(100vh - 180px); display: grid; place-items: center; }
.auth-card { width: min(100%, 560px); }
.auth-card h1 { margin-top: 0; }
.narrow.auth-card { max-width: 640px; }
.chip, .eyebrow { color: #111 !important; }
.eyebrow { background:#f1f2f4 !important; }
