@font-face { font-family: "Oswald"; src: url(/fonts/oswald.woff2) format("woff2"); font-weight: 200 700; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url(/fonts/public-sans.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Bebas Neue"; src: url(/fonts/bebas-neue.woff2) format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --navy: #0A2A5E; --navy-2: #12397a; --red: #C8102E; --red-2: #a50d26; --blue: #1F4FA3;
  --bg: #ffffff; --surface: #f4f6fa; --card: #ffffff; --ink: #0d1730; --muted: #5b6579; --line: #d8deea;
  --plate-bg: #ffffff; --plate-ink: #0A2A5E; --focus: #1F4FA3; --shadow: 0 1px 2px rgba(10,42,94,.08), 0 4px 18px rgba(10,42,94,.08);
  --accent-text: var(--navy); --danger: #C8102E;
  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Oswald", "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --plate: "Bebas Neue", "Oswald", Impact, sans-serif;
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #0a1120; --surface: #101a2e; --card: #121d33; --ink: #e7ecf6; --muted: #9ba7bf; --line: #24324f;
  --plate-bg: #eef2f8; --plate-ink: #0A2A5E; --focus: #8fb3ff; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 22px rgba(0,0,0,.35);
  --accent-text: #9cbcff; --danger: #ff5a6a; --red: #e0283f;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); min-height: 100vh; display: flex; flex-direction: column; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); }
img { max-width: 100%; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* gov-style banner */
.gov-banner { display: flex; align-items: center; gap: 10px; font-size: 12.5px; padding: 6px 18px; background: var(--surface); color: var(--muted); border-bottom: 1px solid var(--line); }
.gov-banner strong { color: var(--ink); font-weight: 600; }
.mini-flag { width: 20px; height: 13px; flex: none; border-radius: 2px; background:
  linear-gradient(var(--navy) 0 0) 0 0 / 9px 7px no-repeat,
  repeating-linear-gradient(#C8102E 0 1.86px, #fff 1.86px 3.72px); box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.stripe { height: 5px; background: linear-gradient(90deg, var(--red) 0 33.3%, #fff 33.3% 66.6%, var(--navy) 66.6%); }
html[data-theme="dark"] .stripe { background: linear-gradient(90deg, var(--red) 0 33.3%, #dfe6f3 33.3% 66.6%, #2a5bc0 66.6%); }

/* headers */
.home-header, .site-header { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 20px; }
.site-header { justify-content: space-between; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 20; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 34px; width: auto; display: block; }
.logo-dark { display: none !important; }
html[data-theme="dark"] .logo-light { display: none !important; }
html[data-theme="dark"] .logo-dark { display: block !important; }
.account { display: flex; align-items: center; gap: 10px; position: relative; }

.btn { font: 600 14px/1 var(--font); border-radius: 999px; padding: 10px 16px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; letter-spacing: .2px; }
.btn-primary { background: var(--navy); color: #fff; }
html[data-theme="dark"] .btn-primary { background: #2a5bc0; }
.btn-primary:hover { filter: brightness(1.12); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-2); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--surface); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--muted); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.avatar { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--red); background: var(--navy); color: #fff; font: 600 17px/1 var(--display); cursor: pointer; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg) inset; }
.menu { position: absolute; right: 0; top: 50px; width: 250px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; z-index: 40; }
.menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-name { font-weight: 700; }
.menu-email { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 9px; font: 500 14.5px var(--font); color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--surface); }
.menu .danger { color: var(--danger); }

/* home */
.home-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 20px 64px; }
.home-logo { width: min(560px, 88vw); height: auto; margin-bottom: 6px; }
.home-tag { font: 500 15px var(--display); letter-spacing: 3.5px; color: var(--muted); text-transform: uppercase; margin: 0 0 34px; text-align: center; }
.search-wrap { width: min(900px, 100%); }
.search-row { display: flex; align-items: center; gap: 22px; }
.mic { flex: none; width: 128px; height: 128px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 50% 38%, #2b5cb8, var(--navy) 70%); color: #fff;
  box-shadow: 0 0 0 6px var(--bg), 0 0 0 10px var(--red), 0 10px 28px rgba(10,42,94,.35); transition: transform .15s ease; }
.mic:hover { transform: scale(1.03); }
.mic svg { width: 54px; height: 54px; }
.mic .mic-label { position: absolute; bottom: 20px; font: 600 11px var(--display); letter-spacing: 2px; opacity: .85; }
.mic.listening { background: radial-gradient(circle at 50% 38%, #ff4057, var(--red) 70%); box-shadow: 0 0 0 6px var(--bg), 0 0 0 10px var(--navy), 0 0 0 22px rgba(200,16,46,.18); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px var(--bg), 0 0 0 10px var(--navy), 0 0 0 30px rgba(200,16,46,.05); } }
.bar { flex: 1; min-width: 0; height: 62px; display: flex; align-items: center; background: var(--card); border: 2px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); padding: 0 6px 0 8px; position: relative; }
.bar:focus-within { border-color: var(--navy); }
html[data-theme="dark"] .bar:focus-within { border-color: #4f7fdc; }
.plate-input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font: 400 30px/1 var(--plate); letter-spacing: 5px; padding: 4px 10px 0; text-transform: uppercase; }
.plate-input::placeholder { color: var(--muted); letter-spacing: 1.5px; font: 400 17px var(--font); text-transform: none; }
.counter { font: 600 12px var(--display); color: var(--muted); padding: 0 8px; letter-spacing: 1px; white-space: nowrap; }
.counter.full { color: var(--red); }

/* state picker */
.state-picker { position: relative; flex: none; }
.state-btn { height: 46px; border: 0; background: var(--surface); color: var(--ink); border-radius: 999px; padding: 0 14px 0 16px; display: flex; align-items: center; gap: 8px; cursor: pointer; font: 600 14px var(--display); letter-spacing: 1.5px; text-transform: uppercase; transition: padding .2s ease, width .2s ease; }
.state-btn:hover { background: var(--line); }
.state-btn .caret { width: 10px; height: 10px; opacity: .7; }
.state-btn.has-flag { padding: 0 6px; background: transparent; }
.state-btn.has-flag:hover { background: var(--surface); }
.state-btn img { width: 54px; height: 36px; object-fit: cover; border-radius: 5px; box-shadow: 0 0 0 1px rgba(0,0,0,.18); display: block; }
.state-pop { position: absolute; left: 0; top: 56px; width: 290px; max-height: 380px; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); z-index: 30; overflow: hidden; }
.state-pop input { margin: 8px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; font: 15px var(--font); background: var(--bg); color: var(--ink); }
.state-list { list-style: none; margin: 0; padding: 0 6px 6px; overflow-y: auto; }
.state-list li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 14.5px; }
.state-list li img { width: 30px; height: 20px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.state-list li .abbr { margin-left: auto; font: 600 12px var(--display); color: var(--muted); letter-spacing: 1px; }
.state-list li[aria-selected="true"], .state-list li.active { background: var(--surface); }

/* mode toggle */
.mode-toggle { flex: none; display: flex; background: var(--surface); border-radius: 999px; padding: 4px; gap: 2px; margin-left: 4px; }
.mode-toggle button { border: 0; background: transparent; color: var(--muted); font: 600 15px var(--display); letter-spacing: 2px; text-transform: uppercase; padding: 0 18px; height: 44px; border-radius: 999px; cursor: pointer; display: flex; align-items: center; gap: 7px; }
.mode-toggle button svg { width: 17px; height: 17px; }
.mode-toggle button[aria-pressed="true"][data-mode="search"] { background: var(--navy); color: #fff; box-shadow: 0 2px 8px rgba(10,42,94,.35); }
html[data-theme="dark"] .mode-toggle button[aria-pressed="true"][data-mode="search"] { background: #2a5bc0; }
.mode-toggle button[aria-pressed="true"][data-mode="post"] { background: var(--red); color: #fff; box-shadow: 0 2px 8px rgba(200,16,46,.35); }

.compose { margin: 14px 0 0 150px; background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); }
.compose textarea { width: 100%; border: 0; outline: 0; resize: vertical; min-height: 84px; font: 16px/1.45 var(--font); background: transparent; color: var(--ink); }
.compose-foot { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); gap: 12px; }
.under-bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin: 26px 0 0 150px; }
.under-bar .btn { padding: 12px 20px; }
.hint { text-align: center; color: var(--muted); font-size: 13px; margin: 14px 0 0 150px; min-height: 20px; }
.hint.err { color: var(--danger); font-weight: 600; }
.browse-link { font: 600 15px var(--display); letter-spacing: 2px; text-transform: uppercase; text-decoration: none; padding: 10px 14px; border-radius: 10px; color: var(--accent-text); display: inline-flex; align-items: center; gap: 6px; }
.browse-link:hover { background: var(--surface); }
.voice-heard { font-style: italic; }

/* inner pages */
.inner-main { flex: 1; width: 100%; max-width: 860px; margin: 0 auto; padding: 32px 20px 64px; }
.inner-main.wide { max-width: 1040px; }
.page-title { font: 600 34px/1.15 var(--display); letter-spacing: 1px; text-transform: uppercase; color: var(--accent-text); margin: 0 0 6px; }
.page-sub { color: var(--muted); margin: 0 0 26px; font-size: 16px; }
.eyebrow { font: 600 12px var(--display); letter-spacing: 3px; text-transform: uppercase; color: var(--red); margin-bottom: 6px; }
.doc h2 { font: 600 21px var(--display); letter-spacing: .6px; text-transform: uppercase; margin: 30px 0 8px; color: var(--accent-text); }
.doc p, .doc li { font-size: 16px; }
.doc li { margin: 4px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
.card + .card { margin-top: 18px; }
.notice { border-left: 5px solid var(--red); background: var(--surface); padding: 14px 16px; border-radius: 8px; margin: 0 0 22px; font-size: 14.5px; }
.notice.blue { border-left-color: var(--navy); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.seal-row { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.seal-row img { width: 84px; height: 84px; }
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-row label { font: 600 13px var(--display); letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.form-row input, .form-row select, .form-row textarea { font: 16px var(--font); padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); }
.form-row textarea { min-height: 90px; resize: vertical; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--navy); outline: 0; }
.help { font-size: 13px; color: var(--muted); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.switch:last-of-type { border-bottom: 0; }
.switch .label strong { display: block; }
.switch .label span { color: var(--muted); font-size: 14px; }
.toggle { appearance: none; width: 52px; height: 30px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; flex: none; transition: background .2s; border: 0; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: left .2s; }
.toggle:checked { background: var(--navy); }
html[data-theme="dark"] .toggle:checked { background: #2a5bc0; }
.toggle:checked::after { left: 25px; }

/* login */
.login-card { max-width: 440px; margin: 10px auto 0; text-align: center; }
.login-card .seal { width: 92px; height: 92px; margin: 0 auto 10px; display: block; }
.login-card h1 { font: 600 28px var(--display); letter-spacing: 1.5px; text-transform: uppercase; margin: 0 0 4px; color: var(--accent-text); }
.login-card p { color: var(--muted); margin: 0 0 20px; }
.login-card .form-row { text-align: left; }
.code-boxes { display: flex; justify-content: center; gap: 8px; margin: 6px 0 18px; }
.code-boxes input { width: 50px; height: 62px; text-align: center; font: 400 34px var(--plate); border: 2px solid var(--line); border-radius: 10px; background: var(--plate-bg); color: var(--plate-ink); }
.code-boxes input:focus { border-color: var(--red); outline: 0; }
.login-card .btn { width: 100%; justify-content: center; padding: 14px; font-size: 15px; }
.linkish { background: none; border: 0; color: var(--accent-text); cursor: pointer; font: 600 14px var(--font); padding: 6px; text-decoration: underline; }
.form-msg { min-height: 22px; font-size: 14px; margin: 10px 0 0; }
.form-msg.err { color: var(--danger); font-weight: 600; }
.small-print { font-size: 12.5px; color: var(--muted); margin-top: 18px; }

/* plates + feed */
.plate { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; background: var(--plate-bg); color: var(--plate-ink); border: 3px solid var(--navy); border-radius: 10px; padding: 3px 14px 4px; min-width: 132px; position: relative; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3.5px rgba(200,16,46,.6); }
.plate .pst { font: 600 10px var(--display); letter-spacing: 2.5px; text-transform: uppercase; color: var(--red); line-height: 1.3; }
.plate .pnum { font: 400 30px/1 var(--plate); letter-spacing: 4px; white-space: nowrap; }
.plate.big { min-width: 260px; padding: 8px 26px 10px; border-width: 5px; border-radius: 16px; }
.plate.big .pst { font-size: 14px; }
.plate.big .pnum { font-size: 64px; letter-spacing: 8px; }
.feed { display: flex; flex-direction: column; gap: 14px; }
.post { display: grid; grid-template-columns: auto 1fr; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: 13.5px; color: var(--muted); }
.post-meta .who { color: var(--ink); font-weight: 700; font-size: 15px; }
.post-body { margin: 6px 0 8px; font-size: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-actions { display: flex; gap: 6px; }
.post-actions button, .post-actions a { font: 600 13px var(--font); border: 0; background: none; color: var(--muted); cursor: pointer; padding: 6px 8px; border-radius: 8px; text-decoration: none; display: inline-flex; gap: 5px; align-items: center; }
.post-actions button:hover, .post-actions a:hover { background: var(--surface); color: var(--ink); }
.post-actions .report:hover { color: var(--danger); }
.post-actions svg { width: 15px; height: 15px; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); border: 2px dashed var(--line); border-radius: 16px; }
.empty strong { display: block; color: var(--ink); font: 600 20px var(--display); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.result-head { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-bottom: 22px; }
.result-head .stats { color: var(--muted); }
.result-head .stats strong { color: var(--ink); font: 600 26px var(--display); display: block; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar select { font: 15px var(--font); padding: 9px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); }
.mini-search { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; background: var(--surface); padding: 12px; border-radius: 14px; margin-bottom: 22px; }
.mini-search .bar { height: 54px; box-shadow: none; }
.mini-search .plate-input { font-size: 26px; }

dialog { border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); padding: 22px; width: min(440px, 92vw); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(5,12,28,.55); }
dialog h2 { font: 600 22px var(--display); text-transform: uppercase; letter-spacing: 1px; margin: 0 0 8px; }
.radio-list label { display: flex; gap: 10px; align-items: center; padding: 8px 0; font-size: 15px; cursor: pointer; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); z-index: 60; font-weight: 600; max-width: 90vw; }
.toast.err { background: var(--red); }

/* footer (Google layout) */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); font-size: 14px; }
.footer-top { padding: 13px 26px; border-bottom: 1px solid var(--line); color: var(--muted); display: flex; align-items: center; gap: 10px; }
.stripe-dot { width: 26px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--red) 0 33%, #fff 33% 66%, var(--navy) 66%); box-shadow: 0 0 0 1px var(--line); }
.footer-links { display: flex; justify-content: space-between; flex-wrap: wrap; padding: 4px 14px; }
.footer-links nav { display: flex; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; padding: 12px 12px; }
.footer-links a:hover { text-decoration: underline; color: var(--ink); }

@media (max-width: 760px) {
  .gov-banner { font-size: 11.5px; padding: 6px 12px; }
  .search-row { flex-direction: column; gap: 22px; }
  .mic { width: 124px; height: 124px; }
  .bar { width: 100%; height: 58px; }
  .plate-input { font-size: 25px; letter-spacing: 3px; padding: 4px 6px 0; }
  .mode-toggle button { padding: 0 11px; letter-spacing: 1px; font-size: 13.5px; height: 42px; }
  .mode-toggle button svg { display: none; }
  .counter { display: none; }
  .compose, .under-bar, .hint { margin-left: 0; }
  .home-tag { letter-spacing: 2px; font-size: 13px; margin-bottom: 26px; }
  .page-title { font-size: 28px; }
  .grid-2 { grid-template-columns: 1fr; }
  .post { grid-template-columns: 1fr; }
  .plate.big .pnum { font-size: 48px; }
  .footer-links { justify-content: center; }
  .footer-links nav { justify-content: center; }
  .footer-top { justify-content: center; }
  .site-header .btn-ghost { display: none; }
  .brand img { height: 28px; }
  .state-btn { padding: 0 10px; font-size: 12.5px; letter-spacing: .8px; }
  .state-btn img { width: 46px; height: 31px; }
  .state-pop { width: min(300px, 86vw); }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.actions.center { justify-content: center; margin-top: 18px; }
.spacer { height: 18px; }
.card-title { margin: 0 0 6px; font: 600 20px var(--display); text-transform: uppercase; letter-spacing: 1px; color: var(--accent-text); }
.switch.wrap { flex-wrap: wrap; }
.form-row.tight { margin: 0; min-width: 240px; }
.doc .card h2 { margin-top: 0; }
.empty .plate { margin-bottom: 12px; }
code { background: var(--surface); padding: 1px 6px; border-radius: 5px; font-size: .92em; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn { white-space: nowrap; }
.stripe { box-shadow: 0 1px 0 var(--line); }
.post { grid-template-columns: 156px 1fr; }
.post > a { display: block; }
.post > a .plate { width: 100%; min-width: 0; padding-left: 6px; padding-right: 6px; }
.post > a .plate .pnum { font-size: 27px; letter-spacing: 3px; }
.brand img { height: 40px; }
@media (max-width: 760px) { .post { grid-template-columns: 1fr; } .post > a .plate { width: auto; min-width: 150px; } .brand img { height: 32px; } }
