/* Presenter-mode layer: hierarchy, evidence cues and scroll progress for Smart Water. */
html[data-project="smart-water"] {
  --sw-ink: #173f69;
  --sw-blue: #2f78bb;
  --sw-blue-soft: #e7f1f9;
  --sw-line: rgba(42, 94, 145, .18);
}

html[data-project="smart-water"] .case-system-design__thesis small,
html[data-project="smart-water"] .case-system-media > header small {
  color: var(--sw-blue);
  font: 600 10px/1.5 var(--mono);
  letter-spacing: .16em;
}

html[data-project="smart-water"] .case-system-guide h3 {
  max-width: 190px;
  font-size: 24px;
  line-height: 1.35;
}

html[data-project="smart-water"] .case-system-design {
  padding-top: clamp(24px, 4vw, 54px);
}

html[data-project="smart-water"] .case-system-design + .case-system-design {
  margin-top: clamp(120px, 13vw, 180px);
}

html[data-project="smart-water"] .case-system-design h3 {
  max-width: 760px;
  font-size: clamp(42px, 4.6vw, 62px);
}

html[data-project="smart-water"] .case-system-design > header p {
  max-width: 760px;
  font-size: 15px;
  line-height: 1.8;
}

html[data-project="smart-water"] .case-system-design__thesis {
  display: grid;
  grid-template-columns: minmax(210px, .75fr) minmax(0, 1.25fr);
  gap: clamp(30px, 5vw, 78px);
  margin: 8px 0 clamp(38px, 6vw, 72px);
  padding: clamp(28px, 4vw, 44px) 0;
  border-top: 1px solid var(--sw-line);
  border-bottom: 1px solid var(--sw-line);
}

html[data-project="smart-water"] .case-system-design__thesis div {
  min-width: 0;
}

html[data-project="smart-water"] .case-system-design__thesis p {
  margin: 12px 0 0;
  color: #5a7189;
  font-size: 14px;
  line-height: 1.75;
}

html[data-project="smart-water"] .case-system-design__thesis strong {
  display: block;
  margin-top: 10px;
  color: var(--sw-ink);
  font: 400 clamp(24px, 2.6vw, 36px)/1.45 var(--serif);
}

html[data-project="smart-water"] .case-system-design__body {
  grid-template-columns: .75fr 1.25fr;
  gap: 1px;
  padding: 1px;
  background: var(--sw-line);
}

html[data-project="smart-water"] .case-system-design__body section {
  padding: clamp(24px, 3vw, 34px);
}

html[data-project="smart-water"] .case-system-design__modules {
  margin-top: 16px;
}

html[data-project="smart-water"] .case-system-design__journey {
  margin-top: 28px;
}

html[data-project="smart-water"] .case-system-media {
  margin-top: clamp(68px, 8vw, 108px);
}

html[data-project="smart-water"] .case-system-media > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, .58fr);
  gap: 22px 52px;
  align-items: end;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--sw-line);
}

html[data-project="smart-water"] .case-system-media > header small {
  grid-column: 1 / -1;
  margin: 0;
}

html[data-project="smart-water"] .case-system-media > header h4 {
  margin: 0;
  color: var(--sw-ink);
  font: 400 clamp(26px, 3vw, 40px)/1.35 var(--serif);
}

html[data-project="smart-water"] .case-system-media > header p {
  margin: 0;
  padding-left: 18px;
  color: #58718b;
  border-left: 2px solid #63a4dc;
  font-size: 13px;
  line-height: 1.75;
}

html[data-project="smart-water"] .case-system-media__asset {
  scroll-margin-top: 180px;
}

html[data-project="smart-water"] .case-system-media__asset > header {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  margin-bottom: 18px;
}

html[data-project="smart-water"] .case-system-media__asset > header h5 {
  color: var(--sw-ink);
}

html[data-project="smart-water"] .sw-presenter-cue {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 45;
  width: auto;
  max-width: min(230px, calc(100vw - 36px));
  padding: 8px 13px 8px 10px;
  color: var(--sw-ink);
  border: 1px solid rgba(47, 120, 187, .12);
  border-radius: 999px;
  background: rgba(244, 249, 252, .82);
  box-shadow: 0 6px 18px rgba(33, 76, 116, .07);
  backdrop-filter: blur(12px);
}

html[data-project="smart-water"] .sw-presenter-cue__row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
}

html[data-project="smart-water"] .sw-presenter-cue__row::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #45a4c2;
  box-shadow: 0 0 0 4px rgba(69, 164, 194, .1);
}

html[data-project="smart-water"] .sw-presenter-cue strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-project="smart-water"] .case-system-design.is-presentation-active .case-system-design__thesis {
  border-color: rgba(47, 120, 187, .34);
}

@media (max-width: 980px) {
  html[data-project="smart-water"] .case-system-design__thesis,
  html[data-project="smart-water"] .case-system-media > header {
    grid-template-columns: 1fr;
  }

  html[data-project="smart-water"] .case-system-media > header small {
    grid-column: 1;
  }

  html[data-project="smart-water"] .case-system-media > header p {
    max-width: 560px;
  }
}

@media (max-width: 720px) {
  html[data-project="smart-water"] .case-system-design__body {
    grid-template-columns: 1fr;
  }

  html[data-project="smart-water"] .sw-presenter-cue {
    right: 10px;
    bottom: 10px;
    width: auto;
    max-width: calc(100vw - 20px);
  }
}

/* Four-system solution opener — aligned to the selected editorial reference. */
html[data-project="smart-water"] .case-story-chapter--design {
  padding-top: clamp(58px, 6vw, 84px);
}

html[data-project="smart-water"] .case-story-chapter--design > header {
  position: relative;
  display: grid;
  grid-template-columns: clamp(130px, 14vw, 190px) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 14px clamp(36px, 5vw, 76px);
  align-items: start;
  margin-bottom: 0;
  padding: clamp(34px, 4vw, 54px) 0 clamp(28px, 3.5vw, 46px);
  overflow: hidden;
  border-top: 1px solid rgba(56, 111, 165, .18);
  border-bottom: 0;
  isolation: isolate;
}

html[data-project="smart-water"] .case-story-chapter--design > header::after {
  position: absolute;
  z-index: -1;
  top: -22%;
  right: -6%;
  width: min(520px, 43vw);
  height: 150%;
  content: "";
  pointer-events: none;
  background: url("assets/hero/cici-water-surface-illustration-v1.png") center / cover no-repeat;
  opacity: .105;
  filter: saturate(.52) brightness(1.1) contrast(.82);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.7) 38%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.7) 38%, #000 100%);
}

html[data-project="smart-water"] .case-story-chapter--design > header > span {
  grid-column: 1;
  grid-row: 1;
  display: block;
  margin: -5px 0 0;
  color: #2f78bb;
  font: 400 clamp(52px, 5vw, 72px)/.9 var(--serif);
  letter-spacing: -.035em;
}

html[data-project="smart-water"] .case-story-chapter--design > header > p {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  margin: 0;
  padding-bottom: 28px;
  color: #487da9;
  font: 600 11px/1.4 var(--mono);
  letter-spacing: .16em;
}

html[data-project="smart-water"] .case-story-chapter--design > header > p::after {
  position: absolute;
  left: 1px;
  bottom: 0;
  content: "/";
  color: #4c91d0;
  font-size: 22px;
  font-weight: 400;
}

html[data-project="smart-water"] .case-story-chapter--design > header > h2 {
  grid-column: 2;
  grid-row: 1;
  max-width: 800px;
  margin: -10px 0 0;
  color: var(--sw-ink);
  font: 400 clamp(50px, 5.2vw, 76px)/1.08 var(--serif);
  letter-spacing: -.035em;
}

html[data-project="smart-water"] .case-story-chapter--design > header .case-story-chapter__intro {
  grid-column: 2;
  grid-row: 2;
  grid-template-columns: 32px minmax(0, 620px);
  gap: 18px;
  align-items: start;
  margin: 4px 0 0;
}

html[data-project="smart-water"] .case-story-chapter--design > header .case-story-chapter__intro i {
  margin-top: 10px;
  background: #3f8dcc;
}

html[data-project="smart-water"] .case-story-chapter--design > header .case-story-chapter__intro p {
  margin: 0;
  color: #526e89 !important;
  font-size: 15px;
  line-height: 1.75;
}

html[data-project="smart-water"] .case-story-chapter--design > .case-story-chapter__content > .case-flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 clamp(84px, 9vw, 126px);
  padding: 0;
  overflow: visible;
  border-top: 1px solid rgba(56, 111, 165, .19);
  border-bottom: 1px solid rgba(56, 111, 165, .13);
}

html[data-project="smart-water"] .case-story-chapter--design > .case-story-chapter__content > .case-flow li {
  position: relative;
  min-width: 0;
  padding: 26px clamp(20px, 2.5vw, 38px) 28px 0;
  border: 0;
}

html[data-project="smart-water"] .case-story-chapter--design > .case-story-chapter__content > .case-flow li::before {
  display: block;
  margin-bottom: 22px;
  color: #2f78bb;
  font: 600 11px/1 var(--mono);
  letter-spacing: .12em;
}

html[data-project="smart-water"] .case-story-chapter--design > .case-story-chapter__content > .case-flow li:not(:last-child)::after {
  position: absolute;
  top: 30px;
  right: clamp(10px, 1.5vw, 24px);
  color: #5594cc;
  font-size: 18px;
  font-weight: 300;
}

html[data-project="smart-water"] .case-story-chapter--design > .case-story-chapter__content > .case-flow p {
  max-width: 190px;
  margin: 0;
  color: #476783 !important;
  font-size: 14px;
  line-height: 1.65;
}

@media (max-width: 760px) {
  html[data-project="smart-water"] .case-story-chapter--design > header {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px 20px;
    padding-top: 24px;
  }

  html[data-project="smart-water"] .case-story-chapter--design > header > span {
    font-size: 46px;
  }

  html[data-project="smart-water"] .case-story-chapter--design > header > p {
    grid-column: 1;
    font-size: 9px;
  }

  html[data-project="smart-water"] .case-story-chapter--design > header > h2 {
    grid-column: 2;
    font-size: clamp(38px, 11vw, 54px);
  }

  html[data-project="smart-water"] .case-story-chapter--design > header .case-story-chapter__intro {
    grid-column: 2;
  }

  html[data-project="smart-water"] .case-story-chapter--design > .case-story-chapter__content > .case-flow {
    grid-template-columns: 1fr;
    margin-bottom: 72px;
    border-bottom: 0;
  }

  html[data-project="smart-water"] .case-story-chapter--design > .case-story-chapter__content > .case-flow li {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    align-items: baseline;
    padding: 18px 0;
    border-bottom: 1px solid rgba(56, 111, 165, .13);
  }

  html[data-project="smart-water"] .case-story-chapter--design > .case-story-chapter__content > .case-flow li::before {
    margin: 0;
  }

  html[data-project="smart-water"] .case-story-chapter--design > .case-story-chapter__content > .case-flow li:not(:last-child)::after {
    display: none;
  }
}

/* Keep the walkthrough rail inside the reading grid so its title and controls
   remain fully visible on medium desktop widths. */
@media (min-width: 981px) {
  html[data-project="smart-water"] .case-system-guide {
    width: 100%;
    margin-left: 0;
    padding-left: 0;
  }
}
