/* Compact flow is the baseline; long tracks activate only after a fit check. */
:is(#eser[data-scroll-story="capture"], #secki[data-scroll-story="showcase"], #edinimler[data-scroll-story="wealth"]) {
  position: relative;
  display: block;
  padding-block: 0;
  overflow-anchor: none;
}

:is(#eser[data-scroll-story="capture"], #secki[data-scroll-story="showcase"], #edinimler[data-scroll-story="wealth"]) > .story-sticky {
  position: relative;
  box-sizing: border-box;
  min-height: 0;
  padding-block: clamp(40px, 7vw, 72px);
}

#eser[data-scroll-story="capture"] > .story-sticky {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

#secki[data-scroll-story="showcase"] > .story-sticky,
#edinimler[data-scroll-story="wealth"] > .story-sticky {
  display: grid;
  grid-template-rows: auto auto;
  align-content: center;
  gap: 0;
}

#secki[data-scroll-story="showcase"] .selection-canvas {
  display: block;
}

#secki[data-scroll-story="showcase"][data-story-phase="select"] .selection-canvas {
  display: none;
}

#secki[data-scroll-story="showcase"] .selection-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
  padding: 8px 0 20px;
}

#secki[data-scroll-story="showcase"] .selection-intro {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  grid-column: 1 / -1;
}

#secki[data-scroll-story="showcase"] .selection-intro h3 {
  margin: 0;
  font: 500 clamp(21px, 2.2vw, 28px)/1.2 var(--serif);
}

#secki[data-scroll-story="showcase"] .selection-choices {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(12px, 1.5vw, 22px);
  min-width: 0;
  grid-column: 1 / -1;
}

#secki[data-scroll-story="showcase"][data-story-phase="select"] .selection-toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

#secki[data-scroll-story="showcase"][data-story-phase="select"] .selection-choices {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#secki[data-scroll-story="showcase"] .selection-choice {
  position: relative;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 8px;
  padding: 12px;
  border: 1px solid transparent;
  background: var(--wash);
  color: var(--ink);
  text-align: left;
}

#secki[data-scroll-story="showcase"] .selection-choice > .work-image {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  grid-row: 1;
}

#secki[data-scroll-story="showcase"] .selection-choice > strong {
  grid-row: 2;
  font-size: 14px;
  font-weight: 500;
}

#secki[data-scroll-story="showcase"] .selection-choice > small {
  grid-row: 3;
  color: var(--muted);
  font-size: 12px;
}

#secki[data-scroll-story="showcase"] .selection-choice .selection-check {
  position: absolute;
  top: 16px;
  right: 16px;
}

#secki[data-scroll-story="showcase"] .selection-choices [data-select-art][aria-pressed="true"] {
  border-color: var(--navy);
}

#secki[data-scroll-story="showcase"] .selection-choice[aria-pressed="false"] > .work-image {
  opacity: .5;
}

#secki[data-scroll-story="showcase"][data-story-phase="compose"] .selection-toolbar,
#secki[data-scroll-story="showcase"][data-story-phase="present"] .selection-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 8px 0 16px;
}

#secki[data-scroll-story="showcase"][data-story-phase="compose"] .selection-intro,
#secki[data-scroll-story="showcase"][data-story-phase="present"] .selection-intro {
  grid-column: 1 / -1;
  width: 100%;
}

#secki[data-scroll-story="showcase"] .story-phase-controls { grid-column: 1 / -1; }
#secki[data-scroll-story="showcase"]:not([data-story-phase="select"]) .selection-intro h3 { font-size: 21px; }

#secki[data-scroll-story="showcase"][data-story-phase="compose"] .selection-choices,
#secki[data-scroll-story="showcase"][data-story-phase="present"] .selection-choices {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-column: 1;
  gap: 8px;
}

#secki[data-scroll-story="showcase"][data-story-phase="compose"] .selection-choice,
#secki[data-scroll-story="showcase"][data-story-phase="present"] .selection-choice {
  min-height: 60px;
  grid-template-columns: 40px minmax(0, 1fr) 18px;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 3px 8px;
  padding: 5px 7px;
}

#secki[data-scroll-story="showcase"][data-story-phase="compose"] .selection-choice > .work-image,
#secki[data-scroll-story="showcase"][data-story-phase="present"] .selection-choice > .work-image {
  width: 40px;
  height: 50px;
  aspect-ratio: auto;
  grid-column: 1;
  grid-row: 1 / 3;
}

#secki[data-scroll-story="showcase"][data-story-phase="compose"] .selection-choice > strong,
#secki[data-scroll-story="showcase"][data-story-phase="present"] .selection-choice > strong {
  grid-column: 2;
  grid-row: 1;
  overflow-wrap: anywhere;
  font-size: 12px;
}

#secki[data-scroll-story="showcase"][data-story-phase="compose"] .selection-choice > small,
#secki[data-scroll-story="showcase"][data-story-phase="present"] .selection-choice > small {
  grid-column: 2;
  grid-row: 2;
  font-size: 10px;
}

#secki[data-scroll-story="showcase"][data-story-phase="compose"] .selection-choice .selection-check,
#secki[data-scroll-story="showcase"][data-story-phase="present"] .selection-choice .selection-check {
  position: static;
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
}

#secki[data-scroll-story="showcase"][data-story-phase="compose"] .selection-canvas,
#secki[data-scroll-story="showcase"][data-story-phase="present"] .selection-canvas {
  display: block;
}

#secki[data-scroll-story="showcase"][data-story-phase="compose"] .selection-canvas {
  padding: clamp(22px, 3vw, 36px);
}

#secki[data-scroll-story="showcase"][data-story-phase="compose"] .selection-brand {
  margin-bottom: 12px;
}

#secki[data-scroll-story="showcase"][data-story-phase="compose"] .selection-brand img {
  width: 116px;
}

#secki[data-scroll-story="showcase"][data-story-phase="compose"] .selection-title {
  margin-bottom: 16px;
}

#secki[data-scroll-story="showcase"][data-story-phase="compose"] .showcase-artworks {
  min-height: 0;
  gap: 22px;
}

#secki[data-scroll-story="showcase"][data-story-phase="compose"] .showcase-artworks figure {
  width: auto;
  max-width: 280px;
  flex: 1 1 0;
}

#secki[data-scroll-story="showcase"][data-story-phase="compose"] .showcase-artworks figure > .work-image {
  max-height: 32svh;
  aspect-ratio: 3 / 4;
  border-width: 7px;
}

#secki[data-scroll-story="showcase"][data-story-phase="compose"] .showcase-artworks figure:nth-child(2) {
  padding-top: 18px;
}

#secki[data-scroll-story="showcase"][data-story-phase="compose"] .showcase-artworks figcaption {
  padding-top: 8px;
}

#secki[data-scroll-story="showcase"][data-story-phase="compose"] .selection-footer {
  margin-top: 12px;
}

#secki[data-scroll-story="showcase"][data-story-phase="present"] .selection-canvas {
  display: grid;
  grid-template-columns: minmax(90px, .35fr) minmax(0, 1fr);
  align-items: center;
  gap: 14px 34px;
  padding: 26px clamp(28px, 5vw, 64px) 20px;
  background: var(--paper);
}

#secki[data-scroll-story="showcase"][data-story-phase="present"] .selection-brand {
  grid-column: 1 / -1;
  margin: 0;
}

#secki[data-scroll-story="showcase"][data-story-phase="present"] .selection-brand img {
  width: 130px;
}

#secki[data-scroll-story="showcase"][data-story-phase="present"] .selection-title {
  grid-column: 1;
  grid-row: 2;
  display: block;
  margin: 0;
}

#secki[data-scroll-story="showcase"][data-story-phase="present"] .selection-title h3 {
  font-size: clamp(30px, 3.5vw, 48px);
}

#secki[data-scroll-story="showcase"][data-story-phase="present"] .selection-title > span {
  display: block;
  max-width: 22ch;
  margin-top: 12px;
}

#secki[data-scroll-story="showcase"][data-story-phase="present"] .showcase-artworks {
  grid-column: 2;
  grid-row: 2;
  min-height: 0;
  align-items: center;
  gap: 14px;
}

#secki[data-scroll-story="showcase"][data-story-phase="present"] .showcase-artworks figure {
  width: auto;
  max-width: 260px;
  flex: 1 1 0;
}

#secki[data-scroll-story="showcase"][data-story-phase="present"] .showcase-artworks figure > .work-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 34svh;
  border-width: 7px;
}

#secki[data-scroll-story="showcase"][data-story-phase="present"] .showcase-artworks figure:nth-child(2) {
  padding-top: 0;
}

#secki[data-scroll-story="showcase"][data-story-phase="present"] .selection-footer {
  grid-column: 1 / -1;
  margin: 12px 0 0;
}

#secki[data-scroll-story="showcase"] [data-showcase-art][data-story-selected="false"] {
  opacity: .24;
  transform: translateY(8px);
}

#secki[data-scroll-story="showcase"] [data-showcase-art][data-story-selected="true"] {
  opacity: 1;
  transform: translateY(0);
}

.story-phase-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 14px;
  margin: 0;
}

.story-phase-controls button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.story-phase-controls button[aria-pressed="true"] {
  color: var(--ink);
  font-weight: 600;
}

.story-phase-dot {
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.story-phase-controls button[aria-pressed="true"] .story-phase-dot {
  background: currentColor;
}

#edinimler .story-phase-controls button {
  color: var(--charcoal-muted);
}

#edinimler .story-phase-controls button[aria-pressed="true"] {
  color: var(--charcoal-ink);
}

.story-phase-controls button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

#edinimler[data-scroll-story="wealth"] > .story-sticky {
  position: relative;
}

#edinimler[data-scroll-story="wealth"] .wealth-demo-note {
  position: absolute;
  right: 0;
  bottom: 12px;
  margin: 0;
}

@media (min-width: 1180px) and (min-height: 760px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  :is(#eser[data-scroll-story="capture"], #secki[data-scroll-story="showcase"], #edinimler[data-scroll-story="wealth"])[data-story-mode="pinned"] {
    height: 280svh;
    min-height: 0;
  }

  :is(#eser[data-scroll-story="capture"], #secki[data-scroll-story="showcase"], #edinimler[data-scroll-story="wealth"])[data-story-mode="pinned"] > .story-sticky {
    position: sticky;
    top: 0;
    height: 100svh;
    min-height: 100svh;
    padding-block: clamp(32px, 5svh, 48px);
    overflow: visible;
    align-content: center;
  }

  #eser[data-scroll-story="capture"][data-story-mode="pinned"] > .story-sticky {
    gap: clamp(32px, 3vw, 48px);
  }

  #secki[data-scroll-story="showcase"][data-story-mode="pinned"] > .story-sticky,
  #edinimler[data-scroll-story="wealth"][data-story-mode="pinned"] > .story-sticky {
    grid-template-rows: auto minmax(0, 1fr);
    align-content: start;
  }
  #secki[data-story-mode="pinned"] .showcase-workspace,
  #edinimler[data-story-mode="pinned"] .wealth-presentation { align-self: start; }

  #eser[data-scroll-story="capture"][data-story-mode="pinned"] .capture-stage {
    min-height: min(465px, 52svh);
    padding: 20px 22px 42px;
  }

  #secki[data-scroll-story="showcase"][data-story-mode="pinned"] .split-heading,
  #edinimler[data-scroll-story="wealth"][data-story-mode="pinned"] .split-heading {
    margin-bottom: 20px;
  }

  #secki[data-scroll-story="showcase"][data-story-mode="pinned"] .split-heading h2,
  #edinimler[data-scroll-story="wealth"][data-story-mode="pinned"] .split-heading h2 {
    font-size: clamp(38px, 3.6vw, 52px);
  }

  #secki[data-scroll-story="showcase"][data-story-mode="pinned"] .selection-canvas {
    padding: 20px 28px 14px;
  }

  #edinimler[data-scroll-story="wealth"][data-story-mode="pinned"] .wealth-presentation {
    padding: 18px 28px;
  }

  #edinimler[data-scroll-story="wealth"][data-story-mode="pinned"] .wealth-demo-note {
    bottom: 8px;
  }
}

@media (max-width: 850px) {
  #eser[data-scroll-story="capture"] > .story-sticky {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  #secki[data-scroll-story="showcase"] .selection-choices,
  #secki[data-scroll-story="showcase"][data-story-phase="select"] .selection-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  #secki[data-scroll-story="showcase"][data-story-phase="compose"] .selection-choices,
  #secki[data-scroll-story="showcase"][data-story-phase="present"] .selection-choices {
    flex-basis: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #secki[data-scroll-story="showcase"][data-story-phase="present"] .selection-canvas {
    grid-template-columns: minmax(0, 1fr);
  }

  #secki[data-scroll-story="showcase"][data-story-phase="present"] .selection-title,
  #secki[data-scroll-story="showcase"][data-story-phase="present"] .showcase-artworks {
    grid-column: 1;
    grid-row: auto;
  }

  #secki[data-scroll-story="showcase"][data-story-phase="present"] .selection-title {
    margin-bottom: 12px;
  }
}

@media (max-width: 640px) {
  :is(#eser[data-scroll-story="capture"], #secki[data-scroll-story="showcase"], #edinimler[data-scroll-story="wealth"]) > .story-sticky {
    padding-block: 48px;
  }

  #secki[data-scroll-story="showcase"] .selection-toolbar,
  #secki[data-scroll-story="showcase"][data-story-phase="select"] .selection-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  #secki[data-scroll-story="showcase"][data-story-phase="select"] .selection-choice {
    padding: 8px;
  }

  #secki[data-scroll-story="showcase"][data-story-phase="compose"] .selection-choice,
  #secki[data-scroll-story="showcase"][data-story-phase="present"] .selection-choice {
    min-height: 54px;
    grid-template-columns: 34px minmax(0, 1fr) 16px;
    padding: 4px;
  }

  #secki[data-scroll-story="showcase"][data-story-phase="compose"] .selection-choice > .work-image,
  #secki[data-scroll-story="showcase"][data-story-phase="present"] .selection-choice > .work-image {
    width: 34px;
    height: 44px;
  }

  #secki[data-scroll-story="showcase"][data-story-phase="compose"] .showcase-artworks,
  #secki[data-scroll-story="showcase"][data-story-phase="present"] .showcase-artworks {
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #secki[data-scroll-story="showcase"] [data-showcase-art] {
    opacity: 1 !important;
    transform: none !important;
  }
}

#secki[data-scroll-story="showcase"] .selection-choice[aria-pressed="false"] .selection-check { display: grid; border: 1px solid var(--navy); background: var(--paper); }
#secki[data-scroll-story="showcase"] .selection-choice[aria-pressed="false"] .selection-check::after { display: none; }
#secki[data-scroll-story="showcase"] .selection-choice[aria-pressed="false"] > .work-image { opacity: .78; }
@media (max-width: 850px) {
  #secki[data-scroll-story="showcase"]:not([data-story-phase="select"]) .selection-choices { grid-column: 1 / -1; }
  #secki[data-scroll-story="showcase"]:not([data-story-phase="select"]) .caption-control { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  #secki[data-scroll-story="showcase"]:not([data-story-phase="select"]) .showcase-artworks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  #secki[data-scroll-story="showcase"]:not([data-story-phase="select"]) .showcase-artworks figure { width: 100%; max-width: none; margin: 0; padding-top: 0; }
}
