:root {
  --paper: #f4f6f8;
  --navy: #29648e;
  --navy-deep: #1e4d6e;
  --ink: #1a3347;
  --muted: #6b8496;
  --line: rgba(41, 100, 142, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: auto; }

body.lab {
  margin: 0;
  font-family: "Manrope", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #c5d7e6 0%, #e8eef4 42%, #f4f6f8 100%);
  overflow-x: hidden;
  cursor: none;
}

body.lab.touch { cursor: auto; }
body.lab.touch .lab-cursor { display: none; }

a { color: inherit; text-decoration: none; }

.lab-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.lab-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  border: 1.5px solid var(--navy);
  background: rgba(41, 100, 142, 0.12);
  pointer-events: none;
  mix-blend-mode: multiply;
  transition: transform 0.2s var(--ease), width 0.2s, height 0.2s, margin 0.2s;
  will-change: transform;
}

.lab-cursor.is-hot {
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
  background: rgba(41, 100, 142, 0.08);
}

.lab-header,
.lab-main,
.lab-footer {
  position: relative;
  z-index: 1;
}

.lab-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  min-height: 4.75rem;
  padding: 0.85rem clamp(1rem, 3vw, 2rem);
  background: rgba(244, 246, 248, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.lab-header > .brand {
  grid-column: 1;
  justify-self: start;
  min-width: 0;
  max-width: 100%;
}

.lab-header > .brand .brand-logo,
.lab-header > .brand img {
  max-width: 100%;
  width: auto;
  object-fit: contain;
}

.lab-header > .lab-switch,
.lab-header > .network-header-actions {
  /* Slogan gizlenince (mobil) ortadaki kolon kalkmasın — sağa pin */
  grid-column: -1;
  justify-self: end;
}

.brand { display: inline-flex; align-items: baseline; gap: 0.4rem; }
.brand-mark {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.55rem;
  color: var(--navy);
}
.brand-sub {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.lab-badge {
  margin: 0;
  justify-self: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.lab-switch {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

.lab-switch a {
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.lab-switch a.is-current {
  background: var(--navy);
  color: #f4f6f8;
}

/* Sol bölüm akışı: mobilde yok, masaüstünde sabit ray */
:root {
  --lab-rail-left: clamp(0.85rem, 2.4vw, 2rem);
  --lab-rail-width: 11.5rem;
  --lab-rail-span: calc(var(--lab-rail-left) + var(--lab-rail-width) + 0.85rem);
}

.lab-chapters {
  display: none !important;
  position: fixed;
  left: var(--lab-rail-left);
  top: 50%;
  z-index: 120;
  width: var(--lab-rail-width);
  transform: translateY(-50%);
  pointer-events: none;
}

@media (min-width: 900px) {
  .lab-chapters {
    display: block !important;
  }
}

.lab-chapters .lab-chapter {
  pointer-events: auto;
}

.lab-rail {
  position: absolute;
  left: 0.28rem;
  top: 0.4rem;
  bottom: 1.6rem;
  border-left: 1px dotted rgba(41, 100, 142, 0.35);
}

.lab-chapters ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.1rem;
}

.lab-chapter {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  display: grid;
  grid-template-columns: 0.7rem auto;
  column-gap: 0.75rem;
  text-align: left;
  color: var(--muted);
  font: inherit;
  cursor: none;
}

.lab-chapter .dot {
  grid-row: 1 / span 2;
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.15rem;
  border-radius: 50%;
  border: 1.5px solid var(--navy);
  background: var(--paper);
  box-shadow: 0 0 0 4px rgba(244, 246, 248, 0.92);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}

.lab-chapter .key {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.lab-chapter .label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 9.5rem;
}

.lab-chapter.is-active { color: var(--navy-deep); }
.lab-chapter.is-active .dot {
  background: var(--navy);
  transform: scale(1.25);
  box-shadow:
    0 0 0 4px rgba(244, 246, 248, 0.95),
    0 0 0 8px rgba(41, 100, 142, 0.12);
}

.lab-progress {
  display: none;
}

.lab-progress i {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--navy);
}

/* Panels */
.lab-main { padding-top: 4.75rem; }

.lab-panel {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  display: grid;
  align-content: center;
  padding-top: clamp(2rem, 8vh, 5rem);
  padding-right: clamp(1.25rem, 4vw, 3rem);
  padding-bottom: clamp(3rem, 10vh, 6rem);
  padding-left: clamp(1.25rem, 4vw, 3rem);
}

/* Masaüstü: sol akış için boşluk — shorthand’tan sonra gelmeli */
@media (min-width: 900px) {
  .lab-panel {
    padding-left: var(--lab-rail-span);
  }
}

.panel-inner {
  max-width: 46rem;
  padding: 1.25rem 1.35rem;
  border-radius: 18px;
  background: rgba(244, 246, 248, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(41, 100, 142, 0.1);
  opacity: 0.18;
  transform: translateY(40px);
  filter: blur(2px);
  will-change: transform, opacity, filter;
  /* Chromium: scrollbar-width: thin, ::-webkit-scrollbar 1px’i ezer — koyma */
  scrollbar-color: #cc3300 transparent;
}

body.lab .panel-inner::-webkit-scrollbar,
body.lab .division-track::-webkit-scrollbar {
  width: 1px;
  height: 1px;
}

body.lab .panel-inner::-webkit-scrollbar-track,
body.lab .division-track::-webkit-scrollbar-track {
  background: transparent;
}

body.lab .panel-inner::-webkit-scrollbar-thumb,
body.lab .division-track::-webkit-scrollbar-thumb {
  background-color: #cc3300;
  background-clip: padding-box;
  border: 0;
  border-radius: 0;
  min-height: 12px;
}

body.lab .panel-inner::-webkit-scrollbar-button,
body.lab .division-track::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

body.lab .panel-inner::-webkit-scrollbar-corner,
body.lab .division-track::-webkit-scrollbar-corner {
  background: transparent;
}

/* Firefox: 1px yok; en ince thin + kırmızı */
@supports (-moz-appearance: none) {
  body.lab .panel-inner,
  body.lab .division-track {
    scrollbar-width: thin;
    scrollbar-color: #cc3300 transparent;
  }
}

.panel-inner.wide { max-width: 68rem; }

.lab-panel.is-active .panel-inner,
.lab-panel.is-hero .panel-inner {
  opacity: 1;
  transform: none;
  filter: none;
}

.hint {
  position: absolute;
  top: 1.5rem;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand-line {
  margin: 0 0 1rem;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 0.95;
  color: var(--navy);
}

.lab-panel h1 {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 600;
  line-height: 1.25;
}

.lab-panel h2 {
  margin: 0.5rem 0 0;
  max-width: 22ch;
  font-size: clamp(1.55rem, 3.4vw, 2.7rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.index {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--navy);
}

.eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
}

.support,
.tagline {
  margin: 1.1rem 0 0;
  max-width: 42ch;
  color: var(--muted);
  line-height: 1.65;
}

.rich-body p { margin: 0 0 0.7rem; }
.rich-body p:last-child { margin-bottom: 0; }
.rich-body ul,
.rich-body ol { margin: 0.4rem 0 0.7rem; padding-left: 1.15rem; }
.rich-body a { color: var(--navy); }
.rich-body h2,
.rich-body h3 { margin: 0.9rem 0 0.45rem; line-height: 1.25; }

.tagline {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
}

/* Horizontal division scrub */
.division-track {
  display: flex;
  gap: 1.25rem;
  margin-top: 2.5rem;
  width: max-content;
  padding-right: 20vw;
}

.division-slide {
  width: min(78vw, 28rem);
  padding: 1.5rem 1.4rem;
  border-left: 3px solid var(--accent, var(--navy));
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  border-radius: 0 14px 14px 0;
  box-shadow: 0 18px 50px rgba(30, 70, 100, 0.08);
}

.division-slide .num {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent, var(--navy));
  margin-bottom: 0.75rem;
}

.division-slide h3 {
  margin: 0;
  font-size: 1.45rem;
}

.slide-tag {
  margin: 0.45rem 0 0.85rem;
  color: var(--navy);
  font-weight: 600;
}

.division-slide p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.lab-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.5rem clamp(1.25rem, 4vw, 3rem) 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  background: rgba(244, 246, 248, 0.9);
}

@media (max-width: 899px) {
  .lab-chapters { display: none !important; }
  .lab-badge { display: none; }
  body.lab { cursor: auto; }
  .lab-cursor { display: none; }
  .lab-chapter { cursor: pointer; }

  .lab-panel {
    min-height: 100svh;
    min-height: 100dvh;
    padding-top: clamp(1.25rem, 5vh, 2.5rem);
    padding-right: clamp(1rem, 4vw, 1.5rem);
    padding-bottom: clamp(4.5rem, 12vh, 6rem);
    padding-left: clamp(1rem, 4vw, 1.5rem);
  }

  .panel-inner {
    max-width: 100%;
    padding: 1rem 1.05rem;
  }

  .panel-inner h1 {
    font-size: clamp(1.85rem, 8.5vw, 2.6rem);
  }

  .panel-inner h2 {
    font-size: clamp(1.35rem, 6vw, 1.85rem);
  }

  .division-track {
    margin-top: 1.5rem;
    gap: 0.9rem;
    padding-right: 1.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: auto;
    max-width: 100%;
    scroll-snap-type: x mandatory;
  }

  .division-slide {
    width: min(82vw, 22rem);
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .hint {
    position: static;
    margin: 0 0 0.75rem;
    font-size: 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .panel-inner {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
