/* ═══════════════════════════════════════════
   WRITING (list page + articles)
   Dark gradient text hero, then How I Lead style sections:
   numbered index, kicker, two-tone headline, readable prose.
═══════════════════════════════════════════ */
html, body { overflow-x: clip; }
body.wr { background: #fff; }

/* Section themes (same tokens as How I Lead) */
.tA  { --lp-bg:#FFFFFF; --lp-ink:#111111; --lp-body:#3A3A3C; --lp-muted:#6E6E73; --lp-muted-strong:#86868B; --lp-line:#E5E5EA; --lp-accent-solid:#E84B2A; }
.tA2 { --lp-bg:#F5F5F7; --lp-ink:#111111; --lp-body:#3A3A3C; --lp-muted:#6E6E73; --lp-muted-strong:#86868B; --lp-line:#DCDCE0; --lp-accent-solid:#E84B2A; }
.tAd { --lp-bg:#0A0A0A; --lp-ink:#F5F5F7; --lp-body:#C7C7CC; --lp-muted:#A1A1A6; --lp-muted-strong:#8E8E93; --lp-line:#2C2C2E; --lp-accent-solid:#FF6B4A; }

.wr { --lp-max: 1280px; --lp-ind: 6rem; }
.lp-wrap { max-width: var(--lp-max); margin: 0 auto; padding: 0 2.5rem; }
.lp-sec { padding: clamp(4.5rem, 8vw, 7rem) 0; background: var(--lp-bg); color: var(--lp-ink); }

/* Hero: text only, dark gradient. Each article sets its own --wr-glow. */
.wr-hero {
  --wr-glow: #12305A;
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(60% 85% at 88% 0%, var(--wr-glow) 0%, rgba(0,0,0,0) 70%),
    radial-gradient(40% 60% at 0% 100%, rgba(232,75,42,0.16) 0%, rgba(0,0,0,0) 70%),
    #0A0A0A;
  padding: clamp(9rem, 15vw, 12rem) 0 clamp(4.5rem, 8vw, 6.5rem);
}
.wr-kicker { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: #FF6B4A; margin-bottom: 1.5rem; }
.wr-h1 { font-size: clamp(2.8rem, 6.6vw, 6.25rem); font-weight: 600; letter-spacing: -0.05em; line-height: 0.98; color: #fff; max-width: 15ch; margin: 0; }
.wr-h1 .lp-dot { color: #FF6B4A; }
.wr-dek { margin-top: 2rem; font-size: clamp(1.15rem, 1.9vw, 1.6rem); font-weight: 400; letter-spacing: -0.015em; line-height: 1.4; color: rgba(255,255,255,0.78); max-width: 36ch; }
.wr-meta { margin-top: 2.75rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-size: 0.82rem; color: rgba(255,255,255,0.6); }
.wr-meta strong { color: #fff; font-weight: 600; }
.wr-meta span + span::before { content: "·"; margin-right: 1.5rem; color: rgba(255,255,255,0.35); }

/* Section head: number, kicker, two-tone headline */
.wr-head { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.lp-idx { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; color: var(--lp-muted); padding-top: 0.35rem; }
.lp-kicker { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--lp-accent-solid); margin-bottom: 1.1rem; }
.lp-h2 { font-size: clamp(2rem, 3.3vw, 3rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.06; color: var(--lp-ink); margin: 0; max-width: 22ch; }
.lp-h2 span { display: block; color: var(--lp-muted-strong); }
.lp-eyebrow { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--lp-muted); margin-bottom: 1.5rem; }

/* Article prose: one readable column, indented under the headline */
.wr-prose { margin: clamp(2rem, 4vw, 3rem) 0 0 calc(var(--lp-ind)); max-width: 66ch; }
.wr-prose p { font-size: clamp(1.05rem, 1.2vw, 1.15rem); line-height: 1.8; color: var(--lp-body); margin: 0 0 1.4rem; }
.wr-prose p:last-child { margin-bottom: 0; }
.wr-prose a { color: var(--lp-ink); text-decoration: underline; text-decoration-color: var(--lp-accent-solid); text-underline-offset: 3px; }
.wr-prose a:hover { color: var(--lp-accent-solid); }
.wr-list { list-style: none; margin: 0.5rem 0 1.6rem; padding: 0; border-top: 1px solid var(--lp-line); }
.wr-list li { display: grid; grid-template-columns: 2rem 1fr; padding: 0.95rem 0; border-bottom: 1px solid var(--lp-line); font-size: 1.02rem; line-height: 1.55; color: var(--lp-ink); }
.wr-list li::before { content: "\2192"; color: var(--lp-accent-solid); font-weight: 700; }

/* Placeholder text to fill in before publishing */
.wr-todo { background: #FFF2B8; color: #5A4A00; padding: 0.05em 0.35em; border-radius: 4px; font-size: 0.95em; }
.tAd .wr-todo { background: #4A3F10; color: #FFE58A; }

/* Pull quote band */
.wr-quote { margin: 0; text-align: center; }
.wr-quote p { font-size: clamp(1.6rem, 3.2vw, 2.6rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; color: var(--lp-ink); max-width: 24ch; margin: 0 auto; }
.wr-quote p .lp-dot { color: var(--lp-accent-solid); }

/* Next article */
.wr-next { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: end; }
.wr-next-link { display: block; color: var(--lp-ink); text-decoration: none; }
.wr-next-title { display: block; font-size: clamp(1.8rem, 3.6vw, 3.1rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1.04; max-width: 20ch; transition: color 0.2s; }
.wr-next-dek { display: block; margin-top: 1rem; font-size: 1rem; line-height: 1.6; color: var(--lp-body); max-width: 50ch; }
.wr-next-link:hover .wr-next-title { color: var(--lp-accent-solid); }
.wr-all { font-weight: 600; font-size: 0.85rem; letter-spacing: 0.04em; color: var(--lp-ink); white-space: nowrap; padding-bottom: 0.3rem; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; }
.wr-all:hover { color: var(--lp-accent-solid); }

/* List page */
.wr-index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--lp-line); }
.wr-row a { display: grid; grid-template-columns: 9.5rem minmax(0, 1.4fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; padding: clamp(1.75rem, 3vw, 2.5rem) 0; border-bottom: 1px solid var(--lp-line); color: inherit; text-decoration: none; }
.wr-row-img img { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 14px; transition: transform 0.35s var(--ease-out, ease); }
.wr-row a:hover .wr-row-img img { transform: scale(1.03); }
.wr-row-n { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; color: var(--lp-muted); }
.wr-row-t { display: block; font-size: clamp(1.4rem, 2.4vw, 2.1rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.1; color: var(--lp-ink); transition: color 0.2s; }
.wr-row-k { display: block; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--lp-accent-solid); margin-bottom: 0.7rem; }
.wr-row-d { font-size: 0.98rem; line-height: 1.6; color: var(--lp-body); }
.wr-row-d { display: block; }
.wr-row-m { display: block; margin-top: 0.85rem; font-size: 0.8rem; color: var(--lp-muted); white-space: nowrap; }
.wr-row a:hover .wr-row-t, .wr-row a:focus-visible .wr-row-t { color: var(--lp-accent-solid); }
.wr-row a:hover .wr-row-arrow { transform: translateX(4px); }
.wr-row-arrow { display: inline-block; transition: transform 0.25s var(--ease-out, ease); }

/* Nav: current article */
.wr .cs-jump a.is-current { color: #fff; }

/* Reveal */
.lp-in { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease-out, ease), transform 0.9s var(--ease-out, ease); }
.lp-in.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .lp-in { opacity: 1; transform: none; transition: none; } }

@media (max-width: 900px) {
  .wr { --lp-ind: 0; }
  .wr-head { grid-template-columns: 1fr; gap: 0.75rem; }
  .wr-row a { grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0.75rem 1.1rem; }
  .wr-row-img img { border-radius: 10px; }
  .wr-row-dm { grid-column: 2; }
  .wr-next { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .lp-wrap { padding: 0 1.25rem; }
  .wr-meta span + span::before { display: none; }
  .wr-meta { gap: 0.3rem 1.25rem; }
}

/* ── Flowing article: one reading column, plain subheads, inline pull quote ── */
.wr-flow { background: #fff; padding: clamp(3.5rem, 7vw, 6rem) 2.5rem clamp(4.5rem, 8vw, 7rem); }
.wr-body { max-width: 700px; margin: 0 auto; }
.wr-body p { font-size: clamp(1.06rem, 1.2vw, 1.16rem); line-height: 1.8; color: #3A3A3C; margin: 0 0 1.5rem; }
.wr-body p.wr-lede { font-size: clamp(1.25rem, 1.8vw, 1.45rem); line-height: 1.6; color: #111; letter-spacing: -0.01em; }
.wr-body h2 { font-size: clamp(1.35rem, 1.9vw, 1.65rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; color: #111; margin: 3.25rem 0 1rem; }
.wr-body a { color: #111; text-decoration: underline; text-decoration-color: #E84B2A; text-underline-offset: 3px; }
.wr-body a:hover { color: #E84B2A; }
.wr-pull { margin: 3rem 0; padding: 0.25rem 0 0.25rem 1.6rem; border-left: 3px solid #E84B2A; }
.wr-pull p { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 600; letter-spacing: -0.025em; line-height: 1.3; color: #111; margin: 0; }
.wr-pull .lp-dot { color: #E84B2A; }
.wr-body .wr-list { --lp-line: #E5E5EA; --lp-ink: #111; --lp-accent-solid: #E84B2A; }
@media (max-width: 600px) { .wr-flow { padding-left: 1.25rem; padding-right: 1.25rem; } }
/* Flowing article: hero lines up with the reading column */
.wr-hero.is-flow .lp-wrap { max-width: calc(700px + 5rem); }
.wr-hero.is-flow .wr-h1 { font-size: clamp(2.6rem, 5.2vw, 4.6rem); max-width: none; }
@media (max-width: 600px) { .wr-hero.is-flow .lp-wrap { padding: 0 1.25rem; } }
/* Data table inside an article */
.wr-table-wrap { margin: 0.5rem 0 0.9rem; overflow-x: auto; }
.wr-table { width: 100%; border-collapse: collapse; font-size: 1rem; font-variant-numeric: tabular-nums; }
.wr-table th, .wr-table td { padding: 0.85rem 0.75rem; text-align: right; border-bottom: 1px solid #E5E5EA; white-space: nowrap; }
.wr-table th:first-child { text-align: left; padding-left: 0; }
.wr-table td:last-child { padding-right: 0; }
.wr-table thead th { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #6E6E73; border-bottom: 2px solid #111; }
.wr-table tbody th { font-weight: 600; color: #111; }
.wr-table td { color: #3A3A3C; }
.wr-table td.down { color: #C73A1E; font-weight: 700; }
.wr-table td.up { color: #1E7A4C; font-weight: 700; }
.wr-body p.wr-note { font-size: 0.8rem; line-height: 1.55; color: #6E6E73; margin-bottom: 1.75rem; }
.wr-body p.wr-note a { color: #6E6E73; }
@media (max-width: 600px) { .wr-table { font-size: 0.85rem; } .wr-table th, .wr-table td { padding: 0.7rem 0.35rem; } .wr-table thead th { white-space: normal; font-size: 0.62rem; letter-spacing: 0.08em; vertical-align: bottom; } }

/* Article nav: show about five sections, scroll sideways for the rest */
@media (min-width: 861px) {
  .wr .nav .cs-jump { position: relative; max-width: min(38rem, 50vw); overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .wr .nav .cs-jump::-webkit-scrollbar { display: none; }
  .wr .nav .cs-jump a { flex: 0 0 auto; white-space: nowrap; }
  .wr .nav .cs-jump.fade-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 3rem), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 3rem), transparent); }
  .wr .nav .cs-jump.fade-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 3rem); mask-image: linear-gradient(90deg, transparent, #000 3rem); }
  .wr .nav .cs-jump.fade-l.fade-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 3rem, #000 calc(100% - 3rem), transparent); mask-image: linear-gradient(90deg, transparent, #000 3rem, #000 calc(100% - 3rem), transparent); }
}
