/* Article-reading + Red Lines annotation. Chrome/tokens come from /shared/site.css */

:root {
  --redline: #e8483a;
  --redline-rgb: 232, 72, 58;
  /* Electric indigo-blue for In the Room */
  --in-the-room: #3d7bff;
  --in-the-room-rgb: 61, 123, 255;
  /* Purply indigo for In Conversation */
  --in-conversation: #6e66ff;
  --in-conversation-rgb: 110, 102, 255;
  --rail-width: 400px;
}

@media (prefers-color-scheme: light) {
  :root {
    /* Stronger on white — closer to news-site accent weight */
    --redline: #c8102e;
    --redline-rgb: 200, 16, 46;
    --in-the-room: #0052cc;
    --in-the-room-rgb: 0, 82, 204;
    --in-conversation: #5246c7;
    --in-conversation-rgb: 82, 70, 199;
    /* Deeper fades for tiles / series display type */
    --redline-deep: #24090e;
    --in-the-room-deep: #061830;
    --in-conversation-deep: #161030;
  }
}

main.article-main {
  /* Match the reading column width so the visual stack centers under the wordmark */
  width: min(100% - 40px, 640px);
  margin-left: auto;
  margin-right: auto;
  padding-top: clamp(44px, 7vw, 80px);
  padding-bottom: 64px;
}

/* Masthead rule stays full chrome width (same as homepage). Compact wordmark is wordmark-fit.js. */

.article-column {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 900px) {
  /* Narrow the reading column only when needed to clear the open note rail */
  body.is-note-open main.article-main {
    width: min(100% - var(--rail-width) - 60px, 640px);
  }
}

/*
  Shift LEFT only when a centered 640px column would collide with the rail:
  (100vw - 640) / 2 < rail + 20  →  viewport < 1480px.
  On wide monitors, keep the column centered — never push it right into the rail gap.
*/
@media (min-width: 900px) and (max-width: 1479px) {
  body.is-note-open main.article-main {
    margin-left: auto;
    margin-right: calc(var(--rail-width) + 20px);
  }
}

.article-header {
  margin-bottom: 48px;
}

.article-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35em 1.15em;
  margin: 0;
}

.article-header .eyebrow {
  color: var(--redline);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 1.4px;
  line-height: 1.3;
}

.article-topic {
  color: var(--read-muted);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.3;
  text-transform: none;
}

.article-header a.eyebrow:hover {
  filter: brightness(1.22);
}

.article-header h1 {
  margin: 14px 0 16px;
  color: var(--read);
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.18;
}

/* Illustrated tile above a text H1 (all editions) */
.article-title-art,
.article-mark-art {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rim);
  border-radius: 12px;
  background: var(--tile-bg);
}

.article-mark-art {
  margin: 28px 0 0;
}

.article-header--mark h1 {
  margin-top: 32px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35em 1.35em;
  margin: 0 0 8px;
  color: var(--read-secondary);
  font-size: 16px;
  line-height: 1.6;
}

.article-lede {
  margin: 28px 0 0;
  padding: 2px 0 2px 18px;
  border-left: 2px solid rgba(var(--redline-rgb), 0.72);
  display: grid;
  gap: 20px;
  max-width: 38rem;
}

.article-note {
  margin: 0;
  color: var(--read-secondary);
  font-size: 16px;
  line-height: 1.75;
}

.article-note strong {
  color: var(--redline);
  font-weight: 600;
}

.article-note a.article-series-link {
  color: inherit;
  text-decoration: none;
}

.article-note a.article-series-link:hover,
.article-note a.article-series-link:focus-visible {
  filter: brightness(1.22);
  text-decoration: none;
}

.article-note a,
.room-plate a,
.abridgment a {
  color: var(--read);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(var(--redline-rgb), 0.72);
}

.article-note a:hover,
.article-note a:focus-visible,
.room-plate a:hover,
.room-plate a:focus-visible,
.abridgment a:hover,
.abridgment a:focus-visible {
  text-decoration-color: var(--redline);
  outline: none;
}

body.essay-in-the-room .room-plate a {
  text-decoration-color: rgba(var(--in-the-room-rgb), 0.72);
}

body.essay-in-the-room .room-plate a:hover,
body.essay-in-the-room .room-plate a:focus-visible {
  text-decoration-color: var(--in-the-room);
}

.events-index-lede {
  margin: 0;
  max-width: 38rem;
  color: var(--read-secondary);
  font-size: 17px;
  line-height: 1.65;
}

.theme-map {
  margin: 8px 0 56px;
  padding: 28px 24px 26px;
  max-width: 40rem;
  border: 1px solid var(--rim);
  border-radius: 4px;
  background: var(--plate);
}

.theme-map-head {
  display: none;
}

.theme-map-rows {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 32px;
}

.theme-map-row {
  display: grid;
  gap: 14px;
  align-items: start;
}

.theme-map-label {
  margin: 0;
  color: var(--redline);
  font-family: var(--label);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.4px;
  line-height: 1.3;
  text-transform: uppercase;
}

.theme-map-from,
.theme-map-to {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  text-wrap: pretty;
}

.theme-map-from {
  color: var(--redline);
  text-decoration: line-through;
  /* Opaque series text; semi-transparent strike so glyphs stay readable under the line */
  text-decoration-color: rgba(var(--redline-rgb), 0.6);
  text-decoration-thickness: 1.5px;
  text-decoration-skip-ink: none;
}

.theme-map-to {
  color: var(--read);
}

.theme-map-rule {
  display: block;
  width: 28px;
  height: 2px;
  margin: 2px 0;
  background: var(--redline);
}

@media (min-width: 720px) {
  .theme-map {
    padding: 32px 30px 30px;
  }

  .theme-map-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1.15fr);
    gap: 0 18px;
    margin-bottom: 22px;
  }

  .theme-map-label-to {
    grid-column: 3;
  }

  .theme-map-rows {
    gap: 36px;
  }

  .theme-map-row {
    grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1.15fr);
    gap: 0 18px;
    align-items: center;
  }

  .theme-map-rule {
    width: 100%;
    height: 2px;
    margin: 0;
  }

  .theme-map-from,
  .theme-map-to {
    font-size: 17px;
    line-height: 1.5;
  }
}

.redline-plate,
.room-plate {
  margin: 0 0 40px;
  padding: 22px 22px 20px;
  border: 1px solid var(--rim);
  border-radius: 4px;
  background: var(--plate);
}

.room-plate {
  margin-top: 64px;
  margin-bottom: 56px;
}

.redline-plate p,
.room-plate p {
  max-width: 38rem;
  margin: 0 0 18px;
  color: var(--read);
  font-size: 17px;
  line-height: 1.75;
}

.redline-plate p:last-child,
.room-plate p:last-child {
  margin-bottom: 0;
}

/* Always its own line — never trailing the chorus paragraph (widows). */
.room-plate-cta {
  margin-top: 18px;
}

.abridgment {
  color: var(--read);
  font-size: 18px;
  line-height: 1.85;
  letter-spacing: 0.005em;
}

.abridgment-note {
  margin: 0 0 36px;
  color: var(--read-secondary);
  font-size: 15px;
  line-height: 1.65;
}

.abridgment p,
.redline-plate p,
.room-plate p,
.article-note,
.theme-map-from,
.theme-map-to,
.note-blip-text {
  text-wrap: pretty;
  widows: 2;
  orphans: 2;
}

.abridgment h2,
.article-header h1 {
  text-wrap: balance;
}

.abridgment h2 {
  margin: 56px 0 22px;
  color: var(--read);
  font-size: clamp(1.45rem, 2.6vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.abridgment h2:first-child {
  margin-top: 0;
}

.abridgment p {
  margin: 0 0 28px;
}

/* Ember marker — vivid bottom-weighted ink stroke */
.referent {
  --mark: var(--redline-rgb);
  display: inline;
  margin: 0;
  padding: 0 0.03em 0.02em;
  border-radius: 0.1em;
  background-image:
    linear-gradient(
      to bottom,
      rgba(var(--mark), 0.08) 0%,
      rgba(var(--mark), 0.28) 42%,
      rgba(var(--mark), 0.55) 78%,
      rgba(var(--mark), 0.82) 100%
    );
  background-repeat: no-repeat;
  background-size: 100% 0.72em;
  background-position: 0 90%;
  box-shadow: none;
  color: inherit;
  font: inherit;
  font-style: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  cursor: pointer;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition: background-size 160ms ease, background-image 160ms ease;
}

.referent:hover,
.referent:focus-visible {
  background-image:
    linear-gradient(
      to bottom,
      rgba(var(--mark), 0.14) 0%,
      rgba(var(--mark), 0.38) 42%,
      rgba(var(--mark), 0.68) 78%,
      rgba(var(--mark), 0.92) 100%
    );
  background-size: 100% 0.82em;
  outline: none;
}

.referent.is-active {
  background-image:
    linear-gradient(
      to bottom,
      rgba(var(--mark), 0.22) 0%,
      rgba(var(--mark), 0.48) 38%,
      rgba(var(--mark), 0.78) 72%,
      rgba(var(--mark), 1) 100%
    );
  background-size: 100% 0.95em;
  background-position: 0 88%;
}

/* Same ink as the page — separate with rim/shadow, not a grey fill */
.note-panel {
  --redline: #e8483a;
  --rail-fill: var(--bg);
  --rail-rim: var(--paper-10);
  --pager-clearance: 88px;
  --pager-fade: 140px;
  position: fixed;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--rail-fill);
  color: var(--paper);
  border: 1px solid var(--rail-rim);
}

/* Soft panel-ink drop at the bottom — text rolls under it; no solid footer bar */
.note-panel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--pager-fade);
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    color-mix(in srgb, var(--rail-fill) 22%, transparent) 28%,
    color-mix(in srgb, var(--rail-fill) 55%, transparent) 55%,
    color-mix(in srgb, var(--rail-fill) 88%, transparent) 82%,
    var(--rail-fill) 100%
  );
}

.note-panel[hidden] {
  display: none !important;
}

.note-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 4px;
  padding-right: 40px; /* room for absolute close */
}

.note-panel-heading {
  min-width: 0;
}

.note-panel-title {
  margin: 0;
  color: var(--redline);
  font-family: var(--label);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 1.4px;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.note-panel-count {
  margin-left: 0.55em;
  color: var(--read-muted);
  font: inherit;
  font-weight: 500;
  letter-spacing: 1px;
  opacity: 0.72;
}

.note-panel-body {
  margin: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-bottom: var(--pager-clearance);
  color: var(--read);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.005em;
  /* Keep below the fade overlay so text can soft-dissolve under the pager */
  isolation: isolate;
  z-index: 0;
}

.note-blip {
  margin: 0 0 28px;
}

.note-blip:last-child {
  margin-bottom: 0;
}

.note-blip-label {
  display: block;
  margin: 0 0 10px;
  color: var(--redline);
  font-family: var(--label);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.4px;
  line-height: 1.35;
  text-transform: uppercase;
}

.note-blip-text {
  display: block;
  margin: 0;
  color: var(--read);
}

.note-panel-close {
  appearance: none;
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--read-muted);
  cursor: pointer;
}

.note-panel-close:hover,
.note-panel-close:focus-visible {
  color: var(--paper);
  background: var(--paper-06);
  outline: none;
}

.note-pager {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--paper-12);
  border-radius: 999px;
  background: color-mix(in srgb, var(--rail-fill) 72%, var(--paper-08));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  transform: translateX(-50%);
}

.note-pager-btn {
  appearance: none;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--paper-82);
  line-height: 0;
  cursor: pointer;
  transition:
    color 120ms ease,
    background-color 120ms ease,
    transform 120ms ease;
}

.note-pager-btn svg {
  display: block;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.note-pager-btn:hover:not(:disabled),
.note-pager-btn:focus-visible:not(:disabled) {
  color: var(--paper);
  background: var(--paper-10);
  outline: none;
}

.note-pager-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.note-pager-btn:disabled {
  color: var(--paper-28);
  cursor: default;
}

.note-backdrop {
  display: none !important;
}

.note-connector {
  position: fixed;
  z-index: 39;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(
    to right,
    rgba(var(--redline-rgb), 0.95),
    rgba(var(--redline-rgb), 0.55)
  );
}

.note-connector[hidden] {
  display: none !important;
}

@media (max-width: 899px) {
  .note-connector {
    display: none !important;
  }

  .note-panel {
    --pager-clearance: 88px;
    right: 0;
    bottom: 0;
    left: 0;
    max-height: min(70vh, 560px);
    padding: 36px 20px 0;
    border-radius: 0;
    border-bottom: 0;
    background: var(--rail-fill);
    box-shadow:
      0 -20px 52px rgba(0, 0, 0, 0.54),
      inset 0 1px 0 var(--paper-04);
  }

  .note-pager {
    bottom: 16px;
  }
}

@media (min-width: 900px) {
  .note-panel {
    --pager-clearance: 96px;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: var(--rail-width);
    max-height: none;
    padding: 88px 28px 0;
    border-radius: 0;
    border-top: 0;
    border-bottom: 0;
    border-right: 0;
    background: var(--rail-fill);
    box-shadow:
      -18px 0 48px rgba(0, 0, 0, 0.48),
      inset 1px 0 0 var(--paper-025);
  }

  .note-pager {
    bottom: 24px;
  }

  .note-panel-close {
    top: 20px;
    right: 20px;
  }
}

.articles-index main {
  width: min(100% - 40px, 1120px);
}

/* Series filters: one row; swipe on narrow widths */
.articles-index .event-type-filter {
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scrollbar-width: none;
  mask-image: none;
}

.articles-index .event-type-filter::-webkit-scrollbar {
  display: none;
}

.articles-index .event-type-filter .event-filter-chip {
  flex: 0 0 auto;
}

.articles-index .event-type-filter.is-fade-end {
  mask-image: linear-gradient(
    to right,
    #000 0,
    #000 calc(100% - 24px),
    transparent 100%
  );
}

.articles-index .event-type-filter.is-fade-start {
  mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 24px,
    #000 100%
  );
}

.articles-index .event-type-filter.is-fade-start.is-fade-end {
  mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 24px,
    #000 calc(100% - 24px),
    transparent 100%
  );
}

.articles-tile-meta {
  color: var(--redline);
}

.articles-tile-meta--in-the-room {
  color: var(--in-the-room);
}

.articles-tile-meta--in-conversation {
  color: var(--in-conversation);
}

.articles-tile-lock {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  vertical-align: -1px;
  opacity: 0.85;
}

.articles-tile-lock svg {
  display: block;
}

/* In the Room essays (no Red Lines rail / abridgment) */
body.essay-in-the-room .article-header .eyebrow {
  color: var(--in-the-room);
}

body.essay-in-the-room .article-header {
  margin-bottom: 44px;
}

body.essay-in-the-room .article-header h1 {
  margin-bottom: 18px;
}

body.essay-in-the-room .article-lede {
  margin-top: 32px;
  border-left-color: rgba(var(--in-the-room-rgb), 0.72);
}

body.essay-in-the-room .article-note strong {
  color: var(--in-the-room);
}

body.essay-in-the-room .referent {
  --mark: var(--in-the-room-rgb);
  /* Softer than Red Lines — ink is already light; keep text readable, especially under selection. */
  background-image:
    linear-gradient(
      to bottom,
      rgba(var(--mark), 0.05) 0%,
      rgba(var(--mark), 0.16) 42%,
      rgba(var(--mark), 0.32) 78%,
      rgba(var(--mark), 0.48) 100%
    );
}

body.essay-in-the-room .referent:hover,
body.essay-in-the-room .referent:focus-visible {
  background-image:
    linear-gradient(
      to bottom,
      rgba(var(--mark), 0.08) 0%,
      rgba(var(--mark), 0.22) 42%,
      rgba(var(--mark), 0.40) 78%,
      rgba(var(--mark), 0.58) 100%
    );
}

body.essay-in-the-room .referent.is-active {
  background-image:
    linear-gradient(
      to bottom,
      rgba(var(--mark), 0.10) 0%,
      rgba(var(--mark), 0.26) 38%,
      rgba(var(--mark), 0.46) 72%,
      rgba(var(--mark), 0.64) 100%
    );
}

body.essay-in-the-room .referent::selection,
body.essay-in-the-room .referent *::selection {
  background: rgba(var(--in-the-room-rgb), 0.42);
  color: var(--read);
}

body.essay-in-the-room .referent::-moz-selection,
body.essay-in-the-room .referent *::-moz-selection {
  background: rgba(var(--in-the-room-rgb), 0.42);
  color: var(--read);
}

body.essay-in-the-room .note-panel-title,
body.essay-in-the-room .note-blip-label {
  color: var(--in-the-room);
}

body.essay-in-the-room .note-connector {
  background: linear-gradient(
    to right,
    rgba(var(--in-the-room-rgb), 0.95),
    rgba(var(--in-the-room-rgb), 0.55)
  );
}

/*
  Light mode — keep dark-mode mark/shadow recipes; dial opacity and
  thickness down so they read as hairlines and soft depth, not slabs.
*/
@media (prefers-color-scheme: light) {
  .referent {
    background-image: linear-gradient(
      to bottom,
      rgba(var(--mark), 0.02) 0%,
      rgba(var(--mark), 0.07) 42%,
      rgba(var(--mark), 0.16) 78%,
      rgba(var(--mark), 0.28) 100%
    );
    background-size: 100% 0.5em;
    background-position: 0 94%;
  }

  .referent:hover,
  .referent:focus-visible {
    background-image: linear-gradient(
      to bottom,
      rgba(var(--mark), 0.04) 0%,
      rgba(var(--mark), 0.12) 42%,
      rgba(var(--mark), 0.24) 78%,
      rgba(var(--mark), 0.38) 100%
    );
    background-size: 100% 0.58em;
  }

  .referent.is-active {
    background-image: linear-gradient(
      to bottom,
      rgba(var(--mark), 0.06) 0%,
      rgba(var(--mark), 0.16) 38%,
      rgba(var(--mark), 0.32) 72%,
      rgba(var(--mark), 0.48) 100%
    );
    background-size: 100% 0.66em;
    background-position: 0 92%;
  }

  body.essay-in-the-room .referent {
    background-image: linear-gradient(
      to bottom,
      rgba(var(--mark), 0.015) 0%,
      rgba(var(--mark), 0.05) 42%,
      rgba(var(--mark), 0.12) 78%,
      rgba(var(--mark), 0.22) 100%
    );
    background-size: 100% 0.48em;
  }

  body.essay-in-the-room .referent:hover,
  body.essay-in-the-room .referent:focus-visible {
    background-image: linear-gradient(
      to bottom,
      rgba(var(--mark), 0.03) 0%,
      rgba(var(--mark), 0.09) 42%,
      rgba(var(--mark), 0.18) 78%,
      rgba(var(--mark), 0.3) 100%
    );
    background-size: 100% 0.56em;
  }

  body.essay-in-the-room .referent.is-active {
    background-image: linear-gradient(
      to bottom,
      rgba(var(--mark), 0.04) 0%,
      rgba(var(--mark), 0.12) 38%,
      rgba(var(--mark), 0.24) 72%,
      rgba(var(--mark), 0.36) 100%
    );
    background-size: 100% 0.64em;
  }

  body.essay-in-the-room .referent::selection,
  body.essay-in-the-room .referent *::selection,
  body.essay-in-the-room .referent::-moz-selection,
  body.essay-in-the-room .referent *::-moz-selection {
    background: rgba(var(--in-the-room-rgb), 0.18);
  }

  .note-pager {
    border-color: var(--paper-10);
    background: var(--surface);
    box-shadow: 0 3px 12px rgba(18, 18, 18, 0.07);
  }

  .note-connector {
    height: 1px;
    background: linear-gradient(
      to right,
      rgba(var(--redline-rgb), 0.4),
      rgba(var(--redline-rgb), 0.08)
    );
  }

  body.essay-in-the-room .note-connector {
    background: linear-gradient(
      to right,
      rgba(var(--in-the-room-rgb), 0.35),
      rgba(var(--in-the-room-rgb), 0.06)
    );
  }

  @media (max-width: 899px) {
    .note-panel {
      box-shadow:
        0 -6px 24px rgba(18, 18, 18, 0.07),
        inset 0 1px 0 rgba(18, 18, 18, 0.04);
    }
  }

  @media (min-width: 900px) {
    .note-panel {
      border-left: 1px solid var(--rim);
      box-shadow:
        -1px 0 0 rgba(18, 18, 18, 0.04),
        -10px 0 28px rgba(18, 18, 18, 0.05);
    }
  }
}

.article-dek {
  margin: 0;
  color: var(--read);
  font-size: clamp(1.25rem, 2.6vw, 1.4rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.45;
  max-width: 38rem;
  text-wrap: pretty;
}

body.essay-in-the-room .article-dek {
  margin-bottom: 0;
}

/* In the Room translation map: same plate as Red Lines theme-map */
.theme-map--translate {
  margin: 0 0 56px;
}

.theme-map--translate .theme-map-label {
  color: var(--in-the-room);
}

.theme-map--translate .theme-map-from {
  color: var(--in-the-room);
  text-decoration-color: rgba(var(--in-the-room-rgb), 0.6);
}

.theme-map--translate .theme-map-to {
  color: var(--read);
  font-weight: 500;
}

.theme-map--translate .theme-map-rule {
  background: rgba(var(--in-the-room-rgb), 0.72);
}

/* In Conversation — curated talks with named practitioners */
body.essay-in-conversation .article-header .eyebrow {
  color: var(--in-conversation);
}

body.essay-in-conversation .article-header {
  margin-bottom: 36px;
}

body.essay-in-conversation .article-header h1 {
  margin-bottom: 18px;
}

body.essay-in-conversation .article-lede {
  margin-top: 28px;
  border-left-color: rgba(var(--in-conversation-rgb), 0.72);
}

body.essay-in-conversation .article-note strong {
  color: var(--in-conversation);
}

body.essay-in-conversation .article-dek {
  margin-bottom: 0;
}

body.essay-in-conversation .article-pullquote {
  border-left-color: rgba(var(--in-conversation-rgb), 0.72);
}

body.essay-in-conversation .article-pullquote--hero {
  margin: 0 0 40px;
  padding: 8px 0 8px 22px;
  max-width: 38rem;
}

body.essay-in-conversation .article-pullquote--hero p {
  font-size: clamp(1.45rem, 3.2vw, 1.85rem);
  line-height: 1.35;
}

body.essay-in-conversation .article-pullquote cite {
  display: none;
}

.article-guest {
  margin: 18px 0 0;
  color: var(--read-secondary);
  font-size: 15px;
  line-height: 1.55;
  max-width: 38rem;
}

.article-guest-bio {
  margin: 8px 0 0;
  color: var(--read-muted);
  font-size: 14px;
  line-height: 1.55;
  max-width: 36rem;
}

.theme-map--conversation {
  margin: 48px 0 40px;
}

.theme-map--conversation-lead {
  margin: 36px 0 48px;
}

.theme-map--conversation .theme-map-label {
  color: var(--in-conversation);
}

.theme-map--conversation .theme-map-from {
  color: var(--in-conversation);
  text-decoration-color: rgba(var(--in-conversation-rgb), 0.6);
}

.theme-map--conversation .theme-map-to {
  color: var(--read);
  font-weight: 500;
}

.theme-map--conversation .theme-map-rule {
  background: rgba(var(--in-conversation-rgb), 0.72);
}

.action-notes {
  margin: 0 0 40px;
  padding: 22px 0 0;
  border-top: 1px solid var(--rim);
  max-width: 38rem;
  display: grid;
  gap: 12px;
}

.action-notes h2 {
  margin: 0 0 4px;
  color: var(--in-conversation);
  font-family: var(--label);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  line-height: 1.5;
  text-transform: uppercase;
}

.action-notes ol {
  margin: 0;
  padding: 0 0 0 1.15em;
  color: var(--read-secondary);
  font-size: 16px;
  line-height: 1.65;
  display: grid;
  gap: 10px;
}

.article-close--conversation {
  margin-top: 1.35em;
  display: grid;
  gap: 1.35em;
  max-width: 38rem;
}

.article-close--conversation p {
  margin: 0;
  color: var(--read-secondary);
  font-size: 17px;
  line-height: 1.75;
}

.article-body {
  display: grid;
  gap: 1.35em;
  max-width: 38rem;
}

.article-body h2 {
  margin: 1.1em 0 0;
  color: var(--read);
  font-size: clamp(1.25rem, 2.4vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.article-body p {
  margin: 0;
  color: var(--read-secondary);
  font-size: 17px;
  line-height: 1.75;
}

.article-body ul {
  margin: 0;
  padding: 0 0 0 1.15em;
  color: var(--read-secondary);
  font-size: 17px;
  line-height: 1.75;
  display: grid;
  gap: 0.45em;
}

.article-body .article-close {
  margin-top: 0;
  display: grid;
  gap: 1.35em;
}

.article-close p {
  margin: 0;
}

.article-pullquote {
  margin: 0;
  padding: 0 0 0 22px;
  border: 0;
  border-left: 2px solid rgba(var(--in-the-room-rgb), 0.72);
  max-width: 34rem;
}

.article-pullquote p {
  margin: 0;
  color: var(--read);
  font-size: clamp(1.2rem, 2.2vw, 1.4rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.45;
}

.article-sources {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--rim);
  max-width: 38rem;
}

.article-sources h2 {
  margin: 0 0 14px;
  color: var(--read);
  font-family: var(--label);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  line-height: 1.5;
  text-transform: uppercase;
}

.article-sources ul {
  margin: 0;
  padding: 0 0 0 1.15em;
  color: var(--read-muted);
  font-size: 14px;
  line-height: 1.55;
  display: grid;
  gap: 8px;
}

/* Localhost-only LinkedIn drafts (hidden in production) */
.article-admin {
  position: fixed;
  z-index: 20;
  right: 14px;
  bottom: 14px;
  width: min(420px, calc(100vw - 28px));
  max-height: min(72vh, 640px);
  display: flex;
  flex-direction: column;
  padding: 14px 14px 12px;
  border: 1px solid var(--paper-16);
  border-radius: 14px;
  background: var(--overlay);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.article-admin[hidden] {
  display: none !important;
}

.article-admin[data-collapsed="true"] {
  width: auto;
  max-height: none;
  padding: 8px 10px;
}

.article-admin[data-collapsed="true"] .article-admin-list {
  display: none;
}

.article-admin[data-collapsed="true"] .article-admin-head {
  margin-bottom: 0;
}

.article-admin-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.article-admin-label {
  margin: 0;
  color: var(--paper-48);
  font-family: var(--label);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.article-admin-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--rim);
  border-radius: 8px;
  background: transparent;
  color: var(--paper-68);
  cursor: pointer;
  font-family: var(--label);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.article-admin-toggle:hover {
  border-color: var(--paper-48);
  color: var(--paper);
}

.article-admin-list {
  flex: 1 1 auto;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 2px;
}

.article-admin-card {
  margin: 0;
  padding: 10px 10px 10px 12px;
  border: 1px solid var(--rim);
  border-radius: 10px;
  background: var(--paper-03);
}

.article-admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.article-admin-card-title {
  margin: 0;
  color: var(--paper-68);
  font-family: var(--label);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.9px;
  text-transform: uppercase;
}

.article-admin-copy {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--rim);
  border-radius: 8px;
  background: transparent;
  color: var(--paper-68);
  cursor: pointer;
}

.article-admin-copy:hover {
  border-color: var(--paper-48);
  color: var(--paper);
}

.article-admin-copy[data-copied="true"] {
  border-color: rgba(232, 72, 58, 0.55);
  color: var(--redline);
}

.article-admin-copy svg {
  display: block;
}

.article-admin-text {
  margin: 0;
  color: var(--read-secondary);
  font-family: var(--body, "Google Sans", system-ui, sans-serif);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.45;
  white-space: pre-wrap;
  text-transform: none;
}

/* Draft / collaborator password gate */
body[data-draft-password]:not([data-draft-unlocked]) .article-main,
body[data-draft-password]:not([data-draft-unlocked]) > footer {
  display: none !important;
}

.article-draft-gate {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(100% - 40px, 1120px);
  margin: 0 auto;
  padding: clamp(48px, 10vh, 96px) 0 48px;
}

.article-draft-gate[hidden] {
  display: none !important;
}

.article-draft-gate-card {
  width: min(100%, 22rem);
}

.article-draft-gate-form {
  display: grid;
  gap: 10px;
}

.article-draft-gate-input {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--rim);
  border-radius: 10px;
  background: rgba(10, 11, 20, 0.55);
  color: var(--read);
  font-family: var(--body, "Google Sans", system-ui, sans-serif);
  font-size: 16px;
  line-height: 1.4;
}

.article-draft-gate-input::placeholder {
  color: var(--read-muted);
}

.article-draft-gate-input:focus {
  outline: none;
  border-color: rgba(var(--in-conversation-rgb, 110, 102, 255), 0.72);
}

.article-draft-gate-error {
  margin: 0;
  color: var(--redline, #e8483a);
  font-size: 14px;
  line-height: 1.4;
}

.article-draft-gate-error[hidden] {
  display: none !important;
}

.article-draft-gate-submit {
  margin-top: 6px;
  justify-self: start;
  padding: 10px 18px;
  border: 1px solid rgba(var(--in-conversation-rgb, 110, 102, 255), 0.55);
  border-radius: 999px;
  background: transparent;
  color: var(--in-conversation, #6e66ff);
  font-family: var(--label);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  line-height: 1.3;
  text-transform: uppercase;
  cursor: pointer;
}

.article-draft-gate-submit:hover,
.article-draft-gate-submit:focus-visible {
  filter: brightness(1.22);
  outline: none;
}

body.essay-in-the-room .article-draft-gate-submit {
  color: var(--in-the-room);
  border-color: rgba(var(--in-the-room-rgb), 0.55);
}

body.essay-in-the-room .article-draft-gate-input:focus {
  border-color: rgba(var(--in-the-room-rgb), 0.72);
}

body:not(.essay-in-conversation):not(.essay-in-the-room) .article-draft-gate-submit {
  color: var(--redline);
  border-color: rgba(var(--redline-rgb), 0.55);
}

body:not(.essay-in-conversation):not(.essay-in-the-room) .article-draft-gate-input:focus {
  border-color: rgba(var(--redline-rgb), 0.72);
}

/*
  Light mode: heds, deks, subheads, closes, pull quotes, and tiles fade
  black ↔ deeper series ink. Series labels / CTAs keep solid series color.
  Tri-color cycle is only wordmark + home hero quote (site.css).
  Scope body:not(...) rules to article pages so homepage editions keep
  their own series ink (home.css).
*/
@media (prefers-color-scheme: light) {
  body.essay-in-the-room .article-header h1,
  body.essay-in-the-room .article-dek,
  body.essay-in-the-room .article-pullquote p,
  body.essay-in-the-room .article-body h2,
  body.essay-in-the-room .article-close p,
  .event-tile[data-series="in-the-room"] .event-tile-title {
    --accent-ink: var(--in-the-room-deep);
    color: #07080f;
    animation: series-ink-fade 9s ease-in-out infinite alternate;
  }

  body.essay-in-conversation .article-header h1,
  body.essay-in-conversation .article-dek,
  body.essay-in-conversation .article-pullquote p,
  body.essay-in-conversation .article-body h2,
  body.essay-in-conversation .article-close p,
  .event-tile[data-series="in-conversation"] .event-tile-title {
    --accent-ink: var(--in-conversation-deep);
    color: #07080f;
    animation: series-ink-fade 9s ease-in-out infinite alternate;
  }

  body:not(.home-page):not(.essay-in-the-room):not(.essay-in-conversation) .article-header h1,
  body:not(.home-page):not(.essay-in-the-room):not(.essay-in-conversation) .article-dek,
  body:not(.home-page):not(.essay-in-the-room):not(.essay-in-conversation) .article-pullquote p,
  body:not(.home-page):not(.essay-in-the-room):not(.essay-in-conversation) .abridgment h2,
  body:not(.home-page):not(.essay-in-the-room):not(.essay-in-conversation) .article-body h2,
  body:not(.home-page):not(.essay-in-the-room):not(.essay-in-conversation) .article-close p,
  .event-tile[data-series="red-line"] .event-tile-title {
    --accent-ink: var(--redline-deep);
    color: #07080f;
    animation: series-ink-fade 9s ease-in-out infinite alternate;
  }

  body.essay-in-the-room .article-mark-art,
  body.essay-in-the-room .article-title-art,
  .event-tile[data-series="in-the-room"] .event-tile-media {
    --accent-ink: var(--in-the-room-deep);
    background-color: #07080f;
    animation: series-tile-fade 9s ease-in-out infinite alternate;
  }

  body.essay-in-conversation .article-mark-art,
  body.essay-in-conversation .article-title-art,
  .event-tile[data-series="in-conversation"] .event-tile-media {
    --accent-ink: var(--in-conversation-deep);
    background-color: #07080f;
    animation: series-tile-fade 9s ease-in-out infinite alternate;
  }

  body:not(.home-page):not(.essay-in-the-room):not(.essay-in-conversation) .article-mark-art,
  body:not(.home-page):not(.essay-in-the-room):not(.essay-in-conversation) .article-title-art,
  .event-tile[data-series="red-line"] .event-tile-media {
    --accent-ink: var(--redline-deep);
    background-color: #07080f;
    animation: series-tile-fade 9s ease-in-out infinite alternate;
  }
}

