/* ─── Reset & Base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
button, input, select, textarea { font-family: inherit; }

:root {
  --bg:           #F7F7F7;
  --bg-accent:    #EFEFEF;
  --surface:      #EFEFEF;
  --surface-2:    #AAAE7F;
  --surface-3:    #D0D6B3;
  --border:       rgba(20, 49, 9, 0.18);
  --border-hover: #143109;
  --text:         #143109;
  --text-muted:   #586C50;
  --text-body:    #143109;
  --accent:       #143109;
  --accent-strong:#143109;
  --shadow:       none;

  --header-h: 56px;
  --header-h-expanded: 108px;
  --sidebar-w: 280px;
  --radius: 8px;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.sheet-open {
  overflow: hidden;
}

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

/* ─── Header ───────────────────────────────────────────────────── */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  min-height: var(--header-h);
  background: rgba(239, 239, 239, 0.94);
  border-bottom: 1px solid rgba(20, 49, 9, 0.12);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  padding: 0;
  z-index: 100;
}

.header-shell {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  align-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

body.has-role-filter {
  --header-h: var(--header-h-expanded);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--accent);
  font-size: 18px;
  line-height: 1;
}

.brand-copy {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.site-title {
  font-family: "Lora", serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-strong);
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.site-title:hover {
  color: var(--text);
}

.site-tagline {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  border-left: 1px solid rgba(20, 49, 9, 0.15);
  padding-left: 12px;
  margin-left: 4px;
}

html.home-header-guard header,
body.home-header-guard header {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

html.home-header-guard.home-header-visible header,
body.home-header-guard.home-header-visible header {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

html.home-header-guard.home-header-locked header,
body.home-header-guard.home-header-locked header {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  transition: none;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-height: 56px;
}

.site-nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  padding: 6px 10px;
  border: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.site-nav-link:hover,
.site-nav-link.active {
  color: var(--accent-strong);
  border-color: rgba(20, 49, 9, 0.18);
  background: rgba(20, 49, 9, 0.08);
}

.role-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.role-filter--bar {
  width: calc(100% + 48px);
  margin: 0 -24px;
  min-height: 52px;
  padding: 10px 24px;
  border-top: 1px solid rgba(20, 49, 9, 0.10);
  background: rgba(20, 49, 9, 0.04);
}

.role-filter-label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0;
  flex-shrink: 0;
}

.role-filter-select {
  appearance: none;
  background-color: #F7F7F7;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23143109' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 10px center;
  background-repeat: no-repeat;
  background-size: 12px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  min-width: 188px;
  max-width: 196px;
  padding: 8px 34px 8px 12px;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.role-filter-select:hover {
  border-color: rgba(20, 49, 9, 0.28);
  background-color: #FFFFFF;
}

.role-filter-select:focus {
  border-color: var(--border-hover);
  outline: 2px solid rgba(20, 49, 9, 0.12);
}

/* ─── Browse Practices Layout ─────────────────────────────────── */
.main--library {
  max-width: 1180px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 50px) 32px 32px;
}

.library-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.library-sidebar {
  background: rgba(239, 239, 239, 0.72);
  border: 1px solid rgba(20, 49, 9, 0.10);
  border-radius: 12px;
  padding: 18px;
}

.library-content {
  min-width: 0;
}

.nav-filter-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(20, 49, 9, 0.14);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
  gap: 8px;
  font-family: inherit;
  line-height: 1.2;
  flex-shrink: 0;
}

.nav-filter-btn:hover {
  background: rgba(20, 49, 9, 0.08);
  color: var(--text);
  border-color: rgba(20, 49, 9, 0.24);
}

.nav-filter-btn.active {
  background: rgba(20, 49, 9, 0.10);
  color: var(--accent-strong);
  border-color: rgba(20, 49, 9, 0.32);
  box-shadow: inset 0 0 0 1px rgba(20, 49, 9, 0.08);
}

.category-count {
  font-size: 12px;
  color: var(--text-muted);
  background: transparent;
  border-radius: var(--radius);
  padding: 0;
  font-weight: 700;
  min-width: 16px;
  text-align: right;
}

.nav-filter-btn.active .category-count {
  color: var(--accent-strong);
}

/* ─── Main ─────────────────────────────────────────────────────── */
.main {
  padding: calc(var(--header-h) + 40px) 32px 32px;
}

/* ─── Library Search ──────────────────────────────────────────── */
.library-controls {
  display: grid;
  gap: 18px;
  margin-bottom: 0;
}

.library-control-group {
  display: grid;
  gap: 10px;
}

.library-control-group--filters {
  gap: 12px;
}

.category-filter-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-direction: column;
}

.category-filter-bar {
  display: grid;
  gap: 8px;
}

.category-filter-select-wrap {
  display: none;
  gap: 10px;
}

.category-filter-select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  padding: 10px 12px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.category-filter-select:focus {
  border-color: var(--border-hover);
  outline: 2px solid rgba(20, 49, 9, 0.12);
}

.library-search-label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.library-search-input-wrap {
  position: relative;
}

.library-search-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  padding: 9px 38px 9px 10px;
}

.library-search-input--compact {
  min-height: 38px;
  padding: 8px 38px 8px 10px;
}

.library-search-input:focus {
  border-color: var(--border-hover);
  outline: 2px solid rgba(20, 49, 9, 0.12);
}

.library-search-input::placeholder {
  color: var(--text-muted);
}

.library-search-input::-webkit-search-cancel-button,
.library-search-input::-webkit-search-decoration,
.library-search-input::-webkit-search-results-button,
.library-search-input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.library-search-clear {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

.library-search-clear:hover {
  background: rgba(20, 49, 9, 0.08);
  color: var(--text);
}

.library-search-clear.hidden {
  display: none;
}

/* ─── Type Definitions ────────────────────────────────────────── */
/* ─── Category Header ──────────────────────────────────────────── */
.category-header {
  margin-bottom: 24px;
  padding: 0;
}

.category-header.hidden { display: none; }

.category-header-name {
  font-family: "Lora", serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.category-header-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

.library-hero {
  margin: 0 calc(50% - 50vw) 30px;
  padding: 28px 0 34px;
  border-top: 1px solid rgba(20, 49, 9, 0.08);
  border-bottom: 1px solid rgba(20, 49, 9, 0.08);
  background:
    linear-gradient(135deg, rgba(225, 234, 214, 0.82) 0%, rgba(245, 242, 232, 0.96) 52%, rgba(255, 255, 255, 0.98) 100%);
  box-shadow: 0 18px 40px rgba(20, 49, 9, 0.04);
}

.library-hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
  box-sizing: border-box;
}

.library-hero h1 {
  font-family: "Lora", serif;
  color: var(--accent-strong);
  font-size: 44px;
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.03em;
  max-width: 820px;
  margin: 8px 0 12px;
}

.library-hero > p {
  color: var(--text-body);
  font-size: 18px;
  line-height: 1.7;
  max-width: 840px;
}

.library-hero-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.library-role-article {
  display: inline-flex;
  align-items: center;
}

.library-role-inline {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.library-role-select-inline {
  appearance: none;
  min-height: 60px;
  padding: 12px 48px 14px 18px;
  border: 1px solid rgba(20, 49, 9, 0.18);
  border-radius: 999px;
  background-color: rgba(208, 214, 179, 0.38);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent-strong) 50%),
    linear-gradient(135deg, var(--accent-strong) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 2px),
    calc(100% - 16px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  color: var(--accent-strong);
  cursor: pointer;
  font-family: "Lora", serif;
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.2;
  max-width: min(100%, 420px);
}

.library-role-select-inline:hover,
.library-role-select-inline:focus {
  border-color: rgba(20, 49, 9, 0.30);
  outline: 2px solid rgba(20, 49, 9, 0.10);
}

/* ─── Grid ─────────────────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  align-items: start;
}

.library-stage {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
}

.library-stage.hidden {
  display: none;
}

.library-stage + .library-stage {
  margin-top: 4px;
}

.library-stage-header {
  position: relative;
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.library-stage-header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 6px;
  border-top: 1px solid rgba(20, 49, 9, 0.08);
}

.library-stage-title {
  position: relative;
  justify-self: start;
  padding-right: 10px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.library-stage-desc {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
  max-width: 760px;
}

.library-stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  align-items: start;
}

.site-footer {
  margin-top: 32px;
  padding: 18px 4px 8px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--accent-strong);
  text-decoration: none;
  border-bottom: 1px solid rgba(20, 49, 9, 0.15);
  transition: color 0.15s, border-color 0.15s;
}

.site-footer a:hover {
  color: var(--text);
  border-color: rgba(20, 49, 9, 0.30);
}

/* ─── Start Here Paths ─────────────────────────────────────────── */
.path-layout {
  display: block;
  overflow-y: auto;
  --path-page-pad: 28px;
}

.path-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 40px) var(--path-page-pad) 32px;
  box-sizing: border-box;
  overflow: visible;
}

.path-main--home {
  max-width: none;
  margin: 0;
  padding-top: var(--header-h);
  padding-left: 0;
  padding-right: 0;
}

.path-main--hero-top {
  padding-top: var(--header-h);
}

.main--library.path-main--hero-top {
  padding-top: 0;
}

.main--library.path-main--hero-top .library-hero {
  padding-top: calc(var(--header-h) + 28px);
}

.path-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--path-page-pad);
  box-sizing: border-box;
}

.path-hero {
  margin: 0 calc(50% - 50vw) 34px;
  padding: 36px 0;
  border-top: 1px solid rgba(20, 49, 9, 0.08);
  border-bottom: 1px solid rgba(20, 49, 9, 0.08);
  background:
    linear-gradient(135deg, rgba(225, 234, 214, 0.82) 0%, rgba(245, 242, 232, 0.96) 52%, rgba(255, 255, 255, 0.98) 100%);
  box-shadow: 0 18px 40px rgba(20, 49, 9, 0.04);
}

.path-hero--detail {
  padding-top: 0;
  border-top: none;
}

body.home-header-guard .path-hero {
  margin-top: calc(-1 * var(--header-h));
  padding-top: calc(36px + var(--header-h));
}

.path-hero-inner {
  width: 100%;
}

.path-hero-inner--detail {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  padding-top: 0;
}

.path-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
  gap: 28px;
  align-items: start;
}

.path-hero-grid > :first-child {
  order: 2;
}

.path-hero-grid > :last-child {
  order: 1;
}

.path-hero-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: none;
  border-radius: var(--radius);
  background: var(--surface);
  outline: 1px solid rgba(20, 49, 9, 0.08);
}

.path-hero--detail .path-hero-image {
  display: block;
  grid-column: 2;
  width: 360px;
  justify-self: end;
}

.path-hero-copy {
  grid-column: 1;
  display: grid;
  gap: 10px;
}

.path-hero--detail .back-link {
  grid-column: 1 / -1;
  margin-top: 20px;
  margin-bottom: 0;
}

.path-hero h1 {
  font-family: "Lora", serif;
  color: var(--accent-strong);
  font-size: 48px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 8px 0 12px;
}

.path-hero p {
  color: var(--text-body);
  font-size: 18px;
  line-height: 1.7;
}

.path-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  margin-bottom: 0;
}

.path-hero-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  color: var(--accent-strong);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  border: 1px solid rgba(20, 49, 9, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  transition: border-color 0.15s, transform 0.15s, background 0.15s, color 0.15s;
}

.path-hero-action:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.96);
  transform: translateY(-1px);
}

.path-hero-action--primary {
  color: #f6f3ea;
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.path-hero-action--primary:hover {
  color: #f6f3ea;
  background: #20470f;
  border-color: #20470f;
}

.path-index-section {
  margin-top: 6px;
}

.path-index-header {
  display: grid;
  gap: 8px;
  margin: 0 0 22px;
}

.path-index-header.hidden {
  display: none;
}

.path-index-header h2 {
  font-family: "Lora", serif;
  color: var(--accent-strong);
  font-size: 34px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0;
}

.path-index-header p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.65;
  max-width: 720px;
  margin: 0;
}

.path-index-meta {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  margin-top: 18px;
}

.path-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px;
}

.path-grid--detail {
  display: block;
}

.path-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
  padding: 20px;
  overflow: hidden;
  color: var(--text-body);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}

.path-card-image {
  display: block;
  width: calc(100% + 40px);
  aspect-ratio: 16 / 9;
  max-height: 220px;
  object-fit: cover;
  margin: -20px -20px 4px;
  border: none;
  border-radius: 0;
  background: var(--bg);
}

.path-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.path-card-title {
  font-family: "Lora", serif;
  color: var(--text);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.path-card p {
  font-size: 16px;
  line-height: 1.65;
  flex: 1;
}

.path-level {
  margin: 0 0 34px;
}

.path-level--secondary {
  margin-top: 8px;
  padding-top: 22px;
  border-top: 1px solid rgba(20, 49, 9, 0.10);
}

.path-level-header {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
}

.path-subtheme-heading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.path-level-description {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  max-width: 720px;
}

.path-kicker {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.subtheme-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(20, 49, 9, 0.10);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  flex: 0 0 auto;
}

.subtheme-inline-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.subtheme-marker--inline {
  width: 18px;
  height: 18px;
  font-size: 10px;
}

.path-kicker-anchor {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-strong);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 18px;
  padding: 7px 12px;
  border: 1px solid rgba(20, 49, 9, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  width: fit-content;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}

.back-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.back-link-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back-link:hover {
  color: var(--text);
  border-color: rgba(20, 49, 9, 0.30);
  background: rgba(255, 255, 255, 0.92);
}

.path-practice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  align-items: start;
}

.path-missing {
  text-align: left;
  padding: 20px;
}

/* ─── My Playbook ─────────────────────────────────────────────── */
.playbook-hero {
  padding: 14px 0 28px;
}

.section-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
  gap: 28px;
  align-items: start;
}

.section-hero-grid > :first-child {
  order: 2;
}

.section-hero-grid > :last-child {
  order: 1;
}

.section-hero-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: none;
  border-radius: var(--radius);
  background: var(--surface);
  outline: 1px solid rgba(20, 49, 9, 0.08);
}

.playbook-hero h1 {
  font-family: "Lora", serif;
  color: var(--accent-strong);
  font-size: 48px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 760px;
  margin: 8px 0 12px;
}

.playbook-hero p {
  color: var(--text-body);
  font-size: 18px;
  line-height: 1.7;
  max-width: 760px;
  margin-bottom: 16px;
}

.playbook-category {
  margin: 0 0 34px;
}

.playbook-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.playbook-category-header h2 {
  font-family: "Lora", serif;
  color: var(--text);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

/* ─── Signals ─────────────────────────────────────────────────── */
.signals-hero {
  margin: 0 calc(50% - 50vw) 28px;
  padding: 28px 0 34px;
  border-top: 1px solid rgba(20, 49, 9, 0.08);
  border-bottom: 1px solid rgba(20, 49, 9, 0.08);
  background:
    linear-gradient(135deg, rgba(225, 234, 214, 0.82) 0%, rgba(245, 242, 232, 0.96) 52%, rgba(255, 255, 255, 0.98) 100%);
  box-shadow: 0 18px 40px rgba(20, 49, 9, 0.04);
}

.signals-hero-inner {
  width: 100%;
}

.signals-hero h1 {
  font-family: "Lora", serif;
  color: var(--accent-strong);
  font-size: 48px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 8px 0 12px;
}

.signals-hero p {
  color: var(--text-body);
  font-size: 18px;
  line-height: 1.7;
  max-width: 820px;
}

.signals-section {
  margin: 0 0 34px;
}

.signals-section-header {
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.signals-section-header h2 {
  font-family: "Lora", serif;
  color: var(--text);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.signals-section-header p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

.signal-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
  opacity: 0.92;
}

.signal-eyebrow--pattern {
  color: #336B29;
}

.signal-eyebrow--antipattern {
  color: #143109;
}

.signal-card {
  gap: 12px;
}

.signal-card-link {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-align: left;
  text-decoration: none;
  width: 100%;
}

.signal-card-link:hover {
  color: inherit;
}

.signal-card-body {
  display: grid;
  gap: 10px;
}

.signal-meta-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 10px;
  padding-top: 2px;
}

.signal-meta-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.signal-meta-value {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.signal-card-footer {
  margin-top: auto;
}

.practice-detail-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.practice-detail-meta--challenge {
  align-items: flex-start;
  margin-bottom: 14px;
}

.practice-context-line {
  color: var(--accent-strong);
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  line-height: 1.35;
  opacity: 1;
  text-transform: uppercase;
}

.practice-context-separator {
  opacity: 0.6;
}

.practice-facts {
  display: grid;
  gap: 10px;
  margin: 22px 0 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.practice-fact-row {
  align-items: baseline;
  column-gap: 14px;
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
}

.practice-fact-key {
  align-items: center;
  color: var(--text-muted);
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 5px;
  letter-spacing: 0.08em;
  line-height: 1.3;
  white-space: nowrap;
  text-transform: uppercase;
}

.practice-fact-icon {
  font-size: 14px;
  line-height: 1;
}

.practice-fact-value {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  min-width: 0;
  max-width: 100%;
}

.practice-fact-primary {
  display: block;
}

.practice-fact-secondary {
  color: var(--text-muted);
  display: block;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  margin-top: 3px;
}

/* ─── Practice Sheet ──────────────────────────────────────────── */
.practice-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  justify-content: flex-end;
  background: rgba(20, 49, 9, 0.30);
  opacity: 1;
  transition: opacity 0.2s ease;
}

.practice-sheet-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.practice-sheet {
  width: min(620px, 100%);
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-radius: var(--radius) 0 0 var(--radius);
  overflow-y: auto;
  transform: translateX(0);
  transition: transform 0.24s ease;
}

.practice-sheet-overlay.hidden .practice-sheet {
  transform: translateX(100%);
}

.practice-sheet-content {
  padding: 26px 28px 32px;
}

.practice-sheet-header {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.practice-sheet-header h2 {
  font-family: "Lora", serif;
  color: var(--accent-strong);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.practice-sheet-intro {
  display: grid;
  gap: 14px;
  margin: 0 0 24px;
  padding: 16px 18px;
  border: 1px solid rgba(20, 49, 9, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.56);
}

.practice-sheet-intro .practice-facts {
  margin: 0;
  padding-top: 0;
  border-top: none;
}

.practice-sheet-intro .practice-facts + .practice-facts {
  padding-top: 14px;
  border-top: 1px solid rgba(20, 49, 9, 0.10);
}

.practice-sheet-close {
  align-self: flex-end;
  background: rgba(20, 49, 9, 0.08);
  border: 1px solid rgba(20, 49, 9, 0.20);
  border-radius: var(--radius);
  color: var(--accent-strong);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 7px 11px;
}

.practice-sheet-close:hover,
.practice-sheet-close:focus-visible {
  background: var(--accent-strong);
  color: #F7F7F7;
}

.practice-sheet-body {
  font-size: 17px;
}

.practice-sheet-body p {
  margin-bottom: 16px;
}

.practice-sheet-footer {
  margin-top: 26px;
}

/* ─── Card ─────────────────────────────────────────────────────── */
.tip-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: visible;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}

.tip-card-link {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  color: inherit;
  text-decoration: none;
  min-height: 180px;
}

.tip-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.tip-card.hidden { display: none; }

.tip-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
  margin-bottom: 6px;
}

.category-eyebrow {
  color: #336B29;
  display: inline-block;
  max-width: 100%;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
  opacity: 0.92;
}

.category-pill {
  display: inline-block;
  max-width: 100%;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  align-self: flex-start;
  vertical-align: top;
}

.tip-title {
  font-family: "Lora", serif;
  font-size: 24px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.tip-summary {
  color: var(--text-body);
  font-size: 16px;
  line-height: 1.65;
  flex: 1;
}

.tip-body {
  font-size: 16px;
  color: var(--text-body);
  line-height: 1.7;
  flex: 1;
}

.tip-body p { margin-bottom: 8px; }
.tip-body p:last-child { margin-bottom: 0; }
.tip-body em { color: var(--text); font-style: italic; }
.tip-body strong { color: var(--text); font-weight: 600; }

.tip-body code {
  font-family: "SF Mono", "Fira Code", Menlo, monospace;
  font-size: 14px;
  background: rgba(20, 49, 9, 0.12);
  border: 1px solid rgba(20, 49, 9, 0.10);
  border-radius: var(--radius);
  padding: 1px 5px;
  color: var(--accent-strong);
}

.tip-body pre {
  background: var(--surface);
  border: 1px solid rgba(20, 49, 9, 0.10);
  border-radius: var(--radius);
  padding: 12px 14px;
  overflow-x: auto;
  margin: 8px 0;
}

.tip-body pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  color: var(--accent-strong);
}

/* ─── Prompt block ─────────────────────────────────────────────── */
.prompt-block {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid rgba(20, 49, 9, 0.12);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 4px 0;
}

.prompt-text {
  font-family: "SF Mono", "Fira Code", Menlo, monospace;
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.6;
  flex: 1;
}

.copy-btn {
  flex-shrink: 0;
  background: rgba(20, 49, 9, 0.08);
  border: 1px solid rgba(20, 49, 9, 0.15);
  border-radius: var(--radius);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}

.copy-btn:hover {
  background: var(--accent-strong);
  color: #F7F7F7;
}

.tip-footer {
  margin-top: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.tip-footer-title {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.tip-source {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
}

.tip-source { color: var(--accent-strong); }
.tip-source:hover { color: var(--text); }

.tip-source-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ─── Category colors ─────────────────────────────────────────── */
.pill-cat-1,
.pill-cat-6,
.pill-cat-11 { background: #D0D6B3; color: #143109; }
.pill-cat-2,
.pill-cat-7 { background: #AAAE7F; color: #143109; }
.pill-cat-3,
.pill-cat-8 { background: #143109; color: #F7F7F7; }
.pill-cat-4,
.pill-cat-9 { background: #D0D6B3; color: #143109; }
.pill-cat-5,
.pill-cat-10,
.pill-cat-default { background: #143109; color: #F7F7F7; }

/* ─── Empty state ──────────────────────────────────────────────── */
.empty-state {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
  padding: 44px 24px;
  color: var(--accent-strong);
  background: rgba(20, 49, 9, 0.03);
  border: 1px dashed rgba(20, 49, 9, 0.24);
  border-radius: var(--radius);
}

.empty-state-title {
  color: var(--text);
  font-family: "Lora", serif;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.empty-state-audience {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 760px;
}

.empty-state-audience-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(20, 49, 9, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.empty-state-audience-link {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.empty-state-constraints {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 760px;
}

.empty-state-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(20, 49, 9, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  line-height: 1;
}

.empty-state-chip-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.empty-state-chip-value {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.empty-state-hint {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  max-width: 620px;
}

.loading-state {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 180px;
  width: 100%;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.loading-state::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid rgba(20, 49, 9, 0.18);
  border-top-color: var(--accent-strong);
  border-radius: 50%;
  animation: loading-spin 0.8s linear infinite;
}

@keyframes loading-spin {
  to { transform: rotate(360deg); }
}

/* ─── Scrollbar ────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(20, 49, 9, 0.25); border-radius: 999px; }

/* ─── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .main {
    padding: calc(var(--header-h) + 28px) 16px 24px;
    overflow-x: hidden;
    min-width: 0;
  }

  .main--library {
    padding: calc(var(--header-h) + 28px) 16px 24px;
  }

  .library-shell {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .library-sidebar {
    padding: 16px;
  }

  .library-controls {
    gap: 16px;
    margin-bottom: 24px;
  }

  .category-filter-head {
    display: none;
  }

  .library-hero-heading {
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
  }

  .library-hero-utility {
    justify-content: stretch;
    margin-bottom: 12px;
  }

  .library-role-select-inline {
    min-height: 52px;
    font-size: 24px;
    max-width: 100%;
    padding: 10px 42px 12px 16px;
    line-height: 1.2;
  }

  .category-filter-select-wrap {
    display: grid;
  }

  .category-filter-bar {
    display: none;
  }

  .grid {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .site-footer {
    padding-top: 24px;
  }

  .tip-card { min-width: 0; }

  .tip-body pre {
    max-width: 100%;
    overflow-x: auto;
  }

  .practice-facts {
    gap: 6px;
    margin: 18px 0 22px;
    padding-top: 14px;
  }

  .practice-fact-row {
    column-gap: 10px;
    grid-template-columns: 124px minmax(0, 1fr);
  }

  .brand-copy {
    gap: 4px;
  }

  .site-title {
    font-size: 21px;
  }

  .site-tagline {
    width: 100%;
    border-left: none;
    padding-left: 0;
    margin-left: 0;
  }

  header {
    height: auto;
    min-height: var(--header-h);
    position: static;
  }

  body.home-header-guard header {
    position: fixed;
  }

  .header-shell {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 16px 10px;
  }

  .site-nav {
    width: 100%;
    margin-left: 0;
    align-self: stretch;
    justify-content: flex-start;
    padding-top: 4px;
    min-height: 0;
  }

  .role-filter {
    margin-left: 0;
    justify-content: flex-start;
  }

  .role-filter--bar {
    width: calc(100% + 32px);
    margin: 8px -16px 0;
    padding: 10px 16px 0;
    border-top: 1px solid rgba(20, 49, 9, 0.10);
    background: none;
  }

  .role-filter-select {
    max-width: 170px;
  }

  .path-layout {
    --path-page-pad: 16px;
  }

  .path-main {
    padding: calc(var(--header-h) + 28px) var(--path-page-pad) 24px;
  }

  .path-main--home {
    padding-top: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .path-main--hero-top {
    padding-top: 0;
  }

  .main--library.path-main--hero-top {
    padding-top: 0;
  }

  .main--library.path-main--hero-top .library-hero {
    padding-top: 18px;
  }

  .path-hero {
    margin-bottom: 24px;
    padding: 56px 0 28px;
  }

  .path-hero--detail {
    padding-top: 0;
  }

  .path-hero-inner--detail {
    grid-template-columns: 1fr;
    padding-top: 0;
  }

  .path-hero--detail .path-hero-image {
    order: 1;
    display: block;
    grid-column: auto;
    grid-row: auto;
    width: 100vw;
    max-height: 240px;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    justify-self: stretch;
  }

  .path-hero--detail .back-link {
    order: 2;
    margin-top: 0;
  }

  .path-hero--detail .path-hero-copy {
    order: 3;
  }

  body.home-header-guard .path-hero {
    padding-top: calc(28px + var(--header-h));
  }

  .signals-hero {
    padding: 28px 0 34px;
  }

  .path-hero-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .path-hero-grid > :first-child {
    order: 1;
  }

  .path-hero-grid > :last-child {
    order: 2;
  }

  .path-hero-image {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }

  .path-hero h1 {
    font-size: 36px;
    margin-top: 0;
  }

  .signals-hero h1 {
    font-size: 30px;
    margin-top: 0;
  }

  .playbook-hero h1 {
    font-size: 36px;
  }

  .library-hero h1 {
    font-size: 36px;
  }

  .library-hero-inner {
    padding: 0 16px;
  }

  .section-hero-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .section-hero-grid > :first-child {
    order: 1;
  }

  .section-hero-grid > :last-child {
    order: 2;
  }

  .section-hero-image {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }

  .playbook-category-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .path-grid {
    grid-template-columns: 1fr;
  }

  .path-practice-grid {
    grid-template-columns: 1fr;
  }

  .practice-sheet-overlay {
    align-items: flex-end;
  }

  .practice-sheet {
    width: 100%;
    height: auto;
    max-height: 86vh;
    border-left: none;
    border-top: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    transform: translateY(0);
  }

  .practice-sheet-overlay.hidden .practice-sheet {
    transform: translateY(100%);
  }

  .practice-sheet-content {
    padding: 20px 16px 28px;
  }

  .practice-sheet-header h2 {
    font-size: 34px;
  }
}
