@font-face { font-family: "Public Sans"; src: url("/fonts/public-sans-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/fonts/public-sans-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/fonts/public-sans-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Merriweather"; src: url("/fonts/merriweather-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Merriweather"; src: url("/fonts/merriweather-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

html { font-size: 16px; }
@media (min-width: 1600px) { html { font-size: clamp(16px, 0.7vw + 4px, 30px); } }

:root {
  --navy: #15365b;
  --navy-dk: #0d2440;
  --steel: #3c6a96;
  --steel-pale: #e9eff5;
  --ink: #1b222b;
  --ink-2: #4b5562;
  --line: #d2d9e1;
  --alt: #f3f5f8;
  --link: #1f5a94;
  --red: #b3261e;
  --red-pale: #fbefed;
  --ok: #24693a;
  --serif: "Merriweather", Georgia, serif;
  --sans: "Public Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: var(--ink); font: 400 1rem/1.55 var(--sans); }
img { max-width: 100%; height: auto; }
a { color: var(--link); }
a:hover { color: var(--navy-dk); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; color: var(--navy-dk); line-height: 1.25; margin: 0 0 0.6rem; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); }
h2 { font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.6rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 0.8rem; }
.wrap { width: min(72rem, 100% - 2rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; padding: 0.5rem 0.8rem; background: #fff; }
:focus-visible { outline: 3px solid #2f7ad0; outline-offset: 2px; }

/* Header */
.util { background: var(--navy-dk); color: #d5dfea; font-size: 0.82rem; }
.util .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.2rem 1rem; padding: 0.35rem 0; }
.util nav { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.util a { color: #fff; text-decoration: none; }
.util a:hover { text-decoration: underline; color: #fff; }
.head { border-bottom: 1px solid var(--line); }
.head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem 1.5rem; padding: 0.8rem 0; }
.brand { display: flex; align-items: center; gap: 0.75rem; color: var(--navy-dk); text-decoration: none; }
.brand img { width: 3.4rem; height: auto; }
.brand small { display: block; font-size: 0.78rem; letter-spacing: 0.04em; color: var(--ink-2); }
.brand strong { display: block; font: 700 1.2rem/1.2 var(--serif); }
.head-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.search { display: flex; min-width: 0; }
.search input { width: 16rem; max-width: 100%; min-width: 0; height: 2.5rem; padding: 0 0.7rem; border: 1px solid #8a97a6; border-right: 0; border-radius: 2px 0 0 2px; font: inherit; }
.search button { height: 2.5rem; padding: 0 0.9rem; border: 0; border-radius: 0 2px 2px 0; background: var(--navy); color: #fff; font: 600 0.95rem var(--sans); cursor: pointer; }
.search button:hover { background: var(--navy-dk); }
.nav { background: var(--navy); }
.nav .wrap { display: flex; flex-wrap: wrap; }
.nav a { padding: 0.75rem 0.95rem; color: #fff; font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; }
.nav a:hover { background: var(--navy-dk); color: #fff; }
.nav a[aria-current="page"] { border-bottom-color: #fff; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 2.5rem; padding: 0 1.1rem; border: 2px solid var(--navy); border-radius: 2px; background: var(--navy); color: #fff; font: 700 0.98rem var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--navy-dk); border-color: var(--navy-dk); color: #fff; }
.btn.is-plain { background: #fff; color: var(--navy); }
.btn.is-plain:hover { background: var(--steel-pale); color: var(--navy); }
.btn.is-small { min-height: 2rem; padding: 0 0.75rem; font-size: 0.88rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Notices */
.notice { background: var(--red-pale); border-bottom: 1px solid #e7c4c0; }
.notice .wrap { display: flex; gap: 0.7rem; padding: 0.6rem 0; font-size: 0.93rem; }
.notice strong { color: var(--red); white-space: nowrap; }
.note { padding: 0.8rem 1rem; border: 1px solid var(--line); border-left: 4px solid var(--steel); background: var(--steel-pale); margin: 1rem 0; }
.note.is-red { border-left-color: var(--red); background: var(--red-pale); border-color: #e7c4c0; }
.note > :last-child { margin-bottom: 0; }

/* Home */
.hero { position: relative; min-height: 26rem; display: flex; align-items: center; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .wrap { position: relative; padding: 2.5rem 0; }
.hero-box { width: min(36rem, 100%); padding: 1.5rem 1.6rem; background: #fff; border-top: 5px solid var(--navy); box-shadow: 0 2px 10px rgb(0 0 0 / 0.25); }
.hero-box h1 { margin-bottom: 0.4rem; }
.hero-box .search { margin: 0.8rem 0; }
.hero-box .search input { flex: 1; width: auto; height: 2.9rem; }
.hero-box .search button { height: 2.9rem; }
.popular { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; margin: 0; padding: 0; list-style: none; font-size: 0.93rem; }
.popular li::before { content: "› "; color: var(--ink-2); }

.section { padding: 2.5rem 0; }
.section.is-alt { background: var(--alt); border-block: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.3rem 1rem; margin-bottom: 1.1rem; }
.section-head p { margin: 0; color: var(--ink-2); }

.services { display: grid; gap: 0; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.services a { display: grid; grid-template-columns: 2.4rem 1fr; gap: 0.2rem 0.8rem; padding: 1rem 1.1rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; }
.services a:hover { background: var(--steel-pale); }
.services svg { grid-row: span 2; width: 2.4rem; height: 2.4rem; color: var(--navy); }
.services strong { color: var(--link); font-size: 1.02rem; }
.services a:hover strong { text-decoration: underline; }
.services span { font-size: 0.9rem; color: var(--ink-2); }

.split { display: grid; gap: 1.2rem 2.5rem; align-items: center; }
@media (min-width: 820px) { .split { grid-template-columns: 1fr 1fr; } .split.is-flip > figure { order: 2; } }
.split figure { margin: 0; }
.split img { display: block; width: 100%; }
figcaption { font-size: 0.85rem; color: var(--ink-2); margin-top: 0.35rem; }

.cols3 { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .cols3 { grid-template-columns: repeat(3, 1fr); } }
.cols2 { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .cols2 { grid-template-columns: repeat(2, 1fr); } }
.tile { display: flex; flex-direction: column; border: 1px solid var(--line); background: #fff; }
.tile img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.tile div { padding: 1rem 1.1rem 1.2rem; }
.tile h3 a { color: var(--navy-dk); text-decoration: none; }
.tile h3 a:hover { text-decoration: underline; }
.tile p { color: var(--ink-2); font-size: 0.95rem; }

.waits { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); }
.waits th, .waits td { padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--line); text-align: left; }
.waits th { background: var(--alt); font-size: 0.85rem; }
.waits td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 700; }
.waits .is-long { color: var(--red); }
.waits caption { caption-side: bottom; text-align: left; padding-top: 0.4rem; font-size: 0.85rem; color: var(--ink-2); }

.news { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.news li { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.news time { display: block; font-size: 0.85rem; color: var(--ink-2); }
.news a { font-weight: 700; font-size: 1.05rem; }
.news p { margin: 0.25rem 0 0; color: var(--ink-2); }

/* Inner pages */
.crumbs { font-size: 0.88rem; padding: 0.8rem 0 0; color: var(--ink-2); }
.page-head { padding: 1rem 0 1.6rem; border-bottom: 1px solid var(--line); }
.page-head .lede { font-size: 1.1rem; color: var(--ink-2); max-width: 46rem; margin: 0; }
.page { display: grid; gap: 2rem; padding: 2rem 0 3rem; }
@media (min-width: 900px) { .page { grid-template-columns: 14rem minmax(0, 1fr); } .page.is-full { grid-template-columns: minmax(0, 1fr); } }
.toc { align-self: start; font-size: 0.93rem; }
@media (min-width: 900px) { .toc { position: sticky; top: 1rem; } }
.toc strong { display: block; padding-bottom: 0.4rem; border-bottom: 2px solid var(--navy); font-family: var(--serif); color: var(--navy-dk); }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li a { display: block; padding: 0.45rem 0.2rem; border-bottom: 1px solid var(--line); text-decoration: none; }
.toc li a:hover { background: var(--steel-pale); }
.article { min-width: 0; }
.article > section { padding-bottom: 1.8rem; margin-bottom: 1.8rem; border-bottom: 1px solid var(--line); scroll-margin-top: 1rem; }
.article > section:last-child { border-bottom: 0; }
.article ul, .article ol { padding-left: 1.3rem; margin: 0 0 0.9rem; }
.article li { margin-bottom: 0.3rem; }
.article figure { margin: 0 0 1rem; }
.article figure img { display: block; width: 100%; }

.facts { width: 100%; border-collapse: collapse; margin: 0 0 1rem; border: 1px solid var(--line); }
.facts th, .facts td { padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.facts thead th { background: var(--alt); font-size: 0.85rem; }
.facts tbody th { font-weight: 600; width: 40%; }
.facts td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap { overflow-x: auto; }

details.qa { border: 1px solid var(--line); border-top: 0; background: #fff; }
details.qa:first-of-type { border-top: 1px solid var(--line); }
details.qa summary { padding: 0.8rem 1rem; font-weight: 600; cursor: pointer; color: var(--navy-dk); }
details.qa summary:hover { background: var(--alt); }
details.qa[open] summary { border-bottom: 1px solid var(--line); }
details.qa div { padding: 0.8rem 1rem 0.4rem; }

.offices { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .offices { grid-template-columns: repeat(2, 1fr); } }
.office { border: 1px solid var(--line); }
.office img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.office div { padding: 1rem 1.1rem; }
.office dl { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.8rem; margin: 0.5rem 0 0; font-size: 0.93rem; }
.office dt { color: var(--ink-2); }
.office dd { margin: 0; }

.forms td:first-child { white-space: nowrap; font-weight: 700; }

.people { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .people { grid-template-columns: repeat(2, 1fr); } }
.person { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; align-items: start; }
.person img { width: 7rem; height: 7rem; object-fit: cover; }
.person p { font-size: 0.95rem; color: var(--ink-2); }

/* Practice test */
.quiz ol { list-style: none; padding: 0; margin: 0; counter-reset: q; }
.quiz > ol > li { counter-increment: q; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.quiz legend { font-weight: 700; padding: 0; margin-bottom: 0.4rem; }
.quiz legend::before { content: counter(q) ". "; }
.quiz fieldset { border: 0; margin: 0; padding: 0; }
.quiz label { display: flex; gap: 0.5rem; align-items: baseline; padding: 0.2rem 0; cursor: pointer; }
.quiz .why { display: none; margin: 0.4rem 0 0; font-size: 0.93rem; }
.quiz.is-done .why { display: block; }
.quiz li.is-right .why { color: var(--ok); }
.quiz li.is-wrong .why { color: var(--red); }
.quiz-score { margin-top: 1rem; font-weight: 700; }

.results { list-style: none; margin: 0; padding: 0; }
.results li { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.results a { font-weight: 700; font-size: 1.05rem; }
.results p { margin: 0.2rem 0 0; color: var(--ink-2); font-size: 0.95rem; }

/* Footer */
.foot { background: var(--navy-dk); color: #c9d5e2; padding: 2.2rem 0 1.5rem; font-size: 0.92rem; }
.foot-cols { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); padding-bottom: 1.5rem; border-bottom: 1px solid #2c4568; }
.foot h2 { color: #fff; font: 700 0.98rem var(--sans); margin-bottom: 0.5rem; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 0.3rem; }
.foot a { color: #fff; text-decoration: none; }
.foot a:hover { text-decoration: underline; color: #fff; }
.foot-base { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding-top: 1.2rem; }
.foot-base img { width: 3.2rem; padding: 0.2rem; background: #fff; border-radius: 50%; }
.foot-base small { flex: 1; min-width: 14rem; }

/* My DMV */
.my { padding: 1.4rem 0 2.5rem; }
.my-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.4rem 1rem; margin-bottom: 1rem; }
.my-top h1 { font-size: 1.6rem; }
.my-top .who { color: var(--ink-2); }
.tabs { display: flex; flex-wrap: wrap; border-bottom: 2px solid var(--navy); margin-bottom: 1.2rem; }
.tabs button { padding: 0.55rem 1rem; border: 0; background: none; color: var(--ink); font: 600 0.98rem var(--sans); cursor: pointer; }
.tabs button:hover { background: var(--alt); }
.tabs button[aria-selected="true"] { background: var(--navy); color: #fff; }
.tabs .count { margin-left: 0.4rem; padding: 0 0.35rem; background: var(--red); color: #fff; font-size: 0.78rem; border-radius: 2px; }
.my h2 { font-size: 1.3rem; margin-bottom: 0.7rem; }
.my h3 { font-size: 1.05rem; margin: 1.4rem 0 0.5rem; }
.msg { margin-bottom: 1rem; padding: 0.65rem 0.9rem; border: 1px solid var(--line); border-left: 4px solid var(--steel); background: var(--steel-pale); }
.msg.is-error { border-left-color: var(--red); background: var(--red-pale); border-color: #e7c4c0; }
.empty { color: var(--ink-2); padding: 0.6rem 0; }
.todo { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); }
.todo li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding: 0.7rem 0.9rem; border-top: 1px solid var(--line); }
.todo li:first-child { border-top: 0; }
.todo li.is-bad { border-left: 4px solid var(--red); }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.tbl th { padding: 0.5rem 0.75rem; background: var(--alt); border-bottom: 1px solid var(--line); text-align: left; font-size: 0.85rem; white-space: nowrap; }
.tbl td { padding: 0.6rem 0.75rem; border-bottom: 1px solid #e5e9ee; vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .plate { font-weight: 700; letter-spacing: 0.06em; white-space: nowrap; }
.tbl small { display: block; color: var(--ink-2); font-size: 0.82rem; }
.tbl ul { margin: 0; padding-left: 1.1rem; }
.acts { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tag { display: inline-block; padding: 0 0.4rem; border: 1px solid currentColor; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap; }
.tag.is-ok { color: var(--ok); }
.tag.is-bad { color: var(--red); }
.tag.is-warn { color: #7a5b00; }
.tag.is-muted { color: var(--ink-2); }
.card-row { display: grid; gap: 1.2rem 2rem; }
@media (min-width: 860px) { .card-row { grid-template-columns: 24rem minmax(0, 1fr); align-items: start; } }
.dl { position: relative; aspect-ratio: 85.6 / 54; padding: 0.9rem 1rem; border: 1px solid #a8b8ca; border-radius: 0.6rem; background: #f6f9fc; color: #14243a; overflow: hidden; font-size: 0.78rem; line-height: 1.3; }
.dl::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2.3rem; background: var(--navy); }
.dl-top { position: relative; display: flex; justify-content: space-between; align-items: center; color: #fff; font-weight: 700; letter-spacing: 0.06em; font-size: 0.82rem; margin-top: -0.35rem; }
.dl-top img { width: 1.7rem; height: 1.7rem; background: #fff; border-radius: 50%; }
.dl-body { position: relative; display: grid; grid-template-columns: 5.2rem 1fr; gap: 0.8rem; margin-top: 1.1rem; }
.dl-photo { aspect-ratio: 3 / 4; background: #c9d6e3; border: 1px solid #a8b8ca; display: grid; place-items: end center; overflow: hidden; }
.dl-photo span { width: 70%; height: 80%; background: #8ea4bb; border-radius: 45% 45% 0 0; }
.dl dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.05rem 0.5rem; }
.dl dt { color: #5a6b80; font-size: 0.68rem; letter-spacing: 0.04em; }
.dl dd { margin: 0; font-weight: 700; }
.dl .name { grid-column: 1 / -1; font-size: 1rem; margin-bottom: 0.2rem; }
.dl-stamp { position: absolute; right: 0.8rem; bottom: 0.6rem; padding: 0.1rem 0.4rem; border: 2px solid var(--red); color: var(--red); font-weight: 700; font-size: 0.75rem; transform: rotate(-6deg); }
.lic { list-style: none; margin: 0 0 1rem; padding: 0; border: 1px solid var(--line); }
.lic li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0.8rem; border-top: 1px solid var(--line); }
.lic li:first-child { border-top: 0; }
.record { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); }
.record li { padding: 0.7rem 0.9rem; border-top: 1px solid var(--line); }
.record li:first-child { border-top: 0; }
.record time { display: block; color: var(--ink-2); font-size: 0.82rem; }
.record p { overflow-wrap: anywhere; }
.my-teaser { display: grid; gap: 1.5rem; padding: 2rem 0 2.5rem; }
@media (min-width: 860px) { .my-teaser { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; } }
.my-teaser figure { margin: 0; }
.my-teaser img { display: block; width: 100%; height: auto; }
.my-teaser h1 { font-size: 1.9rem; line-height: 1.15; margin-bottom: 0.6rem; }
.my-teaser p, .my-teaser ul { color: var(--ink-2); margin: 0 0 0.8rem; }

@media (max-width: 640px) {
  .head-tools { width: 100%; }
  .head-tools .search { flex: 1; }
  .search input { width: 100%; }
  .nav .wrap { overflow-x: auto; flex-wrap: nowrap; }
  .nav a { white-space: nowrap; padding: 0.7rem 0.75rem; }
  .hero { min-height: 0; flex-direction: column; align-items: stretch; }
  .hero > img { position: static; height: 14rem; }
  .hero .wrap { padding: 0 0 1.5rem; margin-top: -2rem; }
}
