/* =========================================================
   Sanctuary Quantitative Research
   Editorial quant research platform.
   ========================================================= */

:root {
  /* ---- Palette ---- */
  --navy:        #0A1628;   /* primary deep surface */
  --navy-2:      #0F1E33;   /* slightly raised navy */
  --navy-deep:   #060F1E;   /* footer */

  --citadel:       #00216b;   /* header / nav chrome */
  --citadel-deep:  #001a54;   /* footer base — deeper navy */
  --citadel-rgb:   0, 33, 107;
  --citadel-accent: #6da0ef;  /* nav / footer accent */

  --navy-line:   rgba(255,255,255,0.12);
  --navy-line-soft: rgba(255,255,255,0.06);

  --steel:       #4A6B8A;   /* primary accent — dusk steel blue */
  --steel-soft:  #7BA0C2;   /* paler accent */
  --steel-deep:  #2E4A6A;   /* hover accent */

  --bone:        #F4F0E8;   /* warm parchment surface */
  --bone-soft:   #EAE4D6;   /* rule color on bone */
  --paper:       #FFFFFF;
  --rule:        #DCD4C2;

  --ink:         #0A1628;   /* body on light */
  --ink-2:       #1F2A40;   /* body slightly softer */
  --ink-mute:    #5C6577;   /* muted body / meta */

  /* ---- Typography ---- */
  --serif: "Cormorant Garamond", "Cormorant", "EB Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* ---- Layout ---- */
  --maxw: 1320px;
  --gutter: clamp(1.25rem, 3vw, 2.5rem);
  --rail-x: clamp(1.5rem, 4vw, 4rem);

  --header-h: 80px;

  --ease: cubic-bezier(.22,.61,.36,1);

  /* Textareas: page composers grow until cap; modals scroll inside a fixed cap */
  --textarea-page-max: min(20rem, 50vh);
  --textarea-modal-max: min(16rem, 38vh);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body > main,
body > .write-editor-main,
body > article.section--bone,
body > section.section--bone {
  flex: 1 0 auto;
}

img, video, svg { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
  transition: color .25s var(--ease), opacity .25s var(--ease);
}
p { margin: 0 0 1em; }

/* ---- Display headings ---- */
h1, h2, h3, h4, h5 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.08;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.6rem, 4.6vw, 4.4rem); }
h2 { font-size: clamp(2rem, 3.4vw, 3.2rem); }
h3 { font-size: clamp(1.5rem, 2vw, 2rem); line-height: 1.25; }
h4 { font-size: clamp(1.2rem, 1.4vw, 1.5rem); line-height: 1.3; }
h5 { font-size: 1rem; }

/* ---- Sans utilities ---- */
.kicker {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.kicker::before {
  content: "";
  display: inline-block;
  width: 24px; height: 1px;
  background: var(--steel);
}
.kicker--ondark { color: var(--steel-soft); }
.kicker--ondark::before { background: var(--steel-soft); }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.lede {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.4rem, 2vw, 2rem);
  line-height: 1.4;
  color: var(--ink);
  max-width: 36ch;
}

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* =========================================================
   Site header — transparent over hero, frosted glass on scroll
   ========================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background .45s var(--ease),
    border-color .45s var(--ease),
    backdrop-filter .45s var(--ease),
    -webkit-backdrop-filter .45s var(--ease);
}
.site-header[data-hero-nav] {
  background: rgba(var(--citadel-rgb), calc(var(--header-fade, 0) * 0.88));
  backdrop-filter: blur(var(--header-blur, 0px)) saturate(110%);
  -webkit-backdrop-filter: blur(var(--header-blur, 0px)) saturate(110%);
  border-bottom-color: rgba(255,255,255, calc(var(--header-fade, 0) * 0.1));
  transition: none;
}
.site-header.is-solid {
  background: rgba(var(--citadel-rgb), 0.88);
  backdrop-filter: blur(22px) saturate(110%);
  -webkit-backdrop-filter: blur(22px) saturate(110%);
  border-bottom-color: rgba(255,255,255,0.08);
}
body:not(:has(.page-banner, .hero)) .site-header.is-solid {
  background: rgba(var(--citadel-rgb), 0.94);
}

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  height: var(--header-h);
  padding: 0 var(--rail-x);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  justify-self: start;
  grid-column: 1;
}
.brand-mark {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
}
.brand-name {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
}
.brand-name-1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: 0.005em;
  color: var(--paper);
}
.brand-name-2 {
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.65);
  margin-top: 5px;
  line-height: 1.35;
  max-width: 11rem;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 3vw, 2.75rem);
  list-style: none;
  margin: 0;
  padding: 0;
  justify-self: center;
  grid-column: 2;
}
.nav-links li[data-nav-subscribe][hidden],
.nav-links li[data-nav-profile][hidden] {
  display: none !important;
}
.nav-links a {
  font-size: 0.86rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.85);
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--paper); }
.nav-links a.is-active {
  color: var(--paper);
  border-bottom-color: var(--citadel-accent);
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  justify-self: end;
  grid-column: 3;
  min-width: 11.5rem;
}
.nav-actions [hidden] {
  display: none !important;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--paper);
  padding: 0.7rem 1.1rem;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  transition: background .25s var(--ease), border-color .25s var(--ease);
  cursor: pointer;
  font-family: inherit;
  background: transparent;
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
  vertical-align: middle;
}
button.nav-cta {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
}
.nav-cta:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.32);
  color: var(--paper);
}
.nav-cta--ghost {
  border-color: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.85);
}
.nav-cta--ghost:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.3);
  color: var(--paper);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 40px; height: 40px;
  color: var(--paper);
  cursor: pointer;
  margin-left: auto;
}

@media (max-width: 900px) {
  .nav { grid-template-columns: auto auto; }
  .nav-links, .nav-actions { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-header.is-open {
    background: rgba(var(--citadel-rgb), 0.94);
    backdrop-filter: blur(22px) saturate(110%);
    -webkit-backdrop-filter: blur(22px) saturate(110%);
  }
  .site-header.is-open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    grid-column: 1 / -1;
    padding: 0 var(--rail-x) 1.25rem;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .site-header.is-open .nav-links a {
    width: 100%;
    padding: 0.95rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .site-header.is-open .nav-actions {
    display: flex;
    flex-wrap: wrap;
    grid-column: 1 / -1;
    margin: 0 var(--rail-x) 1rem;
    align-self: flex-start;
  }
}

/* =========================================================
   Hero — full-bleed forest photograph (nav overlays it)
   ========================================================= */
.hero {
  position: relative;
  background-color: var(--navy);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--header-h) + 4rem) var(--rail-x) clamp(4rem, 8vh, 6rem);
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(10,22,40,0.55) 0%,
      rgba(10,22,40,0.18) 22%,
      rgba(10,22,40,0.18) 55%,
      rgba(10,22,40,0.78) 100%);
  pointer-events: none;
  z-index: -1;
}

.hero__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
}

.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--paper);
  font-size: clamp(3rem, 6.4vw, 6rem);
  line-height: 1.02;
  letter-spacing: -0.014em;
  max-width: 18ch;
  margin: 1.25rem 0 0;
  text-shadow: 0 2px 30px rgba(0,0,0,0.25);
}
.hero__title em {
  font-style: italic;
  color: var(--steel-soft);
  font-weight: 400;
}

.hero__sub {
  margin-top: 1.75rem;
  font-family: var(--sans);
  font-size: clamp(1.05rem, 1.25vw, 1.2rem);
  color: rgba(255,255,255,0.85);
  max-width: 50ch;
  line-height: 1.6;
  text-shadow: 0 2px 20px rgba(0,0,0,0.25);
}

.hero__meta {
  margin-top: 2.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--sans);
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}
.hero__meta::before {
  content: "";
  display: inline-block;
  width: 36px; height: 1px;
  background: rgba(255,255,255,0.5);
}

@media (max-width: 720px) {
  .hero { min-height: 86vh; padding-top: calc(var(--header-h) + 3rem); }
}

/* =========================================================
   Research feature — dedicated section with paper-cover carousel
   ========================================================= */
.research-feature {
  position: relative;
  background: var(--navy);
  color: var(--paper);
  padding: clamp(5rem, 9vw, 8rem) 0 clamp(5rem, 9vw, 8rem);
  overflow: hidden;
}
.research-feature::after {
  /* subtle top hairline to set off from the hero */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(123,160,194,0.25) 50%, transparent 100%);
}

.feature-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding-bottom: clamp(2rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--navy-line);
  margin-bottom: clamp(2.5rem, 4vw, 3.5rem);
}
.feature-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--paper);
  font-size: clamp(1.5rem, 2vw, 2rem);
  margin: 0.4rem 0 0;
  letter-spacing: -0.005em;
}

.carousel-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
}
.carousel-counter {
  min-width: 64px;
  text-align: center;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
}
.carousel-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--navy-line);
  background: transparent;
  color: rgba(255,255,255,0.85);
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.carousel-btn:hover {
  background: var(--steel);
  border-color: var(--steel);
  color: var(--paper);
}

/* Stage — grid stacks all slides; only active is visible */
.carousel-stage {
  position: relative;
  display: grid;
}
.carousel-slide {
  grid-area: 1 / 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity .55s var(--ease);
}
.carousel-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Paper card — cover on left, content on right */
.paper-card {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.paper-cover {
  display: block;
  position: relative;
  aspect-ratio: 8.5 / 11;
  background: var(--navy-2);
  box-shadow:
    0 30px 70px rgba(0,0,0,0.55),
    0 10px 25px rgba(0,0,0,0.35),
    0 0 0 1px rgba(255,255,255,0.06);
  overflow: hidden;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.paper-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.paper-cover:hover {
  transform: translateY(-6px);
  box-shadow:
    0 38px 80px rgba(0,0,0,0.6),
    0 14px 30px rgba(0,0,0,0.4),
    0 0 0 1px rgba(123,160,194,0.25);
}

.paper-content { display: flex; flex-direction: column; }

.slide-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}
.slide-tag {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel-soft);
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(123,160,194,0.35);
  border-radius: 999px;
}
.slide-date {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.06em;
}

.slide-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 3.6vw, 3.4rem);
  line-height: 1.08;
  color: var(--paper);
  margin: 0 0 1rem;
  max-width: 22ch;
  letter-spacing: -0.008em;
}
.slide-deck {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 1.3vw, 1.3rem);
  color: var(--steel-soft);
  margin: 0 0 1.75rem;
  line-height: 1.4;
  max-width: 32ch;
}
.slide-author {
  font-family: var(--sans);
  font-size: 0.84rem;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.02em;
  margin: 0 0 1.5rem;
}
.slide-author strong { color: rgba(255,255,255,0.85); font-weight: 500; }
.slide-excerpt {
  color: rgba(255,255,255,0.78);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 52ch;
  margin: 0 0 2rem;
}
.slide-link {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--steel-soft);
  letter-spacing: 0.02em;
  align-self: flex-start;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(123,160,194,0.4);
}
.slide-link:hover { color: var(--paper); border-color: var(--paper); }
.slide-link svg { transition: transform .25s var(--ease); }
.slide-link:hover svg { transform: translateX(4px); }

.carousel-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--navy-line);
}
.dot {
  width: 30px;
  height: 2px;
  background: rgba(255,255,255,0.18);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background .25s var(--ease);
}
.dot.is-active { background: var(--steel-soft); }
.dot:hover { background: rgba(255,255,255,0.45); }

/* Single-slide refinements (no controls/dots) */
[data-carousel][data-single="true"] .carousel-controls,
[data-carousel][data-single="true"] .carousel-dots {
  display: none;
}

@media (max-width: 880px) {
  .paper-card {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
  .paper-cover { max-width: 360px; }
}

/* =========================================================
   Sections / containers
   ========================================================= */
section { padding: clamp(4.5rem, 8vw, 8rem) 0; }

.section--bone { background: var(--paper); }
.section--paper { background: var(--paper); }
.section--navy { background: var(--navy); color: var(--paper); }
.section--navy h1, .section--navy h2, .section--navy h3, .section--navy h4 { color: var(--paper); }
.section--navy p { color: rgba(255,255,255,0.78); }

/* Section header */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
  margin-bottom: clamp(3rem, 5vw, 4rem);
}
.section-head .head-left h2 { margin: 0.25rem 0 0; max-width: 18ch; }
.section-head .head-right { color: var(--ink-2); font-size: 1.05rem; line-height: 1.7; max-width: 56ch; }
.section--navy .section-head .head-right { color: rgba(255,255,255,0.78); }
@media (max-width: 720px) {
  .section-head { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* =========================================================
   Strategy cards (refined, distinct from One River)
   ========================================================= */
.strategies {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.strategy-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 2.25rem 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  transition: border-color .25s var(--ease), transform .35s var(--ease);
  color: var(--ink);
}
.strategy-card:hover {
  border-color: var(--steel);
  transform: translateY(-2px);
  color: var(--ink);
}
.strategy-card .strategy-cat {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 1.25rem;
}
.strategy-card h3 {
  font-size: clamp(1.5rem, 1.8vw, 1.85rem);
  margin: 0 0 0.85rem;
  letter-spacing: -0.005em;
}
.strategy-card p {
  color: var(--ink-mute);
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0 0 1.5rem;
  flex: 1 1 auto;
}
.strategy-card .strategy-meta {
  display: flex;
  gap: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.74rem;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
}
.strategy-card .strategy-meta span {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.strategy-card .strategy-meta span strong {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.005em;
}
@media (max-width: 980px) { .strategies { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .strategies { grid-template-columns: 1fr; } }

/* =========================================================
   Insights — list and cards
   ========================================================= */
.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.insight-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 1.75rem 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: var(--ink);
  transition: border-color .25s var(--ease), transform .35s var(--ease);
}
.insight-card:hover { border-color: var(--steel); transform: translateY(-2px); color: var(--ink); }
.insight-card .slide-meta { margin: 0; }
.insight-card h3 {
  font-size: 1.4rem;
  line-height: 1.25;
  margin: 0;
  flex: 1 1 auto;
}
.insight-card .insight-readtime {
  font-family: var(--sans);
  font-size: 0.74rem;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}
.insight-card .slide-tag {
  color: var(--steel);
  border-color: rgba(74,107,138,0.35);
}
@media (max-width: 980px) { .insight-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .insight-grid { grid-template-columns: 1fr; } }

/* Simple list of recent insights (used inside firm/insights pages too) */
.insight-list { display: grid; }
.insight-row {
  display: grid;
  grid-template-columns: 130px 1fr 130px;
  gap: 2rem;
  align-items: baseline;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}
.section--navy .insight-row { border-bottom-color: var(--navy-line); color: var(--paper); }
.insight-row:hover .insight-title { color: var(--steel); }
.section--navy .insight-row:hover .insight-title { color: var(--steel-soft); }
.insight-date {
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.section--navy .insight-date { color: rgba(255,255,255,0.55); }
.insight-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.2rem, 1.8vw, 1.7rem);
  line-height: 1.25;
  color: var(--ink);
  transition: color .25s var(--ease);
}
.section--navy .insight-title { color: var(--paper); }
.insight-cat {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
  text-align: right;
}
.section--navy .insight-cat { color: var(--steel-soft); }
@media (max-width: 720px) {
  .insight-row { grid-template-columns: 1fr; gap: 0.5rem; }
  .insight-cat { text-align: left; order: -1; }
}

/* =========================================================
   Stats / by the numbers
   ========================================================= */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 2.5rem 0;
}
.section--navy .stats { border-color: var(--navy-line); }
.stat dt {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 0.5rem;
}
.section--navy .stat dt { color: rgba(255,255,255,0.55); }
.stat dd {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.85rem, 3vw, 2.85rem);
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.01em;
}
.section--navy .stat dd { color: var(--paper); }
.stat dd small {
  font-family: var(--sans);
  font-size: 0.55em;
  font-weight: 500;
  color: var(--steel);
  margin-left: 0.2rem;
}
.section--navy .stat dd small { color: var(--steel-soft); }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2,1fr); } }

/* =========================================================
   People grid
   ========================================================= */
.people {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 2.5rem 2.5rem;
}
.person { padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.section--navy .person { border-top-color: var(--navy-line); }
.person-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.45rem;
  margin: 0 0 0.25rem;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.section--navy .person-name { color: var(--paper); }
.person-role {
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 1rem;
}
.section--navy .person-role { color: var(--steel-soft); }
.person-bio { font-size: 0.94rem; line-height: 1.65; color: var(--ink-mute); margin: 0; }
.section--navy .person-bio { color: rgba(255,255,255,0.75); }
@media (max-width: 880px) { .people { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .people { grid-template-columns: 1fr; } }

/* =========================================================
   Locations
   ========================================================= */
.locations {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.location h4 {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 1rem;
}
.section--navy .location h4 { color: var(--steel-soft); }
.location p { font-size: 0.94rem; line-height: 1.7; margin: 0; color: var(--ink-mute); }
.section--navy .location p { color: rgba(255,255,255,0.78); }
@media (max-width: 720px) { .locations { grid-template-columns: repeat(2,1fr); } }

/* =========================================================
   Buttons / arrow links
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--paper);
  background: var(--steel);
  padding: 1rem 1.6rem;
  border: 1px solid var(--steel);
  border-radius: 999px;
  cursor: pointer;
  transition: background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.btn:hover { background: var(--steel-deep); border-color: var(--steel-deep); color: var(--paper); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.section--navy .btn--ghost { color: var(--paper); border-color: rgba(255,255,255,0.4); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.section--navy .btn--ghost:hover { background: var(--paper); color: var(--ink); }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--steel);
  padding: 0.5rem 0;
  border-bottom: 1px solid currentColor;
}
.section--navy .arrow-link { color: var(--steel-soft); }
.arrow-link:hover { color: var(--steel-deep); }
.section--navy .arrow-link:hover { color: var(--paper); }
.arrow-link svg { transition: transform .25s var(--ease); }
.arrow-link:hover svg { transform: translateX(4px); }

/* =========================================================
   Page header (interior pages — slim photo banner)
   ========================================================= */
.page-banner {
  position: relative;
  background-color: var(--navy);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--paper);
  padding: calc(var(--header-h) + clamp(4rem, 7vw, 6rem)) 0 clamp(3rem, 5vw, 4rem);
  min-height: 52vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.page-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,22,40,0.40) 0%, rgba(10,22,40,0.85) 100%);
}
.page-banner .container { position: relative; z-index: 1; }
.page-banner h1 {
  color: var(--paper);
  font-size: clamp(2.5rem, 4.5vw, 4rem);
  max-width: 18ch;
  margin: 0.5rem 0 1rem;
}
.page-banner p {
  color: rgba(255,255,255,0.82);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.4vw, 1.35rem);
  max-width: 50ch;
  line-height: 1.5;
  margin: 0;
}
.page-banner .kicker { color: var(--steel-soft); }
.page-banner .kicker::before { background: var(--steel-soft); }
.page-banner h1 em {
  font-style: italic;
  color: var(--paper);
  font-weight: 400;
}
.page-banner--home {
  min-height: clamp(22rem, 52vh, 34rem);
  background-position: center 55%;
}
.page-banner--research {
  min-height: clamp(22rem, 52vh, 34rem);
  background-position: center 35%;
}
.page-banner--research::before {
  background: linear-gradient(
    105deg,
    rgba(10, 22, 40, 0.88) 0%,
    rgba(10, 22, 40, 0.72) 42%,
    rgba(10, 22, 40, 0.48) 100%
  );
}
.page-banner--write {
  min-height: clamp(22rem, 52vh, 34rem);
  background-position: center 40%;
}
.page-banner--write::before {
  background: linear-gradient(
    105deg,
    rgba(10, 22, 40, 0.92) 0%,
    rgba(10, 22, 40, 0.68) 38%,
    rgba(10, 22, 40, 0.32) 72%,
    rgba(10, 22, 40, 0.18) 100%
  );
}
.page-banner--edit {
  min-height: clamp(22rem, 52vh, 34rem);
  background-position: center 35%;
}
.page-banner--edit::before {
  background: linear-gradient(
    105deg,
    rgba(10, 22, 40, 0.92) 0%,
    rgba(10, 22, 40, 0.68) 38%,
    rgba(10, 22, 40, 0.32) 72%,
    rgba(10, 22, 40, 0.18) 100%
  );
}
.page-banner--admin {
  min-height: clamp(22rem, 52vh, 34rem);
  background-position: center 55%;
}
.page-banner--admin::before {
  background: linear-gradient(
    105deg,
    rgba(10, 22, 40, 0.92) 0%,
    rgba(10, 22, 40, 0.68) 38%,
    rgba(10, 22, 40, 0.32) 72%,
    rgba(10, 22, 40, 0.18) 100%
  );
}
.page-banner--subscribe {
  min-height: clamp(22rem, 52vh, 34rem);
  background-position: center 38%;
}
.page-banner--subscribe::before {
  background: linear-gradient(
    105deg,
    rgba(10, 22, 40, 0.92) 0%,
    rgba(10, 22, 40, 0.68) 38%,
    rgba(10, 22, 40, 0.32) 72%,
    rgba(10, 22, 40, 0.18) 100%
  );
}
.page-banner__meta {
  margin-top: 1.5rem;
  font-family: var(--sans);
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}

/* =========================================================
   Forms
   ========================================================= */
.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.form .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.field input, .field select, .field textarea {
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.95rem 1.05rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  color: var(--ink);
  border-radius: 0;
  transition: border-color .25s var(--ease);
  width: 100%;
  min-width: 0;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0; border-color: var(--steel);
}
@media (max-width: 980px) { .form { grid-template-columns: 1fr; } }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  background: linear-gradient(180deg, var(--citadel) 0%, var(--citadel-deep) 100%);
  border-top: 1px solid rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.66);
  padding: clamp(4rem, 7vw, 6rem) 0 2rem;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.footer-brand .brand-name-1 { color: var(--paper); }
.footer-brand .brand-name-2 { color: rgba(255,255,255,0.55); }
.footer-brand p {
  color: rgba(255,255,255,0.6);
  font-size: 0.92rem;
  max-width: 32ch;
  margin-top: 1.5rem;
  line-height: 1.65;
}
.footer-col h5 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
  margin: 0 0 1.5rem;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.75rem; }
.footer-col a { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer-col a:hover { color: var(--citadel-accent); }
.footer-col button[type="button"] {
  background: none;
  border: none;
  padding: 0;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
}
.footer-col button[type="button"]:hover { color: var(--citadel-accent); }
.footer-disclosure {
  font-size: 0.78rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.5);
  max-width: 100ch;
  margin: 2rem 0 0;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 2rem;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.5);
}
.footer-bottom .legal-links { display: flex; gap: 1.5rem; }
@media (max-width: 880px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-top { grid-template-columns: 1fr; } }

/* =========================================================
   Disclosure modal
   ========================================================= */
.modal {
  position: fixed; inset: 0;
  z-index: 200;
  background: rgba(6,15,30,0.92);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
  opacity: 0; pointer-events: none;
  transition: opacity .35s var(--ease);
}
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal[data-modal="bookmark-group-delete"] { z-index: 210; }
.modal[data-modal="confirm"] { z-index: 220; }
.modal-card {
  background: var(--paper);
  color: var(--ink);
  width: 100%;
  max-width: 760px;
  max-height: 88vh;
  overflow: auto;
  padding: clamp(2rem, 4vw, 3rem);
  transform: translateY(12px);
  transition: transform .4s var(--ease);
}
.modal.is-open .modal-card { transform: translateY(0); }
.modal-card .kicker { margin-bottom: 1rem; }
.modal-card h3 { margin-bottom: 1.5rem; font-size: clamp(1.6rem, 2vw, 2rem); }
.modal-card .scroll-region {
  max-height: 32vh;
  overflow: auto;
  padding-right: 0.75rem;
  margin-bottom: 1.75rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  font-size: 0.92rem;
  color: var(--ink-mute);
  line-height: 1.7;
}
.modal-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.auth-form {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.auth-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--ink-mute);
}
.auth-form input {
  font: inherit;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(10,22,40,0.15);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
}
.auth-form__error {
  margin: 0;
  font-size: 0.85rem;
  color: #9b3b3b;
}

.signup-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}
.signup-progress__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(10, 22, 40, 0.18);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.signup-progress__dot.is-active {
  background: var(--navy);
  transform: scale(1.15);
}
.signup-progress__line {
  width: 2.5rem;
  height: 2px;
  background: rgba(10, 22, 40, 0.12);
}
.signup-step {
  display: none;
  gap: 1rem;
}
.signup-step.is-active {
  display: grid;
}

.password-strength {
  margin-top: 0.4rem;
}
.password-strength__bar {
  height: 3px;
  border-radius: 999px;
  background: rgba(10, 22, 40, 0.1);
  overflow: hidden;
}
.password-strength__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #c44b4b;
  transition: width 0.25s var(--ease), background 0.25s var(--ease);
}
.password-strength--fair .password-strength__fill { background: #c9a227; }
.password-strength--strong .password-strength__fill { background: #3d9b6a; }
.password-strength__hint {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--ink-mute);
}
.password-strength--weak .password-strength__hint { color: #8a5a5a; }
.password-strength--fair .password-strength__hint { color: #8a6d1f; }
.auth-oauth {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(10,22,40,0.08);
}

.modal-card--auth { max-width: 480px; }
.modal-card--confirm { max-width: 480px; }
.confirm-modal__message {
  margin-bottom: 1.75rem;
  color: var(--ink-mute);
  line-height: 1.7;
  font-size: 0.95rem;
}
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(10,22,40,0.1);
}
.auth-tabs__btn {
  flex: 1;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.65rem 0.5rem;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: none;
  color: var(--ink-mute);
  cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.auth-tabs__btn:hover { color: var(--ink); }
.auth-tabs__btn.is-active {
  color: var(--ink);
  border-bottom-color: var(--navy);
}
.auth-panel h3 { margin-bottom: 1.25rem; }
.auth-form__checkbox {
  display: flex !important;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.88rem !important;
  color: var(--ink) !important;
  cursor: pointer;
}
.auth-form__checkbox input {
  margin-top: 0.2rem;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  accent-color: var(--navy);
}
.auth-switch {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-mute);
  text-align: center;
}
.auth-switch__link {
  font: inherit;
  font-size: inherit;
  color: var(--navy);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-switch__link:hover { color: var(--steel); }

.auth-page {
  padding: clamp(5rem, 8vw, 7rem) 0 clamp(4rem, 6vw, 5rem);
}
.auth-page__card {
  max-width: 440px;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 2.75rem);
  background: var(--paper);
  border: 1px solid rgba(10,22,40,0.08);
}
.auth-page__card h1 {
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  margin-bottom: 0.5rem;
}
.auth-page__lede {
  margin-bottom: 2rem;
  color: var(--ink-mute);
  font-size: 0.95rem;
  line-height: 1.6;
}

.account-layout {
  max-width: 640px;
  margin: 0 auto;
}
.account-layout__head h1 {
  margin: 0.35rem 0 0.5rem;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}
.account-form {
  display: grid;
  gap: 2rem;
}
.account-form__section {
  padding: 1.5rem;
  background: var(--paper);
  border: 1px solid rgba(10, 22, 40, 0.08);
}
.account-form__section h2 {
  font-size: 1.2rem;
  margin: 0 0 1rem;
}
.account-form__section textarea {
  font: inherit;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(10, 22, 40, 0.15);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
  min-height: 6rem;
}
.account-form__readonly {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-mute);
}
.account-form__readonly strong {
  display: block;
  margin-top: 0.25rem;
  color: var(--ink);
  font-weight: 500;
}
.account-form__readonly--bio {
  margin-top: 1rem;
}
.account-form__readonly--bio p {
  margin: 0.25rem 0 0;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.6;
  white-space: pre-wrap;
}
.account-form__hint {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-mute);
}
.account-form__meta {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
}
.account-form__meta a {
  color: var(--steel-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.account-form__actions-inline {
  margin: 0.75rem 0 0;
}

/* =========================================================
   Author profile
   ========================================================= */
.profile-layout {
  max-width: 900px;
  margin: 0 auto;
}

.profile-loading,
.profile-error {
  text-align: center;
  color: var(--ink-mute);
  padding: 2rem 0;
}

.profile-page.auth-page {
  padding: calc(var(--header-h) + clamp(2rem, 4vw, 3rem)) 0 clamp(3rem, 5vw, 4rem);
}

.profile-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
  margin-bottom: 0;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.profile-header__avatar-wrap {
  display: grid;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}

.profile-header__avatar-wrap > * {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
}

.profile-header__avatar-wrap--edit {
  width: 80px;
  height: 80px;
}

.profile-avatar {
  border-radius: 50%;
  object-fit: cover;
}

.profile-avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bone);
  color: var(--steel-deep);
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
  border: 1px solid var(--rule);
}

.profile-avatar[hidden],
.profile-avatar--placeholder[hidden] {
  display: none !important;
}

.profile-header__avatar-wrap > img.profile-avatar:not([hidden]) {
  z-index: 1;
}

.profile-header__body {
  min-width: 0;
}

.profile-header__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.profile-header__top h1 {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  margin: 0;
}

.profile-header__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.profile-header__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  margin: 0 0 0.75rem;
}

.profile-stats {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.2;
  color: var(--ink-mute);
}

.profile-stats[hidden],
[data-profile-edit-btn][hidden],
[data-profile-edit-groups-btn][hidden],
[data-profile-new-group-btn][hidden] {
  display: none !important;
}

.profile-stats__link {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.profile-stats__link:hover {
  color: var(--ink);
}

.profile-stats__sep {
  color: var(--rule);
}

[data-profile-follow].is-following {
  background: var(--bone);
  border-color: rgba(10, 22, 40, 0.22);
  color: var(--ink);
}

[data-profile-follow].is-following:hover {
  background: rgba(10, 22, 40, 0.08);
  border-color: var(--ink);
  color: var(--ink);
}

.modal-card--profile-people {
  max-width: 420px;
}

.profile-people-list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  max-height: 42vh;
  overflow: auto;
}

.profile-people-list__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
}

.profile-people-list__item:hover {
  color: var(--steel-deep);
}

.profile-people-list__avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.profile-people-list__avatar--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 22, 40, 0.08);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-mute);
}

.profile-bio {
  margin: 0 0 1rem;
  color: var(--ink-2);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 52ch;
}

.profile-bio[hidden] {
  display: none;
}

.profile-social {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.profile-social:not([hidden])::before {
  content: '·';
  color: var(--rule);
  font-size: 0.92rem;
  line-height: 1;
}

.profile-social__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.15;
  text-decoration: none;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}

.profile-social__link:hover {
  color: var(--steel-deep);
  border-color: var(--steel-soft);
  background: var(--paper);
}

.profile-social__icon {
  flex-shrink: 0;
  width: 0.9rem;
  font-size: 0.88rem;
  line-height: 1;
  text-align: center;
}

.profile-field-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.profile-field-label .fa-brands {
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
}

.profile-social__label {
  line-height: 1;
}

.profile-activity {
  margin: 0;
  padding: 0;
}

.profile-tabs {
  display: flex;
  width: 100%;
  gap: 0;
  margin: 0 0 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.profile-tabs__btn {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.7rem 0.5rem;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: none;
  color: var(--ink-mute);
  cursor: pointer;
  text-align: center;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.profile-tabs__btn[hidden] {
  display: none !important;
}

.profile-tabs__btn:hover { color: var(--ink); }

.profile-tabs__btn.is-active {
  color: var(--ink);
  border-bottom-color: var(--navy);
}

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

.profile-pinned {
  margin-bottom: 1rem;
}

.profile-pinned__label {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.profile-articles {
  display: grid;
  gap: clamp(2rem, 3vw, 2.75rem);
}

.profile-articles .article-card:last-child {
  border-bottom: none;
}

.profile-activity .article-card {
  position: relative;
  padding: 1rem 1.25rem 1.5rem;
  margin: 0 -1.25rem;
  border-radius: 4px;
  transition: background 0.2s var(--ease);
  cursor: pointer;
}

.profile-activity .article-card:hover {
  background: rgba(10, 22, 40, 0.035);
}

.profile-activity .article-card:hover .article-card__cover img {
  transform: none;
}

.profile-activity .article-card__cover img {
  transition: none;
}

.profile-activity .article-card--clickable .article-card__stretch-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 4px;
}

.profile-activity .article-card--clickable .article-card__author {
  position: relative;
  z-index: 2;
}

.profile-activity .article-card--clickable .article-card__cover,
.profile-activity .article-card--clickable .article-card__body {
  pointer-events: none;
}

.profile-activity .article-card--clickable .article-card__author,
.profile-activity .article-card--clickable .article-card__tags {
  pointer-events: auto;
}

.profile-article-row {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr) auto;
  gap: 1rem 1.5rem;
  align-items: baseline;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule);
  transition: color 0.2s var(--ease);
}

.profile-article-row:first-child {
  border-top: 1px solid var(--rule);
}

.profile-article-row:hover {
  color: var(--steel);
}

.profile-article-row__date {
  font-size: 0.82rem;
  color: var(--ink-mute);
  white-space: nowrap;
}

.profile-article-row__title {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  line-height: 1.25;
}

.profile-article-row:hover .profile-article-row__title {
  color: var(--steel);
}

.profile-article-row__meta {
  font-size: 0.8rem;
  color: var(--ink-mute);
  white-space: nowrap;
}

.profile-activity .feed-empty {
  border-style: solid;
  border-color: rgba(10, 22, 40, 0.08);
  background: var(--paper);
  padding: 2rem 1.5rem;
}

.profile-comments {
  display: flex;
  flex-direction: column;
}

.profile-comment-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule);
  transition: color 0.2s var(--ease);
}

.profile-comment-row:hover {
  color: var(--steel);
}

.profile-comment-row__cover {
  flex-shrink: 0;
  width: 4.75rem;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 2px;
  background: var(--navy-2);
}

.profile-comment-row__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-comment-row__content {
  flex: 1;
  min-width: 0;
}

.profile-comment-row__meta {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  color: var(--ink-mute);
}

.profile-comment-row__article {
  font-weight: 500;
  color: var(--ink);
}

.profile-comment-row:hover .profile-comment-row__article {
  color: var(--steel);
}

.profile-comment-row__body {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.45;
  color: var(--ink-2);
}

.profile-bookmark-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.profile-bookmark-toolbar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
  width: 100%;
}

.profile-bookmark-filter {
  flex: 0 1 12rem;
  max-width: 14rem;
  min-width: 0;
}

.bookmark-groups-edit {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  max-height: min(18rem, 50vh);
  overflow-y: auto;
}

.bookmark-groups-edit__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--rule);
}

.bookmark-groups-edit__row:last-child {
  border-bottom: none;
}

.bookmark-groups-edit__name {
  font-size: 0.92rem;
  color: var(--ink);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-bookmarks {
  display: grid;
  gap: clamp(1.5rem, 2.5vw, 2rem);
}

.profile-bookmark-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem 1rem;
  align-items: start;
  padding: 1rem 1.25rem;
  margin: 0 -1.25rem;
  border-radius: 4px;
  border-bottom: none;
  transition: background 0.2s var(--ease);
}

.profile-bookmark-row:hover {
  background: rgba(10, 22, 40, 0.035);
}

.profile-bookmark-row .article-card {
  padding: 0;
  margin: 0;
  border-bottom: none;
}

.profile-bookmark-row .article-card:hover {
  background: transparent;
}

.profile-bookmark-row select {
  position: relative;
  z-index: 2;
  font: inherit;
  font-size: 0.82rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  max-width: 11rem;
}

.profile-bookmark-section {
  margin-bottom: 1.5rem;
}

.profile-bookmark-section__title {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.profile-edit__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.profile-edit__head h2 {
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  margin: 0;
}

.profile-form {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr 1fr;
  padding: clamp(1.5rem, 3vw, 2rem);
  background: var(--paper);
  border: 1px solid rgba(10, 22, 40, 0.08);
}

.profile-form .full {
  grid-column: 1 / -1;
}

.profile-form label.field > span {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.profile-form__avatar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-bottom: 1rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--rule);
}

.profile-form__avatar-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.profile-avatar-remove {
  padding: 0.15rem 0.45rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink-mute);
  cursor: pointer;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}

.profile-avatar-remove:hover {
  color: #9b3b3b;
  background: rgba(196, 75, 75, 0.08);
}

.profile-upload {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  cursor: pointer;
}

.profile-upload > span {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.profile-upload small {
  font-size: 0.82rem;
  color: var(--ink-mute);
}

.profile-upload input[type="file"] {
  font-size: 0.88rem;
  margin-top: 0.25rem;
}

.profile-form__actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.footer-bottom--minimal {
  border: none;
  padding-top: 0;
}

@media (max-width: 640px) {
  .profile-header {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-header__avatar-wrap {
    margin: 0 auto;
  }

  .profile-header__top {
    flex-direction: column;
    align-items: center;
  }

  .profile-bio {
    max-width: none;
  }

  .profile-header__meta {
    justify-content: center;
  }

  .profile-social {
    justify-content: center;
  }

  .profile-article-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .profile-form {
    grid-template-columns: 1fr;
  }

  .profile-form__avatar {
    flex-direction: column;
    text-align: center;
  }
}

/* =========================================================
   Reveal
   ========================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* =========================================================
   Article feed (home)
   ========================================================= */
.article-feed {
  padding: clamp(3rem, 5vw, 4.5rem) 0 clamp(4rem, 6vw, 5rem);
}

.article-feed--subscribe {
  padding: clamp(2rem, 3vw, 2.5rem) 0 0;
  margin-top: clamp(1.5rem, 2.5vw, 2rem);
  border-top: 1px solid var(--rule);
}

.article-feed--archive {
  padding-top: clamp(2rem, 3vw, 2.5rem);
  border-top: 1px solid var(--rule);
}

[data-professional-current] + [data-professional-archive].article-feed--archive {
  border-top: none;
  padding-top: clamp(1.5rem, 2.5vw, 2rem);
}

.article-feed--archive .feed-toolbar {
  margin-bottom: clamp(1.25rem, 2vw, 1.75rem);
  padding-bottom: 0;
  border-bottom: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.feed-toolbar {
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
  padding-bottom: clamp(1.25rem, 2vw, 1.75rem);
  border-bottom: 1px solid var(--rule);
}

.feed-toolbar__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.feed-search {
  flex: 1 1 220px;
  min-width: 0;
}

.feed-search input,
.feed-sort select {
  width: 100%;
  font: inherit;
  font-size: 0.92rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(10, 22, 40, 0.14);
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
}

.feed-sort {
  flex: 0 0 auto;
  min-width: 10.5rem;
}

.feed-topic {
  flex: 0 1 14rem;
  min-width: 10.5rem;
  position: relative;
}

.feed-topic__combo {
  position: relative;
}

.feed-topic__input {
  width: 100%;
  font: inherit;
  font-size: 0.92rem;
  padding: 0.65rem 2rem 0.65rem 0.85rem;
  border: 1px solid rgba(10, 22, 40, 0.14);
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
}

.feed-topic__input:focus {
  outline: none;
  border-color: var(--steel);
}

.feed-topic__clear {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.5rem;
  height: 1.5rem;
  border: none;
  border-radius: 2px;
  background: transparent;
  color: var(--ink-mute);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.feed-topic__clear:hover {
  color: var(--ink);
  background: rgba(10, 22, 40, 0.06);
}

.feed-topic__list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  max-height: 16rem;
  overflow-y: auto;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  border: 1px solid rgba(10, 22, 40, 0.12);
  border-radius: 4px;
  background: var(--paper);
  box-shadow: 0 8px 28px rgba(10, 22, 40, 0.1);
}

.feed-topic__option {
  padding: 0.5rem 0.85rem;
  font-size: 0.88rem;
  color: var(--ink);
  cursor: pointer;
}

.feed-topic__option.is-active,
.feed-topic__option:hover {
  background: rgba(10, 22, 40, 0.05);
}

.feed-topic__option.is-selected {
  color: var(--steel-deep);
  font-weight: 500;
}

.feed-topic__empty {
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  color: var(--ink-mute);
}

.article-feed__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  flex-wrap: wrap;
}

.article-feed__head h2 {
  margin: 0.35rem 0 0;
  max-width: 20ch;
}

.article-feed__grid {
  display: grid;
  gap: clamp(2rem, 3vw, 2.75rem);
}

.feed-more {
  display: flex;
  justify-content: center;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: clamp(1rem, 2vw, 1.5rem);
}

.feed-more[hidden] {
  display: none;
}

.article-card {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
  padding-bottom: clamp(2rem, 3vw, 2.75rem);
  border-bottom: 1px solid var(--rule);
  align-items: start;
}

.article-feed .article-card {
  margin-inline: -0.75rem;
  padding: clamp(0.85rem, 1.5vw, 1.1rem) 0.75rem;
  padding-bottom: clamp(2rem, 3vw, 2.75rem);
  border-radius: 4px;
  transition: background 0.2s var(--ease);
}

.article-feed .article-card--clickable {
  position: relative;
  cursor: pointer;
}

.article-feed .article-card--clickable .article-card__stretch-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 4px;
}

.article-feed .article-card--clickable .article-card__cover,
.article-feed .article-card--clickable .article-card__body {
  pointer-events: none;
}

.article-feed .article-card--clickable .article-card__author,
.article-feed .article-card--clickable .article-card__engage,
.article-feed .article-card--clickable .article-card__tags {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.article-feed .article-card__delete {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 3;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #b42318;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(10, 22, 40, 0.12);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}

.article-feed .article-card__delete:hover {
  background: #b42318;
  color: #fff;
  transform: scale(1.05);
}

.article-feed .article-card:hover {
  background: rgba(10, 22, 40, 0.035);
}

.article-feed .article-card__cover img {
  transition: none;
}

.article-feed .article-card:hover .article-card__cover img {
  transform: none;
}

.article-card__cover {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 2px;
  background: var(--navy-2);
}

.article-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.article-card:hover .article-card__cover img {
  transform: scale(1.03);
}

.article-card__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
  font-size: 0.82rem;
}

.article-card__author {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 500;
  color: var(--ink);
}

.article-card__author:hover {
  color: var(--steel);
}

.article-card__avatar-wrap {
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
}

.article-card__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.article-card__avatar--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 22, 40, 0.08);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink-mute);
}

.article-card__author-name {
  line-height: 1.2;
}

.article-card__badge {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel-deep);
}

.article-card__badge--locked {
  color: var(--ink-mute);
}

.article-card__date {
  color: var(--ink-mute);
}

.article-card__author + .article-card__date::before,
.article-card__badge + .article-card__date::before {
  content: "·";
  margin-right: 0.75rem;
  color: var(--rule);
}

.article-card__title {
  font-size: clamp(1.55rem, 2.2vw, 2rem);
  margin: 0 0 0.5rem;
  line-height: 1.15;
}

.article-feed .article-card--clickable:hover .article-card__title {
  color: var(--steel);
}

.article-card__subtitle {
  margin: 0 0 1rem;
  color: var(--ink-mute);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 58ch;
}

.article-card__stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  font-size: 0.8rem;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
}

.article-card__engage {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.article-card__engage-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.8rem;
  color: var(--ink-mute);
  cursor: pointer;
  transition: color 0.2s var(--ease);
}

.article-card__engage-btn:hover {
  color: var(--ink);
}

.article-card__engage-btn.is-liked {
  color: #c44b4b;
}

.article-card__engage-btn.is-bookmarked {
  color: var(--ink);
}

.article-card__engage-btn i {
  font-size: 0.92rem;
}

.article-card__engage-stat {
  color: var(--ink-mute);
}

.article-card__tags {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.article-card__stats .article-tag {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
}

.article-tag--link {
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}

.article-tag--link:hover {
  border-color: var(--steel-deep);
  background: rgba(58, 90, 120, 0.1);
  color: var(--steel-deep);
}

.article-card--clickable .article-card__tags {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

@media (max-width: 640px) {
  .article-card__tags {
    margin-left: 0;
    width: 100%;
  }

  .feed-toolbar__row {
    flex-direction: column;
    align-items: stretch;
  }

  .feed-topic,
  .feed-sort {
    flex: 1 1 auto;
    min-width: 0;
  }
}

.feed-empty,
.feed-error {
  text-align: center;
  padding: 3rem 1.5rem;
  border: 1px dashed var(--rule);
  border-radius: 2px;
  color: var(--ink-mute);
}

.feed-empty h3,
.feed-error h3 {
  margin-bottom: 0.5rem;
  color: var(--ink);
}

/* =========================================================
   Write dashboard & editor
   ========================================================= */
.write-dashboard {
  padding: clamp(3rem, 5vw, 4.5rem) 0 clamp(4rem, 6vw, 5rem);
}

/* =========================================================
   Admin dashboard
   ========================================================= */
.admin-dashboard {
  padding: clamp(3rem, 5vw, 4.5rem) 0 clamp(4rem, 6vw, 5rem);
}
.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: clamp(2.5rem, 4vw, 3.5rem);
}
.admin-metric {
  padding: 1.5rem 1.35rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--paper);
}
.admin-metric__label {
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 0.65rem;
}
.admin-metric__value {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  line-height: 1;
  color: var(--ink);
}
.admin-metric__delta {
  margin: 0.75rem 0 0;
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--steel);
  line-height: 1.45;
}
.admin-section {
  margin-bottom: clamp(2.5rem, 4vw, 3.5rem);
}
.admin-section__head {
  margin-bottom: 1.5rem;
}
.admin-section__head h2 {
  margin: 0.35rem 0 0.5rem;
}
.admin-section__lede {
  margin: 0;
  max-width: 52ch;
  color: var(--ink-mute);
  font-size: 0.95rem;
  line-height: 1.55;
}
.admin-stats {
  margin: 0;
}
.admin-section--split {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}
.admin-section__panel {
  padding: clamp(1.5rem, 2.5vw, 2rem);
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--paper);
}
.admin-chart {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.65rem;
  align-items: end;
  min-height: 220px;
  padding-top: 1.5rem;
}
.admin-chart__bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  height: 180px;
}
.admin-chart__fill {
  display: block;
  width: 100%;
  max-width: 2.4rem;
  height: var(--bar-height, 20%);
  min-height: 0.35rem;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, var(--steel) 0%, rgba(74, 108, 140, 0.55) 100%);
}
.admin-chart__value {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink);
}
.admin-chart__label {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  text-align: center;
}
.admin-role-list {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.admin-role-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--ink-mute);
}
.admin-role-list strong {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--ink);
}
.admin-queue {
  padding-top: 0.25rem;
}
.admin-queue__label {
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 0.45rem;
}
.admin-queue__value {
  margin: 0 0 0.85rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink);
}
@media (max-width: 980px) {
  .admin-metrics { grid-template-columns: repeat(2, 1fr); }
  .admin-section--split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .admin-metrics { grid-template-columns: 1fr; }
  .admin-chart {
    grid-template-columns: repeat(4, 1fr);
    row-gap: 1rem;
  }
}
.write-dashboard__guest {
  display: flex;
  justify-content: center;
}
.write-dashboard__guest[hidden],
.write-dashboard__unverified[hidden],
.write-dashboard__author[hidden] {
  display: none !important;
}
.write-panel {
  max-width: 720px;
  padding: clamp(1.5rem, 3vw, 2rem);
  background: var(--paper);
  border: 1px solid rgba(10,22,40,0.08);
}
.write-panel--cta {
  max-width: 36rem;
  text-align: center;
}
.write-panel--cta h2 {
  margin: 0 0 0.75rem;
}
.write-panel__lede {
  color: var(--ink-mute);
  max-width: 36ch;
}
.write-panel--cta .write-panel__lede {
  margin: 0 auto;
}
.write-panel--cta .write-panel__actions {
  justify-content: center;
  margin-top: 1.5rem;
}
.write-panel h2 {
  margin: 0.5rem 0 1rem;
  font-size: clamp(1.6rem, 2.5vw, 2rem);
}
.write-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}
.write-dashboard__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.write-dashboard__head h2 {
  margin: 0.35rem 0 0.5rem;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}
.write-dashboard__lede {
  margin: 0;
  color: var(--ink-mute);
  max-width: 52ch;
}
.write-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}
.write-tabs__btn {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.65rem 1.1rem;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: none;
  color: var(--ink-mute);
  cursor: pointer;
}
.write-tabs__btn.is-active {
  color: var(--ink);
  border-bottom-color: var(--navy);
}
.write-feed { min-height: 12rem; }
.write-feed .article-card:hover .article-card__cover img {
  transform: none;
}
.write-feed .article-card__cover img {
  transition: none;
}
.write-loading {
  text-align: center;
  color: var(--ink-mute);
  padding: 2rem 0;
}
.write-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
}
.write-status--draft {
  color: #6b4f1d;
  background: rgba(180, 140, 60, 0.14);
}
.write-status--submitted {
  color: #1a3d6b;
  background: rgba(60, 110, 180, 0.14);
}
.write-status--revisions {
  color: #7a4a12;
  background: rgba(200, 130, 40, 0.16);
}
.write-status--published {
  color: #1d4d38;
  background: rgba(60, 140, 100, 0.14);
}
.write-status--research {
  color: #2f4a66;
  background: rgba(58, 90, 120, 0.12);
}

.write-status--archived {
  color: #6b2d2d;
  background: rgba(180, 70, 70, 0.14);
}
.write-dashboard__head--spaced {
  margin-top: 3rem;
}
.write-card__hint {
  font-size: 0.82rem;
  color: var(--ink-mute);
}
.write-dashboard__editor {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(10, 22, 40, 0.08);
}
.write-editor__status-banner {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  line-height: 1.45;
  border-radius: 6px;
  color: #1a3d6b;
  background: rgba(60, 110, 180, 0.1);
}
.write-editor__status-banner[data-status="published"] {
  color: #1d4d38;
  background: rgba(60, 140, 100, 0.1);
}
.write-editor__status-banner[data-status="archived"] {
  color: #6b2d2d;
  background: rgba(180, 70, 70, 0.1);
}
.write-editor__feedback-link {
  margin-left: 0.15rem;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: inherit;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.write-editor__feedback-link:hover {
  color: var(--steel-deep);
}
.write-editor__feedback-body {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
}
.write-editor--readonly .medium-editor,
.write-editor--readonly [data-editor-title],
.write-editor--readonly [data-editor-subtitle],
.write-editor--readonly [data-editor-cover-area] {
  pointer-events: none;
  opacity: 0.72;
}
.write-editor--readonly .medium-editor .med-block__issue-tools,
.write-editor--readonly .medium-editor .med-block__issue,
.write-editor--readonly .medium-editor .editorial-issue-mark,
.write-card__placeholder {
  font-style: italic;
  opacity: 0.75;
}
.write-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.25rem;
}
.write-card__delete {
  color: #9b3b3b;
}
.write-card__delete:hover:not(:disabled) {
  color: #7a2e2e;
  border-color: rgba(155, 59, 59, 0.35);
}
.btn--sm {
  font-size: 0.82rem;
  padding: 0.5rem 0.9rem;
}

.write-editor {
  padding: clamp(5rem, 8vw, 7rem) 0 clamp(4rem, 6vw, 5rem);
}
.write-editor__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.write-editor__back {
  font-size: 0.9rem;
  color: var(--ink-mute);
}
.write-editor__back:hover { color: var(--ink); }
.write-editor__top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.write-editor__status {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--ink-mute);
}
.write-editor__status--error { color: #9b3b3b; }
.write-editor__layout {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}
.write-editor__cover-wrap {
  display: block;
  cursor: pointer;
  margin-bottom: 1.25rem;
}
.write-editor__cover-label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--steel);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.write-editor__field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: var(--ink-mute);
}
.write-editor__field input,
.write-editor__field select,
.write-editor__field textarea {
  font: inherit;
  font-family: var(--sans);
  font-size: 0.92rem;
  line-height: 1.5;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(10, 22, 40, 0.15);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
}
.write-editor__field textarea {
  min-height: 6.5rem;
  resize: vertical;
}
.write-editor__field input:focus,
.write-editor__field select:focus,
.write-editor__field textarea:focus {
  outline: none;
  border-color: var(--steel);
}
.write-editor__body-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.write-editor__body-head h2 {
  margin: 0;
  font-size: 1.35rem;
}
.write-editor__body-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.write-blocks {
  display: grid;
  gap: 1rem;
}
.write-editor__empty-blocks {
  margin: 0;
  padding: 1.25rem;
  border: 1px dashed var(--rule);
  color: var(--ink-mute);
  font-size: 0.92rem;
}
.write-block {
  border: 1px solid rgba(10,22,40,0.1);
  border-radius: 4px;
  background: var(--paper);
  overflow: hidden;
}
.write-block__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0.65rem;
  background: rgba(10,22,40,0.03);
  border-bottom: 1px solid rgba(10,22,40,0.08);
}
.write-block__type {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.write-block__actions { display: flex; gap: 0.25rem; }
.write-block__btn {
  font: inherit;
  font-size: 0.78rem;
  padding: 0.2rem 0.45rem;
  border: 1px solid rgba(10,22,40,0.12);
  border-radius: 3px;
  background: var(--bone);
  cursor: pointer;
}
.write-block__btn:disabled { opacity: 0.4; cursor: not-allowed; }
.write-block__btn--danger { color: #9b3b3b; }
.write-block__input {
  display: block;
  width: 100%;
  font: inherit;
  line-height: 1.6;
  padding: 0.85rem;
  border: none;
  resize: vertical;
  min-height: 4.5rem;
  background: transparent;
  color: var(--ink);
}
@media (max-width: 900px) {
  .write-editor__layout { grid-template-columns: 1fr; }
}

/* Medium-style article editor */
.write-editor--medium {
  padding-top: calc(var(--header-h) + 2rem);
}
.write-editor__canvas {
  width: min(100%, 740px);
  max-width: 740px;
  margin-inline: auto;
  overflow-x: clip;
}
.write-editor--medium [data-editor-panel] {
  min-width: 0;
}
.write-editor--medium [data-medium-editor] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.write-editor__action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(10, 22, 40, 0.08);
}
.write-editor__action-bar .write-editor__back {
  flex: 0 0 auto;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-mute);
  text-decoration: none;
  white-space: nowrap;
}
.write-editor__action-bar .write-editor__back:hover {
  color: var(--ink);
}
.write-editor__role-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  white-space: nowrap;
  padding: 0.2rem 0.45rem;
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: 999px;
}
.write-editor__action-bar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem 0.65rem;
  margin-left: auto;
  min-width: 0;
}
.write-editor__action-history {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.write-editor__action-history .editor-save-status {
  margin-right: 0.1rem;
}
.write-editor__action-history[hidden] {
  display: none !important;
}
.editor-history-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 1.85rem;
  padding: 0 0.55rem;
  border: 1px solid rgba(10, 22, 40, 0.12);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 0.78rem;
  color: var(--ink-mute);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.editor-history-btn:hover:not(:disabled) {
  color: var(--ink);
  border-color: rgba(10, 22, 40, 0.22);
  background: rgba(255, 255, 255, 0.95);
}
.editor-history-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.editor-history-btn i {
  font-size: 0.78rem;
}
.write-editor-sticky__group--meta .editor-history-btn {
  min-width: 0;
  background: #fff;
}
.write-editor-sticky__tools .editor-history-btn {
  height: 2rem;
  font-size: 0.82rem;
}
.write-editor--readonly .write-editor__action-history {
  display: none !important;
}
.write-editor-sticky {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 55;
  padding: 0.45rem 0;
  background: rgba(250, 247, 241, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(10, 22, 40, 0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), visibility 0.2s var(--ease);
}
.write-editor-sticky[hidden] {
  display: none !important;
}
.write-editor-sticky.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.write-editor-sticky__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 0.85rem;
  min-height: 2.35rem;
}
.write-editor-sticky__issues {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}
.write-editor-sticky__tools {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  flex: 1 1 auto;
  min-width: 0;
}
.write-editor-sticky__tools-history,
.write-editor-sticky__tools-write,
.write-editor-sticky__tools-review {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}
.write-editor-sticky__tools-history[hidden],
.write-editor-sticky__tools-write[hidden],
.write-editor-sticky__tools-review[hidden] {
  display: none !important;
}
.write-editor-sticky__group--meta .editor-save-status {
  margin-right: 0.15rem;
}
.write-editor-sticky__group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding-right: 0.5rem;
  border-right: 1px solid rgba(10, 22, 40, 0.1);
}
.write-editor-sticky__group:last-child {
  padding-right: 0;
  border-right: none;
}
.write-editor-sticky__color {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  border: 1px solid rgba(10, 22, 40, 0.12);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
}
.write-editor-sticky__color input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
  padding: 0;
}
.write-editor-sticky__color:has(input:disabled) {
  opacity: 0.38;
  cursor: not-allowed;
}
.write-editor-sticky__color-swatch {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  pointer-events: none;
}
.write-editor-sticky__color-swatch--highlight {
  font-size: 0.72rem;
  color: #b8860b;
}
.write-editor-sticky__tools button {
  font: inherit;
  font-size: 0.82rem;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border: 1px solid rgba(10, 22, 40, 0.12);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease);
}
.write-editor-sticky__tools button:hover:not(:disabled) {
  border-color: rgba(10, 22, 40, 0.22);
  background: rgba(255, 255, 255, 0.98);
}
.write-editor-sticky__tools button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.write-editor-sticky__tools button.is-active {
  border-color: rgba(74, 107, 138, 0.35);
  background: rgba(74, 107, 138, 0.1);
  color: var(--steel-deep);
}
.write-editor--readonly .write-editor-sticky__tools,
.write-editor--review .write-editor-sticky__tools,
[data-editor-sticky-toolbar][hidden] {
  display: none !important;
}
@media (max-width: 640px) {
  .write-editor-sticky {
    padding: 0.35rem 0;
  }
  .write-editor-sticky__inner {
    justify-content: flex-start;
    padding-top: 0.15rem;
  }
  .write-editor-sticky__issues {
    position: static;
    transform: none;
    width: 100%;
    margin-bottom: 0.15rem;
  }
  .write-editor-sticky__tools-write {
    justify-content: flex-start;
  }
  .write-editor-sticky__group {
    padding-right: 0.35rem;
  }
  .write-editor-sticky__tools button {
    min-width: 1.85rem;
    height: 1.85rem;
    font-size: 0.78rem;
  }
  .write-editor-sticky__color {
    min-width: 1.85rem;
    height: 1.85rem;
  }
}
.write-editor__issues-btn {
  appearance: none;
  border: 1px solid rgba(10, 22, 40, 0.12);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.write-editor__issues-btn:hover {
  border-color: rgba(180, 120, 40, 0.45);
  background: #fffaf2;
}
.write-editor__issues-btn span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  margin-left: 0.35rem;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: rgba(220, 170, 60, 0.2);
  color: #9a5b12;
}
.modal-card--issues-list {
  max-width: 520px;
  width: min(520px, calc(100vw - 2rem));
}
.issues-list__summary {
  margin: 0 0 1rem;
  color: var(--ink-mute);
  font-size: 0.9rem;
  line-height: 1.45;
}
.issues-list__scroll {
  max-height: min(58vh, 28rem);
  overflow: auto;
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1rem;
  padding-right: 0.15rem;
}
.issues-list__empty {
  margin: 0;
  color: var(--ink-mute);
  font-size: 0.9rem;
}
.issues-list__section {
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}
.issues-list__section-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--ink);
}
.issues-list__section-summary::-webkit-details-marker { display: none; }
.issues-list__section-leading {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.issues-list__section-chevron {
  flex-shrink: 0;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.55;
  transition: transform 0.2s var(--ease), margin 0.2s var(--ease);
}
.issues-list__section[open] .issues-list__section-chevron {
  transform: rotate(-135deg);
  margin-top: 0.2rem;
}
.issues-list__section-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.issues-list__section-count {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #9a5b12;
  background: rgba(220, 170, 60, 0.18);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}
.issues-list__section-items {
  display: grid;
  gap: 0.5rem;
  padding: 0 0.65rem 0.65rem;
}
.issues-list__item {
  border: 1px solid rgba(10, 22, 40, 0.08);
  border-radius: 0.5rem;
  background: var(--paper);
  padding: 0.75rem;
}
.issues-list__item.is-resolved {
  opacity: 0.78;
}
.issues-list__item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.45rem;
}
.issues-list__item-label {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-2);
  font-style: italic;
  line-height: 1.35;
}
.issues-list__item-status {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.issues-list__item:not(.is-resolved) .issues-list__item-status {
  color: #9a5b12;
}
.issues-list__item-comment {
  margin: 0 0 0.45rem;
  line-height: 1.45;
  color: var(--ink);
}
.issues-list__item-meta {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  color: var(--ink-mute);
}
.issues-list__item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.modal-card--revision-item {
  max-width: 520px;
  width: min(520px, calc(100vw - 2rem));
}
.revision-item__status {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.revision-item__status.is-open { color: #9a5b12; }
.revision-item__quote {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.85rem;
  border-left: 3px solid rgba(180, 120, 40, 0.45);
  font-family: var(--serif);
  font-size: 1rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--ink-2);
}
.revision-item__comment {
  margin: 0 0 0.65rem;
  line-height: 1.55;
  color: var(--ink);
}
.revision-item__meta {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  color: var(--ink-mute);
}
.med-block.is-issue-target,
.editorial-issue-mark.is-issue-target {
  outline: 2px solid rgba(220, 170, 60, 0.85);
  outline-offset: 3px;
  transition: outline-color 0.2s var(--ease);
}
.editorial-issue-mark {
  background: rgba(220, 170, 60, 0.35);
  border-radius: 0.15rem;
  cursor: pointer;
}
.editorial-issue-mark.is-resolved {
  background: rgba(60, 140, 100, 0.22);
}
.medium-editor__toolbar-review button,
.write-editor-sticky__tools-review button {
  min-width: 5.5rem;
}
.editor-decision__hint,
.editor-issue__quote {
  color: var(--ink-mute);
  line-height: 1.5;
}
.editor-decision__field {
  margin-top: 0.5rem;
}
.write-editor__action-bar-right .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.125rem;
  box-sizing: border-box;
  line-height: 1.2;
  font-family: var(--sans);
  text-decoration: none;
  white-space: nowrap;
}
.write-editor__action-bar-right .btn[hidden] {
  display: none !important;
}
.write-editor__action-bar-right button.btn {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
}
.write-editor__action-bar-right button.btn[data-editor-publish].is-idle,
.write-editor__action-bar-right button.btn[data-editor-publish]:disabled {
  cursor: default;
  pointer-events: none;
  background: rgba(46, 42, 38, 0.07);
  color: var(--ink-mute);
  border: 1px solid rgba(46, 42, 38, 0.1);
  box-shadow: none;
}
.editor-save-status {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  white-space: nowrap;
}
.editor-save-status[data-status="saved"] { color: var(--ink-mute); }
.editor-save-status[data-status="unsaved"] { color: #9a7b2e; }
.editor-save-status[data-status="saving"] { color: var(--ink-2); }
.editor-save-status[data-status="error"] { color: #9b3b3b; }
@media (max-width: 600px) {
  .write-editor__action-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .write-editor__action-bar-right {
    justify-content: flex-start;
    margin-left: 0;
    width: 100%;
  }
}
.write-editor__title-input {
  display: block;
  width: 100%;
  margin: 1.5rem 0 0.5rem;
  padding: 0;
  border: none;
  background: transparent;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--ink);
  outline: none;
}
.write-editor__title-input::placeholder { color: rgba(10, 22, 40, 0.28); }
.write-editor__subtitle-input {
  display: block;
  width: 100%;
  margin-bottom: 2rem;
  padding: 0;
  border: none;
  background: transparent;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-style: italic;
  line-height: 1.4;
  color: var(--ink-mute);
  outline: none;
}
.write-editor__subtitle-input::placeholder { color: rgba(92, 101, 119, 0.5); }
.write-editor__pdf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.75rem 0 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: 2px;
  background: rgba(244, 240, 232, 0.35);
}
.write-editor__pdf-head {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.write-editor__pdf-label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.write-editor__pdf-name {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.write-editor__pdf-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.write-editor__cover {
  position: relative;
  margin-bottom: 0.5rem;
}
.write-editor__cover:not(.has-cover) {
  margin-bottom: 0;
}
.write-editor__cover-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px dashed rgba(10, 22, 40, 0.18);
  border-radius: 2px;
  background: rgba(244, 240, 232, 0.45);
  color: rgba(92, 101, 119, 0.55);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}
.write-editor__cover-placeholder:hover {
  border-color: rgba(10, 22, 40, 0.28);
  background: rgba(244, 240, 232, 0.7);
  color: var(--ink-mute);
}
.write-editor__cover-placeholder-text {
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.write-editor__cover-placeholder[hidden] {
  display: none !important;
}
.write-editor__cover-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 2px;
  cursor: pointer;
}
.write-editor__cover-img[hidden],
.write-editor__cover:not(.has-cover) .write-editor__cover-img {
  display: none !important;
}
.write-editor__cover-tools {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.write-editor__cover:not(.has-cover) .write-editor__cover-tools {
  display: none;
}
.write-editor__cover-remove,
.write-editor__cover-edit {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-mute);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(10, 22, 40, 0.18);
  pointer-events: auto;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.write-editor__cover-remove {
  top: 0.65rem;
  right: 0.65rem;
  font-size: 1.15rem;
  line-height: 1;
}
.write-editor__cover-edit {
  right: 0.65rem;
  bottom: 0.65rem;
}
.write-editor__cover-remove:hover,
.write-editor__cover-edit:hover {
  color: var(--ink);
  background: #fff;
  border-color: rgba(10, 22, 40, 0.15);
}
.write-editor__cover-remove:hover { color: #9b3b3b; }

.medium-editor { position: relative; }
.medium-editor__blocks {
  display: grid;
  gap: 0.65rem;
  min-width: 0;
}
.med-block-wrap {
  display: grid;
  grid-template-columns: 1.9rem minmax(0, 1fr) 1.9rem;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}
.med-block-wrap > .med-block {
  grid-column: 2;
}
.med-block-wrap:hover .med-block__controls,
.med-block-wrap:focus-within .med-block__controls {
  opacity: 1;
}
.medium-editor__toolbar[hidden] {
  display: none !important;
}
.medium-editor__toolbar {
  position: absolute;
  z-index: 50;
  display: flex;
  gap: 0.15rem;
  padding: 0.3rem;
  background: var(--navy);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(6, 15, 30, 0.2);
}
.medium-editor__toolbar button {
  font: inherit;
  font-size: 0.85rem;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.45rem;
  border: none;
  border-radius: 3px;
  background: transparent;
  color: var(--bone);
  cursor: pointer;
}
.medium-editor__toolbar button:hover { background: rgba(255, 255, 255, 0.1); }

.med-block {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(10, 22, 40, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 1px 2px rgba(10, 22, 40, 0.04);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s var(--ease);
}
.med-block::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0.55;
  background:
    linear-gradient(90deg, rgba(74, 107, 138, 0.45) 10px, transparent 10px) 0 0 / 10px 2px no-repeat,
    linear-gradient(180deg, rgba(74, 107, 138, 0.45) 10px, transparent 10px) 0 0 / 2px 10px no-repeat,
    linear-gradient(270deg, rgba(74, 107, 138, 0.45) 10px, transparent 10px) 100% 0 / 10px 2px no-repeat,
    linear-gradient(180deg, rgba(74, 107, 138, 0.45) 10px, transparent 10px) 100% 0 / 2px 10px no-repeat,
    linear-gradient(90deg, rgba(74, 107, 138, 0.45) 10px, transparent 10px) 0 100% / 10px 2px no-repeat,
    linear-gradient(0deg, rgba(74, 107, 138, 0.45) 10px, transparent 10px) 0 100% / 2px 10px no-repeat,
    linear-gradient(270deg, rgba(74, 107, 138, 0.45) 10px, transparent 10px) 100% 100% / 10px 2px no-repeat,
    linear-gradient(0deg, rgba(74, 107, 138, 0.45) 10px, transparent 10px) 100% 100% / 2px 10px no-repeat;
}
.med-block:hover,
.med-block.is-focused {
  border-color: rgba(10, 22, 40, 0.22);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 3px rgba(74, 107, 138, 0.08), 0 2px 6px rgba(10, 22, 40, 0.06);
}
.med-block:hover::before,
.med-block.is-focused::before { opacity: 0.85; }
.med-block__controls {
  display: flex;
  justify-content: center;
  align-self: center;
  opacity: 0;
  transition: opacity 0.15s var(--ease);
}
.med-block__controls--move {
  grid-column: 1;
  flex-direction: column;
  gap: 0.09rem;
}
.med-block__controls--remove {
  grid-column: 3;
}
.med-block__ctrl {
  font: inherit;
  font-size: 0.63rem;
  width: 1.3rem;
  height: 1.18rem;
  padding: 0;
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink-mute);
  cursor: pointer;
  line-height: 1;
}
.med-block__ctrl:hover { color: var(--ink); border-color: rgba(10, 22, 40, 0.2); }
.med-block__ctrl:disabled { opacity: 0.35; cursor: not-allowed; }
.med-block__ctrl--danger:hover { color: #9b3b3b; }

.med-block__paragraph,
.med-block__heading {
  outline: none;
  min-height: 1.6em;
  line-height: 1.75;
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--ink);
}
.med-block__paragraph:empty::before,
.med-block__heading:empty::before {
  content: attr(data-placeholder);
  color: rgba(92, 101, 119, 0.45);
  pointer-events: none;
}
.med-block__heading--h2 {
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 500;
  line-height: 1.25;
  margin: 0.75rem 0 0.25rem;
}
.med-block__heading--h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.45rem);
  font-weight: 500;
  line-height: 1.3;
  margin: 0.5rem 0 0.15rem;
}
.med-block__paragraph a { color: var(--steel-deep); text-decoration: underline; }
.med-block__paragraph u,
.med-block__paragraph s,
.med-block__paragraph strike,
.med-block__paragraph del { text-decoration-thickness: from-font; }

/* Rich blocks — modal edit, rendered preview */
.med-block--rich {
  padding-bottom: 2.5rem;
  cursor: default;
}
.med-block--rich.med-block--empty .med-block__preview {
  cursor: pointer;
}
.med-block__preview {
  min-height: 3.5rem;
  font-family: var(--serif);
  color: var(--ink);
}
.med-block__edit {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid rgba(10, 22, 40, 0.12);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink-mute);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(10, 22, 40, 0.08);
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.med-block__edit:hover {
  color: var(--steel-deep);
  border-color: var(--steel-soft);
  background: var(--bone);
}
.med-block__issue-tools {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.med-block__issue-tools[hidden] {
  display: none !important;
}
.med-block__issue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.45rem;
  border: 1px solid rgba(180, 120, 40, 0.35);
  border-radius: 50%;
  background: var(--paper);
  color: #9a5b12;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(10, 22, 40, 0.08);
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.med-block__issue:hover {
  color: #7a460d;
  border-color: rgba(180, 120, 40, 0.55);
  background: #fff7eb;
}
.med-block__issue.has-issues {
  background: #fff1dc;
}
.med-block__issue.has-issues-resolved {
  background: var(--paper);
  border-color: rgba(10, 22, 40, 0.18);
  color: var(--ink-mute);
}
.med-block__issue.has-issues-resolved:hover {
  color: var(--ink);
  border-color: rgba(10, 22, 40, 0.28);
  background: var(--bone);
}
.write-editor__issue-quote--block {
  font-style: normal;
  color: var(--ink-mute);
}
.med-preview-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 5rem;
  padding: 1.25rem;
  border: 1px dashed rgba(10, 22, 40, 0.14);
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--ink-mute);
  text-align: center;
}
.med-preview-code {
  position: relative;
  margin: 0;
  padding: 1rem 1.1rem;
  border-radius: 4px;
  background: rgba(10, 22, 40, 0.04);
  overflow-x: auto;
  font-family: ui-monospace, monospace;
  font-size: 0.86rem;
  line-height: 1.55;
}
.med-preview-code__lang {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  background: rgba(10, 22, 40, 0.08);
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.med-preview-math--display {
  padding: 0.75rem 0;
  text-align: center;
  overflow-x: auto;
}
.med-preview-figure {
  margin: 0;
}
.med-preview-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}
.med-preview-figure__source,
.article-body .article-figure__source {
  margin-top: 0.35rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-style: italic;
  color: var(--ink-mute);
  line-height: 1.5;
  text-align: center;
}

.med-block__image-source {
  display: block;
  margin-top: 0.65rem;
  text-align: center;
}

.med-block__image-source-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.med-block__image-source-text {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-style: italic;
  color: var(--ink-mute);
  line-height: 1.5;
}

.med-block__image-source-placeholder {
  color: rgba(92, 101, 119, 0.45);
}

.med-preview-figure__caption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--ink-mute);
  text-align: center;
}
.med-preview-video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  background: var(--navy-2);
}
.med-preview-video iframe,
.med-preview-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.med-preview-link {
  display: block;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: 4px;
  background: rgba(244, 240, 232, 0.45);
  text-decoration: none;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.med-preview-link:hover {
  border-color: var(--steel-soft);
  background: rgba(244, 240, 232, 0.75);
}
.med-preview-link__title {
  display: block;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
}
.med-preview-link__url {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--steel);
}

/* Block editor modals */
.med-modal__field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
  font-size: 0.78rem;
  color: var(--ink-mute);
}
.med-modal__field input,
.med-modal__field textarea {
  font: inherit;
  font-size: 0.92rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(10, 22, 40, 0.12);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
}
.med-modal__field textarea {
  font-family: ui-monospace, monospace;
  line-height: 1.5;
  max-height: var(--textarea-modal-max);
  overflow-y: auto;
  resize: none;
  field-sizing: fixed;
}
.med-modal__check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  color: var(--ink-mute);
}
.med-modal__image-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.med-modal__or,
.med-modal__image-status {
  font-size: 0.82rem;
  color: var(--ink-mute);
}
.med-modal__live-preview {
  margin-top: 0.5rem;
  padding: 0.75rem;
  border: 1px dashed rgba(10, 22, 40, 0.1);
  border-radius: 4px;
  background: rgba(244, 240, 232, 0.35);
  overflow-x: auto;
}
.med-modal__live-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.med-modal__thumb {
  display: block;
  max-width: 100%;
  max-height: 200px;
  margin: 0 auto;
  border-radius: 4px;
}

.med-block__code-head {
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  color: var(--ink-mute);
}
.med-block__code-head input {
  margin-left: 0.35rem;
  font: inherit;
  padding: 0.2rem 0.4rem;
  border: 1px solid rgba(10, 22, 40, 0.12);
  border-radius: 3px;
  background: var(--paper);
}
.med-block__code {
  display: block;
  width: 100%;
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.55;
  padding: 1rem;
  border: 1px solid rgba(10, 22, 40, 0.08);
  border-radius: 4px;
  background: rgba(10, 22, 40, 0.025);
  color: var(--ink);
  resize: vertical;
}

.med-block__math-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 0.35rem;
}
.med-block__math-input {
  display: block;
  width: 100%;
  font-family: ui-monospace, monospace;
  font-size: 0.9rem;
  padding: 0.75rem;
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: 4px;
  background: var(--paper);
  resize: vertical;
}
.med-block__math-display {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.5rem 0;
  font-size: 0.85rem;
  color: var(--ink-mute);
}
.med-block__math-preview {
  padding: 1rem;
  border: 1px dashed rgba(10, 22, 40, 0.1);
  border-radius: 4px;
  background: rgba(244, 240, 232, 0.35);
  overflow-x: auto;
}

.med-block__image-preview {
  margin-bottom: 0.65rem;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(10, 22, 40, 0.04);
}
.med-block__image-preview img {
  display: block;
  width: 100%;
  height: auto;
}
.med-block__image-empty,
.med-block__video-empty {
  display: block;
  padding: 2rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--ink-mute);
}
.med-block__image-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.med-block__field {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.78rem;
  color: var(--ink-mute);
}
.med-block__field input,
.med-block__field textarea {
  font: inherit;
  font-size: 0.9rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(10, 22, 40, 0.12);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
}
.med-block__video-preview .med-block__video-embed,
.med-block__video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--navy-2);
  border-radius: 4px;
  overflow: hidden;
}
.med-block__video-preview iframe,
.med-block__video-preview video,
.med-block__video-embed iframe,
.med-block__video-embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.med-insert {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 1.55rem;
  margin: 0.15rem 0;
}
.med-insert__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.78rem;
  height: 1.78rem;
  padding: 0;
  border: 1px solid rgba(10, 22, 40, 0.16);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink-mute);
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  opacity: 1;
  transition: border-color 0.15s var(--ease), color 0.15s;
}
.med-insert__btn:hover {
  border-color: var(--steel);
  color: var(--steel-deep);
}
.med-insert__menu[hidden] {
  display: none !important;
}
.med-insert__menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.25rem;
  min-width: 360px;
  padding: 0.5rem;
  background: var(--paper);
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(6, 15, 30, 0.12);
}
.med-insert__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.55rem 0.35rem;
  border: none;
  border-radius: 4px;
  background: transparent;
  font: inherit;
  font-size: 0.75rem;
  color: var(--ink-mute);
  cursor: pointer;
}
.med-insert__item:hover { background: rgba(10, 22, 40, 0.04); color: var(--ink); }
.med-insert__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  font-size: 1rem;
  line-height: 1;
}
.med-insert__icon i { font-size: 0.95rem; }
.med-insert__glyph {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
}
.med-insert__glyph--sub { font-size: 0.82rem; }

.med-block--divider {
  padding: 0.35rem 1rem;
}
.med-block__divider {
  margin: 0;
  border: none;
  border-top: 1px solid var(--rule);
}

.medium-editor__overlay[hidden] {
  display: none !important;
}
.medium-editor__overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(6, 15, 30, 0.45);
}
.medium-editor__modal[hidden] {
  display: none !important;
}
.medium-editor__modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 210;
  transform: translate(-50%, -50%);
  width: min(480px, calc(100vw - 2rem));
  padding: 1.5rem;
  background: var(--paper);
  border-radius: 6px;
  box-shadow: 0 24px 48px rgba(6, 15, 30, 0.2);
  overflow: visible;
}

.medium-editor__modal .code-lang-combo {
  width: 100%;
}

.medium-editor__modal .code-lang-combo .feed-topic__list {
  z-index: 12;
  max-height: 12rem;
}
.medium-editor__modal h3 {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: 1.5rem;
}
.medium-editor__modal-hint {
  margin: -0.5rem 0 1rem;
  font-size: 0.88rem;
  color: var(--ink-mute);
  line-height: 1.5;
}

/* Article reader */
.article-reader {
  padding-top: clamp(5rem, 8vw, 7rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}
.article-reader__inner {
  max-width: 760px;
}

.article-reader__title {
  margin-bottom: 0.65rem;
}

.article-reader__subtitle {
  margin-bottom: 1.5rem;
}

.article-masthead {
  margin-bottom: 1.35rem;
}

.article-masthead__author-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-bottom: 1rem;
}

.article-masthead__author {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.article-masthead__author:hover .article-masthead__author-name {
  color: var(--steel-deep);
}

.article-masthead__avatar-wrap {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
}

.article-masthead__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.article-masthead__avatar--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 22, 40, 0.08);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-mute);
}

.article-masthead__avatar[hidden],
.article-masthead__avatar--placeholder[hidden] {
  display: none !important;
}

.article-masthead__author-name {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.2;
}

.article-masthead__author-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.article-masthead__tags {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

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

.article-masthead__tags .article-tag {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
}

.article-masthead__follow {
  padding: 0.28rem 0.85rem;
  border: 1px solid rgba(10, 22, 40, 0.22);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.article-masthead__follow:hover {
  border-color: var(--ink);
}

.article-masthead__follow.is-following {
  background: var(--bone);
  border-color: rgba(10, 22, 40, 0.22);
  color: var(--ink);
}

.article-masthead__follow.is-following:hover {
  background: rgba(10, 22, 40, 0.08);
  border-color: var(--ink);
}

.article-masthead__meta {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-mute);
}

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

.article-masthead__engage-host {
  padding-top: 0.15rem;
}

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

.article-rule {
  margin: 0 0 1.75rem;
  border: none;
  border-top: 1px solid var(--rule);
}

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

.article-hero {
  margin: 0 0 1.75rem;
}

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

.article-hero__img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 2px;
}

.article-engage {
  display: flex;
  gap: 0.35rem;
  z-index: 45;
  pointer-events: auto;
  transition: opacity 0.25s var(--ease), background 0.25s var(--ease);
}
.article-engage[hidden] {
  display: none !important;
}
.article-engage-sticky {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 55;
  padding: 0.5rem 0;
  background: rgba(250, 247, 241, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(10, 22, 40, 0.06);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-0.35rem);
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease), transform 0.3s var(--ease);
}

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

.article-engage-sticky.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.article-engage--sticky {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem 1rem;
  width: 100%;
  padding: 0;
}

.article-engage--sticky .article-engage__group--start {
  justify-self: start;
}

.article-engage--sticky .article-engage__group--end {
  justify-self: end;
  margin-left: 0;
}

.article-engage--sticky .article-engage__group {
  opacity: 0.88;
  transition: opacity 0.2s var(--ease);
}

.article-engage--sticky .article-engage__group:hover {
  opacity: 1;
}

.article-engage-sticky__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  min-width: 0;
  max-width: 100%;
  text-align: center;
  line-height: 1.2;
  opacity: 0.88;
}

.article-engage-sticky__title {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--serif);
  font-size: clamp(0.92rem, 1.35vw, 1.1rem);
  font-weight: 500;
  color: var(--ink);
}

.article-engage-sticky__by {
  flex-shrink: 0;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--ink-mute);
}

.article-engage-sticky__by a {
  color: var(--ink-mute);
  font-weight: 500;
}

.article-engage-sticky__by a:hover {
  color: var(--steel);
}

.article-engage--masthead {
  position: static;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  opacity: 1;
  transform: none;
}

.article-engage__group {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.article-engage__group--end {
  margin-left: auto;
}

.article-engage--masthead .article-engage__btn {
  flex-direction: row;
  gap: 0.4rem;
  min-width: auto;
  min-height: 2.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
}

.article-engage--masthead .article-engage__btn:hover {
  background: rgba(10, 22, 40, 0.05);
}
.article-engage--docked {
  position: static;
  flex-direction: row;
  justify-content: flex-start;
  gap: 0.5rem;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  opacity: 1;
  transform: none;
}
.article-engage-dock {
  position: sticky;
  top: 0;
  z-index: 25;
  margin: 0 0 1.25rem;
  padding: 0.75rem 0;
  background: rgba(250, 247, 241, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(10, 22, 40, 0.08);
}
.article-engage-dock[hidden] {
  display: none !important;
}
.article-engage__btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.5rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-mute);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.article-engage--docked .article-engage__btn {
  flex-direction: row;
  min-height: 2.25rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}
.article-engage__btn:hover {
  color: var(--ink);
  background: rgba(10, 22, 40, 0.05);
}
.article-engage__btn i {
  font-size: 1.05rem;
}
.article-engage__btn[data-engage-like].is-active {
  color: #c44b4b;
}
.article-engage__btn[data-engage-like].is-active i {
  color: #c44b4b;
}
.article-engage__btn[data-engage-bookmark].is-active {
  color: var(--steel-deep);
}
.article-engage__btn[data-engage-bookmark].is-active i {
  color: var(--steel-deep);
}
.article-reader__loading[hidden] {
  display: none !important;
}
.modal-card--bookmark-picker {
  max-width: 480px;
  overflow: visible;
}

.modal-card--avatar-crop {
  max-width: 420px;
}

.avatar-cropper__hint {
  margin: -0.75rem 0 1.25rem;
  font-size: 0.92rem;
  color: var(--ink-mute);
}

.avatar-cropper__viewport {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto 1.25rem;
  overflow: hidden;
  background: var(--ink);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.avatar-cropper__viewport.is-dragging {
  cursor: grabbing;
}

.avatar-cropper__image {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  pointer-events: none;
}

.avatar-cropper__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(6, 15, 30, 0.62);
  pointer-events: none;
}

.avatar-cropper__zoom {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.avatar-cropper__zoom span {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.avatar-cropper__zoom input[type="range"] {
  width: 100%;
  accent-color: var(--steel);
}

.bookmark-picker__combo {
  position: relative;
}
.bookmark-picker__hint {
  margin: -0.5rem 0 1rem;
  font-size: 0.92rem;
  color: var(--ink-mute);
}
.bookmark-picker__field {
  display: block;
  margin-bottom: 0.85rem;
}

.bookmark-picker__field span,
.bookmark-picker__new label span {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  color: var(--ink-mute);
}

.bookmark-picker__new input {
  width: 100%;
  font: inherit;
  font-size: 0.92rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(10, 22, 40, 0.14);
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
}

.bookmark-picker__new {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
  align-items: end;
  margin-bottom: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
}

.bookmark-picker__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.15rem;
}

.bookmark-picker__actions--stack {
  flex-direction: column;
  align-items: stretch;
}

.bookmark-picker__actions--stack .btn {
  width: 100%;
  justify-content: center;
}

.modal-card--bookmark-picker .auth-form__error {
  margin: 0 0 0.65rem;
}
.article-engage__count {
  line-height: 1;
}
.article-comments {
  padding: clamp(2rem, 4vw, 3rem) 0 clamp(3rem, 5vw, 4rem);
  border-top: 1px solid var(--rule);
  scroll-margin-top: 5.5rem;
}

.article-comments[hidden] {
  display: none !important;
}
.article-comments__head {
  margin-bottom: 1.5rem;
}
.article-comments__head h2 {
  margin: 0.35rem 0 0;
}
.article-comments__lede {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-mute);
}
.comment-composer {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(10, 22, 40, 0.08);
}
.comment-composer__label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}
.comment-composer textarea {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.55;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(10, 22, 40, 0.14);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  resize: none;
  min-height: 2.75rem;
  max-height: var(--textarea-page-max);
  overflow-y: auto;
  field-sizing: content;
}

/* Modal textareas scroll inside the card instead of stretching it */
.modal textarea {
  max-height: var(--textarea-modal-max);
  overflow-y: auto;
  resize: none;
  field-sizing: fixed;
}
.comment-reply-form .comment-composer textarea {
  min-height: 2.5rem;
}
.comment-composer__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}
.comment-composer__tool {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(10, 22, 40, 0.12);
  border-radius: 999px;
  background: rgba(244, 240, 232, 0.55);
  color: var(--ink-mute);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}
.comment-composer__tool:hover:not(:disabled) {
  border-color: rgba(10, 22, 40, 0.22);
  color: var(--ink);
}
.comment-composer__tool:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.comment-composer__blocks {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.comment-composer__blocks:empty {
  display: none;
}
.comment-block-draft {
  padding: 0.75rem;
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: 6px;
  background: rgba(244, 240, 232, 0.45);
}
.comment-block-draft__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.comment-block-draft__title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-right: auto;
}
.comment-block-draft__edit {
  font: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(10, 22, 40, 0.12);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-mute);
  cursor: pointer;
}
.comment-block-draft__edit:hover {
  color: var(--ink);
  border-color: rgba(10, 22, 40, 0.22);
}
.comment-block-draft__remove {
  width: 1.5rem;
  height: 1.5rem;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--ink-mute);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.comment-block-draft__remove:hover {
  color: #9b3b3b;
  background: rgba(196, 75, 75, 0.08);
}
.comment-block-draft__preview {
  overflow: hidden;
  border-radius: 4px;
}

.comment-block-draft__preview .comment-embed {
  margin: 0;
}

.modal-card--comment-block {
  max-width: 560px;
  overflow: visible;
}

.code-lang-combo {
  width: 100%;
}

.modal-card--comment-block .code-lang-combo .feed-topic__list,
.modal-card .code-lang-combo .feed-topic__list {
  z-index: 5;
  max-height: 12rem;
}

.modal-card--comment-block .med-modal__live-preview pre {
  margin: 0;
  max-height: 16rem;
  overflow: auto;
}
.comment-form__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.65rem;
}
.comment-form__actions--reply {
  margin-top: 0.35rem;
}
.comment-feed {
  margin-top: 0.25rem;
}
.comment__content {
  display: grid;
  gap: 0.75rem;
}
.comment__attachments {
  display: grid;
  gap: 0.65rem;
}
.comment-embed {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(10, 22, 40, 0.08);
  background: rgba(255, 255, 255, 0.55);
}
.comment-embed--code {
  overflow: visible;
}
.comment-embed__label {
  display: block;
  padding: 0.35rem 0.65rem;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  background: rgba(10, 22, 40, 0.04);
  border-bottom: 1px solid rgba(10, 22, 40, 0.06);
}
.comment-embed--code pre {
  margin: 0;
  padding: 0.85rem 0.9rem;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.5;
  background: #f6f8fa;
}
.comment-embed--code code {
  font-family: var(--mono, ui-monospace, monospace);
}
.code-snippet {
  position: relative;
}
.code-snippet:not(.is-expanded) {
  overflow: hidden;
}
.code-snippet__header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  background: rgba(10, 22, 40, 0.04);
  border-bottom: 1px solid rgba(10, 22, 40, 0.06);
}
.code-snippet__icon {
  font-size: 0.72rem;
  color: var(--steel-deep);
  flex-shrink: 0;
}
.code-snippet__lang {
  line-height: 1;
}
.code-snippet .code-snippet__body > pre {
  padding-top: 1.25rem;
}
.comment-embed--code .code-snippet__header {
  background: rgba(10, 22, 40, 0.04);
}
.comment-embed--code .code-snippet {
  border-radius: 0 0 6px 6px;
}
.med-block__preview .code-snippet {
  border-radius: 4px;
}
.code-snippet.is-collapsible:not(.is-expanded) .code-snippet__body {
  max-height: var(--code-snippet-max-height, 14rem);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}
.code-snippet.is-expanded .code-snippet__toggle {
  position: sticky;
  bottom: 0;
  z-index: 2;
  box-shadow: 0 -6px 16px rgba(10, 22, 40, 0.06);
}
.code-snippet__toggle {
  display: block;
  width: 100%;
  padding: 0.45rem 0.75rem;
  border: none;
  border-top: 1px solid rgba(10, 22, 40, 0.06);
  background: rgba(10, 22, 40, 0.03);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--steel-deep);
  cursor: pointer;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.code-snippet__toggle:hover {
  background: rgba(10, 22, 40, 0.05);
  color: var(--ink);
}
.comment-embed--code .code-snippet__toggle {
  background: #f0f3f6;
}
.comment-embed--code .code-snippet__toggle:hover {
  background: #e8ecf0;
}
.comment-embed--math {
  padding: 0.85rem 1rem;
}
.comment-embed--math-inline {
  display: inline-block;
  padding: 0.35rem 0.55rem;
}
.comment-guest {
  margin: 0 0 1.75rem;
}
.comment-guest__card {
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: 4px;
  background: rgba(244, 240, 232, 0.45);
}
.comment-guest__title {
  margin: 0.5rem 0 0.45rem;
  font-size: clamp(1.25rem, 2vw, 1.45rem);
  font-weight: 500;
  color: var(--ink);
}
.comment-guest__lede {
  margin: 0;
  max-width: 42ch;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-mute);
}
.comment-guest__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.15rem;
}
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.comment-thread {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(10, 22, 40, 0.08);
}
.comment-thread:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.comment__meta {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
}
.comment__author {
  font-weight: 600;
  color: var(--ink);
}
.comment__author:hover {
  color: var(--steel-deep);
}
.comment__date {
  color: var(--ink-mute);
}
.comment__body {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
}
.comment__body--deleted {
  font-style: italic;
  color: var(--ink-mute);
}
.comment-thread__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-top: 0.65rem;
}
.comment-view-replies {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--steel-deep);
  cursor: pointer;
}
.comment-view-replies:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.comment-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(10, 22, 40, 0.12);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1;
  color: var(--ink-mute);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(10, 22, 40, 0.06);
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.comment-action-btn i {
  font-size: 0.82rem;
}
.comment-action-btn--reply:hover {
  color: var(--steel-deep);
  border-color: rgba(74, 107, 138, 0.35);
  background: rgba(244, 240, 232, 0.65);
}
.comment-reply-slot {
  margin-top: 0.75rem;
  padding-left: 0.25rem;
}
.comment-replies {
  margin-top: 0.85rem;
  margin-left: 0.35rem;
  padding: 0.15rem 0 0.15rem 1.15rem;
  border-left: 2px solid rgba(10, 22, 40, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.comment-replies[hidden] {
  display: none !important;
}
.comment__engage {
  margin-top: 0.55rem;
}
.comment-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.85rem;
  padding: 0.2rem 0.65rem;
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--ink-mute);
  cursor: pointer;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.comment-like-btn:hover {
  color: var(--steel-deep);
  border-color: rgba(74, 107, 138, 0.28);
}
.comment-like-btn.is-active {
  color: #9b3b3b;
  border-color: rgba(155, 59, 59, 0.22);
  background: rgba(155, 59, 59, 0.06);
}
.comment-like-count {
  font-size: 0.76rem;
  color: var(--ink-mute);
}
.comment-embed--link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: 0.55rem;
  background: rgba(244, 240, 232, 0.55);
  color: var(--steel-deep);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  word-break: break-word;
}
.comment-embed--link:hover {
  border-color: rgba(74, 107, 138, 0.28);
  color: var(--ink);
}
.comment-embed--link::before {
  content: "↗";
  font-size: 0.82rem;
  opacity: 0.7;
}
.comment-embed--image {
  margin: 0;
  max-width: min(100%, 28rem);
}
.comment-embed--image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.45rem;
  border: 1px solid rgba(10, 22, 40, 0.08);
}
.comment-modal__hint {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-mute);
}
.comment--reply {
  position: relative;
}
.comment--reply::before {
  content: "";
  position: absolute;
  left: -1.15rem;
  top: 0.72rem;
  width: 0.65rem;
  height: 2px;
  background: rgba(10, 22, 40, 0.1);
}
.comment--reply .comment__body {
  font-size: 0.92rem;
}
.comment-empty {
  margin-top: 0.5rem;
}
@media (max-width: 900px) {
  .article-masthead__author-row {
    gap: 0.55rem 0.75rem;
  }

  .article-engage--masthead {
    flex-wrap: wrap;
  }

  .article-engage--sticky {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.5rem 0.65rem;
  }

  .article-engage-sticky__title {
    font-size: 0.88rem;
  }

  .article-engage-dock {
    display: none !important;
  }

  .article-engage-sticky .container {
    padding-inline: var(--rail-x, 1.25rem);
  }
}
.article-preview-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: 4px;
  background: rgba(244, 240, 232, 0.65);
  font-size: 0.88rem;
  color: var(--ink-mute);
}
.article-preview-banner[hidden] { display: none !important; }
.article-moderation-banner {
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(180, 70, 70, 0.22);
  border-radius: 4px;
  background: rgba(180, 70, 70, 0.08);
  font-size: 0.88rem;
  color: #6b2d2d;
}
.article-moderation-banner[hidden] { display: none !important; }
.article-owner-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}
.article-owner-actions[hidden] { display: none !important; }
.article-preview-banner a {
  font-weight: 500;
  color: var(--steel-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}
.article-tags[hidden] { display: none !important; }
.article-tag {
  display: inline-block;
  padding: 0.28rem 0.65rem;
  border: 1px solid rgba(10, 22, 40, 0.12);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-mute);
  background: rgba(244, 240, 232, 0.55);
}

.modal-card--submit-tags {
  max-width: 640px;
}
.submit-tags__hint {
  margin: -0.5rem 0 1rem;
  font-size: 0.92rem;
  color: var(--ink-mute);
  line-height: 1.6;
}
.submit-tags__count {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-mute);
}
.submit-tags__count[data-valid="true"] {
  color: var(--steel-deep);
}
.submit-tags__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-height: 42vh;
}
.submit-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border: 1px solid rgba(10, 22, 40, 0.14);
  border-radius: 999px;
  background: transparent;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.submit-tag:hover:not(:disabled) {
  border-color: rgba(10, 22, 40, 0.28);
  background: rgba(244, 240, 232, 0.65);
}
.submit-tag.is-selected {
  border-color: var(--steel-deep);
  background: rgba(58, 90, 120, 0.12);
  color: var(--steel-deep);
}
.submit-tag:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* =========================================================
   Research report paywall
   ========================================================= */
.article-paywall {
  margin: clamp(2rem, 4vw, 3rem) auto 0;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.article-paywall.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.article-paywall__panel {
  padding: clamp(2rem, 4vw, 2.75rem);
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--paper);
  text-align: center;
}
.article-paywall__title {
  margin: 0.5rem auto 1rem;
  max-width: 22ch;
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  line-height: 1.15;
}
.article-paywall__lede {
  margin: 0 auto 1.5rem;
  max-width: 46ch;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.55;
  color: var(--ink-mute);
}
.article-paywall__upgrade {
  margin: -0.75rem auto 1.25rem;
  max-width: 42ch;
  font-family: var(--sans);
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--steel-deep);
}
.article-paywall__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
.article-body[hidden] {
  display: none;
}

/* Article reader body */
.article-body {
  margin-top: 2.5rem;
  line-height: 1.75;
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--ink);
}
.article-body .article-paragraph { margin: 0 0 1.25rem; }
.article-body .article-paragraph a { color: var(--steel-deep); }
.article-body .article-paragraph u,
.article-body .article-paragraph s,
.article-body .article-paragraph strike,
.article-body .article-paragraph del { text-decoration-thickness: from-font; }
.article-body .article-paragraph--drop-cap::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 3.75em;
  font-weight: 400;
  line-height: 0.78;
  padding: 0.04em 0.12em 0 0;
  color: var(--ink);
}
.article-body .article-heading {
  font-weight: 500;
  line-height: 1.25;
  margin: 2rem 0 0.75rem;
}
.article-body h2.article-heading { font-size: clamp(1.6rem, 3vw, 2rem); }
.article-body h3.article-heading { font-size: clamp(1.3rem, 2.5vw, 1.55rem); }
.article-body .article-divider {
  margin: 2rem 0;
  border: none;
  border-top: 1px solid var(--rule);
}
.article-body .code-snippet {
  margin: 1.5rem 0;
  border-radius: 4px;
  background: rgba(10, 22, 40, 0.04);
}
.article-body .code-snippet:not(.is-expanded) {
  overflow: hidden;
}
.article-body .code-snippet .article-code {
  margin: 0;
  border-radius: 0;
  background: transparent;
}
.article-body .article-code {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  border-radius: 4px;
  background: rgba(10, 22, 40, 0.04);
  overflow-x: auto;
  font-family: ui-monospace, monospace;
  font-size: 0.88rem;
  line-height: 1.55;
}
.article-body .article-math--display {
  margin: 1.5rem 0;
  overflow-x: auto;
  text-align: center;
}
.article-body .article-math--inline { display: inline; }
.article-body .article-figure {
  margin: 2rem 0;
}
.article-body .article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
}
.article-body .article-figure__caption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--ink-mute);
  text-align: center;
}
.article-body .article-video {
  position: relative;
  margin: 2rem 0;
  aspect-ratio: 16 / 9;
  background: var(--navy-2);
  border-radius: 4px;
  overflow: hidden;
}
.article-body .article-video iframe,
.article-body .article-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* =========================================================
   Flash toasts
   ========================================================= */
.flash-stack {
  position: fixed;
  top: calc(var(--header-h) + 1rem);
  right: var(--gutter);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: min(380px, calc(100vw - 2rem));
  pointer-events: none;
}
.flash-toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: start;
  padding: 0.95rem 0.85rem 0.95rem 1rem;
  background: var(--navy);
  color: var(--bone);
  border: 1px solid var(--navy-line);
  border-left: 3px solid var(--steel-soft);
  box-shadow: 0 16px 40px rgba(6, 15, 30, 0.28);
  animation: flash-in 0.38s var(--ease);
}
.flash-toast--success { border-left-color: #6db892; }
.flash-toast--error { border-left-color: #d48484; }
.flash-toast--warning { border-left-color: #d4b06d; }
.flash-toast--info { border-left-color: var(--steel-soft); }
.flash-toast.is-leaving {
  animation: flash-out 0.32s var(--ease) forwards;
}
.flash-toast__kicker {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244, 240, 232, 0.62);
}
.flash-toast__message {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--bone);
}
.flash-toast__close {
  font: inherit;
  font-size: 1.35rem;
  line-height: 1;
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  border-radius: 2px;
  background: transparent;
  color: rgba(244, 240, 232, 0.72);
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.flash-toast__close:hover {
  color: var(--bone);
  background: rgba(255, 255, 255, 0.08);
}
@keyframes flash-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes flash-out {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(12px); }
}
@media (max-width: 540px) {
  .flash-stack {
    left: var(--gutter);
    right: var(--gutter);
    width: auto;
  }
}

.featured-report {
  background: var(--navy);
  color: var(--paper);
  padding: clamp(2rem, 4vw, 2.75rem) 0;
}

.featured-report--stone {
  position: relative;
  background-color: var(--navy);
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  overflow: hidden;
  isolation: isolate;
}
.featured-report--stone::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(10, 22, 40, 0.92) 0%,
    rgba(10, 22, 40, 0.78) 45%,
    rgba(10, 22, 40, 0.55) 100%
  );
  z-index: -1;
}
.featured-report--stone .featured-report__inner {
  position: relative;
  z-index: 1;
}

.featured-report__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
}

.featured-report__tag {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel-soft);
  margin-bottom: 0.5rem;
}

.featured-report h2 {
  color: var(--paper);
  margin-bottom: 0.75rem;
}

.featured-report p {
  color: rgba(255,255,255,0.72);
  margin: 0;
  max-width: 52ch;
}

.subscription-manage {
  margin-top: 2rem;
  margin-bottom: 2.5rem;
  padding: 2rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  border-radius: 2px;
}

.subscription-manage__status h2 {
  margin: 0.35rem 0 0.5rem;
}

.subscription-manage__status p {
  margin: 0;
  color: var(--ink-mute);
  max-width: 52ch;
}

.subscription-manage__pending {
  margin-top: 0.75rem !important;
  color: var(--steel) !important;
}

.subscription-manage__actions {
  margin: 1.25rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pricing-card--current {
  border-color: var(--steel);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.pricing-grid--duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pricing-card {
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 2rem;
  border-radius: 2px;
}

.pricing-card--featured {
  border-color: var(--steel);
  box-shadow: 0 12px 40px rgba(10,22,40,0.06);
}

.pricing-card h3 {
  margin-bottom: 0.25rem;
}

.pricing-card .price {
  font-family: var(--serif);
  font-size: 2.5rem;
  margin: 1rem 0;
}

.pricing-card .price small {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink-mute);
}

@media (max-width: 820px) {
  .article-card {
    grid-template-columns: 1fr;
  }
  .featured-report__inner {
    grid-template-columns: 1fr;
  }
  .pricing-grid,
  .pricing-grid--duo {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
