@font-face {
  font-family: "DM Sans";
  src: url("assets/dm-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("assets/barlow-condensed-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
:root {
  --ink: #182722;
  --muted: #52615a;
  --paper: #f6f7f2;
  --line: #d0d7ce;
  --yellow: #ffe05c;
  --forest: #152724;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --rail: 202px;
  color: var(--ink);
  background: var(--paper);
  font: 100%/1.5 "DM Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; padding-left: var(--rail); }
button, input, summary { font: inherit; }
button, a { color: inherit; touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { text-underline-offset: .22em; }
button, a, input, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #2164c4; outline-offset: 3px; }
.sr-only, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip:focus { position: fixed; z-index: 10; top: 12px; left: 12px; background: white; padding: 12px; }
h1, h2, h3, p { margin: 0; }
.icon { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.75; fill: none; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.site-nav { position: fixed; inset: 0 auto 0 0; width: var(--rail); z-index: 3; background: var(--forest); color: #f6faf5; }
.bar { min-height: 100%; height: 100%; display: flex; flex-direction: column; padding: 33px 16px 23px; }
.brand { display: flex; align-items: center; gap: 10px; width: fit-content; margin: 0 8px 53px; font-weight: 800; font-size: 1.6rem; letter-spacing: -.065em; text-decoration: none; line-height: 1; }
.brand img { flex: none; border-radius: 6px; }
.bar nav { display: grid; gap: 6px; }
.bar nav a, .resources { display: flex; align-items: center; gap: 12px; border-radius: 8px; text-decoration: none; color: #d0dcd4; padding: 11px 14px; font-size: .95rem; font-weight: 600; }
.nav-symbol { width: 19px; height: 19px; }
.bar nav a:hover, .resources:hover { color: white; background: #293d37; }
.bar nav a.active { background: var(--yellow); color: #172320; }
.nav-base { margin-top: auto; border-top: 1px solid #40514a; padding-top: 16px; }
.resources { background: transparent; border: 0; width: 100%; justify-content: flex-start; }
.resources::before { content: ""; width: 16px; height: 14px; border: 1.5px solid currentColor; border-radius: 2px; background: linear-gradient(90deg,transparent 44%,currentColor 45% 52%,transparent 53%); }
main,.foot { width: min(1120px,calc(100% - clamp(48px,7vw,124px))); margin-inline: auto; }
main { min-height: calc(100vh - 90px); padding: clamp(34px,4.6vw,76px) 0 56px; }
main:focus { outline: none; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; padding: 20px 0 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.footsep { margin-inline: 4px; color: #79847d; }
.eyebrow, .meta { display: inline-block; font-size: .76rem; font-weight: 750; letter-spacing: .105em; text-transform: uppercase; color: #496056; }
.page-title { font: 700 clamp(3.25rem,6vw,5.75rem)/.98 var(--display); letter-spacing: -.032em; margin: 8px 0 14px; }
.lede,.muted { color: var(--muted); max-width: 64ch; }
.lede { font-size: 1.04rem; }
.dash-intro { margin-bottom: 28px; }
.section { margin-top: 32px; }
h2 { font: 700 2rem/1.13 var(--display); letter-spacing: -.015em; }
h3 { font-size: 1.15rem; line-height: 1.25; }
.section-head, .row, .quiztop, .actions, .progress-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-head { margin-bottom: 14px; }
.primary, .secondary, .iconbtn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; border-radius: 8px; line-height: 1.15; text-decoration: none; }
.primary,.secondary { padding: 11px 18px; font-size: .95rem; }
.primary { background: var(--ink); color: #fff; border: 1px solid var(--ink); }
.primary:hover:enabled,.primary[href]:hover { background: #35463c; }
.primary:disabled { background: #dde2da; color: #566157; border-color: #dde2da; }
.primary .icon { width: 16px; height: 16px; }
.secondary,.iconbtn { border: 1px solid #aebbb0; background: #fff; }
.secondary:hover,.iconbtn:hover { background: #edf0e9; }
.quiet,.textlink,.sources a,.guide-links a { font-size: .91rem; font-weight: 650; }
.cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.licence { border: 1px solid #c3ccc0; border-radius: 16px; overflow: hidden; background: white; }
.card-photo { height: clamp(156px,16vw,232px); overflow: hidden; background: #c8cfc3; }
.card-photo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.car .card-photo img { object-position: 40% 7%; }
.rider .card-photo img { object-position: 51% 65%; }
.licence-body { padding: 21px clamp(16px,2vw,28px) 24px; }
.licence h2 { margin: 5px 0; font-size: clamp(2rem,3vw,3.05rem); }
.licence p { color: var(--muted); font-size: .94rem; }
.licence p span { color: #a8b4a7; margin: 0 5px; }
.licence button { margin-top: 18px; }
.modes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.mode { display: flex; align-items: flex-start; gap: 12px; padding: 18px 15px; background: white; border: 1px solid var(--line); border-radius: 12px; text-align: left; }
.mode:hover { border-color: #798b7e; background: #fcfdf9; }
.tile { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 10px; flex: none; }
.tile.exam { background: #ffed95; color: #534400; }
.tile.random { background: #e4ecff; color: #375291; }
.tile.hard { background: #ffedc1; color: #75510d; }
.tile.wrong { background: #e1eddb; color: #355c37; }
.mode-copy { display: grid; gap: 4px; }
.mode-copy strong { line-height: 1.25; font-size: 1rem; }
.mode-copy > span,.guide-callout p { color: var(--muted); font-size: .9rem; line-height: 1.45; }
.dash-lower { display: grid; grid-template-columns: .95fr 1.05fr; gap: 18px; margin-top: 26px; }
.progress-box,.guide-callout { border-radius: 13px; border: 1px solid var(--line); }
.progress-box { padding: 20px; background: #edf2e8; }
.progress-box h2,.guide-callout h2 { font-size: 1.75rem; }
.stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.statline { padding-inline: 14px; border-left: 1px solid #c1cdbc; }
.statline:first-child { padding-left: 0; border: 0; }
.statline .icon { display: none; }
.statline strong { display: block; font: 700 2.25rem/1 var(--display); }
.statline span { display: block; margin-top: 6px; color: var(--muted); font-size: .8rem; }
.guide-callout { display: grid; grid-template-columns: minmax(76px,27%) 1fr; background: white; overflow: hidden; }
.scenic { background: #284943 url("assets/hero.webp") 58% 50% / cover; }
.guide-callout > div:last-child { padding: 18px; }
.guide-callout p { margin: 6px 0 10px; }
.guide-links,.sources { display: flex; flex-wrap: wrap; gap: 7px 16px; }
.resume { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; border: 1px solid #c2d6bd; border-radius: 12px; padding: 16px 20px; background: #e9f2df; margin: 0 0 18px; }
.resume > div { display: flex; align-items: center; gap: 12px; }
.resume p,.fine { color: var(--muted); font-size: .88rem; }
.warning { border: 1px solid #a47617; padding: 12px 16px; margin-bottom: 14px; background: #fff8ce; }
dialog { padding: 0; width: min(740px,calc(100% - 32px)); border: 1px solid #bac4b9; border-radius: 16px; background: #fff; color: var(--ink); max-height: min(90dvh,880px); box-shadow: 0 24px 70px #121d223d; }
dialog::backdrop { background: #142521a8; }
#sheetbody { padding: 24px; }
.dialoghead { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.dialoghead h2 { font-size: 2.3rem; }
.iconbtn { min-width: 42px; min-height: 42px; padding: 8px; }
.resources-list { display: grid; gap: 10px; margin-top: 18px; }
.resources-list a { padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.dialoghead + .muted { margin-top: 14px; }
dialog:has(#setupform) { overflow: hidden; }
#sheetbody:has(#setupform) { padding: 0; display: flex; flex-direction: column; max-height: min(90dvh,880px); }
#sheetbody:has(#setupform) .dialoghead { flex: none; padding: 20px 24px 16px; border-bottom: 1px solid var(--line); }
#setupform { display: flex; flex-direction: column; min-height: 0; }
.setup-scroll { padding: 18px 24px 24px; overflow: auto; overscroll-behavior: contain; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; font-size: 1rem; font-weight: 740; margin-bottom: 9px; }
.setup-first { display: grid; grid-template-columns: .85fr 1.15fr; gap: 18px; }
.setup-mode { margin: 20px 0; padding: 0 0 16px; border-bottom: 1px solid var(--line); }
.switch-options,.mode-list,.length-list,.section-list { display: grid; gap: 7px; }
.switch-options { grid-template-columns: 1fr 1fr; }
.mode-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
.length-list { display: flex; flex-wrap: wrap; }
.length-list label { min-width: 42px; flex: 1; }
.section-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
.setup-choice { display: block; position: relative; cursor: pointer; min-width: 0; }
.setup-choice input { position: absolute; width: 100%; height: 100%; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.choice-face { display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #bdc8bd; border-radius: 8px; min-height: 44px; height: 100%; padding: 8px; line-height: 1.25; font-size: .92rem; }
.setup-choice input:checked + .choice-face { background: #fff4b8; border-color: #5c5b26; box-shadow: inset 0 0 0 1px #5c5b26; font-weight: 700; }
.setup-choice input:focus-visible + .choice-face { outline: 3px solid #2164c4; outline-offset: 2px; }
.choice-mark { display: none; }
.section-list .choice-face { justify-content: start; padding: 10px 12px; }
.section-list .choice-mark { order: -1; display: grid; place-items: center; flex: none; width: 16px; height: 16px; border: 1px solid #829183; background: white; border-radius: 4px; }
.choice-mark .icon { display: none; stroke-width: 3; width: 13px; height: 13px; }
input:checked + .choice-face .choice-mark { background: var(--ink); color: white; border-color: var(--ink); }
input:checked + .choice-face .icon { display: block; }
.choice-count { margin-left: auto; font-size: .8rem; color: var(--muted); }
.section-help { margin: -5px 0 12px; }
#hint { margin: 8px 0 0; }
.setup-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 24px; border-top: 1px solid var(--line); background: var(--paper); flex: none; }
.selection-summary { display: grid; font-size: .9rem; }
#session-summary { color: var(--muted); font-size: .8rem; }
.setup-footer .primary { flex: none; }
.quizwrap { max-width: 730px; margin-inline: auto; }
.quiztop { margin-bottom: 24px; }
.quiztop h2 { font-size: 2.25rem; margin-top: 4px; }
.quiztop .secondary { flex: none; }
.progress-head { font-size: .9rem; }
.progress-head span { color: var(--muted); }
.meter { display: flex; gap: 3px; height: 8px; margin: 8px 0 20px; }
.meter i { flex: 1; border-radius: 2px; background: #d9e1d6; }
.meter .filled,.continuous-fill { background: #44704b; }
.meter.continuous { overflow: hidden; background: #d9e1d6; border-radius: 5px; }
.panel,.result,.history-entry,.empty { background: white; border: 1px solid var(--line); border-radius: 14px; }
.panel,.result,.empty { padding: clamp(20px,3vw,38px); }
.prompt { font-size: clamp(1.45rem,2.5vw,2.05rem); line-height: 1.24; letter-spacing: -.035em; margin: 9px 0 20px; }
.diagram-frame { display: flex; justify-content: center; border-radius: 8px; background: var(--paper); padding: 10px; margin-bottom: 18px; }
.diagram { display: block; max-width: 100%; max-height: 255px; object-fit: contain; }
.answers { display: grid; gap: 9px; }
.answer { display: flex; text-align: left; align-items: center; gap: 12px; min-height: 54px; padding: 12px 15px; color: var(--ink); background: white; border: 1px solid #bfcac0; border-radius: 9px; font-size: 1rem; line-height: 1.35; }
.answer b { border: 1px solid #c3cec3; border-radius: 6px; width: 27px; height: 27px; display: grid; place-items: center; flex: none; background: var(--paper); font-size: .86rem; }
.answer:hover:enabled { background: #f6f8f2; border-color: #789080; }
.answer.chosen { box-shadow: inset 0 0 0 1px #3d5648; border-color: #3d5648; background: #f0f4e9; }
.answer.chosen b { background: var(--ink); color: white; border-color: var(--ink); }
.answer.right { background: #e6f3dd; border-color: #55824c; }
.answer.right b { background: #36633a; color: white; border-color: #36633a; }
.answer.bad { background: #fff0ea; border-color: #b36147; }
.answer.bad b { background: #92422c; color: white; border-color: #92422c; }
.feedback { padding: 16px 18px; border-left: 4px solid #508250; border-radius: 7px; background: #eef7e7; margin-top: 18px; }
.feedback.negative { background: #fcf1e6; border-color: #ad6c32; }
.feedback-title { display: flex; align-items: center; gap: 7px; font-size: 1.05rem; }
.feedback-title .icon { width: 18px; height: 18px; }
.feedback p { margin: 7px 0; }
.actions { padding-top: 18px; border-top: 1px solid var(--line); margin-top: 20px; }
.result { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 18px; background: #eaf2e0; border-color: #c6d4ba; margin-bottom: 24px; }
.result .page-title { font-size: clamp(2.7rem,5vw,4.5rem); }
.result .big { font-size: 1.25rem; }
.result .actions { grid-column: 1/-1; margin-top: 0; }
.score-ring { width: 94px; height: 94px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#416746 var(--score), #cad7c4 0); }
.score-ring strong { display: grid; place-items: center; background: #eaf2e0; border-radius: 50%; width: 76px; height: 76px; font: 700 2.05rem var(--display); }
.history-list { display: grid; gap: 10px; }
.history-list .panel { padding: 20px 22px; }
.history-list .panel h3 { margin: 4px 0; }
.history-list .panel .secondary { flex: none; }
.history-entry { overflow: clip; }
.history-entry summary { padding: 15px 18px; cursor: pointer; }
.history-entry[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.history-entry p { margin: 8px 0; }
.history-entry summary strong { font-size: .87rem; }
.empty { text-align: center; padding: 40px 18px; }
.empty > .icon { width: 34px; height: 34px; margin-bottom: 12px; }
.empty p { color: var(--muted); margin: 6px 0 18px; }
main > .stats { margin-top: 22px; background: #eaf0e5; border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.history-list .row { align-items: center; }
.section > h2 { margin-bottom: 15px; }
.licence-guide { max-width: 1050px; }
.guide-intro { margin-bottom: 22px; }
.guide-intro .guide-links { margin-top: 18px; }
.guide-part { scroll-margin-top: 15px; border: 1px solid var(--line); overflow: hidden; background: white; border-radius: 15px; margin: 20px 0 24px; }
.guide-banner { display: flex; justify-content: space-between; gap: 18px; align-items: center; background: #e4eddb; padding-left: 26px; }
#rider .guide-banner { background: #eeeada; }
.guide-banner h2 { font-size: 2.3rem; }
.guide-banner img { width: 150px; height: 98px; object-fit: cover; }
#car .guide-banner img { object-position: 42% 15%; }
#rider .guide-banner img { object-position: 51% 64%; }
.guide-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.guide-grid article { padding: clamp(18px,2.3vw,30px); }
.guide-grid article + article { border-left: 1px solid var(--line); }
.guide-grid h3 { font-size: 1.22rem; margin-bottom: 15px; }
.guide-grid p { margin: 0 0 12px; }
.guide-grid table { border-collapse: collapse; width: 100%; font-size: .92rem; margin: 12px 0; text-align: left; }
.guide-grid th,.guide-grid td { padding: 9px; border-bottom: 1px solid var(--line); }
.guide-grid thead th { background: #f0f3eb; }
.licence-steps { list-style: none; margin: 0 0 16px; padding: 0; }
.licence-steps li { position: relative; padding: 0 0 12px 42px; }
.licence-steps li::before { position: absolute; display: grid; place-items: center; left: 0; top: 0; width: 30px; height: 27px; border: 1px solid #bdac4a; border-radius: 4px; content: "L"; font: 700 1rem/1 "DM Sans",sans-serif; color: #182722; background: var(--yellow); }
.licence-steps li:nth-child(2)::before { content: "P1"; color: #993e32; border-color: #e4c9c4; background: #fff; }
.licence-steps li:nth-child(3)::before { content: "P2"; color: #326239; border-color: #d0ddc9; background: #fff; }
.licence-steps li:last-child::before { content: "✓"; background: #eaf0e5; border-color: #cbd7c6; }
.licence-steps p { font-size: .94rem; margin: 4px 0 0; }
.licence-guide > .primary { margin-top: 14px; }
#photo-credits { border-top: 1px solid var(--line); margin: 32px 0 0; padding-top: 18px; }
#photo-credits h2 { font: 700 1rem "DM Sans",sans-serif; margin-bottom: 5px; }
#photo-credits p { color: var(--muted); font-size: .84rem; margin-top: 4px; }
[hidden] { display: none !important; }
.preview-heading { display: flex; align-items: center; gap: 12px; }
.preview-heading h3 { margin-top: 3px; font-size: 1.25rem; }
.preview-intro { margin: 14px 0 18px; color: var(--muted); }
.preview-metrics { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin: 0 0 20px; }
.preview-metrics > div { display: flex; flex-direction: column-reverse; justify-content: end; gap: 4px; text-align: center; border-radius: 10px; background: #edf2e8; padding: 14px 8px; }
.preview-metrics dt { font-size: .875rem; color: var(--muted); }
.preview-metrics dd { margin: 0; font: 700 clamp(1.5rem,4vw,2.1rem)/1.1 var(--display); }
.preview-topics { margin-bottom: 14px; }
.preview-topics strong { display: block; }
.preview-notes { padding: 0; margin: 0 0 16px; list-style: none; display: grid; gap: 12px; }
.preview-notes li { display: flex; align-items: flex-start; gap: 10px; }
.preview-notes .icon { color: #35634c; border: 1.5px solid; border-radius: 50%; padding: 3px; width: 18px; height: 18px; margin-top: 3px; }
.preview-source { font-size: .9rem; font-weight: 650; }
@media (max-width: 420px) {
  .preview-metrics { gap: 5px; }
  .preview-metrics > div { padding: 10px 4px; }
  .preview-metrics dt { line-height: 1.25; }
}
.exam-result { display: block; }
.exam-result.failed { background: #fbf0e5; border-color: #e1c8b0; }
.exam-result .result-copy p + p { margin-top: 5px; }
.exam-scores { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,185px),1fr)); gap: 12px; margin: 20px 0; }
.exam-scores > div { padding: 14px; border: 1px solid var(--line); background: white; border-radius: 8px; }
.exam-scores p { margin: 5px 0; }
.exam-buttons { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.exam-result .actions { flex-wrap: wrap; }
@media (min-width: 1450px) { :root { --rail: 226px; } }
@media (max-width: 1120px) {
  :root { --rail: 170px; }
  .bar { padding-inline: 12px; }
  .brand { margin-inline: 4px; }
  .mode { flex-direction: column; }
  .dash-lower { grid-template-columns: 1fr 1fr; }
  .guide-callout { grid-template-columns: 64px 1fr; }
}
@media (max-width: 840px) {
  body { padding-left: 0; }
  .site-nav { position: static; width: auto; }
  .bar { padding: 12px max(20px,4vw); flex-direction: row; align-items: center; gap: 20px; }
  .brand { margin: 0; font-size: 1.4rem; }
  .brand img { width: 32px; height: 32px; }
  .bar nav { display: flex; margin-left: auto; gap: 2px; }
  .bar nav a,.resources { padding: 10px; font-size: .89rem; gap: 6px; }
  .nav-symbol { display: none; }
  .nav-base { padding: 0; border: 0; margin: 0; }
  .resources::before { display: none; }
  main,.foot { width: calc(100% - 8vw); }
  .guide-callout { grid-template-columns: 75px 1fr; }
}
@media (max-width: 640px) {
  .bar { display: grid; grid-template-columns: 1fr auto; gap: 11px 12px; padding: 15px 16px 10px; }
  .bar nav { grid-column: 1/-1; grid-row: 2; width: 100%; }
  .bar nav a { flex: 1; justify-content: center; }
  .nav-base { grid-column: 2; grid-row: 1; }
  .resources { min-height: 36px; padding: 7px; font-size: .83rem; }
  main,.foot { width: calc(100% - 32px); }
  main { padding: 27px 0 38px; }
  .page-title { font-size: clamp(2.9rem,11vw,4rem); }
  .dash-intro { margin-bottom: 20px; }
  .cards,.modes,.dash-lower,.guide-grid { grid-template-columns: 1fr; }
  .cards { gap: 12px; }
  .licence { display: grid; grid-template-columns: 36% 1fr; border-radius: 12px; }
  .card-photo { height: 100%; min-height: 158px; }
  .licence-body { padding: 14px; }
  .licence h2 { font-size: 1.85rem; line-height: 1.04; }
  .licence .eyebrow { font-size: .7rem; letter-spacing: .06em; }
  .licence p { font-size: .83rem; }
  .licence button { margin-top: 12px; padding: 9px 12px; font-size: .87rem; }
  .section { margin-top: 24px; }
  .mode { flex-direction: row; align-items: center; padding: 13px; }
  .modes,.dash-lower { gap: 9px; }
  .guide-callout { grid-template-columns: 25% 1fr; }
  .guide-grid article + article { border: 0; border-top: 1px solid var(--line); }
  .guide-banner { padding-left: 16px; }
  .guide-banner h2 { font-size: 1.8rem; }
  .guide-banner img { width: 100px; height: 83px; }
  .quiztop { gap: 8px; margin-bottom: 16px; }
  .quiztop h2 { font-size: 1.65rem; }
  .quiztop .secondary { font-size: .84rem; padding: 9px 11px; }
  .question-panel { padding: 17px; }
  .answer { padding: 11px; }
  .history-list .row { flex-wrap: wrap; gap: 8px; }
  .setup-first { grid-template-columns: 1fr; gap: 12px; }
  .mode-list { grid-template-columns: 1fr; }
  .setup-mode { margin: 14px 0; padding-bottom: 12px; }
  .setup-mode .choice-face { justify-content: flex-start; padding-inline: 12px; }
  .section-list { grid-template-columns: 1fr; }
  dialog { width: min(100% - 14px,740px); max-height: 94dvh; }
  #sheetbody:has(#setupform) { max-height: 94dvh; }
  #sheetbody:has(#setupform) .dialoghead,.setup-footer { padding: 12px 15px; }
  .dialoghead h2 { font-size: 1.9rem; }
  .setup-scroll { padding: 14px 15px; }
  .selection-summary { font-size: .78rem; }
  .score-ring { width: 66px; height: 66px; }
  .score-ring strong { width: 53px; height: 53px; font-size: 1.45rem; }
  .result { gap: 10px; }
  .result .page-title { font-size: 2.65rem; }
  .foot { flex-direction: column; gap: 4px; }
}
@media (max-width: 360px) {
  .bar nav a { font-size: .83rem; padding-inline: 5px; }
  .licence-body { padding: 12px; }
  .licence { grid-template-columns: 32% 1fr; }
  .licence h2 { font-size: 1.65rem; }
  .guide-banner img { width: 84px; }
  .progress-box { padding: 16px; }
  .statline { padding-inline: 8px; }
  .progress-head { font-size: .81rem; }
  .setup-footer { gap: 6px; }
  .result .actions,.resume { align-items: flex-start; flex-direction: column; }
}
