:root {
  color-scheme: light;
  --ink: #172236;
  --ink-strong: #061326;
  --muted: #5d6c80;
  --brand: #285d91;
  --brand-dark: #0d274a;
  --brand-soft: #dfecf8;
  --paper: #ffffff;
  --canvas: #eff4fa;
  --line: #d6e2ee;
  --line-strong: #b9ccdf;
  --accent: #d4a64b;
  --shadow: 0 18px 50px rgba(14, 51, 57, 0.08);
  --content-width: 76rem;
  --reading-width: 53rem;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

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

html {
  background: var(--canvas);
  color: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 20rem;
  background:
    radial-gradient(circle at 12% 0%, rgba(40, 93, 145, 0.1), transparent 26rem),
    var(--canvas);
  font-size: 1rem;
  line-height: 1.68;
}

a {
  color: var(--brand-dark);
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--brand);
}

a:focus-visible,
[tabindex]:focus-visible {
  outline: 0.2rem solid var(--accent);
  outline-offset: 0.2rem;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  transform: translateY(-160%);
  border-radius: 0.35rem;
  background: var(--ink-strong);
  color: #ffffff;
  font-weight: 700;
}

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

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(185, 204, 223, 0.82);
  background: rgba(255, 255, 255, 0.96);
}

@supports (backdrop-filter: blur(0.8rem)) {
  .site-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(0.8rem);
  }
}

.header-inner {
  display: flex;
  width: min(calc(100% - 2rem), var(--content-width));
  min-height: 4.5rem;
  margin: 0 auto;
  align-items: center;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink-strong);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 0.58rem;
  background: var(--brand);
  color: #ffffff;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.legal-nav {
  display: flex;
  min-width: 0;
  margin-left: auto;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.legal-nav ul {
  display: flex;
  margin: 0;
  padding: 0.45rem 0.15rem;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
  white-space: nowrap;
}

.legal-nav a {
  display: block;
  padding: 0.5rem 0.62rem;
  border-radius: 0.45rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
  text-decoration: none;
}

.legal-nav a:hover,
.legal-nav a[aria-current="page"] {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.page-shell {
  width: min(calc(100% - 2rem), var(--content-width));
  margin: 0 auto;
  padding: clamp(2.4rem, 6vw, 5rem) 0 clamp(4rem, 8vw, 7rem);
}

.document-hero,
.index-hero,
.error-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.document-hero::after,
.index-hero::after {
  position: absolute;
  top: -5rem;
  right: -4rem;
  width: 15rem;
  height: 15rem;
  border: 2.25rem solid rgba(40, 93, 145, 0.08);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.document-hero,
.index-hero {
  padding: clamp(1.5rem, 5vw, 3.5rem);
}

.document-hero > *,
.index-hero > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--ink-strong);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
}

h1 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.7rem);
  letter-spacing: -0.035em;
}

.lead {
  max-width: 49rem;
  margin: 1.15rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  line-height: 1.55;
}

.document-actions {
  display: flex;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  min-height: 2.8rem;
  padding: 0.68rem 1rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brand);
  border-radius: 0.55rem;
  background: var(--brand);
  color: #ffffff;
  font-weight: 750;
  text-decoration: none;
}

.button:hover {
  background: var(--brand-dark);
  color: #ffffff;
}

.button-secondary {
  border-color: var(--line-strong);
  background: #ffffff;
  color: var(--brand-dark);
}

.button-secondary:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.document-meta {
  display: grid;
  max-width: 59rem;
  margin: 2rem 0 0;
  grid-template-columns: minmax(7rem, 0.38fr) minmax(0, 1fr);
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.document-meta dt,
.document-meta dd {
  margin: 0;
  padding: 0.72rem 0;
  border-bottom: 1px solid var(--line);
}

.document-meta dt {
  padding-right: 1rem;
  color: var(--muted);
  font-weight: 750;
}

.document-meta dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

.legal-document {
  width: min(100%, var(--reading-width));
  margin: clamp(2rem, 5vw, 4rem) auto 0;
  padding: clamp(1.4rem, 4vw, 3.25rem);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: var(--paper);
  box-shadow: 0 12px 38px rgba(24, 55, 88, 0.06);
}

.legal-document h2 {
  margin: 2.8rem 0 0.9rem;
  padding-top: 0.2rem;
  font-size: clamp(1.42rem, 3vw, 1.8rem);
  letter-spacing: -0.015em;
}

.legal-document h2:first-child {
  margin-top: 0;
}

.legal-document p {
  margin: 0 0 1rem;
}

.legal-document ul,
.legal-document ol {
  margin: 0.25rem 0 1.15rem;
  padding-left: 1.4rem;
}

.legal-document li {
  margin: 0.42rem 0;
  padding-left: 0.22rem;
}

.legal-document li::marker {
  color: var(--brand);
}

.notice {
  margin: 1.25rem 0 1.6rem;
  padding: 1rem 1.05rem;
  border: 1px solid #e2c49f;
  border-left: 0.3rem solid var(--accent);
  border-radius: 0.65rem;
  background: #fff8ef;
}

.notice p {
  margin-bottom: 0.55rem;
}

.notice p:last-child {
  margin-bottom: 0;
}

.table-scroll {
  width: 100%;
  margin: 1.15rem 0 1.6rem;
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-radius: 0.72rem;
  background: #ffffff;
}

table {
  width: 100%;
  min-width: 39rem;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.5;
}

th,
td {
  padding: 0.82rem 0.9rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

th:last-child,
td:last-child {
  border-right: 0;
}

tr:last-child td {
  border-bottom: 0;
}

thead th {
  background: #edf3f8;
  color: var(--ink-strong);
  font-weight: 800;
}

td p,
th p {
  margin: 0 0 0.55rem !important;
}

td p:last-child,
th p:last-child {
  margin-bottom: 0 !important;
}

.index-hero h1 {
  max-width: 15ch;
}

.document-grid {
  display: grid;
  margin-top: clamp(1.4rem, 4vw, 2.4rem);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.document-card {
  display: flex;
  min-height: 15rem;
  padding: clamp(1.25rem, 3vw, 1.8rem);
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper);
  box-shadow: 0 10px 30px rgba(24, 55, 88, 0.05);
}

.document-card h2 {
  margin: 0.45rem 0 0;
  font-size: clamp(1.3rem, 2.5vw, 1.65rem);
}

.document-card p {
  margin: 0.8rem 0 1.25rem;
  color: var(--muted);
}

.document-card .card-link {
  margin-top: auto;
  font-weight: 750;
}

.card-meta {
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.error-card {
  max-width: 44rem;
  margin: 4rem auto;
  padding: clamp(2rem, 6vw, 4rem);
  text-align: center;
}

.error-code {
  margin: 0 0 0.8rem;
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 850;
  letter-spacing: 0.15em;
}

.error-card h1 {
  max-width: none;
}

.error-card p {
  max-width: 34rem;
  margin: 1rem auto 1.5rem;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #eaf1f8;
}

.footer-inner {
  display: flex;
  width: min(calc(100% - 2rem), var(--content-width));
  min-height: 5rem;
  margin: 0 auto;
  padding: 1.1rem 0;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a {
  font-weight: 700;
}

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

@media (max-width: 52rem) {
  .header-inner {
    display: block;
    width: 100%;
    min-height: 0;
  }

  .brand {
    margin: 0.75rem 1rem 0.2rem;
  }

  .legal-nav {
    width: 100%;
    margin: 0;
    padding: 0 0.85rem 0.4rem;
  }

  .document-grid {
    grid-template-columns: 1fr;
  }

  .document-card {
    min-height: 0;
  }
}

@media (max-width: 34rem) {
  body {
    font-size: 0.98rem;
  }

  .page-shell {
    width: min(calc(100% - 1rem), var(--content-width));
    padding-top: 1rem;
  }

  .document-hero,
  .index-hero,
  .legal-document,
  .document-card,
  .error-card {
    border-radius: 0.8rem;
  }

  .document-meta {
    grid-template-columns: 1fr;
  }

  .document-meta dt {
    padding-bottom: 0.1rem;
    border-bottom: 0;
  }

  .document-meta dd {
    padding-top: 0;
  }

  .document-actions,
  .document-actions .button {
    width: 100%;
  }

  .footer-inner {
    display: block;
  }

  .footer-inner p + p {
    margin-top: 0.35rem;
  }
}

@media print {
  .site-header,
  .site-footer,
  .document-actions,
  .skip-link {
    display: none !important;
  }

  body,
  html {
    background: #ffffff;
  }

  .page-shell {
    width: 100%;
    padding: 0;
  }

  .document-hero,
  .legal-document {
    border: 0;
    box-shadow: none;
  }

  .document-hero {
    padding: 0 0 1rem;
  }

  .legal-document {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  a {
    color: inherit;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
