:root {
  --ink: #17212f;
  --muted: #5d6878;
  --line: #d7dde6;
  --surface: #ffffff;
  --soft: #f3f6fa;
  --navy: #173a63;
  --blue: #2564a9;
  --teal: #087c7a;
  --gold: #bb7a17;
  --green: #287447;
  --danger: #b42318;
  --shadow: 0 14px 32px rgba(23, 33, 47, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: Arial, "Helvetica Neue", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-strip {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px clamp(16px, 4vw, 48px);
  color: #ffffff;
  background: var(--navy);
  font-size: 13px;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding: 12px clamp(16px, 4vw, 48px);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  font-size: 24px;
  font-weight: 700;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 22px;
  letter-spacing: 0;
}

.brand small {
  color: var(--muted);
  font-size: 13px;
}

.nav-login,
.primary-action,
.secondary-action,
.submit-button,
.mobile-view-button,
.copy-mobile-url {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
}

.nav-login,
.primary-action,
.submit-button,
.copy-mobile-url {
  color: #ffffff;
  background: var(--blue);
}

.nav-login:hover,
.primary-action:hover,
.submit-button:hover,
.copy-mobile-url:hover {
  background: #1b518b;
}

.nav-login.subtle,
.secondary-action,
.mobile-view-button {
  color: var(--blue);
  background: #ffffff;
  border-color: var(--line);
}

.nav-login.subtle:hover,
.secondary-action:hover,
.mobile-view-button:hover {
  background: #eef5fb;
}

.mobile-view-button,
.mobile-action,
.copy-mobile-url {
  cursor: pointer;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 28px;
  align-items: stretch;
  padding: clamp(28px, 6vw, 68px) clamp(16px, 4vw, 48px);
  background: linear-gradient(120deg, rgba(23, 58, 99, 0.98), rgba(8, 124, 122, 0.9));
  color: #ffffff;
}

.hero-content {
  max-width: 840px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-hero .eyebrow,
.login-info .eyebrow {
  color: #ffd27c;
}

.home-hero h1,
.login-info h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-copy,
.login-info p {
  max-width: 720px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-panel {
  display: grid;
  gap: 12px;
  align-content: center;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
}

.hero-panel div {
  padding: 16px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.16);
}

.hero-panel strong,
.hero-panel span {
  display: block;
}

.metric {
  font-size: 28px;
  font-weight: 800;
}

.service-band,
.access-band {
  padding: 42px clamp(16px, 4vw, 48px);
  background: #ffffff;
}

.access-band {
  border-top: 1px solid var(--line);
  background: #f8fafc;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 20px;
}

.section-heading h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.service-item {
  min-height: 188px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 34px;
  margin-bottom: 14px;
  border-radius: 5px;
  color: #ffffff;
  background: var(--teal);
  font-weight: 800;
}

.service-item h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.service-item p {
  margin: 0;
  color: var(--muted);
}

.role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.role-list span {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  font-weight: 700;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px clamp(16px, 4vw, 48px);
  color: #ffffff;
  background: #0f2237;
  font-size: 14px;
}

.login-page {
  min-height: 100vh;
  background: #eef3f8;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 28px;
  align-items: center;
  min-height: calc(100vh - 116px);
  padding: clamp(22px, 5vw, 58px) clamp(16px, 4vw, 48px);
  background:
    linear-gradient(110deg, rgba(23, 58, 99, 0.96) 0%, rgba(23, 58, 99, 0.9) 54%, rgba(238, 243, 248, 1) 54%);
}

.login-info {
  color: #ffffff;
}

.login-card {
  width: 100%;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.login-card h2 {
  margin: 0 0 22px;
  font-size: 26px;
}

.login-card label:not(.check-label) {
  display: block;
  margin: 14px 0 6px;
  font-weight: 700;
}

.login-card input[type="text"],
.login-card input[type="password"] {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #bdc7d4;
  border-radius: 6px;
  background: #ffffff;
}

.login-card input:focus,
.jurisdiction-bar select:focus {
  outline: 3px solid rgba(37, 100, 169, 0.2);
  border-color: var(--blue);
}

.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 14px 0 18px;
}

.check-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.submit-button {
  width: 100%;
  border: 0;
  cursor: pointer;
}

.form-message {
  min-height: 20px;
  margin-top: 12px;
  color: var(--danger);
  font-size: 14px;
  text-align: center;
}

.app-page {
  min-height: 100vh;
  background: #eef3f8;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(23, 33, 47, 0.07);
}

.app-topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 68px;
  padding: 10px clamp(12px, 3vw, 32px);
  border-top: 5px solid var(--navy);
}

.home-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 6px;
  color: #ffffff;
  background: var(--teal);
  text-decoration: none;
  font-size: 24px;
  font-weight: 800;
}

.app-title {
  min-width: 0;
  text-align: center;
}

.app-title strong,
.app-title span {
  display: block;
}

.app-title strong {
  font-size: 21px;
}

.app-title span {
  color: var(--muted);
  font-size: 13px;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.account-actions a,
.account-actions button {
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--navy);
  background: #ffffff;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
}

.account-actions a:hover,
.account-actions button:hover {
  background: #edf5fb;
}

.jurisdiction-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 10px;
  padding: 12px clamp(12px, 3vw, 32px);
  background: #f8fafc;
}

.jurisdiction-bar label {
  min-width: 0;
}

.jurisdiction-bar span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.jurisdiction-bar select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #bdc7d4;
  border-radius: 6px;
  background: #ffffff;
}

.jurisdiction-bar select:disabled {
  color: #3f4b5c;
  background: #e8edf3;
}

.dashboard-main {
  padding: 14px clamp(12px, 3vw, 32px) 42px;
}

.menu-board {
  position: relative;
  z-index: 6;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  width: 100%;
  border: 1px solid #0f2c4e;
  border-radius: 6px;
  background: var(--navy);
  box-shadow: 0 8px 18px rgba(23, 33, 47, 0.08);
}

.menu-group {
  position: relative;
  flex: 1 1 auto;
  min-width: max-content;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  box-shadow: none;
}

.menu-group:last-child {
  border-right: 0;
}

.menu-heading {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: 0;
  color: #ffffff;
  background: transparent;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.menu-heading::after {
  content: "▾";
  margin-left: 6px;
  font-size: 10px;
}

.single .menu-heading::after {
  content: "";
  margin-left: 0;
}

.menu-group:hover .menu-heading,
.menu-group:focus-within .menu-heading,
.menu-group.is-open .menu-heading,
.link-heading:hover {
  background: var(--teal);
}

.menu-options {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  min-width: 260px;
  gap: 0;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 0 0 6px 6px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.menu-group:hover .menu-options,
.menu-group:focus-within .menu-options,
.menu-group.is-open .menu-options {
  display: grid;
}

.menu-options a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 9px 12px;
  color: var(--ink);
  background: #ffffff;
  text-decoration: none;
  white-space: nowrap;
  font-size: 13px;
  border-top: 1px solid #edf1f5;
}

.menu-options a:hover {
  color: #ffffff;
  background: var(--blue);
}

.register-grid {
  min-width: 520px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.single .menu-heading {
  border-radius: 0;
}

.profile-dialog {
  width: min(520px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

.mobile-dialog {
  width: min(560px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

.mobile-dialog::backdrop {
  background: rgba(15, 34, 55, 0.48);
}

.mobile-dialog-body {
  padding: 18px;
}

.mobile-dialog-body p {
  margin: 0 0 12px;
  color: var(--muted);
}

.mobile-url {
  display: block;
  margin: 8px 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--navy);
  background: #f8fafc;
  overflow-wrap: anywhere;
  text-decoration: none;
  font-weight: 800;
}

.copy-mobile-url {
  width: 100%;
  border: 0;
}

.mobile-note {
  margin-top: 12px;
  font-size: 13px;
}

.profile-dialog::backdrop {
  background: rgba(15, 34, 55, 0.48);
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  color: #ffffff;
  background: var(--navy);
}

.dialog-head h2 {
  margin: 0;
  font-size: 20px;
}

.dialog-head button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 6px;
  color: #ffffff;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
}

.profile-dialog dl {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0;
  margin: 0;
  padding: 14px 18px 18px;
}

.profile-dialog dt,
.profile-dialog dd {
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.profile-dialog dt {
  color: var(--muted);
  font-weight: 700;
}

.status-updated {
  background: #ffe066;
  transition: background 0.7s;
}

@media (max-width: 980px) {
  .home-hero,
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-shell {
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy) 42%, #eef3f8 42%);
  }

  .service-grid,
  .menu-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .jurisdiction-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .header-strip,
  .site-footer,
  .main-nav,
  .app-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-strip,
  .site-footer {
    display: grid;
  }

  .main-nav {
    align-items: stretch;
  }

  .nav-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .nav-login {
    width: 100%;
  }

  .home-hero h1,
  .login-info h1 {
    font-size: 36px;
  }

  .service-grid,
  .menu-board,
  .jurisdiction-bar,
  .register-grid,
  .profile-dialog dl {
    grid-template-columns: 1fr;
  }

  .menu-group.wide {
    grid-column: span 1;
  }

  .app-topbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .app-title {
    text-align: left;
  }

  .account-actions {
    justify-content: stretch;
  }

  .account-actions a,
  .account-actions button {
    flex: 1 1 130px;
  }
}
