/* ---------------------------------------------------------------
   English Media Lab — design tokens
   --------------------------------------------------------------- */
:root {
  /* palette */
  --paper:       #f6f4ee;
  --paper-deep:  #e8e3d6;
  --gold:        #dda93f;
  --gold-deep:   #bd8a22;
  --gold-soft:   #f5e9cf;

  --bg:            var(--paper);
  --bg-elevated:   #ffffff;
  --surface:       #fffdf9;
  --surface-muted: var(--paper-deep);
  --border:        #e0d9c8;
  --border-strong: #c5bba4;
  --text:          #14202b;
  --text-muted:    #5d6875;
  --accent:        #163a54;
  --accent-soft:   var(--gold-soft);
  --accent-text:   #fffdf9;
  --ok:   #1f6b46;
  --no:   #9e3826;
  --shadow-sm: 0 1px 2px rgba(20, 32, 43, .06);
  --shadow-md: 0 5px 18px rgba(20, 32, 43, .10);
  --shadow-lg: 0 24px 60px rgba(20, 32, 43, .22);

  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 20px;
  --header-h:  60px;

  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}

/* ---------------------------------------------------------------
   Base
   --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-image:
    radial-gradient(64% 40% at 10% -8%, rgba(221, 169, 63, .18), transparent 70%),
    radial-gradient(46% 30% at 94% -12%, rgba(22, 58, 84, .07), transparent 72%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 10px 16px;
  background: var(--surface);
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------------
   Header
   --------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}

.header__inner,
.main,
.page-head,
.filters,
.footer__inner {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}

.header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-text);
}
.brand__mark svg { width: 17px; height: 17px; }

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

.search {
  position: relative;
  display: flex;
  align-items: center;
}
.search__icon {
  position: absolute;
  left: 10px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}
.search input {
  width: 200px;
  height: 36px;
  padding: 0 12px 0 32px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  transition: width .25s var(--ease), border-color .2s;
}
.search input::placeholder { color: var(--text-muted); }
.search input:focus { width: 260px; outline: none; border-color: var(--accent); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  transition: background .18s, border-color .18s, transform .18s var(--ease);
}
.icon-btn:hover { background: var(--surface-muted); }
.icon-btn[aria-current="page"] {
  background: var(--gold-deep);
  border-color: var(--gold-deep);
  color: #2a2007;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 17px; height: 17px; }

/* ---------------------------------------------------------------
   Page head + filters
   --------------------------------------------------------------- */
.main { padding: 26px 0 56px; }

.page-head { margin-bottom: 20px; }
.page-head__title {
  font-family: var(--font-display);
  font-size: clamp(27px, 3.6vw, 34px);
  font-weight: 600;
  letter-spacing: -.015em;
}
.page-head__sub {
  margin-top: 4px;
  color: var(--text-muted);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.chip {
  height: 32px;
  padding: 0 15px;
  white-space: nowrap;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

/* ---------------------------------------------------------------
   Grid + cards
   --------------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.grid--list { grid-template-columns: 1fr; gap: 12px; }

.card {
  display: flex;
  color: var(--text);
  text-decoration: none;
  flex-direction: column;
  text-align: left;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  overflow: hidden;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .2s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.card:active { transform: translateY(-1px); }

.card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--gold-deep) 0%, var(--gold) 45%, var(--paper-deep) 100%);
  color: var(--text);
  overflow: hidden;
}
.card__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 20% 0%, rgba(255, 255, 255, .4), transparent 62%);
  pointer-events: none;
}

.card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}
.card:hover .card__img { transform: scale(1.045); }

.card__thumb--media::after {
  background: linear-gradient(to top, rgba(12, 20, 28, .52) 0%, rgba(12, 20, 28, .14) 34%, transparent 62%);
}

.card__play {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(255, 253, 249, .94);
  color: var(--text);
  box-shadow: 0 2px 10px rgba(16, 26, 35, .38);
  transition: transform .28s var(--ease), background .2s;
  z-index: 1;
}
.card:hover .card__play { transform: scale(1.08); }
.card__play svg { width: 18px; height: 18px; margin-left: 2px; }

.card__badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(16, 26, 35, .84);
  color: #fff;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  z-index: 1;
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px 16px;
}

.card__title {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.35;
}

.card__desc {
  color: var(--text-muted);
  font-size: 13.5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__desc--lead {
  -webkit-line-clamp: 3;
  color: var(--text);
  font-size: 14px;
}

.card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12.5px;
}
.card__channel {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card__meta .dot { flex: none; width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }

.tag {
  padding: 1px 8px;
  border-radius: 5px;
  background: var(--gold-deep);
  color: #2a2007;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .01em;
}

.card__tag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(253, 246, 228, .93);
  color: #2a2007;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .01em;
  box-shadow: 0 2px 8px rgba(16, 26, 35, .3);
}

/* Row card (tests) */
.row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.row:hover { border-color: var(--border-strong); background: var(--bg-elevated); transform: translateX(2px); }

.row__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--gold-deep);
  color: #2a2007;
}
.row__icon svg { width: 19px; height: 19px; }
.row__main { flex: 1; min-width: 0; }
.row__title { display: block; font-weight: 600; letter-spacing: -.01em; }
.row__meta {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row__cta {
  flex: none;
  height: 34px;
  padding: 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 550;
  transition: background .18s, color .18s, border-color .18s;
}
.row:hover .row__cta { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }

/* Empty state */
.empty {
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 72px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  text-align: center;
}
.empty strong { color: var(--text); font-weight: 600; }

/* ---------------------------------------------------------------
   Home
   --------------------------------------------------------------- */
.hero {
  padding-bottom: 26px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.hero__eyebrow {
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero__title {
  max-width: 20ch;
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4.1vw, 40px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.hero__lead {
  max-width: 62ch;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}


.sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(244px, 1fr));
  gap: 14px;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: left;
  cursor: pointer;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .2s;
}
.section:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.section__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.section__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-deep);
  font-size: 18px;
  line-height: 1;
}

.section__arrow {
  color: var(--text-muted);
  opacity: .4;
  transition: opacity .22s, transform .28s var(--ease);
}
.section__arrow svg { width: 19px; height: 19px; }
.section:hover .section__arrow { opacity: 1; transform: translateX(3px); }

.section__title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.section__blurb {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}

.section__count {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.motto {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 18px;
  margin: 30px 0 40px;
  padding: 16px 0 0;
  border-top: 1px solid var(--border);
}
.motto__label {
  flex: none;
  padding-top: 4px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.motto__line {
  max-width: 46ch;
  font-family: var(--font-display);
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.01em;
  text-wrap: balance;
  color: var(--text);
}

.block + .block { margin-top: 36px; }

.block__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.block__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.015em;
}
.block__of {
  color: var(--text-muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.linkish--end { margin-left: auto; }
.linkish--end svg { width: 15px; height: 15px; }

@media (max-width: 640px) {
  .hero__title { max-width: none; }
}

/* ---------------------------------------------------------------
   Game covers
   --------------------------------------------------------------- */
.cover {
  position: relative;
  display: grid;
  align-content: center;
  gap: 6px;
  aspect-ratio: 16 / 10;
  padding: 20px;
  overflow: hidden;
}
.cover__type {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .72;
}
.cover__title {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.cover__play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(255, 253, 249, .94);
  color: #22303d;
  box-shadow: 0 2px 10px rgba(16, 26, 35, .32);
  transition: transform .28s var(--ease);
}
.cover__play svg { width: 15px; height: 15px; margin-left: 2px; }
.card:hover .cover__play { transform: scale(1.1); }

.cover--sun  { background: linear-gradient(140deg, #f2dc9d, #dda93f 52%, #bd8a22); color: #2a2007; }
.cover--dusk { background: linear-gradient(140deg, #e9e0c8, #cfc2a2 54%, #a3946f); color: #2a2007; }
.cover--ink  { background: linear-gradient(140deg, #2a5c7d, #163a54 58%, #0f2a3d); color: #eef4f8; }
.cover--leaf { background: linear-gradient(140deg, #4d8e6c, #1f6b46 56%, #175336); color: #eff7f2; }

/* ---------------------------------------------------------------
   Game player
   --------------------------------------------------------------- */
.player { max-width: 820px; }

.player__intro {
  margin: 6px 0 22px;
  color: var(--text-muted);
}

.game { display: block; }
.game--centre {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.board__status {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 13.5px;
  text-align: center;
}
.board__status.is-done { color: var(--ok); font-weight: 600; }

.runner__actions--centre { justify-content: center; }

/* --- match up --- */
.match {
  display: grid;
  grid-template-columns: .82fr 1.3fr;
  gap: 12px;
}
.match__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.match__item {
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color .18s, background .18s, opacity .25s, transform .18s var(--ease);
}
.match__col--term .match__item { font-weight: 600; }
.match__item:hover { border-color: var(--border-strong); }
.match__item.is-picked {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}
.match__item.is-done {
  background: var(--paper-deep);
  border-color: transparent;
  color: var(--text-muted);
  opacity: .55;
  cursor: default;
}
.match--pictures { grid-template-columns: .74fr 1.5fr; align-items: start; }
.match__col--grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.match__pic {
  padding: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.match__pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s var(--ease);
}
.match__pic:hover img { transform: scale(1.04); }
.match__pic.is-picked { outline: 2px solid var(--accent); outline-offset: -2px; }
.match__pic.is-done img { filter: grayscale(1); }

.match__item.is-wrong {
  border-color: var(--no);
  animation: shake .4s;
}

/* --- group sort --- */
.stage { display: grid; place-items: center; }
.stage__card--photo {
  display: grid;
  gap: 12px;
  max-width: 340px;
  padding: 12px;
}
.stage__card--photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
}
.stage__caption {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.stage__card {
  max-width: 36ch;
  padding: 20px 24px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 17px;
  line-height: 1.4;
  text-align: center;
}
.stage__done {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
}

.bins {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 22px;
}
.bin {
  display: flex;
  flex-direction: column;
  min-height: 132px;
  padding: 12px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 65%, transparent);
}
.bin__label {
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: background .18s;
}
.bin__label:hover { background: color-mix(in srgb, var(--accent) 86%, #000); }
.bin__items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.chip-item__thumb {
  display: inline-block;
  width: 30px;
  height: 23px;
  margin-right: 7px;
  object-fit: cover;
  border-radius: 5px;
  vertical-align: middle;
}

.chip-item {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  font-size: 12.5px;
  line-height: 1.35;
}
.chip-item.is-ok { border-color: color-mix(in srgb, var(--ok) 45%, var(--border)); }
.chip-item.is-no {
  border-color: color-mix(in srgb, var(--no) 55%, var(--border));
  color: var(--no);
}
.chip-item.is-no::after { content: " ✕"; font-weight: 700; }
.chip-item.is-ok::after { content: " ✓"; color: var(--ok); font-weight: 700; }

/* --- spin the wheel --- */
.wheel__dial {
  position: relative;
  display: grid;
  place-items: center;
  padding-top: 10px;
}
.wheel {
  border-radius: 50%;
  box-shadow: var(--shadow-md);
}
.wheel__pin {
  position: absolute;
  top: 0;
  z-index: 1;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 17px solid var(--accent);
  filter: drop-shadow(0 1px 2px rgba(16, 26, 35, .38));
}
.wheel__prompt {
  max-width: 38ch;
  margin-top: 22px;
  font-family: var(--font-display);
  font-size: clamp(19px, 2.6vw, 24px);
  font-weight: 500;
  line-height: 1.32;
  text-align: center;
  color: var(--text-muted);
  text-wrap: balance;
}
.wheel__prompt.is-live { color: var(--text); }

/* --- speaking cards --- */
.speak {
  display: grid;
  place-items: center;
  width: min(100%, 34rem);
  min-height: 200px;
  padding: 30px;
  border: 1px solid var(--gold-deep);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--gold-soft), var(--paper-deep));
  box-shadow: var(--shadow-sm);
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.01em;
  text-align: center;
  text-wrap: balance;
  color: #22303d;
}
.speak.is-in { animation: liftIn .34s var(--ease); }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
@keyframes liftIn {
  from { opacity: 0; transform: translateY(8px); }
}

@media (max-width: 640px) {
  .match { grid-template-columns: 1fr 1fr; gap: 8px; }
  .match--pictures { grid-template-columns: 1fr; }
  .match__col--grid { grid-template-columns: repeat(3, 1fr); }
  .match__item { padding: 10px 11px; font-size: 13px; }
  .runner__actions--centre { flex-direction: row; }
}

/* ---------------------------------------------------------------
   Test runner
   --------------------------------------------------------------- */
.runner { max-width: 720px; }

.runner__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.linkish {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-muted);
  font-weight: 550;
  cursor: pointer;
  transition: color .18s;
}
.linkish:hover { color: var(--text); }
.linkish svg { width: 16px; height: 16px; }

.runner__step {
  color: var(--text-muted);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.runner__bar {
  height: 4px;
  border-radius: 999px;
  background: var(--paper-deep);
  overflow: hidden;
}
.runner__bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width .4s var(--ease);
}

.runner__q {
  margin: 24px 0 18px;
  font-size: clamp(19px, 2.4vw, 23px);
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -.02em;
}

.runner__options { display: grid; gap: 10px; }

.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s var(--ease);
}
.opt:hover { border-color: var(--border-strong); }
.opt:active { transform: scale(.995); }

.opt__letter {
  flex: none;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  background: var(--paper-deep);
  font-size: 12.5px;
  font-weight: 650;
  transition: background .18s, color .18s;
}

.opt[aria-pressed="true"] {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}
.opt[aria-pressed="true"] .opt__letter {
  background: var(--accent);
  color: var(--accent-text);
}

.runner__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.btn {
  height: 40px;
  padding: 0 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 550;
  cursor: pointer;
  transition: background .18s, border-color .18s, opacity .18s;
}
.btn:hover { background: var(--bg-elevated); }
.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* --- results --- */
.score {
  display: flex;
  align-items: center;
  gap: 26px;
  margin: 10px 0 26px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.score__ring {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: conic-gradient(var(--ok) calc(var(--pct) * 1%), var(--paper-deep) 0);
}
.score__ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--surface);
}
.score__num {
  position: relative;
  font-size: 27px;
  font-weight: 650;
  letter-spacing: -.03em;
}
.score__num small { font-size: 15px; font-weight: 550; color: var(--text-muted); }

.score__line { display: flex; align-items: center; gap: 9px; font-weight: 550; }
.score__dot { width: 9px; height: 9px; border-radius: 50%; }
.score__dot--ok { background: var(--ok); }
.score__dot--no { background: var(--no); }
.score__verdict { margin-top: 8px; color: var(--text-muted); font-size: 13.5px; }

.review {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.review__item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.review__item.is-ok { border-color: color-mix(in srgb, var(--ok) 32%, var(--border)); }
.review__item.is-no { border-color: color-mix(in srgb, var(--no) 32%, var(--border)); }

.review__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 50%;
  color: #fff;
}
.review__mark svg { width: 13px; height: 13px; stroke-width: 3; }
.is-ok .review__mark { background: var(--ok); }
.is-no .review__mark { background: var(--no); }

.review__body { min-width: 0; }
.review__q { font-weight: 600; line-height: 1.4; margin-bottom: 7px; }
.review__answer {
  display: flex;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.5;
}
.review__answer + .review__answer { margin-top: 3px; }
.review__label {
  flex: none;
  width: 118px;
  padding-top: 2px;
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.review__answer--right { color: var(--ok); font-weight: 550; }
.review__answer--right .review__label { color: var(--ok); opacity: .75; }

@media (max-width: 640px) {
  .score { flex-direction: column; align-items: flex-start; gap: 18px; }
  .runner__actions { flex-direction: column-reverse; }
  .runner__actions .btn { width: 100%; }
  .review__answer { flex-direction: column; gap: 2px; }
  .review__label { width: auto; }
}

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */
.footer {
  padding: 22px 0 36px;
  margin-top: 44px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}
.footer__inner {
  display: grid;
  gap: 10px;
}
.footer__line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.footer__name {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.footer__by { font-style: italic; }
.footer__rights {
  max-width: 74ch;
  line-height: 1.6;
}
.footer__credits {
  max-width: 74ch;
  font-size: 12px;
  line-height: 1.55;
  opacity: .8;
}

/* ---------------------------------------------------------------
   Responsive
   --------------------------------------------------------------- */
@media (max-width: 640px) {
  .header__inner, .main, .page-head, .filters, .footer__inner {
    width: calc(100% - 32px);
  }
  .brand__text { display: none; }
  .search input { width: 150px; }
  .search input:focus { width: 190px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .row { flex-wrap: wrap; }
  .row__cta { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
