:root {
  --bg: #ffffff;
  --soft: #f6f8fa;
  --navy-soft: #eef4f9;
  --line: rgba(13, 46, 79, 0.08);
  --text: #14202b;
  --muted: #64717e;
  --navy: #0d2e4f;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
}

body {
  font-family: "Manrope", Arial, Helvetica, sans-serif;
  color: var(--text);
  overflow-x: hidden;
}

body.locked {
  overflow: hidden;
}

button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  width: min(1120px, calc(100% - 28px));
  height: 84px;
  margin: 0 auto;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.logo {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  background: var(--navy);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 21px;
  font-weight: 800;
}

.brandText {
  min-width: 0;
  display: grid;
}

.brandText strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brandText small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.menuBtn {
  width: 44px;
  height: 44px;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.menuBtn i {
  width: 20px;
  height: 1.5px;
  background: #fff;
}

.page {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto 72px;
}

.breadcrumbs {
  min-height: 52px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}

.crumb {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.crumb.current {
  color: var(--navy);
}

.crumbSep {
  color: var(--muted);
  opacity: 0.5;
}

.article {
  padding: 46px 0 54px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  width: fit-content;
  margin: 0 0 18px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  max-width: 940px;
  margin: 0;
  color: var(--text);
  font-size: clamp(44px, 8vw, 92px);
  line-height: 0.96;
  letter-spacing: -0.06em;
  font-weight: 700;
}

.lead {
  max-width: 780px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.6;
  font-weight: 500;
}

.paragraph {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.inlineLink {
  display: inline;
  color: var(--navy);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.block,
.board,
.structure {
  padding: 42px 0;
  border-bottom: 1px solid var(--line);
}

.blockHead {
  margin-bottom: 20px;
}

.blockHead span,
.structureGrid h3,
.mediaHead,
.boardMeta {
  display: block;
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.blockHead h2,
.menuTop h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.04;
  letter-spacing: -0.05em;
  font-weight: 700;
}

.nodeList,
.miniList {
  border-top: 1px solid var(--line);
}

.nodeRow {
  width: 100%;
  min-height: 82px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  text-align: left;
}

.nodeRow.large .nodeText strong {
  font-size: 25px;
}

.nodeRow.accent .nodeText strong {
  color: var(--navy);
}

.nodeText {
  min-width: 0;
  display: grid;
}

.nodeText strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.nodeText small,
.nodeText em {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
  font-style: normal;
}

.nodeArrow {
  color: var(--navy);
  font-size: 21px;
  font-weight: 700;
}

.boardGrid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.boardCard {
  min-height: 150px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  text-align: left;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.boardCard.small { grid-column: span 2; }
.boardCard.medium { grid-column: span 3; }
.boardCard.large { grid-column: span 4; }
.boardCard.wide { grid-column: span 6; }

.boardCard:first-child,
.boardCard:nth-child(4n + 1) {
  border-left-color: transparent;
}

.boardCard.accent strong {
  color: var(--navy);
}

.boardCard strong {
  display: block;
  margin-top: 16px;
  color: var(--text);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.04;
  letter-spacing: -0.045em;
  font-weight: 700;
}

.boardCard.small strong {
  font-size: 21px;
}

.boardCard.wide strong {
  font-size: clamp(30px, 5vw, 52px);
}

.boardCard p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.boardFoot {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--navy);
}

.boardFoot b {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.boardFoot i {
  font-style: normal;
  font-size: 22px;
}

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

.empty {
  padding: 18px 0;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.mediaBlock {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.mediaHead {
  margin-bottom: 14px;
}

.galleryScroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 0 16px;
  scroll-snap-type: x mandatory;
}

.galleryTile {
  flex: 0 0 min(78vw, 360px);
  scroll-snap-align: start;
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.galleryTile img {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
  background: var(--soft);
}

.galleryTile strong {
  display: block;
  margin-top: 12px;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
}

.galleryTile small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.articleGraph {
  width: 100%;
  max-width: 820px;
  display: block;
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.articleGraph line {
  stroke: var(--line);
  stroke-width: 2;
}

.graphNode {
  cursor: pointer;
}

.graphNode circle {
  fill: var(--navy-soft);
  stroke: var(--navy);
  stroke-width: 1.5;
}

.graphNode text {
  fill: var(--navy);
  font-family: Manrope, Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  justify-content: flex-end;
  background: rgba(13, 46, 79, 0.22);
}

.overlay.open {
  display: flex;
}

.menu {
  width: min(560px, 100%);
  height: 100%;
  overflow: auto;
  background: #fff;
  padding: 28px 24px;
}

.menuTop {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.closeBtn,
.viewerTop button {
  min-height: 42px;
  padding: 0 16px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
}

.menuRoot {
  margin-top: 20px;
}

.menuChildren {
  margin-left: 22px;
  border-left: 1px solid var(--line);
  padding-left: 18px;
}

.imageViewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  background: rgba(255,255,255,0.96);
}

.imageViewer.open {
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.viewerTop {
  min-height: 64px;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.viewerCanvas {
  min-height: 0;
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  justify-items: center;
  overflow: hidden;
}

.viewerCanvas img {
  max-width: 88vw;
  max-height: 78vh;
  object-fit: contain;
  transition: transform 0.16s ease;
  transform-origin: center;
}

.viewerNav {
  width: 52px;
  height: 100%;
  color: var(--navy);
  font-size: 42px;
}

.viewerCaption {
  min-height: 54px;
  padding: 14px 18px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--line);
}

@media (max-width: 760px) {
  .topbar {
    width: calc(100% - 24px);
    height: 78px;
  }

  .page {
    width: calc(100% - 24px);
  }

  .article {
    padding: 34px 0 44px;
  }

  h1 {
    font-size: clamp(42px, 13vw, 68px);
    letter-spacing: -0.055em;
  }

  .lead {
    font-size: 18px;
  }

  .structureGrid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

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

  .boardCard.small,
  .boardCard.medium,
  .boardCard.large,
  .boardCard.wide {
    grid-column: span 1;
  }

  .boardCard {
    padding-left: 0;
    padding-right: 0;
    border-left: 0;
  }

  .galleryTile {
    flex-basis: 82vw;
  }

  .menu {
    width: 100%;
    padding: 24px 18px;
  }

  .menuChildren {
    margin-left: 12px;
    padding-left: 12px;
  }

  .viewerCanvas {
    grid-template-columns: 42px 1fr 42px;
  }

  .viewerCanvas img {
    max-width: 86vw;
  }
}

/* patch: gallery without broken external image files */
.galleryTile {
  flex: 0 0 min(72vw, 330px) !important;
}

.visualThumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--soft);
  overflow: hidden;
}

.visualThumb svg {
  width: 100%;
  height: 100%;
  display: block;
}

.visualThumb rect {
  fill: var(--soft);
}

.visualThumb .softPath {
  fill: none;
  stroke: var(--navy);
  stroke-width: 10;
  opacity: 0.14;
}

.visualThumb .dot.main {
  fill: var(--navy);
}

.visualThumb .dot.soft {
  fill: var(--navy-soft);
}

.visualThumb .dot.mid {
  fill: var(--navy);
  opacity: 0.7;
}

.visualThumb .visualTitle {
  font-family: Manrope, Arial, sans-serif;
  font-size: 42px;
  font-weight: 700;
  fill: var(--text);
}

.visualThumb .visualSub {
  font-family: Manrope, Arial, sans-serif;
  font-size: 18px;
  fill: var(--muted);
}

.viewerCanvas img {
  background: var(--soft);
}

/* softer, less sharp separators */
:root {
  --line: rgba(13, 46, 79, 0.055);
}

.boardCard {
  padding-left: 28px !important;
}

@media (max-width: 760px) {
  .galleryTile {
    flex-basis: 76vw !important;
  }

  .boardCard {
    padding-left: 0 !important;
  }
}

/* Swiper gallery replacement */
.galleryScroll,
.galleryTile img,
.viewerTop,
.viewerCanvas,
.viewerNav,
.viewerCaption {
  display: none !important;
}

.articleSwiper {
  width: 100%;
  padding: 2px 0 28px;
  overflow: visible;
}

.articleSwiper .swiper-slide {
  width: min(74vw, 360px);
}

.gallerySlide {
  width: 100%;
  text-align: left;
  display: block;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.gallerySlide .visualThumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--soft);
}

.slideTitle {
  display: block;
  margin-top: 14px;
  color: var(--text);
  font-size: 19px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.slideCaption {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.articleSwiper .swiper-scrollbar {
  left: 0 !important;
  width: 100% !important;
  height: 2px !important;
  background: rgba(13, 46, 79, 0.06);
}

.articleSwiper .swiper-scrollbar-drag {
  background: rgba(13, 46, 79, 0.32);
}

/* Clean fullscreen slider */
.imageViewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  background: #ffffff;
}

.imageViewer.open {
  display: block;
}

.viewerClose {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 120;
  height: 44px;
  padding: 0 16px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
}

.viewerSwiper {
  width: 100%;
  height: 100%;
}

.viewerSwiper .swiper-slide {
  height: 100%;
  display: grid;
  place-items: center;
}

.viewerSlide {
  width: min(1180px, calc(100vw - 36px));
  height: min(760px, calc(100vh - 110px));
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 18px;
  align-items: center;
}

.viewerVisual {
  min-height: 0;
  width: 100%;
  height: 100%;
  background: var(--soft);
  display: grid;
  place-items: center;
}

.viewerVisual svg {
  width: 100%;
  height: 100%;
  display: block;
}

.viewerVisual rect {
  fill: var(--soft);
}

.viewerVisual .softPath {
  fill: none;
  stroke: var(--navy);
  stroke-width: 18;
  opacity: 0.14;
}

.viewerVisual .dot.main {
  fill: var(--navy);
}

.viewerVisual .dot.soft {
  fill: var(--navy-soft);
}

.viewerVisual .dot.mid {
  fill: var(--navy);
  opacity: 0.72;
}

.viewerVisual .bigTitle {
  font-family: Manrope, Arial, sans-serif;
  font-size: 72px;
  font-weight: 700;
  fill: var(--text);
}

.viewerVisual .bigSub {
  font-family: Manrope, Arial, sans-serif;
  font-size: 32px;
  fill: var(--muted);
}

.viewerVisual .bigMark {
  font-family: Manrope, Arial, sans-serif;
  font-size: 42px;
  font-weight: 700;
  fill: var(--navy);
  opacity: 0.32;
}

.viewerText {
  display: grid;
  gap: 6px;
  padding-bottom: 4px;
}

.viewerText strong {
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.viewerText span {
  color: var(--muted);
  font-size: 14px;
}

.viewerSwiper .swiper-button-prev,
.viewerSwiper .swiper-button-next {
  color: var(--navy);
  width: 48px;
  height: 48px;
}

.viewerSwiper .swiper-button-prev:after,
.viewerSwiper .swiper-button-next:after {
  font-size: 26px;
  font-weight: 700;
}

.viewerSwiper .swiper-pagination-bullet {
  background: var(--navy);
  opacity: 0.25;
}

.viewerSwiper .swiper-pagination-bullet-active {
  opacity: 1;
}

@media (max-width: 760px) {
  .articleSwiper .swiper-slide {
    width: 78vw;
  }

  .viewerClose {
    top: 12px;
    right: 12px;
  }

  .viewerSlide {
    width: calc(100vw - 24px);
    height: calc(100vh - 100px);
  }

  .viewerVisual .bigTitle {
    font-size: 44px;
  }

  .viewerVisual .bigSub {
    font-size: 22px;
  }

  .viewerSwiper .swiper-button-prev,
  .viewerSwiper .swiper-button-next {
    display: none;
  }
}

/* kill old broken swiper/viewer UI */
.imageViewer,
.viewerSwiper,
.viewerTop,
.viewerCanvas,
.viewerNav,
.swiper,
.swiper-wrapper,
.swiper-slide,
.swiper-button-prev,
.swiper-button-next,
.swiper-pagination {
  display: none !important;
}

/* plain horizontal gallery */
.plainGallery {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding: 4px 0 18px;
}

.galleryCard {
  flex: 0 0 min(76vw, 360px);
  scroll-snap-align: start;
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding-bottom: 15px;
}

.galleryCard strong {
  display: block;
  margin-top: 13px;
  color: var(--text);
  font-size: 19px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.galleryCard small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.visualThumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--soft);
  overflow: hidden;
}

.visualThumb svg,
.viewerPicture svg {
  width: 100%;
  height: 100%;
  display: block;
}

.visualThumb rect,
.viewerPicture rect {
  fill: var(--soft);
}

.visualThumb .softPath,
.viewerPicture .softPath {
  fill: none;
  stroke: var(--navy);
  opacity: 0.14;
}

.visualThumb .softPath {
  stroke-width: 10;
}

.viewerPicture .softPath {
  stroke-width: 18;
}

.visualThumb .dot.main,
.viewerPicture .dot.main {
  fill: var(--navy);
}

.visualThumb .dot.soft,
.viewerPicture .dot.soft {
  fill: var(--navy-soft);
}

.visualThumb .dot.mid,
.viewerPicture .dot.mid {
  fill: var(--navy);
  opacity: 0.72;
}

.visualThumb .visualTitle {
  font-family: Manrope, Arial, sans-serif;
  font-size: 42px;
  font-weight: 700;
  fill: var(--text);
}

.visualThumb .visualSub {
  font-family: Manrope, Arial, sans-serif;
  font-size: 18px;
  fill: var(--muted);
}

.viewerPicture .bigTitle {
  font-family: Manrope, Arial, sans-serif;
  font-size: 72px;
  font-weight: 700;
  fill: var(--text);
}

.viewerPicture .bigSub {
  font-family: Manrope, Arial, sans-serif;
  font-size: 32px;
  fill: var(--muted);
}

.viewerPicture .bigMark {
  font-family: Manrope, Arial, sans-serif;
  font-size: 42px;
  font-weight: 700;
  fill: var(--navy);
  opacity: 0.32;
}

/* simple image opener */
.simpleViewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  grid-template-rows: 64px 1fr 64px;
  background: #fff;
}

.simpleViewer.open {
  display: grid;
}

.viewerBar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.viewerBarBtn,
.closeBtn,
.menuBtn {
  height: 44px !important;
  min-height: 44px !important;
}

.viewerBarBtn {
  padding: 0 14px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
}

.viewerScroll {
  min-height: 0;
  overflow: auto;
  display: block;
  padding: 18px;
}

.viewerPicture {
  width: min(1200px, 100%);
  aspect-ratio: 16 / 10;
  margin: 0 auto;
  background: var(--soft);
}

.viewerBottom {
  height: 64px;
  display: grid;
  grid-template-columns: 90px 1fr 90px;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border-top: 1px solid var(--line);
}

.viewerMiniBtn {
  height: 40px;
  background: var(--soft);
  color: var(--navy);
  font-weight: 700;
}

.viewerCaption {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* menu close same size as burger */
.menuTop {
  align-items: flex-start;
}

.closeBtn {
  padding: 0 14px !important;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  line-height: 44px;
}

@media (max-width: 760px) {
  .simpleViewer {
    grid-template-rows: 58px 1fr 58px;
  }

  .viewerBar {
    height: 58px;
    padding: 0 12px;
  }

  .viewerScroll {
    padding: 12px;
  }

  .viewerPicture {
    width: 1100px;
    max-width: none;
  }

  .viewerBottom {
    height: 58px;
    grid-template-columns: 64px 1fr 64px;
    gap: 8px;
    padding: 0 10px;
  }

  .viewerMiniBtn {
    height: 38px;
  }

  .galleryCard {
    flex-basis: 78vw;
  }
}

/* menu-as-article */
.menuRole-entry .nodeText strong {
  color: var(--navy);
}

.menuRole-tree > .nodeRow .nodeText strong {
  font-size: 24px;
}

.menuRole-tree > .nodeRow {
  min-height: 88px;
}

.menuChildren {
  margin-left: 22px;
  border-left: 1px solid var(--line);
  padding-left: 18px;
}

@media (max-width: 760px) {
  .menuChildren {
    margin-left: 12px;
    padding-left: 12px;
  }
}

/* fixed topbar actions: share + two-line menu */
.topActions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shareBtn {
  height: 44px;
  min-height: 44px;
  padding: 0 14px;
  background: var(--soft);
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  border: 0;
}

.shareBtn:active {
  background: var(--navy-soft);
}

.menuBtn {
  flex: 0 0 44px;
}

/* keep close button same height as burger/share */
.closeBtn {
  height: 44px !important;
  min-height: 44px !important;
  line-height: 44px !important;
  padding: 0 14px !important;
}

@media (max-width: 760px) {
  .shareBtn {
    width: 64px;
    padding: 0;
    font-size: 12px;
  }

  .topActions {
    gap: 6px;
  }
}

/* keep global header visible while menu is open */
.topbar {
  z-index: 120;
}

.overlay {
  top: 84px !important;
  z-index: 90 !important;
  background: rgba(255, 255, 255, 0.96) !important;
}

.menu {
  width: min(720px, 100%) !important;
  padding-top: 0 !important;
  border-left: 1px solid var(--line);
}

.menuTop {
  display: none !important;
}

.menuBtn.isClose {
  width: auto;
  min-width: 74px;
  padding: 0 14px;
}

.menuBtn.isClose .menuCloseText {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

/* breadcrumbs: horizontal scroll with a real touch area */
.breadcrumbs {
  min-height: 64px !important;
  height: 64px;
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap !important;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scrollbar-width: none;
}

.breadcrumbs::-webkit-scrollbar {
  display: none;
}

.crumb,
.crumbSep {
  flex: 0 0 auto;
}

.crumb {
  min-height: 64px;
  display: inline-flex;
  align-items: center;
}

/* slightly more comfortable article reading */
.paragraph {
  max-width: 820px;
}

.lead {
  max-width: 860px;
}

@media (max-width: 760px) {
  .overlay {
    top: 78px !important;
  }

  .menu {
    width: 100% !important;
    border-left: 0;
  }

  .breadcrumbs {
    min-height: 60px !important;
    height: 60px;
  }

  .crumb {
    min-height: 60px;
  }
}

/* compact linked elements: one deduplicated list */
.block,
.board,
.structure,
.boardGrid,
.boardCard,
.structureGrid,
.miniList {
  display: none !important;
}

.linkedElements {
  padding: 34px 0 48px;
  border-bottom: 1px solid var(--line);
}

.compactHead {
  margin-bottom: 18px;
}

.compactHead span {
  display: block;
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.compactHead h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.04;
  letter-spacing: -0.05em;
  font-weight: 700;
}

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

.compactRow {
  width: 100%;
  min-height: 68px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  text-align: left;
}

.compactMain {
  min-width: 0;
  display: grid;
}

.compactMain strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.compactMain small {
  margin-top: 5px;
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.compactMain em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  font-style: normal;
  font-weight: 400;
}

.compactArrow {
  flex: 0 0 auto;
  color: var(--navy);
  font-size: 21px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .linkedElements {
    padding: 28px 0 40px;
  }

  .compactRow {
    min-height: 62px;
    padding: 12px 0;
  }

  .compactMain strong {
    font-size: 18px;
  }

  .compactMain em {
    font-size: 12px;
  }
}

/* separator merge patch: no stacked horizontal lines */
:root {
  --line: rgba(13, 46, 79, 0.055);
}

/* major blocks do not all draw their own bottom line */
.article,
.linkedElements,
.mediaBlock,
.block,
.board,
.structure {
  border-bottom: 0 !important;
}

/* breadcrumbs keep one separator under themselves */
.breadcrumbs {
  border-bottom: 1px solid var(--line) !important;
}

/* article creates no extra line; the next section creates the separation */
.article + .linkedElements,
.article + .mediaBlock,
.article + .block,
.article + .board,
.article + .structure {
  border-top: 1px solid var(--line) !important;
}

/* compact linked list: only the list owns the top line, rows own inner lines */
.compactList {
  border-top: 1px solid var(--line) !important;
}

.compactRow {
  border-bottom: 0 !important;
}

.compactRow + .compactRow {
  border-top: 1px solid var(--line) !important;
}

/* node lists: no border on both container and first row at the same time */
.nodeList,
.miniList {
  border-top: 1px solid var(--line) !important;
}

.nodeRow {
  border-bottom: 0 !important;
}

/* ordinary consecutive rows */
.nodeRow + .nodeRow {
  border-top: 1px solid var(--line) !important;
}

/* menu uses branch separators, not row + container + child duplicates */
.menuRoot.nodeList {
  border-top: 1px solid var(--line) !important;
}

.menuRoot .nodeRow {
  border-top: 0 !important;
  border-bottom: 0 !important;
}

.menuRoot > .menuBranch,
.menuChildren > .menuBranch {
  border-bottom: 1px solid var(--line) !important;
}

.menuRoot > .menuBranch:last-child,
.menuChildren > .menuBranch:last-child {
  border-bottom: 0 !important;
}

/* nested menu indentation keeps only vertical line */
.menuChildren {
  border-left: 1px solid var(--line) !important;
}

/* board/card old leftovers should not create extra stacked rules */
.boardGrid,
.boardCard {
  border-top: 0 !important;
  border-bottom-color: var(--line) !important;
}

/* topbar and menu overlay: only topbar owns its bottom separator */
.topbar {
  border-bottom: 1px solid var(--line) !important;
}

.menuTop {
  border-bottom: 0 !important;
}

/* empty rows should behave like single list rows */
.empty {
  border-bottom: 0 !important;
}

.empty + .empty {
  border-top: 1px solid var(--line) !important;
}

/* gallery viewer v2: main pinch/zoom area + thumbnail strip */
.simpleViewer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  grid-template-rows: 56px 1fr 96px;
  background: #fff;
}

.simpleViewer.open {
  display: grid;
}

.viewerBar {
  height: 56px;
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
}

.viewerBarBtn {
  height: 44px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
}

.viewerCount {
  justify-self: center;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.viewerStage {
  min-height: 0;
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  background: #fff;
}

.viewerZoomSurface {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  touch-action: none;
  background: #fff;
}

.viewerPicture {
  width: min(100%, 1200px);
  height: min(100%, 760px);
  max-width: 100%;
  max-height: 100%;
  display: grid;
  place-items: center;
  transform-origin: center;
  will-change: transform;
}

.viewerPicture svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.viewerSide {
  width: 44px;
  height: 100%;
  color: var(--navy);
  font-size: 38px;
  font-weight: 400;
  background: transparent;
}

.thumbStrip {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.thumbStrip::-webkit-scrollbar {
  display: none;
}

.viewerThumb {
  flex: 0 0 112px;
  height: 72px;
  background: var(--soft);
  opacity: 0.58;
  border-bottom: 2px solid transparent;
}

.viewerThumb.active {
  opacity: 1;
  border-bottom-color: var(--navy);
}

.viewerThumb svg {
  width: 100%;
  height: 100%;
  display: block;
}

.viewerThumb .visualTitle,
.viewerThumb .visualSub {
  display: none;
}

/* main viewer visual svg */
.viewerPicture rect,
.viewerThumb rect,
.visualThumb rect {
  fill: var(--soft);
}

.viewerPicture .softPath,
.viewerThumb .softPath,
.visualThumb .softPath {
  fill: none;
  stroke: var(--navy);
  opacity: 0.14;
}

.viewerPicture .softPath {
  stroke-width: 18;
}

.viewerThumb .softPath,
.visualThumb .softPath {
  stroke-width: 10;
}

.viewerPicture .dot.main,
.viewerThumb .dot.main,
.visualThumb .dot.main {
  fill: var(--navy);
}

.viewerPicture .dot.soft,
.viewerThumb .dot.soft,
.visualThumb .dot.soft {
  fill: var(--navy-soft);
}

.viewerPicture .dot.mid,
.viewerThumb .dot.mid,
.visualThumb .dot.mid {
  fill: var(--navy);
  opacity: 0.72;
}

.viewerPicture .bigTitle {
  font-family: Manrope, Arial, sans-serif;
  font-size: 72px;
  font-weight: 700;
  fill: var(--text);
}

.viewerPicture .bigSub {
  font-family: Manrope, Arial, sans-serif;
  font-size: 32px;
  fill: var(--muted);
}

.viewerPicture .bigMark {
  font-family: Manrope, Arial, sans-serif;
  font-size: 42px;
  font-weight: 700;
  fill: var(--navy);
  opacity: 0.32;
}

@media (max-width: 760px) {
  .simpleViewer {
    grid-template-rows: 54px 1fr 88px;
  }

  .viewerBar {
    height: 54px;
    grid-template-columns: 76px 1fr;
  }

  .viewerStage {
    grid-template-columns: 36px 1fr 36px;
  }

  .viewerSide {
    width: 36px;
    font-size: 32px;
  }

  .viewerPicture {
    width: 100%;
    height: 100%;
  }

  .viewerPicture .bigTitle {
    font-size: 46px;
  }

  .viewerPicture .bigSub {
    font-size: 23px;
  }

  .viewerThumb {
    flex-basis: 96px;
    height: 64px;
  }
}

/* FINAL gallery viewer correction:
   - initial image always fits whole area
   - no side arrows
   - prev/next controls are at bottom
   - pinch zoom / pan area stays in center
*/

.simpleViewer {
  grid-template-rows: 56px minmax(0, 1fr) 54px 92px !important;
  background: #fff !important;
}

.viewerStage {
  min-height: 0 !important;
  position: relative !important;
  display: block !important;
  background: #fff !important;
  overflow: hidden !important;
}

.viewerZoomSurface {
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  display: grid !important;
  place-items: center !important;
  touch-action: none !important;
  background: #fff !important;
}

.viewerPicture {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  display: grid !important;
  place-items: center !important;
  transform-origin: center center !important;
  will-change: transform !important;
  overflow: visible !important;
}

.viewerPicture svg {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  display: block !important;
}

/* remove old side arrows completely */
.viewerSide {
  display: none !important;
}

.viewerControls {
  height: 54px;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 82px;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.viewerBottomBtn {
  height: 40px;
  background: var(--soft);
  color: var(--navy);
  font-weight: 700;
}

.viewerCaptionText {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* thumbnails stay scrollable at the bottom */
.thumbStrip {
  height: 92px !important;
  min-height: 92px !important;
  max-height: 92px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 12px !important;
  border-top: 1px solid var(--line) !important;
  background: #fff !important;
}

.viewerThumb {
  flex: 0 0 112px !important;
  height: 68px !important;
}

/* make placeholder composition fit better in portrait viewers */
.viewerPicture .bigTitle {
  font-size: clamp(42px, 7vw, 72px) !important;
}

.viewerPicture .bigSub {
  font-size: clamp(20px, 3vw, 32px) !important;
}

.viewerPicture .bigMark {
  font-size: clamp(30px, 4vw, 42px) !important;
}

/* top bar stays compact */
.viewerBar {
  height: 56px !important;
  min-height: 56px !important;
}

.viewerBarBtn {
  height: 44px !important;
  min-height: 44px !important;
}

@media (max-width: 760px) {
  .simpleViewer {
    grid-template-rows: 54px minmax(0, 1fr) 50px 82px !important;
  }

  .viewerControls {
    height: 50px;
    grid-template-columns: 68px minmax(0, 1fr) 68px;
    gap: 8px;
    padding: 0 10px;
  }

  .viewerBottomBtn {
    height: 38px;
  }

  .thumbStrip {
    height: 82px !important;
    min-height: 82px !important;
    max-height: 82px !important;
    padding: 8px 10px !important;
  }

  .viewerThumb {
    flex-basis: 92px !important;
    height: 60px !important;
  }

  .viewerPicture svg {
    max-width: 100% !important;
    max-height: 100% !important;
  }
}

/* hard fix: image at scale=1 is fully contained */
.viewerZoomSurface {
  overflow: hidden !important;
  display: grid !important;
  place-items: center !important;
  padding: 14px !important;
  touch-action: none !important;
}

.viewerPicture {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  display: grid !important;
  place-items: center !important;
  overflow: visible !important;
  transform-origin: center center !important;
}

.viewerPicture .fitSvg,
.viewerPicture svg {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  display: block !important;
}

/* important: no old CSS may force cover/crop behavior */
.viewerPicture svg,
.viewerPicture .fitSvg {
  object-fit: contain !important;
}

/* thumbnails can crop/fit separately, main image never crops */
.viewerThumb svg,
.visualThumb svg {
  width: 100% !important;
  height: 100% !important;
}

/* when image is not zoomed, it is the fitted base state */
.viewerPicture:not(.zoomed) {
  cursor: default;
}

@media (max-width: 760px) {
  .viewerZoomSurface {
    padding: 10px !important;
  }
}
