/* EyeScore test app (app.html) and privacy page. Light theme only: the tests depend on a controlled
   white background.

   Test stimuli: the "Stimuli" section near the end uses its own --s-* tokens for colors, fonts and
   sizes, so restyling the app can't change what the tests draw. .card keeps 28px padding and a
   transparent 1px border so the stage and passage widths stay fixed at every window size. */
@font-face {
  font-family: "Urbanist";
  src: url("../fonts/urbanist-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --bg: #fbfbfc;
  --surface: #f0f1f4;
  --ink: #14171c;
  --muted: #5f636b;
  --action: #2458f5;
  --action-ink: #ffffff;
  --link: #1f4fe0;
  --good: #11804f;
  --warn: #a3520a;
  --warn-ground: #fbf1e4;
  --bad: #c2362f;
  --line: color-mix(in oklab, var(--ink) 13%, var(--bg));
  --line-strong: color-mix(in oklab, var(--ink) 26%, var(--bg));
  --font: "Urbanist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 8px;
  --m-in: 140ms;
  --m-out: 200ms;
  --m-press: 90ms;
  --m-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  /* names older markup uses */
  --ink-2: var(--muted);
  --ink-3: var(--muted);
  --accent: var(--link);
  /* stimulus tokens (do not change) */
  --s-line: #e3e6eb;
  --s-surface: #ffffff;
  --s-ink: #14171c;
  --s-accent: #2458f5;
  --s-accent-soft: #e8eeff;
  --s-good: #0f8a5f;
  --s-bad: #c2362f;
  --s-radius: 14px;
  --s-font:
    ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
main {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}
main:focus,
main:focus-visible {
  outline: none;
}
h1,
h2,
h3 {
  line-height: 1.12;
  margin: 0 0 0.5em;
  font-weight: 500;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.3rem, 4.4vw, 3.5rem);
}
h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
}
h3 {
  font-size: 1.15rem;
  letter-spacing: -0.015em;
}
p {
  margin: 0 0 1em;
}
strong,
b {
  font-weight: 600;
}
a {
  color: var(--link);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.9375rem;
}
.tiny {
  font-size: 0.84375rem;
  color: var(--muted);
}
.center {
  text-align: center;
}
.hidden,
[hidden] {
  display: none !important;
}
.accent {
  color: var(--link);
}

/* top bar: brand, progress, extension status */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 45px;
  height: 64px;
  display: grid;
  grid-template-columns: 1fr minmax(0, 420px) 1fr;
  align-items: center;
  gap: 24px;
}
.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  background: none;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: block;
}
.progress {
  grid-column: 2;
  width: 100%;
}
.progress-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.progress-track {
  height: 4px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: var(--ink);
  border-radius: 99px;
  transition: width 0.4s var(--m-ease);
}
.ext-pill {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}
.ext-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
}

.footer {
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
  padding: 20px 16px 28px;
  max-width: 760px;
  margin: 0 auto;
}
.footer a {
  color: var(--muted);
  margin-left: 6px;
}

/* sections. The transparent border and 28px padding keep stimulus widths fixed. */
.card {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0;
  padding: 28px;
}
.card + .card {
  margin-top: 16px;
  border-top-color: var(--line);
}
.narrow {
  max-width: 640px;
  margin: 0 auto;
}
.mid {
  max-width: 820px;
  margin: 0 auto;
}
.stack > * + * {
  margin-top: 16px;
}
.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.row.end {
  justify-content: flex-end;
}
.row.center {
  justify-content: center;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.eyebrow {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 12px;
  letter-spacing: 0;
}
.card > h2 {
  margin-bottom: 0.45em;
}
.card > .muted:not(.center) {
  max-width: 62ch;
}

/* buttons */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform var(--m-out) var(--m-ease),
    background-color var(--m-out) var(--m-ease),
    border-color var(--m-out) var(--m-ease);
}
.btn-primary {
  background: var(--action);
  border-color: var(--action);
  color: var(--action-ink);
}
.btn-ghost {
  border-color: transparent;
  color: var(--muted);
}
.btn-lg {
  min-height: 52px;
  padding: 0 28px;
  font-size: 17px;
}
.btn-small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 14.5px;
}
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
a.btn {
  background-image: none;
}
.kbd {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 0 6px;
  background: transparent;
  vertical-align: 1px;
}
.btn-primary .kbd {
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.45);
}
.seg-btn.on {
  border-color: var(--ink);
  background: var(--surface);
  box-shadow: inset 0 0 0 0.5px var(--ink);
}
.arrow-pad .btn {
  border-radius: var(--r-md);
}

@media (hover: hover) and (pointer: fine) {
  .btn:not([disabled]):hover {
    transform: translateY(-1px);
    transition-duration: var(--m-in);
    background-color: color-mix(in oklab, var(--ink) 6%, transparent);
    border-color: var(--ink);
  }
  .btn-ghost:not([disabled]):hover {
    border-color: transparent;
    color: var(--ink);
  }
  .btn-primary:not([disabled]):hover {
    background-color: color-mix(in oklab, var(--action) 86%, var(--ink));
    border-color: color-mix(in oklab, var(--action) 86%, var(--ink));
  }
  a {
    background-size: 0% 1px;
    transition: background-size var(--m-out) var(--m-ease);
  }
  a:hover {
    background-size: 100% 1px;
    transition-duration: var(--m-in);
  }
  .footer a {
    background-size: 100% 1px;
  }
  .home-step:hover .home-n {
    color: var(--ink);
  }
}
.btn:not([disabled]):active {
  transform: translateY(1px) scale(0.985);
  transition-duration: var(--m-press);
}
:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 2px;
}
.btn:focus-visible {
  outline-offset: 3px;
}

/* app home */
.home {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 64px;
  align-items: center;
  min-height: calc(100svh - 64px - 140px);
  padding: 28px 29px;
}
.home .eyebrow {
  margin-bottom: 16px;
}
.home h1 {
  max-width: 13ch;
  margin-bottom: 20px;
}
.home .lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: 28px;
}
.home .row {
  gap: 8px 12px;
}
.home-note {
  margin: 20px 0 0;
}
.home-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  counter-reset: step;
}
.home-step {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 4px 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.home-n {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  transition: color var(--m-out) var(--m-ease);
}
.home-t {
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.home-time {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
.home-d {
  grid-column: 2 / 4;
  color: var(--muted);
  font-size: 0.9375rem;
}
@media (max-width: 860px) {
  .home {
    grid-template-columns: 1fr;
    gap: 40px;
    min-height: 0;
    padding: 20px 21px;
  }
}

/* intro screens before each test */
.spec {
  display: grid;
  grid-template-columns: 64px 1fr;
  margin: 24px 0 28px;
  border-top: 1px solid var(--line);
}
.spec dt,
.spec dd {
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.spec dt {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  padding-top: 13px;
}
.spec dd {
  font-size: 0.9375rem;
}
.sets {
  font-size: 0.9375rem;
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 10px 14px;
}

/* lists */
.checklist {
  list-style: none;
  padding: 0;
  margin: 4px 0 24px;
  border-top: 1px solid var(--line);
}
.checklist li {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.checklist li strong {
  color: var(--ink);
  font-weight: 500;
}
.checklist.plain {
  border-top: 0;
}
.checklist.plain li {
  padding-left: 0;
}

/* tests: the header above each stage */
.test-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.test-head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.2vw, 1.75rem);
}
.trial-count {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* results */
.headline-box {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  padding: 28px;
}
.headline-box .eyebrow {
  color: var(--muted);
}
.headline-box .big {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 30ch;
  text-wrap: balance;
}
.headline-box .sub {
  color: var(--muted);
  margin-top: 12px;
  max-width: 72ch;
  font-size: 0.9375rem;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, max-content));
  gap: 8px 56px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.stat-v {
  font-size: clamp(1.7rem, 2.6vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat-l {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 4px;
}
.finding {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.finding h3 {
  margin-bottom: 6px;
}
.finding .verdict {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.level-bars {
  display: grid;
  gap: 8px;
}
.bar-track {
  height: 8px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--ink);
  border-radius: 99px;
}
.level-row {
  display: grid;
  grid-template-columns: 90px 1fr 110px;
  gap: 10px;
  align-items: center;
  font-size: 0.88rem;
}
.level-row .bar-fill {
  background: var(--line-strong);
}
.level-row.win .bar-fill {
  background: var(--ink);
}
.level-row.win .lvl {
  font-weight: 600;
}
.level-row .meta {
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.finding .level-row {
  grid-template-columns: 150px 1fr 120px;
}
.profile-table {
  width: 100%;
  border-collapse: collapse;
}
.profile-table td {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.profile-table td:last-child {
  text-align: right;
  font-weight: 500;
}
.code-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  word-break: break-all;
  background: var(--surface);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  max-height: 90px;
  overflow: auto;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 50;
}
.callout {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 10px 14px;
}
.callout.warn {
  background: var(--warn-ground);
  color: var(--ink);
}
.rx-layout {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}
.rx-layout > .stack > .card:first-child {
  border-top-color: transparent;
}
.rx-layout > .stack:last-child {
  position: sticky;
  top: 80px;
}
@media (max-width: 900px) {
  .rx-layout {
    grid-template-columns: 1fr;
  }
  .rx-layout > .stack:last-child {
    position: static;
  }
  .rx-layout > .stack + .stack > .card:first-child {
    border-top-color: var(--line);
  }
}
.rx-rows {
  margin-top: 4px;
}
.rx-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.rx-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.rx-name strong {
  font-weight: 500;
}
.rx-name .tiny {
  margin-top: 2px;
}
.rx-main .small + .small {
  margin-top: 2px;
}
.rx-verdict {
  margin-top: 6px;
}
.rx-verdict strong {
  font-weight: 600;
}
.rx-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.rx-value {
  font-weight: 500;
  font-size: 1.02rem;
  color: var(--muted);
}
.rx-row.changed .rx-value {
  color: var(--link);
}
.rx-row.changed .rx-value.off {
  color: var(--muted);
}
.rx-compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
details.measured {
  margin-top: 16px;
}
details.measured summary {
  cursor: pointer;
}

/* form controls */
.switch-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex: none;
}
.switch {
  position: relative;
  width: 40px;
  height: 24px;
  flex: none;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.switch span {
  position: absolute;
  inset: 0;
  background: var(--line-strong);
  border-radius: 99px;
  transition: background-color var(--m-out) var(--m-ease);
}
.switch span::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 180ms var(--m-ease);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.switch input:checked + span {
  background: var(--action);
}
.switch input:checked + span::after {
  transform: translateX(16px);
}
.switch input:focus-visible + span {
  outline: 2px solid var(--action);
  outline-offset: 2px;
}
.text-input {
  font: inherit;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--ink);
  min-height: 44px;
}
.field {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  margin: 4px 0 12px;
}
.field > .small {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}
input[type="range"] {
  width: 100%;
  accent-color: var(--action);
}
.center-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.center-stack > * + * {
  margin-top: 10px;
}
.table-wrap {
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table th,
.data-table td {
  text-align: left;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.data-table th {
  color: var(--muted);
  font-weight: 500;
}

@media (max-width: 760px) {
  .topbar-in {
    padding: 0 16px;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
  }
  .ext-pill {
    display: none;
  }
  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 16px;
  }
}
@media (max-width: 560px) {
  .card {
    padding: 20px;
  }
  .finding .level-row {
    grid-template-columns: 96px 1fr 96px;
  }
  .rx-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .headline-box {
    padding: 20px;
  }
  .spec {
    grid-template-columns: 56px 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-property: opacity, color, background-color, border-color !important;
  }
  .btn:active {
    transform: none;
  }
}

/* ===================== Stimuli: fixed values. Do not restyle. ===================== */
.stage {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--s-line);
  border-radius: var(--s-radius);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
}
.stage canvas {
  display: block;
}
.stage-hint {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.85rem;
  color: #7b8390;
  font-family: var(--s-font);
}
.feedback {
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  height: 1.4em;
  font-family: var(--s-font);
}
.feedback.ok {
  color: var(--s-good);
}
.feedback.no {
  color: var(--s-bad);
}

.arrow-pad {
  display: grid;
  grid-template-columns: repeat(3, 64px);
  grid-template-rows: repeat(2, 56px);
  gap: 8px;
  margin-top: 20px;
}
.arrow-pad .btn {
  padding: 0;
  min-height: 0;
  font-size: 1.4rem;
}
.arrow-pad .up {
  grid-column: 2;
  grid-row: 1;
}
.arrow-pad .left {
  grid-column: 1;
  grid-row: 2;
}
.arrow-pad .down {
  grid-column: 2;
  grid-row: 2;
}
.arrow-pad .right {
  grid-column: 3;
  grid-row: 2;
}

.tiles {
  display: grid;
  gap: 6px;
  width: min(380px, 80vw);
  aspect-ratio: 1;
}
.tile {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  position: relative;
}
.tile:focus-visible {
  outline: 3px solid var(--s-ink);
  outline-offset: 2px;
}
.tiles-4 {
  grid-template-columns: repeat(2, 1fr);
  width: min(300px, 70vw);
  gap: 10px;
}
.tile-num {
  position: absolute;
  left: 8px;
  top: 6px;
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.35);
  font-weight: 700;
  font-family: var(--s-font);
}
.tile-answer {
  outline: 3px solid #14171c;
  outline-offset: 2px;
}

.fixation {
  position: absolute;
  width: 22px;
  height: 22px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.fixation::before,
.fixation::after {
  content: "";
  position: absolute;
  background: #1f2328;
}
.fixation::before {
  left: 10px;
  top: 0;
  width: 2px;
  height: 22px;
}
.fixation::after {
  top: 10px;
  left: 0;
  height: 2px;
  width: 22px;
}
.dot {
  position: absolute;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.sentence-stage {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.sentence-box {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 28px;
  background: #ffffff;
  border: 1px solid var(--s-line);
  border-radius: var(--s-radius);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}
.sentence {
  margin: 0;
  color: #111111;
  line-height: 1.35;
  text-align: center;
  max-width: 100%;
  overflow-wrap: break-word;
  font-family: var(--s-font);
}
.ready-box {
  display: grid;
  place-items: center;
  min-height: 280px;
  text-align: center;
}
.countdown {
  width: 180px;
  height: 4px;
  border-radius: 99px;
  overflow: hidden;
  margin: 12px auto 14px;
  background: rgba(127, 127, 127, 0.22);
}
.countdown-fill {
  height: 100%;
  width: 0;
  background: currentColor;
  opacity: 0.55;
  transition: width 1.1s linear;
}
.reading-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  min-height: 44px;
}
.center-row {
  justify-content: center;
}

.crowd-stage {
  min-height: 260px;
}
.glyph {
  position: absolute;
  line-height: 1;
  color: #111111;
  white-space: pre;
  font-family: var(--s-font);
}
.keypad {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 8px;
}
.key {
  font-size: 1.3rem;
  height: 50px;
  border-radius: 8px;
  border: 1px solid var(--s-line);
  background: var(--s-surface);
  color: var(--s-ink);
  cursor: pointer;
  font-family: var(--s-font);
}
.key:hover {
  border-color: var(--s-accent);
}
.key:disabled {
  opacity: 0.4;
  cursor: default;
}
.key:focus-visible {
  outline: 3px solid var(--s-accent-soft);
  outline-offset: 2px;
}

.nl-stage {
  align-items: flex-start;
  justify-content: flex-start;
  padding: 28px 32px;
  min-height: 340px;
}
.para {
  color: #111111;
  font-family: var(--s-font);
}
.para .ln {
  white-space: nowrap;
}
.para .mask {
  background: #c5ccd4;
  color: transparent;
  border-radius: 3px;
}
.para .hl {
  background: #ffe27a;
  color: #111111;
  border-radius: 3px;
  box-shadow: 0 0 0 2px #ffe27a;
}
.answer-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0 8px;
}
.answer-row .btn {
  min-height: 56px;
}

/* screen setup: the card outline and the blind-spot stage */
.card-outline {
  border: 2px solid var(--s-accent);
  border-radius: 3.2% / 5%;
  background: linear-gradient(135deg, #eef3ff, #dbe5ff);
  position: relative;
  margin: 20px auto;
}
.card-outline::after {
  content: "";
  position: absolute;
  left: 10%;
  top: 32%;
  width: 13%;
  height: 20%;
  border-radius: 3px;
  background: #c7d3f5;
}
.blindspot-stage {
  height: 220px;
  min-height: 220px;
  display: block;
}
.bs-square {
  position: absolute;
  width: 24px;
  height: 24px;
  background: #14171c;
  top: 50%;
  transform: translateY(-50%);
}
.bs-dot {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #d62f2f;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* night check: the page-brightness sample */
.dim-sample {
  border: 1px solid var(--s-line);
  border-radius: 12px;
  padding: 18px;
  background: #fff;
  color: var(--s-ink);
  font-family: var(--s-font);
  font-size: 17px;
  line-height: 1.5;
}
.dim-sample p {
  margin: 0 0 8px;
}
.dim-sample .rx-gray {
  color: #8a8f98;
  font-size: 14px;
  margin: 0;
}

/* color assist preview and samples */
.rx-panel {
  border: 1px solid var(--s-line);
  border-radius: 12px;
  padding: 16px;
  background: #ffffff;
  overflow: hidden;
  min-width: 0;
}
.rx-sample {
  background: #ffffff;
  color: #1f2328;
  font-family: var(--s-font);
}
.rx-sample p {
  margin: 0 0 10px;
  overflow-wrap: break-word;
}
.rx-sample .rx-gray {
  color: #8a8f98;
  font-size: 14px;
  margin: 0;
}
.rx-chart {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  font-family: var(--s-font);
  color: var(--s-ink);
}
.rx-chart-row {
  display: grid;
  grid-template-columns: 14px 56px 1fr;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.rx-key {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}
.rx-chart-bar {
  height: 12px;
  border-radius: 3px;
  display: block;
}

/* reading comfort: the same passage at two sizes, in equal columns */
.cmp {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 16px;
  align-items: start;
}
.cmp-panel {
  border: 1px solid var(--s-line);
  border-radius: 12px;
  background: #fff;
  padding: 16px 20px;
  min-width: 0;
}
.cmp-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--s-accent);
  margin-bottom: 8px;
  font-family: var(--s-font);
}
.cmp-text {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #222;
  line-height: 1.5;
  overflow-wrap: break-word;
}

@media (max-width: 560px) {
  .stage {
    min-height: 360px;
    padding: 16px;
  }
  .sentence-box {
    padding: 16px;
  }
}
@media (max-width: 700px) {
  .cmp {
    grid-template-columns: 1fr;
  }
}
