:root {
  --paper: #f6f2e8;
  --paper-2: #fffdf7;
  --ink: #16203a;
  --muted: #5b6377;
  --navy: #13213f;
  --red: #b3262e;
  --gold: #c9a24a;
  --line: #d9d1bd;
  --ok: #1f7a4d;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--sans); }
a { color: var(--navy); }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.govbar { background: #e9e3d3; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.govbar .wrap { display: flex; align-items: center; gap: 8px; padding-top: 6px; padding-bottom: 6px; }
.flaglet { width: 18px; height: 12px; flex: none; background: linear-gradient(var(--red) 0 33%, #fff 33% 66%, var(--red) 66%); box-shadow: inset 7px 0 0 var(--navy); border-radius: 1px; }

.masthead { background: var(--navy); color: #f4efe2; border-bottom: 4px solid var(--gold); }
.masthead .wrap { display: flex; align-items: center; gap: 16px; padding-top: 16px; padding-bottom: 16px; }
.seal { width: 78px; height: 78px; flex: none; }
.agency { margin: 0; font: 700 22px/1.2 var(--serif); letter-spacing: .3px; }
.dept { margin: 4px 0 0; font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; color: #d8cfb5; }

.hero { padding: 28px 0 8px; }
.docket { display: flex; flex-wrap: wrap; gap: 8px 18px; font: 13px/1.4 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.status { color: var(--ok); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.status i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; animation: pulse 1.6s ease-in-out infinite; }
.status.granted { color: var(--red); }
@keyframes pulse { 50% { opacity: .25; } }
h1 { font: 700 clamp(28px, 6vw, 44px)/1.12 var(--serif); margin: 14px 0 12px; letter-spacing: -.3px; text-wrap: balance; }
h1 a { color: var(--red); text-decoration: none; border-bottom: 2px solid rgba(179, 38, 46, .3); }
.lede { font-size: 19px; color: #2c3550; margin: 0 0 22px; max-width: 46em; }

.parties { display: flex; align-items: center; justify-content: center; gap: clamp(12px, 5vw, 40px); margin: 6px 0 24px; }
.parties figure { margin: 0; text-align: center; }
.parties img { width: clamp(92px, 24vw, 128px); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 4px solid var(--paper-2); box-shadow: 0 0 0 2px var(--gold), 0 6px 18px rgba(19, 33, 63, .18); margin: 0 auto 8px; }
.parties figcaption { font-size: 14px; color: var(--muted); }
.parties figcaption b { display: block; font: 700 12px/1.3 var(--mono); text-transform: uppercase; letter-spacing: 1.5px; color: var(--ink); }
.vs { font: italic 700 30px var(--serif); color: var(--red); }

.card { background: var(--paper-2); border: 1px solid var(--line); border-radius: 6px; padding: 20px; box-shadow: 0 1px 0 rgba(0, 0, 0, .03); }
.tally { border-top: 5px solid var(--navy); }
.count { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.count span { font: 700 clamp(44px, 12vw, 64px)/1 var(--serif); font-variant-numeric: tabular-nums; color: var(--navy); }
.count small { font-size: 17px; color: var(--muted); }
.bar { height: 14px; background: #ebe4d2; border-radius: 7px; overflow: hidden; margin: 14px 0 10px; }
.bar div { height: 100%; width: 0; background: linear-gradient(90deg, var(--red), #d2453c); border-radius: 7px; transition: width .8s ease; }
.goal { margin: 0; font-weight: 600; }
.meta { margin: 4px 0 0; font-size: 14px; color: var(--muted); }

.sign { margin: 22px 0; border-top: 5px solid var(--red); }
h2 { font: 700 24px/1.2 var(--serif); margin: 0 0 8px; }
.small { font-size: 15px; color: var(--muted); margin: 0 0 14px; }
.reasons { border: 0; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.reasons label { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; font-weight: 600; min-height: 48px; }
.reasons label:hover { border-color: #b8ad92; }
.reasons input { accent-color: var(--red); width: 18px; height: 18px; margin: 0; flex: none; }
.reasons label:has(input:checked) { border-color: var(--red); background: #fbf0ef; }
button, .btn-x { font: 700 17px var(--sans); border: 0; border-radius: 6px; cursor: pointer; min-height: 52px; padding: 0 22px; }
#submit { width: 100%; background: var(--red); color: #fff; letter-spacing: .3px; }
#submit:disabled { background: #c9bfae; cursor: not-allowed; }
#submit:not(:disabled):hover { background: #9c1f27; }
.result { margin: 12px 0 0; font-weight: 600; min-height: 1.5em; }
.result.ok { color: var(--ok); }
.result .seal-stamp { display: inline-block; border: 2px solid var(--ok); color: var(--ok); border-radius: 4px; padding: 0 6px; margin-right: 6px; font: 700 12px/1.6 var(--mono); text-transform: uppercase; letter-spacing: 1px; transform: rotate(-3deg); }
.share { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.btn-x { display: inline-flex; align-items: center; justify-content: center; background: #000; color: #fff; text-decoration: none; flex: 1 1 220px; }
.btn-ghost { background: transparent; border: 1.5px solid var(--navy); color: var(--navy); flex: 0 1 auto; }

.doc { padding: 26px 0 6px; border-top: 1px solid var(--line); margin-top: 18px; }
.whereas { padding-left: 1.3em; margin: 10px 0 0; font-family: var(--serif); font-size: 18px; }
.whereas li { margin: 0 0 10px; padding-left: 4px; }
.therefore { font-family: var(--serif); font-size: 18px; background: var(--paper-2); border-left: 4px solid var(--gold); padding: 14px 16px; margin: 16px 0 0; }

.exhibits { display: grid; gap: 22px; }
.exhibits h2 { margin-bottom: 0; }
.exhibit { margin: 0; background: var(--paper-2); border: 1px solid var(--line); border-radius: 6px; padding: 14px; position: relative; }
.exhibit .tag { display: inline-block; font: 700 12px/1 var(--mono); letter-spacing: 1.5px; text-transform: uppercase; background: var(--navy); color: #f4efe2; padding: 6px 10px; border-radius: 3px; margin-bottom: 12px; }
.exhibit img { margin: 0 auto; max-width: 420px; width: 100%; border-radius: 10px; }
.exhibit .summit { display: block; width: 100%; height: auto; border-radius: 4px; }
.exhibit figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; font-style: italic; }

.breakdown, .recent { list-style: none; padding: 0; margin: 10px 0 0; }
.breakdown li { margin: 0 0 10px; }
.breakdown .row { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; font-size: 15px; }
.breakdown .row span:last-child { font-variant-numeric: tabular-nums; color: var(--muted); }
.breakdown .mini { height: 8px; background: #ebe4d2; border-radius: 4px; overflow: hidden; margin-top: 4px; }
.breakdown .mini div { height: 100%; background: var(--navy); width: 0; transition: width .6s ease; }
.recent li { display: flex; gap: 10px; align-items: baseline; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.recent li b { font-family: var(--mono); font-size: 13px; color: var(--muted); flex: none; }
.recent li .when { margin-left: auto; color: var(--muted); font-size: 13px; flex: none; }
.recent li.empty { color: var(--muted); font-style: italic; border: 0; }

.response .pending { display: flex; gap: 12px; align-items: flex-start; }
.stamp { flex: none; border: 3px solid var(--red); color: var(--red); font: 700 15px/1 var(--mono); letter-spacing: 2px; text-transform: uppercase; padding: 8px 10px; border-radius: 4px; transform: rotate(-4deg); }

.fine { padding: 26px 0 30px; border-top: 1px solid var(--line); margin-top: 18px; font-size: 14px; color: var(--muted); }
.fine h2 { font-size: 16px; font-family: var(--sans); text-transform: uppercase; letter-spacing: 1.5px; color: var(--ink); }
.fine p { margin: 0 0 8px; }

.foot { background: var(--navy); color: #d8cfb5; font-size: 13px; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding-top: 16px; padding-bottom: 20px; }
.foot a { color: #f4efe2; }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .masthead .wrap { gap: 12px; }
  .seal { width: 60px; height: 60px; }
  .agency { font-size: 18px; }
  .dept { font-size: 11px; letter-spacing: .8px; }
  .lede { font-size: 17px; }
  .whereas, .therefore { font-size: 17px; }
  .card { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
