:root {
  color-scheme: light;
  --ink: #10233b;
  --muted: #526476;
  --subtle: #6d7f90;
  --line: #d7e0e8;
  --line-soft: #e6ecf1;
  --paper: #ffffff;
  --background: #f3f6f8;
  --surface: #f7f9fb;
  --accent: #f2a71b;
  --navy: #102b49;
  --link: #1d67b3;
  --green: #0a826c;
  --green-bg: #e6f6f0;
  --green-line: #cce9df;
  --amber: #b37412;
  --amber-bg: #fff8eb;
  --amber-line: #eedbb8;
  --blue-bg: #edf3f8;
  --map-water: #d6e6f2;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--background);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, dl, dd, form {
  margin: 0;
}

button, input, select {
  font: inherit;
}

button, a, input, select {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.6;
}

a {
  color: var(--link);
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

[hidden] {
  display: none !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: -1000px;
  left: 16px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--accent);
  border-radius: 4px;
  font-weight: 600;
}

.skip-link:focus {
  top: 10px;
}

/* Header */
.frame {
  width: min(1540px, calc(100% - 48px));
  margin-inline: auto;
}

.header {
  background: var(--paper);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.bar {
  min-height: 68px;
  width: min(1540px, calc(100% - 48px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo {
  display: block;
  width: 156px;
  height: 42px;
  object-fit: cover;
  object-position: center;
}

.header-nav {
  display: inline-flex;
  align-items: center;
  gap: 20px;
}

.portal-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 6px 0;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.14s, border-color 0.14s;
}

.portal-name:hover {
  color: var(--ink);
}

.portal-name[aria-current="page"] {
  color: var(--link);
  border-bottom-color: var(--accent);
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.account-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-contact {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 13.5px;
  font-weight: 500;
  color: #30465e;
  text-decoration: none;
  white-space: nowrap;
}

.header-contact:hover {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.account-email,
.secure-caption {
  color: var(--muted);
  font-size: 13.5px;
}

.sign-out {
  min-height: 38px;
  padding: 7px 14px;
  border: 1px solid #c1cdd8;
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.sign-out:hover {
  background: var(--surface);
  border-color: var(--link);
  color: var(--link);
}

/* Main Content & Page Headings */
.content {
  padding: 20px 0 24px;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 16px;
}

.eyebrow {
  font-size: 11.5px;
  line-height: 1.4;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 4px;
}

h1 {
  font-size: clamp(1.6rem, 2.2vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 680;
  text-wrap: balance;
}

h2 {
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 650;
}

h3 {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 640;
}

.page-description {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

.heading-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.update-time {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

/* Buttons */
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  background: var(--navy);
  color: #fff;
  border: 1px solid var(--navy);
  border-radius: 6px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.button svg {
  width: 15px;
  height: 15px;
}

.button:hover {
  background: var(--link);
  border-color: var(--link);
}

.button-secondary {
  background: var(--paper);
  color: var(--navy);
  border-color: #c3cfd9;
}

.button-secondary:hover {
  background: #f5f8fb;
  border-color: var(--link);
  color: var(--link);
}

.button-compact {
  min-height: 36px;
  font-size: 13.5px;
  padding: 7px 13px;
}

.text-button {
  border: 0;
  background: none;
  text-decoration: none;
  color: var(--link);
  font-size: 13.5px;
  font-weight: 600;
  padding: 4px 2px;
}

.text-button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Shared Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 4px;
  line-height: 1.3;
  font-weight: 650;
  white-space: nowrap;
}

.transit {
  background: var(--green-bg);
  color: #0b6e5c;
}

.scheduled {
  background: #eef2f8;
  color: #425a77;
}

/* Panels, Access & Message Pages */
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(16, 35, 59, 0.03);
}

.access {
  width: min(100%, 520px);
  margin: 7vh auto;
  padding: 40px;
  border-top: 3px solid var(--accent);
}

.access h1 {
  font-size: clamp(1.85rem, 3vw, 2.5rem);
  line-height: 1.12;
}

.access p {
  font-size: 15px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.65;
}

.access > .eyebrow {
  margin-bottom: 16px;
}

.access > .badge {
  margin-bottom: 14px;
}

.access .account {
  font-weight: 600;
  color: var(--ink);
}

.access .button {
  width: 100%;
  min-height: 48px;
  margin-top: 24px;
}

.enrollment {
  margin-top: 22px;
}

.enrollment label {
  font-size: 14px;
  font-weight: 650;
  display: block;
  margin-bottom: 7px;
}

.enrollment input:not([type="hidden"]) {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #b8c8d5;
  border-radius: 6px;
  color: var(--ink);
}

.enrollment .error {
  color: #a14836;
  margin-bottom: 12px;
  font-weight: 500;
}

/* Shared Responsive Layout */
@media (max-width: 1200px) {
  .frame,
  .bar {
    width: calc(100% - 36px);
  }
  .account-email {
    display: none;
  }
}

@media (max-width: 900px) {
  .frame,
  .bar {
    width: calc(100% - 28px);
  }
  .header-contact,
  .secure-caption {
    display: none;
  }
  .content {
    padding-top: 16px;
  }
  .update-time {
    display: none;
  }
}

@media (max-width: 560px) {
  .bar {
    flex-wrap: wrap;
    column-gap: 12px;
    row-gap: 0;
    padding-block: 10px 0;
  }
  .brand-logo {
    width: 136px;
    height: 37px;
  }
  .account-tools {
    order: 2;
    margin-left: auto;
  }
  .header-nav {
    order: 3;
    flex-basis: 100%;
    margin-top: 6px;
  }
  .portal-name {
    min-height: 34px;
    padding: 4px 0 7px;
  }
  .heading-tools {
    width: 100%;
  }
  .heading-tools .button {
    width: 100%;
  }
  .access {
    padding: 28px 22px;
    margin: 4vh auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
