/* =========================================================
   Wellness Radar — Shared stylesheet
   Editorial-led, Anthropic-style. Cream + teal + gold.
   ========================================================= */

:root {
  --bg:        #FBFAF7;
  --bg-warm:   #F4EFE3;
  --bg-deep:   #1A1F2C;
  --ink:       #1A1F2C;
  --ink-soft:  #3A4252;
  --muted:     #5A6373;
  --border:    #E8E2D5;
  --rule:      #D9D2C2;

  --teal:      #006C70;
  --teal-deep: #00484C;
  --gold:      #B8884F;
  --gold-soft: #D9B783;
  --coral:     #C44A4A;
  --cream:     #FCF6E4;

  --ff-display: "Proxima Nova", "Mulish", "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --ff-body:    "Proxima Nova", "Mulish", "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --ff-mono:    "JetBrains Mono", "IBM Plex Mono", Menlo, monospace;

  --maxw: 1240px;
  --readw: 720px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
html { overflow-x: clip; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--teal); }
img { max-width: 100%; height: auto; }
hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}
.read {
  max-width: var(--readw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- TOP BAR + MEGA MENU ---------- */
.topbar {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(160%) blur(8px);
  background: rgba(251, 250, 247, 0.92);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  background-color: var(--teal);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'><text x='48' y='65' text-anchor='middle' font-family='Georgia,serif' font-weight='700' font-size='46' fill='%23FCF6E4' letter-spacing='-3'>WR</text></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
}
.nav {
  display: flex;
  gap: 32px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
}
.nav > li { position: relative; list-style: none; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 0;
  cursor: pointer;
  transition: color 0.15s ease;
}
.nav-link:hover { color: var(--teal); }
.nav-link[aria-expanded="true"] { color: var(--teal); }

/* Mega panel */
.mega {
  position: absolute;
  top: calc(100% + 12px);
  left: -32px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 28px 32px;
  display: none;
  box-shadow: 0 14px 48px -16px rgba(26, 31, 44, 0.18);
  z-index: 100;
  min-width: 340px;
  max-width: min(560px, calc(100vw - 64px));
}
.nav > li:hover .mega,
.nav > li:focus-within .mega { display: block; }
.mega h5 {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 14px;
  font-weight: 600;
}
.mega-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 32px;
}
.mega a {
  display: block;
  padding: 8px 0;
  font-size: 14.5px;
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid transparent;
}
.mega a:hover {
  color: var(--teal);
  border-bottom-color: var(--gold-soft);
}
.mega-sub {
  display: block;
  font-family: var(--ff-body);
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
}

.cta-mini {
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  transition: all 0.18s ease;
}
.cta-mini:hover {
  background: var(--ink);
  color: var(--bg);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 4px;
  font-family: var(--ff-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.005em;
  transition: all 0.18s ease;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--teal-deep); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn-cream { background: var(--cream); color: var(--bg-deep); }
.btn-cream:hover { background: var(--gold-soft); }
.btn-outline-cream { background: transparent; color: var(--cream); border: 1px solid rgba(252, 246, 228, 0.5); }
.btn-outline-cream:hover { background: var(--cream); color: var(--bg-deep); }
.btn .arrow { transition: transform 0.18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- TYPOGRAPHY HELPERS ---------- */
.eyebrow {
  font-family: var(--ff-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
}
.h-display {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin: 0;
}
.h-display em { font-style: italic; color: var(--teal-deep); }

.section { padding: 100px 0; border-top: 1px solid var(--border); }
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 56px; gap: 40px; flex-wrap: wrap;
}
.section-title {
  font-family: var(--ff-display); font-weight: 400;
  font-size: clamp(36px, 4.5vw, 56px); line-height: 1.08;
  letter-spacing: -0.02em; margin: 0; max-width: 720px;
}
.section-title em { font-style: italic; color: var(--teal-deep); }
.section-sub { font-size: 17px; color: var(--muted); max-width: 380px; line-height: 1.55; }

/* ---------- ARTICLE / READING PAGE ---------- */
.article-head {
  padding: 80px 0 40px;
}
.article-meta {
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.article-meta strong { color: var(--teal); font-weight: 600; }
.article-title {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: clamp(38px, 4.6vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.022em;
  margin: 0 0 24px;
}
.article-dek {
  font-size: 22px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 0 36px;
  font-weight: 400;
}
.byline {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 14.5px;
}
.byline-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--gold-soft);
  position: relative; flex-shrink: 0;
}
.byline-avatar::after {
  content: ""; position: absolute; inset: 10px;
  border-radius: 50%; background: var(--teal);
}
.byline-meta strong { font-weight: 600; }
.byline-meta-sub {
  font-family: var(--ff-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.review-strip {
  background: var(--bg-warm);
  padding: 16px 22px;
  border-left: 3px solid var(--teal);
  margin: 32px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.review-strip strong { color: var(--ink); }
.review-strip code {
  font-family: var(--ff-mono);
  font-size: 11.5px;
  background: rgba(184,136,79,0.12);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--teal);
}

.prose {
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
}
.prose h2 {
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: 36px;
  letter-spacing: -0.018em;
  margin: 56px 0 18px;
  line-height: 1.15;
}
.prose h3 {
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: 24px;
  margin: 40px 0 14px;
  letter-spacing: -0.01em;
}
.prose p { margin: 16px 0; }
.prose a {
  color: var(--teal);
  border-bottom: 1px solid var(--gold-soft);
}
.prose a:hover { color: var(--teal-deep); border-bottom-color: var(--teal); }
.prose ul, .prose ol { padding-left: 22px; margin: 16px 0; }
.prose li { margin: 6px 0; }

.callout {
  margin: 32px 0;
  padding: 24px 28px;
  background: var(--bg-warm);
  border-left: 3px solid var(--gold);
  border-radius: 2px;
}
.callout-tag {
  font-family: var(--ff-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
  font-weight: 600;
}
.callout-tag.warn { color: var(--coral); }
.callout-tag.evidence { color: var(--teal); }
.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

cite {
  font-style: normal;
  font-family: var(--ff-mono);
  font-size: 11.5px;
  color: var(--muted);
  background: rgba(0,108,112,0.06);
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
}

.refs {
  margin-top: 60px;
  padding: 32px 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--border);
}
.refs h3 {
  font-family: var(--ff-mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 18px;
}
.refs ol { padding-left: 20px; font-size: 14.5px; color: var(--ink-soft); }
.refs li { margin: 8px 0; line-height: 1.5; }
.refs cite { font-family: var(--ff-body); background: transparent; padding: 0; font-size: 14.5px; color: var(--ink-soft); white-space: normal; }
.refs a { color: var(--teal); border-bottom: 1px solid var(--gold-soft); }

.coi {
  margin: 40px 0;
  padding: 22px 26px;
  border: 1px dashed var(--border);
  border-radius: 4px;
  font-size: 14px;
  color: var(--ink-soft);
}
.coi-tag {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
  margin-bottom: 8px;
}

/* ---------- TIER TABLE (conservative / standard / aggressive) ---------- */
.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  margin: 32px 0;
}
.tier {
  padding: 28px 24px;
  border-right: 1px solid var(--border);
}
.tier:last-child { border-right: none; }
.tier-label {
  font-family: var(--ff-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 14px;
}
.tier-conservative .tier-label { color: var(--teal); }
.tier-standard .tier-label { color: var(--gold); }
.tier-aggressive .tier-label { color: var(--coral); }
.tier-spec {
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.25;
  margin: 8px 0 14px;
  letter-spacing: -0.01em;
}
.tier-note { font-size: 14px; color: var(--ink-soft); line-height: 1.5; margin: 0; }

/* ---------- HUB CARDS ---------- */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.hub-card {
  background: var(--bg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  transition: background 0.2s ease;
}
.hub-card:hover { background: var(--bg-warm); }
.hub-num {
  font-family: var(--ff-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 18px;
}
.hub-card h3 {
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
  line-height: 1.15;
}
.hub-card p {
  font-size: 14.5px; color: var(--muted); margin: 0 0 auto; line-height: 1.55;
}
.hub-foot {
  font-family: var(--ff-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 22px;
  color: var(--ink);
}

/* ---------- FOOTER ---------- */
footer {
  background: var(--bg-deep);
  color: var(--cream);
  padding: 80px 0 36px;
  margin-top: 80px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.foot-brand {
  font-family: var(--ff-display);
  font-size: 26px;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px;
}
.foot-brand .brand-mark {
  background-color: var(--teal);
}
.foot-tag {
  font-size: 14.5px; color: #9CB0AF; line-height: 1.55; max-width: 320px;
}
.foot-col h5 {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-soft);
  font-weight: 500;
  margin: 0 0 18px;
}
.foot-col a {
  display: block; color: var(--cream); font-size: 14px; padding: 4px 0;
  opacity: 0.8; transition: opacity 0.15s ease;
}
.foot-col a:hover { opacity: 1; color: var(--gold-soft); }
.foot-bottom {
  padding-top: 28px;
  border-top: 1px solid rgba(184, 136, 79, 0.3);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: #9CB0AF;
  flex-wrap: wrap; gap: 16px;
}

/* ---------- TOOL PAGE ---------- */
.tool-shell {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  margin: 40px 0 80px;
}
.tool-form {
  background: var(--bg-warm);
  padding: 36px 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.tool-form h3 {
  font-family: var(--ff-display); font-weight: 500;
  font-size: 22px; letter-spacing: -0.01em;
  margin: 0 0 20px;
}
.tool-field { margin-bottom: 20px; }
.tool-field label {
  display: block;
  font-family: var(--ff-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 600;
}
.tool-field input, .tool-field select {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-family: var(--ff-body);
  font-size: 16px;
  background: var(--bg);
  color: var(--ink);
  outline: none;
  transition: border 0.15s ease;
}
.tool-field input:focus, .tool-field select:focus {
  border-color: var(--teal);
}
.tool-result {
  background: var(--bg-deep);
  color: var(--cream);
  padding: 36px 32px;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}
.tool-result::before {
  content: ""; position: absolute; top: 0; right: 0;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(10,171,175,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.tool-result h3 {
  font-family: var(--ff-mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #3DE3E8;
  margin: 0 0 24px;
}
.result-big {
  font-family: var(--ff-display);
  font-size: 48px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.018em;
  margin: 8px 0 6px;
  color: var(--cream);
}
.result-label {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9CB0AF;
  margin-bottom: 24px;
}
.result-row {
  display: flex; justify-content: space-between; padding: 12px 0;
  border-top: 1px solid rgba(184, 136, 79, 0.2);
  font-size: 14.5px;
}
.result-row:first-of-type { border-top: none; }
.result-row span:first-child { color: #9CB0AF; font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
.result-row span:last-child { color: var(--cream); font-weight: 500; }

/* ---------- IMAGE SYSTEM ---------- */
.media {
  position: relative;
  width: 100%;
  background: linear-gradient(135deg, var(--teal-deep) 0%, var(--bg-deep) 100%);
  border-radius: 4px;
  overflow: hidden;
  display: block;
}
.media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.media-16x9 { aspect-ratio: 16 / 9; }
.media-4x3  { aspect-ratio: 4 / 3; }
.media-3x2  { aspect-ratio: 3 / 2; }
.media-1x1  { aspect-ratio: 1 / 1; }
.media-21x9 { aspect-ratio: 21 / 9; }

/* Caption strip for editorial images */
.media-cap {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 10px;
}

/* Hero image variants */
.hero-split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 60px; align-items: center; }
.hero-split .media-3x2 { min-height: 420px; }

/* Hub card image on top */
.hub-card { padding: 0; overflow: hidden; }
.hub-card .media { border-radius: 0; }
.hub-card-body { padding: 30px 28px 32px; display: flex; flex-direction: column; flex: 1; }
.hub-card .hub-num { margin-bottom: 14px; padding-top: 20px; }
.hub-card.no-img .hub-card-body { padding-top: 36px; }
.hub-card.no-img .hub-card-body .hub-num { padding-top: 0; }

/* Feature article hero image */
.feat-main .media { margin-bottom: 28px; }
.feat-item .media { margin-bottom: 14px; aspect-ratio: 16 / 10; }

/* Image gradient overlay (for dark hero treatments) */
.media-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(26,31,44,0.0) 30%, rgba(26,31,44,0.55) 100%);
  pointer-events: none;
}

/* Article body image */
.article-img { margin: 36px 0; }
.article-img .media { aspect-ratio: 16 / 9; }
.article-img figcaption {
  font-family: var(--ff-mono); font-size: 11.5px; letter-spacing: 0.12em;
  color: var(--muted); margin-top: 10px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
  .foot-grid > div:nth-child(4),
  .foot-grid > div:nth-child(5) { display: none; }
}
@media (max-width: 960px) {
  .nav { display: none; }
  .hub-grid { grid-template-columns: 1fr; }
  .hero-split { grid-template-columns: 1fr; gap: 32px; }
  .hero-split .media-3x2 { min-height: 260px; }
  .tiers { grid-template-columns: 1fr; }
  .tier { border-right: none; border-bottom: 1px solid var(--border); }
  .tool-shell { grid-template-columns: 1fr; }
  .section { padding: 70px 0; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .container { padding: 0 24px; }
  .read { padding: 0 22px; }
  .topbar-inner { padding: 16px 24px; }
  .section { padding: 56px 0; }
  .foot-grid { gap: 24px; }
}
@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .read { padding: 0 18px; }
  .topbar-inner { padding: 14px 18px; }
  .foot-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 380px) {
  .container { padding: 0 14px; }
  .read { padding: 0 14px; }
  .topbar-inner { padding: 12px 14px; }
}

/* ---------- ARTICLE ENHANCEMENTS (progress, back-to-top, share, sticky) ---------- */
.wr-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: transparent;
  z-index: 200;
  pointer-events: none;
}
.wr-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--teal) 0%, var(--gold) 100%);
  transition: width 0.06s linear;
}

.wr-back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  border: none;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 150;
  box-shadow: 0 6px 22px -8px rgba(26, 31, 44, 0.4);
}
.wr-back-to-top.on {
  opacity: 0.92;
  visibility: visible;
  transform: translateY(0);
}
.wr-back-to-top:hover { opacity: 1; background: var(--teal-deep); }
@media (max-width: 560px) {
  .wr-back-to-top { right: 14px; bottom: 14px; width: 40px; height: 40px; font-size: 16px; }
}

.wr-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 28px auto 8px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.wr-share-label {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 6px;
}
.wr-share-btn {
  font-family: var(--ff-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  font-weight: 500;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}
.wr-share-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--bg-warm);
}
.wr-share-copy:focus { outline: 2px solid var(--teal); outline-offset: 2px; }

/* Sticky compact title in topbar once user scrolls past article H1 */
.topbar.wr-sticky-on { box-shadow: 0 6px 18px -10px rgba(26, 31, 44, 0.18); }

@media (max-width: 560px) {
  .wr-share { gap: 6px; padding-top: 18px; margin: 22px auto 4px; }
  .wr-share-btn { padding: 7px 12px; font-size: 11px; }
  .wr-share-label { width: 100%; margin-bottom: 4px; }
}

/* Long content on mobile: tame any oversized inline figures / tables */
@media (max-width: 768px) {
  .prose img, .prose figure, .prose svg, .prose video, .prose iframe {
    max-width: 100%;
    height: auto;
  }
  /* Make any wide table on mobile scroll horizontally inside its box (cleaner than full-page swing) */
  table { display: block; overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
  pre { overflow-x: auto; max-width: 100%; }
  /* Tighter cell padding on small tables so columns don't compete for room */
  .vs-table th, .vs-table td { padding: 12px 12px; font-size: 13.5px; }
}

/* Long URLs / citations: break at any character on narrow viewports so they don't push layout wider */
.refs a, .refs cite, .prose cite, .prose a[href^="http"] {
  overflow-wrap: anywhere;
  word-break: break-word;
}
