:root {
  color-scheme: dark;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #f7fafc;
  background: #0b192b;
  font-size: 16px;
  line-height: 1.5;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 100% 0%, #d9b25b12, transparent 48%),
    radial-gradient(ellipse at 0% 100%, #c5273820, transparent 52%),
    linear-gradient(145deg, #172f49 0%, #0b192b 68%);
}
main { max-width: 1088px; margin: auto; padding: 28px 28px 24px; }
h1, h2, p { margin: 0; }
.heading { text-align: center; margin-bottom: 26px; }
.agency {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: .875rem;
  letter-spacing: .04em;
  color: #cfdae5;
}
.department-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  background: #fff;
  border-radius: 50%;
  flex-shrink: 0;
}
h1 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 650; line-height: 1.2; letter-spacing: -.035em; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
  min-width: 0;
  padding: 18px 16px 22px;
  background: #fff;
  color: #102a40;
  border: 2px solid transparent;
  border-radius: 24px;
  box-shadow: 0 8px 24px #030c1928;
  text-decoration: none;
  -webkit-tap-highlight-color: #d9b25b50;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.tile:focus-visible { outline: 3px solid #f0c867; outline-offset: 5px; }
.tile:active { transform: scale(.985); }
.tile-head { width: 100%; height: 108px; display: flex; align-items: center; justify-content: center; margin-bottom: 5px; }
.mark {
  width: 104px;
  height: 104px;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
}
.mark img { display: block; width: 92px; height: 92px; max-width: 100%; object-fit: contain; }
.portal-mark { width: 144px; height: 108px; }
.portal-mark img { width: 144px; height: 108px; }
.wordmark { width: 172px; height: 92px; padding: 14px; background: #102a40; border-radius: 16px; }
.wordmark img { width: 144px; height: 64px; }
h2 { font-size: 1.125rem; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.tile p { color: #536478; font-size: 1rem; line-height: 1.4; }
footer {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: #becbda;
  font-size: .875rem;
}
.preview { color: #e5c883; }
.logo-error { padding: 8px; font-size: .875rem; color: #fff; background: #102a40; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (hover: hover) {
  .tile:hover { transform: translateY(-4px); box-shadow: 0 15px 30px #02091650; border-color: #d9b25b; }
}
@media (max-width: 850px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) {
  main { padding: 24px 18px; }
  .heading { margin-bottom: 22px; }
  .agency { letter-spacing: 0; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .tile { padding: 16px 18px 20px; }
  footer { text-align: center; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } .tile:hover, .tile:active { transform: none; } }
