:root {
  color-scheme: light;
  --ink: #16222a;
  --ink-2: #24343d;
  --ink-soft: #53646d;
  --paper: #f5f1e9;
  --paper-strong: #fffdf8;
  --paper-muted: #e9e2d6;
  --line: #d7d1c5;
  --teal: #0e6f69;
  --teal-dark: #09524f;
  --mint: #cce4d9;
  --coral: #e3624a;
  --sun: #f3b44a;
  --shadow: 0 26px 72px rgba(30, 48, 54, 0.14);
  --radius: 24px;
  --header-height: 78px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at 7% 2%, rgba(14, 111, 105, 0.09), transparent 30rem), var(--paper);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  text-rendering: optimizeLegibility;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

img {
  max-width: 100%;
}

.skip-link {
  position: fixed;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  transform: translateY(-150%);
}

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

.section-shell {
  width: min(1220px, calc(100% - 8vw));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  min-height: var(--header-height);
  padding: 0 4vw;
  border-bottom: 1px solid rgba(22, 34, 42, 0.1);
  background: rgba(245, 241, 233, 0.94);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  width: max-content;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 950;
  letter-spacing: -0.065em;
}

.brand-mark {
  color: var(--teal-dark);
}

.brand-number {
  margin-left: 0.14rem;
  color: var(--coral);
}

.main-nav {
  display: flex;
  gap: 0.2rem;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.main-nav > a,
.nav-group-line > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.62rem;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 800;
  white-space: nowrap;
}

.main-nav > a:hover,
.nav-group-line > a:hover,
.main-nav > a.is-active,
.nav-group.is-active > .nav-group-line > a,
.nav-group.is-active > .nav-group-toggle-mobile {
  background: rgba(14, 111, 105, 0.09);
  color: var(--teal-dark);
}

.main-nav [aria-current="page"]::after {
  position: absolute;
  right: 0.65rem;
  bottom: 0.35rem;
  left: 0.65rem;
  height: 2px;
  background: var(--coral);
  content: "";
}

.nav-group {
  position: relative;
}

.nav-group-line {
  display: flex;
  align-items: center;
}

.nav-group-toggle-mobile {
  display: none;
}

.subnav-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-left: -0.3rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}

.subnav-toggle:hover,
.subnav-toggle:focus-visible {
  background: rgba(14, 111, 105, 0.1);
}

.subnav-icon {
  display: inline-block;
  transition: transform 150ms ease;
}

.nav-group.is-open .subnav-icon {
  transform: rotate(180deg);
}

.nav-children {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  display: grid;
  width: 310px;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-strong);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: 150ms ease;
}

.nav-group.is-open .nav-children {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-children a {
  position: relative;
  padding: 0.72rem 0.85rem;
  border-radius: 9px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 750;
}

.nav-children a:hover,
.nav-children a.is-active {
  background: var(--mint);
  color: var(--ink);
}

.mobile-menu-toggle {
  display: none;
  align-items: center;
  min-height: 44px;
  padding: 0 0.8rem;
  border: 1px solid rgba(22, 34, 42, 0.18);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
}

.menu-lines,
.menu-lines::before,
.menu-lines::after {
  display: block;
  width: 17px;
  height: 2px;
  background: currentColor;
  content: "";
}

.menu-lines {
  position: relative;
  margin-right: 0.55rem;
}

.menu-lines::before {
  position: absolute;
  top: -5px;
}

.menu-lines::after {
  position: absolute;
  top: 5px;
}

.page-hero {
  padding: clamp(2.5rem, 4vw, 4rem) 0;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: center;
}

.hero-layout.has-visual {
  grid-template-columns: minmax(0, 1.1fr) minmax(390px, 0.9fr);
}

.page-hero:not(.page-hero-internal) .hero-layout.has-visual {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 4vw, 4rem);
  width: min(1480px, calc(100% - 8vw));
}

.page-hero:not(.page-hero-internal) h1 {
  max-width: 940px;
  font-size: clamp(2.5rem, 4vw, 3.6rem);
  line-height: 1.08;
}

.hero-title-line {
  display: block;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 1.2rem;
  color: var(--teal);
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  hyphens: none;
  letter-spacing: -0.045em;
  overflow-wrap: normal;
  word-break: normal;
}

h1 {
  max-width: 920px;
  font-size: clamp(3.1rem, 6vw, 6.8rem);
  line-height: 0.94;
}

h2 {
  max-width: 900px;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.08;
}

.page-hero-internal {
  padding-block: clamp(2rem, 3vw, 2.75rem);
  border-bottom: 1px solid var(--line);
}

.page-hero-internal h1 {
  max-width: 1100px;
  font-size: clamp(2rem, 3.6vw, 3.2rem);
  line-height: 1.08;
}

.hero-lead {
  max-width: 820px;
  margin: 1.2rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.58;
}

.hero-support {
  max-width: 760px;
  margin: 1.2rem 0 0;
  padding-left: 1rem;
  border-left: 3px solid var(--sun);
  color: var(--ink-2);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.2rem;
}

.button {
  display: inline-flex;
  gap: 0.8rem;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 1.3rem;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 850;
}

.button-primary {
  background: var(--teal);
  color: white;
  box-shadow: 0 13px 26px rgba(14, 111, 105, 0.18);
}

.button-secondary {
  border-color: rgba(22, 34, 42, 0.2);
  color: var(--ink);
}

.button:hover {
  transform: translateY(-1px);
}

.hero-system {
  position: relative;
  display: grid;
  gap: 1rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid rgba(22, 34, 42, 0.12);
  border-radius: 30px;
  background: var(--paper-strong);
  box-shadow: var(--shadow);
}

.hero-system::before {
  position: absolute;
  inset: -1.5rem 2rem 2rem -1.5rem;
  z-index: -1;
  border-radius: 34px;
  background: var(--mint);
  content: "";
  transform: rotate(-2deg);
}

.system-kicker {
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.system-hub {
  padding: 1.4rem;
  border-radius: 16px;
  background: var(--teal-dark);
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 2.7vw, 2.5rem);
  text-align: center;
  white-space: nowrap;
}

.system-spokes,
.system-result {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.system-spokes span,
.system-result span {
  display: grid;
  place-items: center;
  min-height: 64px;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.system-result span {
  border-color: transparent;
  background: var(--paper-muted);
  color: var(--ink);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.breadcrumbs a {
  text-underline-offset: 0.2em;
}

.content-section {
  padding-block: clamp(2.5rem, 4vw, 4rem);
}

.content-section + .content-section:not(.content-section-dark, .solution-section, .comparison-section, .questions-section) {
  border-top: 1px solid var(--line);
}

.section-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: end;
}

.section-intro > p {
  margin: 0 0 0.4rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

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

.contour-card {
  display: flex;
  min-width: 0;
  min-height: 270px;
  padding: clamp(1.5rem, 3vw, 2.4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-strong);
  text-decoration: none;
  flex-direction: column;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.contour-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.contour-dark {
  border-color: transparent;
  background: var(--teal-dark);
  color: white;
}

.contour-sun {
  border-color: transparent;
  background: var(--sun);
}

.contour-mint {
  border-color: transparent;
  background: var(--mint);
}

.card-number {
  color: var(--coral);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.contour-dark .card-number {
  color: var(--sun);
}

.contour-card h3,
.feature-card h3,
.branch-card h3,
.stage-card h3,
.case-card h3,
.evidence-note h2 {
  margin: auto 0 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 2.7vw, 2.65rem);
  font-weight: 500;
  line-height: 1.05;
}

.contour-card p {
  max-width: 640px;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.contour-dark p {
  color: rgba(255, 255, 255, 0.7);
}

.card-link {
  margin-top: 1.5rem;
  font-size: 0.76rem;
  font-weight: 900;
}

.solution-section {
  background: var(--ink);
  color: white;
}

.solution-section .eyebrow,
.content-section-dark .eyebrow {
  color: #7bd0c4;
}

.solution-section .section-intro > p,
.content-section-dark .gallery-copy > p {
  color: rgba(255, 255, 255, 0.62);
}

.solution-map {
  display: grid;
  gap: 0.85rem;
  margin-top: 2rem;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
}

.map-layer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}

.map-node {
  appearance: none;
  display: grid;
  place-items: center;
  min-height: 62px;
  padding: 0.8rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  text-align: center;
}

.map-node:hover,
.map-node:focus-visible {
  border-color: var(--sun);
  color: white;
}

.map-node:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
}

.map-node[aria-pressed="true"] {
  border-color: transparent;
  background: var(--sun);
  color: var(--ink);
}

.solution-map-detail {
  width: min(100%, 760px);
  min-width: 0;
  margin: 1rem auto 0;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  overflow-wrap: anywhere;
}

.solution-map-detail .eyebrow {
  margin-bottom: 0.8rem;
}

.solution-map-detail h3 {
  margin: 0 0 0.75rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 500;
}

.solution-map-detail > p:not(.eyebrow) {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
}

.solution-map-detail .text-link {
  display: inline-block;
  color: white;
}

.map-arrow {
  color: var(--sun);
  font-size: 1.5rem;
  text-align: center;
}

.comparison-section {
  background: var(--paper-muted);
}

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

.comparison-column {
  padding: clamp(1.6rem, 4vw, 3rem);
  border-radius: var(--radius);
}

.comparison-column h3 {
  margin: 0 0 2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3.2vw, 3.2rem);
  font-weight: 500;
}

.comparison-column ul,
.feature-card ul,
.evidence-note ul,
.narrative-copy ul,
.case-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.comparison-column li,
.feature-card li,
.evidence-note li,
.narrative-copy li,
.case-card li {
  position: relative;
  padding: 0.85rem 0 0.85rem 1.4rem;
  border-top: 1px solid currentColor;
  border-color: rgba(22, 34, 42, 0.14);
  line-height: 1.45;
}

.comparison-column li::before,
.feature-card li::before,
.evidence-note li::before,
.narrative-copy li::before,
.case-card li::before {
  position: absolute;
  top: 1.22rem;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
  content: "";
}

.comparison-core {
  background: var(--teal-dark);
  color: white;
}

.comparison-core li {
  border-color: rgba(255, 255, 255, 0.15);
}

.comparison-core li::before {
  background: var(--sun);
}

.comparison-adapt {
  border: 1px solid var(--line);
  background: var(--paper-strong);
}

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

.case-card {
  display: flex;
  min-width: 0;
  min-height: 390px;
  padding: 1.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-strong);
  flex-direction: column;
}

.case-dark {
  border-color: transparent;
  background: var(--teal-dark);
  color: white;
}

.case-mint {
  border-color: transparent;
  background: var(--mint);
}

.case-topline {
  display: flex;
  justify-content: space-between;
  color: var(--coral);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.09em;
}

.case-dark .case-topline {
  color: var(--sun);
}

.case-card p {
  margin: 0 0 1.4rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.case-dark p {
  color: rgba(255, 255, 255, 0.67);
}

.case-card > strong {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.case-card ul {
  margin-top: 1.4rem;
  font-size: 0.86rem;
}

.section-link {
  margin-top: 2rem;
}

.process-flow {
  display: grid;
  grid-template-columns: repeat(var(--flow-columns, 1), minmax(0, 1fr));
  margin: 4rem 0 0;
  padding: 0;
  border-top: 2px solid var(--ink);
  list-style: none;
}

.process-flow li {
  position: relative;
  min-width: 0;
}

.process-flow li::before {
  position: absolute;
  top: -7px;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--coral);
  content: "";
}

.process-flow li > div {
  display: grid;
  gap: 0.8rem;
  min-height: 150px;
  padding: 1.3rem 1rem 1rem 0;
  color: inherit;
  text-decoration: none;
}

.flow-number {
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 900;
}

.process-flow strong {
  font-size: 0.91rem;
  line-height: 1.3;
}

.process-flow small {
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.45;
}

.section-note {
  max-width: 920px;
  margin: 2rem 0 0;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--sun);
  background: rgba(243, 180, 74, 0.12);
  color: var(--ink-soft);
  line-height: 1.6;
}

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

.feature-grid-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.feature-card {
  display: flex;
  min-width: 0;
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper-strong);
  flex-direction: column;
}

.feature-card h3 {
  font-size: clamp(1.45rem, 2.2vw, 2.2rem);
}

.feature-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.feature-card ul {
  margin-top: 1.2rem;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.feature-dark {
  border-color: transparent;
  background: var(--teal-dark);
  color: white;
}

.feature-dark p,
.feature-dark ul {
  color: rgba(255, 255, 255, 0.68);
}

.feature-mint {
  border-color: transparent;
  background: var(--mint);
}

.text-link {
  margin-top: 1.4rem;
  font-size: 0.78rem;
  font-weight: 900;
  text-underline-offset: 0.25em;
}

.content-section-dark {
  background: var(--ink);
  color: white;
}

.gallery-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.38fr) minmax(0, 0.62fr);
  gap: clamp(2rem, 4vw, 3rem);
  align-items: start;
}

.gallery-layout-reverse {
  grid-template-columns: minmax(0, 0.62fr) minmax(260px, 0.38fr);
}

.gallery-layout-reverse .gallery-copy {
  grid-column: 2;
}

.gallery-layout-reverse .screenshot-gallery {
  grid-column: 1;
  grid-row: 1;
}

.gallery-copy {
  min-width: 0;
}

.gallery-copy h2 {
  font-size: clamp(1.8rem, 2.7vw, 2.6rem);
  overflow-wrap: normal;
}

.gallery-copy > p:not(.eyebrow) {
  margin: 1.5rem 0 0;
  line-height: 1.7;
}

.focus-points {
  display: grid;
  gap: 0.7rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.focus-points li {
  position: relative;
  padding-left: 1.2rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.84rem;
  line-height: 1.4;
}

.focus-points li::before {
  position: absolute;
  top: 0.45rem;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sun);
  content: "";
}

.screenshot-gallery {
  min-width: 0;
}

.gallery-main {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 20px;
  background: white;
  box-shadow: 0 28px 76px rgba(0, 0, 0, 0.3);
  cursor: zoom-in;
  text-decoration: none;
}

.gallery-main img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: white;
  object-fit: contain;
}

.gallery-main > .zoom-label {
  position: static;
  display: block;
  width: 100%;
  padding: 0.55rem 0.85rem;
  text-align: right;
  border-radius: 0;
  background: rgba(22, 34, 42, 0.91);
  color: white;
  font-size: 0.875rem;
  font-weight: 900;
}

.screenshot-gallery-portrait {
  width: 100%;
  max-width: 32rem;
  justify-self: center;
}

.screenshot-gallery-portrait .gallery-main {
  max-width: 17rem;
  margin-inline: auto;
}

.screenshot-gallery-portrait .gallery-main img {
  aspect-ratio: 9 / 20;
}

.gallery-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.gallery-tabs button {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  min-height: 70px;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.19);
  border-radius: 11px;
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  text-align: left;
  cursor: pointer;
}

.gallery-tabs button.is-active {
  border-color: transparent;
  background: var(--mint);
  color: var(--ink);
}

.gallery-tabs strong,
.gallery-tabs span {
  overflow-wrap: anywhere;
}

.gallery-tabs strong {
  font-size: 0.79rem;
}

.gallery-tabs span {
  font-size: 0.875rem;
  line-height: 1.35;
}

.gallery-caption {
  min-height: 2.4em;
  margin: 0.9rem 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
  font-weight: 720;
  line-height: 1.45;
}

.role-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 2rem;
}

.role-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-strong);
}

.role-card summary {
  display: grid;
  grid-template-columns: 46px minmax(180px, 0.45fr) minmax(0, 0.55fr) 32px;
  gap: 1rem;
  align-items: center;
  min-height: 74px;
  padding: 1rem 1.2rem;
  cursor: pointer;
  list-style: none;
}

.role-card summary::-webkit-details-marker {
  display: none;
}

.role-card summary span {
  color: var(--coral);
  font-size: 0.7rem;
  font-weight: 900;
}

.role-card summary strong {
  font-size: 1rem;
}

.role-card summary em {
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-style: normal;
  line-height: 1.45;
}

.role-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0 1.2rem 1.2rem 4.2rem;
}

.role-card dl div {
  padding: 1rem;
  border-top: 1px solid var(--line);
}

.role-card dt {
  margin-bottom: 0.45rem;
  color: var(--teal);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.role-card dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.55;
}

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

.stage-card {
  display: flex;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper-strong);
  text-decoration: none;
  flex-direction: column;
}

.stage-image {
  overflow: hidden;
  margin-bottom: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.stage-image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.stage-card > span {
  color: var(--coral);
  font-size: 0.7rem;
  font-weight: 900;
}

.stage-card h3 {
  margin: 1.4rem 0 0.8rem;
  font-size: 1.7rem;
}

.stage-card p {
  margin: 0 0 1.4rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.stage-card > strong {
  margin-top: auto;
  font-size: 0.75rem;
}

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

.branch-card {
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-strong);
}

.branch-primary {
  border-color: transparent;
  background: var(--mint);
}

.branch-card h3 {
  margin: 2.6rem 0 1rem;
}

.branch-card > p {
  color: var(--ink-soft);
  line-height: 1.6;
}

.branch-card ol {
  display: grid;
  gap: 0.7rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: branch;
}

.branch-card li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 0.8rem;
  align-items: start;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(22, 34, 42, 0.14);
  line-height: 1.45;
  counter-increment: branch;
}

.branch-card li::before {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  content: counter(branch);
  font-size: 0.65rem;
  font-weight: 900;
}

.branch-card small {
  display: block;
  margin-top: 1.5rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.questions-section {
  background: var(--paper-muted);
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 2rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.question-grid article {
  min-width: 0;
  padding: 1.5rem;
  background: var(--paper-strong);
}

.question-grid h3 {
  margin: 0 0 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.18;
}

.question-grid p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.55;
}

.source-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 3rem;
}

.source-cloud span {
  padding: 0.72rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-strong);
  color: var(--ink-soft);
  font-size: 0.83rem;
  font-weight: 750;
}

.evidence-note {
  max-width: 1000px;
  padding: clamp(2rem, 6vw, 5rem);
  border-radius: 28px;
  background: var(--teal-dark);
  color: white;
}

.evidence-note h2 {
  max-width: 850px;
  margin: 0 0 1.5rem;
  font-size: clamp(2rem, 3vw, 3rem);
}

.evidence-note > p:not(.eyebrow) {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.7;
}

.evidence-note ul {
  max-width: 760px;
  margin-top: 2rem;
}

.evidence-note li {
  border-color: rgba(255, 255, 255, 0.15);
}

.evidence-note li::before {
  background: var(--sun);
}

.narrative-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 7vw, 7rem);
}

.narrative-copy p {
  margin: 0 0 1.2rem;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.75;
}

.narrative-copy ul {
  margin-top: 2rem;
}

.related-pages {
  padding-block: 5rem;
  border-top: 1px solid var(--line);
}

.production-pager {
  padding-block: 4rem;
  border-top: 1px solid var(--line);
  background: var(--paper-muted);
}

.production-pager-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.production-pager-link {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 132px;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-strong);
  text-decoration: none;
}

.production-pager-link:hover,
.production-pager-link:focus-visible {
  border-color: var(--teal);
}

.production-pager-link:focus-visible {
  outline: 3px solid rgba(14, 111, 105, 0.28);
  outline-offset: 3px;
}

.pager-next {
  grid-column: 2;
  text-align: right;
}

.pager-direction {
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.production-pager-link strong {
  align-self: end;
  margin-top: 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.pager-arrow {
  position: absolute;
  right: 1.4rem;
  bottom: 1.4rem;
  font-size: 1.2rem;
}

.pager-next strong {
  padding-right: 1.8rem;
}

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

.related-grid a {
  position: relative;
  display: grid;
  gap: 0.6rem;
  min-height: 150px;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-strong);
  text-decoration: none;
}

.related-grid a:hover {
  border-color: var(--teal);
}

.related-grid span {
  color: var(--teal);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.related-grid strong {
  max-width: 85%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.related-grid em {
  position: absolute;
  right: 1.3rem;
  bottom: 1.3rem;
  font-style: normal;
}

.site-footer {
  padding-block: clamp(2.5rem, 5vw, 4.5rem) 2.5rem;
  background: var(--ink);
  color: white;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 2rem 4rem;
  padding-bottom: 2.75rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.contact-person .eyebrow {
  color: var(--mint);
  font-size: 0.875rem;
}

.contact-person h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 3.5vw, 3.25rem);
  line-height: 1.12;
}

.contact-role {
  margin: 0;
  color: #c3cfd5;
  font-size: 1rem;
}

.contact-hours {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
  margin: 1.75rem 0 0;
  font-size: 1rem;
  line-height: 1.5;
}

.contact-hours > span { color: #c3cfd5; }
.contact-hours strong { font-weight: 600; }

.contact-methods {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
  font-style: normal;
}

.contact-link {
  display: grid;
  gap: 0.3rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(204, 228, 217, 0.25);
  border-radius: 14px;
  background: rgba(204, 228, 217, 0.05);
  text-decoration: none;
}

.contact-link > span,
.contact-messengers-label {
  color: #c3cfd5;
  font-size: 0.875rem;
}

.contact-link strong {
  min-width: 0;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.contact-link:hover {
  border-color: var(--mint);
  background: rgba(204, 228, 217, 0.1);
}

.contact-messengers { padding: 0.5rem 0; }
.contact-messenger-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.25rem;
  margin-top: 0.5rem;
  font-size: 1rem;
  line-height: 1.5;
}

.contact-messenger-options a {
  color: var(--mint);
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
}

.contact-link:focus-visible,
.contact-messenger-options a:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 4px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 2rem 5rem;
}

.brand-footer {
  font-size: 1.8rem;
}

.footer-grid p {
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.55;
}

.footer-grid nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1.2rem;
  align-content: start;
}

.footer-grid nav a {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.8rem;
  text-underline-offset: 0.25em;
}

.lightbox-open {
  overflow: hidden;
}

@media (max-width: 1180px) {
  .main-nav > a,
  .nav-group-line > a {
    padding-inline: 0.42rem;
    font-size: 0.74rem;
  }

  .site-header {
    gap: 1rem;
  }

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

@media (max-width: 1040px) {
  .site-header {
    grid-template-columns: auto auto 1fr;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    right: 0;
    left: 0;
    display: grid;
    max-height: calc(100vh - var(--header-height));
    padding: 0.85rem 4vw 1.5rem;
    overflow-y: auto;
    border-bottom: 1px solid var(--line);
    background: var(--paper-strong);
    box-shadow: 0 24px 40px rgba(22, 34, 42, 0.14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: 160ms ease;
  }

  .nav-open {
    overflow: hidden;
  }

  .nav-open .main-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .main-nav > a,
  .nav-group-toggle-mobile {
    width: 100%;
    min-height: 48px;
    padding-inline: 0.8rem;
    font-size: 0.88rem;
  }

  .nav-group-line-desktop {
    display: none;
  }

  .nav-group-toggle-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
  }

  .nav-group-toggle-mobile:hover,
  .nav-group-toggle-mobile:focus-visible {
    background: rgba(14, 111, 105, 0.09);
    color: var(--teal-dark);
  }

  .nav-group-toggle-mobile:focus-visible {
    outline: 3px solid rgba(14, 111, 105, 0.28);
    outline-offset: 2px;
  }

  .nav-children {
    position: static;
    width: auto;
    margin: 0 0 0.5rem 0.8rem;
    padding: 0;
    border: 0;
    border-left: 2px solid var(--mint);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-group:not(.is-open) .nav-children {
    display: none;
  }

  .nav-children a {
    min-height: 44px;
  }

  .hero-layout.has-visual,
  .section-intro,
  .gallery-layout,
  .narrative-grid {
    grid-template-columns: 1fr;
  }

  .page-hero:not(.page-hero-internal) .hero-layout.has-visual {
    grid-template-columns: 1fr;
    width: min(1220px, calc(100% - 8vw));
  }

  .hero-system {
    width: min(720px, 100%);
  }

  .gallery-layout-reverse .gallery-copy,
  .gallery-layout-reverse .screenshot-gallery {
    grid-column: auto;
    grid-row: auto;
  }

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

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

  .case-card {
    min-height: 310px;
  }



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

@media (max-width: 760px) {
  .section-shell {
    width: min(100% - 10vw, 1220px);
  }

  .page-hero:not(.page-hero-internal) .hero-layout.has-visual {
    width: min(100% - 10vw, 1220px);
  }

  .site-header {
    padding-inline: 5vw;
  }

  .page-hero {
    padding-block: 2.5rem;
  }

  h1,
  .page-hero-internal h1 {
    font-size: clamp(2rem, 6vw, 3rem);
  }

  h2 {
    font-size: clamp(1.85rem, 5vw, 2.5rem);
  }

  .hero-system::before {
    inset: -0.8rem 1rem 1rem -0.8rem;
  }

  .contour-grid,
  .comparison-grid,
  .branch-grid,
  .feature-grid,
  .feature-grid-compact,
  .stage-grid,
  .related-grid,
  .contact-section,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .contour-card {
    min-height: 285px;
  }

  .comparison-column {
    padding: 1.5rem;
  }

  .process-flow {
    grid-template-columns: 1fr;
  }

  .process-flow li {
    border-top: 0;
    border-left: 2px solid var(--ink);
  }

  .process-flow li::before {
    top: 0;
    left: -7px;
  }

  .process-flow li > div {
    min-height: auto;
    padding: 0 0 1.7rem 1.4rem;
  }

  .production-pager-grid {
    grid-template-columns: 1fr;
  }

  .pager-next {
    grid-column: 1;
  }


  .role-card summary {
    grid-template-columns: 34px 1fr 32px;
  }

  .role-card summary em {
    grid-column: 2;
  }

  .role-card dl {
    grid-template-columns: 1fr;
    padding-left: 1.2rem;
  }

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

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


}

@media (max-width: 520px) {
  h1,
  .page-hero-internal h1 {
    font-size: clamp(2rem, 9.5vw, 3.25rem);
    overflow-wrap: normal;
  }

  .page-hero:not(.page-hero-internal) h1 {
    font-size: clamp(2.35rem, 10vw, 3.25rem);
  }

  .hero-title-line {
    display: inline;
  }

  h2 {
    font-size: clamp(2rem, 8.5vw, 2.75rem);
  }

  .gallery-copy h2 {
    font-size: clamp(2rem, 8.5vw, 2.75rem);
  }

  .site-header {
    grid-template-columns: auto 1fr;
  }

  .mobile-menu-toggle {
    justify-self: end;
  }

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

  .system-spokes,
  .system-result,
  .gallery-tabs {
    grid-template-columns: 1fr;
  }

  .system-spokes span,
  .system-result span {
    min-height: 52px;
  }

  .section-intro {
    gap: 1.5rem;
  }

  .content-section {
    padding-block: 2.5rem;
  }

  .gallery-main > .zoom-label {
    right: 0.55rem;
    bottom: 0.55rem;
  }

  .map-layer {
    display: grid;
  }

  .map-node {
    width: 100%;
  }
}

/* Cropped preview frames keep the source pixels and full original untouched. */
.screenshot-preview { display: block; position: relative; overflow: hidden; width: 100%; background: white; }
.gallery-main .screenshot-preview img { position: absolute; display: block; max-width: none; height: auto; aspect-ratio: auto; object-fit: initial; }
.gallery-preview-stage { --gallery-preview-height: min(var(--gallery-preview-limit, 22rem), 46vh); display: grid; place-items: center; height: var(--gallery-preview-height); background: #eef1f0; }
.gallery-preview-stage .screenshot-preview { width: min(100%, calc(var(--gallery-preview-height) * var(--preview-ratio))); }
.gallery-caption-space { display: grid; }
.gallery-caption-space > p { grid-area: 1 / 1; }
.gallery-caption-sizer { visibility: hidden; pointer-events: none; user-select: none; }
.gallery-note { margin: .8rem 0 0; font-size: .875rem; line-height: 1.5; opacity: .8; }
.document-tabs { margin: 0; border-top: 1px solid var(--line); }
.document-tabs > div { display: grid; grid-template-columns: minmax(12rem, .28fr) minmax(0, .72fr); gap: 1.5rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.document-tabs dt { font-weight: 800; color: var(--teal); }
.document-tabs dd { margin: 0; color: var(--ink-soft); line-height: 1.6; }
@media (max-width: 680px) { .document-tabs > div { grid-template-columns: 1fr; gap: .35rem; } }
.no-js .site-header { position: static; display: flex; flex-wrap: wrap; padding-block: 1rem; }
.no-js .main-nav { position: static; display: flex; flex-wrap: wrap; flex: 1 0 100%; max-height: none; opacity: 1; visibility: visible; transform: none; box-shadow: none; }
.no-js .nav-group-line-desktop { display: flex; }
.no-js .nav-group .nav-children { position: static; display: flex; flex-wrap: wrap; width: auto; opacity: 1; visibility: visible; transform: none; box-shadow: none; }
.no-js .subnav-toggle, .no-js .nav-group-toggle-mobile, .no-js .mobile-menu-toggle, .no-js .gallery-tabs { display: none; }
.gallery-static-links { padding-left: 1.25rem; font-size: .95rem; line-height: 1.6; }
.gallery-main > .zoom-label { pointer-events: none; }
.hero-screen { min-width: 0; margin: 0; }
.hero-screen .gallery-main { border-color: var(--line); box-shadow: 0 18px 45px rgba(22,34,42,.12); }
.hero-screen figcaption { margin-top: 1.2rem; color: var(--ink-soft); line-height: 1.55; }
.hero-screen figcaption strong { color: var(--ink); font-size: 1.15rem; }
.hero-screen figcaption p { margin: .5rem 0 0; }
.hero-screen .gallery-caption { color: var(--ink-soft); font-weight: 400; }
.page-hero-internal .hero-lead { max-width: 980px; font-size: 1.075rem; }
.page-hero-internal .hero-support { max-width: 980px; margin-top: .85rem; font-size: .95rem; }
.page-hero-internal .breadcrumbs { margin-bottom: 1rem; }
.page-hero-internal .eyebrow { margin-bottom: .65rem; }
.gallery-section { padding-block: 3rem; }
.gallery-section + .gallery-section { margin-top: 1rem; }
.gallery-section-light { background: var(--paper-strong); color: var(--ink); }
.gallery-section-light .gallery-copy > p,
.gallery-section-light .focus-points li,
.gallery-section-light .gallery-caption { color: var(--ink-soft); }
.gallery-section-light .gallery-tabs button { color: var(--ink-soft); border-color: var(--line); }
.gallery-section-light .gallery-tabs button.is-active { color: var(--ink); border-color: var(--teal); }
.gallery-section-light .gallery-main { border-color: var(--line); box-shadow: 0 15px 40px rgba(22,34,42,.12); }
.role-card summary .role-chevron { font-size: 1.8rem; color: var(--teal); text-align: center; transition: transform .18s ease; }
.role-card[open] summary .role-chevron { transform: rotate(180deg); }

/* Sequences, simultaneous branches and data relationships use distinct layouts. */
.process-sequence { margin-top: 2rem; }
.process-flow { margin: 0; gap: 1.5rem; border: 0; }
.process-flow li { border: 1px solid var(--line); border-radius: 12px; background: var(--paper-strong); }
.process-flow li::before { display: none; }
.process-flow li > div { min-height: 100%; padding: 1rem; gap: .55rem; }
.process-flow li:not(:last-child)::after { content: "→"; position: absolute; right: -1.4rem; top: 1.1rem; color: var(--teal); font-weight: 800; }
.process-flow small { font-size: .875rem; }
.flow-continue { position: relative; margin: 1rem 0; display: flex; justify-content: center; color: var(--teal); font-size: .875rem; font-weight: 700; }
.flow-continue::before { content: ""; position: absolute; inset: 50% 0 auto; border-top: 2px solid var(--mint); }
.flow-continue span { position: relative; background: var(--paper); padding: .4rem 1rem; border: 1px solid var(--line); border-radius: 20px; }
.parallel-flow { margin-top: 2rem; }
.parallel-source { position: relative; width: max-content; max-width: 100%; margin: 0 auto; padding: 1rem 2rem; border-radius: 12px; background: var(--teal-dark); color: white; font-weight: 800; }
.parallel-source::after { content: ""; position: absolute; top: 100%; left: 50%; height: 1.5rem; border-left: 2px solid var(--teal); }
.parallel-branches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; padding: 1.5rem 0 0; margin: 1.5rem 0 0; list-style: none; position: relative; }
.parallel-branches::before { content: ""; position: absolute; top: 0; left: calc((100% - 3rem) / 6); right: calc((100% - 3rem) / 6); border-top: 2px solid var(--teal); }
.parallel-branches li { position: relative; padding: 1.5rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper-strong); }
.parallel-branches li::before { content: "↓"; position: absolute; bottom: 100%; left: 50%; height: 1.6rem; color: var(--teal); transform: translateX(-50%); }
.parallel-branches h3, .data-source h3 { font-size: 1.3rem; margin: 0 0 .8rem; }
.parallel-branches p, .data-source p, .data-relations dd { margin: 0; line-height: 1.6; color: var(--ink-soft); }
.data-relations { display: grid; grid-template-columns: minmax(0, .38fr) minmax(0, .62fr); gap: 2rem; margin-top: 2rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: 16px; }
.data-source { padding: 1.5rem; border-radius: 12px; background: var(--mint); align-self: start; }
.data-source > span { display: block; font-size: .8rem; margin-bottom: .8rem; color: var(--teal); }
.data-relations dl { margin: 0; display: grid; gap: 1rem; }
.data-relations dl > div { border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
.data-relations dt { font-weight: 800; margin-bottom: .4rem; }
.map-connection { display: block; width: 2px; height: 1.5rem; margin: 0 auto; border-left: 2px dashed rgba(255,255,255,.35); }

/* Local links remain on the current page and clear both sticky bars. */
.local-nav { position: sticky; top: var(--header-height); z-index: 35; border-bottom: 1px solid var(--line); background: var(--paper-strong); }
.local-nav .section-shell { display: flex; gap: .25rem; overflow-x: auto; padding-block: .35rem; }
.local-nav a { flex: 0 0 auto; padding: .65rem .8rem; color: var(--ink-soft); font-size: .9rem; text-decoration: none; border-radius: 6px; }
.local-nav a + a::before { content: "·"; margin-left: -.65rem; margin-right: .65rem; color: var(--ink-soft); }
.local-nav a:hover, .local-nav a[aria-current="location"] { background: var(--mint); color: var(--teal-dark); }
[data-local-section], #main-content { scroll-margin-top: calc(var(--header-height, 72px) + var(--local-nav-height, 0px) + 16px); }

/* Full-image viewer: fit or one CSS pixel per original pixel, with bounded panning. */
.image-lightbox { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: #101e25; color: white; }
.image-lightbox::backdrop { background: rgba(9,18,23,.94); }
.lightbox-frame { display: grid; grid-template-rows: auto minmax(0,1fr) auto; width: 100%; height: 100%; padding: 1rem; gap: .8rem; }
.lightbox-toolbar { display: flex; align-items: center; gap: 1rem; }
.lightbox-heading { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 1rem; }
.lightbox-heading h2 { font-family: inherit; font-size: 1.05rem; line-height: 1.4; letter-spacing: 0; }
.lightbox-heading > span { flex-shrink: 0; color: #b5c4cc; font-size: .95rem; }
.lightbox-modes { display: flex; flex-shrink: 0; gap: .2rem; padding: .2rem; border: 1px solid #53636c; border-radius: 9px; }
.lightbox-modes button { min-height: 40px; padding: .5rem .8rem; border: 0; border-radius: 6px; background: transparent; color: white; font: inherit; cursor: pointer; }
.lightbox-modes button[aria-pressed="true"] { background: var(--mint); color: var(--ink); }
.lightbox-toolbar > a { color: white; font-size: .9rem; }
.lightbox-close, .lightbox-arrow { display: grid; place-items: center; border: 0; border-radius: 10px; background: #293c46; color: white; cursor: pointer; flex-shrink: 0; }
.lightbox-close { width: 44px; height: 44px; font-size: 1.8rem; }
.lightbox-stage { display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; align-items: center; gap: .65rem; min-height: 0; }
.lightbox-viewport { width: 100%; height: 100%; min-height: 0; position: relative; overflow: hidden; }
.lightbox-viewport img { position: absolute; top: 0; left: 0; display: block; max-width: none; max-height: none; user-select: none; pointer-events: none; background: white; }
.lightbox-viewport.is-actual { touch-action: none; cursor: grab; }
.lightbox-viewport.is-dragging { cursor: grabbing; }
.lightbox-arrow { width: 44px; height: 60px; font-size: 2.5rem; }
.lightbox-arrow:disabled { opacity: .25; cursor: default; }
.lightbox-close:hover, .lightbox-arrow:not(:disabled):hover { background: #3b555f; }
.lightbox-footer { text-align: center; }
.lightbox-footer p { margin: 0 0 .4rem; font-size: .95rem; line-height: 1.4; }
.lightbox-footer > span { display: block; font-size: .8rem; color: #b5c4cc; }

@media (max-width: 1040px) {
  .gallery-layout, .gallery-layout-reverse { grid-template-columns: minmax(0,1fr); }
  .hero-layout { gap: 2rem; }
}
@media (max-width: 760px) {
  .process-flow { grid-template-columns: minmax(0,1fr); }
  .process-flow li:not(:last-child)::after { content: "↓"; top: auto; right: 50%; bottom: -1.4rem; }
  .flow-continue::before { inset: 0 auto; left: 50%; height: 100%; border-top: 0; border-left: 2px solid var(--mint); }
  .parallel-branches, .data-relations { grid-template-columns: minmax(0,1fr); }
  .parallel-branches { margin-left: .5rem; padding-left: 1.5rem; padding-top: 0; border-left: 2px solid var(--teal); }
  .parallel-source { width: auto; margin-left: .5rem; }
  .parallel-source::after { left: 0; }
  .parallel-branches::before { display: none; }
  .parallel-branches li::before { content: "→"; bottom: auto; top: 1rem; left: -1.5rem; transform: none; }
  .role-card summary .role-chevron { grid-column: 3; grid-row: 1 / span 2; }
  .lightbox-frame { padding: .5rem; }
  .lightbox-toolbar { flex-wrap: wrap; gap: .5rem; }
  .lightbox-heading { flex-basis: calc(100% - 60px); order: -2; }
  .lightbox-close { order: -1; }
  .lightbox-toolbar > a { margin-left: auto; }
  .lightbox-stage { grid-template-columns: 32px minmax(0,1fr) 32px; gap: .25rem; }
  .lightbox-arrow { width: 32px; height: 52px; }
  .gallery-copy h2, .evidence-note h2 { font-size: clamp(1.85rem, 5vw, 2.5rem); }
}
