/* Smart Cycle Care Suite — Titration, Side-Effect Insights, Lab Safety & TRT Timing,
   Peptide Safety & BUD, Friends/Challenges Leaderboard, Clinician Share Portal,
   Web/Email Reminders & Education Library. */

.cs-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg, 20px);
  padding: clamp(16px, 2.4vw, 22px);
  margin-top: 16px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}
.cs-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  margin-bottom: 12px;
}
.cs-card-head h2,
.cs-card-head h3 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}
.cs-sub {
  margin: -4px 0 14px;
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.cs-grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.cs-grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.cs-grid4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 760px) {
  .cs-grid2, .cs-grid3, .cs-grid4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.cs-kpi {
  background: var(--surface-2);
  border-radius: 14px;
  padding: 12px 14px;
  display: grid;
  gap: 2px;
}
.cs-kpi span {
  font-size: .75rem;
  font-weight: 650;
  color: var(--text-muted);
}
.cs-kpi b {
  font-size: 1.125rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.cs-kpi small {
  font-size: .75rem;
  color: var(--text-muted);
}

/* Titration ladder */
.cs-ladder {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}
.cs-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: .8125rem;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1.5px solid transparent;
}
.cs-step.done {
  background: var(--ok-soft, oklch(0.95 0.04 155));
  color: var(--ok, #1f7a3f);
}
.cs-step.cur {
  background: var(--cobalt-soft, oklch(0.94 0.04 266));
  color: var(--cobalt-deep, var(--cobalt));
  border-color: var(--cobalt);
}
.cs-step.next {
  border-color: var(--line-strong);
  color: var(--text);
}
.cs-verdict {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border-left: 4px solid var(--cobalt);
  margin-top: 10px;
}
.cs-verdict.ok { border-left-color: var(--ok, #1f7a3f); }
.cs-verdict.warn { border-left-color: oklch(0.68 0.16 65); }
.cs-verdict.bad { border-left-color: var(--bad, #c93b2b); }
.cs-verdict p {
  margin: 2px 0 0;
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Side-effect insights & relief tips */
.cs-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 12px;
}
.cs-tab {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: .8125rem;
  font-weight: 650;
  cursor: pointer;
}
.cs-tab[aria-pressed="true"] {
  background: var(--cobalt);
  border-color: var(--cobalt);
  color: #fff;
}
.cs-tips {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  font-size: .875rem;
  line-height: 1.45;
}
.cs-timing-chart {
  margin: 0;
  padding: 14px;
  background: var(--surface-2);
  border-radius: 14px;
}
.cs-chart-labels {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: .75rem;
  line-height: 1.3;
}
.cs-chart-labels strong { color: var(--text); }
.cs-day-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: clamp(4px, 1.2vw, 10px);
}
.cs-day-column {
  display: grid;
  grid-template-rows: 1.2em 52px auto;
  justify-items: center;
  gap: 5px;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}
.cs-day-count {
  color: var(--text);
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.2;
}
.cs-day-track {
  display: flex;
  align-items: flex-end;
  width: min(28px, 100%);
  height: 52px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface);
}
.cs-day-track i {
  display: block;
  width: 100%;
  height: var(--bar-height);
  border-radius: 8px 8px 2px 2px;
  background: var(--cobalt);
}
.cs-day-label {
  color: var(--text-muted);
  font-size: .75rem;
  line-height: 1.2;
}
.cs-chart-note,
.cs-chart-empty {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: .8125rem;
  line-height: 1.45;
}
@media (max-width: 480px) {
  .cs-timing-chart { padding: 12px 10px; }
  .cs-day-bars { gap: 3px; }
  .cs-day-track { width: min(24px, 100%); }
  .cs-day-count, .cs-day-label { font-size: .6875rem; }
}

/* Lab safety & TRT draw timing */
.cs-safety-head {
  align-items: flex-start;
  margin-bottom: 14px;
}
.cs-safety-head .cs-sub {
  margin: 3px 0 0;
}
.cs-safety-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.cs-safety-badge {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--cobalt-soft, oklch(0.94 0.04 266));
  color: var(--cobalt);
}
.cs-safety-badge svg {
  width: 20px;
  height: 20px;
}
.cs-alert-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}
.cs-alert {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px 12px;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  border-left-width: 3px;
  background: var(--surface);
}
.cs-alert-ic {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  display: grid;
  place-items: center;
}
.cs-alert-ic svg {
  width: 18px;
  height: 18px;
}
.cs-alert-body strong {
  display: block;
  font-size: .9375rem;
  line-height: 1.35;
}
.cs-alert-body p {
  margin: 3px 0 0;
  font-size: .8125rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.cs-alert.hi {
  background: oklch(0.975 0.022 25);
  border-color: oklch(0.87 0.07 25);
  border-left-color: var(--coral-deep, #c93b2b);
}
.cs-alert.hi .cs-alert-ic { color: var(--coral-deep, #c93b2b); }
.cs-alert.warn {
  background: oklch(0.98 0.025 75);
  border-color: oklch(0.88 0.075 75);
  border-left-color: var(--warn, #d99a2b);
}
.cs-alert.warn .cs-alert-ic { color: var(--amber-ink, #8a5a00); }
.cs-alert.ok {
  background: oklch(0.975 0.02 155);
  border-color: oklch(0.88 0.05 155);
  border-left-color: var(--ok, #1f7a3f);
}
.cs-alert.ok .cs-alert-ic { color: var(--ok, #1f7a3f); }
@media (max-width: 600px) {
  .cs-alert { grid-template-columns: 20px minmax(0, 1fr); }
  .cs-alert .cs-pill { grid-column: 2; justify-self: start; }
}
.cs-timing-grid .cs-kpi {
  align-content: start;
  grid-template-rows: auto auto 1fr;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.cs-kpi-top {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}
.cs-kpi-top svg {
  width: 15px;
  height: 15px;
  flex: none;
  opacity: .85;
}
.cs-timing-grid .cs-kpi-primary .cs-kpi-top {
  color: var(--cobalt-deep, var(--cobalt));
}
.cs-timing-grid .cs-kpi b {
  font-size: 1.0625rem;
  line-height: 1.25;
}
.cs-timing-grid .cs-kpi small {
  line-height: 1.45;
}
.cs-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 750;
  max-width: 100%;
  white-space: normal;
  background: var(--surface-2);
  color: var(--text);
}
.cs-pill.ok { background: var(--ok-soft, oklch(0.94 0.04 155)); color: var(--ok, #1f7a3f); }
.cs-pill.warn { background: var(--warn-soft, oklch(0.94 0.06 75)); color: var(--amber-ink, oklch(0.45 0.14 65)); }
.cs-pill.bad { background: var(--bad-soft, oklch(0.94 0.05 25)); color: var(--bad, #c93b2b); }
.cs-pill.cobalt { background: var(--cobalt-soft, oklch(0.94 0.04 266)); color: var(--cobalt-deep, var(--cobalt)); }

/* Peptide BUD & cycle planner */
.cs-bud-list {
  display: grid;
  gap: 10px;
}
.cs-bud-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

/* Friends, challenges & leaderboard */
.cs-card.fc { padding: clamp(18px, 3vw, 28px); border-radius: var(--r-lg); }
.fc-head h2 { margin: 0; font-size: clamp(1.25rem, 2.2vw, 1.5rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.fc-head p { margin: 8px 0 0; max-width: 62ch; font-size: .9375rem; line-height: 1.5; color: var(--text-muted); }

.fc-invite {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px 24px;
  margin: 20px 0 22px;
  padding: clamp(16px, 2.6vw, 24px);
  border-radius: var(--r-lg);
  background: var(--cobalt-soft);
  border: 1px solid var(--line);
  color: var(--ink);
}
.fc-code { display: grid; grid-template-columns: auto auto; justify-content: start; align-items: center; column-gap: 12px; row-gap: 2px; min-width: 0; }
.fc-code > span { grid-column: 1 / -1; font-size: .8125rem; font-weight: 600; color: var(--text-muted); line-height: 1.2; }
.fc-code > b { font-size: clamp(1.25rem, 2.4vw, 1.625rem); font-weight: 800; letter-spacing: .02em; line-height: 1.1; color: var(--lime-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fc-copy {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 50%; cursor: pointer; line-height: 1;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink); transition: background-color .15s;
}
.fc-copy:hover { background: var(--surface-2); }
.fc-add { display: flex; gap: 8px; min-width: 0; }
.fc-input {
  flex: 1; min-width: 0; height: 46px; padding: 0 18px; border-radius: 999px; font: inherit; font-size: .9375rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line-strong);
}
.fc-input::placeholder { color: var(--text-muted); font-size: .875rem; }
.fc-input:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-soft); }
.fc-addbtn {
  flex: none; min-height: 46px; padding: 0 20px; border: 0; border-radius: 999px; font: inherit; font-size: .9375rem; font-weight: 800; white-space: nowrap;
  background: var(--lime); color: var(--ink); cursor: pointer; transition: filter .15s;
}
.fc-addbtn:hover { filter: brightness(.95); }
.fc-copy:focus-visible, .fc-addbtn:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }

.fc-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; margin: 0 0 14px; padding: 4px; border-radius: 999px; background: var(--surface-2); }
.fc-tabs .cs-tab { min-height: 36px; padding: 0 16px; border: 0; background: transparent; color: var(--text-muted); font-weight: 700; }
.fc-tabs .cs-tab:hover:not([aria-pressed="true"]) { color: var(--text); }
.fc-tabs .cs-tab[aria-pressed="true"] { background: var(--ink); color: #fff; }

.fc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fc-row {
  display: grid; grid-template-columns: 28px 40px minmax(0, 1.2fr) minmax(100px, 1fr) minmax(84px, auto) 26px; align-items: center; gap: 14px;
  padding: 12px 16px 12px 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface);
}
.fc-row.me { background: var(--cobalt-soft); border-color: oklch(0.45 0.25 266 / .35); }
.fc-rank { font-size: .875rem; font-weight: 800; color: var(--text-muted); text-align: center; }
.fc-row.top1 .fc-rank { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--lime); color: var(--ink); }
.fc-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--surface-2); color: var(--ink); }
.fc-row.me .fc-av { background: var(--cobalt); color: #fff; }
.fc-who { min-width: 0; display: grid; gap: 1px; }
.fc-who strong { font-size: .9375rem; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-who span { font-size: .8125rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.fc-row.me .fc-bar { background: oklch(1 0 0 / .7); }
.fc-bar i { display: block; height: 100%; border-radius: 999px; background: var(--cobalt); }
.fc-val { font-size: .9375rem; font-weight: 800; text-align: right; white-space: nowrap; }
.fc-x { width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text-muted); font: inherit; font-size: 1.125rem; line-height: 1; cursor: pointer; }
.fc-x:hover { background: var(--surface-2); color: var(--text); }
.fc-x:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 1px; }

.fc-h3 { margin: 28px 0 12px; font-size: 1.0625rem; font-weight: 800; letter-spacing: -0.01em; }
.fc-chals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.fc-chal {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); grid-template-rows: 1fr auto; gap: 4px 14px; align-content: stretch; padding: 16px;
  border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface);
}
.fc-chal.on { border-color: oklch(0.62 0.17 132 / .5); }
.fc-ring {
  position: relative; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; grid-row: 1 / 2;
  background: conic-gradient(var(--cobalt) calc(var(--p) * 1%), var(--surface-2) 0);
}
.fc-chal.on .fc-ring { background: conic-gradient(var(--lime-deep) calc(var(--p) * 1%), var(--surface-2) 0); }
.fc-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface); }
.fc-ring b { position: relative; font-size: .8125rem; font-weight: 800; }
.fc-chal-t { display: grid; gap: 3px; align-content: center; min-width: 0; }
.fc-chal-t strong { font-size: .9375rem; font-weight: 750; line-height: 1.3; }
.fc-chal-t span { font-size: .8125rem; line-height: 1.45; color: var(--text-muted); }
.fc-chal-f { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.fc-state { font-size: .8125rem; font-weight: 650; color: var(--text-muted); }
.fc-join {
  min-height: 38px; padding: 0 16px; border-radius: 999px; font: inherit; font-size: .8125rem; font-weight: 800; cursor: pointer;
  border: 1px solid var(--cobalt); background: var(--cobalt); color: #fff; white-space: nowrap;
}
.fc-join:hover { filter: brightness(1.08); }
.fc-join.on { background: transparent; border-color: var(--line-strong); color: var(--ok, #1f7a3f); }
.fc-join.on:hover { background: var(--surface-2); filter: none; }
.fc-join:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }

@media (max-width: 760px) {
  .fc-invite { grid-template-columns: minmax(0, 1fr); }
  .fc-row { grid-template-columns: 26px 36px minmax(0, 1fr) auto 24px; gap: 4px 10px; padding: 12px; }
  .fc-av { width: 36px; height: 36px; }
  .fc-bar { grid-column: 3 / -1; grid-row: 2; margin-top: 6px; }
  .fc-val { font-size: .875rem; }
  .fc-who span { white-space: normal; }
  .fc-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; border-radius: 16px; }
  .fc-tabs .cs-tab { padding: 0 6px; text-align: center; line-height: 1.15; min-height: 40px; }
}
@media (max-width: 420px) {
  .fc-add { flex-direction: column; }
  .fc-addbtn { width: 100%; }
}

/* Clinician Read-Only Banner */
.cs-clinician-banner {
  background: linear-gradient(135deg, #161a2e 0%, #2a33d6 100%);
  color: #fff;
  padding: 16px 20px;
  border-radius: 16px;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cs-clinician-banner strong {
  display: block;
  font-size: 1.05rem;
}
.cs-clinician-banner span {
  font-size: .8125rem;
  opacity: .88;
}

/* Clinician share opens a chart only. The editor stays hidden. */
body.share-mode > :not(#sharePortal) { display: none !important; }
body.share-mode { background: var(--bg, #f4f1ea); }
.share-portal {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 16px 48px;
  color: var(--ink, #1c1915);
}
.share-head h1 { margin: 0 0 8px; font-size: clamp(1.35rem, 4vw, 1.75rem); line-height: 1.2; letter-spacing: -.02em; }
.share-head p, .share-who, .share-state { margin: 0; line-height: 1.5; }
.share-who { margin-top: 18px; font-weight: 650; }
.share-state { padding: 28px 0; }
.share-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.share-grid article, .share-labs {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  border-radius: 16px;
  background: var(--surface, #fff);
}
.share-grid h2, .share-labs h2 { margin: 0 0 6px; font-size: .8125rem; font-weight: 650; }
.share-grid p { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.share-labs { margin-top: 12px; }
.share-labs ul { list-style: none; margin: 0; padding: 0; }
.share-labs li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid color-mix(in srgb, currentColor 10%, transparent); }
.share-actions { margin-top: 18px; }
@media (max-width: 560px) {
  .share-grid { grid-template-columns: 1fr; }
  .share-actions { display: flex; flex-direction: column; }
  .share-actions .btn { width: 100%; }
}
@media print {
  body.share-mode > :not(#sharePortal) { display: none !important; }
  .share-actions { display: none !important; }
}

/* Medication reference */
#vLearn { --la-body: max(1rem, 16px); }
#vLearn h1, #vLearn .la-reader-nav { scroll-margin-top: 90px; }
#vLearn a { text-underline-offset: .2em; }
#vLearn :is(a, button, summary, input):focus-visible { outline: 3px solid var(--cobalt); outline-offset: 4px; }
.la-header { margin-bottom: 16px; }
.la-header h1 { margin: 0; font-size: clamp(2rem, 3.5vw, 2.75rem); letter-spacing: -.03em; line-height: 1.15; }
.la-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.la-intro p { max-width: 52ch; margin: 0; font-size: var(--la-body); line-height: 1.6; color: var(--text-muted); }
.la-beginner { display: flex; justify-content: space-between; align-items: center; gap: 24px; max-width: 900px; padding: 20px 24px; margin: 0 0 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.la-beginner h2 { margin: 0 0 6px; font-size: max(1.125rem, 18px); line-height: 1.35; letter-spacing: -.015em; }
.la-beginner p { max-width: 64ch; margin: 0; font-size: var(--la-body); line-height: 1.55; color: var(--text-muted); }
.la-beginner > a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; flex: 0 0 auto; padding: 8px 14px; border: 1px solid var(--cobalt); border-radius: 8px; color: var(--cobalt); font-weight: 650; text-align: center; text-decoration: none; }
.la-beginner > a:hover { background: var(--cobalt); color: #fff; }
.la-help { display: inline-flex; align-items: center; min-height: 44px; color: var(--cobalt); font-size: max(.875rem, 14px); font-weight: 650; text-decoration: underline; flex-shrink: 0; }
.la-search { max-width: 520px; margin-bottom: 12px; }
.la-search label { display: block; margin-bottom: 8px; font-weight: 650; }
.la-search input { min-height: 48px; width: 100%; font-size: var(--la-body); }
.la-count { font-size: max(.875rem, 14px); color: var(--text-muted); margin: 14px 0 18px; }
.la-tabs { display: grid; grid-template-columns: repeat(3, minmax(max-content, 1fr)); gap: 4px; width: 100%; max-width: 580px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); margin-bottom: 20px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--text-muted) var(--surface-2); }
.la-tabs a { display: flex; justify-content: center; align-items: center; min-width: 0; min-height: 44px; padding: 8px 4px; color: var(--text-muted); font-size: max(.875rem, 14px); font-weight: 650; text-decoration: none; white-space: nowrap; border-radius: 8px; }
.la-tabs a:hover { background: var(--cobalt-soft); color: var(--cobalt); }
.la-tabs a[aria-current] { background: var(--cobalt); color: #fff; }
#vLearn .la-tabs a:focus-visible { outline: 2px solid currentColor; outline-offset: -4px; }
.la-search-tools { display: flex; align-items: end; flex-wrap: wrap; gap: 16px; max-width: 900px; }
.la-search-tools .la-search { flex: 1 1 300px; margin: 0; }
.la-filter { flex: 1 1 200px; max-width: 300px; }
.la-filter label { display: block; margin-bottom: 8px; font-weight: 650; }
.la-filter select { width: 100%; min-height: 48px; font-size: var(--la-body); }
.la-evidence-note { max-width: 72ch; margin: 24px 0 0; font-size: var(--la-body); line-height: 1.65; color: var(--text-muted); }
.la-index { border-top: 1px solid var(--line); }
.la-entry { display: flex; justify-content: space-between; align-items: start; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.la-entry > div { max-width: 72ch; min-width: 0; }
.la-entry h2 { margin: 0 0 8px; font-size: max(1.25rem, 20px); line-height: 1.3; letter-spacing: -.02em; }
.la-entry:hover h2 { color: var(--cobalt); text-decoration: underline; }
.la-entry-description { margin: 0; font-size: var(--la-body); color: var(--text-muted); line-height: 1.65; }
.la-aliases { font-size: max(.875rem, 14px); color: var(--text-muted); margin: 0 0 12px; line-height: 1.6; overflow-wrap: anywhere; }
.la-status { flex: 0 0 auto; max-width: 190px; padding: 5px 9px; margin-top: 2px; background: var(--surface-2); color: var(--text); font-size: max(.8125rem, 13px); line-height: 1.5; border-radius: 5px; }
.la-status[data-evidence="uncertain"] { background: var(--cobalt-soft); color: var(--cobalt); }
.la-status-beginner { background: var(--cobalt-soft); color: var(--cobalt); font-weight: 650; }
.la-footer { max-width: 72ch; margin-top: 28px; font-size: max(.875rem, 14px); color: var(--text-muted); line-height: 1.6; }
.la-disclaimer { margin-top: 12px; font-size: max(.875rem, 14px); line-height: 1.65; color: var(--text-muted); }
.la-disclaimer summary, .la-sources summary { min-height: 44px; padding-block: 10px; cursor: pointer; font-weight: 650; color: var(--text); }
.la-reader-nav { position: sticky; top: var(--la-topbar, 0px); z-index: calc(var(--z-sticky) - 1); display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); margin-bottom: 24px; background: var(--surface); }
#vLearn .la-reader-nav { scroll-margin-top: var(--la-topbar, 0px); }
#vLearn .la-reader-nav .btn { min-width: 0; min-height: 48px; padding: 10px 12px; font-size: max(.875rem, 14px); line-height: 1.25; white-space: normal; overflow-wrap: anywhere; text-align: center; text-decoration: none; }
.la-reader-nav .la-back { background: var(--cobalt-soft); border-color: var(--cobalt); color: var(--cobalt); }
.la-back svg { flex: 0 0 auto; transform: rotate(90deg); }
#vLearn .la-lesson h1, #vLearn .la-profile-section h2 { scroll-margin-top: calc(var(--la-topbar, 0px) + var(--la-reader-height, 0px) + 12px); }
.la-reader { display: grid; grid-template-columns: minmax(0, 72ch) minmax(190px, 1fr); gap: 48px; align-items: start; }
.la-lesson { min-width: 0; }
.la-lesson h1 { margin: 0 0 14px; font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.2; text-wrap: balance; letter-spacing: -.03em; }
.la-deck { color: var(--text-muted); font-size: max(1.125rem, 18px); line-height: 1.6; margin: 0 0 12px; }
.la-position { font-size: max(.875rem, 14px); color: var(--text-muted); margin: 0 0 20px; line-height: 1.5; }
.la-profile-section { margin-top: 32px; }
.la-profile-section h2 { font-size: max(1.25rem, 20px); line-height: 1.4; margin: 0 0 12px; letter-spacing: -.02em; scroll-margin-top: 90px; }
.la-profile-section p { margin: 0; font-size: var(--la-body); line-height: 1.75; }
.la-practical { padding-left: 22px; display: grid; gap: 16px; margin: 0; font-size: var(--la-body); line-height: 1.7; }
.la-practical .cs-cite a { color: var(--cobalt); }
.la-sources { margin-top: 28px; border-top: 1px solid var(--line); font-size: max(.875rem, 14px); line-height: 1.65; color: var(--text-muted); overflow-wrap: anywhere; }
.la-sources ol { padding-left: 22px; display: grid; gap: 10px; }
.la-sources a { color: var(--cobalt); }
.la-contents { position: sticky; top: calc(var(--la-topbar, 0px) + var(--la-reader-height, 0px) + 12px); padding-top: 6px; }
.la-contents h2 { font-size: max(1.125rem, 18px); line-height: 1.4; margin: 0 0 14px; }
.la-contents nav { display: grid; gap: 6px; }
.la-contents nav button { padding: 12px; min-height: 44px; width: 100%; border: 0; background: transparent; text-align: left; font-size: max(.9375rem, 15px); line-height: 1.5; color: var(--text-muted); border-radius: 8px; cursor: pointer; }
.la-contents nav button:hover { background: var(--surface-2); color: var(--cobalt); }
.la-contents > p { margin-top: 22px; font-size: max(.875rem, 14px); line-height: 1.6; color: var(--text-muted); }
.la-empty { grid-column: 1 / -1; padding-block: 30px; font-size: var(--la-body); line-height: 1.6; }
.la-search-help { grid-column: 1 / -1; padding: 20px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface); text-decoration: none; }
.la-search-help h2 { margin: 0 0 8px; font-size: max(1.25rem, 20px); color: var(--cobalt); }
.la-search-help p { margin: 0; font-size: var(--la-body); line-height: 1.6; }
@media (max-width: 900px) {
  .la-reader { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .la-contents { position: static; border-top: 1px solid var(--line); padding-top: 24px; }
}
@media (max-width: 560px) {
  .la-intro { flex-direction: column; gap: 8px; }
  .la-beginner { align-items: stretch; flex-direction: column; gap: 12px; padding: 18px; }
  .la-beginner > a { width: 100%; }
  .la-entry { flex-direction: column; gap: 12px; padding: 22px 0; }
  .la-status { max-width: 100%; }
  .la-search-tools { display: grid; gap: 12px; }
  .la-filter { max-width: none; }
  .la-reader-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 8px; margin-bottom: 18px; }
}
.cs-comp-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.cs-cite { font-size: 11px; color: var(--muted, #667085); }
.cs-refs { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(127,127,127,.25); font-size: 12px; line-height: 1.4; }
.cs-refs ol { margin: 4px 0 0; padding-left: 18px; }
.cs-refs a { color: inherit; text-decoration: underline; word-break: break-word; }

.cs-disclaimer { margin: 0 0 18px; padding: 0; max-width: 68ch; font-size: 13px; line-height: 1.5; color: var(--muted, #667085); }
.cs-disclaimer b { color: var(--ink, inherit); font-weight: 600; }
