:root {
  color-scheme: light;
  --surface: #f7f5ef;
  --card: #fffefa;
  --ink: #17211f;
  --muted: #4d5652;
  --line: #d5d2c8;
  --forest: #237538;
  --forest-dark: #172a21;
  --accent: #32964d;
  --heading-font: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --green: #225239;
  --green-bg: #e5f1e8;
  --red: #8c302a;
  --red-bg: #fbeae6;
  --warning: #84500d;
  --warning-bg: #fff2d6;
  --radius: 8px;
  color: var(--ink);
  background: var(--surface);
  font: 1rem/1.5 "Source Sans 3", "Instrument Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button, a { touch-action: manipulation; }
button:disabled { cursor: default; opacity: .55; }
a { color: inherit; text-underline-offset: 4px; }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }
#hero-title:focus, .page-heading h1:focus, #questionTitle:focus, #questionListTitle:focus,
.review-content h3:focus { outline: none; }
:target { scroll-margin-top: 16px; }
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3, .brand, .fact-grid b, .result-score {
  font-family: var(--heading-font);
}
h1, h2 { letter-spacing: -.022em; }
h3, h4 { line-height: 1.3; }
.wrap { width: min(100%, 1320px); margin-inline: auto; padding-inline: clamp(16px, 4vw, 64px); }

.skip {
  position: fixed;
  inset: 10px auto auto 16px;
  z-index: 10;
  padding: 9px 12px;
  color: var(--ink);
  background: var(--card);
  transform: translateY(-160%);
}
.skip:focus { transform: none; }

.header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner {
  min-height: 74px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}
.brand { display: inline-flex; align-items: center; width: max-content; text-decoration: none; }
.brand img { display: block; width: 144px; height: auto; }
.header nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 35px); }
.header nav a {
  position: relative;
  display: block;
  padding-block: 15px;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 700;
  text-decoration: none;
}
.header nav a:hover, .header nav a[aria-current] { color: var(--forest); }
.header nav a[aria-current]::after {
  content: "";
  position: absolute;
  inset: auto 0 5px;
  height: 2px;
  background: var(--accent);
}
.header-action { justify-self: end; white-space: nowrap; }

.actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-top: 18px; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 5px;
  text-decoration: none;
  text-align: center;
  font-size: .93rem;
  font-weight: 700;
  line-height: 1.3;
}
.primary { background: var(--forest); color: #fff; }
.primary:hover { background: #195e2c; }
.outline { background: transparent; color: var(--ink); border-color: #a7aea1; }
.outline:hover { background: #ebeee3; border-color: #738775; }
.text-action, .hero-secondary {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  border: 0;
  padding: 7px 0;
  background: transparent;
  color: var(--forest);
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
}
.text-action:hover { color: #237654; }

#home { --hero-rule: #ffffff26; }
.hero {
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  gap: clamp(25px, 5.2vw, 82px);
  align-items: center;
  padding: clamp(44px, 4.6vw, 70px) max(clamp(16px, 4vw, 64px), calc((100vw - 1200px) / 2));
  background: radial-gradient(ellipse at 81% 45%, #254c3e 0%, var(--forest-dark) 64%);
  color: #f7faf6;
}
.kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #41645a;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .1em;
  line-height: 1.2;
  text-transform: uppercase;
}
.hero .kicker { color: #bbd4c3; }
.signal {
  width: 6px;
  height: 6px;
  flex: none;
  background: #397a62;
  border-radius: 1px;
}
.hero h1 {
  font-size: clamp(43px, 5vw, 76px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.063em;
  margin-block: 14px 21px;
}
.lead { max-width: 470px; color: #d5e2d8; font-size: clamp(1rem, 1.55vw, 1.18rem); line-height: 1.62; }
.hero-actions { margin-top: 25px; gap: 16px; }
.hero .primary { min-height: 49px; padding-inline: 16px; background: var(--accent); color: #2a231a; }
.hero .primary:hover { background: #ffbd95; }
.hero-secondary { color: #edf5ee; text-decoration-color: #9dbbab; }
.hero-secondary:hover { color: #ffd3b7; }
.hero :focus-visible { outline-color: #ffd0ab; }
.meta { margin-top: 9px; color: #bcd0c3; font-size: .82rem; }
.hero-art {
  min-width: 0;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--hero-rule);
  background: #d6e9db0f;
  box-shadow: 0 19px 65px #03131345;
}
.hero-art figcaption { margin: 7px 8px 4px; color: #d9e7de; font-size: .8rem; }
.scene-inline iframe {
  display: block;
  width: 100%;
  height: clamp(318px, 35vw, 432px);
  border: 0;
  border-radius: 6px;
  background: #c4c4a9;
}
.hero-art iframe { height: clamp(326px, 35vw, 438px); }

.facts { background: #e8eee7; border-bottom: 1px solid #d6e1d7; }
.fact-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.fact-grid > div {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 21px 12px 22px;
}
.fact-grid > div + div { border-left: 1px solid #d1ded3; padding-left: clamp(13px, 3.3vw, 46px); }
.fact-grid > div:first-child { padding-left: 0; }
.fact-grid b { font-size: clamp(26px, 3.6vw, 48px); font-weight: 730; letter-spacing: -.065em; line-height: 1.15; white-space: nowrap; }
.fact-grid span { color: var(--muted); font-size: clamp(.78rem, 1.25vw, 1rem); font-weight: 700; }

.home-method { padding-block: clamp(32px, 6vw, 79px); }
.home-exams { padding-top: clamp(32px, 6vw, 65px); }
.home-exam-categories {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 12px;
  gap: 6px;
}
.home-exam-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 0;
  align-items: start;
  padding: 12px 10px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.home-exam-category b { font-size: 1.55rem; line-height: 1.1; }
.home-exam-category > :last-child { grid-column: 1 / -1; display: grid; gap: 4px; color: var(--muted); }
.home-exam-category [aria-hidden] { color: #386b51; }
.start-status { margin-block: 8px; color: #9a321f; }
.start-status:empty { margin: 0; }
@media (max-width: 940px) { .home-exam-categories { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 540px) { .home-exam-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.section-intro { display: grid; gap: 8px; margin-bottom: 20px; }
.section-intro h2, .page-heading h1 {
  font-size: clamp(34px, 4.65vw, 56px);
  font-weight: 700;
  letter-spacing: -.055em;
  line-height: 1.08;
}
.section-intro p, .page-heading > p:last-child:not(.kicker) { max-width: 640px; color: var(--muted); }
.method-grid, .mode-grid, .topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}
.method-grid article, .tile, .topic-card, .box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.method-grid article { padding: 21px; display: grid; gap: 8px; align-content: start; }
.method-grid h3 { font-size: 1.11rem; }
.method-grid p, .tile p, .topic-card p { color: var(--muted); }
.tile.brutal-exam-tile {
  background: linear-gradient(135deg, #29191f, #361d25);
  border-color: #bd4246;
  color: #fffefa;
}
.brutal-exam-tile p { color: #f5e1e2; }
.brutal-exam-tile .button.outline { border-color: #d97577; background: #8f272f; color: #fffefa; }
.brutal-exam-tile .button.outline:hover { background: #a32f38; }
.brutal-exam-tile .button:focus-visible { outline-color: #ffb2a9; }
.category-exam-tile .category-art { display: block; width: min(100%, 12rem); height: auto; aspect-ratio: 2.25; object-fit: contain; object-position: left; }
.brutal-exam-tile .category-art { border-radius: 4px; background: #f7f5ef; }
.scene-replay { min-height: 44px; }
.method-grid .text-action { width: fit-content; }
@media (min-width: 941px) {
  .professional-adr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.footer { border-top: 1px solid var(--line); background: #eeece2; }
.footer-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; padding-block: 21px; min-height: 71px; font-size: .85rem; }
.footer .brand { margin-right: auto; }
.footer .brand img { width: 108px; }
.workspace { min-height: 530px; padding-block: clamp(26px, 4.5vw, 62px) 64px; }
.page-heading { margin-bottom: clamp(22px, 3vw, 39px); padding-bottom: 19px; border-bottom: 1px solid var(--line); }
.page-heading h1 {
  margin-block: 5px 10px;
  max-width: 23ch;
  font-size: clamp(2.4rem, 1.35rem + 3vw, 5rem);
  font-weight: 800;
  line-height: .99;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.page-heading > p:not(.kicker) { max-inline-size: 65ch; color: var(--muted); font-size: 1.1rem; }
.box { min-width: 0; padding: clamp(15px, 2.5vw, 27px); }
.study-topics { margin-top: 24px; }
.study-topics summary { cursor: pointer; font-weight: 750; }
.study-topics summary + p { margin-top: 12px; }
.resume, .recommend {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  margin-bottom: 17px;
  border: 1px solid #cdded3;
  border-left: 4px solid #39775f;
  border-radius: 6px;
  background: #eaf2eb;
}
.resume p, .recommend p { color: var(--muted); margin-top: 4px; }
.tile {
  padding: 19px;
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 9px;
}
.tile.primary-tile { background: #e6ede1; border-color: #b7c8b5; }
.tile.primary-tile p, .primary-tile .tile-meta { color: #43574a; }
.tile .button { margin-top: auto; }
.primary-tile .button { background: var(--forest); color: #fff; }
.primary-tile .button:hover { background: #195e2c; }
.tile-meta { color: var(--muted); font-size: .8rem; font-weight: 700; }
.workspace h2.section-title { margin: 29px 0 14px; font-weight: 730; font-size: clamp(24px, 3vw, 37px); line-height: 1.15; }
.box h2.section-title:first-child { margin-top: 0; }
.section-copy { margin-bottom: 13px; max-width: 640px; color: var(--muted); }
.combined-case-prompt { white-space: pre-line; }
.topic-card { padding: 15px; display: grid; gap: 7px; align-content: start; }
.topic-card h3 { font-size: 1.18rem; }
.topic-card .text-action { width: fit-content; font-size: .85rem; }
.topic-card p { font-size: .86rem; }
.topic-actions { display: flex; flex-wrap: wrap; gap: 13px; }
.guide-list { display: grid; gap: 11px; margin-top: 16px; }
.guide-example { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .75fr); gap: 18px; }
.guide-example:not(:has(figure)) { grid-template-columns: 1fr; }
.guide-example h3 { margin-top: 6px; }
.guide-example .question-figure { margin-bottom: 0; }

.quiz { border: 1px solid #d2dfd7; border-radius: var(--radius); background: var(--card); box-shadow: 0 10px 36px #132c2220; }
.quiz-bar {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 10px clamp(13px, 2.4vw, 23px);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--card);
}
.quiz-meta { color: var(--ink); font-weight: 800; }
#questionCounter { color: var(--muted); font-variant-numeric: tabular-nums; }
.quiz-bar .actions { margin: 0; }
.quiz-bar .text-action { font-size: .88rem; }
.timer {
  padding: 5px 9px;
  border: 1px solid #cdded2;
  border-radius: 5px;
  background: #edf5ee;
  color: var(--forest);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.timer.urgent { color: var(--red); border-color: #eac0b6; background: var(--red-bg); }
.question-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 264px);
  gap: clamp(13px, 2.3vw, 26px);
  align-items: start;
  padding: clamp(13px, 2.2vw, 25px);
}
.question-main { min-width: 0; }
.question-main h2, .answer-field legend {
  max-width: 100%;
  color: var(--ink);
  font-family: var(--heading-font);
  font-size: clamp(1.14rem, 1.75vw, 1.58rem);
  font-weight: 730;
  line-height: 1.32;
  letter-spacing: -.027em;
}
.answer-field legend { padding: 0; }
.question-main .kicker { margin-bottom: 9px; }
.question-main > h2 { margin-bottom: 14px; }
.question-main .hint { color: var(--muted); font-size: .88rem; margin: 7px 0 11px; }
.quiz-art { display: block; width: 100%; height: auto; border-radius: 5px; background: #526357; aspect-ratio: 8 / 5; }
.question-figure, .question-media { min-width: 0; max-width: 730px; margin: 0 0 15px; }
.question-figure figcaption, .question-media figcaption { margin-top: 6px; color: var(--muted); font-size: .83rem; }
.question-figure.scene-inline, .question-media.scene-inline {
  padding: 5px;
  border: 1px solid #d7dfd4;
  border-radius: 8px;
  background: #f2f5ef;
}
.question-figure.scene-inline figcaption, .question-media.scene-inline figcaption { padding: 0 4px 4px; }
.question-figure.scene-inline iframe, .question-media.scene-inline iframe { height: clamp(285px, 32vw, 387px); }
.question-photo-image { position: relative; }
.question-photo-image > img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; border-radius: 5px; }
.question-photo-motion { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.question-photo-motion marker { fill: #fff; }
.photo-direction, .photo-direction-motion { fill: none; stroke: #fff; stroke-linecap: round; stroke-width: 2.75; vector-effect: non-scaling-stroke; }
.photo-direction { filter: drop-shadow(0 0 1px #10202a) drop-shadow(0 0 1px #10202a); }
.photo-direction-motion { stroke: #b8f7b5; stroke-width: 4; stroke-dasharray: .2 .8; opacity: 0; }
.photo-indicator { fill: #ffae21; stroke: #8e3600; stroke-width: .3; filter: drop-shadow(0 0 3px #ffc64d); }
.photo-indicator.is-green { fill: #34ec92; stroke: #11894a; filter: drop-shadow(0 0 2px #35e486); }
.photo-indicator.is-blue { fill: #b4ecff; stroke: #163aab; filter: drop-shadow(0 0 4px #2f8cff); }
.photo-motion-button { display: none; min-height: 44px; padding-inline: .55rem; }
@keyframes photo-direction { 0% { stroke-dashoffset: 0; opacity: 1; } 99% { opacity: 1; } 100% { stroke-dashoffset: -1; opacity: 0; } }
@keyframes photo-indicator { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .photo-direction-motion { animation: photo-direction 1.15s linear infinite paused; }
  .photo-indicator { animation: photo-indicator 1s step-end infinite paused; }
  .question-photo-motion.is-in-view.is-playing :is(.photo-direction-motion, .photo-indicator) { animation-play-state: running; }
  .photo-motion-button { display: inline-flex; }
}
.photo-road-sign { position: absolute; width: clamp(17px, 4%, 54px); transform: translate(-50%, -0.8em); pointer-events: none; filter: drop-shadow(0 1px 1px #0008); }
.photo-road-sign img { display: block; width: 100%; height: auto; }
.photo-road-sign img + img { width: 82%; margin: 1px auto 0; }
.quiz.is-brutal .quiz-meta { color: #f7f5ef; }
.question-photo-image > span {
  position: absolute;
  inset: var(--label-y) auto auto var(--label-x);
  translate: -50% -50%;
  min-width: 1.65rem;
  padding: .1rem .35rem;
  border-radius: 4px;
  background: #fffefa;
  color: #17211f;
  text-align: center;
  font-weight: 700;
}
.question-photo-3d summary { padding: .55rem; cursor: pointer; color: var(--forest); font-weight: 700; }
.question-view-tabs {
  display: flex;
  gap: .25rem;
  overflow-x: auto;
  padding: .25rem .35rem;
  border-block-end: 1px solid var(--line);
}
.question-view-tabs button {
  position: relative;
  flex: 1 0 auto;
  min-block-size: 2.75rem;
  padding: .35rem .6rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--forest);
  font: inherit;
  font-size: .9rem;
  font-weight: 650;
  cursor: pointer;
}
.question-view-tabs button:hover { background: #dfe9df; }
.question-view-tabs button:focus-visible { outline-offset: -2px; }
.question-view-tabs [aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto .6rem .13rem;
  border-block-end: 3px solid currentColor;
}
.question-case-tabs { background: #e7eee5; border-radius: 8px 8px 0 0; }
.question-case-media .question-figure { margin-bottom: 0; }
[data-view-panel="diagram"] > :is(svg,img) {
  display: block;
  width: min(100%, 41rem);
  height: auto;
  margin-inline: auto;
}
.question-photo-sign { display: grid; justify-content: center; }
.question-photo-sign .road-sign { width: clamp(55px, 10vw, 100px); height: auto; }
.question-sign-set { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; }
.question-sign-set img { width: clamp(70px, 19vw, 130px); height: auto; aspect-ratio: 26 / 19; object-fit: contain; }
.scene-with-sign {
  display: grid;
  grid-template-columns: minmax(0,1fr) clamp(64px,12vw,112px);
  align-items: start;
  gap: 7px;
}
.scene-with-sign > .road-sign {
  width: 100%;
  padding: 5px;
  border: 1px solid #cad8cc;
  border-radius: 6px;
  background: #fff;
  object-fit: contain;
}
.sign-figure {
  display: grid;
  justify-items: center;
  padding: 12px;
  margin-bottom: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #f0f4ee;
  text-align: center;
}
.road-sign { display: block; width: clamp(104px, 16vw, 154px); height: auto; aspect-ratio: 1; }
.recognition-figure img { display: block; width: auto; height: auto; max-width: 100%; max-height: 240px; object-fit: contain; }
.road-marking-figure img { max-height: 320px; }
.tractor-formats, .tractor-modules { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.tractor-formats h2, .tractor-tile h2, .tractor-tile h3 { margin: 0 0 8px; }
@media (max-width: 690px) {
  .tractor-formats, .tractor-modules { grid-template-columns: minmax(0,1fr); }
}
.sign-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr));
  align-items: end;
  gap: 12px;
}
.sign-filters label { display: grid; gap: 5px; font-weight: 600; }
.sign-filters input, .sign-filters select {
  min-width: 0;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.sign-count { margin: 12px 0; color: var(--muted); }
.sign-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr));
  gap: 12px;
}
.sign-card {
  display: grid;
  grid-template-rows: minmax(98px, auto) auto auto 1fr;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--card);
}
.sign-faces { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.sign-faces a { max-width: 100%; }
.sign-faces img { display: block; max-width: 100%; width: auto; height: auto; max-height: 92px; }
.sign-card h2 { font: 700 1.15rem/1.25 var(--heading-font); border-top: 1px solid var(--line); padding-top: 8px; margin: 0; }
.sign-source, .sign-card .rule-quotation { font-size: .82rem; }
.sign-pagination { display: flex; gap: 8px; margin-top: 16px; }
.sign-pagination[hidden] { display: none; }
.sign-pagination button:disabled { opacity: .55; cursor: default; }
.rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.rule-grid h2 { font-size: 1.04rem; margin: 5px 0 12px; }
.sign-figure .road-sign { object-fit: contain; }
.official-markings { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.official-markings img { max-width: 100%; height: auto; object-fit: contain; }
.illustration-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e7eee0;
}
.situation-art { display: block; width: 100%; height: auto; aspect-ratio: 2; }
.illustration-panel > .road-sign {
  position: absolute;
  top: 4.5%;
  left: 3.3%;
  width: 17%;
  padding: 1%;
  border: 1px solid #cbd7cc;
  border-radius: 7px;
  background: #f5f8f2;
}
.answer-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.option {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 47px;
  padding: 10px 11px;
  margin: 7px 0;
  border: 1px solid #d2dfd6;
  border-radius: 6px;
  background: #fff;
  line-height: 1.43;
}
.option:not(li) { cursor: pointer; }
.option:not(li):hover { background: #f3f7f3; border-color: #a1b9ab; }
.option:has(input:checked) { border-color: #4b866f; background: #eaf3ed; box-shadow: inset 2px 0 #39745c; }
.option input { flex: none; width: 17px; height: 17px; margin: 0; accent-color: #23674f; }
.option.good { border-color: #abcab4; color: var(--green); background: var(--green-bg); }
.option.bad { border-color: #e3b6aa; color: var(--red); background: var(--red-bg); }
.answer-state { margin-left: auto; font-weight: 800; font-size: .74rem; }
.feedback {
  padding: 11px 12px;
  margin-top: 10px;
  border-left: 3px solid #598e70;
  border-radius: 0 5px 5px 0;
  background: #edf5ef;
  color: #244b36;
}
.feedback.bad { border-color: #b97567; color: var(--red); background: var(--red-bg); }
.feedback p { margin-block: 3px 5px; }
.feedback-basis { margin-block-start: .75rem; padding-block-start: .65rem; border-block-start: 1px solid var(--line); }
.feedback-basis > div + div { margin-block-start: .65rem; }
.rule-quotation {
  margin: .25em 0 0;
  padding-inline-start: .75em;
  border-inline-start: 2px solid var(--line);
  overflow-wrap: anywhere;
}
.feedback a { font-size: .86rem; font-weight: 750; }
.question-side { border: 1px solid var(--line); border-radius: 7px; padding: 14px; background: #f4f7f3; }
.question-side h3 { font-size: 1rem; }
.question-side p { font-size: .82rem; color: var(--muted); margin: 4px 0 11px; }
.navigator { display: flex; flex-wrap: wrap; gap: 5px; }
.question-side .navigator { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.navigator button {
  position: relative;
  min-width: 34px;
  min-height: 36px;
  padding: 2px 5px;
  border: 1px solid #cedad1;
  border-radius: 4px;
  color: var(--ink);
  background: var(--card);
  font-size: .86rem;
  font-weight: 740;
}
.navigator button:hover { border-color: #799b88; background: #eaf2eb; }
.navigator .answered, .navigator .good { background: var(--green-bg); color: var(--green); }
.navigator .bad { background: var(--red-bg); color: var(--red); }
.navigator .flagged { border-color: #b28843; color: var(--warning); background: var(--warning-bg); }
.navigator [aria-current=true] { border-color: #3f7960; box-shadow: inset 0 0 0 1px #3f7960; }
.navigator button:focus-visible { outline-offset: 1px; }
.quiz-side-actions { display: grid; gap: 7px; margin-top: 13px; }
.quiz-side-actions .button { font-size: .83rem; }
.bookmarked[aria-pressed=true], [data-flag][aria-pressed=true] { background: var(--warning-bg); color: var(--warning); }

.result-score { margin: 7px 0; font-size: clamp(53px, 8.5vw, 96px); font-weight: 730; letter-spacing: -.08em; line-height: 1; }
.result-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(215px, .62fr); gap: 18px; }
.result-top p:not(.kicker) { color: var(--muted); margin-block: 8px; }
.result-top .recommend { display: block; align-self: start; margin: 0; }
.result-top .recommend .button { margin-top: 9px; }
.result-review, .archive-review { margin-top: 18px; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: #fff; }
.review-header { padding: 13px 16px; border-bottom: 1px solid var(--line); background: #f0f5ef; }
.review-header .navigator { margin-top: 9px; }
.review-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
  align-items: start;
  padding: clamp(12px, 2vw, 22px);
}
.review-content.text-only { grid-template-columns: 1fr; }
.review-content h3 { font-size: clamp(1.13rem, 1.7vw, 1.5rem); margin-block: 5px 9px; }
.review-options { margin-block: 9px; padding: 0; list-style: none; }
.review-options .option { flex-wrap: wrap; }
.counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.counts .box { display: grid; gap: 5px; }
.counts strong { font: 700 clamp(1.625rem, 4.5vw, 3.375rem)/1 var(--heading-font); font-variant-numeric: tabular-nums; }
.counts span { color: var(--muted); font-size: .86rem; }
.progress-list, .history-list, .archive-list { margin: 0; padding: 0; list-style: none; }
.progress-list li, .history-list li { display: grid; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.progress-list li { grid-template-columns: minmax(0, 1fr) minmax(50px, 120px) max-content; }
.history-list li { grid-template-columns: minmax(0, 1fr) auto auto; }
.history-list li:last-child, .progress-list li:last-child { border-bottom: 0; }
.progress-list progress { width: 100%; accent-color: #4c745c; }
.history-list time, .topic-accuracy { color: var(--muted); font-size: .83rem; }
.topic-accuracy { display: block; }
.exam-progress { margin-bottom: 14px; }
.exam-progress-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.exam-progress-heading h2 { margin-top: 0; }
.exam-progress-heading p { margin-bottom: 0; color: var(--muted); }
.progress-categories { display: flex; flex-wrap: wrap; gap: 6px; }
.progress-categories .button { min-width: 44px; min-height: 44px; justify-content: center; padding-inline: 8px; }
.exam-progress-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-block: 16px 10px; }
.exam-progress-metrics > div { padding: 10px 12px; border-left: 3px solid #7c9d86; background: #eef3ed; }
.exam-progress-metrics dt { color: var(--muted); font-size: .89rem; line-height: 1.35; }
.exam-progress-metrics dd { margin: 3px 0 0; font-weight: 700; font-size: clamp(1.25rem,2.7vw,1.8rem); font-variant-numeric: tabular-nums; }
.exam-trend { margin: 14px 0 0; }
.exam-trend svg { display: block; width: 100%; max-height: 176px; }
.exam-trend text { font-size: 11px; fill: var(--muted); }
.exam-pass-line { stroke: var(--forest); stroke-opacity: .7; stroke-dasharray: 5 3; }
.exam-axis { stroke: var(--line); }
.exam-trend polyline { fill: none; stroke: var(--forest); stroke-width: 2; }
.exam-trend circle { fill: var(--forest); stroke: var(--surface); stroke-width: 1.25; }
.exam-trend figcaption, .mastery-legend { color: var(--muted); font-size: .83rem; }
.progress-list.mastery-list li { grid-template-columns: minmax(0, 1fr) minmax(82px, 34%); }
.mastery-list a, .mastery-list button { color: inherit; font-weight: 700; }
.mastery-list button { text-align: left; max-width: 100%; }
.mastery-track { display: flex; height: .72rem; overflow: hidden; border-radius: 999px; background: #e9ede7; }
.mastery-track span { flex-basis: 0; }
.mastery-new { --mastery-color: #e3e9df; }
.mastery-missed { --mastery-color: #b04b3e; }
.mastery-once { --mastery-color: #d4a748; }
.mastery-retained { --mastery-color: #4c745c; }
.mastery-track span { background: var(--mastery-color); }
.mastery-legend { display: flex; flex-wrap: wrap; gap: 7px 13px; margin-bottom: 0; }
.mastery-legend span::before { content: ''; display: inline-block; width: .72rem; height: .72rem; vertical-align: -.04em; margin-right: 4px; border-radius: 50%; background: var(--mastery-color); }
.archive-list details { padding-block: 9px; border-top: 1px solid var(--line); }
.archive-list details:first-child { border-top: 0; }
.archive-list summary { cursor: pointer; font-weight: 750; }
.archive-list details .review-content { padding: 10px 0; }

dialog {
  overscroll-behavior: contain;
  width: min(92vw, 465px);
  max-height: 90dvh;
  padding: 19px;
  border: 1px solid #aabdb1;
  border-radius: 8px;
  color: var(--ink);
  background: var(--card);
}
dialog::backdrop { background: #1028209e; }
dialog h2 { margin-bottom: 8px; font-size: 1.62rem; font-weight: 730; line-height: 1.2; }
dialog p { color: var(--muted); }

@media (min-width: 1120px) {
  .question-main:has(> .question-media) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    grid-template-rows: max-content max-content 1fr;
    grid-template-areas: "topic view" "title view" "form view";
    gap: 0 18px;
    align-items: start;
  }
  .question-main:has(> .question-media) > .kicker { grid-area: topic; }
  .question-main:has(> .question-media) > h2 { grid-area: title; }
  .question-main:has(> .question-media) > form { grid-area: form; }
  .question-main:has(> .question-media) > .question-media { grid-area: view; margin-bottom: 0; }
  .question-main:has(> .question-media) #answerHint { margin-top: 0; }
}

@media (max-width: 940px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 23px; }
  .hero h1 { font-size: clamp(39px, 5.5vw, 54px); }
  .question-layout { grid-template-columns: minmax(0, 1fr) 225px; }
  .question-side .navigator { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .scene-with-sign { grid-template-columns: minmax(0,1fr); }
  .scene-with-sign > .road-sign { grid-row: 1; width: 66px; }
  .brand { gap: 5px; font-size: 1.15rem; }
  .brand-mark { width: 24px; height: 24px; padding: 5px 6px; }
  .brand-mark i { height: 14px; }
  .hero { grid-template-columns: minmax(0, 1fr); padding-block: 34px 28px; }
  .hero h1 { max-width: 13ch; font-size: clamp(41px, 9vw, 62px); margin-block: 11px 15px; }
  .hero-actions { margin-top: 18px; gap: 11px; }
  .hero-art iframe { height: clamp(297px, 70vw, 372px); }
  .fact-grid > div, .fact-grid > div + div { flex-direction: column; align-items: start; gap: 3px; padding: 13px 8px; }
  .fact-grid > div:first-child { padding-left: 0; }
  .fact-grid span { line-height: 1.3; }
  .method-grid, .mode-grid, .question-layout, .result-top, .review-content, .guide-example { grid-template-columns: 1fr; }
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resume, .recommend { flex-direction: column; align-items: start; }
  .workspace:has(.quiz) { padding-block-start: 13px; }
  .question-layout { gap: 16px; }
  .question-figure.scene-inline iframe, .question-media.scene-inline iframe { height: clamp(253px, 67vw, 315px); }
  .question-side .navigator { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .navigator button { min-width: 35px; min-height: 42px; }
  .quiz-side-actions { display: flex; flex-wrap: wrap; }
  .result-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-actions .button { padding-inline: 7px; font-size: .84rem; }
  .history-list li { grid-template-columns: minmax(0, 1fr) max-content; gap: 4px; }
  .history-list time { grid-column: 1 / -1; }
}

@media (max-width: 355px) {
  .topic-grid { grid-template-columns: 1fr; }
  .answer-state { margin-left: 0; }
  .counts { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
  .button, .option, .navigator button { transition: background-color 130ms ease, border-color 130ms ease; }
}

.theory-lessons { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 24px; padding: 0; list-style: none; }
.theory-lessons li { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.theory-lessons li span { flex: none; color: var(--muted); font-size: .8rem; }
.theory-explanation summary { cursor: pointer; font-weight: 650; }
.theory-explanation p { margin-block: 7px; max-width: 70ch; }
.theory-lessons a { font-weight: 650; overflow-wrap: anywhere; }
.theory-lesson { display: grid; gap: clamp(18px, 3vw, 32px); width: min(100%, 840px); margin-block: 18px; }
.theory-lesson h2 { font-family: var(--heading-font); }
.theory-copy { max-width: 70ch; }
.theory-copy ul { display: grid; gap: 8px; margin-block: 12px 0; padding-inline-start: 22px; }
.theory-intro { font-size: 1.14rem; }
.theory-scene { margin: 0; }
.theory-check { background: #edf3ed; border-radius: 7px; padding: clamp(12px,2.3vw,22px); }
.theory-check h2 { margin-block: 0 6px; font-size: 1.22rem; }
.theory-check details { margin-top: 10px; }
.theory-check summary { cursor: pointer; font-weight: 700; }
.theory-check details p { margin-block: 8px 0; }
.theory-lesson .actions { margin: 0; }
@media (max-width: 700px) {
  .theory-lessons { grid-template-columns: 1fr; }
  .theory-lessons li span { flex: 0 1 auto; text-align: end; }
}
@media (max-width: 420px) {
}

.home-install { padding-bottom: clamp(30px, 6vw, 77px); }
.home-install-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px 22px;
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid #cbdcd0;
  border-radius: var(--radius);
  background: var(--green-bg);
}
.home-install-card img { display: block; border-radius: 12px; }
.home-install-card h2 { margin: 0; font-size: clamp(1.15rem, 2.5vw, 1.65rem); }
.home-install-card p { margin: 3px 0 0; color: var(--muted); }
@media (max-width: 620px) {
  .home-install-card { grid-template-columns: auto minmax(0, 1fr); gap: 12px; }
  .home-install-card img { width: 48px; height: 48px; }
  .home-install-card .button { grid-column: 1 / -1; justify-self: start; }
}

.install-panel { max-width: 660px; }
.install-panel > * + * { margin-block-start: 16px; }
.install-panel h2 { font-size: 1.22rem; margin-bottom: 6px; }
.install-panel details { border-top: 1px solid var(--line); }
.install-panel summary { padding-block: 10px; font-weight: 650; cursor: pointer; }
.install-panel details p { margin: 0 0 12px; }
