/* === Online eye test (mount version) ===
   Reuses the global .etest* rules from pages.css as they are. This file only:
   - frames the test inside the dark tool panel (navy on navy needs an edge),
   - lifts every reading size to 16px or more,
   - keeps a large E centred and inside the chart, whatever the screen,
   - gives the two-choice distance step two equal columns. */

.tl-eyetest { width: 100%; min-width: 0; }
.tl-eyetest .etest { width: 100%; }
.panel.dark .tl-eyetest .etest { background: rgb(255 255 255 / 0.04); border: 1px solid rgb(255 255 255 / 0.16); }

/* Reading sizes: nothing under 16px */
.tl-eyetest .etest-bar { font-size: clamp(16px, 0.95vw, 18px); color: rgb(255 255 255 / 0.82); flex-wrap: wrap; row-gap: 10px; }
.tl-eyetest .etest-screen { gap: clamp(16px, 1.4vw, 28px); }
.tl-eyetest .etest-screen p, .tl-eyetest .etest-screen li { font-size: clamp(16px, 1.08vw, 21px); line-height: 1.5; }
.tl-eyetest .etest-screen h2 { max-width: 30em; text-wrap: balance; }
.tl-eyetest .etest-screen ul { gap: 0.7em; }
.tl-eyetest .etest-note { font-size: clamp(16px, 1vw, 19px); line-height: 1.5; color: rgb(255 255 255 / 0.88); }
.tl-eyetest .etest-note .fchip { margin-left: 6px; vertical-align: middle; }
.tl-eyetest .etest-opt { gap: 6px; min-height: 44px; }
.tl-eyetest .etest-opt b { font-size: clamp(17px, 1.2vw, 24px); }
.tl-eyetest .etest-opt span { font-size: clamp(16px, 0.98vw, 19px); line-height: 1.4; opacity: 0.85; }
.tl-eyetest .etest-opt:disabled { cursor: not-allowed; opacity: 0.55; }
.tl-eyetest .etest-opt:disabled:hover { border-color: rgb(255 255 255 / 0.3); }
.tl-eyetest .etest-opt:focus-visible, .tl-eyetest .dpad button:focus-visible, .tl-eyetest .cal-ctrl button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.tl-eyetest .etest-opts.tl-eyetest-opts-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tl-eyetest .etest-screen label.check { align-items: start; font-size: clamp(16px, 1.05vw, 20px); color: rgb(255 255 255 / 0.92); }
.tl-eyetest .check input { accent-color: var(--soft); }
.tl-eyetest .etest-hint { font-size: clamp(16px, 1.05vw, 20px); line-height: 1.5; color: rgb(255 255 255 / 0.85); }
.tl-eyetest .etest-disclaimer { font-size: clamp(16px, 0.95vw, 18px); line-height: 1.5; color: rgb(255 255 255 / 0.75); }
.tl-eyetest .etest-screen h2:focus { outline: none; }
.tl-eyetest .etest-screen h2:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 4px; }
.tl-eyetest .etest-actions .pill-line:disabled, .tl-eyetest .etest-actions .pill:disabled { cursor: not-allowed; opacity: 0.5; }
.tl-eyetest .etest .pill { font-size: clamp(16px, 1.1vw, 22px); }
.tl-eyetest .etest .fchip { height: auto; min-height: 44px; padding: 8px 18px; font-size: 16px; }
.tl-eyetest .etest .pill:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
/* Calibration: instructions and slider on the left, the outline on a work area on the right.
   The slider never moves while the outline grows. */
.tl-eyetest .cal-stage { display: block; position: relative; min-height: clamp(260px, 24vw, 470px); padding: clamp(16px, 1.4vw, 28px); overflow: hidden; border: 1px dashed rgb(255 255 255 / 0.22); border-radius: var(--r); background: radial-gradient(rgb(255 255 255 / 0.09) 1px, transparent 1.4px) 0 0 / 18px 18px; }
.tl-eyetest .cal-ctrl { flex-wrap: nowrap; gap: 12px; width: min(100%, 560px); padding: 10px 12px; border: 1px solid rgb(255 255 255 / 0.16); border-radius: 999px; background: rgb(255 255 255 / 0.05); }
.tl-eyetest .cal-ctrl input[type="range"] { flex: 1; order: 0; min-width: 0; width: auto; }
.tl-eyetest .cal-ctrl button { flex: none; }
.tl-eyetest .cal-card { flex: none; font-size: clamp(16px, 0.95vw, 18px); }
.tl-eyetest .cal-ctrl button { font-size: 22px; }

/* Start and eye screens: copy on the left, a picture on the right (stacked on phones) */
.tl-eyetest .etest-screen.tl-eyetest-split.is-active { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: stretch; gap: clamp(24px, 4vw, 80px); }
.tl-eyetest-copy { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(16px, 1.4vw, 28px); min-width: 0; }
.tl-eyetest-aside { min-width: 0; }
.tl-eyetest-split .tl-eyetest-copy { justify-content: center; }
.tl-eyetest-split .etest-actions { margin-top: 6px; }
.tl-eyetest-sample { display: flex; flex-direction: column; gap: 14px; padding: clamp(20px, 2vw, 40px); border-radius: var(--r); background: #fff; color: #000; }
.tl-eyetest .tl-eyetest-sample p { max-width: none; color: var(--gray-700); font-size: 16px; }
.tl-eyetest-sample ol { display: flex; flex: 1; flex-direction: column; justify-content: space-evenly; gap: 10px; font-size: clamp(14px, 1.2vw, 24px); }
.tl-eyetest .tl-eyetest-sample li { max-width: none; color: #000; display: grid; grid-template-columns: minmax(0, 1fr) 4.2em; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid rgb(var(--navy-rgb) / 0.1); }
.tl-eyetest-sample li:last-child { border-bottom: 0; padding-bottom: 0; }
.tl-eyetest-es { display: flex; justify-content: center; gap: 0.8em; }
.tl-eyetest-es svg { flex: none; display: block; }
.tl-eyetest .tl-eyetest-lbl { color: var(--gray-700); font-size: 16px; font-weight: 500; text-align: right /*rtl:ignore*/; font-variant-numeric: tabular-nums; }
.tl-eyetest-cover { display: grid; grid-template-columns: 1fr 1fr; align-content: center; gap: clamp(12px, 1.4vw, 28px); padding: clamp(20px, 2vw, 40px); border: 1px solid rgb(255 255 255 / 0.16); border-radius: var(--r); background: rgb(255 255 255 / 0.05); }
.tl-eyetest-eye { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.tl-eyetest-eye b { margin-top: 10px; font-size: clamp(17px, 1.2vw, 23px); font-weight: 500; }
.tl-eyetest-eye > span:last-child { display: inline-flex; padding: 4px 12px; border-radius: 999px; background: var(--soft); color: var(--navy); font-size: 16px; font-weight: 500; }
.tl-eyetest-eye.is-covered > span:last-child { background: rgb(255 255 255 / 0.14); color: #fff; }
.tl-eyetest-ball { position: relative; display: grid; place-items: center; width: min(100%, clamp(110px, 10vw, 200px)); aspect-ratio: 16 / 9; border-radius: 50%; background: #fff; box-shadow: inset 0 -6px 14px rgb(0 0 0 / 0.12); }
.tl-eyetest-iris { width: 42%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #050505 0 34%, transparent 36%), radial-gradient(circle, var(--blue) 0 60%, var(--deep) 100%); }
.tl-eyetest-eye.is-covered .tl-eyetest-iris { opacity: 0.3; }
.tl-eyetest-palm { position: absolute; left: 50%; top: 50%; width: 92%; height: auto; color: var(--pale); transform: translate(-50%, -46%); filter: drop-shadow(0 6px 10px rgb(0 0 0 / 0.35)); }
.tl-eyetest .tl-eyetest-safety.is-active ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px clamp(24px, 3vw, 60px); width: 100%; max-width: 64em; }

/* Chart: the E is always centred; a big E makes the white stage taller instead of spilling out */
.tl-eyetest .chart-stage { --tl-et-min: 30vw; overflow: hidden; min-height: max(var(--tl-et-min), var(--tl-et-need, 0px)); }
.tl-eyetest .chart-stage svg { position: absolute; left: 50%; top: 50%; max-width: none; transform: translate(-50%, -50%); }
.tl-eyetest .chart-stage .chart-msg { z-index: 1; max-width: calc(100% - 2.8vw); padding: 4px 8px; border-radius: 8px; background: rgb(255 255 255 / 0.9); color: var(--gray-700); font-size: clamp(16px, 0.95vw, 18px); line-height: 1.35; }
.tl-eyetest .chart-msg:empty { display: none; }
.tl-eyetest .dpad { grid-template-columns: repeat(3, clamp(72px, 5.4vw, 100px)); grid-template-rows: repeat(3, clamp(72px, 5.4vw, 100px)); gap: 8px; }
.tl-eyetest .dpad .none { padding: 4px; font-size: clamp(15px, 0.9vw, 17px); line-height: 1.15; hyphens: manual; }

/* Result */
.tl-eyetest .result-eye h3 { font-size: clamp(16px, 0.9vw, 17px); color: var(--gray-700); }
.tl-eyetest .result-eye p { font-size: clamp(16px, 1vw, 19px); line-height: 1.45; }
.tl-eyetest .result-eye .big { font-size: clamp(38px, 4vw, 84px); line-height: 1.05; overflow-wrap: anywhere; }
.tl-eyetest .result-eye summary { color: var(--blue-dk); }
.tl-eyetest .result-msg { width: 100%; }
.tl-eyetest .result-msg p { max-width: 60em; }
.tl-eyetest-link { color: #fff; font-size: clamp(16px, 1.05vw, 20px); text-decoration: underline; text-underline-offset: 3px; }
.tl-eyetest-link:hover { color: var(--pale); }

@media (max-width: 991.98px) {
  .tl-eyetest .etest-bar { padding: 16px 5vw; }
  .tl-eyetest .etest-screen { gap: 18px; padding: 28px 5vw 30px; }
  .tl-eyetest .etest-note { padding: 16px; }
  .tl-eyetest .etest-opts.tl-eyetest-opts-2 { grid-template-columns: 1fr; }
  .tl-eyetest .etest-screen.tl-eyetest-split.is-active { grid-template-columns: 1fr; gap: 22px; }
  .tl-eyetest-sample { display: none; }
  .tl-eyetest-cover { order: -1; padding: 18px 14px; border-radius: 20px; }
  .tl-eyetest .tl-eyetest-safety.is-active ul { grid-template-columns: 1fr; }
  /* phones: the outline sits between the slider and the button */
  .tl-eyetest .tl-eyetest-cal .tl-eyetest-copy { display: contents; }
  .tl-eyetest .tl-eyetest-cal .cal-stage { order: 5; min-height: 0; padding: 12px; }
  .tl-eyetest .tl-eyetest-cal [data-r="calErr"], .tl-eyetest .tl-eyetest-cal [data-r="calSaved"] { order: 6; }
  .tl-eyetest .tl-eyetest-cal .etest-actions { order: 7; }
  .tl-eyetest .tl-eyetest-cal .cal-ctrl { width: 100%; }
  .tl-eyetest .etest-opt { padding: 16px 18px; }
  .tl-eyetest .etest-opt b { font-size: 17px; }
  .tl-eyetest .etest-opt span, .tl-eyetest .etest-hint, .tl-eyetest .etest-disclaimer, .tl-eyetest .cal-card { font-size: 16px; }
  .tl-eyetest .chart-stage { --tl-et-min: 64vw; }
  .tl-eyetest .chart-stage .chart-msg { left: 10px; top: 10px; max-width: calc(100% - 20px); font-size: 16px; }
  .tl-eyetest .dpad { grid-template-columns: repeat(3, 76px); grid-template-rows: repeat(3, 76px); }
  .tl-eyetest .result-eye p { font-size: 16px; }
  .tl-eyetest .result-msg { padding: 20px; }
}
@media (max-width: 420px) {
  .tl-eyetest .etest-bar { padding: 14px 16px; }
  .tl-eyetest .etest-screen { padding: 24px 16px 26px; }
  .tl-eyetest .dpad { grid-template-columns: repeat(3, 72px); grid-template-rows: repeat(3, 72px); gap: 6px; }
  .tl-eyetest .result-msg { padding: 18px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .tl-eyetest .etest-step::before, .tl-eyetest .dpad button, .tl-eyetest .etest-opt { transition: none; }
}
@media print {
  .tl-eyetest .etest { border: 0; }
  .tl-eyetest .etest-bar ol, .tl-eyetest-link { display: none; }
}
