:root {
  --navy: #042953;
  --navy-2: #0b396c;
  --navy-3: #dbe5ef;
  --burgundy: #850224;
  --burgundy-2: #a10b35;
  --burgundy-soft: #f5e8ec;
  --paper: #f7f5f1;
  --white: #ffffff;
  --ink: #122033;
  --muted: #596576;
  --line: #d8d9d6;
  --success: #176744;
  --success-soft: #e8f4ee;
  --danger: #9b1c1c;
  --danger-soft: #fbe9e9;
  --shadow: 0 18px 60px rgba(4, 41, 83, .11);
  --shadow-small: 0 10px 30px rgba(4, 41, 83, .08);
  --radius: 22px;
  --radius-small: 12px;
  --content: 1180px;
}

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

html { color-scheme: light; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: "Aptos", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
a { color: inherit; }
button { color: inherit; }

::selection { background: var(--burgundy); color: var(--white); }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-150%);
  border-radius: 8px;
  padding: 10px 16px;
  background: var(--white);
  color: var(--navy);
  font-weight: 800;
}

.skip-link:focus { transform: translateY(0); }

.access-container {
  width: min(calc(100% - 40px), var(--content));
  margin-inline: auto;
}

.access-header {
  border-bottom: 1px solid rgba(4, 41, 83, .12);
  background: rgba(247, 245, 241, .96);
}

.access-nav {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.access-wordmark {
  display: inline-flex;
  align-items: baseline;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.82rem;
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: 1;
  text-decoration: none;
}

.access-wordmark strong { color: var(--burgundy); font-weight: 500; }

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

.text-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--navy);
  font-size: .9rem;
  font-weight: 750;
  text-decoration: none;
}

.text-link:hover { background: var(--navy-3); }

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 18px;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .65; transform: none; }
.button-primary { background: var(--burgundy); color: var(--white); }
.button-primary:hover { background: var(--burgundy-2); }
.button-secondary { border-color: var(--navy-3); background: var(--white); color: var(--navy); }
.button-secondary:hover { border-color: var(--navy); }
.button-small { min-height: 44px; padding: 9px 15px; font-size: .9rem; }

.access-main { padding: clamp(40px, 7vw, 88px) 0 72px; }

.access-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, 1fr);
  gap: clamp(36px, 7vw, 92px);
  align-items: start;
}

.access-intro { padding-top: 28px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--burgundy);
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .13em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 28px;
  height: 2px;
  background: currentColor;
  content: "";
}

h1, h2, h3, p { text-wrap: pretty; }

h1, h2, h3 {
  margin-top: 0;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -.035em;
}

h1 { margin-bottom: 22px; font-size: clamp(2.6rem, 5.5vw, 4.9rem); line-height: 1; }
h2 { margin-bottom: 12px; font-size: clamp(1.9rem, 3.2vw, 2.8rem); line-height: 1.08; }
h3 { margin-bottom: 8px; font-size: 1.35rem; line-height: 1.15; }
p { margin: 0 0 1em; }

.lead { max-width: 650px; color: #3f4e61; font-size: 1.08rem; }

.boundary-list {
  display: grid;
  gap: 14px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.boundary-list li {
  position: relative;
  padding-left: 28px;
  color: var(--muted);
}

.boundary-list li::before {
  position: absolute;
  top: .65em;
  left: 0;
  width: 13px;
  height: 2px;
  background: var(--burgundy);
  content: "";
}

.auth-panel {
  overflow: hidden;
  border: 1px solid rgba(4, 41, 83, .12);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 8px;
  background: #eef2f6;
}

.auth-tab {
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.auth-tab[aria-selected="true"] {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-small);
}

.auth-pane { padding: clamp(25px, 5vw, 44px); }
.auth-pane[hidden] { display: none; }
.auth-pane > p { color: var(--muted); }

.form-stack { display: grid; gap: 18px; margin-top: 28px; }
.form-stack[hidden] { display: none; }
.field { display: grid; gap: 7px; }
.field label { color: var(--navy); font-size: .9rem; font-weight: 800; }
.field input {
  width: 100%;
  min-height: 50px;
  border: 1px solid #bcc6d1;
  border-radius: 10px;
  padding: 11px 13px;
  background: var(--white);
  color: var(--ink);
}
.field input:hover { border-color: #8292a5; }
.field input:focus { border-color: var(--navy); outline: 3px solid rgba(4, 41, 83, .13); }
.field-hint { margin: 0; color: var(--muted); font-size: .82rem; }
.form-stack .button { width: 100%; margin-top: 4px; }

.form-status {
  min-height: 0;
  margin: 18px 0 0;
  border-radius: 10px;
  font-size: .9rem;
}

.form-status:not(:empty) { padding: 11px 13px; }
.form-status[data-state="success"] { background: var(--success-soft); color: var(--success); }
.form-status[data-state="error"] { background: var(--danger-soft); color: var(--danger); }
.form-status[data-state="info"] { background: var(--navy-3); color: var(--navy); }

.privacy-note {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  color: var(--muted);
  font-size: .82rem;
}

.dashboard-main { padding: 38px 0 70px; }
.dashboard-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}
.dashboard-heading h1 { margin-bottom: 6px; font-size: clamp(2.35rem, 5vw, 4.4rem); }
.dashboard-heading p { margin: 0; color: var(--muted); }

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(300px, .72fr) minmax(0, 1.28fr);
  gap: 24px;
  align-items: start;
}

.access-section {
  border: 1px solid rgba(4, 41, 83, .12);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-small);
}

.access-section-header { border-bottom: 1px solid var(--line); padding: 22px 24px 17px; }
.access-section-header h2 { margin: 0; font-size: 1.55rem; }
.access-section-header p { margin: 6px 0 0; color: var(--muted); font-size: .88rem; }

.entitlement-list { display: grid; gap: 1px; background: var(--line); }
.entitlement-item {
  width: 100%;
  border: 0;
  padding: 19px 21px;
  background: var(--white);
  text-align: left;
  cursor: pointer;
}
.entitlement-item:hover { background: #f5f7f9; }
.entitlement-item[aria-current="true"] { background: var(--navy); color: var(--white); }
.entitlement-item strong { display: block; margin-bottom: 4px; font-family: Georgia, "Times New Roman", serif; font-size: 1.08rem; font-weight: 500; }
.entitlement-item span { display: block; color: var(--muted); font-size: .82rem; }
.entitlement-item[aria-current="true"] span { color: #d8e3ee; }

.empty-state { padding: 36px 24px; color: var(--muted); }
.empty-state strong { display: block; margin-bottom: 8px; color: var(--navy); }

.resource-detail { min-height: 420px; padding: clamp(25px, 5vw, 46px); }
.resource-detail .resource-kicker { margin-bottom: 12px; color: var(--burgundy); font-size: .75rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.resource-detail h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
.resource-summary { color: var(--muted); font-size: 1.02rem; }
.resource-divider { width: 46px; height: 2px; margin: 28px 0; border: 0; background: var(--burgundy); }
.resource-content { margin: 0; white-space: pre-wrap; color: #2d3b4e; }
.resource-loading { color: var(--muted); }

.loading-panel { padding: 36px 24px; color: var(--muted); }

.access-footer {
  border-top: 1px solid rgba(4, 41, 83, .12);
  padding: 22px 0 30px;
  color: var(--muted);
  font-size: .82rem;
}

.access-footer .access-container { display: flex; justify-content: space-between; gap: 20px; }

:focus-visible { outline: 3px solid rgba(133, 2, 36, .28); outline-offset: 3px; }

@media (max-width: 860px) {
  .access-layout, .dashboard-layout { grid-template-columns: 1fr; }
  .access-intro { padding-top: 0; }
  .dashboard-heading { align-items: start; flex-direction: column; }
  .resource-detail { min-height: 300px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .access-container { width: min(calc(100% - 26px), var(--content)); }
  .access-nav { min-height: 70px; }
  .access-wordmark { font-size: 1.6rem; }
  .text-link { display: none; }
  .access-main { padding-top: 32px; }
  .auth-pane { padding: 24px 19px 27px; }
  .access-footer .access-container { flex-direction: column; }
}

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