:root {
  color-scheme: light;
  --navy: #0b2545;
  --navy-deep: #06182d;
  --blue: #176b87;
  --teal: #0f7584;
  --surface: #ffffff;
  --soft: #edf4f7;
  --text: #14202b;
  --muted: #52616f;
  --error: #9c1c1c;
  --success: #146c43;
  --warning: #7a4b00;
  --border: #b8c7d1;
  --focus: #00a1a7;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--soft);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

:where(a, button, input, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.65rem 0.9rem;
  transform: translateY(-160%);
  border-radius: 0.25rem;
  background: var(--focus);
  color: var(--navy-deep);
  font-weight: 800;
  text-decoration: none;
}

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

.site-header {
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  min-height: 4rem;
  padding: 0.6rem clamp(1rem, 4vw, 3rem);
  background: var(--navy);
  color: white;
}

.site-brand {
  color: white;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.15rem 0.35rem;
}

.site-nav a {
  padding: 0.5rem 0.65rem;
  border-radius: 0.25rem;
  color: #eaf8fb;
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: #dff7f7;
  color: var(--navy-deep);
}

.page-main {
  width: min(96rem, calc(100% - 2rem));
  margin: 0 auto;
  padding-block: clamp(1.5rem, 5vw, 3rem);
}

.page-panel {
  padding: clamp(1.25rem, 4vw, 3rem);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface);
  box-shadow: 0 0.75rem 2rem rgb(11 37 69 / 10%);
}

.page-layout {
  display: grid;
  gap: 1.5rem;
}

.page-header {
  display: grid;
  gap: 0.5rem;
}

.page-header > .eyebrow,
.page-header > h1,
.page-header > .page-introduction {
  margin-block: 0;
}

.page-header .page-introduction {
  margin-top: 0.25rem;
}

.page-content {
  display: grid;
  gap: var(--page-content-gap, 1.5rem);
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
}

.page-content > * {
  min-width: 0;
}

h1,
h2 {
  color: var(--navy);
  line-height: 1.15;
}

h1 {
  margin-top: 0;
}

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

.page-introduction {
  max-width: 46rem;
  font-size: 1.15rem;
}

.availability-note {
  max-width: 46rem;
  margin: 0;
  padding: 1rem;
  border-left: 0.3rem solid var(--teal);
  background: var(--soft);
}

.documentation-content {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  min-width: 0;
}

.document-index,
.document-section,
.callout,
.definition-grid > div,
.definition-list > div {
  display: grid;
}

.document-index {
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--soft);
}

.document-index :where(h2, ol),
.document-section > :first-child,
.callout :where(h3, p),
.definition-grid :where(dt, dd),
.definition-list :where(dt, dd) {
  margin-block: 0;
}

.document-index ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 0.35rem 1.5rem;
  padding-left: 1.25rem;
}

.document-section {
  gap: 1rem;
  scroll-margin-top: 1rem;
}

.document-section :where(h2, h3) {
  margin-bottom: 0;
}

.document-section p,
.document-section ul {
  margin-block: 0;
}

.definition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0.75rem;
  margin: 0;
}

.definition-grid > div {
  align-content: start;
  gap: 0.25rem;
  padding: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
}

.definition-grid dt,
.definition-list dt {
  color: var(--navy);
  font-weight: 800;
}

.definition-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
}

.definition-list > div {
  grid-template-columns: minmax(7rem, 0.25fr) minmax(0, 1fr);
  gap: 0.5rem 1rem;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
}

.table-scroll:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.parameter-table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  background: var(--surface);
  text-align: left;
}

.compact-table {
  min-width: 22rem;
}

.parameter-table caption {
  padding: 0.75rem 1rem;
  background: var(--navy);
  color: white;
  font-weight: 800;
  text-align: left;
}

.parameter-table :where(th, td) {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.parameter-table thead th {
  background: var(--soft);
}

.parameter-table tbody tr:last-child > * {
  border-bottom: 0;
}

.callout {
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border-left: 0.3rem solid var(--teal);
  background: var(--soft);
}

.callout-warning {
  border-left-color: var(--warning);
  background: #fff6e5;
}

.formula {
  max-width: 100%;
  padding: 0.85rem 1rem;
  overflow-wrap: anywhere;
  border: 1px solid var(--border);
  border-radius: 0.35rem;
  background: var(--navy-deep);
  color: white;
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", monospace;
}

.author-list {
  padding-left: 1.25rem;
}

.placeholder-label {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border: 1px dashed var(--border);
  border-radius: 0.25rem;
  color: var(--muted);
  font-weight: 700;
}

.result-access {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-left: 0.3rem solid var(--teal);
  border-radius: 0.35rem;
  background: var(--soft);
}

.result-access :where(h2, p, dl) {
  margin-block: 0;
}

.result-access dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 1rem;
}

.result-access dl div {
  display: grid;
  gap: 0.1rem;
}

.result-access .result-identifier {
  grid-column: 1 / -1;
  overflow-wrap: anywhere;
}

.result-access dt {
  font-weight: 750;
}

.result-access dd {
  margin: 0;
}

.result-access button {
  width: fit-content;
  min-height: 2.75rem;
  padding: 0.6rem 1rem;
  border: 0;
  border-radius: 0.3rem;
  background: var(--navy);
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}

.site-footer {
  padding: 0.65rem clamp(1rem, 4vw, 3rem);
  background: var(--navy-deep);
  color: #dce9f0;
  font-size: 0.82rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer .site-footer-note {
  margin-top: 0.1rem;
  font-size: 0.72rem;
}

.landing-page {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100svh;
  min-height: 0;
  isolation: isolate;
  overflow-wrap: anywhere;
  background: var(--navy-deep);
  color: white;
}

.landing-page::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, rgb(5 20 38 / 75%), rgb(6 24 45 / 20%)),
    url("images/landing-hero.cb31b1e8bb6e.jpg") center / cover;
  content: "";
}

.landing-page .site-brand {
  white-space: normal;
}

.landing-page .site-header,
.landing-page .site-footer {
  background: rgb(6 24 45 / 65%);
}

.landing-main {
  min-height: 0;
  overflow: auto;
}

.landing-main :where(a, [tabindex]) {
  scroll-margin-block: 1rem;
}

.landing-hero {
  display: grid;
  align-items: center;
  min-height: 100%;
  padding: 3rem clamp(1rem, 4vw, 3rem);
  scroll-snap-align: start;
}

.hero-content {
  width: min(76rem, 100%);
  margin-inline: auto;
  color: white;
}

.hero-content h1 {
  max-width: 54rem;
  margin-block: 0 0.9rem;
  color: white;
  font-size: clamp(2.25rem, 4.5vw, 4rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.hero-content .eyebrow,
.landing-step-number {
  color: #7fe1df;
}

.hero-lead {
  max-width: 42rem;
  margin-block: 0;
  font-size: clamp(1.1rem, 1.7vw, 1.25rem);
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 2rem;
}

.action-card {
  display: grid;
  gap: 0.25rem;
  align-content: start;
  padding: 1.2rem;
  border: 1px solid rgb(255 255 255 / 55%);
  border-radius: 0.4rem;
  background: rgb(6 24 45 / 82%);
  color: white;
  text-decoration: none;
}

.action-card:hover {
  border-color: white;
  background: rgb(13 50 80 / 96%);
}

.action-card-primary {
  border-color: #7fe1df;
  background: #dff7f7;
  color: var(--navy-deep);
}

.action-card-primary:hover {
  background: white;
  color: var(--navy-deep);
}

.action-card strong {
  font-size: 1.05rem;
}

.action-card span {
  font-size: 0.85rem;
  line-height: 1.35;
}

.landing-workflow-page {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100%;
  scroll-snap-align: start;
}

.landing-content {
  display: grid;
  align-content: center;
  gap: 2rem;
  width: min(76rem, calc(100% - 4rem));
  margin-inline: auto;
  padding-block: 3rem;
}

.landing-scroll-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: fit-content;
  margin: 2rem auto 0;
  padding: 0.5rem;
  color: #dff7f7;
  font-weight: 650;
  text-underline-offset: 0.3em;
}

.landing-content > .landing-scroll-link {
  margin-top: 0;
}

.landing-section,
.landing-section-header,
.landing-card {
  display: grid;
}

.landing-section {
  gap: 2rem;
}

.landing-section-header {
  gap: 0.75rem;
  max-width: 52rem;
  margin-inline: auto;
  text-align: center;
}

.landing-section-header > * {
  margin-block: 0;
}

.landing-section-header h2 {
  color: white;
  font-size: clamp(2rem, 4vw, 3rem);
}

.landing-section-header > p:last-child {
  color: #dce9f0;
  font-size: 1.15rem;
}

.landing-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.landing-steps {
  padding: 0;
  margin: 0;
  list-style: none;
}

.landing-card {
  align-content: start;
  gap: 0.8rem;
  padding: 1.5rem;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 0.75rem;
  background: rgb(6 24 45 / 88%);
}

.landing-card :where(h3, p) {
  margin-block: 0;
}

.landing-card h3 {
  color: white;
  font-size: 1.25rem;
  line-height: 1.25;
}

.landing-step-number {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

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

@media (max-width: 52rem) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .hero-content {
    width: min(100%, 42rem);
  }

  .action-grid,
  .landing-card-grid {
    grid-template-columns: 1fr;
  }

  .landing-hero {
    min-height: auto;
  }

  .landing-content {
    width: calc(100% - 2rem);
  }
}

@media (max-width: 40rem) {
  .site-header {
    padding-block: 0.75rem;
  }

  .site-nav {
    margin-inline: -0.4rem;
  }

  .site-nav a {
    padding: 0.45rem 0.4rem;
  }

  .landing-content {
    width: 100%;
    padding: 1.25rem 1rem;
  }

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

  .page-panel {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .definition-list > div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .parameter-table {
    min-width: 31rem;
  }

  .compact-table {
    min-width: 320px;
  }
}

@media (min-width: 52.01rem) and (min-height: 40rem) and (prefers-reduced-motion: no-preference) {
  .landing-main {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.site-footer a {
  color: inherit;
  text-decoration: underline;
}

.site-footer a:focus-visible {
  outline-color: #fff;
}

.calculation-details > summary {
  cursor: pointer;
  color: var(--navy);
  font-weight: 700;
}

.calculation-content {
  display: grid;
  gap: 1rem;
  padding-top: 1rem;
}
