/* ---------- Tokens ---------- */
:root {
  --bg: #0d1418;
  --bg-elev: #131c22;
  --bg-soft: #17222a;
  --ink: #f4ede4;
  --ink-muted: #aaa49a;
  --ink-faint: #6a655d;
  --accent: #e08a5b;
  --accent-deep: #c0683c;
  --rule: rgba(244, 237, 228, 0.12);
  --rule-strong: rgba(244, 237, 228, 0.25);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max: 1180px;
  --max-narrow: 760px;
  --radius: 4px;
  --radius-lg: 10px;

  --section-pad: clamp(4rem, 9vw, 8rem);

  /*
   * Vertical rhythm tokens, backed by Open Props sizes
   * (https://open-props.style/#sizes). Open Props is loaded via <link>
   * in each page's head; the second value in each var() is a fallback
   * matching the Open Props default so the layout stays sane if the
   * CDN ever fails to load.
   */
  --space-xs: var(--size-2, 0.5rem);
  --space-sm: var(--size-4, 1rem);
  --space-md: var(--size-6, 1.5rem);
  --space-lg: var(--size-fluid-3, clamp(1.5rem, 3vw, 2rem));
  --space-xl: var(--size-fluid-4, clamp(2rem, 4vw, 3rem));
  --space-2xl: var(--size-fluid-5, clamp(4rem, 5vw, 5rem));
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
  font-feature-settings: "kern" 1, "liga" 1;
}
img, svg, iframe { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}
.container--narrow { max-width: var(--max-narrow); }
.center { text-align: center; }
.section { padding: var(--section-pad) 0; border-top: 1px solid var(--rule); }
.section--dark { background: var(--bg-elev); border-top-color: transparent; }
.section--cta { background: var(--bg-soft); }

/* ---------- Type ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.015em; line-height: 1.1; margin: 0; color: var(--ink); }
h1 em, h2 em { font-style: italic; font-weight: 400; color: var(--accent); }
p { margin: 0; }
.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 1.25rem;
}
.eyebrow--accent { color: var(--accent); }
.lead { font-size: 1.15rem; color: var(--ink-muted); line-height: 1.65; max-width: 56ch; margin: 0 auto; }
.center .lead { margin: 0 auto; }

.section__title {
  font-size: clamp(2rem, 4.2vw, 3rem);
  margin-bottom: 3rem;
  max-width: 22ch;
}
.center .section__title { margin-left: auto; margin-right: auto; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 20, 24, 0.85);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.nav--minimal { background: transparent; backdrop-filter: none; border-bottom: 0; }
.nav__inner { display: flex; align-items: center; justify-content: space-between; padding-top: 1.1rem; padding-bottom: 1.1rem; }
.nav__links { display: flex; align-items: center; gap: 2rem; }
.nav__links a { font-size: 0.95rem; color: var(--ink-muted); transition: color 0.15s ease; }
.nav__links a:hover { color: var(--ink); }
.nav__links .btn { color: var(--bg); }
.nav__toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav__toggle span { width: 22px; height: 1.5px; background: var(--ink); display: block; transition: 0.2s; }
.nav__mobile { display: none; flex-direction: column; padding: 1rem 1.5rem 1.5rem; gap: 1rem; border-top: 1px solid var(--rule); }
.nav__mobile a { font-size: 1rem; color: var(--ink-muted); }
.nav__mobile .btn { align-self: flex-start; color: var(--bg); }

@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  .nav__mobile[data-open="true"] { display: flex; }
}

/* ---------- Logo ---------- */
.logo {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--serif); font-weight: 600; font-size: 1.25rem;
  letter-spacing: -0.01em; color: var(--ink);
}
.logo__mark {
  background: var(--accent);
  color: var(--bg);
  padding: 0.18em 0.5em;
  border-radius: var(--radius);
  font-size: 0.85em;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.logo__divider { width: 14px; height: 1px; background: var(--ink-faint); }
.logo__word { letter-spacing: 0.04em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  /* Uses Open Props sizes for consistent padding rhythm. */
  padding: var(--size-3, 0.75rem) var(--size-6, 1.5rem);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: var(--bg); }
.btn--primary:hover { background: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn--ghost:hover { border-color: var(--ink); background: rgba(244, 237, 228, 0.04); }
.btn--small { padding: var(--size-2, 0.5rem) var(--size-5, 1.25rem); font-size: 0.88rem; background: var(--accent); color: var(--bg); }
.btn--small:hover { background: var(--ink); }
.btn--large { padding: var(--size-4, 1rem) var(--size-7, 1.75rem); font-size: 1.05rem; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--size-5, 1.25rem);
  margin-top: var(--size-9, 2.25rem);
}
@media (max-width: 540px) {
  .cta-row { gap: var(--size-3, 0.75rem); }
  .cta-row .btn { width: 100%; }
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(5rem, 11vw, 9rem) 0 clamp(4rem, 9vw, 7rem);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -30%; right: -10%;
  width: 60vw; height: 60vw; max-width: 700px; max-height: 700px;
  background: radial-gradient(circle at center, rgba(224, 138, 91, 0.18), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero__title {
  font-size: clamp(2.5rem, 6.5vw, 4.75rem);
  font-weight: 400;
  line-height: 1.04;
  max-width: 18ch;
  margin-bottom: 1.75rem;
  letter-spacing: -0.02em;
}
.hero__sub {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--ink-muted);
  max-width: 56ch;
  line-height: 1.55;
}

/* ---------- Problem ---------- */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.problem {
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
}
.problem__num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--accent);
  display: block;
  margin-bottom: 1rem;
}
.problem h3 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}
.problem p { color: var(--ink-muted); font-size: 0.98rem; }

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 2rem;
}
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem 2rem;
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.step:first-child { border-top-color: var(--rule-strong); }
.step__num {
  font-family: var(--serif);
  font-size: 2.5rem;
  line-height: 1;
  color: var(--accent);
  font-weight: 400;
  min-width: 2.5rem;
}
.step h3 { font-size: 1.5rem; margin-bottom: 0.6rem; font-weight: 500; }
.step p { color: var(--ink-muted); max-width: 60ch; }

@media (max-width: 600px) {
  .step { grid-template-columns: 1fr; gap: 0.5rem; }
  .step__num { font-size: 2rem; }
}

/* ---------- Packages ---------- */
.packages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.pkg {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  display: flex; flex-direction: column; gap: 1.25rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.pkg:hover { transform: translateY(-2px); border-color: var(--rule-strong); }
.pkg--featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(224, 138, 91, 0.08), var(--bg-elev) 60%);
}
.pkg__badge {
  position: absolute;
  top: -0.7rem; left: 2rem;
  background: var(--accent);
  color: var(--bg);
  padding: 0.25rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 999px;
}
.pkg__head h3 { font-size: 1.5rem; font-weight: 500; margin-bottom: 0.4rem; }
.pkg__price { font-family: var(--serif); color: var(--ink-muted); font-size: 1rem; }
.pkg__price span { color: var(--ink); font-size: 1.5rem; font-weight: 500; margin-right: 0.25rem; }
.pkg__lead { color: var(--ink-muted); font-size: 0.98rem; }
.pkg__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.pkg__list li {
  padding-left: 1.25rem;
  position: relative;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.5;
}
.pkg__list li::before {
  content: "";
  position: absolute; left: 0; top: 0.65em;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.pkg .btn { margin-top: auto; align-self: flex-start; }
.packages__foot {
  text-align: center;
  margin-top: 2.5rem;
  color: var(--ink-muted);
  font-style: italic;
  font-family: var(--serif);
}

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 0; }
.faq__item {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 0;
}
.faq__item:last-child { border-bottom: 1px solid var(--rule); }
.faq__item summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding-right: 0.5rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  font-family: var(--sans);
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--accent);
  transition: transform 0.2s ease;
  line-height: 1;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p {
  color: var(--ink-muted);
  margin-top: 0.85rem;
  max-width: 70ch;
  font-size: 0.98rem;
}

/* ---------- CTA ---------- */
.section--cta .section__title { font-size: clamp(2.25rem, 5vw, 3.5rem); }
.section--cta .lead { margin-bottom: 2.5rem; }
.cta-secondary { margin-top: var(--size-5, 1.25rem); font-size: 0.95rem; color: var(--ink-muted); }

/* ---------- Footer ---------- */
.footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--rule);
  background: var(--bg);
}
.footer__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}
.footer__nav { display: flex; flex-wrap: wrap; gap: 1.75rem; }
.footer__nav a { color: var(--ink-muted); font-size: 0.95rem; }
.footer__nav a:hover { color: var(--ink); }
.footer__email { color: var(--accent); font-weight: 500; }
.footer__legal {
  margin-top: 1.5rem;
  color: var(--ink-faint);
  font-size: 0.85rem;
}

/* ---------- Book page ---------- */
.book { padding: clamp(3rem, 7vw, 5rem) 0 clamp(4rem, 8vw, 6rem); }
.book__title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin-bottom: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.book__checklist {
  list-style: none; padding: 0; margin: 2.5rem 0;
  display: grid; gap: 1rem;
}
.book__checklist li {
  padding-left: 2rem; position: relative;
  color: var(--ink-muted); font-size: 1rem;
}
.book__checklist li strong { color: var(--ink); margin-right: 0.5rem; font-weight: 600; }
.book__checklist li::before {
  content: "→";
  position: absolute; left: 0; top: 0;
  color: var(--accent);
  font-weight: 700;
}
.calendly-wrap {
  margin: 2.5rem 0 1.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  min-height: 720px;
}
.calendly-wrap iframe {
  width: 100%;
  min-height: 720px;
  border: 0;
}
.book__fallback {
  color: var(--ink-muted);
  font-size: 0.92rem;
  text-align: center;
}
.book__fallback a { color: var(--accent); }

/* ---------- Thanks page ---------- */
.page--thanks { background: var(--bg); }
.thanks { padding: clamp(4rem, 10vw, 8rem) 0; }
.thanks__title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 400;
  margin-bottom: 2rem;
  line-height: 1.05;
}
.thanks__card {
  margin: 3.5rem 0;
  padding: 2.5rem;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  text-align: left;
}
.thanks__card h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  font-weight: 500;
}
.thanks__card p { color: var(--ink-muted); margin-bottom: 1rem; }
.thanks__card ul {
  margin: 1.25rem 0;
  padding-left: 1.25rem;
  display: grid; gap: 0.75rem;
  color: var(--ink);
}
.thanks__card ul li { line-height: 1.55; }
.thanks__card ul li::marker { color: var(--accent); }
.thanks__note { font-style: italic; font-family: var(--serif); color: var(--ink-muted); }

/* ---------- Selection / focus ---------- */
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* ---------- Lead variants ---------- */
.lead--left { margin-left: 0; }

/* ---------- Library page ---------- */
.library-hero {
  padding: clamp(3.5rem, 7vw, 5rem) 0 var(--space-lg);
}
.library-hero h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  max-width: 22ch;
}
.library__cta-row { margin-top: var(--space-lg); }
.library__hero-meta {
  margin: var(--size-7, 1.75rem) 0 0;
  color: var(--ink-faint);
  font-size: 0.92rem;
  line-height: 1.6;
}
.library__cta-wrap { padding-bottom: var(--space-2xl); padding-top: var(--space-xl); }

/* Section heading shared across library blocks */
.library__anatomy,
.library__inventory,
.library__install-section {
  margin: var(--space-2xl) auto;
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--rule);
}
.library__anatomy h2,
.library__inventory h2,
.library__install-section h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.7rem;
  margin: 0 0 var(--size-7, 1.75rem);
  color: var(--ink);
  letter-spacing: -0.015em;
}

/* Anatomy: example SKILL.md */
.library__anatomy-lead {
  margin: 0 0 var(--size-8, 2rem);
  color: var(--ink-muted);
  font-size: 1.02rem;
  line-height: 1.7;
  max-width: 60ch;
}
.library__anatomy-note {
  margin: var(--size-7, 1.75rem) 0 0;
  color: var(--ink-faint);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* Code block + figure caption with file path */
.library__code-figure {
  margin: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}
.library__code-caption {
  display: flex;
  align-items: center;
  padding: var(--size-3, 0.75rem) var(--size-6, 1.5rem);
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--rule);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  color: var(--ink-faint);
}
.library__code-path { letter-spacing: 0.01em; }
.library__code-block {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--size-5, 1.25rem) var(--size-6, 1.5rem);
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.65;
  margin: 0;
}
.library__code-figure .library__code-block {
  border: 0;
  border-radius: 0;
  background: transparent;
}
.library__code-block code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--ink);
  white-space: pre;
}

/* Inventory: three buckets, each a labelled list of rows */
.library__inventory-lead {
  margin: 0 0 var(--size-9, 2.5rem);
  color: var(--ink-muted);
  font-size: 1.02rem;
  line-height: 1.7;
  max-width: 60ch;
}
.library__inventory-lead a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.library__bucket-block + .library__bucket-block {
  margin-top: var(--size-10, 3rem);
}
.library__bucket-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 var(--size-4, 1rem);
  padding-bottom: var(--size-3, 0.75rem);
  border-bottom: 1px solid var(--rule);
}
.library__bucket-head h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.35rem;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.library__bucket-path {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  color: var(--ink-faint);
}
.library__bucket-blurb {
  margin: 0 0 var(--size-6, 1.5rem);
  color: var(--ink-muted);
  font-size: 0.98rem;
  line-height: 1.7;
  max-width: 62ch;
}
.library__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.library__row {
  border-bottom: 1px solid var(--rule);
}
.library__row-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name arrow"
    "desc arrow";
  align-items: center;
  gap: 0.35rem 1rem;
  padding: var(--size-5, 1.25rem) 0;
  transition: padding 0.2s ease, color 0.2s ease;
}
@media (min-width: 720px) {
  .library__row-link {
    grid-template-columns: 14rem minmax(0, 1fr) auto;
    grid-template-areas: "name desc arrow";
    gap: var(--size-6, 1.5rem);
    align-items: baseline;
  }
}
.library__row-link:hover {
  padding-left: var(--size-3, 0.75rem);
}
.library__row-link:hover .library__row-name { color: var(--accent); }
.library__row-link:hover .library__row-arrow { transform: translateX(4px); color: var(--accent); }
.library__row-name {
  grid-area: name;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.98rem;
  color: var(--ink);
  transition: color 0.2s ease;
}
.library__row-desc {
  grid-area: desc;
  color: var(--ink-muted);
  font-size: 0.96rem;
  line-height: 1.6;
}
.library__row-arrow {
  grid-area: arrow;
  color: var(--ink-faint);
  font-size: 1rem;
  transition: transform 0.2s ease, color 0.2s ease;
}
.library__row--soon {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "name" "desc";
  gap: 0.35rem;
  padding: var(--size-5, 1.25rem) 0;
  color: var(--ink-faint);
}
@media (min-width: 720px) {
  .library__row--soon {
    grid-template-columns: 14rem minmax(0, 1fr);
    grid-template-areas: "name desc";
    gap: var(--size-6, 1.5rem);
    align-items: baseline;
  }
}
.library__row--soon .library__row-name {
  font-family: var(--sans);
  font-style: italic;
  color: var(--ink-faint);
  font-size: 0.95rem;
}
.library__row--soon .library__row-desc {
  color: var(--ink-faint);
  font-size: 0.93rem;
}

/* Shared inline code style inside library blocks */
.library__anatomy code,
.library__inventory code,
.library__install-section code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  padding: 0.1em 0.4em;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  color: var(--ink);
}
.library__code-block code,
.library__bucket-path,
.library__row-name { background: transparent; padding: 0; }

/* Two-column install grid */
.library__install-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--size-7, 1.75rem);
}
@media (min-width: 720px) {
  .library__install-grid { grid-template-columns: 1fr 1fr; gap: var(--size-8, 2rem); }
}
.library__install-method {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--size-7, 1.75rem) var(--size-7, 1.75rem) var(--size-8, 2rem);
  display: flex;
  flex-direction: column;
}
.library__install-tag {
  display: inline-block;
  align-self: flex-start;
  margin: 0 0 var(--size-5, 1.25rem);
  padding: 0.22em 0.7em;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
}
.library__install-method h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  margin: 0 0 var(--size-6, 1.5rem);
  color: var(--ink);
  letter-spacing: -0.01em;
}
.library__install-method ol {
  margin: 0;
  padding-left: 1.4rem;
  color: var(--ink-muted);
  font-size: 0.98rem;
  line-height: 1.75;
}
.library__install-method li + li { margin-top: 0.75em; }
.library__install-method li::marker { color: var(--accent); }
.library__install-method ol a,
.library__install-method ol code {
  color: var(--accent);
}
.library__install-method .library__code-block {
  background: rgba(255, 255, 255, 0.06);
}
.library__install-foot {
  margin: var(--size-6, 1.5rem) 0 0;
  color: var(--ink-faint);
  font-size: 0.9rem;
  line-height: 1.55;
}
.library__install-note {
  color: var(--ink-faint);
  font-size: 0.95rem;
  margin: var(--size-7, 1.75rem) 0 0;
  line-height: 1.6;
}

/* ---------- Insights index ---------- */
.insights-hero {
  padding: clamp(3.5rem, 7vw, 5rem) 0 var(--space-lg);
}
.insights-hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}
.insights-hero__sub {
  color: var(--ink-muted);
  font-size: 1.05rem;
  margin: 0.85rem 0 0;
  max-width: 38rem;
}

.posts {
  list-style: none;
  padding: 0;
  margin: 1rem 0 clamp(4rem, 8vw, 7rem);
  display: grid;
  gap: 0;
}
.posts li {
  list-style: none;
  margin-left: 0;
}
.posts li::marker { content: ""; }
.post-card {
  display: block;
  padding: clamp(1.75rem, 3vw, 2.5rem) 0;
  border-top: 1px solid var(--rule);
  transition: border-top-color 0.2s ease;
}
.posts li:last-child .post-card { border-bottom: 1px solid var(--rule); }
.post-card:hover { border-top-color: var(--rule-strong); }
.post-card:hover + li .post-card { border-top-color: var(--rule-strong); }
.post-card:hover h2 { color: var(--accent); }
.post-card:hover .post-card__arrow { color: var(--ink); }
.post-card__meta {
  display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center;
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin-bottom: 1.1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.post-card__meta .dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--ink-faint); display: inline-block;
}
.post-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.2em 0.55em;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  font-size: 0.7rem;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
}
.post-card h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  font-weight: 500;
  margin-bottom: 0.7rem;
  line-height: 1.2;
  max-width: 32ch;
  transition: color 0.15s ease;
}
.post-card p {
  color: var(--ink-muted);
  font-size: 1rem;
  max-width: 65ch;
  line-height: 1.55;
}
.post-card__arrow {
  display: inline-block;
  margin-top: 1.3rem;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.15s ease;
}

/* ---------- Article (single post) ---------- */
.article {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(4rem, 8vw, 6rem);
}
.article__back {
  display: inline-block;
  color: var(--ink-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-xl);
  transition: color 0.15s ease;
}
.article__back:hover { color: var(--accent); }
.article__head {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--rule);
}
.article__head h1 {
  font-size: clamp(2.25rem, 5.2vw, 3.4rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
  line-height: 1.08;
}
.article__meta {
  display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center;
  font-size: 0.78rem;
  color: var(--ink-faint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.article__meta .dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--ink-faint); display: inline-block;
}
.article__body {
  font-size: 1.18rem;
  line-height: 1.75;
  color: var(--ink);
  max-width: 38rem;
}
.article__body > * + * { margin-top: 1.7em; }
.article__body p { margin: 0; }
.article__body h2 {
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 500;
  margin-top: 3.2em;
  margin-bottom: 1em;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.article__body h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  margin-top: 2.4em;
  margin-bottom: 0.7em;
}
.article__body blockquote {
  border-left: 2px solid var(--accent);
  padding: 0.1em 0 0.1em 1.5rem;
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink-muted);
}
.article__figure {
  margin: 2.6em 0;
  /* Break out wider than the 38rem text column so the diagram stays legible. */
  width: min(54rem, 92vw);
  margin-left: calc((38rem - min(54rem, 92vw)) / 2);
}
@media (max-width: 56rem) {
  .article__figure { width: 100%; margin-left: 0; }
}
.article__figure img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--rule);
  border-radius: var(--radius-2, 12px);
}
.article__figure figcaption {
  margin-top: 0.9em;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-muted);
  text-align: center;
}
.article__body ul, .article__body ol {
  padding-left: 1.5rem;
  margin: 0;
}
.article__body li + li { margin-top: 0.55em; }
.article__body li::marker { color: var(--accent); }
.article__body strong { color: var(--ink); font-weight: 600; }
.article__body em { font-style: italic; }
.article__body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.article__body a:hover { color: var(--ink); }
.article__rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.5em 0 1.75em;
  max-width: 6rem;
}
.article__footer {
  color: var(--ink-muted);
  font-size: 1rem;
}


.article__cta {
  max-width: 38rem;
  margin: clamp(3rem, 6vw, 4.5rem) 0 0;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
}
.article__cta p {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  color: var(--ink);
  line-height: 1.35;
}

/* ---------- Featured posts (homepage) ---------- */
.featured-posts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.featured-posts__loading {
  grid-column: 1 / -1;
  padding: 2rem 0;
  color: var(--ink-faint);
  font-family: var(--serif);
  font-style: italic;
}
.featured-card {
  display: flex; flex-direction: column;
  height: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.featured-card:hover { transform: translateY(-2px); border-color: var(--rule-strong); }
.featured-card__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bg-soft);
}
.featured-card__img--fallback {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(224, 138, 91, 0.22), var(--bg-soft));
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2.5rem;
  color: var(--accent);
}
.featured-card__body {
  display: flex; flex-direction: column; gap: 0.75rem;
  padding: 1.5rem;
  flex: 1;
}
.featured-card__tag {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(224, 138, 91, 0.1);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}
.featured-card__title {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.25;
  margin: 0;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.featured-card__excerpt {
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.featured-card__foot {
  margin-top: auto;
  padding-top: 0.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.featured-card__arrow { color: var(--accent); font-weight: 600; }

.featured-posts__cta {
  margin-top: 2.5rem;
  text-align: center;
}
.featured-posts__cta a {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
}
.featured-posts__cta a:hover { color: var(--ink); }

.posts__empty {
  list-style: none;
  padding: 2.5rem 0;
  color: var(--ink-muted);
  font-family: var(--serif);
  font-style: italic;
  border-top: 1px solid var(--rule);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
