/* Standalone landing page. The documentation theme is deliberately untouched. */
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400 650;
  font-display: swap;
  src: url("../fonts/sourcesans3-latin.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --ink: #243332;
  --body: #53615f;
  --muted: #6f7c79;
  --teal: #246b64;
  --system-font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font: "Source Sans 3", var(--system-font);
  --heading-font: var(--font);
  --text-small: .875rem;
  --text-body: 1rem;
  --text-section: 1.125rem;
  --text-lead: 1.125rem;
  --text-feature: 1.5rem;
  --text-headline: 3.5rem;
  --icon-size: 20px;
  font-family: var(--font);
  color: var(--ink);
  background: #fff;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--body); font-size: var(--text-body); line-height: 1.6; }
h1, h2, h3 { color: var(--ink); font-family: var(--heading-font); font-weight: 600; }
.contact h2, .modules-header h2, .module-card h3 { font-size: var(--text-section); line-height: 1.5; }
.wordmark { font-size: var(--text-feature); font-weight: 600; line-height: 1.3; }
.capture-heading h3 { font-size: var(--text-feature); font-weight: 400; line-height: 1.3; }
.site-navigation a, .download-link, .modules-source, .module-pagination button { font: 500 var(--text-small)/1.5 var(--font); }
.draft-label, .capture-pending, .site-footer, .module-tags { font-size: var(--text-small); line-height: 1.5; }
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 720px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 48% 55% at 85% 28%, #dcefe88c, #f3f8f536 65%, transparent 100%);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, [tabindex="0"]:focus-visible, .module-card:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 5px;
}
[hidden] { display: none !important; }
::selection { background: #cce6df; color: #163e38; }
.page-shell { width: min(1120px, calc(100% - 96px)); margin-inline: auto; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon, .brand-icon, .capture-mark { width: var(--icon-size); height: var(--icon-size); flex: none; }
.icon { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus { position: fixed; inset: 12px auto auto 12px; padding: 10px 16px; z-index: 10; background: #fff; }

.site-header { display: flex; align-items: center; gap: 28px; padding-block: 20px; color: var(--ink); }
.wordmark { display: inline-flex; align-items: center; flex: none; gap: 10px; min-height: 44px; letter-spacing: -.035em; }
.wordmark img { flex: none; }
.site-navigation { display: flex; justify-content: flex-end; align-items: center; gap: 24px; margin-left: auto; }
.site-navigation a { display: inline-flex; align-items: center; gap: 11px; min-height: 44px; }
.site-navigation a:hover { color: var(--teal); }
.brand-icon { object-fit: contain; }

.introduction { padding-block: 56px 24px; text-align: center; }
h1 { margin: 0; font-size: var(--text-headline); letter-spacing: -.035em; line-height: 1.12; text-wrap: balance; }
h1 span { color: var(--teal); white-space: nowrap; }
.introduction-copy { max-width: 640px; margin: 24px auto 0; font-size: var(--text-lead); line-height: 1.75rem; text-wrap: pretty; }

.draft-label { margin: 0; color: var(--muted); }
.release-download { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.download-link { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 11px 20px; border: 1px solid var(--teal); border-radius: 7px; background: var(--teal); color: #fff; }
.download-link:hover { background: #1d5852; }
.download-link:disabled { cursor: default; background: #e8efec; border-color: #d5e2de; color: #536c64; }

/* Use the same content width as the header; full images fit within the gallery. */
.workflow {
  --gallery-scale: .75;
  --gallery-heading-height: calc(var(--text-feature) * 2.6);
  --gallery-card-size: calc(min(68cqw, max(416px, calc(100vh - 200px))) * var(--gallery-scale));
  --gallery-caption-gap: 12px;
  --gallery-card-gap: 28px;
  --gallery-easing: cubic-bezier(.22, .8, .25, 1);
  container-type: inline-size;
  max-width: none;
  margin: 48px auto 0;
  scroll-margin-block: 24px;
}
.workflow-stage { padding-block: 16px 24px; }
.workflow-views { position: relative; min-width: 0; }
.workflow-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gallery-caption-gap); align-items: start; margin: 0; scroll-margin-block: 24px; }
.workflow-panel + .workflow-panel { margin-top: 48px; }
.capture-heading { display: flex; align-items: flex-end; justify-content: center; min-height: var(--gallery-heading-height); font-size: var(--text-feature); text-align: center; }
.capture-heading h3 { max-width: 640px; margin: 0; text-wrap: pretty; }
.capture-frame { display: flex; align-items: center; justify-content: center; width: calc(100% * var(--gallery-scale)); margin-inline: auto; }
.capture-image { display: block; width: fit-content; max-width: 100%; }
.capture-image:focus-visible { outline-offset: -4px; }
.capture-image { cursor: zoom-in; }
.gallery-viewer-open { overflow: hidden; }
.gallery-viewer {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 56px 24px 32px; border: 0; background: transparent; color: #fff;
}
.gallery-viewer::backdrop { background: rgb(0 0 0 / 80%); }
.gallery-viewer[open] { display: grid; place-items: center; }
.gallery-viewer-content {
  width: min(1200px, 100%, calc((100dvh - 88px) * var(--image-ratio, 1)));
  max-height: 100%; min-height: 0;
}
.gallery-viewer-close {
  position: fixed; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); z-index: 1;
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 4px; color: #fff; background: transparent; opacity: .75;
  transition: opacity 150ms;
}
.gallery-viewer-close:hover { opacity: 1; }
.gallery-viewer-close:focus-visible { outline: 2px solid #fff; outline-offset: -5px; opacity: 1; }
.gallery-viewer-image { display: block; width: 100%; height: auto; max-height: calc(100dvh - 88px); min-height: 0; object-fit: contain; }
.gallery-viewer-error { margin: auto; text-align: center; }
.capture-frame img { display: block; width: auto; height: auto; max-width: 100%; object-fit: contain; }
.is-carousel .capture-frame { width: var(--gallery-card-size); height: var(--gallery-card-size); margin-inline: auto; }
.is-carousel .capture-image { max-width: 100%; }
.is-carousel .capture-frame img { max-height: var(--gallery-card-size); }
.gallery-neighbors { display: none; }
.is-carousel .gallery-neighbors {
  display: block; position: absolute; top: calc(var(--gallery-heading-height) + var(--gallery-caption-gap));
  left: 0; width: 100%; height: var(--gallery-card-size);
  z-index: 2; pointer-events: none;
}
.gallery-neighbor {
  position: absolute; top: 0; bottom: 0;
  width: max(0px, calc((100% - var(--gallery-card-size)) / 2 - var(--gallery-card-gap)));
  padding: 0; border: 0; border-radius: 0; background: transparent;
  pointer-events: auto;
}
.gallery-neighbor-previous { left: 0; }
.gallery-neighbor-next { right: 0; }
.capture-credit { margin: 0; color: var(--muted); font-size: var(--text-small); line-height: 1.5; text-align: center; }
.workflow-diagram { display: block; width: 100%; height: auto; }
.capture-placeholder { height: 100%; padding: 24px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; background: #f7f9f8; }
.capture-mark { margin-bottom: 12px; color: #9caea7; stroke: currentColor; stroke-width: 2.4; stroke-linecap: square; }
.capture-title { font-weight: 500; }
.capture-pending { color: var(--muted); margin-top: 5px; }

/* Equal slots move as one horizontal row. The fade belongs to the viewport,
   so the selected image stays clear and both outside edges blend into the page. */
.is-carousel .workflow-views {
  display: grid; overflow: clip;
  mask-image: linear-gradient(to right, transparent, #000 16%, #000 84%, transparent);
}
.is-carousel .workflow-panel { grid-area: 1 / 1; grid-template-rows: var(--gallery-heading-height) var(--gallery-card-size) auto; margin: 0; pointer-events: none; }
.is-carousel .workflow-panel[data-state="active"] { pointer-events: auto; z-index: 1; }
.is-carousel .capture-heading h3 { max-width: var(--gallery-card-size); }
.is-carousel .capture-credit { width: var(--gallery-card-size); margin-inline: auto; }
.is-carousel .capture-heading, .is-carousel .capture-credit { opacity: 0; visibility: hidden; }
.is-carousel [data-state="active"] .capture-heading,
.is-carousel [data-state="active"] .capture-credit { opacity: 1; visibility: visible; transition: opacity 200ms ease-out; }
.is-carousel .capture-frame {
  opacity: .86;
  transform: translateX(calc(var(--gallery-offset) * (100% + var(--gallery-card-gap))));
  transition: transform 620ms var(--gallery-easing), opacity 400ms ease;
}
.is-carousel [data-state="active"] .capture-frame { opacity: 1; }

/* Small or short screens show one full image, with touch and button navigation. */
.is-compact-gallery { --gallery-card-size: min(100cqw, max(240px, calc(100svh - 240px))); }
.is-compact-gallery .workflow-views {
  width: var(--gallery-card-size); max-width: 100%; margin-inline: auto;
  mask-image: none; touch-action: pan-y pinch-zoom;
}
.is-compact-gallery .gallery-neighbors { display: none; }
.is-compact-gallery .capture-heading { min-height: var(--gallery-heading-height); }
.is-compact-gallery .capture-frame { opacity: 1; transition: transform 240ms var(--gallery-easing); }
.gallery-navigation { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; }
.gallery-navigation[hidden] { display: none; }
.gallery-navigation button {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 6px; background: transparent; color: var(--ink);
  transition: background-color 140ms;
}
.gallery-navigation button:hover:not(:disabled) { background: #f3f5f4; }
.gallery-navigation button:disabled { opacity: .25; cursor: default; }
.gallery-navigation [role="status"] { min-width: 45px; text-align: center; color: var(--muted); font-size: var(--text-small); line-height: 1.5; font-variant-numeric: tabular-nums; }
.is-measuring .capture-heading, .is-measuring .capture-frame, .is-measuring .capture-credit,
.workflow-panel[data-repositioning="true"] .capture-frame { transition: none; }

.module-catalog { margin: 56px auto 48px; scroll-margin-block: 24px; }
.modules-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.modules-header h2 { margin: 0; }
.modules-discovery { margin: 0 0 24px; }
.modules-discovery a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.modules-source { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; color: var(--teal); }
.modules-source:hover span { text-decoration: underline; text-underline-offset: 3px; }
.module-list { display: grid; gap: 16px; }
.module-page { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 16px; list-style: none; padding: 0; margin: 0; }
/* Equal rows across overlapping pages make every card fit the tallest content.
   Reserve all rows on partial pages; hidden pages still contribute to sizing. */
.is-paginated .module-page { grid-area: 1 / 1; grid-template-rows: repeat(var(--module-rows), 1fr); }
.is-paginated .module-page[hidden] { display: grid !important; visibility: hidden; }
.module-card { display: flex; flex-direction: column; min-width: 0; padding: 20px 22px; border: 1px solid #e0e6e2; border-radius: 8px; background: #fff; }
.module-card h3 { margin: 0; }
.module-card h3 a { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; overflow-wrap: anywhere; }
.module-card h3 .icon { align-self: center; color: var(--teal); }
.module-card h3 a:hover { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.module-card p { margin: 8px 0 16px; text-wrap: pretty; }
.module-card-planned { --muted: #5f6f6d; background: #f7f8f7; border-color: #e1e5e3; color: var(--muted); }
.module-card-planned h3 { color: var(--muted); font-weight: 500; }
.module-card-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.module-card-heading h3 { min-width: 0; overflow-wrap: anywhere; }
.module-status { display: inline-flex; align-self: center; flex: none; color: var(--muted); }
.module-tags { display: flex; flex-wrap: wrap; gap: 5px; padding: 0; margin: auto 0 0; list-style: none; color: var(--body); }
.module-tags li { max-width: 100%; padding: 2px 7px; border-radius: 3px; background: #f4f6f5; overflow-wrap: anywhere; }
.module-card-planned .module-tags { color: var(--muted); }
.module-card-planned .module-tags li { background: #edf0ed; }
.module-pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; margin-top: 16px; }
.module-pagination button { min-width: 40px; min-height: 44px; padding: 8px 12px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--body); }
.module-pagination button:hover:not(:disabled), .module-pagination button[aria-current="page"] { background: #f0f5f3; color: var(--teal); }
.module-pagination button[aria-current="page"] { border-color: #a0b5ae; }
.module-pagination button:disabled { color: var(--muted); opacity: .5; cursor: default; }

.contact { max-width: 640px; margin: 48px auto 0; text-align: center; }
.contact h2 { margin: 0; }
.contact p { margin: 8px 0 0; }
.contact a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }

/* Citation and intended use follow the module catalog in normal page flow. */
.site-footer { padding-block: 16px max(32px, env(safe-area-inset-bottom)); background: #fff; text-align: center; }
.site-footer p { margin: 0; }
.site-footer p + p { margin-top: 4px; }
.site-footer p a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1000px) {
  .page-shell { width: calc(100% - 64px); }
  .site-header { gap: 26px; }
  .site-navigation { gap: 20px; }
}
@media (max-width: 720px) {
  :root { --text-headline: 2.375rem; }
  body::before { height: 580px; background: radial-gradient(ellipse 100% 55% at 100% 28%, #e3f1eb80, transparent 85%); }
  .page-shell { width: calc(100% - 40px); }
  .site-header { padding-block: 20px 18px; gap: 12px; }
  .wordmark { gap: 8px; }
  .wordmark img { width: 25px; height: 25px; }
  .site-navigation { flex: none; gap: 0; }
  .site-navigation a { justify-content: center; width: 44px; gap: 0; }
  .site-navigation a span { display: none; }
  .introduction { padding-block: 40px 24px; }
  .workflow { max-width: none; margin-top: 32px; }
  .workflow-stage { padding-block: 20px; }
  .capture-heading { min-height: 0; }
  .contact { margin-top: 32px; }
  .module-catalog { margin-block: 40px 32px; }
  .module-page { grid-template-columns: minmax(0, 1fr); }
  .is-paginated .module-page { grid-template-rows: repeat(var(--module-rows-narrow), 1fr); }
  .module-card { padding: 14px 16px; }
  .module-pagination button { padding-inline: 8px; }
  .capture-placeholder { padding: 18px; }
}
@media (max-width: 370px) {
  .page-shell { width: calc(100% - 32px); }
  .wordmark { justify-content: center; width: 44px; }
  .wordmark span { display: none; }
  .module-pagination { gap: 0; }
  .module-pagination button { min-width: 32px; padding-inline: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .gallery-neighbors, .gallery-navigation { display: none !important; }
  .capture-frame, .is-carousel .capture-frame { width: 100%; height: auto; }
  .is-carousel .capture-image { max-width: 100%; }
  .is-carousel .capture-frame img { max-height: none; }
  .gallery-viewer { display: none !important; }
  body::before { display: none; }
  .page-shell { width: 100%; }
  .workflow-views { display: block !important; width: 100% !important; overflow: visible !important; mask-image: none !important; }
  .workflow-panel { break-inside: avoid; margin-block: 24px !important; }
  .capture-heading, .capture-frame, .capture-credit { opacity: 1 !important; transform: none !important; transition: none !important; visibility: visible !important; }
  .download-link { color: var(--ink); background: none; }
  .module-list, .module-page, .is-paginated .module-page[hidden] { display: block !important; visibility: visible; }
  .module-card { break-inside: avoid; margin-block: 12px; }
  .module-pagination { display: none; }
  .site-footer { padding: 12px 0; }
}
