/* AI result analysis overview: one compact explanation between the promise and the recurring loop. */

.analysisOverviewSection {
  position: relative;
}

.analysisOverviewIntro {
  max-width: 760px;
  margin-bottom: clamp(34px, 4vw, 48px);
}

.analysisOverviewIntro .sectionTitle {
  max-width: 16ch;
}

.analysisOverviewIntro .sectionText {
  max-width: 64ch;
  margin: 20px 0 0;
}

.analysisOverviewEquation {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr) 42px minmax(0, 1fr) 54px minmax(0, 1.12fr);
  align-items: stretch;
  overflow: hidden;
  border-top: 1px solid var(--green-200, #9fb0a5);
  border-bottom: 1px solid var(--green-200, #9fb0a5);
  background: rgba(255, 255, 255, 0.42);
}

.analysisOverviewBlock {
  position: relative;
  padding: clamp(23px, 2.7vw, 32px) clamp(19px, 2.4vw, 29px);
}

.analysisOverviewBlock::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--overview-accent, var(--blue-500, #3d73af));
  content: "";
}

.analysisOverviewBlock--evidence {
  --overview-accent: var(--blue-500, #3d73af);
}

.analysisOverviewBlock--context {
  --overview-accent: var(--aqua-500, #84dcce);
}

.analysisOverviewBlock--outcome {
  --overview-accent: var(--green-500, #10391d);
  background: transparent;
}

.analysisOverviewLabel {
  color: var(--blue-600, #315c8c);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.analysisOverviewBlock--context .analysisOverviewLabel,
.analysisOverviewBlock--outcome .analysisOverviewLabel {
  color: var(--green-400, #40614a);
}

.analysisOverviewBlock h3 {
  max-width: 17ch;
  margin: 14px 0 0;
  color: var(--green-500, #10391d);
  font-family: var(--font-serif, Georgia, serif);
  font-size: clamp(23px, 2.2vw, 31px);
  font-weight: 400;
  line-height: 1.06;
}

.analysisOverviewList {
  display: grid;
  gap: 0;
  margin: 16px 0 0;
  padding: 0;
  border-top: 1px solid rgba(16, 57, 29, 0.11);
  list-style: none;
}

.analysisOverviewList li {
  position: relative;
  padding: 10px 0 10px 18px;
  border-bottom: 1px solid rgba(16, 57, 29, 0.11);
  color: var(--green-400, #40614a);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.42;
}

.analysisOverviewList li::before {
  position: absolute;
  top: 15px;
  left: 2px;
  width: 6px;
  height: 6px;
  background: var(--overview-accent, var(--blue-500, #3d73af));
  content: "";
  transform: rotate(45deg);
}

.analysisOverviewOperator {
  align-self: start;
  justify-self: center;
  padding-top: clamp(76px, 6.2vw, 92px);
  color: var(--green-300, #708877);
  font-size: 21px;
  font-weight: 500;
  line-height: 1;
}

.analysisOverviewOperator--arrow {
  color: var(--blue-600, #315c8c);
  font-size: 23px;
}

/*
 * Desktop loop geometry.
 * Keep the defining frame full-width, place the four process cards near its
 * outer edges, and reserve the center for the financial-memory loop.
 * Row starts are shared so 01/02 and 04/03 align exactly.
 */
@media (min-width: 981px) {
  .analysisLoopPanel {
    width: 100%;
    max-width: none;
    min-height: 575px;
    margin-inline: 0;
  }

  .analysisLoopTrack {
    transform: scale(0.82, 0.84);
    transform-origin: 50% 50%;
  }

  .analysisLoopGrid {
    display: grid;
    grid-template-columns: minmax(270px, 300px) minmax(360px, 1fr) minmax(270px, 300px);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "detect core explain"
      "reuse core report";
    justify-content: stretch;
    align-content: stretch;
    column-gap: clamp(42px, 4vw, 56px);
    row-gap: clamp(34px, 3vw, 42px);
    min-height: 575px;
    padding: 42px 46px;
  }

  .analysisLoopNode {
    position: relative;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: calc(100% + 24px);
    max-width: 324px;
    height: 100%;
    min-height: 0;
    align-self: stretch;
  }

  .analysisLoopNode h3 {
    max-width: 12ch;
    min-height: 2.16em;
    text-wrap: balance;
  }

  .analysisLoopNode--detect,
  .analysisLoopNode--reuse {
    justify-self: start;
  }

  .analysisLoopNode--explain,
  .analysisLoopNode--report {
    justify-self: end;
  }

  .analysisLoopCore {
    position: relative;
    align-self: center;
    justify-self: center;
    width: clamp(231px, 19.2vw, 255px);
    margin: 0;
    transform: none;
  }

  .analysisLoopCore img {
    width: 58px;
    height: 58px;
    margin-bottom: 10px;
  }

  .analysisLoopCore strong {
    font-size: clamp(28px, 2.4vw, 34px);
  }

  .analysisLoopCore span {
    margin-top: 8px;
    font-size: 10px;
  }

  html[lang="fi"] .analysisLoopCore img {
    width: 58px;
    height: 58px;
    margin-bottom: 10px;
  }

  html[lang="fi"] .analysisLoopCore strong {
    font-size: clamp(27px, 2.15vw, 30px);
  }

  html[lang="fi"] .analysisLoopCore span {
    margin-top: 8px;
    font-size: 10px;
  }
}

@media (max-width: 980px) {
  .analysisOverviewIntro {
    max-width: 720px;
    margin-bottom: 30px;
  }

  .analysisOverviewIntro .sectionTitle {
    max-width: 16ch;
  }

  .analysisOverviewIntro .sectionText {
    max-width: 64ch;
  }

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

  .analysisOverviewBlock {
    border-bottom: 1px solid rgba(16, 57, 29, 0.12);
  }

  .analysisOverviewBlock--outcome {
    border-bottom: 0;
  }

  .analysisOverviewOperator {
    align-self: center;
    min-height: 38px;
    padding-top: 0;
    place-self: center;
  }

  .analysisOverviewOperator--arrow {
    transform: rotate(90deg);
  }
}

@media (max-width: 620px) {
  .analysisOverviewIntro {
    margin-bottom: 24px;
  }

  .analysisOverviewBlock {
    padding: 22px 19px;
  }

  .analysisOverviewBlock h3 {
    max-width: none;
  }

  .analysisOverviewOperator {
    min-height: 34px;
    font-size: 21px;
  }
}

/*
 * Centered editorial lockups for the two explanatory section intros only.
 * Keep the heading compact and the body copy on a controlled reading measure
 * so centering creates hierarchy without turning the paragraphs into wide text blocks.
 */
.analysisOverviewIntro,
.analysisLoopIntro {
  width: min(100%, 820px);
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
}

.analysisOverviewIntro .sectionTitle,
.analysisLoopIntro .sectionTitle {
  max-width: 22ch;
  margin-inline: auto;
  text-wrap: balance;
}

.analysisOverviewIntro .sectionText {
  max-width: 62ch;
  margin: 20px auto 0;
  text-wrap: pretty;
}

.analysisLoopIntro .sectionText {
  max-width: 62ch;
  margin-inline: auto;
  text-wrap: pretty;
}

@media (max-width: 620px) {
  .analysisOverviewIntro,
  .analysisLoopIntro {
    width: 100%;
  }

  .analysisOverviewIntro .sectionTitle,
  .analysisLoopIntro .sectionTitle {
    max-width: 18ch;
  }
}

/* One desktop editorial width system for the AI-analysis promise, explanation, loop and first-analysis CTA. */
@media (min-width: 981px) {
  html[data-page="ai-analysis"] .analysisMemoryPage .analysisHeroInner {
    display: grid;
    grid-template-columns: minmax(0, 75%);
    justify-content: center;
  }

  html[data-page="ai-analysis"] .analysisMemoryPage .analysisHeroCopy {
    width: 100%;
    max-width: none;
    justify-items: center;
    text-align: center;
  }

  html[data-page="ai-analysis"] .analysisMemoryPage .analysisHero h1,
  html[data-page="ai-analysis"] .analysisMemoryPage .analysisHero .lead {
    width: 100%;
    max-width: none;
    margin-inline: auto;
  }

  html[data-page="ai-analysis"] .analysisMemoryPage .analysisHero h1 {
    text-wrap: balance;
  }

  html[data-page="ai-analysis"] .analysisMemoryPage .analysisHero .lead {
    text-wrap: pretty;
  }

  html[data-page="ai-analysis"] .analysisMemoryPage .analysisHeroNote {
    margin-inline: auto;
    text-align: center;
  }

  html[data-page="ai-analysis"] .analysisMemoryPage .analysisHeroActions {
    justify-content: center;
    padding-top: 12px;
  }

  .analysisOverviewIntro,
  .analysisLoopIntro {
    width: 75%;
    max-width: none;
  }

  .analysisOverviewIntro .sectionTitle,
  .analysisLoopIntro .sectionTitle,
  .analysisOverviewIntro .sectionText,
  .analysisLoopIntro .sectionText {
    width: 100%;
    max-width: none;
  }

  .analysisOverviewIntro {
    margin-bottom: clamp(56px, 5.5vw, 72px);
  }

  .analysisLoopIntro {
    margin-bottom: clamp(58px, 5.8vw, 76px);
  }

  .analysisFinalCtaBand {
    grid-template-columns: 1fr;
    gap: clamp(52px, 6vw, 76px);
  }

  .analysisFinalCtaCopy {
    width: 75%;
    max-width: none;
    margin-inline: auto;
    justify-items: center;
    text-align: center;
  }

  .analysisFinalCtaCopy .sectionTitle,
  .analysisFinalCtaCopy .ctaText {
    width: 100%;
    max-width: none;
  }

  .analysisFinalCtaBand > div:last-child {
    width: 75%;
    margin-inline: auto;
  }
}
