/* Steero inner pages: the free web drill, DriveTest centres, 404. Loads after base.css. */

.page { padding: calc(var(--nav-h) + env(safe-area-inset-top) + clamp(28px, 6vw, 64px)) 0 clamp(64px, 10vw, 120px); }
.narrow { max-width: 680px; margin: 0 auto; padding: 0 var(--gutter); }
.page-title { font-size: clamp(38px, 6vw, 60px); line-height: 1.04; letter-spacing: -.032em; font-weight: 800; outline: none; }
.title { font-size: clamp(28px, 4vw, 34px); line-height: 1.1; letter-spacing: -.024em; font-weight: 700; outline: none; }
.lede { max-width: 640px; font-size: clamp(19px, 1.6vw, 21px); line-height: 1.45; color: var(--text-2); margin-top: 14px; letter-spacing: -.016em; }
.sub { color: var(--text-2); margin-top: 4px; }
.center { text-align: center; margin-inline: auto; }
.fine { font-size: 13px; color: var(--text-2); margin-top: 14px; }
.screen > * + *, #app > * + * { margin-top: 16px; }
#app { outline: none; }
#app > .kicker + .result, #app > .result + .page-title { margin-top: 8px; }

/* Inset grouped list, like iOS Settings */
.group-h { margin: 28px 0 8px !important; padding: 0 18px; font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .03em; color: var(--text-2); }
.group { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: 22px; overflow: hidden; }
.group-h + .group { margin-top: 0 !important; }
.row { display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 12px 18px; cursor: pointer; }
.row + .row { box-shadow: inset 0 .5px 0 var(--hairline); }
.row-text { flex: 1; min-width: 0; }
.row-text b { display: block; font-weight: 500; }
.row-text small { display: block; font-size: 14px; color: var(--text-2); margin-top: 1px; }

/* iOS switch */
.switch { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 51px; height: 31px; margin: 0; border-radius: 16px; cursor: pointer;
  background: rgba(120, 120, 128, .2); transition: background-color .3s var(--ease-ios); }
.switch::before { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .16); transition: transform var(--t-bouncy) var(--spring-bouncy), width .2s; }
.switch:checked { background: var(--caught); }
.switch:checked::before { transform: translateX(20px); }
.switch:active::before { width: 33px; }
.switch:checked:active::before { transform: translateX(14px); }

/* Prep list with numbered steps */
.prep li { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.prep li + li { box-shadow: inset 0 .5px 0 var(--hairline); }
.sign-n { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-weight: 800; font-size: 15px; }

/* Road card: the hero road, small */
.road-card { position: relative; aspect-ratio: 16 / 8; border-radius: 28px; overflow: hidden; background: var(--hero-bg); margin-top: 28px !important; }
.road-card canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.placard.wide, .btn-soft.wide { display: flex; width: 100%; justify-content: center; }
.placard:disabled { opacity: .45; cursor: default; }
#begin { margin-top: 28px; }

/* Run: progress head and dots */
.run-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.run-meta { display: flex; gap: 10px; align-items: baseline; font-size: 15px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.run-meta b { color: var(--text); font-weight: 600; }
.end { border: 0; cursor: pointer; padding: 7px 14px; border-radius: 999px; background: color-mix(in srgb, var(--text) 8%, transparent); font-weight: 600; font-size: 14px; }
.dots { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; margin-top: 12px !important; }
.dots i { height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--text) 10%, transparent); }
.dots .done { background: var(--caught); }
.dots .miss { background: var(--skipped); }
.dots .now { background: var(--accent); animation: now 1.4s ease-in-out infinite alternate; }
@keyframes now { to { opacity: .4; } }

/* Listen */
.examiner-card { margin-top: 28px !important; padding: clamp(26px, 5vw, 44px); border-radius: 28px; background: var(--surface); }
.voice { display: flex; align-items: center; gap: 5px; height: 34px; }
.voice i { width: 6px; height: 100%; border-radius: 3px; background: var(--look); transform: scaleY(.22); transition: transform .4s var(--ease-ios); }
.voice.is-talking i { animation: talk 1.1s ease-in-out infinite alternate; }
.voice i:nth-child(2) { animation-delay: -.17s; } .voice i:nth-child(3) { animation-delay: -.34s; } .voice i:nth-child(4) { animation-delay: -.51s; }
.voice i:nth-child(5) { animation-delay: -.68s; } .voice i:nth-child(6) { animation-delay: -.85s; }
@keyframes talk { 0% { transform: scaleY(.22); } 40% { transform: scaleY(.9); } 70% { transform: scaleY(.45); } 100% { transform: scaleY(1); } }
.voice span { margin-left: 8px; font-size: 14px; font-weight: 600; color: var(--look); }
.quote { margin-top: 18px; font-size: clamp(28px, 4.6vw, 40px); line-height: 1.15; font-weight: 700; letter-spacing: -.024em; outline: none; text-wrap: balance; }
.quote.small { margin-top: 24px !important; font-size: clamp(20px, 3vw, 24px); text-align: center; }
.hint { text-align: center; color: var(--text-2); margin-top: 20px !important; }

/* Act */
.timer-card { position: relative; aspect-ratio: 1 / .8; max-height: 56svh; width: 100%; margin-inline: auto; border-radius: 28px; overflow: hidden; background: var(--asphalt); }
.timer-card canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.secs { position: absolute; top: 14px; right: 14px; min-width: 44px; padding: 6px 12px; border-radius: 999px; text-align: center; background: rgba(255, 255, 255, .12); color: #fff; font-weight: 700; font-variant-numeric: tabular-nums;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.keys { display: none; }
@media (hover: hover) and (pointer: fine) { .keys { display: block; } }

/* Review: tap what you skipped */
.title + .sub { margin-top: 4px !important; }
.checks { margin-top: 20px !important; }
.checks li + li { box-shadow: inset 58px .5px 0 var(--surface), inset 0 .5px 0 var(--hairline); }
.check { display: grid; grid-template-columns: 28px 1fr; column-gap: 14px; align-items: center; width: 100%; padding: 15px 18px; border: 0; background: none; text-align: left; cursor: pointer;
  font: inherit; color: inherit; transition: background-color .3s var(--ease-ios); -webkit-tap-highlight-color: transparent; }
.check:active { background: color-mix(in srgb, var(--text) 6%, transparent); }
.check[aria-pressed="true"] { background: color-mix(in srgb, var(--skipped) 11%, transparent); }
.check .tick { grid-row: 1; }
.check-text { grid-row: 1; grid-column: 2; }
.tick { position: relative; width: 26px; height: 26px; border-radius: 50%; background: var(--caught); animation: pop var(--t-bouncy) var(--spring-bouncy) both; animation-delay: calc(var(--n, 0) * 60ms + 120ms); transition: background-color .25s; }
@keyframes pop { from { transform: scale(0); } }
.tick::before, .tick::after { content: ""; position: absolute; inset: 0; background: #fff; transition: opacity .2s, transform var(--t-bouncy) var(--spring-bouncy); }
.tick::before { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }
.tick::after { opacity: 0; transform: rotate(-45deg) scale(.6); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8.5 8.5l7 7m0-7l-7 7' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center/100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8.5 8.5l7 7m0-7l-7 7' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center/100% no-repeat; }
.check[aria-pressed="true"] .tick { background: var(--skipped); }
.check[aria-pressed="true"] .tick::before { opacity: 0; }
.check[aria-pressed="true"] .tick::after { opacity: 1; transform: none; }
.trick { grid-column: 2; display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows var(--t-smooth) var(--spring-smooth), opacity .35s, margin .35s; }
.trick > span { overflow: hidden; font-size: 15px; color: var(--text-2); }
.trick b { color: var(--text); font-weight: 600; }
.check[aria-pressed="true"] .trick { grid-template-rows: 1fr; opacity: 1; margin-top: 6px; }
.score { display: flex; justify-content: space-between; gap: 12px; padding: 0 4px; font-size: 15px; }
.score span { color: var(--text-2); text-align: right; }
@media (max-width: 480px) { .score span { display: none; } }

/* Debrief */
.result { position: relative; width: 148px; height: 148px; margin: 18px auto 0 !important; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 11; stroke-linecap: round; }
.ring-track { stroke: color-mix(in srgb, var(--text) 9%, transparent); }
.ring-fill { stroke: var(--caught); stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.4s var(--spring-smooth) .15s; }
.is-scored .ring-fill { stroke-dashoffset: calc(100 - var(--p) * 100); }
.ring-num { position: absolute; inset: 0; display: grid; place-items: center; grid-auto-flow: column; justify-content: center; align-items: baseline; padding-top: 50px;
  font-size: 40px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ring-num small { font-size: 18px; color: var(--text-2); margin-left: 1px; }
#app > .kicker { text-align: center; margin-bottom: 0; }
.topics .topic { display: grid; grid-template-columns: 1fr auto; row-gap: 8px; padding: 14px 18px; }
.topics .topic + .topic { box-shadow: inset 0 .5px 0 var(--hairline); }
.tnum { color: var(--text-2); font-variant-numeric: tabular-nums; }
.tbar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--text) 8%, transparent); overflow: hidden; }
.tbar i { display: block; height: 100%; border-radius: inherit; background: var(--caught); transform-origin: left; transform: scaleX(0); transition: transform 1.1s var(--spring-smooth); }
.is-scored .tbar i { transform: scaleX(var(--w)); }
.topics .topic:nth-child(n) .tbar i { transition-delay: .25s; }
.fixes li { display: grid; gap: 3px; padding: 14px 18px; }
.fixes li + li { box-shadow: inset 0 .5px 0 var(--hairline); }
.fixes b { font-weight: 600; }
.fixes span { color: var(--text-2); font-size: 15px; }
#again { margin-top: 28px !important; }
.plug { display: grid; grid-template-columns: auto 1fr; gap: 14px 16px; align-items: center; margin-top: 32px !important; padding: 22px; border-radius: 22px; background: var(--surface); }
.plug .mark { width: 52px; height: 52px; border-radius: 12px; }
.plug p { color: var(--text-2); font-size: 15px; margin-top: 2px; }
.plug .appstore { grid-column: 1 / -1; justify-self: start; height: 46px; }
.plug .appstore b { font-size: 20px; }

/* Centres index */
.search { position: relative; display: block; max-width: 440px; margin-top: 28px; }
.search svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; stroke: var(--text-2); fill: none; stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }
.search input { width: 100%; height: 48px; padding: 0 16px 0 42px; border: 0; border-radius: 14px; background: color-mix(in srgb, var(--text) 7%, transparent);
  font: inherit; color: var(--text); outline: none; transition: box-shadow .25s, background-color .25s; -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--text-2); }
.search input:focus { background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--look) 40%, transparent); }
.centre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; margin: 32px auto 0; }
.centre-card { position: relative; display: flex; flex-direction: column; min-height: 196px; padding: 26px; border-radius: 26px; background: var(--surface); text-decoration: none;
  transition: transform var(--t-smooth) var(--spring-smooth), box-shadow .5s, opacity .3s; }
.centre-card h2 { font-size: 24px; letter-spacing: -.024em; line-height: 1.15; }
.centre-card p { margin-top: 8px; color: var(--text-2); }
.centre-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 18px; font-size: 14px; color: var(--text-2); }
.centre-meta svg { width: 14px; height: 14px; color: var(--look); transition: transform var(--t-snappy) var(--spring-snappy); }
.pin { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 14px; }
.pin::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
@media (hover: hover) and (pointer: fine) {
  .centre-card:hover { transform: scale(1.015); box-shadow: 0 22px 50px -24px rgba(0, 0, 0, .28); }
  .centre-card:hover .centre-meta svg { transform: translateX(3px); }
}
.centre-card[hidden] { display: none; }
.empty { margin-top: 28px; text-align: center; color: var(--text-2); }
.page .drill-band { margin-top: clamp(56px, 8vw, 96px); }

/* Centre page */
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 22px; color: var(--look); font-weight: 500; text-decoration: none; }
.back svg { width: 14px; height: 14px; transform: scaleX(-1); }
.facts { margin-top: 28px; }
.fact { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 12px 18px; }
.fact + .fact { box-shadow: inset 0 .5px 0 var(--hairline); }
.fact-icon { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: #fff; }
.fact-icon svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fact-text { flex: 1; min-width: 0; }
.fact-text small { display: block; font-size: 13px; color: var(--text-2); }
.fact a { flex: none; color: var(--look); font-weight: 500; text-decoration: none; }
.notes { display: grid; gap: 14px; margin-top: 40px; }
.note { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; padding: 24px; border-radius: 24px; background: var(--surface); }
.note .sign-n { grid-row: span 2; margin-top: 2px; }
.note h2 { font-size: 20px; letter-spacing: -.02em; line-height: 1.25; }
.note p { color: var(--text-2); }
.note.plain { grid-template-columns: 1fr; }
.note.plain p a { color: var(--look); }
.section-title { margin-top: 48px; font-size: 28px; letter-spacing: -.024em; }
.section-title + .lede { font-size: 17px; margin-top: 6px; }
.local { display: grid; gap: 14px; margin-top: 20px; }
.local-card { padding: 22px 24px; border-radius: 24px; background: var(--surface); }
.local-card .tile-k { font-size: 13px; font-weight: 600; color: var(--text-2); }
.local-card q { display: block; margin-top: 6px; font-size: 20px; font-weight: 600; letter-spacing: -.018em; quotes: "“" "”"; }
.local-card ol { margin: 12px 0 0; padding-left: 20px; color: var(--text-2); font-size: 15px; }
.local-card li + li { margin-top: 4px; }
.local-card h3 { font-size: 13px; font-weight: 600; color: var(--text-2); }
.local-card:target { outline: 2px solid var(--look); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip { padding: 8px 14px; border-radius: 999px; background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; }
.chip:hover { color: var(--look); }

/* 404 */
.lost { text-align: center; }
.lost .road-card { max-width: 520px; margin: 0 auto 36px !important; }
.lost .cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.lost .btn-soft { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .switch::before, .trick, .ring-fill, .tbar i, .centre-card { transition: none; }
}

/* Free drill: chair drill or cockpit round (D32) */
.mode-wrap { margin-bottom: 8px; }
.mode { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 12px; background: var(--surface-2); }
.mode button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--text); font: 600 15px/1 -apple-system, system-ui, sans-serif; cursor: pointer;
  transition: background-color .25s, box-shadow .25s; }
.mode button[aria-selected="true"] { background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); }
.is-drilling .mode-wrap, .is-drilling .cockpit-page { display: none; }
.cockpit-page .lede { margin-bottom: 28px; }
.cockpit-mount { max-width: 520px; margin: 0 auto; }
.cockpit-page .fine { margin-top: 18px; }
