/*
 * Vertz 3D knowledge base and photogrammetry project system
 * ---------------------------------------------------------
 * Additive styles loaded after /design-assets/site.css and
 * /design-variant.css. New rules are scoped to one of these wrappers:
 *
 *   .knowledge-system
 *   .photogrammetry-project-page
 *
 * The stylesheet intentionally does not finalise the global glossary tooltip.
 * Its final visual treatment is pending a separate design reference.
 */

.ks-skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 2147483600;
  padding: 10px 14px;
  border-radius: 4px;
  background: #0b1a29;
  color: #fff;
  font-weight: 750;
  text-decoration: none;
  transform: translateY(-180%);
}

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

.ks-anchor {
  display: block;
  scroll-margin-top: calc(var(--ks-sticky-top) + 24px);
}

:where(.knowledge-system, .photogrammetry-project-page) [data-ks-card] > a {
  display: flex;
  min-height: 100%;
  flex: 1;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

:where(.knowledge-system, .photogrammetry-project-page) {
  --ks-ink: #0a1624;
  --ks-ink-soft: #223348;
  --ks-muted: #5a6879;
  --ks-muted-strong: #3e4e62;
  --ks-line: #d9e2ec;
  --ks-line-strong: #bdcad8;
  --ks-surface: #ffffff;
  --ks-surface-soft: #f5f8fb;
  --ks-surface-blue: #eef4fa;
  --ks-accent: #225f97;
  --ks-accent-strong: #17466f;
  --ks-accent-soft: #d9e8f5;
  --ks-positive: #2a6c59;
  --ks-warning: #8a5b16;
  --ks-focus: #0b6fd3;
  --ks-shadow: 0 18px 46px rgba(16, 42, 68, .08);
  --ks-shadow-small: 0 8px 24px rgba(16, 42, 68, .06);
  --ks-radius: 6px;
  --ks-radius-large: 10px;
  --ks-shell: 1360px;
  --ks-reading: 74ch;
  --ks-sticky-top: 104px;
  color: var(--ks-ink);
  background: var(--ks-surface);
}

:where(.knowledge-system, .photogrammetry-project-page),
:where(.knowledge-system, .photogrammetry-project-page) *,
:where(.knowledge-system, .photogrammetry-project-page) *::before,
:where(.knowledge-system, .photogrammetry-project-page) *::after {
  box-sizing: border-box;
}

:where(.knowledge-system, .photogrammetry-project-page) :where(
  article,
  aside,
  div,
  figure,
  header,
  main,
  section
) {
  min-width: 0;
}

:where(.knowledge-system, .photogrammetry-project-page) :where(
  h1,
  h2,
  h3,
  h4,
  p,
  li,
  a,
  button,
  figcaption,
  dd,
  dt
) {
  overflow-wrap: break-word;
}

:where(.knowledge-system, .photogrammetry-project-page) :where(
  h2[id],
  h3[id],
  section[id]
) {
  scroll-margin-top: calc(var(--ks-sticky-top) + 24px);
}

:where(.knowledge-system, .photogrammetry-project-page) :where(
  a,
  button,
  input,
  select,
  summary,
  textarea,
  [tabindex]:not([tabindex="-1"])
):focus-visible {
  outline: 3px solid var(--ks-focus);
  outline-offset: 3px;
}

:where(.knowledge-system, .photogrammetry-project-page) :where(
  button,
  input,
  select,
  textarea
) {
  font: inherit;
}

:where(.knowledge-system, .photogrammetry-project-page) button {
  color: inherit;
}

:where(.knowledge-system, .photogrammetry-project-page) [hidden] {
  display: none !important;
}

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

.ks-shell {
  width: min(var(--ks-shell), calc(100% - 48px));
  margin-inline: auto;
}

.ks-reading-width {
  width: min(100%, var(--ks-reading));
}

.ks-section {
  position: relative;
  padding-block: clamp(64px, 7vw, 104px);
}

.ks-section--compact {
  padding-block: clamp(44px, 5vw, 72px);
}

.ks-section--soft {
  background: var(--ks-surface-soft);
  border-block: 1px solid var(--ks-line);
}

.ks-section-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  align-items: end;
  gap: 32px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.ks-section-header > :only-child {
  grid-column: 1 / -1;
  max-width: 820px;
}

.ks-section-header h2 {
  max-width: 840px;
  margin-bottom: 0;
  font-size: clamp(2rem, 3.5vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -.035em;
}

.ks-section-header p {
  margin-bottom: 0;
  color: var(--ks-muted);
  font-size: clamp(1rem, 1.25vw, 1.125rem);
  line-height: 1.72;
}

.ks-eyebrow,
.ks-kicker,
.ks-category {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  color: var(--ks-accent-strong);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .13em;
  line-height: 1.3;
  text-transform: uppercase;
}

.ks-eyebrow::before,
.ks-kicker::before {
  width: 22px;
  height: 1px;
  background: currentColor;
  content: "";
}

.ks-lead {
  max-width: 68ch;
  color: var(--ks-ink-soft);
  font-size: clamp(1.08rem, 1.4vw, 1.25rem);
  line-height: 1.72;
}

.ks-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.ks-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--ks-ink);
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color .2s ease,
    border-color .2s ease,
    color .2s ease,
    transform .2s ease;
}

.ks-button--primary {
  border-color: var(--ks-accent-strong);
  background: var(--ks-accent-strong);
  color: #fff;
}

.ks-button--secondary {
  border-color: var(--ks-line-strong);
  background: var(--ks-surface);
}

.ks-button--text {
  min-height: 44px;
  padding-inline: 0;
  color: var(--ks-accent-strong);
}

.ks-button__arrow {
  transition: transform .2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .ks-button:hover {
    transform: translateY(-2px);
  }

  .ks-button--primary:hover {
    border-color: #103958;
    background: #103958;
  }

  .ks-button--secondary:hover {
    border-color: var(--ks-accent);
    color: var(--ks-accent-strong);
  }

  .ks-button:hover .ks-button__arrow {
    transform: translateX(3px);
  }
}

/* Hero shared by the index, term detail and technical articles. */
.ks-hero,
.knowledge-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--ks-line);
  background:
    linear-gradient(90deg, rgba(34, 95, 151, .045) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(rgba(34, 95, 151, .045) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(135deg, #fff 0%, #f8fafc 64%, #edf4fa 100%);
}

.ks-hero::after,
.knowledge-hero::after {
  position: absolute;
  right: -9%;
  bottom: -54%;
  z-index: -1;
  width: min(52vw, 760px);
  aspect-ratio: 1;
  border: 1px solid rgba(34, 95, 151, .12);
  border-radius: 50%;
  box-shadow:
    0 0 0 72px rgba(34, 95, 151, .025),
    0 0 0 144px rgba(34, 95, 151, .018);
  content: "";
}

.ks-hero__inner,
.knowledge-hero__inner {
  display: grid;
  min-height: clamp(500px, 54vw, 660px);
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, .78fr);
  align-items: center;
  gap: clamp(40px, 6vw, 88px);
  padding-block: clamp(72px, 8vw, 112px);
}

.ks-hero__copy h1,
.knowledge-hero__copy h1 {
  max-width: 900px;
  margin-bottom: 24px;
  font-size: clamp(3rem, 5.7vw, 5.25rem);
  line-height: .98;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.ks-hero__copy > p,
.knowledge-hero__copy > p {
  max-width: 66ch;
}

.ks-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.ks-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  color: var(--ks-muted);
  font-size: .9rem;
  list-style: none;
}

.ks-breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ks-breadcrumb li:not(:last-child)::after {
  color: #8a98a8;
  content: "/";
}

.ks-breadcrumb a {
  color: var(--ks-accent-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* CSS-first technical visual. It remains decorative; meaningful labels belong in HTML. */
.ks-technical-visual,
.technical-visual {
  position: relative;
  isolation: isolate;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius-large);
  background:
    linear-gradient(rgba(33, 74, 111, .075) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(33, 74, 111, .075) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(145deg, #f9fbfd 0%, #eaf2f8 100%);
  box-shadow: var(--ks-shadow);
}

.ks-technical-visual::before,
.technical-visual::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 58%;
  aspect-ratio: 1.08;
  border: 1px solid rgba(34, 95, 151, .55);
  background:
    repeating-linear-gradient(34deg, transparent 0 20px, rgba(34, 95, 151, .24) 21px 22px),
    repeating-linear-gradient(-31deg, transparent 0 24px, rgba(34, 95, 151, .2) 25px 26px),
    rgba(255, 255, 255, .44);
  clip-path: polygon(50% 0, 86% 13%, 100% 48%, 82% 88%, 42% 100%, 8% 79%, 0 38%, 19% 9%);
  content: "";
  transform: translate(-50%, -50%) rotate(-7deg);
  filter: drop-shadow(0 18px 20px rgba(25, 62, 96, .12));
}

.ks-technical-visual::after,
.technical-visual::after {
  position: absolute;
  right: 18px;
  bottom: 16px;
  max-width: calc(100% - 36px);
  padding: 6px 9px;
  border: 1px solid rgba(34, 95, 151, .22);
  border-radius: 3px;
  background: rgba(255, 255, 255, .82);
  color: var(--ks-muted-strong);
  content: attr(data-label);
  font: 700 .65rem/1.2 Inter, Arial, sans-serif;
  letter-spacing: .11em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  display: none;
}

.ks-technical-visual[data-label]:not([data-label=""])::after,
.technical-visual[data-label]:not([data-label=""])::after {
  display: block;
}

.ks-technical-visual[data-visual="point-cloud"]::before,
.ks-technical-visual.is-point-cloud::before,
.technical-visual[data-visual="point-cloud"]::before {
  width: 64%;
  border: 0;
  background:
    radial-gradient(circle, rgba(22, 69, 108, .95) 0 1px, transparent 1.5px) 0 0 / 12px 12px,
    radial-gradient(circle, rgba(48, 115, 169, .72) 0 1.2px, transparent 1.7px) 4px 6px / 17px 17px,
    radial-gradient(circle, rgba(104, 154, 194, .8) 0 1px, transparent 1.5px) 2px 1px / 23px 19px;
  clip-path: polygon(14% 14%, 62% 0, 94% 21%, 100% 64%, 72% 100%, 23% 91%, 0 59%);
  filter:
    drop-shadow(0 0 1px rgba(16, 65, 106, .3))
    drop-shadow(0 18px 20px rgba(25, 62, 96, .14));
  transform: translate(-50%, -50%) perspective(540px) rotateX(58deg) rotateZ(-16deg);
}

.ks-technical-visual[data-visual="mesh"]::before,
.ks-technical-visual.is-mesh::before,
.technical-visual[data-visual="mesh"]::before {
  background:
    repeating-linear-gradient(31deg, transparent 0 18px, rgba(29, 91, 143, .45) 19px 20px),
    repeating-linear-gradient(-34deg, transparent 0 20px, rgba(29, 91, 143, .38) 21px 22px);
}

.ks-technical-visual[data-visual="cad"]::before,
.ks-technical-visual.is-cad::before,
.technical-visual[data-visual="cad"]::before {
  width: 55%;
  border: 2px solid rgba(25, 77, 120, .72);
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(25, 77, 120, .25) 50%, transparent 50.5%),
    linear-gradient(transparent 49.5%, rgba(25, 77, 120, .25) 50%, transparent 50.5%),
    linear-gradient(145deg, rgba(255, 255, 255, .8), rgba(205, 224, 239, .42));
  clip-path: polygon(17% 0, 84% 0, 100% 22%, 100% 78%, 82% 100%, 18% 100%, 0 78%, 0 22%);
  box-shadow:
    inset 0 0 0 14px rgba(255, 255, 255, .42),
    inset 0 0 0 15px rgba(25, 77, 120, .24);
  transform: translate(-50%, -50%) perspective(620px) rotateX(55deg) rotateZ(-33deg);
}

.ks-technical-visual[data-visual="photogrammetry"],
.ks-technical-visual.is-photogrammetry,
.technical-visual[data-visual="photogrammetry"] {
  background:
    radial-gradient(circle at 12% 18%, #2d699c 0 5px, transparent 6px),
    radial-gradient(circle at 84% 16%, #2d699c 0 5px, transparent 6px),
    radial-gradient(circle at 91% 76%, #2d699c 0 5px, transparent 6px),
    radial-gradient(circle at 15% 82%, #2d699c 0 5px, transparent 6px),
    linear-gradient(29deg, transparent 0 49.5%, rgba(45, 105, 156, .13) 50%, transparent 50.5%) 0 0 / 100% 100%,
    linear-gradient(-29deg, transparent 0 49.5%, rgba(45, 105, 156, .13) 50%, transparent 50.5%) 0 0 / 100% 100%,
    linear-gradient(rgba(33, 74, 111, .07) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(33, 74, 111, .07) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(145deg, #f9fbfd 0%, #eaf2f8 100%);
}

.ks-technical-visual[data-visual="photogrammetry"]::before,
.ks-technical-visual.is-photogrammetry::before,
.technical-visual[data-visual="photogrammetry"]::before {
  width: 48%;
  background:
    repeating-linear-gradient(31deg, transparent 0 15px, rgba(34, 95, 151, .35) 16px 17px),
    repeating-linear-gradient(-34deg, transparent 0 18px, rgba(34, 95, 151, .28) 19px 20px),
    rgba(255, 255, 255, .52);
}

.ks-technical-visual[data-visual="measurement"]::before,
.ks-technical-visual.is-measurement::before,
.technical-visual[data-visual="measurement"]::before {
  width: 56%;
  border: 2px solid rgba(25, 77, 120, .7);
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(25, 77, 120, .25) 50%, transparent 50.5%),
    linear-gradient(transparent 49.5%, rgba(25, 77, 120, .25) 50%, transparent 50.5%),
    rgba(255, 255, 255, .55);
  clip-path: polygon(10% 8%, 88% 0, 100% 72%, 76% 100%, 0 88%);
  transform: translate(-50%, -50%) rotate(-4deg);
}

.ks-technical-visual[data-visual="solid"]::before,
.technical-visual[data-visual="solid"]::before {
  width: 52%;
  border: 2px solid rgba(25, 77, 120, .72);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .88), rgba(188, 215, 236, .58));
  clip-path: polygon(24% 0, 82% 0, 100% 24%, 100% 82%, 76% 100%, 18% 100%, 0 74%, 0 18%);
  box-shadow:
    inset -22px -18px 0 rgba(34, 95, 151, .09),
    inset 16px 14px 0 rgba(255, 255, 255, .38);
  transform: translate(-50%, -50%) perspective(600px) rotateX(54deg) rotateZ(-31deg);
}

.ks-technical-visual[data-visual="scan"]::before,
.technical-visual[data-visual="scan"]::before {
  width: 65%;
  border: 0;
  background:
    linear-gradient(90deg, transparent 0 47%, rgba(23, 108, 170, .92) 49% 51%, transparent 53%),
    radial-gradient(circle, rgba(25, 77, 120, .86) 0 1.2px, transparent 1.8px) 0 0 / 13px 13px,
    radial-gradient(circle, rgba(90, 145, 188, .7) 0 1px, transparent 1.6px) 5px 4px / 19px 17px;
  clip-path: polygon(13% 10%, 73% 0, 100% 28%, 91% 86%, 37% 100%, 0 68%);
  filter: drop-shadow(0 18px 20px rgba(25, 62, 96, .16));
  transform: translate(-50%, -50%) perspective(600px) rotateX(57deg) rotateZ(-12deg);
}

.ks-technical-visual[data-visual="bim"]::before,
.technical-visual[data-visual="bim"]::before {
  width: 58%;
  border: 2px solid rgba(25, 77, 120, .68);
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .66) 0 18px, rgba(34, 95, 151, .24) 19px 21px),
    repeating-linear-gradient(90deg, transparent 0 38px, rgba(34, 95, 151, .22) 39px 41px),
    rgba(204, 225, 241, .58);
  clip-path: polygon(15% 0, 82% 0, 100% 19%, 100% 100%, 0 100%, 0 17%);
  transform: translate(-50%, -50%) perspective(660px) rotateX(59deg) rotateZ(-28deg);
}

.ks-technical-visual[data-visual="texture"]::before,
.technical-visual[data-visual="texture"]::before {
  width: 56%;
  border: 1px solid rgba(25, 77, 120, .66);
  background:
    conic-gradient(from 90deg, rgba(34, 95, 151, .3) 25%, rgba(255, 255, 255, .7) 0 50%, rgba(34, 95, 151, .18) 0 75%, rgba(255, 255, 255, .9) 0) 0 0 / 32px 32px;
  clip-path: polygon(10% 8%, 91% 0, 100% 82%, 17% 100%, 0 25%);
  transform: translate(-50%, -50%) perspective(600px) rotateX(58deg) rotateZ(-17deg);
}

.ks-technical-visual[data-visual="shader"]::before,
.technical-visual[data-visual="shader"]::before {
  width: 52%;
  border: 1px solid rgba(25, 77, 120, .45);
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 28%, rgba(255, 255, 255, .98) 0 5%, rgba(133, 179, 214, .7) 13%, rgba(32, 87, 132, .88) 44%, #102f49 76%, #081723 100%);
  clip-path: none;
  box-shadow: inset -24px -26px 36px rgba(0, 0, 0, .18);
  transform: translate(-50%, -50%);
}

.ks-technical-visual[data-visual="uv"]::before,
.technical-visual[data-visual="uv"]::before {
  width: 60%;
  border: 2px solid rgba(25, 77, 120, .65);
  background:
    repeating-linear-gradient(0deg, transparent 0 24px, rgba(34, 95, 151, .34) 25px 26px),
    repeating-linear-gradient(90deg, transparent 0 24px, rgba(34, 95, 151, .34) 25px 26px),
    linear-gradient(135deg, rgba(255, 255, 255, .8), rgba(205, 225, 241, .55));
  clip-path: polygon(0 0, 44% 0, 50% 30%, 57% 0, 100% 0, 100% 45%, 71% 51%, 100% 58%, 100% 100%, 58% 100%, 51% 72%, 43% 100%, 0 100%, 0 60%, 28% 52%, 0 44%);
  transform: translate(-50%, -50%) rotate(-5deg);
}

.ks-technical-visual[data-visual="resolution"]::before,
.technical-visual[data-visual="resolution"]::before {
  width: 68%;
  border: 0;
  background:
    radial-gradient(circle, rgba(18, 66, 104, .92) 0 1px, transparent 1.5px) 100% 0 / 7px 7px,
    radial-gradient(circle, rgba(52, 111, 158, .8) 0 1.5px, transparent 2px) 50% 0 / 13px 13px,
    radial-gradient(circle, rgba(104, 154, 194, .85) 0 2.5px, transparent 3px) 0 0 / 25px 25px;
  clip-path: polygon(0 18%, 100% 0, 100% 82%, 0 100%);
  filter: drop-shadow(0 18px 18px rgba(25, 62, 96, .12));
  transform: translate(-50%, -50%) perspective(600px) rotateX(58deg) rotateZ(-7deg);
}

.ks-technical-visual[data-visual="tour"]::before,
.technical-visual[data-visual="tour"]::before {
  width: 62%;
  aspect-ratio: 1.6;
  border: 2px solid rgba(25, 77, 120, .7);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at center, transparent 0 36%, rgba(255, 255, 255, .8) 37% 43%, transparent 44%),
    conic-gradient(from 20deg, rgba(34, 95, 151, .55), rgba(205, 226, 242, .65), rgba(34, 95, 151, .55));
  clip-path: none;
  box-shadow: inset 0 0 0 18px rgba(255, 255, 255, .25);
  transform: translate(-50%, -50%) perspective(600px) rotateX(63deg) rotateZ(-8deg);
}

.ks-visual-axis {
  position: absolute;
  left: 22px;
  bottom: 22px;
  width: 62px;
  height: 62px;
  border-bottom: 2px solid #4177a3;
  border-left: 2px solid #4177a3;
  opacity: .8;
}

.ks-visual-axis::after {
  position: absolute;
  bottom: -2px;
  left: -2px;
  width: 52px;
  border-top: 2px solid #7b8da0;
  content: "";
  transform: rotate(-38deg);
  transform-origin: left center;
}

/* Search, categories and term index. */
.ks-index-tools,
.knowledge-index-tools {
  position: relative;
  z-index: 2;
  margin-top: -34px;
  padding: 24px;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius-large);
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--ks-shadow);
  backdrop-filter: blur(12px);
}

.ks-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
}

.ks-field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--ks-ink-soft);
  font-size: .82rem;
  font-weight: 750;
}

.ks-search-field,
:where(.knowledge-system, .photogrammetry-project-page) [data-ks-search] {
  position: relative;
}

.ks-search-field::before,
:where(.knowledge-system, .photogrammetry-project-page) [data-ks-search]::before {
  position: absolute;
  top: 50%;
  left: 18px;
  width: 15px;
  height: 15px;
  border: 2px solid var(--ks-muted);
  border-radius: 50%;
  content: "";
  pointer-events: none;
  transform: translateY(-58%);
}

.ks-search-field::after,
:where(.knowledge-system, .photogrammetry-project-page) [data-ks-search]::after {
  position: absolute;
  top: calc(50% + 5px);
  left: 31px;
  width: 7px;
  border-top: 2px solid var(--ks-muted);
  content: "";
  pointer-events: none;
  transform: rotate(45deg);
  transform-origin: left center;
}

.ks-search-input,
.knowledge-search-input,
:where(.knowledge-system, .photogrammetry-project-page) [data-ks-search-input] {
  width: 100%;
  min-height: 54px;
  padding: 12px 48px 12px 48px;
  border: 1px solid var(--ks-line-strong);
  border-radius: 4px;
  background: #fff;
  color: var(--ks-ink);
  font-size: 1rem;
  line-height: 1.3;
  appearance: none;
}

.ks-search-input::placeholder,
.knowledge-search-input::placeholder,
:where(.knowledge-system, .photogrammetry-project-page) [data-ks-search-input]::placeholder {
  color: #758395;
  opacity: 1;
}

.ks-search-input:focus,
.knowledge-search-input:focus,
:where(.knowledge-system, .photogrammetry-project-page) [data-ks-search-input]:focus {
  border-color: var(--ks-accent);
  box-shadow: 0 0 0 3px rgba(11, 111, 211, .12);
}

[data-ks-search-clear] {
  position: absolute;
  top: 50%;
  right: 7px;
  z-index: 1;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ks-muted-strong);
  cursor: pointer;
  transform: translateY(-50%);
}

[data-ks-search-clear]:hover {
  background: var(--ks-surface-blue);
  color: var(--ks-accent-strong);
}

.ks-results-count,
:where(.knowledge-system, .photogrammetry-project-page) [data-ks-result-count] {
  min-width: max-content;
  margin: 0;
  padding-bottom: 15px;
  color: var(--ks-muted);
  font-size: .9rem;
}

.ks-filter-group {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--ks-line);
}

.ks-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ks-filter,
.knowledge-filter,
:where(.knowledge-system, .photogrammetry-project-page) [data-ks-filter] {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid var(--ks-line);
  border-radius: 999px;
  background: var(--ks-surface);
  color: var(--ks-muted-strong);
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.15;
  cursor: pointer;
  white-space: nowrap;
}

.ks-filter[aria-pressed="true"],
.ks-filter.is-active,
.knowledge-filter[aria-pressed="true"],
.knowledge-filter.is-active,
:where(.knowledge-system, .photogrammetry-project-page) [data-ks-filter][aria-pressed="true"],
:where(.knowledge-system, .photogrammetry-project-page) [data-ks-filter].is-active {
  border-color: var(--ks-accent-strong);
  background: var(--ks-accent-strong);
  color: #fff;
}

@media (hover: hover) and (pointer: fine) {
  .ks-filter:hover,
  .knowledge-filter:hover,
  :where(.knowledge-system, .photogrammetry-project-page) [data-ks-filter]:hover {
    border-color: var(--ks-accent);
    color: var(--ks-accent-strong);
  }

  .ks-filter[aria-pressed="true"]:hover,
  .knowledge-filter[aria-pressed="true"]:hover,
  :where(.knowledge-system, .photogrammetry-project-page) [data-ks-filter][aria-pressed="true"]:hover {
    color: #fff;
  }
}

.ks-index-grid,
.knowledge-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.ks-term-card,
.knowledge-term-card,
:where(.knowledge-system, .photogrammetry-project-page) [data-ks-card] {
  position: relative;
  display: flex;
  min-height: 310px;
  flex-direction: column;
  padding: 26px;
  overflow: hidden;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius);
  background: var(--ks-surface);
  box-shadow: var(--ks-shadow-small);
  transition:
    border-color .22s ease,
    box-shadow .22s ease,
    transform .22s ease;
}

.ks-term-card::after,
.knowledge-term-card::after,
:where(.knowledge-system, .photogrammetry-project-page) [data-ks-card]::after {
  position: absolute;
  right: -34px;
  bottom: -34px;
  width: 108px;
  height: 108px;
  border: 1px solid rgba(34, 95, 151, .13);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.ks-term-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.ks-term-card__icon,
.ks-line-icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--ks-line);
  border-radius: 4px;
  background:
    linear-gradient(rgba(34, 95, 151, .07) 1px, transparent 1px) 0 0 / 8px 8px,
    linear-gradient(90deg, rgba(34, 95, 151, .07) 1px, transparent 1px) 0 0 / 8px 8px,
    var(--ks-surface-blue);
  color: var(--ks-accent-strong);
}

.ks-term-card__icon svg,
.ks-line-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.ks-term-card h2,
.ks-term-card h3,
.knowledge-term-card h2,
.knowledge-term-card h3,
:where(.knowledge-system, .photogrammetry-project-page) [data-ks-card] h2,
:where(.knowledge-system, .photogrammetry-project-page) [data-ks-card] h3 {
  margin: 22px 0 12px;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  line-height: 1.14;
  letter-spacing: -.025em;
}

.ks-term-card p,
.knowledge-term-card p,
:where(.knowledge-system, .photogrammetry-project-page) [data-ks-card] p {
  margin-bottom: 20px;
  color: var(--ks-muted);
  line-height: 1.65;
}

.ks-term-card__footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--ks-line);
}

.ks-term-card__link {
  color: var(--ks-accent-strong);
  font-weight: 750;
  text-decoration: none;
}

.ks-term-card__related {
  color: var(--ks-muted);
  font-size: .78rem;
  line-height: 1.4;
}

.ks-category {
  margin: 0;
  padding: 5px 8px;
  border: 1px solid var(--ks-accent-soft);
  border-radius: 3px;
  background: var(--ks-surface-blue);
  letter-spacing: .08em;
}

@media (hover: hover) and (pointer: fine) {
  .ks-term-card:hover,
  .knowledge-term-card:hover,
  :where(.knowledge-system, .photogrammetry-project-page) [data-ks-card]:hover {
    border-color: #afc5d8;
    box-shadow: var(--ks-shadow);
    transform: translateY(-4px);
  }

  .ks-term-card:hover .ks-term-card__link,
  .knowledge-term-card:hover .ks-term-card__link,
  :where(.knowledge-system, .photogrammetry-project-page) [data-ks-card]:hover .ks-term-card__link {
    text-decoration: underline;
    text-underline-offset: 4px;
  }
}

.ks-featured-term {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, .82fr);
  overflow: hidden;
  border: 1px solid var(--ks-line-strong);
  border-radius: var(--ks-radius-large);
  background: var(--ks-surface);
}

.ks-featured-term__copy {
  padding: clamp(32px, 5vw, 64px);
}

.ks-featured-term__copy h2 {
  margin-bottom: 18px;
  font-size: clamp(2.1rem, 4vw, 3.75rem);
  line-height: 1;
  letter-spacing: -.04em;
}

.ks-feature-list {
  display: grid;
  gap: 12px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.ks-feature-list li {
  position: relative;
  padding-left: 26px;
  color: var(--ks-ink-soft);
  line-height: 1.55;
}

.ks-feature-list li::before {
  position: absolute;
  top: .58em;
  left: 2px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--ks-accent);
  content: "";
  transform: rotate(45deg);
}

.ks-featured-term__visual {
  min-height: 420px;
  border-width: 0 0 0 1px;
  border-radius: 0;
  box-shadow: none;
}

.ks-no-results,
:where(.knowledge-system, .photogrammetry-project-page) [data-ks-empty] {
  grid-column: 1 / -1;
  padding: 48px 24px;
  border: 1px dashed var(--ks-line-strong);
  border-radius: var(--ks-radius);
  color: var(--ks-muted);
  text-align: center;
}

/* Knowledge detail: sticky term navigator and readable main content. */
.ks-detail-layout,
.knowledge-detail-layout {
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(34px, 5vw, 72px);
  padding-block: clamp(52px, 7vw, 96px);
}

.ks-sidebar,
.knowledge-sidebar,
:where(.knowledge-system, .photogrammetry-project-page) [data-ks-sidebar] {
  position: sticky;
  top: var(--ks-sticky-top);
  max-height: calc(100vh - var(--ks-sticky-top) - 24px);
  padding-right: 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--ks-line-strong) transparent;
}

.ks-sidebar__heading {
  margin: 0 0 14px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.ks-sidebar-toggle,
:where(.knowledge-system, .photogrammetry-project-page) [data-ks-sidebar-toggle] {
  display: none;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border: 1px solid var(--ks-line);
  border-radius: 4px;
  background: var(--ks-surface);
  color: var(--ks-ink);
  font-weight: 750;
  cursor: pointer;
}

.ks-sidebar-toggle::after,
:where(.knowledge-system, .photogrammetry-project-page) [data-ks-sidebar-toggle]::after {
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(45deg) translateY(-2px);
}

.ks-sidebar.is-open .ks-sidebar-toggle::after,
.ks-sidebar[open] > .ks-sidebar-toggle::after,
.ks-sidebar-toggle[aria-expanded="true"]::after,
:where(.knowledge-system, .photogrammetry-project-page) [data-ks-sidebar-toggle][aria-expanded="true"]::after {
  transform: rotate(225deg) translate(-2px, -2px);
}

.ks-sidebar-search {
  margin-bottom: 18px;
}

.ks-sidebar .ks-search-input {
  min-height: 48px;
  font-size: .92rem;
}

.ks-sidebar__group + .ks-sidebar__group {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--ks-line);
}

.ks-term-list,
.ks-category-list,
.ks-toc-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ks-term-list a,
.ks-category-list a,
.ks-toc-list a {
  display: block;
  padding: 9px 10px;
  border-left: 2px solid transparent;
  color: var(--ks-muted-strong);
  font-size: .9rem;
  line-height: 1.35;
  text-decoration: none;
}

.ks-term-list a[aria-current="page"],
.ks-term-list a.is-active,
.ks-category-list a[aria-current="page"],
.ks-toc-list a[aria-current="true"],
:where(.knowledge-system, .photogrammetry-project-page) [data-ks-toc] a[aria-current="true"],
:where(.knowledge-system, .photogrammetry-project-page) [data-ks-toc] a.is-active {
  border-left-color: var(--ks-accent);
  background: var(--ks-surface-blue);
  color: var(--ks-accent-strong);
  font-weight: 750;
}

@media (hover: hover) and (pointer: fine) {
  .ks-term-list a:hover,
  .ks-category-list a:hover,
  .ks-toc-list a:hover {
    background: var(--ks-surface-soft);
    color: var(--ks-accent-strong);
  }
}

.ks-detail-main {
  width: min(100%, 980px);
}

.ks-back-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
  color: var(--ks-accent-strong);
  font-weight: 700;
  text-decoration: none;
}

.ks-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .78fr);
  align-items: center;
  gap: clamp(30px, 5vw, 62px);
  padding-bottom: clamp(46px, 6vw, 72px);
  border-bottom: 1px solid var(--ks-line);
}

.ks-detail-hero h1 {
  margin-bottom: 20px;
  font-size: clamp(2.8rem, 5vw, 4.75rem);
  line-height: .98;
  letter-spacing: -.045em;
}

.ks-detail-hero .ks-technical-visual {
  min-height: 320px;
}

.ks-definition {
  position: relative;
  margin-top: 30px;
  padding: 22px 24px 22px 28px;
  border-left: 3px solid var(--ks-accent);
  background: var(--ks-surface-blue);
  color: var(--ks-ink-soft);
  font-size: clamp(1.03rem, 1.25vw, 1.16rem);
  line-height: 1.7;
}

.ks-detail-section {
  padding-block: clamp(38px, 5vw, 60px);
  border-bottom: 1px solid var(--ks-line);
}

.ks-detail-section h2 {
  margin-bottom: 18px;
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -.03em;
}

.ks-detail-section > :last-child {
  margin-bottom: 0;
}

.ks-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.ks-property-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 24px 0 0;
  padding: 1px;
  background: var(--ks-line);
  list-style: none;
}

.ks-property-list li {
  position: relative;
  min-height: 84px;
  padding: 18px 18px 18px 44px;
  background: var(--ks-surface);
  color: var(--ks-ink-soft);
  line-height: 1.5;
}

.ks-property-list li::before {
  position: absolute;
  top: 22px;
  left: 19px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--ks-accent);
  content: "";
}

.ks-related-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.ks-related-term {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 8px 13px;
  border: 1px solid var(--ks-line);
  border-radius: 999px;
  background: var(--ks-surface);
  color: var(--ks-accent-strong);
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .ks-related-term:hover {
    border-color: var(--ks-accent);
    background: var(--ks-surface-blue);
  }
}

/* Long-form article: editorial prose plus sticky TOC and optional aside. */
.ks-article-layout,
.knowledge-article-layout {
  display: grid;
  grid-template-columns: minmax(190px, 230px) minmax(0, 760px) minmax(210px, 1fr);
  align-items: start;
  gap: clamp(30px, 4vw, 60px);
  padding-block: clamp(54px, 7vw, 104px);
}

.ks-toc,
:where(.knowledge-system, .photogrammetry-project-page) [data-ks-toc] {
  position: sticky;
  top: var(--ks-sticky-top);
  max-height: calc(100vh - var(--ks-sticky-top) - 24px);
  overflow-y: auto;
}

.ks-toc__title {
  margin: 0 0 14px;
  color: var(--ks-ink);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.ks-toc-toggle {
  display: none;
}

.ks-toc-list a {
  padding-block: 7px;
  font-size: .84rem;
}

.ks-article-main {
  width: 100%;
}

.ks-article-aside {
  position: sticky;
  top: var(--ks-sticky-top);
  display: grid;
  gap: 16px;
}

.ks-prose {
  max-width: var(--ks-reading);
  color: var(--ks-ink-soft);
  font-size: clamp(1.02rem, 1.12vw, 1.125rem);
  line-height: 1.78;
}

.ks-prose > :first-child {
  margin-top: 0;
}

.ks-prose > :last-child {
  margin-bottom: 0;
}

.ks-prose h2 {
  margin: clamp(54px, 7vw, 84px) 0 20px;
  color: var(--ks-ink);
  font-size: clamp(1.95rem, 3.3vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.ks-prose h3 {
  margin: 40px 0 14px;
  color: var(--ks-ink);
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  line-height: 1.18;
  letter-spacing: -.02em;
}

.ks-prose h4 {
  margin: 30px 0 12px;
  color: var(--ks-ink);
  font-size: 1.08rem;
  line-height: 1.3;
}

.ks-prose p,
.ks-prose ul,
.ks-prose ol {
  margin: 0 0 1.45em;
}

.ks-prose ul,
.ks-prose ol {
  padding-left: 1.35em;
}

.ks-prose li + li {
  margin-top: .5em;
}

.ks-prose strong {
  color: var(--ks-ink);
}

.ks-prose a {
  color: var(--ks-accent-strong);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: rgba(23, 70, 111, .38);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.ks-prose a:hover {
  text-decoration-color: currentColor;
}

.ks-prose blockquote {
  margin: 34px 0;
  padding: 8px 0 8px 24px;
  border-left: 3px solid var(--ks-accent);
  color: var(--ks-ink);
  font-size: 1.18em;
  line-height: 1.65;
}

.ks-prose figure {
  width: min(112%, 960px);
  margin: clamp(36px, 5vw, 62px) 0 clamp(36px, 5vw, 62px);
}

.ks-prose figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius);
}

.ks-prose figcaption,
.ks-caption {
  margin-top: 10px;
  color: var(--ks-muted);
  font-size: .84rem;
  line-height: 1.55;
}

.ks-table-wrap {
  max-width: 100%;
  margin: 32px 0;
  overflow-x: auto;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius);
}

.ks-prose table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  background: var(--ks-surface);
  font-size: .94rem;
  line-height: 1.5;
}

.ks-prose th,
.ks-prose td {
  padding: 15px 17px;
  border-bottom: 1px solid var(--ks-line);
  text-align: left;
  vertical-align: top;
}

.ks-prose th {
  background: var(--ks-surface-blue);
  color: var(--ks-ink);
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

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

/* Definitions, comparisons, workflows and reusable technical callouts. */
.ks-panel,
.ks-definition-card,
.ks-aside-card {
  padding: 24px;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius);
  background: var(--ks-surface);
}

.ks-panel h2,
.ks-panel h3,
.ks-definition-card h2,
.ks-definition-card h3,
.ks-aside-card h2,
.ks-aside-card h3 {
  margin-bottom: 12px;
  color: var(--ks-ink);
  line-height: 1.18;
}

.ks-panel > :last-child,
.ks-definition-card > :last-child,
.ks-aside-card > :last-child {
  margin-bottom: 0;
}

.ks-callout,
.technical-callout {
  position: relative;
  margin-block: 34px;
  padding: 26px 28px 26px 32px;
  border: 1px solid var(--ks-line);
  border-left: 4px solid var(--ks-accent);
  border-radius: 0 var(--ks-radius) var(--ks-radius) 0;
  background: var(--ks-surface-blue);
  color: var(--ks-ink-soft);
}

.ks-callout--dark {
  border-color: #213449;
  border-left-color: #77a6cf;
  background: #0d1b2a;
  color: #dce7f1;
}

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

.ks-callout--positive {
  border-left-color: var(--ks-positive);
  background: #eef7f4;
}

.ks-callout__label {
  display: block;
  margin-bottom: 9px;
  color: var(--ks-accent-strong);
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.ks-callout--dark .ks-callout__label {
  color: #9bc4e6;
}

.ks-callout h2,
.ks-callout h3,
.technical-callout h2,
.technical-callout h3 {
  margin-bottom: 10px;
  color: var(--ks-ink);
  line-height: 1.18;
}

.ks-callout--dark h2,
.ks-callout--dark h3 {
  color: #fff;
}

.ks-callout > :last-child,
.technical-callout > :last-child {
  margin-bottom: 0;
}

.ks-accuracy-resolution {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr);
  align-items: stretch;
  margin-block: 38px;
  overflow: hidden;
  border: 1px solid var(--ks-line-strong);
  border-radius: var(--ks-radius-large);
  background: var(--ks-surface);
}

.ks-accuracy-resolution__item {
  padding: clamp(24px, 4vw, 38px);
}

.ks-accuracy-resolution__item h3 {
  margin-bottom: 10px;
  color: var(--ks-ink);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.ks-accuracy-resolution__item p {
  margin-bottom: 0;
  color: var(--ks-muted);
  line-height: 1.65;
}

.ks-accuracy-resolution__mark {
  display: grid;
  min-height: 100%;
  place-items: center;
  border-inline: 1px solid var(--ks-line);
  background: var(--ks-surface-blue);
  color: var(--ks-accent-strong);
  font-size: 2rem;
  font-weight: 700;
}

.ks-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-block: 36px;
  padding: 1px;
  background: var(--ks-line);
}

.ks-comparison__item {
  padding: clamp(24px, 4vw, 38px);
  background: var(--ks-surface);
}

.ks-comparison__item--visual {
  background: var(--ks-surface-blue);
}

.ks-comparison__label {
  display: block;
  margin-bottom: 14px;
  color: var(--ks-accent-strong);
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.ks-workflow {
  display: grid;
  grid-template-columns: repeat(var(--ks-workflow-steps, 5), minmax(0, 1fr));
  margin: 32px 0;
  padding: 0;
  list-style: none;
  counter-reset: workflow;
}

.ks-workflow li {
  position: relative;
  min-height: 132px;
  padding: 42px 24px 24px;
  border-block: 1px solid var(--ks-line);
  border-right: 1px solid var(--ks-line);
  background: var(--ks-surface);
  counter-increment: workflow;
}

.ks-workflow li:first-child {
  border-left: 1px solid var(--ks-line);
}

.ks-workflow li::before {
  position: absolute;
  top: 16px;
  left: 24px;
  color: var(--ks-accent);
  content: counter(workflow, decimal-leading-zero);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .08em;
}

.ks-workflow li:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -7px;
  z-index: 1;
  width: 12px;
  height: 12px;
  border-top: 1px solid var(--ks-line-strong);
  border-right: 1px solid var(--ks-line-strong);
  background: var(--ks-surface);
  content: "";
  transform: translateY(-50%) rotate(45deg);
}

.ks-workflow strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ks-ink);
  line-height: 1.3;
}

.ks-workflow span {
  color: var(--ks-muted);
  font-size: .88rem;
  line-height: 1.5;
}

.ks-faq {
  border-top: 1px solid var(--ks-line);
}

.ks-faq details {
  border-bottom: 1px solid var(--ks-line);
}

.ks-faq summary {
  position: relative;
  min-height: 60px;
  padding: 19px 48px 19px 0;
  color: var(--ks-ink);
  font-weight: 750;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}

.ks-faq summary::-webkit-details-marker {
  display: none;
}

.ks-faq summary::after {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--ks-accent);
  border-bottom: 2px solid var(--ks-accent);
  content: "";
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s ease;
}

.ks-faq details[open] summary::after {
  transform: translateY(-25%) rotate(225deg);
}

.ks-faq__answer {
  max-width: var(--ks-reading);
  padding: 0 48px 22px 0;
  color: var(--ks-muted);
  line-height: 1.72;
}

/* Related knowledge and project cards. */
.ks-related-grid,
.ks-project-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.ks-related-card,
.ks-project-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius);
  background: var(--ks-surface);
  color: var(--ks-ink);
  text-decoration: none;
}

.ks-related-card {
  padding: 24px;
}

.ks-related-card h3,
.ks-project-card h3 {
  margin-bottom: 10px;
  font-size: 1.35rem;
  line-height: 1.18;
}

.ks-related-card p,
.ks-project-card p {
  color: var(--ks-muted);
  line-height: 1.6;
}

.ks-related-card__link {
  margin-top: auto;
  padding-top: 16px;
  color: var(--ks-accent-strong);
  font-weight: 750;
}

.ks-project-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--ks-line);
  background: var(--ks-surface-soft);
}

.ks-project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.ks-project-card__copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.ks-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.ks-tag {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid var(--ks-line);
  border-radius: 999px;
  background: #fff;
  color: var(--ks-muted-strong);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .035em;
}

@media (hover: hover) and (pointer: fine) {
  .ks-related-card:hover,
  .ks-project-card:hover {
    border-color: #a9bfd2;
    box-shadow: var(--ks-shadow-small);
  }

  .ks-project-card:hover .ks-project-card__media img {
    transform: scale(1.025);
  }
}

/* Photogrammetry project case studies. */
.ks-project-hero,
.photogrammetry-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--ks-line);
  background: linear-gradient(135deg, #fff 0%, #f7fafc 70%, #eaf2f8 100%);
}

.ks-project-hero__inner,
.photogrammetry-hero__inner {
  display: grid;
  min-height: clamp(590px, 60vw, 760px);
  grid-template-columns: minmax(0, .92fr) minmax(480px, 1.08fr);
  align-items: center;
  gap: clamp(38px, 5vw, 74px);
  padding-block: clamp(64px, 7vw, 96px);
}

.ks-project-hero__copy h1,
.photogrammetry-hero__copy h1 {
  margin-bottom: 24px;
  font-size: clamp(3rem, 5.2vw, 5rem);
  line-height: .98;
  letter-spacing: -.047em;
  text-wrap: balance;
  overflow-wrap: normal;
  hyphens: auto;
}

@media (min-width: 901px) {
  .ks-project-hero__copy h1,
  .photogrammetry-hero__copy h1 {
    font-size: clamp(2.75rem, 4.15vw, 4.25rem);
  }
}

.ks-project-hero__copy .ks-lead {
  max-width: 62ch;
}

.ks-project-hero__media,
.photogrammetry-hero__media {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius-large);
  background: var(--ks-surface-soft);
  box-shadow: var(--ks-shadow);
}

.ks-project-hero__media img,
.photogrammetry-hero__media img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.ks-project-hero__caption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 4px;
  background: rgba(7, 19, 31, .78);
  color: #fff;
  font-size: .82rem;
  line-height: 1.45;
  backdrop-filter: blur(10px);
}

.ks-media-label {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 3px;
  background: rgba(8, 24, 39, .82);
  color: #fff;
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.ks-media-label--digital {
  background: rgba(23, 70, 111, .9);
}

.ks-media-label--technical {
  background: rgba(61, 76, 91, .9);
}

.ks-project-metadata,
.project-metadata {
  position: relative;
  z-index: 2;
  margin-top: -1px;
  border-bottom: 1px solid var(--ks-line);
  background: var(--ks-surface);
}

.ks-project-metadata__grid,
.project-metadata__grid {
  display: grid;
  grid-template-columns: repeat(var(--ks-meta-columns, 4), minmax(0, 1fr));
}

.ks-meta-item {
  min-height: 112px;
  padding: 25px 28px;
  border-right: 1px solid var(--ks-line);
}

.ks-meta-item:first-child {
  border-left: 1px solid var(--ks-line);
}

.ks-meta-item dt,
.ks-meta-label {
  margin-bottom: 7px;
  color: var(--ks-muted);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.ks-meta-item dd,
.ks-meta-value {
  margin: 0;
  color: var(--ks-ink);
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  font-weight: 750;
  line-height: 1.35;
}

.ks-project-intro {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: clamp(38px, 7vw, 96px);
}

.ks-project-intro__title {
  position: sticky;
  top: var(--ks-sticky-top);
}

.ks-project-intro__title h2 {
  margin-bottom: 0;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1.02;
  letter-spacing: -.04em;
}

.ks-project-intro__copy {
  max-width: var(--ks-reading);
  color: var(--ks-ink-soft);
  font-size: clamp(1.02rem, 1.15vw, 1.12rem);
  line-height: 1.78;
}

.ks-project-intro__copy > :last-child {
  margin-bottom: 0;
}

.ks-project-gallery,
.project-gallery.ks-project-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ks-project-gallery--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ks-project-gallery--hero {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
}

.ks-project-gallery--hero > :first-child {
  grid-column: span 7;
  grid-row: span 2;
}

.ks-project-gallery--hero > :not(:first-child) {
  grid-column: span 5;
}

.ks-project-gallery figure,
.ks-gallery-item {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius);
  background: var(--ks-surface-soft);
}

.ks-project-gallery figure > a,
.ks-gallery-item > a,
.ks-project-gallery figure > button,
.ks-gallery-item > button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.ks-project-gallery img,
.ks-gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .45s ease;
}

.ks-project-gallery--hero > :first-child img {
  height: 100%;
  min-height: 100%;
  aspect-ratio: auto;
}

.ks-project-gallery .is-contain img,
.ks-gallery-item.is-contain img {
  object-fit: contain;
  padding: 18px;
  background: #f2f5f8;
}

.ks-project-gallery figcaption,
.ks-gallery-item__caption {
  min-height: 58px;
  padding: 12px 14px;
  border-top: 1px solid var(--ks-line);
  background: var(--ks-surface);
  color: var(--ks-muted);
  font-size: .82rem;
  line-height: 1.45;
}

.ks-project-gallery figure:focus-within,
.ks-gallery-item:focus-within {
  outline: 3px solid var(--ks-focus);
  outline-offset: 3px;
}

.ks-project-gallery figure:focus-within :focus-visible,
.ks-gallery-item:focus-within :focus-visible {
  outline: 0;
}

@media (hover: hover) and (pointer: fine) {
  .ks-project-gallery figure:hover img,
  .ks-gallery-item:hover img {
    transform: scale(1.018);
  }

  .ks-project-gallery .is-contain:hover img,
  .ks-gallery-item.is-contain:hover img {
    transform: none;
  }
}

/* Daugavgriva hero image group: progressively enhanced, scrollable without JS. */
[data-ks-hero-scroller] {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius-large);
  background: #e8eef4;
  box-shadow: var(--ks-shadow);
}

[data-ks-hero-track] {
  display: grid;
  grid-auto-columns: 100%;
  grid-auto-flow: column;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
}

[data-ks-hero-track]::-webkit-scrollbar {
  display: none;
}

[data-ks-hero-slide] {
  position: relative;
  min-width: 0;
  margin: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

[data-ks-hero-slide] img {
  display: block;
  width: 100%;
  height: clamp(430px, 45vw, 620px);
  object-fit: cover;
}

[data-ks-hero-slide] figcaption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 4px;
  background: rgba(7, 19, 31, .78);
  color: #fff;
  font-size: .8rem;
  line-height: 1.45;
  backdrop-filter: blur(8px);
}

[data-ks-hero-prev],
[data-ks-hero-next] {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 4px;
  background: rgba(7, 19, 31, .78);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
}

[data-ks-hero-prev] {
  left: 14px;
}

[data-ks-hero-next] {
  right: 14px;
}

[data-ks-hero-prev]:disabled,
[data-ks-hero-next]:disabled {
  cursor: default;
  opacity: .42;
}

[data-ks-hero-status] {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  min-width: 48px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 3px;
  background: rgba(7, 19, 31, .76);
  color: #fff;
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  backdrop-filter: blur(8px);
}

.ks-image-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius-large);
  background: var(--ks-line);
}

.ks-image-comparison figure {
  position: relative;
  margin: 0;
  background: var(--ks-surface);
}

.ks-image-comparison img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.ks-image-comparison figcaption {
  min-height: 62px;
  padding: 14px 16px;
  color: var(--ks-muted);
  font-size: .84rem;
  line-height: 1.5;
}

.ks-archive-reference {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-block: 30px;
  padding: 22px 24px;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius);
  background: var(--ks-surface-soft);
}

.ks-archive-reference__icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--ks-line-strong);
  border-radius: 4px;
  color: var(--ks-accent-strong);
}

.ks-archive-reference p {
  margin: 0;
  color: var(--ks-muted);
  line-height: 1.55;
}

.ks-project-navigation {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--ks-line);
}

.ks-project-navigation a {
  display: flex;
  min-height: 110px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 22px 26px;
  color: var(--ks-ink);
  text-decoration: none;
}

.ks-project-navigation a + a {
  border-left: 1px solid var(--ks-line);
}

.ks-project-navigation a:nth-child(2) {
  align-items: center;
  text-align: center;
}

.ks-project-navigation a:last-child {
  align-items: flex-end;
  text-align: right;
}

.ks-project-navigation small {
  color: var(--ks-muted);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ks-project-navigation strong {
  line-height: 1.35;
}

@media (hover: hover) and (pointer: fine) {
  .ks-project-navigation a:hover {
    background: var(--ks-surface-blue);
    color: var(--ks-accent-strong);
  }
}

.ks-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(38px, 6vw, 70px);
  border-radius: var(--ks-radius-large);
  background: #0b1a29;
  color: #fff;
}

.ks-cta::after {
  position: absolute;
  top: 50%;
  right: -9%;
  z-index: -1;
  width: min(42vw, 520px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  box-shadow:
    0 0 0 60px rgba(255, 255, 255, .025),
    0 0 0 120px rgba(255, 255, 255, .018);
  content: "";
  transform: translateY(-50%);
}

.ks-cta__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px;
}

.ks-cta h2 {
  max-width: 760px;
  margin-bottom: 14px;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: -.04em;
}

.ks-cta p {
  max-width: 68ch;
  margin-bottom: 0;
  color: #c9d6e2;
  line-height: 1.7;
}

.ks-cta .ks-button--primary {
  border-color: #fff;
  background: #fff;
  color: #0b1a29;
}

/* Historical transcription modal. Focus containment is handled by its JS controller. */
.ks-modal:not(dialog) {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 11, 19, .72);
  opacity: 1;
  visibility: visible;
  transition: opacity .2s ease, visibility .2s ease;
  backdrop-filter: blur(8px);
}

.ks-modal:not(dialog)[aria-hidden="true"] {
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.ks-modal__dialog {
  position: relative;
  width: min(880px, 100%);
  max-height: min(82vh, 900px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: var(--ks-radius-large);
  background: var(--ks-surface);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .3);
}

.ks-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px;
  border-bottom: 1px solid var(--ks-line);
}

.ks-modal__header h2 {
  margin-bottom: 0;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.1;
}

.ks-modal__close,
[data-ks-dialog-close] {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--ks-line);
  border-radius: 4px;
  background: var(--ks-surface);
  cursor: pointer;
}

.ks-modal__body {
  max-height: calc(min(82vh, 900px) - 96px);
  padding: 26px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ks-modal__body > :last-child {
  margin-bottom: 0;
}

body.ks-modal-open {
  overflow: hidden;
}

/* Native dialog variant used by the Tallinn historical transcription. */
dialog[data-ks-dialog] {
  width: min(880px, calc(100% - 48px));
  max-width: none;
  max-height: min(82dvh, 900px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--ks-line-strong);
  border-radius: var(--ks-radius-large);
  background: var(--ks-surface);
  color: var(--ks-ink);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .3);
}

dialog[data-ks-dialog]::backdrop {
  background: rgba(3, 11, 19, .72);
  backdrop-filter: blur(8px);
}

dialog[data-ks-dialog][open] {
  animation: ks-dialog-enter .2s ease both;
}

dialog[data-ks-dialog] .ks-modal__body {
  max-height: calc(min(82dvh, 900px) - 96px);
}

dialog[data-ks-dialog] [data-ks-dialog-close] {
  position: relative;
}

@keyframes ks-dialog-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Desktop at approximately 1280px: preserve two-column systems, trim the aside. */
@media (max-width: 1320px) {
  :where(.knowledge-system, .photogrammetry-project-page) {
    --ks-shell: 1220px;
  }

  .ks-shell {
    width: min(var(--ks-shell), calc(100% - 40px));
  }

  .ks-hero__inner,
  .knowledge-hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(340px, .72fr);
    gap: 46px;
  }

  .ks-index-grid,
  .knowledge-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ks-article-layout,
  .knowledge-article-layout {
    grid-template-columns: minmax(190px, 220px) minmax(0, 760px) minmax(180px, 1fr);
    gap: 34px;
  }

  .ks-project-hero__inner,
  .photogrammetry-hero__inner {
    grid-template-columns: minmax(0, .9fr) minmax(430px, 1.1fr);
    gap: 42px;
  }
}

@media (max-width: 1120px) {
  :where(.knowledge-system, .photogrammetry-project-page) {
    --ks-sticky-top: 92px;
  }

  .ks-article-layout,
  .knowledge-article-layout {
    grid-template-columns: minmax(190px, 220px) minmax(0, 1fr);
  }

  .ks-article-aside {
    position: static;
    grid-column: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ks-project-card-grid,
  .ks-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ks-project-hero__inner,
  .photogrammetry-hero__inner {
    grid-template-columns: minmax(0, .92fr) minmax(390px, 1.08fr);
  }

  .ks-project-hero__media,
  .photogrammetry-hero__media {
    min-height: 440px;
  }

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

  .ks-meta-item:nth-child(odd) {
    border-left: 1px solid var(--ks-line);
  }

  .ks-meta-item:nth-child(even) {
    border-right: 1px solid var(--ks-line);
  }

  .ks-meta-item:nth-child(n + 3) {
    border-top: 1px solid var(--ks-line);
  }
}

/* Tablet, including 768px: single reading column and non-sticky navigation. */
@media (max-width: 900px) {
  :where(.knowledge-system, .photogrammetry-project-page) {
    --ks-sticky-top: 84px;
  }

  .ks-shell {
    width: min(100% - 32px, 760px);
  }

  .ks-section {
    padding-block: clamp(52px, 9vw, 78px);
  }

  .ks-section-header {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 14px;
  }

  .ks-hero__inner,
  .knowledge-hero__inner {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 38px;
    padding-block: 64px 72px;
  }

  .ks-hero__copy h1,
  .knowledge-hero__copy h1 {
    max-width: 760px;
    font-size: clamp(2.8rem, 10vw, 4.6rem);
  }

  .ks-technical-visual,
  .technical-visual {
    min-height: 360px;
  }

  .ks-featured-term {
    grid-template-columns: 1fr;
  }

  .ks-featured-term__visual {
    min-height: 360px;
    border-width: 1px 0 0;
  }

  .ks-detail-layout,
  .knowledge-detail-layout {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-block: 46px 72px;
  }

  .ks-sidebar,
  .knowledge-sidebar,
  :where(.knowledge-system, .photogrammetry-project-page) [data-ks-sidebar] {
    position: static;
    top: auto;
    z-index: 4;
    width: 100%;
    max-height: none;
    padding: 0;
    overflow: visible;
    border: 1px solid var(--ks-line);
    border-radius: var(--ks-radius);
    background: var(--ks-surface);
  }

  .ks-sidebar-toggle,
  :where(.knowledge-system, .photogrammetry-project-page) [data-ks-sidebar-toggle] {
    display: flex;
    border: 0;
  }

  .ks-sidebar__panel {
    padding: 0 16px 18px;
    border-top: 1px solid var(--ks-line);
  }

  .ks-sidebar[data-collapsible]:not(.is-open) .ks-sidebar__panel {
    display: none;
  }

  .ks-sidebar[data-collapsible].is-open .ks-sidebar__panel,
  .ks-sidebar[data-collapsible] .ks-sidebar-toggle[aria-expanded="true"] + .ks-sidebar__panel {
    display: block;
  }

  .ks-detail-main {
    width: 100%;
  }

  .ks-detail-hero {
    grid-template-columns: 1fr;
  }

  .ks-detail-hero .ks-technical-visual {
    min-height: 350px;
  }

  .ks-article-layout,
  .knowledge-article-layout {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-block: 46px 76px;
  }

  .ks-toc,
  :where(.knowledge-system, .photogrammetry-project-page) [data-ks-toc] {
    position: static;
    max-height: none;
    padding: 0;
    overflow: visible;
    border: 1px solid var(--ks-line);
    border-radius: var(--ks-radius);
    background: var(--ks-surface);
  }

  .ks-toc__title {
    display: none;
  }

  .ks-toc-toggle {
    display: flex;
    width: 100%;
    min-height: 50px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 15px;
    border: 0;
    background: transparent;
    color: var(--ks-ink);
    font-weight: 750;
    cursor: pointer;
  }

  .ks-toc__panel {
    padding: 0 14px 16px;
    border-top: 1px solid var(--ks-line);
  }

  .ks-toc[data-collapsible]:not(.is-open) .ks-toc__panel {
    display: none;
  }

  .ks-toc[data-collapsible].is-open .ks-toc__panel,
  .ks-toc[data-collapsible] .ks-toc-toggle[aria-expanded="true"] + .ks-toc__panel {
    display: block;
  }

  .ks-article-aside {
    grid-column: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ks-prose {
    max-width: 100%;
  }

  .ks-prose figure {
    width: 100%;
  }

  .ks-workflow {
    grid-template-columns: 1fr;
  }

  .ks-workflow li {
    min-height: 0;
    padding: 24px 22px 24px 62px;
    border: 1px solid var(--ks-line);
    border-bottom: 0;
  }

  .ks-workflow li:last-child {
    border-bottom: 1px solid var(--ks-line);
  }

  .ks-workflow li::before {
    top: 26px;
    left: 22px;
  }

  .ks-workflow li:not(:last-child)::after {
    top: auto;
    right: auto;
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%) rotate(135deg);
  }

  .ks-project-hero__inner,
  .photogrammetry-hero__inner {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 40px;
    padding-block: 60px 72px;
  }

  .ks-project-hero__copy h1,
  .photogrammetry-hero__copy h1 {
    font-size: clamp(2.8rem, 9.6vw, 4.6rem);
  }

  .ks-project-hero__media,
  .photogrammetry-hero__media {
    min-height: 440px;
  }

  .ks-project-intro {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .ks-project-intro__title {
    position: static;
  }

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

  .ks-project-gallery--hero > :first-child,
  .ks-project-gallery--hero > :not(:first-child) {
    grid-column: auto;
    grid-row: auto;
  }

  .ks-project-gallery--hero > :first-child {
    grid-column: 1 / -1;
  }

  .ks-project-gallery--hero > :first-child img {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .ks-cta__inner {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

/* Narrow mobile, including 390px. */
@media (max-width: 600px) {
  .ks-shell {
    width: calc(100% - 32px);
  }

  .ks-section {
    padding-block: 52px;
  }

  .ks-section--compact {
    padding-block: 40px;
  }

  .ks-eyebrow,
  .ks-kicker {
    font-size: .69rem;
    letter-spacing: .11em;
  }

  .ks-hero__inner,
  .knowledge-hero__inner {
    gap: 30px;
    padding-block: 50px 60px;
  }

  .ks-hero__copy h1,
  .knowledge-hero__copy h1,
  .ks-project-hero__copy h1,
  .photogrammetry-hero__copy h1 {
    font-size: clamp(2.45rem, 13vw, 3.45rem);
    line-height: 1;
  }

  .ks-project-hero__copy h1,
  .photogrammetry-hero__copy h1 {
    font-size: clamp(2.1rem, 10.5vw, 2.65rem);
    hyphens: none;
  }

  .ks-lead {
    font-size: 1.04rem;
  }

  .ks-actions {
    align-items: stretch;
  }

  .ks-actions .ks-button {
    width: 100%;
  }

  .ks-technical-visual,
  .technical-visual,
  .ks-detail-hero .ks-technical-visual,
  .ks-featured-term__visual {
    min-height: 290px;
  }

  .ks-index-tools,
  .knowledge-index-tools {
    margin-top: -24px;
    padding: 18px;
  }

  .ks-search-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .ks-results-count {
    min-width: 0;
    padding: 6px 0 0;
  }

  .ks-filter-list {
    width: calc(100% + 18px);
    flex-wrap: nowrap;
    padding: 2px 18px 8px 2px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  .ks-filter,
  .knowledge-filter,
  :where(.knowledge-system, .photogrammetry-project-page) [data-ks-filter] {
    min-height: 44px;
  }

  .ks-index-grid,
  .knowledge-card-grid,
  .ks-related-grid,
  .ks-project-card-grid,
  .ks-detail-grid,
  .ks-property-list {
    grid-template-columns: 1fr;
  }

  .ks-term-card,
  .knowledge-term-card,
  :where(.knowledge-system, .photogrammetry-project-page) [data-ks-card] {
    min-height: 0;
    padding: 22px;
  }

  .ks-featured-term__copy {
    padding: 28px 22px;
  }

  .ks-detail-layout,
  .knowledge-detail-layout,
  .ks-article-layout,
  .knowledge-article-layout {
    padding-block: 36px 60px;
  }

  .ks-detail-hero h1 {
    font-size: clamp(2.45rem, 13vw, 3.45rem);
  }

  .ks-definition {
    padding: 19px 18px 19px 21px;
  }

  .ks-article-aside {
    grid-template-columns: 1fr;
  }

  .ks-prose {
    font-size: 1rem;
    line-height: 1.72;
  }

  .ks-prose h2 {
    margin-top: 52px;
  }

  .ks-prose blockquote {
    margin-block: 28px;
    padding-left: 18px;
    font-size: 1.08em;
  }

  .ks-callout,
  .technical-callout {
    padding: 22px 20px;
  }

  .ks-accuracy-resolution {
    grid-template-columns: 1fr;
  }

  .ks-accuracy-resolution__mark {
    min-height: 52px;
    border-block: 1px solid var(--ks-line);
    border-inline: 0;
  }

  .ks-comparison,
  .ks-image-comparison {
    grid-template-columns: 1fr;
  }

  .ks-project-hero__inner,
  .photogrammetry-hero__inner {
    gap: 30px;
    padding-block: 48px 60px;
  }

  .ks-project-hero__media,
  .photogrammetry-hero__media {
    min-height: 330px;
  }

  [data-ks-hero-slide] img {
    height: clamp(300px, 78vw, 430px);
  }

  [data-ks-hero-prev],
  [data-ks-hero-next] {
    top: auto;
    bottom: 14px;
    width: 44px;
    height: 44px;
    transform: none;
  }

  [data-ks-hero-slide] figcaption {
    right: 66px;
    left: 66px;
    max-height: 72px;
    overflow: auto;
  }

  .ks-project-metadata__grid,
  .project-metadata__grid {
    grid-template-columns: 1fr;
  }

  .ks-meta-item,
  .ks-meta-item:first-child,
  .ks-meta-item:nth-child(odd),
  .ks-meta-item:nth-child(even) {
    min-height: 0;
    padding: 18px 20px;
    border: 0;
    border-bottom: 1px solid var(--ks-line);
  }

  .ks-project-metadata__grid > :last-child,
  .project-metadata__grid > :last-child {
    border-bottom: 0;
  }

  .ks-project-gallery,
  .project-gallery.ks-project-gallery {
    grid-template-columns: 1fr;
  }

  .ks-project-gallery--hero > :first-child {
    grid-column: auto;
  }

  .ks-project-gallery--hero > :first-child img {
    aspect-ratio: 4 / 3;
  }

  .ks-archive-reference {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .ks-archive-reference .ks-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .ks-project-navigation {
    grid-template-columns: 1fr;
  }

  .ks-project-navigation a {
    min-height: 84px;
    align-items: flex-start !important;
    border-left: 0 !important;
    border-bottom: 1px solid var(--ks-line);
    text-align: left !important;
  }

  .ks-project-navigation a:last-child {
    border-bottom: 0;
  }

  .ks-cta {
    padding: 32px 22px;
  }

  .ks-cta .ks-button {
    width: 100%;
  }

  .ks-modal {
    align-items: end;
    padding: 12px;
  }

  .ks-modal__dialog {
    width: 100%;
    max-height: calc(100dvh - 24px);
  }

  dialog[data-ks-dialog] {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 24px);
  }

  .ks-modal__header {
    padding: 18px;
  }

  .ks-modal__body {
    max-height: calc(100dvh - 108px);
    padding: 20px 18px;
  }
}

@media (max-width: 420px) {
  .ks-shell {
    width: calc(100% - 28px);
  }

  .ks-hero__copy h1,
  .knowledge-hero__copy h1,
  .ks-project-hero__copy h1,
  .photogrammetry-hero__copy h1,
  .ks-detail-hero h1 {
    hyphens: auto;
  }

  .ks-search-input,
  .knowledge-search-input,
  :where(.knowledge-system, .photogrammetry-project-page) [data-ks-search-input] {
    min-height: 52px;
  }

  .ks-term-card__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .ks-project-hero__media,
  .photogrammetry-hero__media {
    min-height: 290px;
  }
}

/* Motion and platform accessibility. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  :where(.knowledge-system, .photogrammetry-project-page) *,
  :where(.knowledge-system, .photogrammetry-project-page) *::before,
  :where(.knowledge-system, .photogrammetry-project-page) *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .ks-button:hover,
  .ks-term-card:hover,
  .knowledge-term-card:hover,
  :where(.knowledge-system, .photogrammetry-project-page) [data-ks-card]:hover,
  .ks-project-card:hover,
  .ks-project-gallery figure:hover img,
  .ks-gallery-item:hover img {
    transform: none !important;
  }
}

@media (forced-colors: active) {
  :where(.knowledge-system, .photogrammetry-project-page) :where(
    .ks-button,
    .ks-filter,
    [data-ks-filter],
    .ks-term-card,
    [data-ks-card],
    .ks-panel,
    .ks-callout,
    .ks-project-card,
    .ks-related-card
  ) {
    border: 1px solid CanvasText;
  }

  .ks-media-label,
  .ks-project-hero__caption {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
  }
}

@media print {
  :where(.knowledge-system, .photogrammetry-project-page) {
    color: #000;
    background: #fff;
  }

  .ks-index-tools,
  .knowledge-index-tools,
  .ks-sidebar,
  .knowledge-sidebar,
  [data-ks-sidebar],
  .ks-toc,
  [data-ks-toc],
  .ks-actions,
  .ks-project-navigation,
  .ks-cta,
  .ks-modal,
  dialog[data-ks-dialog],
  [data-ks-hero-prev],
  [data-ks-hero-next],
  [data-ks-hero-status] {
    display: none !important;
  }

  .ks-hero,
  .knowledge-hero,
  .ks-project-hero,
  .photogrammetry-hero {
    background: #fff;
  }

  .ks-hero__inner,
  .knowledge-hero__inner,
  .ks-project-hero__inner,
  .photogrammetry-hero__inner,
  .ks-article-layout,
  .knowledge-article-layout,
  .ks-detail-layout,
  .knowledge-detail-layout {
    display: block;
    min-height: 0;
    padding-block: 24px;
  }

  .ks-prose,
  .ks-detail-main {
    max-width: none;
  }

  .ks-callout,
  .technical-callout,
  .ks-term-card,
  .ks-project-card,
  .ks-related-card {
    break-inside: avoid;
    box-shadow: none;
  }

  .ks-project-gallery img,
  .ks-gallery-item img,
  .ks-project-hero__media img,
  .photogrammetry-hero__media img {
    max-height: 190mm;
  }
}
