/* ============================================================
   layout.css — Asymmetric sticky rail + bento canvas system
   ============================================================ */

/* ── Outer Shell ── */
.app-shell {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: var(--space-6);
  min-height: 100vh;
  display: flex;
  justify-content: space-between;
  gap: var(--space-8);
  position: relative;
}

/* ── Fixed Left Rail (38% on desktop) ── */
.sticky-rail {
  width: 38%;
  max-width: 440px;
  position: sticky;
  top: 0;
  height: 100vh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: var(--space-12);
  padding-bottom: var(--space-10);
  z-index: 10;
  overflow-y: auto;
  scrollbar-width: none;
}
.sticky-rail::-webkit-scrollbar {
  display: none;
}

.rail-top {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* ── Scrollable Right Canvas (62% on desktop) ── */
.scroll-canvas {
  width: 62%;
  max-width: 680px;
  padding-top: var(--space-12);
  padding-bottom: var(--space-16);
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  position: relative;
  z-index: 5;
}

/* ── Section Markers ── */
.canvas-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  scroll-margin-top: var(--space-12);
}

.section-label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-hairline), transparent);
}

/* ── Bento Grid System ── */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.bento-col-full {
  grid-column: 1 / -1;
}

/* ── Mobile Layout (< 900px) ── */
@media (max-width: 900px) {
  .app-shell {
    flex-direction: column;
    padding-inline: var(--space-4);
    gap: var(--space-8);
  }

  .sticky-rail {
    width: 100%;
    max-width: 100%;
    position: relative;
    top: auto;
    height: auto;
    max-height: none;
    padding-top: var(--space-8);
    padding-bottom: var(--space-4);
    gap: var(--space-6);
  }

  .scroll-canvas {
    width: 100%;
    max-width: 100%;
    padding-top: var(--space-2);
    padding-bottom: var(--space-12);
    gap: var(--space-12);
  }

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