/* Learn: /learn, article footers and the homepage "Learn and explore" section. Built by scripts/learn.mjs. */
:root {
  --lx-olive: #868e4f;
  --lx-olive-dark: #5f6537;
  --lx-fill: #646b3c;
  --lx-ink: #24262b;
  --lx-muted: #676770;
  --lx-line: #e3e5dc;
  --lx-paper: #f6f6f1;
  --lx-bg: #fff;
  --lx-surface: #fff;
  --lx-bar: rgba(255, 255, 255, 0.96);
  --lx-gap: clamp(16px, 2.4vw, 28px);
  --lx-pad: clamp(16px, 4vw, 40px);
}

[data-theme="dark"] {
  --lx-olive-dark: #b9c17e;
  --lx-ink: #ecece5;
  --lx-muted: #a7aa9c;
  --lx-line: #2f3329;
  --lx-paper: #1a1c17;
  --lx-bg: #141612;
  --lx-surface: #1c1f19;
  --lx-bar: rgba(20, 22, 18, 0.94);
}

.lx-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--lx-pad);
  box-sizing: border-box;
}

.lx-page,
.lx-more,
.lx-home,
.lx-meta {
  font-family: "Open Sans", sans-serif;
  color: var(--lx-ink);
}

.lx-page *,
.lx-more *,
.lx-home * {
  box-sizing: border-box;
}

/* ---------- intro + sticky explore bar ---------- */

.lx-lead {
  max-width: 720px;
  margin: clamp(24px, 4vw, 40px) auto 0;
  text-align: center;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.55;
  color: var(--lx-muted);
}

.lx-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  margin-top: clamp(16px, 3vw, 28px);
  padding: 10px 0;
  background: var(--lx-bar);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--lx-line);
}

.lx-jump {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 22px;
  margin-bottom: 8px;
}

.lx-jump a {
  color: var(--lx-ink);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.lx-jump a:hover,
.lx-jump a:focus-visible {
  border-bottom-color: var(--lx-olive);
}


.lx-topics {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.lx-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 14px;
  border: 1px solid var(--lx-line);
  border-radius: 999px;
  background: var(--lx-surface);
  color: var(--lx-ink);
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.lx-chip:hover,
.lx-chip:focus-visible {
  border-color: var(--lx-olive);
  color: var(--lx-olive-dark);
}

.lx-chip.is-on {
  background: var(--lx-fill);
  border-color: var(--lx-fill);
  color: #fff;
}

.lx-status {
  margin: 8px 0 0;
  min-height: 0;
  text-align: center;
  font-size: 14px;
  color: var(--lx-muted);
}

.lx-status:empty {
  display: none;
}

/* Phones: topic chips scroll sideways in one row instead of stacking. */
@media (max-width: 767px) {
  .lx-bar .lx-topics,
  .lx-home .lx-topics {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 calc(-1 * var(--lx-pad));
    padding: 2px var(--lx-pad);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 24px), transparent);
    mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 24px), transparent);
  }
  .lx-bar .lx-topics::-webkit-scrollbar,
  .lx-home .lx-topics::-webkit-scrollbar {
    display: none;
  }
  .lx-jump {
    gap: 2px 16px;
  }
  .lx-jump a {
    font-size: 14px;
  }
}

/* ---------- tiles ---------- */

.lx-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--lx-gap);
}

@media (min-width: 640px) {
  .lx-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .lx-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.lx-tile {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  border-radius: 6px;
  outline-offset: 4px;
}

.lx-tile[hidden],
[data-filter-block][hidden] {
  display: none !important;
}

.lx-art {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
  background: var(--lx-paper);
}

.lx-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.lx-tile:hover .lx-art img,
.lx-tile:focus-visible .lx-art img {
  transform: scale(1.04);
}

@media (prefers-reduced-motion: reduce) {
  .lx-art img {
    transition: none;
  }
  .lx-tile:hover .lx-art img,
  .lx-tile:focus-visible .lx-art img {
    transform: none;
  }
}

.lx-body {
  display: block;
  padding: 12px 2px 0;
}

.lx-kicker {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lx-olive-dark);
}

.lx-title {
  margin: 4px 0 6px;
  font-family: "Open Sans", sans-serif;
  font-size: clamp(17px, 1.5vw, 19px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  color: var(--lx-ink);
}

.lx-tile:hover .lx-title {
  color: var(--lx-olive-dark);
}

.lx-sum {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.5;
  color: var(--lx-muted);
}

/* ---------- featured ---------- */

.lx-featured {
  margin: clamp(24px, 4vw, 48px) 0 clamp(8px, 2vw, 16px);
}

.lx-tile--feature .lx-title {
  font-size: clamp(24px, 3.2vw, 38px);
  margin: 6px 0 10px;
}

.lx-tile--feature .lx-sum {
  -webkit-line-clamp: 4;
  font-size: clamp(15px, 1.4vw, 18px);
}

.lx-tile--feature .lx-body::after {
  content: "Read the essay →";
  display: inline-block;
  margin-top: 16px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--lx-fill);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

@media (min-width: 900px) {
  .lx-tile--feature {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: clamp(24px, 3vw, 48px);
    align-items: center;
  }
  .lx-tile--feature .lx-body {
    padding: 0;
  }
}

/* ---------- series sections ---------- */

.lx-series {
  padding-top: clamp(32px, 5vw, 64px);
  scroll-margin-top: 120px;
}

.lx-series:last-child {
  padding-bottom: clamp(40px, 6vw, 80px);
}

.lx-series-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 4px 16px;
  margin-bottom: clamp(16px, 2.4vw, 28px);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--lx-line);
}

.lx-series-head h2 {
  grid-column: 1;
  margin: 0;
  font-size: clamp(24px, 2.8vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  color: var(--lx-ink);
}

.lx-series-head p {
  grid-column: 1;
  margin: 0;
  max-width: 640px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--lx-muted);
}

.lx-count {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: 13px;
  white-space: nowrap;
  color: var(--lx-muted);
}

/* ---------- article: series + topics line ---------- */

.lx-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 12px;
  max-width: 900px;
  margin: 0 auto 24px;
  padding: 0 var(--lx-pad);
  font-size: 14px;
  color: var(--lx-muted);
}

.lx-meta > a {
  font-weight: 600;
  color: var(--lx-olive-dark);
  text-decoration: none;
}

.lx-meta-topics {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.lx-meta .lx-chip {
  min-height: 28px;
  padding: 3px 10px;
  font-size: 13px;
}

/* In-text links to other articles. */
.w-richtext a.xlink {
  color: var(--lx-olive-dark);
  text-decoration: underline;
  text-decoration-color: rgba(134, 142, 79, 0.45);
  text-underline-offset: 3px;
}

.w-richtext a.xlink:hover {
  text-decoration-color: currentColor;
}

/* ---------- article end + homepage section ---------- */

.lx-more,
.lx-home {
  padding: clamp(32px, 5vw, 64px) 0;
  background: var(--lx-paper);
}

.lx-more {
  margin-top: clamp(32px, 5vw, 64px);
}

.lx-more-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 16px;
  margin-bottom: clamp(16px, 2.4vw, 24px);
}

.lx-more-head h2 {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  color: var(--lx-ink);
}

.lx-more-head a {
  font-weight: 600;
  color: var(--lx-olive-dark);
  text-decoration: none;
}

.lx-home .lx-topics {
  justify-content: flex-start;
  margin-bottom: clamp(16px, 2.4vw, 24px);
}

/* Series prev / next */
.lx-pn {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.lx-pn a {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--lx-line);
  border-radius: 6px;
  background: var(--lx-surface);
  color: var(--lx-ink);
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

.lx-pn a:hover,
.lx-pn a:focus-visible {
  border-color: var(--lx-olive);
}

.lx-pn a span {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lx-muted);
}

.lx-pn .lx-pn-series {
  order: -1;
  border: 0;
  background: none;
  padding: 0;
  text-align: center;
  color: var(--lx-olive-dark);
}

@media (min-width: 768px) {
  .lx-pn {
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
  }
  .lx-pn .lx-pn-series {
    order: 0;
    align-self: center;
    padding: 0 8px;
  }
  .lx-pn .lx-next {
    text-align: right;
  }
}

/* ---------- page background + phone carousels ---------- */

.lx-page {
  background: var(--lx-bg);
}

/* Phones: each series is a swipeable row of art instead of one long column. */
@media (max-width: 639px) {
  .lx-series .lx-grid,
  .lx-home .lx-grid,
  .lx-more .lx-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    gap: 14px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin: 0 calc(-1 * var(--lx-pad));
    padding: 0 var(--lx-pad) 4px;
    scroll-padding: 0 var(--lx-pad);
  }
  .lx-series .lx-grid::-webkit-scrollbar,
  .lx-home .lx-grid::-webkit-scrollbar,
  .lx-more .lx-grid::-webkit-scrollbar {
    display: none;
  }
  .lx-series .lx-tile,
  .lx-home .lx-tile,
  .lx-more .lx-tile {
    scroll-snap-align: start;
  }
  .lx-series-head {
    grid-template-columns: 1fr;
  }
  .lx-count {
    grid-column: 1;
    grid-row: auto;
  }
  .lx-count::after {
    content: " · swipe →";
  }
}

/* Webflow centers headings globally; Learn headings align with their text. */
.lx-title,
.lx-series-head h2,
.lx-more-head h2,
.lx-series-head p {
  text-align: left;
  padding: 0;
}

.lx-series {
  scroll-margin-top: 140px;
}

@media (max-width: 479px) {
  .lx-jump {
    flex-wrap: nowrap;
    gap: 16px;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 calc(-1 * var(--lx-pad)) 6px;
    padding: 0 var(--lx-pad);
  }
  .lx-jump::-webkit-scrollbar {
    display: none;
  }
  .lx-jump a {
    font-size: 13px;
    white-space: nowrap;
  }
}
