/* Article body styling for a single post page */
.ryv-article-wrap{
  background: #1e1e1e;
  color: #f1efe9;
  font-family: "Geist", "Geist Placeholder", -apple-system, system-ui, sans-serif;
  padding: 60px 32px 80px;
}
.ryv-article-grid{
  /* Reading column centered; the table of contents sits in the LEFT gutter,
     borderless, with a generous gap so it never crowds the article. */
  display: grid; grid-template-columns: 1fr minmax(0, 720px) 1fr;
  gap: 0 40px; align-items: start; max-width: 1420px; margin: 0 auto;
}

/* ===================== Side navigation (TOC) — floating panel =====================
   Same material as the cheatsheet's phase rail: hairline border, blurred dark
   glass, pill rows, mint edge marker on the active item. */
.ryv-article-toc{
  grid-column: 1;
  justify-self: start;
  position: sticky; top: 108px; align-self: start;
  width: 100%; max-width: 280px;
  padding: 16px 12px 12px;
  border: 1px solid rgba(241,239,233,.12); border-radius: 16px;
  background: rgba(22,24,24,.55);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 20px 44px rgba(0,0,0,.30), inset 0 1px 0 rgba(245,243,236,.05);
}
.ryv-article-toc .toc-title{
  display: flex; align-items: center; gap: 9px;
  font-family: "Fragment Mono", "Fragment Mono Placeholder", ui-monospace, SFMono-Regular, monospace;
  /* journal card category labels are the site's native label voice:
     Fragment Mono, 500, wide tracking, mint */
  font-size: 11.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: #9fd6b5;
  margin: 0 0 12px 8px;
}
.ryv-article-toc ol{
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 1px;
  max-height: calc(100vh - 260px); overflow-y: auto; overscroll-behavior: contain;
  /* scrollable, but no visible track: a permanent 5px gray bar inside a glass
     panel reads as a default-browser artifact */
  scrollbar-width: none;
}
.ryv-article-toc ol::-webkit-scrollbar{ display: none; }
.ryv-article-toc ol a{
  position: relative;
  display: block; font-size: 14px; line-height: 1.4; color: #9a978f;
  /* Framer's global link style underlines every <a>; a docs nav is not prose,
     so the underline has to be switched off explicitly or the rail reads as
     a pile of default hyperlinks. */
  text-decoration: none;
  padding: 8px 10px; border-radius: 9px;
  transition: color .15s ease, background .15s ease;
}
.ryv-article-toc ol a:hover{ color: #f1efe9; background: rgba(245,243,236,.04); text-decoration: none; }
/* no weight change on active: it reflows the label and makes the rail jitter */
.ryv-article-toc ol a.active{ color: #9fd6b5; background: rgba(159,214,181,.10); }
/* the "you are here" edge marker, inside the row so it tracks the pill */
.ryv-article-toc ol a.active::before{
  content: ""; position: absolute; left: 2px; top: 50%; transform: translateY(-50%);
  width: 2px; height: 16px; border-radius: 2px; background: #9fd6b5;
}
.ryv-article-toc ol li.lvl-3 a{ padding-left: 26px; font-size: 13px; color: #7d7a73; }
.ryv-article-toc ol li.lvl-3 a:hover{ color: #c4c2bb; }
.ryv-article-toc ol li.lvl-3 a.active{ color: #9fd6b5; }

/* collapse / expand controls (borderless) */
.ryv-toc-toggle{
  margin: 12px 0 0 8px;
  display: inline-flex; align-items: center; gap: 7px;
  background: none; border: 0; padding: 6px 0; cursor: pointer;
  font-family: "Fragment Mono", "Fragment Mono Placeholder", ui-monospace, SFMono-Regular, monospace;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: #6e6b63;
  transition: color .16s ease;
}
.ryv-toc-toggle:hover{ color: #9fd6b5; }
.ryv-toc-toggle svg{ width: 12px; height: 12px; flex: none; }
.ryv-toc-expand{
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(241,239,233,.10);
  border-radius: 10px; cursor: pointer; color: #9a978f;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.ryv-toc-expand:hover{ color: #9fd6b5; border-color: rgba(159,214,181,.4); background: rgba(159,214,181,.06); }
.ryv-toc-expand svg{ width: 18px; height: 18px; }
.ryv-article-toc.is-collapsed{ width: auto; padding: 8px; border-radius: 12px; }
.ryv-article-toc.is-collapsed .ryv-toc-inner{ display: none; }
.ryv-article-toc.is-collapsed .ryv-toc-expand{ display: inline-flex; }
@media (max-width: 1240px){
  /* Collapse to a single column. minmax(0,1fr) lets the track shrink below the
     min-content width of <pre> code blocks so long lines scroll INSIDE the
     article instead of pushing the layout wider than the viewport (an ancestor
     overflow:hidden was clipping that overflow -> "right side missing"). */
  .ryv-article-grid{ grid-template-columns: minmax(0, 720px); justify-content: center; gap: 0; }
  .ryv-article-grid > *{ min-width: 0; }
  .ryv-article-toc{ display: none; }
}

/* ===================== Right rail: takeaways · share · related ===================== */
.ryv-article-rail{
  grid-column: 3; justify-self: end; align-self: start;
  position: sticky; top: 108px;
  width: 100%; max-width: 320px;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 150px); overflow-y: auto; overscroll-behavior: contain;
}
.ryv-article-rail::-webkit-scrollbar{ width: 5px; }
.ryv-article-rail::-webkit-scrollbar-thumb{ background: rgba(241,239,233,.12); border-radius: 3px; }
/* blocks are separated by a hairline, not by empty air, so the rail reads as
   one composed panel rather than loose fragments */
.ryv-rail-block + .ryv-rail-block{ margin-top: 26px; padding-top: 26px; border-top: 1px solid rgba(241,239,233,.08); }
.ryv-rail-title{
  display: flex; align-items: center; gap: 9px;
  font-family: "Fragment Mono", "Fragment Mono Placeholder", ui-monospace, SFMono-Regular, monospace;
  font-size: 11.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: #9fd6b5;
  margin: 0 0 16px;
}
.ryv-rail-takeaways{ list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ryv-rail-takeaways li{
  position: relative; padding-left: 20px;
  font-size: 14.5px; line-height: 1.6; color: #a8a59d;
}
.ryv-rail-takeaways li::before{
  content: ""; position: absolute; left: 1px; top: 9px;
  width: 5px; height: 5px; border-radius: 1px; background: #9fd6b5;
}
.ryv-rail-share{ display: flex; flex-direction: column; gap: 8px; }
.ryv-share-btn{
  display: inline-flex; align-items: center; gap: 10px;
  font-family: "Geist", "Geist Placeholder", -apple-system, system-ui, sans-serif;
  font-size: 14px; color: #a8a59d; text-decoration: none;
  background: rgba(245,243,236,.02); border: 1px solid rgba(241,239,233,.09);
  border-radius: 10px; padding: 11px 14px; cursor: pointer; text-align: left; width: 100%;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.ryv-share-btn svg{ width: 15px; height: 15px; flex: none; opacity: .75; }
.ryv-share-btn:hover{ color: #f1efe9; border-color: rgba(159,214,181,.4); background: rgba(159,214,181,.05); }
.ryv-share-btn:hover svg{ opacity: 1; }
.ryv-share-btn.copied{ color: #9fd6b5; border-color: rgba(159,214,181,.45); background: rgba(159,214,181,.06); }
.ryv-rail-related{ list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ryv-rail-related a{ display: block; padding: 14px 0; text-decoration: none; border-top: 1px solid rgba(241,239,233,.08); }
.ryv-rail-related li:first-child a{ border-top: 0; padding-top: 0; }
.ryv-rail-related .cat{
  display: block; font-family: "Fragment Mono", "Fragment Mono Placeholder", ui-monospace, monospace; font-size: 10.5px;
  letter-spacing: .14em; text-transform: uppercase; color: #7a776f; margin-bottom: 6px;
}
.ryv-rail-related .ttl{ display: block; font-size: 14.5px; font-weight: 500; line-height: 1.45; color: #f1efe9; transition: color .15s ease; }
.ryv-rail-related a:hover .ttl{ color: #9fd6b5; }
.ryv-rail-related .rt{
  display: block; margin-top: 7px;
  font-family: "Fragment Mono", "Fragment Mono Placeholder", ui-monospace, monospace;
  font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #6e6b63;
}
/* Hide the rail on the single-column layout. Placed AFTER the base rule so it
   wins on source order (same specificity), matching how the TOC collapses. */
@media (max-width: 1240px){ .ryv-article-rail{ display: none; } }

.ryv-article-body{
  font-size: 18px; line-height: 1.75; color: #f1efe9;
  max-width: 720px;
}
.ryv-article-body > * + *{ margin-top: 1.1em; }
.ryv-article-body{ overflow-wrap: break-word; }

/* --- Announcement intro treatment (orange kicker + large lede statement) ---
   The .ryv-kicker / .ryv-lede classes are written into the markdown of posts
   that want this look, so these rules are inert on every other post. */
.ryv-article-body .ryv-kicker{
  font-family: "Fragment Mono", "Fragment Mono Placeholder", ui-monospace, SFMono-Regular, monospace;
  font-size: 13px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  color: #e0835c; margin: 0 0 20px;
}
.ryv-article-body .ryv-lede{
  font-family: "Geist", "Geist", "Geist Placeholder", -apple-system, system-ui, sans-serif; font-weight: 600;
  font-size: clamp(28px, 3.2vw, 38px); line-height: 1.16; letter-spacing: -0.015em;
  color: #f1efe9; margin: 0 0 30px;
}
.ryv-article-body .ryv-kicker + .ryv-lede{ margin-top: 0; }
/* Opt-in: cleaner, more open Geist body type for feature posts (matches the
   hero, which is already Geist). Applied only when front-matter sets accent. */
.ryv-article-body.ryv-accent-announce{ font-family: "Geist", "Geist", "Geist Placeholder", -apple-system, system-ui, sans-serif; }
.ryv-article-body.ryv-accent-announce h2,
.ryv-article-body.ryv-accent-announce h3,
.ryv-article-body.ryv-accent-announce h4{ font-family: "Geist", "Geist", "Geist Placeholder", sans-serif; font-weight: 600; }
.ryv-article-body h1{
  font-family: "Geist", "Geist Placeholder", sans-serif; font-weight: 500;
  font-size: 34px; line-height: 1.15; letter-spacing: -0.02em;
  margin: 0 0 .35em; color: #f1efe9; scroll-margin-top: 90px;
}
.ryv-article-body h2{
  font-family: "Geist", "Geist Placeholder", sans-serif; font-weight: 500;
  font-size: 30px; line-height: 1.2; letter-spacing: -0.018em;
  margin-top: 2.4em; margin-bottom: .4em; color: #f1efe9;
  scroll-margin-top: 90px;
}
.ryv-article-body h3{
  font-family: "Geist", "Geist Placeholder", sans-serif; font-weight: 500;
  font-size: 22px; line-height: 1.25; letter-spacing: -0.012em;
  margin-top: 1.8em; margin-bottom: .3em; color: #f1efe9;
  scroll-margin-top: 90px;
}
.ryv-article-body h4{
  font-size: 17px; font-weight: 600; margin-top: 1.6em; margin-bottom: .2em;
}
.ryv-article-body p{ margin: 0; }
.ryv-article-body p + p{ margin-top: 1.1em; }
.ryv-article-body strong{ color: #f1efe9; font-weight: 600; }
.ryv-article-body em{ font-style: italic; color: #f1efe9; }
.ryv-article-body a{
  color: #f1efe9; text-decoration: none;
  border-bottom: 1px solid rgba(241,239,233,.14); padding-bottom: 1px;
  transition: border-color .2s ease, color .2s ease;
}
.ryv-article-body a:hover{ border-color: #9fd6b5; color: #9fd6b5; }
.ryv-article-body ul, .ryv-article-body ol{
  padding-left: 24px; display: flex; flex-direction: column; gap: 8px;
}
.ryv-article-body ul li::marker{ color: #6e6b63; }
.ryv-article-body ol li::marker{ color: #6e6b63; font-family: "Fragment Mono", "Fragment Mono Placeholder", ui-monospace, monospace; font-size: 0.9em; }
.ryv-article-body blockquote{
  margin: 2em 0; padding: 24px 28px;
  border-left: 2px solid #9fd6b5; background: rgba(159,214,181,0.04);
  border-radius: 0 8px 8px 0;
  font-size: 19px; line-height: 1.55; letter-spacing: -0.005em; color: #f1efe9;
}
.ryv-article-body hr{ border: 0; height: 1px; background: rgba(241,239,233,.14); margin: 3em 0; }
.ryv-article-body img{
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.8em auto;
  border-radius: 10px;
  border: 1px solid rgba(241,239,233,.08);
  background: #15171a;
}
.ryv-article-body p > img:only-child{ margin: 1.8em auto; }
.ryv-article-body img[alt$="diagram" i],
.ryv-article-body img[src$=".svg" i]{ background: transparent; }
.ryv-article-body code{
  font-family: "Fragment Mono", "Fragment Mono Placeholder", ui-monospace, SFMono-Regular, monospace; font-size: 0.88em;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(241,239,233,.08);
  padding: 2px 6px; border-radius: 5px; color: #d8d6cf;
}
.ryv-article-body pre{
  background: #15171a; border: 1px solid rgba(241,239,233,.08);
  border-radius: 10px; padding: 0; margin: 1.6em 0;
  position: relative; overflow: hidden;
}
.ryv-article-body pre code{
  display: block; background: transparent; border: 0; border-radius: 0;
  padding: 18px; font-size: 13.5px; line-height: 1.65; color: #cfd0c8;
  white-space: pre; overflow-x: auto;
  /* Long lines scroll rather than wrap; make that discoverable with a thin,
     always-visible-on-hover scrollbar in the same style as the TOC rail. */
  scrollbar-width: thin; scrollbar-color: rgba(241,239,233,.22) transparent;
}
.ryv-article-body pre code::-webkit-scrollbar{ height:6px; }
.ryv-article-body pre code::-webkit-scrollbar-track{ background:transparent; }
.ryv-article-body pre code::-webkit-scrollbar-thumb{ background:rgba(241,239,233,.18); border-radius:3px; }
.ryv-article-body pre code::-webkit-scrollbar-thumb:hover{ background:rgba(241,239,233,.3); }
.ryv-article-body pre::before{
  content: attr(data-lang); position: absolute; top: 10px; left: 18px;
  font-family: "Fragment Mono", "Fragment Mono Placeholder", ui-monospace, monospace; font-size: 10.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: #6e6b63;
}
.ryv-article-body pre[data-lang] code{ padding-top: 36px; }
/* Mermaid diagrams render to inline SVG (see step 3d in the script). */
.ryv-article-body pre.mermaid{
  background: #15171a; border: 1px solid rgba(241,239,233,.08); border-radius: 10px;
  padding: 24px; margin: 1.8em 0; text-align: center; overflow-x: auto;
  font-family: inherit;
}
.ryv-article-body pre.mermaid::before{ content: none; }
.ryv-article-body pre.mermaid svg{ max-width: 100%; height: auto; }
/* Keep diagram source readable if JavaScript or the diagram library is unavailable. */
.ryv-article-body pre.mermaid:not([data-processed]){ white-space:pre-wrap; overflow:auto; min-height:60px; }
.ryv-copy-btn{
  position: absolute; top: 8px; right: 8px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(241,239,233,.08); color: #9a978f;
  font-family: "Fragment Mono", "Fragment Mono Placeholder", ui-monospace, monospace; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 6px; cursor: pointer;
  transition: all .15s ease;
}
.ryv-copy-btn:hover{ background: rgba(255,255,255,0.10); color: #f1efe9; }
.ryv-copy-btn.copied{ background: rgba(159,214,181,0.14); color: #9fd6b5; border-color: rgba(159,214,181,0.35); }
.ryv-article-body table{
  border-collapse: collapse; width: 100%; margin: 1.8em 0; font-size: 15px;
}
.ryv-article-body th, .ryv-article-body td{
  border-bottom: 1px solid rgba(241,239,233,.08); padding: 12px 14px; text-align: left;
}
.ryv-article-body th{ color: #f1efe9; font-weight: 500; font-size: 14px; }
.ryv-article-body td{ color: #9a978f; }

/* Hero override for blog-post: the hero we inherit from journal.html shows the cube +
   the journal eyebrow + journal title. We'll override the eyebrow + title via JS to
   show the post's category + post title. The cube image stays as default unless the
   post specifies a `thumbnail` filename. */
.ryv-reading-progress{
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 200;
  background: transparent; pointer-events: none;
}
.ryv-reading-progress .bar{
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #9fd6b5, #d49a78);
  transition: width 80ms linear;
}

.ryv-author-bio{
  max-width: 780px; margin: 80px auto 0; padding: 36px 32px;
  border-top: 1px solid rgba(241,239,233,.08);
  display: flex; gap: 18px; align-items: flex-start;
}
.ryv-author-bio .avatar{
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg,#9fd6b5,#d49a78);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 600; color: #15171a; flex-shrink: 0;
}
.ryv-author-bio .body h4{ font-size: 17px; font-weight: 600; margin-bottom: 4px; color: #f1efe9; }
.ryv-author-bio .role{
  font-family: "Fragment Mono", "Fragment Mono Placeholder", ui-monospace, monospace; font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: #9a978f; margin-bottom: 10px;
}
.ryv-author-bio p{ font-size: 15px; line-height: 1.6; color: #9a978f; }

/* ============================================================
   Phone optimisation (<=640px): tighter type scale + spacing,
   horizontally scrollable code/tables, compact author card.
   ============================================================ */
@media (max-width: 640px){
  .ryv-article-wrap{ padding: 36px 20px 64px; }
  .ryv-article-body{ font-size: 16.5px; line-height: 1.7; }
  .ryv-article-body > * + *{ margin-top: 1em; }
  .ryv-article-body h1{ font-size: 25px; line-height: 1.2; margin-bottom: .3em; }
  .ryv-article-body h2{ font-size: 21px; line-height: 1.25; margin-top: 1.9em; }
  .ryv-article-body h3{ font-size: 18px; margin-top: 1.6em; }
  .ryv-article-body h4{ font-size: 15.5px; }
  .ryv-article-body blockquote{ font-size: 16px; line-height: 1.55; padding: 16px 18px; margin: 1.6em 0; }
  .ryv-article-body ul, .ryv-article-body ol{ padding-left: 20px; }
  .ryv-article-body pre{ margin: 1.4em 0; border-radius: 8px; }
  .ryv-article-body pre code{ font-size: 12.5px; line-height: 1.6; padding: 16px; }
  .ryv-article-body pre[data-lang] code{ padding-top: 34px; }
  .ryv-copy-btn{ font-size: 10px; padding: 5px 8px; }
  .ryv-article-body img{ margin: 1.4em auto; border-radius: 8px; }
  .ryv-article-body hr{ margin: 2.2em 0; }
  /* Wide tables scroll horizontally rather than stretching the page */
  .ryv-article-body table{ display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; font-size: 13.5px; }
  .ryv-article-body th, .ryv-article-body td{ padding: 10px 12px; }
  /* The self-scorecard is unusable when its Pass/Fail toggles scroll off-screen:
     on phones the explainer column gives way so the control and the toggles
     stay visible without scrolling. */
  .ryv-article-body .ryv-rubric table{ white-space: normal; }
  .ryv-article-body .ryv-rubric th:nth-child(2), .ryv-article-body .ryv-rubric td:nth-child(2){ display: none; }
  .ryv-author-bio{ margin-top: 56px; padding: 28px 0 0; gap: 14px; }
  .ryv-author-bio .avatar{ width: 48px; height: 48px; font-size: 16px; }
}

/* ============================================================
   Interactive components + modern reading polish
   ============================================================ */

/* Rounded, contained tables (modern look) */
.ryv-article-body table{ border:1px solid rgba(241,239,233,.1); border-radius:12px; overflow:hidden; }
.ryv-article-body thead th{ background:rgba(255,255,255,.025); }
.ryv-article-body tbody tr:last-child td{ border-bottom:0; }
.ryv-article-body tbody tr{ transition:background .14s ease; }
.ryv-article-body tbody tr:hover{ background:rgba(255,255,255,.015); }

/* ---- Self-scorecard (interactive rubric: any table whose last column is "Pass/Fail") ---- */
.ryv-rubric{ margin:2em 0; border:1px solid rgba(241,239,233,.1); border-radius:12px; overflow:hidden; background:#15171a; }
.ryv-rubric table{ margin:0 !important; border:0 !important; border-radius:0 !important; }
.ryv-rubric-bar{ display:flex; align-items:center; gap:8px 16px; flex-wrap:wrap; padding:13px 16px; border-bottom:1px solid rgba(241,239,233,.08); background:rgba(255,255,255,.02); }
.ryv-rubric-title{ font-family:"Fragment Mono","Fragment Mono Placeholder",ui-monospace,SFMono-Regular,monospace; font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:#9a978f; margin-right:auto; }
.ryv-rubric-stat{ font-family:"Fragment Mono","Fragment Mono Placeholder",ui-monospace,SFMono-Regular,monospace; font-size:12px; color:#9a978f; display:inline-flex; align-items:center; gap:6px; }
.ryv-rubric-stat b{ color:#f1efe9; font-weight:600; }
.ryv-rubric-stat .dot{ width:8px; height:8px; border-radius:50%; background:rgba(241,239,233,.2); }
.ryv-rubric-stat.pass .dot{ background:#9fd6b5; }
.ryv-rubric-stat.fail .dot{ background:#e0835c; }
.ryv-rubric-meter{ height:4px; background:rgba(241,239,233,.08); }
.ryv-rubric-meter span{ display:block; height:100%; width:0%; background:linear-gradient(90deg,#9fd6b5,#d49a78); transition:width .25s ease; }
.ryv-rubric-reset, .ryv-checklist-progress .js-reset{ background:none; border:1px solid rgba(241,239,233,.14); color:#9a978f; font-family:"Fragment Mono","Fragment Mono Placeholder",ui-monospace,SFMono-Regular,monospace; font-size:10px; letter-spacing:.1em; text-transform:uppercase; padding:5px 10px; border-radius:6px; cursor:pointer; transition:color .15s ease, border-color .15s ease; }
.ryv-rubric-reset:hover, .ryv-checklist-progress .js-reset:hover{ color:#f1efe9; border-color:rgba(241,239,233,.3); }
.ryv-score-cell{ width:148px; white-space:nowrap; }
.ryv-score-toggle{ display:inline-flex; gap:6px; }
.ryv-score-btn{ font-family:"Fragment Mono","Fragment Mono Placeholder",ui-monospace,SFMono-Regular,monospace; font-size:11px; letter-spacing:.04em; text-transform:uppercase; padding:5px 12px; border-radius:6px; cursor:pointer; background:rgba(255,255,255,.04); border:1px solid rgba(241,239,233,.12); color:#9a978f; transition:color .14s ease, border-color .14s ease, background .14s ease; }
.ryv-score-btn:hover{ color:#f1efe9; border-color:rgba(241,239,233,.28); }
.ryv-score-btn.is-pass[aria-pressed="true"]{ background:rgba(159,214,181,.16); border-color:rgba(159,214,181,.5); color:#9fd6b5; }
.ryv-score-btn.is-fail[aria-pressed="true"]{ background:rgba(224,131,92,.16); border-color:rgba(224,131,92,.5); color:#e0835c; }
.ryv-article-body tr.is-scored-pass td:first-child{ box-shadow:inset 3px 0 0 #9fd6b5; }
.ryv-article-body tr.is-scored-fail td:first-child{ box-shadow:inset 3px 0 0 #e0835c; }

/* ---- Interactive checklist (lists under any "Checklist" heading) ---- */
.ryv-checklist-progress{ margin:1.4em 0 1.8em; padding:14px 16px; border:1px solid rgba(241,239,233,.1); border-radius:12px; background:#15171a; display:flex; align-items:center; gap:8px 14px; flex-wrap:wrap; }
.ryv-checklist-progress .label{ font-family:"Fragment Mono","Fragment Mono Placeholder",ui-monospace,SFMono-Regular,monospace; font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:#9a978f; }
.ryv-checklist-progress .count{ font-family:"Fragment Mono","Fragment Mono Placeholder",ui-monospace,SFMono-Regular,monospace; font-size:13px; color:#9a978f; }
.ryv-checklist-progress .count b{ color:#f1efe9; font-weight:600; }
.ryv-checklist-progress .meter{ flex:1 1 120px; min-width:90px; height:6px; border-radius:3px; background:rgba(241,239,233,.08); overflow:hidden; }
.ryv-checklist-progress .meter span{ display:block; height:100%; width:0%; background:linear-gradient(90deg,#9fd6b5,#d49a78); transition:width .3s ease; }
.ryv-checklist-progress.is-complete .meter span{ background:#9fd6b5; }
.ryv-checklist-progress.is-complete .count b{ color:#9fd6b5; }
.ryv-article-body ul.ryv-checklist{ padding-left:0; gap:2px; margin-top:.6em; }
.ryv-check-item{ list-style:none; margin:0; }
.ryv-check-item label{ display:flex; gap:12px; align-items:flex-start; padding:10px 12px; border-radius:9px; cursor:pointer; transition:background .14s ease; }
.ryv-check-item label:hover{ background:rgba(255,255,255,.03); }
.ryv-check-item input{ position:absolute; opacity:0; width:0; height:0; }
.ryv-check-box{ flex:0 0 auto; width:20px; height:20px; margin-top:2px; border-radius:6px; border:1.5px solid rgba(241,239,233,.22); display:inline-flex; align-items:center; justify-content:center; transition:background .15s ease, border-color .15s ease; }
.ryv-check-box svg{ width:12px; height:12px; opacity:0; transform:scale(.5); transition:opacity .15s ease, transform .15s ease; color:#15171a; }
.ryv-check-item input:checked + .ryv-check-box{ background:#9fd6b5; border-color:#9fd6b5; }
.ryv-check-item input:checked + .ryv-check-box svg{ opacity:1; transform:scale(1); }
.ryv-check-item input:focus-visible + .ryv-check-box{ outline:2px solid #9fd6b5; outline-offset:2px; }
.ryv-check-text{ flex:1; color:#bdbbb3; transition:color .15s ease; }
.ryv-check-item input:checked ~ .ryv-check-text{ color:#6e6b63; text-decoration:line-through; text-decoration-color:rgba(159,214,181,.45); }

/* ---- Image lightbox ---- */
.ryv-article-body img{ cursor:zoom-in; }
.ryv-lightbox{ position:fixed; inset:0; z-index:300; background:rgba(10,12,14,.93); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); display:flex; align-items:center; justify-content:center; padding:40px; opacity:0; pointer-events:none; transition:opacity .2s ease; }
.ryv-lightbox.is-open{ opacity:1; pointer-events:auto; }
.ryv-lightbox-stage{ width:90vw; height:90vh; display:flex; align-items:center; justify-content:center; }
.ryv-lightbox img{ max-width:100%; max-height:100%; width:auto; height:auto; border-radius:10px; border:1px solid rgba(241,239,233,.12); background:#15171a; cursor:zoom-out; margin:0; }
.ryv-lightbox svg{ max-width:100%; max-height:100%; width:100%; height:100%; cursor:zoom-out; border-radius:10px; border:1px solid rgba(241,239,233,.12); background:#15171a; padding:24px; box-sizing:border-box; }
.ryv-lightbox-close{ position:absolute; top:18px; right:22px; width:42px; height:42px; border-radius:50%; background:rgba(255,255,255,.06); border:1px solid rgba(241,239,233,.14); color:#f1efe9; font-size:22px; line-height:1; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; }
.ryv-lightbox-close:hover{ background:rgba(255,255,255,.12); }

/* ---- Back-to-top ---- */
.ryv-to-top{ position:fixed; right:22px; bottom:22px; width:44px; height:44px; border-radius:12px; background:rgba(21,23,26,.9); border:1px solid rgba(241,239,233,.12); color:#9a978f; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; opacity:0; transform:translateY(8px); pointer-events:none; transition:opacity .2s ease, transform .2s ease, color .15s ease, border-color .15s ease; z-index:150; backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); }
.ryv-to-top.is-visible{ opacity:1; transform:none; pointer-events:auto; }
.ryv-to-top:hover{ color:#9fd6b5; border-color:rgba(159,214,181,.4); }

@media (max-width:640px){
  .ryv-score-cell{ width:auto; }
  .ryv-checklist-progress{ position:static; }
  .ryv-to-top{ right:14px; bottom:14px; }
}
@media (prefers-reduced-motion: reduce){
  .ryv-rubric-meter span, .ryv-checklist-progress .meter span, .ryv-score-btn,
  .ryv-check-box, .ryv-check-box svg, .ryv-lightbox, .ryv-to-top, .ryv-check-item label{ transition:none !important; }
  .ryv-to-top{ transform:none; }
}
