[hidden] {
  display: none !important;
}
.vc {
  max-width: 40rem;
  padding-block: 20px 40px;
}
.step {
  display: grid;
  gap: 16px;
}
.step h1 {
  font-size: clamp(2rem, 7vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.step h1:focus {
  outline: none;
}
.lead-big {
  font-size: 1.375rem;
  line-height: 1.35;
  font-weight: 600;
}
.quiet {
  color: var(--color-muted);
}
.pic {
  display: block;
  width: 100%;
  max-width: 22rem;
  height: auto;
  margin-inline: auto;
  padding: 16px;
  background: var(--color-mist);
  border-radius: 24px;
}
.needs {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-inline-start: 1.2em;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.actions .button {
  flex: 1 1 14rem;
}
.button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Screen size */
.card-stage {
  overflow: hidden;
  padding-block: 8px;
}
.card-outline {
  position: relative;
  /* DEC-050: upright, like the card held against a phone held upright. */
  aspect-ratio: 53.98 / 85.6;
  max-width: 100%;
  margin-inline: auto;
  border: 2px solid var(--color-graphite);
  border-radius: 6% / 4%;
}
.card-chip {
  position: absolute;
  inset-inline-start: 30%;
  top: 10%;
  width: 22%;
  aspect-ratio: 1 / 1.3;
  border-radius: 12%;
  background: var(--color-amber);
}
.slider-label {
  font-weight: 600;
}
input[type='range'] {
  width: 100%;
  min-height: 48px;
  accent-color: var(--color-graphite);
}

/* Position */
.live-row {
  display: flex;
  align-items: center;
  gap: 20px;
}
.preview {
  position: fixed;
  z-index: 5;
  top: max(10px, env(safe-area-inset-top));
  inset-inline-end: max(12px, env(safe-area-inset-right));
  width: 5.5rem;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #1f2226;
}
.preview video,
.preview canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}
.distance {
  font-size: clamp(2.75rem, 12vw, 4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.pos-note {
  margin-top: 6px;
  font-weight: 600;
}
.pos-note.off {
  color: #b3261e;
}

/* Example under "cover your eye" */
.example {
  display: grid;
  gap: 8px;
  padding: 16px;
  background: var(--color-mist);
  border-radius: 20px;
}
.example-pic {
  width: 100%;
  max-width: 14rem;
  height: auto;
}

/* Test */
.test-bar {
  display: flex;
  gap: 16px;
  font-weight: 600;
  color: var(--color-muted);
  font-variant-numeric: tabular-nums;
}
.stage {
  position: relative;
  display: grid;
  place-items: center;
  height: min(40vh, 18rem);
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: 24px;
}
.ring {
  display: block;
}
.pause {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 24px;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
}
.how {
  text-align: center;
  font-weight: 600;
}
.pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-areas:
    '. up .'
    'left unsure right'
    '. down .';
  gap: 10px;
  max-width: 20rem;
  margin-inline: auto;
  width: 100%;
}
.arrow {
  display: grid;
  place-items: center;
  min-height: 64px;
  border: 0;
  border-radius: 20px;
  background: var(--color-graphite);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.arrow svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.arrow.up {
  grid-area: up;
}
.arrow.left {
  grid-area: left;
}
.arrow.right {
  grid-area: right;
}
.arrow.down {
  grid-area: down;
}
.arrow.unsure {
  grid-area: unsure;
  background: var(--color-mist);
  color: var(--color-graphite);
  font-size: 0.9375rem;
}
.arrow[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Result */
.results {
  display: grid;
  gap: 12px;
}
.eye-result {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 20px;
  background: var(--color-mist);
  border-radius: 20px;
}
.eye-result b {
  font-size: 2rem;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.eye-result small {
  display: block;
  color: var(--color-muted);
  font-size: 0.9375rem;
}
.advice {
  font-size: 1.125rem;
  font-weight: 600;
}

/* Line alignment */
.stage-drag {
  touch-action: none;
  cursor: ns-resize;
}
.stage-drag.vertical {
  cursor: ew-resize;
}
.dots {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.nudge {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.nudge .arrow {
  width: 6rem;
}
.eye-result b.verdict {
  font-size: 1.25rem;
  line-height: 1.25;
}

/* Near reading */
.read-stage {
  display: grid;
  place-items: center;
  min-height: 12rem;
  padding: 24px 16px;
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: 24px;
  overflow: hidden;
}
.read-line {
  margin: 0;
  color: #000;
  font-weight: 400;
  line-height: 1.3;
  text-align: center;
  overflow-wrap: anywhere;
}
.read-size {
  color: var(--color-muted);
  font-weight: 600;
  text-align: center;
}

/* Side vision: the whole screen becomes the test area */
.field-stage {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #6b6b6b;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.field-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.field-stop {
  position: absolute;
  z-index: 2;
  top: max(10px, env(safe-area-inset-top));
  inset-inline-start: max(10px, env(safe-area-inset-left));
  min-height: 48px;
  padding-inline: 18px;
  border: 0;
  border-radius: 999px;
  background: #5a5a5a;
  color: #e6e6e6;
  font: inherit;
  font-weight: 600;
}
.field-progress {
  position: absolute;
  z-index: 2;
  top: max(20px, env(safe-area-inset-top));
  inset-inline-end: max(16px, env(safe-area-inset-right));
  color: #d0d0d0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.field-pause {
  background: rgba(60, 60, 60, 0.96);
  color: #fff;
  border-radius: 0;
}
.preview.dim {
  opacity: 0;
}
.field-maps {
  display: grid;
  gap: 12px;
}
.field-map {
  display: grid;
  gap: 8px;
  padding: 16px 20px 20px;
  background: var(--color-mist);
  border-radius: 20px;
}
.field-map h2 {
  font-size: 1.125rem;
}
.field-map svg {
  width: 100%;
  max-width: 20rem;
  height: auto;
  margin-inline: auto;
  background: #fff;
  border-radius: 12px;
}
.field-map p {
  color: var(--color-muted);
}

/* Eye referral guide */
.problem-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.problem-list button {
  width: 100%;
  min-height: 60px;
  padding: 14px 20px;
  border: 0;
  border-radius: 18px;
  background: var(--color-mist);
  color: var(--color-graphite);
  font: inherit;
  font-weight: 600;
  text-align: start;
  cursor: pointer;
}
.problem-list button:hover {
  background: #e7e9ec;
}
.checks-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}
.check-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  min-height: 56px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--color-mist);
  cursor: pointer;
}
.check-item input {
  flex: none;
  width: 24px;
  height: 24px;
  margin: 1px 0 0;
  accent-color: var(--color-graphite);
}
.check-item:has(input:checked) {
  background: #fff;
  box-shadow: inset 0 0 0 2.5px var(--color-graphite);
}
.details summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  font-weight: 600;
  cursor: pointer;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-block: 8px;
}
.detail-grid label {
  display: grid;
  gap: 4px;
  font-weight: 600;
}
.detail-grid .wide {
  grid-column: 1 / -1;
}
.detail-grid input,
.detail-grid select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: 48px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 2px solid #8a9099;
  border-radius: 10px 10px 4px 4px;
  background: var(--color-mist);
  font: inherit;
  font-size: 1rem;
  color: var(--color-graphite);
}
.urgency {
  padding: 24px 20px;
  border-radius: 24px;
  background: var(--color-mist);
}
.urgency[data-level='1'] {
  background: var(--color-graphite);
  color: #fff;
}
.urgency b {
  display: block;
  font-size: clamp(1.5rem, 5vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.urgency span {
  display: block;
  margin-top: 8px;
}
.small-title {
  font-size: 1.125rem;
  margin-top: 4px;
}
.plain-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-inline-start: 1.2em;
}
.handover {
  margin: 0;
  padding: 16px;
  border-radius: 16px;
  background: var(--color-mist);
  font: inherit;
  white-space: pre-wrap;
}

/* Links inside sentences: a taller tap area without changing the line spacing. */
.vc p a {
  display: inline-block;
  padding-block: 12px;
  margin-block: -12px;
  font-weight: 600;
}

/* Safari ignores the height of a native dropdown; draw it ourselves (arrow as an inline image). */
.detail-grid select {
  appearance: none;
  -webkit-appearance: none;
  height: 48px;
  padding-inline-end: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%2323272e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px 20px;
}

/* Lists of sources: each link a full-height tap target, even when it wraps. */
.sources a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  font-weight: 400;
}
