:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --sunken: #f1f5f9;
  --fg: #0f172a;
  --fg-body: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --brand: #2563eb;
  --brand-hover: #1d4ed8;
  --brand-soft: rgba(37, 99, 235, 0.09);
  --code-bg: #0b1120;
  --code-fg: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 12px 32px -12px rgba(15, 23, 42, 0.07);
  --shadow-hover: 0 4px 14px rgba(15, 23, 42, 0.06), 0 22px 44px -16px rgba(37, 99, 235, 0.16);
}
html[data-theme="dark"] {
  --bg: #090d16;
  --surface: #0f1624;
  --sunken: #151e30;
  --fg: #f8fafc;
  --fg-body: #cbd5e1;
  --muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.15);
  --border-strong: rgba(148, 163, 184, 0.26);
  --brand: #4c7df0;
  --brand-hover: #3b6de0;
  --brand-soft: rgba(76, 125, 240, 0.15);
  --code-bg: #070b13;
  --code-fg: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 18px 38px -14px rgba(0, 0, 0, 0.6);
  --shadow-hover: 0 8px 24px -8px rgba(0, 0, 0, 0.65), 0 22px 48px -16px rgba(76, 125, 240, 0.26);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(50% 420px at 20% 0%, rgba(37, 99, 235, 0.07), transparent 75%),
    radial-gradient(40% 360px at 85% 0%, rgba(124, 58, 237, 0.05), transparent 75%);
  color: var(--fg);
  font: 15.5px/1.75 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-decoration: none; }
[hidden] { display: none !important; }

.hr-container { max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 2.5vw, 32px); }
.hr-container-wide { max-width: 1520px; width: 100%; margin: 0 auto; padding: 0 clamp(16px, 2.8vw, 40px); }

/* ---- Topbar (1:1 with PublicLayout.tsx) ---- */
.hr-topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.hr-topbar-inner {
  display: flex; align-items: center; gap: 6px; height: 60px;
}
.hr-brand {
  display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0;
  font-weight: 700; color: var(--fg) !important; font-size: 16px; letter-spacing: -0.02em;
}
.hr-brand img { border-radius: 7px; display: block; }
.hr-nav {
  display: flex; align-items: center; gap: 2px; margin-left: 16px; flex-shrink: 0;
}
.hr-nav a {
  color: var(--muted); font-size: 13.5px; font-weight: 500;
  padding: 6px 10px; border-radius: 8px;
  transition: background-color .15s ease, color .15s ease;
}
.hr-nav a:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 5%, transparent); }
.hr-nav a.is-current {
  color: var(--brand); font-weight: 600; background: var(--brand-soft);
}
.hr-spacer { flex: 1 1 auto; }
.hr-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.hr-auth-guest { display: inline-flex; align-items: center; gap: 6px; }
.hr-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid transparent;
  background: transparent; color: var(--muted); cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.hr-icon-btn:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 6%, transparent); }
.hr-icon-sun { display: none; }
html[data-theme="dark"] .hr-icon-moon { display: none; }
html[data-theme="dark"] .hr-icon-sun { display: block; }
.hr-mobile-only { display: none; }

.hr-top-progress { height: 2px; width: 100%; background: transparent; overflow: hidden; }
.hr-top-progress span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--brand), #7c3aed);
  transition: width .1s linear;
}

@media (max-width: 1023px) {
  .hr-nav, .hr-desktop-only { display: none !important; }
  .hr-mobile-only { display: inline-flex; }
}
.hr-mobile-drawer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 12px 16px 16px;
}
.hr-mobile-nav { display: grid; gap: 4px; }
.hr-mobile-nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 10px; color: var(--fg); font-size: 14px; font-weight: 600;
}
.hr-mobile-nav a.is-current { background: var(--brand-soft); color: var(--brand); }

/* ---- Buttons (Guaranteed High Contrast) ---- */
.hr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 10px; padding: 9px 16px; font-size: 13.5px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap; text-decoration: none !important;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
}
.hr-btn:hover { transform: translateY(-1px); }
.hr-btn-sm { padding: 6.5px 14px; font-size: 12.5px; border-radius: 9px; }
.hr-btn-pill { border-radius: 999px; padding-left: 15px; padding-right: 15px; }
a.hr-btn-primary, .hr-btn-primary {
  background: var(--brand); color: #ffffff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), 0 8px 18px -8px rgba(37, 99, 235, 0.55);
}
a.hr-btn-primary:hover, .hr-btn-primary:hover { background: var(--brand-hover); color: #ffffff !important; }
a.hr-btn-outline, .hr-btn-outline {
  border-color: var(--border); background: var(--surface); color: var(--fg) !important;
  box-shadow: var(--shadow-sm);
}
a.hr-btn-outline:hover, .hr-btn-outline:hover {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
  color: var(--brand) !important;
}
a.hr-btn-ghost, .hr-btn-ghost { background: transparent; color: var(--muted) !important; }
a.hr-btn-ghost:hover, .hr-btn-ghost:hover { color: var(--fg) !important; background: color-mix(in srgb, var(--fg) 5%, transparent); }

.hr-main { padding: 26px 0 72px; }

/* ---- Shared Badges & Tags ---- */
.hr-badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  background: var(--sunken); border: 1px solid var(--border); color: var(--fg-body);
  font-size: 11.5px; font-weight: 600; line-height: 1.4;
}
.hr-badge-spot {
  background: var(--brand-soft);
  border-color: color-mix(in srgb, var(--brand) 26%, transparent);
  color: var(--brand) !important; font-weight: 700;
}
.hr-badge-featured {
  background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.28); color: #d97706;
}
html[data-theme="dark"] .hr-badge-featured { color: #fbbf24; }
.hr-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.hr-tags-compact { margin-top: 12px; }
.hr-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px; font-weight: 500; color: var(--muted); background: var(--sunken);
  border: 1px solid var(--border); border-radius: 7px; padding: 2px 8.5px;
}

/* ---- Blog Hub Hero Card ---- */
.hr-hero-card {
  position: relative; overflow: hidden;
  border: 1px solid var(--border); border-radius: 24px;
  background-color: var(--surface);
  background-image:
    radial-gradient(55% 95% at 10% 0%, rgba(37, 99, 235, 0.09), transparent 72%),
    radial-gradient(45% 85% at 92% 0%, rgba(124, 58, 237, 0.07), transparent 72%),
    linear-gradient(to right, color-mix(in srgb, var(--fg) 3.5%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--fg) 3.5%, transparent) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  padding: clamp(22px, 3vw, 34px);
  box-shadow: var(--shadow);
  margin-bottom: 26px;
}
.hr-hero-top {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px;
}
.hr-hero-copy { max-width: 820px; }
.hr-eyebrow-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.hr-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border); background: var(--surface); color: var(--brand);
  border-radius: 999px; padding: 4px 12px; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  box-shadow: var(--shadow-sm);
}
.hr-pulse {
  width: 7px; height: 7px; border-radius: 999px; background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}
.hr-count-pill {
  border-radius: 999px; background: var(--sunken); border: 1px solid var(--border); color: var(--muted);
  padding: 3px 10px; font-size: 11px; font-weight: 600;
}
.hr-hero-card h1 {
  font-size: clamp(24px, 3vw, 36px); line-height: 1.24; font-weight: 800;
  margin: 0 0 10px; letter-spacing: -0.025em;
}
.hr-lead { font-size: 15px; color: var(--muted); margin: 0; line-height: 1.7; }
.hr-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hr-hero-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border);
}
.hr-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.hr-pill {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  padding: 6px 13px; border-radius: 10px; font-size: 12.5px; font-weight: 600;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.hr-pill b {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 999px;
  background: var(--sunken); color: var(--muted);
}
.hr-pill:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); color: var(--fg); }
.hr-pill.is-active {
  border-color: color-mix(in srgb, var(--brand) 55%, var(--border));
  background: var(--brand-soft); color: var(--brand);
}
.hr-pill.is-active b { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand); }

.hr-search-wrap { position: relative; width: min(100%, 310px); }
.hr-search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
}
.hr-search-input {
  width: 100%; height: 37px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--fg); padding: 0 12px 0 34px; font-size: 12.5px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.hr-search-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent);
}

/* ---- Generative Cover Art & Spotlight Hero ---- */
.hr-art-cover {
  position: relative; height: 184px; padding: 16px 18px;
  display: flex; flex-direction: column; justify-content: space-between;
  background-color: var(--sunken);
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--fg) 4.5%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--fg) 4.5%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
  border-bottom: 1px solid var(--border); overflow: hidden;
}
.hr-art-cover-hero { min-height: 260px; height: 100%; padding: 22px 24px; border-bottom: 0; border-right: 1px solid var(--border); }
@media (max-width: 960px) { .hr-art-cover-hero { border-right: 0; border-bottom: 1px solid var(--border); min-height: 210px; } }
.hr-art-cover-img { padding: 0; }
.hr-art-cover-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.hr-spotlight:hover .hr-art-cover-img img, .hr-card:hover .hr-art-cover-img img { transform: scale(1.03); }

.is-claude::before { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 90% at 12% 10%, rgba(217, 119, 87, 0.16), transparent 70%); pointer-events: none; }
.is-codex::before { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 90% at 12% 10%, rgba(16, 163, 127, 0.16), transparent 70%); pointer-events: none; }
.is-gemini::before { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 90% at 12% 10%, rgba(37, 99, 235, 0.16), transparent 70%); pointer-events: none; }
.is-deepseek::before { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 90% at 12% 10%, rgba(79, 70, 229, 0.16), transparent 70%); pointer-events: none; }
.is-workflow::before { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 90% at 12% 10%, rgba(124, 58, 237, 0.14), transparent 70%); pointer-events: none; }

.hr-art-top, .hr-art-bottom { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hr-art-code {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 90%, transparent);
  border-radius: 999px; padding: 3px 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px; font-weight: 600; color: var(--muted);
}
.hr-art-code i { width: 6px; height: 6px; border-radius: 999px; background: var(--brand); display: inline-block; }
.hr-art-top time { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--muted); }
.hr-art-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hr-art-chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--fg);
  border-radius: 9px; padding: 4px 11px; font-size: 11.5px; font-weight: 700; box-shadow: var(--shadow-sm);
}
.hr-art-cat {
  border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-radius: 8px; padding: 2px 9px; font-size: 11px; font-weight: 600; color: var(--fg-body);
}

.hr-spotlight {
  display: grid; grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.26fr);
  border: 1px solid var(--border); border-radius: 24px; background: var(--surface);
  overflow: hidden; box-shadow: var(--shadow); margin-bottom: 24px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.hr-spotlight:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); box-shadow: var(--shadow-hover); }
@media (max-width: 960px) { .hr-spotlight { grid-template-columns: minmax(0, 1fr); } }
.hr-spotlight-media { display: block; height: 100%; }
.hr-spotlight-body { padding: clamp(20px, 2.6vw, 32px); display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.hr-spotlight-body h2 { font-size: clamp(20px, 2.2vw, 27px); line-height: 1.32; margin: 10px 0; font-weight: 800; letter-spacing: -0.02em; }
.hr-spotlight-body h2 a { color: var(--fg); transition: color .15s ease; }
.hr-spotlight-body h2 a:hover { color: var(--brand); }
.hr-spotlight-body p { color: var(--muted); margin: 0; font-size: 14.5px; line-height: 1.72; }

.hr-card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px;
}
.hr-card {
  display: flex; flex-direction: column; justify-content: space-between;
  border: 1px solid var(--border); background: var(--surface); border-radius: 20px;
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.hr-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); box-shadow: var(--shadow-hover); }
.hr-card-media { display: block; }
.hr-card-body { padding: 18px 20px 14px; flex: 1; }
.hr-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.hr-card h2 { font-size: 17px; line-height: 1.42; margin: 0 0 8px; font-weight: 700; letter-spacing: -0.015em; }
.hr-card h2 a { color: var(--fg); transition: color .15s ease; }
.hr-card h2 a:hover { color: var(--brand); }
.hr-card p { font-size: 13.5px; color: var(--muted); margin: 0; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hr-card-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 20px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted);
}
.hr-spotlight .hr-card-foot { padding: 16px 0 0; }
.hr-read-link { font-weight: 600; color: var(--brand); }
.hr-read-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- Editorial Article Reader ---- */
.hr-breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12.5px; color: var(--muted); margin-bottom: 16px;
}
.hr-crumb-left, .hr-crumb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hr-crumb-meta { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.hr-back-pill {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--border); background: var(--surface); border-radius: 999px;
  padding: 4.5px 13px; font-weight: 600; color: var(--fg-body) !important; box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, color .15s ease;
}
.hr-back-pill:hover { border-color: var(--brand); color: var(--brand) !important; }
.hr-crumb-cat { color: var(--muted); font-weight: 600; }
.hr-crumb-cat:hover { color: var(--brand); }
.hr-crumb-sep { opacity: 0.45; }

/* Balanced 2-Column Editorial Hero Banner */
.hr-post-hero {
  position: relative; overflow: hidden;
  border: 1px solid var(--border); border-radius: 24px;
  background-color: var(--surface);
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--fg) 3%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--fg) 3%, transparent) 1px, transparent 1px);
  background-size: 40px 40px;
  padding: clamp(22px, 3vw, 36px);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.hr-post-hero.has-cover {
  display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: clamp(20px, 2.8vw, 34px); align-items: center;
}
@media (max-width: 960px) {
  .hr-post-hero.has-cover { grid-template-columns: minmax(0, 1fr); }
}
.hr-post-hero-copy { position: relative; z-index: 1; min-width: 0; }
.hr-meta-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--muted); margin-bottom: 12px;
}
.hr-meta-chip { font-weight: 600; color: var(--fg-body); }
.hr-post-hero h1 {
  font-size: clamp(24px, 2.6vw, 34px); line-height: 1.28; font-weight: 800;
  margin: 0 0 12px; letter-spacing: -0.025em; color: var(--fg);
}
.hr-post-cover {
  position: relative; z-index: 1; margin: 0;
  border-radius: 16px; overflow: hidden; border: 1px solid var(--border);
  background: var(--sunken);
  box-shadow: 0 16px 36px -14px rgba(15, 23, 42, 0.18);
}
.hr-post-cover img {
  display: block; width: 100%; max-height: 310px; object-fit: cover;
}

/* Mobile Collapsible TOC */
.hr-mobile-toc {
  display: none; margin-bottom: 18px;
  border: 1px solid var(--border); border-radius: 16px; background: var(--surface);
  padding: 12px 16px; box-shadow: var(--shadow-sm);
}
.hr-mobile-toc summary {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--fg); list-style: none;
}
.hr-mobile-toc summary::-webkit-details-marker { display: none; }
.hr-mobile-toc summary i::after { content: "▾"; color: var(--muted); font-style: normal; }
.hr-mobile-toc[open] summary i::after { content: "▴"; color: var(--brand); }
.hr-mobile-toc ul {
  list-style: none; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px solid var(--border);
  display: grid; gap: 6px;
}
.hr-mobile-toc li a { font-size: 13px; color: var(--fg-body); display: block; padding: 3px 0; }
.hr-mobile-toc li.hr-toc-sub a { padding-left: 14px; font-size: 12.5px; color: var(--muted); }
@media (max-width: 1023px) { .hr-mobile-toc { display: block; } }

/* 2-Column Reader Grid */
.hr-article-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 288px; gap: 28px; align-items: start;
}
@media (max-width: 1023px) {
  .hr-article-grid { grid-template-columns: minmax(0, 1fr); }
  .hr-toc { display: none; }
}
.hr-article { display: grid; gap: 28px; min-width: 0; }
.hr-paper {
  border: 1px solid var(--border); border-radius: 24px; background: var(--surface);
  padding: clamp(22px, 3.6vw, 46px); box-shadow: var(--shadow); min-width: 0;
}

/* Editorial Prose Typography */
.hr-prose { min-width: 0; overflow-wrap: break-word; color: var(--fg-body); font-size: 16px; line-height: 1.85; }
.hr-prose > :first-child { margin-top: 0; }
.hr-prose > :last-child { margin-bottom: 0; }
.hr-prose h2 {
  position: relative;
  font-size: clamp(19px, 2vw, 22.5px); line-height: 1.38; font-weight: 800; color: var(--fg);
  margin: 40px 0 16px; padding: 2px 0 2px 14px;
  border-left: 3.5px solid var(--brand);
  scroll-margin-top: 90px; letter-spacing: -0.02em;
}
.hr-prose h3 {
  font-size: 17.5px; line-height: 1.45; font-weight: 700; color: var(--fg);
  margin: 28px 0 10px; scroll-margin-top: 90px;
}
.hr-prose h4 { font-size: 15.5px; font-weight: 700; color: var(--fg); margin: 22px 0 8px; }
.hr-prose p, .hr-prose ul, .hr-prose ol { margin: 0 0 18px; }
.hr-prose ul, .hr-prose ol { padding-left: 22px; }
.hr-prose li { margin-bottom: 7px; }
.hr-prose li::marker { color: var(--brand); }
.hr-prose strong { color: var(--fg); font-weight: 700; }
.hr-prose hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
.hr-prose a {
  color: var(--brand); font-weight: 600;
  text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--brand) 38%, transparent);
  text-underline-offset: 3px; transition: text-decoration-color .15s ease;
}
.hr-prose a:hover { text-decoration-color: var(--brand); }
.hr-prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875em; font-weight: 500;
  background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--border));
  color: var(--brand);
  padding: 1.5px 6.5px; border-radius: 6px;
}

/* Terminal Code Blocks */
.hr-codeblock {
  margin: 22px 0; border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2); background: var(--code-bg); color: var(--code-fg);
  box-shadow: 0 12px 28px -12px rgba(2, 6, 23, 0.45);
}
.hr-codebar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 14px; background: rgba(255, 255, 255, 0.035);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11.5px; color: #94a3b8;
}
.hr-codedots { display: inline-flex; align-items: center; gap: 6px; }
.hr-codedots i { width: 9px; height: 9px; border-radius: 999px; display: inline-block; }
.hr-codedots i:nth-child(1) { background: #fb7185; }
.hr-codedots i:nth-child(2) { background: #fbbf24; }
.hr-codedots i:nth-child(3) { background: #34d399; }
.hr-codedots b {
  margin-left: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px; letter-spacing: .05em; font-weight: 600; color: #cbd5e1;
}
.hr-copy-btn {
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.14); color: #e2e8f0;
  border-radius: 7px; padding: 3.5px 10px; font-size: 11.5px; font-weight: 600; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.hr-copy-btn:hover { background: rgba(255, 255, 255, 0.15); border-color: rgba(255, 255, 255, 0.28); }
.hr-copy-btn.is-copied { background: rgba(16, 185, 129, 0.2); border-color: rgba(16, 185, 129, 0.45); color: #6ee7b7; }
.hr-codeblock pre {
  margin: 0; padding: 16px 18px; overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13.5px; line-height: 1.68; color: #e2e8f0;
}
.hr-codeblock pre code {
  background: none !important; border: 0 !important; padding: 0 !important;
  color: inherit !important; font-size: inherit;
}

.hr-prose blockquote {
  margin: 22px 0; padding: 14px 18px;
  border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--border));
  border-left: 3.5px solid var(--brand);
  background: linear-gradient(90deg, var(--brand-soft), transparent);
  border-radius: 12px; color: var(--fg-body);
}
.hr-prose blockquote p { margin: 0; }

.hr-figure { margin: 26px 0; text-align: center; }
.hr-figure img {
  display: block; max-width: 100%; height: auto; margin: 0 auto;
  border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.hr-figure figcaption { font-size: 12.5px; color: var(--muted); margin-top: 9px; }

.hr-table-wrap {
  overflow-x: auto; margin: 24px 0;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
}
.hr-table-wrap table { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 1.55; }
.hr-table-wrap th, .hr-table-wrap td { padding: 11px 15px; border-bottom: 1px solid var(--border); text-align: left; }
.hr-table-wrap tr:last-child td { border-bottom: 0; }
.hr-table-wrap th { background: var(--sunken); font-weight: 700; color: var(--fg); white-space: nowrap; }
.hr-table-wrap tbody tr:hover { background: color-mix(in srgb, var(--fg) 2%, transparent); }

/* ---- Sticky TOC + Side CTA ---- */
.hr-toc { position: sticky; top: 82px; display: grid; gap: 16px; }
.hr-toc-box {
  border: 1px solid var(--border); background: var(--surface); border-radius: 20px;
  padding: 18px; font-size: 12.5px; box-shadow: var(--shadow);
}
.hr-toc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.hr-toc-title { font-weight: 700; font-size: 12px; letter-spacing: .04em; color: var(--fg); }
.hr-toc-progress {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px; font-weight: 700; color: var(--brand);
  background: var(--brand-soft); padding: 1.5px 8px; border-radius: 999px;
}
.hr-toc-bar { height: 4px; border-radius: 999px; background: var(--sunken); overflow: hidden; margin-bottom: 14px; }
.hr-toc-bar span { display: block; height: 100%; width: 0%; background: var(--brand); border-radius: 999px; transition: width .12s linear; }
.hr-toc-list {
  list-style: none; padding: 0; margin: 0; display: grid; gap: 2px;
  border-left: 1.5px solid var(--border); max-height: calc(100vh - 360px); overflow-y: auto;
}
.hr-toc-list li { margin: 0; }
.hr-toc-list a {
  display: block; padding: 6px 10px 6px 13px; margin-left: -1.5px;
  border-left: 2.5px solid transparent; border-radius: 0 9px 9px 0;
  color: var(--muted); line-height: 1.45; transition: all .15s ease;
}
.hr-toc-list li.hr-toc-sub a { padding-left: 24px; font-size: 12px; }
.hr-toc-list a:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 4%, transparent); }
.hr-toc-list a.is-active {
  border-left-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand); font-weight: 700;
}

.hr-side-cta {
  border: 1px solid color-mix(in srgb, var(--brand) 26%, var(--border));
  background: linear-gradient(160deg, var(--surface), color-mix(in srgb, var(--brand) 6%, var(--surface)));
  border-radius: 20px; padding: 18px; box-shadow: var(--shadow);
}
.hr-side-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; color: var(--brand);
  background: var(--brand-soft); border-radius: 999px; padding: 2.5px 10px; margin-bottom: 10px;
}
.hr-side-kicker i { width: 6px; height: 6px; border-radius: 999px; background: var(--brand); display: inline-block; }
.hr-side-cta-title { margin: 0 0 8px; font-size: 14.5px; font-weight: 800; color: var(--fg); }
.hr-side-points {
  list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 6px;
  font-size: 12px; line-height: 1.5; color: var(--muted);
}
.hr-side-points li { position: relative; padding-left: 16px; }
.hr-side-points li::before { content: "✓"; position: absolute; left: 0; top: 0; color: #10b981; font-weight: 800; }
.hr-side-cta-btns { display: grid; gap: 8px; }
.hr-side-cta-btns .hr-btn { width: 100%; }

/* ---- Integrated FAQ, Bottom CTA & Related ---- */
.hr-sec-head { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.hr-sec-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.hr-sec-head h2 { margin: 0; font-size: 18.5px; font-weight: 800; color: var(--fg); letter-spacing: -0.015em; }

.hr-faq-section { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--border); }
.hr-faq-list { display: grid; gap: 10px; }
.hr-faq-item {
  border: 1px solid var(--border); border-radius: 14px; background: var(--sunken);
  padding: 13px 16px; transition: border-color .15s ease;
}
.hr-faq-item[open] { border-color: color-mix(in srgb, var(--brand) 38%, var(--border)); background: var(--surface); }
.hr-faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  cursor: pointer; font-weight: 700; font-size: 14.5px; color: var(--fg); list-style: none;
}
.hr-faq-item summary::-webkit-details-marker { display: none; }
.hr-faq-item summary i::after { content: "+"; font-style: normal; font-size: 16px; color: var(--muted); font-weight: 600; }
.hr-faq-item[open] summary i::after { content: "−"; color: var(--brand); }
.hr-faq-item p { margin: 10px 0 0; font-size: 14px; line-height: 1.7; color: var(--muted); }

.hr-cta-banner {
  margin-top: 36px; padding: clamp(20px, 2.8vw, 28px); border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--border));
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 7%, var(--surface)), var(--surface));
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px;
}
.hr-cta-copy { max-width: 580px; }
.hr-cta-banner h2 { margin: 0 0 6px; font-size: 19px; font-weight: 800; color: var(--fg); }
.hr-cta-banner p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.65; }
.hr-cta-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.hr-related h2, .hr-hub-links h2 { font-size: 18.5px; font-weight: 800; }
.hr-hub-links { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--border); }
.hr-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.hr-rel-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  border: 1px solid var(--border); background: var(--surface); border-radius: 18px; padding: 20px;
  color: var(--fg) !important; box-shadow: var(--shadow);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.hr-rel-card:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.hr-rel-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); }
.hr-rel-card h3 { font-size: 15.5px; line-height: 1.44; margin: 2px 0 0; font-weight: 700; color: var(--fg); }
.hr-rel-card p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hr-rel-more { font-size: 12.5px; font-weight: 600; color: var(--brand); }

.hr-quick-links { display: flex; flex-wrap: wrap; gap: 9px; }
.hr-quick-links a {
  border: 1px solid var(--border); background: var(--surface); padding: 8px 14px;
  border-radius: 11px; font-size: 13px; font-weight: 600; color: var(--fg-body);
  box-shadow: var(--shadow-sm); transition: border-color .15s ease, color .15s ease, transform .15s ease;
}
.hr-quick-links a:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.hr-empty { padding: 44px 24px; border: 1px dashed var(--border-strong); border-radius: 20px; background: var(--surface); color: var(--muted); text-align: center; }

/* ---- Footer matching PublicFooter ---- */
.hr-footer {
  border-top: 1px solid var(--border); padding: 42px 0 28px;
  font-size: 13px; color: var(--muted); background: color-mix(in srgb, var(--surface) 75%, var(--bg));
}
.hr-footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.hr-footer-brand { max-width: 320px; }
.hr-footer-brand p { margin: 10px 0 0; line-height: 1.65; }
.hr-footer-cols { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 28px; }
@media (max-width: 640px) { .hr-footer-cols { grid-template-columns: repeat(2, minmax(120px, 1fr)); } }
.hr-footer-cols div { display: flex; flex-direction: column; gap: 7px; }
.hr-footer-cols strong { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--fg); margin-bottom: 2px; }
.hr-footer-cols a { color: var(--muted); }
.hr-footer-cols a:hover { color: var(--brand); }
.hr-footer-copy { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 12px; }
