/* ========================================================================
   v5 patch — overrides for styles-v4-chapters.css + new own-byw styles.
   Load AFTER styles-v4-chapters.css.
   ======================================================================== */

/* ── Fix: chapter-bigindex no longer clips at the top of the viewport ─── */
/* Was top: -0.34em which extended above the overflow:hidden boundary.     */
.chapter-bigindex {
  top: 0;
}

/* ── Fix: active dot pill width −7.4% (22px → 20px) ─────────────────── */
.highlights-dot.is-active {
  width: 20px;
}

/* ========================================================================
   "Also" — small addendum block at the bottom of the Ownership section.
   Three items side by side; subordinate to the main list but clearly present.
   ======================================================================== */

.own-byw {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(28px, 3.5vw, 40px) var(--gutter) 0;
}

.own-byw-inner {
  border-top: 1px solid var(--ink-200);
  padding-top: clamp(20px, 2.5vw, 28px);
}

.own-byw-label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-400);
  display: block;
  margin-bottom: 16px;
}

.own-byw-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 1.6vw, 22px);
}

.own-byw-item {
  padding: 20px 22px 22px;
  background: var(--bg);
  border: 1px solid var(--ink-200);
  border-radius: 12px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.own-byw-item:hover {
  border-color: var(--baby);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.own-byw-item.has-img {
  cursor: pointer;
}

.own-byw-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.own-byw-imgbtn {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--azure);
}
.own-byw-imgbtn svg {
  width: 14px;
  height: 14px;
}

.own-byw-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.own-byw-body {
  display: block;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-500);
  text-wrap: pretty;
}

@media (max-width: 700px) {
  .own-byw-items {
    grid-template-columns: 1fr;
  }
}

/* ── What I learned / retrospective (dark) ───────────────────────────── */
.retro-list {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.retro-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(24px, 4vw, 64px);
  padding: 36px 0;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.retro-item:last-child {
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.retro-aside {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.retro-idx {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--azure);
  letter-spacing: 0.04em;
}
.retro-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
}

.retro-main h3 {
  margin: 0 0 12px;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.18;
  color: #fff;
  text-wrap: balance;
}
.retro-main p {
  margin: 0;
  font-size: 16px;
  line-height: 1.62;
  color: rgba(255,255,255,0.74);
  max-width: 64ch;
  text-wrap: pretty;
}
.retro-main code {
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--baby);
  background: rgba(255,255,255,0.08);
  padding: 1px 6px;
  border-radius: 5px;
}

@media (max-width: 760px) {
  .retro-item {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 28px 0;
  }
  .retro-aside {
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
  }
}
