h1 a:hover, h2 a:hover, h3 a, h3 a:hover {
    text-decoration: none;
    border-bottom: none;
}

/* must be on html, not body — shared-styles' html{container-type} blocks
   body→viewport overflow propagation, so overflow-x on body turns body into
   the .draft-banner's (non-scrolling) sticky scrollport and kills sticky */
html{
    overflow-x: hidden;
}

/* distill's mobile grid uses bare 1fr, which floors at the largest grid-item
   min-content and pushes the whole text column past the viewport (prose was
   clipped ~40px on the right at 420px). minmax(0,1fr) lets tracks shrink. */
@media (max-width: 767px){
    .base-grid, distill-header, d-title, d-abstract, d-article, d-appendix,
    distill-appendix, d-byline, d-footnote-list, d-citation-list, distill-footer {
        grid-template-columns: [screen-start] 8px [page-start kicker-start text-start gutter-start middle-start] minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) [text-end page-end gutter-end kicker-end middle-end] 8px [screen-end];
    }
}

/* byline stacks on narrow viewports — desktop 8-col template overflows otherwise */
@media (max-width: 600px){
    .d-byline-container{ grid-template-columns: 1fr !important; row-gap: 6px; }
    .d-byline{ display: block; max-width: 100%; }
}

.invisible-introduction {
    position: absolute;
    margin-left: -9999px;
}
.invisible-introduction > * { display: none; }
.invisible-introduction h2 { display: block; }

.toc-counter {
    opacity: 0.5;
    font-weight: normal;
    font-variant-numeric: tabular-nums;
    font-size: 14px;
    position: relative;
    width: 58px;
    display: none;
}
.toc .toc-counter { width: 35px; }

h1, h2{
    text-wrap: balance;
}

@media (min-width: 768px) {
    .toc a, h2, h3, h4 { position: relative; /* so toc-counter is relative to this */ }
    .toc-counter {
        position: absolute;
        right: 100%;
        margin-right: 0.3em;
        display: inline;
    }
}

@media (min-width: 1000px) {
    d-appendix h3 + h4 .toc-counter {
        display: none;
    }
}

    .comment {
    background-color: hsl(54, 78%, 96%);
    border-left: solid hsl(54, 33%, 67%) 1px;
    padding: 1em;
    color: hsla(0, 0%, 0%, 0.67);
    margin-top: 1em;
    }
    .comment h3 {
    font-size: 100%;
    font-weight: bold;
    text-transform: uppercase;
    margin-top: 0px;
    }
    .comment .commenter-description {
    font-style: italic;
    margin-bottom: 1em;
    margin-top: 0px;
    }
    .comment .commenter-description, .comment .commenter-description a {
    color: #777;
    font-size: 80%;
    line-height: 160%;
    }
    .comment div {
    margin-top: 1em;
    }
    .comment code {
    background: #FFF5;
    border-color: #EEEA;
    }

/* delete? */
.evidence-table {
    display: grid;
    grid-template-columns: auto 1fr 1fr 1fr;
    grid-gap: 4px;
    margin: 40px 0px 40px 0px;
    width: 100%;
    min-width: 700px;
    border-radius: 1px;
}
.evidence-table > .title {
    grid-column: 1 / span 4;
    font-weight: 500;
    text-transform: uppercase;
    border-bottom: 1px solid #CCC;
}
.evidence-table > div:not(.title) {
    font-size: 75%;
}
.evidence-table > div {
    background: #FFF;
    padding: 1px 2px 1px 4px;
    border-radius: 2px;
}
.evidence-table > div.title, .evidence-table > div.model {
  padding-left: 0px !important;
}
.evidence-table > div:not(.evidence):not(.title) {
    color: #666;
}
.evidence-table > .evidence {
    color: #000;
}
.evidence.strong.causal{
   background: hsl(180, 50%, 65%);
}
.evidence.strong{
   background: hsl(125, 45%, 65%);
}
.evidence.medium.causal{
   background: hsl(180, 42%, 80%);
}
.evidence.medium{
   background: hsl(125, 40%, 80%);
}
.evidence.suggestive.causal{
   background: hsl(180, 35%, 90%);
}
.evidence.suggestive{
   background: hsl(125, 30%, 90%);
}
.evidence.na{
   background: hsl(125, 0%, 90%);
}

d-article h2 {border-bottom: none !important;}
d-article h3 {font-size: 19px; font-weight: 600;}
d-article h4 {font-size: 16px !important; margin-top: 30px !important;}
@media(min-width: 600px){
    d-article hr {margin-top: 140px; margin-bottom: 120px;}
}
@media(max-width: 600px){
    d-article hr {margin-top: 80px; margin-bottom: 80px;}
}
d-appendix ul {
    padding-left: 0px;
    padding-left: 0px;
    margin-top: 0px;
    margin-bottom: 0px;
}
@media(max-width: 600px){
    d-citation-list, d-footnote-list {padding-left: 10px;}
}
d-article > ol, d-appendix ol {padding-left: 0px !important;}
d-article ol {padding-left: 36pt;}
d-article ul li, d-article ol li {margin-bottom: 8px;}
d-footnote {margin-left: -3px; margin-right: 2px;}

.math-grid {display: grid; grid-auto-flow: column; grid-gap: 8px 12px; width: min-content; margin: 0px; margin-bottom: 1em; /*max-width: 100%; grid-column: text-start / gutter-end; overflow: scroll;*/}
.math-grid > d-math {grid-row: 1; margin: 0px; display: flex; align-items: center;}
.math-grid > d-math[block] {margin-left: -1em; margin-top: calc( -0.5em - 8px); margin-bottom: calc( -0.5em - 8px);} d-math[sub] {padding-top: 12px;}
.math-grid > .figcaption {grid-row: 2; margin: 0px; grid-column: auto / span 1; min-width: 100px; line-height: 120%; border-top: 1px solid #CCC; padding-top: 8px;}

.gdoc-image, .gdoc-image-gutter, .gdoc-image-flex {width: 100%; max-width: calc(var(--img-width) / 1.5);}

@media(max-width: 800px){
    .gdoc-image, .gdoc-image-gutter, .gdoc-image-flex {padding-right: 2%;}
}

@media(min-width: 800px){
    .gdoc-image, .gdoc-image-gutter, .gdoc-image-flex {padding-right: 8px;}
}

.gdoc-image {grid-column: text-start / screen-end; image-rendering: -webkit-optimize-contrast;}
.gdoc-image-gutter {grid-column: gutter / screen-end; margin: 0px; padding: 0px; margin-top: 6px;}
.gdoc-image-flex {margin: 0px; padding: 0px;}
d-appendix .gdoc-image img, d-appendix .gdoc-image-flex img { mix-blend-mode: darken; }

.gdoc-image, .gdoc-image-gutter, .gdoc-image-flex{
  width: min(calc(var(--img-width) / 2), 100%);
  margin-left: auto;
  margin-right: auto;
  grid-column: screen;
  display: block;
  padding-right: 0;
}

figure.gdoc-image {
  margin: 1.5em auto 2.5em;
  padding: 0;
}
/* hide the static placeholder image once the d3 mount sits next to it */
figure.gdoc-image:has(+ figure .verbal-report-decomposition-merged),
figure.gdoc-image:has(+ p + figure .verbal-report-decomposition-merged) { display: none; }

figure[data-fignum] > :first-child {
  margin-left: auto;
  margin-right: auto;
}
figure[data-fignum] figcaption {
  font-size: var(--fs-figure);
  color: var(--text-light);
  line-height: 1.5;
  text-align: left;
  margin: 12px auto 0;
  max-width: var(--mount-w, 100%);
}
a.fig-ref { font-variant-numeric: tabular-nums; }
.fig-todo { padding: 1em; background: #fffbe6; border: 1px dashed #cc9; color: #886; font-family: monospace; text-align: center; }

.sn-figma-div{
  width: fit-content;
  margin-left: auto; 
  margin-right: auto;
  grid-column: 1 / -1;
  display: block;
}

p > sup, h1 > sup, h2 > sup, h3 > sup, h4 > sup, li > sup {display: none;}

pre.citation {
    font-size: 11px;
    line-height: 15px;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    padding-left: 18px;
    border: 1px solid rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.4);
    padding: 10px 18px;
    border-radius: 3px;
    color: rgba(150, 150, 150, 1);
    overflow: hidden;
    margin-top: -12px;
    white-space: pre-wrap;
    word-wrap: break-word;
}


@media print {
    @page {
        margin: 0cm;
    }
    hr {
        margin: 0px;
        padding: 0px;
        opacity: 0.0;
        height: 0px;
        page-break-after: always;
    }
    h2 {
        display: block;
        page-break-before:always;
    }
    .gdoc-image {
        break-inside: avoid;
    }
    .base-grid,
    distill-header,
    d-title,
    d-abstract,
    d-article,
    d-appendix,
    distill-appendix,
    d-byline,
    d-footnote-list,
    d-citation-list,
    distill-footer {
        --grid-template-columns: [screen-start] 1fr [page-start kicker-start middle-start text-start] 45px 45px 45px 45px 45px 45px 45px 45px [ kicker-end text-end gutter-start] 45px [middle-end] 45px [page-end gutter-end] 1fr [screen-end];
        --grid-column-gap: 16px;
        grid-template-columns: [screen-start] 60px [page-start kicker-start middle-start text-start] 80px 60px 60px 60px 60px 60px 60px 60px [ kicker-end text-end gutter-start] 60px [middle-end] 60px [page-end gutter-end] 1fr [screen-end];
        grid-column-gap: 32px;
    }

    d-contents {
        display: block;
        justify-self: start;
        align-self: start;
        padding-bottom: 0.5em;
        margin-bottom: 1em;
        padding-left: 0.25em;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        border-bottom-width: 1px;
        border-bottom-style: solid;
        border-bottom-color: rgba(0, 0, 0, 0.1);
    }

}


table p {min-height: 16px; line-height: 1.2;}
table td {vertical-align: top;}
table td > * {margin: 0px; margin-top: 8px; margin-bottom: 8px; font-size: 90%;}

.video-ref {
    color: rgba(0,0,0,0.6);
    font-size: 87%;
    font-style: italic;
    margin-top: -10px;
    margin-bottom: 30px;
}
/* buildToc() in init.js prepends an <a.secnum> to each numbered heading —
   clickable so it scrolls to the heading and sets the URL hash. */
d-article a.secnum {
    color: var(--text-light);
    font-weight: 400;
    margin-right: 0.55em;
    text-decoration: none;
    border-bottom: none;
}
d-article a.secnum:hover { color: var(--text); }
/* In-page anchor jumps land with the title visible below the fixed
   draft banner instead of tucked underneath it. */
d-article h2 > a[id], d-article h3 > a[id], d-article h4 > a[id], figure[id] {
    scroll-margin-top: 72px;
}
code {
    white-space: pre;
    background: #FAFAFA;
    border-radius: 2px;
    padding: 2px;
    padding-top: 1px;
    margin-left: 2px;
    margin-right: 2px;
    border: 1px solid #EEE;
}
code p { display: inline; }
/* block-level gdoc code blocks (direct children of the article column) get the
   same look as .prompt-block — mono, soft bg, 1px border, rounded. */
d-article > code, d-appendix > code {
    display: block;
    grid-column: text;
    font-family: var(--font-mono);
    font-size: var(--fs-small);
    line-height: 1.6;
    white-space: normal;
    word-break: break-word;
    color: var(--gray-600);
    background: var(--tok-bg);
    border: 1px solid var(--tok-border);
    border-radius: 4px;
    padding: 8px 10px;
    margin: 1em 0;
    /* Any line wider than the text column scrolls inside the box rather
       than spilling out (the inner <p>s are pre-wrap so this is a guard,
       not the common path). */
    overflow-x: auto;
}
d-article > code p, d-appendix > code p {
    display: block; margin: 0; white-space: pre-wrap; min-height: 1.6em;
}

.jlens-tok {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--tok-bg);
    border: 1px solid var(--tok-border);
    border-radius: 4px;
    padding: 1px 5px;
    white-space: nowrap;
}


/* gdoc code blocks: same look as .prompt-block (mono, soft bg, 1px border,
   rounded). The gdoc converter emits one .gray-box per code line, so adjacent
   boxes collapse into a single bordered block. */
d-article .gray-box {
    font-family: var(--font-mono);
    font-size: var(--fs-small);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--gray-600);
    background: var(--tok-bg);
    border: 1px solid var(--tok-border);
    border-radius: 4px;
    padding: 8px 10px;
    margin: 1em 0;
    grid-column: text;
}
d-article .gray-box p { margin: 0; }
d-article .gray-box:has(+ .gray-box) {
    border-bottom: none; border-bottom-left-radius: 0; border-bottom-right-radius: 0;
    margin-bottom: 0; padding-bottom: 0;
}
d-article .gray-box + .gray-box {
    border-top: none; border-top-left-radius: 0; border-top-right-radius: 0;
    margin-top: 0; padding-top: 0;
}

/* ****************************************
 * TOC
 ******************************************/
@media(max-width: 1199px){
  d-contents {
    display: none;
    justify-self: start;
    align-self: start;
    padding-bottom: 0.5em;
    margin-bottom: 1em;
    padding-left: 0.25em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-bottom-color: rgba(0, 0, 0, 0.1);
  }
  
  body{
    margin: 2px;
  }
  .real-title {
    margin-left: -2px;
  }
  
}

@media(max-width: 1800px){
    d-contents .toc-counter{
        display: none;
    }
}


.real-title {
    padding-top: 40px;
    padding-bottom: 0;
}
.real-title h1 {
    max-width: 1000px;
    text-wrap: balance;
    margin: 12px 0 28px;
}

/* gdoc blank lines render as top-level <br>s; collapse the ones in the
   header block (everything before d-contents) so title → visual toc →
   byline → hr sit tight. */
d-article > br:has(~ d-contents) {
    display: none;
}
d-article > hr:has(~ d-contents) {
    margin: 10px 0 26px;
}

.draft-banner {
    /* fixed-height container — sticks at top:-94px so only the bottom ~26px
       stays visible once scrolled. Height never changes, so the shrink animates
       inside the box and the page below it never reflows (no scroll jitter). */
    position: sticky;
    top: -94px;
    z-index: 99999;
    background: #c1121f;
    color: #fff;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 6px solid #780000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    height: 120px;
    box-sizing: border-box;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    font: 900 44px/1 system-ui, sans-serif;
    padding: 0 16px 32px;
    transition: font-size .2s, padding-bottom .2s, letter-spacing .2s;
}
.draft-banner.scrolled {
    font-size: 13px;
    padding-bottom: 6px;
    letter-spacing: 0.05em;
}

.d-byline-container{
    border-width: 0px !important;
    /* gdoc inline style sets 20px; header brs are collapsed so this is the
       only vertical breathing room left around the byline */
    padding: 10px 0 14px !important;
}

d-contents a:hover {
  border-bottom: none;
}

@media (min-width: 1200px){
  d-contents {
    align-self: start;
    grid-column-start: 1 !important;
    grid-column-end: 4 !important;
    grid-row: auto / span 30;
    justify-self: end;
    margin-top:  0em;
    padding-right: 1.5em;
    padding-left: 16px;  /* keep off the viewport edge when the screen-start column collapses */
    box-sizing: border-box;
    max-width: 290px;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    border-right-width: 1px;
    border-right-style: solid;
    border-right-color: rgba(0, 0, 0, 0.1);
  }
}

d-contents nav h3 {
  margin-top: 0;
  margin-bottom: 1em;
  font-size: var(--fs-title);
  font-weight: 600;
}

/* Section-number prefix on TOC entries — matches the [data-secnum]::before
   on the headings themselves. */
.toc-num {
  display: inline-block;
  min-width: 2.1em;
  margin-right: 0.4em;
  color: var(--text-light);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

/* Floating top-left TOC dropdown. Hidden until the in-page contents has
   scrolled away (the scroll handler in init.js toggles .show). */
.toc-float {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100000;
  display: none;
  font-family: var(--font-sans);
}
.toc-float.show { display: block; }
.toc-float-btn {
  display: inline-flex; align-items: center;
  /* line-height 1 clips descenders; 1.4 + slimmer padding keeps the height. */
  font: 600 13px/1.4 var(--font-sans);
  padding: 4px 12px 5px;
  /* cap at the menu width so a long section label ellipsizes instead of
     stretching the pill into the text column; the vw term keeps the right
     inset matching .toc-float's 12px left inset on narrow screens */
  max-width: min(290px, calc(100vw - 24px));
  background: #fff;
  border: 1px solid var(--gray-300, #ccc);
  border-radius: 4px;
  color: var(--text);
  cursor: pointer;
}
.toc-float-btn .ico { line-height: 1; font-size: 14px; margin-right: 6px; position: relative; top: -1px; }
.toc-float-btn .lbl {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.toc-float-btn .lbl .num { font-weight: 400; color: var(--text-light); }
.toc-float-btn:hover { background: var(--gray-100); }
.toc-float-menu {
  display: none;
  position: absolute;
  top: 36px;
  left: 0;
  width: 290px;
  max-height: 75vh;
  overflow-y: auto;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--gray-300, #ccc);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.toc-float.open .toc-float-menu { display: block; }
.toc-float-menu nav h3 { display: none; }
.toc-float-menu nav div { font-weight: 600; margin: 6px 0 2px; }
.toc-float-menu nav ul { margin: 0 0 6px; padding-left: 0; list-style: none; }
.toc-float-menu nav li { margin: 1px 0; }
.toc-float-menu nav a {
  display: block;
  padding: 2px 0;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.4;
  border-bottom: none;
}
.toc-float-menu nav a:hover { color: var(--text-dark, #000); text-decoration: underline; }

d-contents nav div {
  color: rgba(0, 0, 0, 0.8);
  font-weight: bold;
}

d-contents nav a {
  color: rgba(0, 0, 0, 0.8);
  border-bottom: none;
  text-decoration: none;
}

d-contents li {
  list-style-type: none;
}

d-contents ul, d-article d-contents ul {
  padding-left: 1em;
}

d-contents nav ul li {
  margin-bottom: .25em;
}

d-contents nav a:hover {
  text-decoration: underline solid rgba(0, 0, 0, 0.6);
}

d-contents nav ul {
  margin-top: 0;
  margin-bottom: 6px;
}


d-contents nav>div {
  display: block;
  outline: none;
  margin-top: 0.7em;
  margin-bottom: 0.3em;
}

d-contents nav>div>a {
  font-size: var(--fs-figure);
  font-weight: 600;
  line-height: 1.3;
  display: inline-block;
}

d-contents nav>ul>li>a {
  font-size: var(--fs-body);
  line-height: 1.3;
  display: inline-block;
}

d-contents nav>div>a:hover,
d-contents nav>ul>li>a:hover {
    text-decoration: none;
}

.visual-toc {
    counter-reset: toc-heading;
    display: grid;
    grid-auto-flow: dense;
    grid-template-columns: 1fr 1fr 1fr;
    grid-column-gap: 8px;
    grid-row-gap: 16px;

    max-width: 1180px;
    margin: auto;
    margin-bottom: 8px;
    padding-left: 30px;
    padding-right: 30px;
}

@media (min-width: 850px) {
    .visual-toc {
        /* grid-gap: 8px; */
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
    }
}
@media (min-width: 1180px) {
    .visual-toc {
        grid-gap: 20px;
    }
}
.visual-toc-item {
    display: flex;
    flex-flow: column;
}
.visual-toc-top {
    flex-grow: 1;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    overflow: hidden;
    text-decoration: none;
    /* box-shadow: 0px 1px 4px rgba(0,0,0,0.05); */
    transition: box-shadow 0.35s, transform 0.35s;
    transform: scale(1);
    display: flex;
    flex-flow: column;
}
.visual-toc-top:hover {
    box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.05);
    transform: scale(1.02);
    transition: box-shadow 0.15s, transform 0.15s;
}
.visual-toc d-tochead,
.visual-toc d-subhead {
    display: block;
    line-height: 1.3em;
    font-size: 85%;
    padding: 0.5em .5em 1em 1em;
}

.visual-toc d-tochead {
    color: #333;
    font-weight: 600;
    display: block;
    line-height: 1.3em;
    font-size: 85%;
    padding: 1em 1em;
}

.visual-toc d-tochead {
    color: #333;
    font-weight: 600;
    /* padding: 0.8em 1em; */
}

.visual-toc figure {
    line-height: 0em;
}

.visual-toc figure.gdoc-image {
    max-width: none;
    padding-right: 0;
    margin: 0; /* Add if needed */
}

/* .visual-toc d-tochead::before {
    display: block;
    content: "Section " counter(toc-heading);
    font-weight: 400;
    text-transform: uppercase;
    font-size: 0.6rem;
    color: #666;
} */
.visual-toc d-subhead {
    display: none;
    color: #666;
    font-size: 75%;
}
.visual-toc-colab {
    border-radius: 5px;
    border: solid 1px rgba(0, 0, 0, 0.1);
    margin-top: 1em;
    padding-left: 1.2em;
    padding-right: 1.2em;
    padding-top: 0.25em;
    padding-bottom: 0.25em;
    text-transform: uppercase;
    color: #aaa;
    font-size: 10.5px;
    line-height: 24px;
    /* background-color: yellow; */
}
.visual-toc-colab > img {
    position: relative;
    top: 4px;
    /* filter: grayscale(); */
}
.visual-toc-item:hover .visual-toc-colab > img {
    filter: unset;
}

/* .visual-toc-top:hover,  */
.visual-toc-colab:hover {
    background-color: hsl(0, 0%, 97%);
    border-color: rgba(0, 0, 0, 0.2);
    color: #888;
}

.visual-toc a {
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.visual-toc a :global(img) {
    width: 100%;
}

.visual-toc figure {
    margin: 0;
}

.visual-toc figure.gdoc-image {
    max-width: none;
    padding-right: 0;
}
.visual-toc-top img {
    border-bottom: 1px solid #EEE;
}

h1 > a, h2 > a, h3 > a, h4 > a {
    text-decoration: none;
    border-bottom: none;
}


.ha-block{
    font-family: monospace;
    font-size: 14px;
    line-height: 1.5em;
    text-wrap: wrap;
    /* white-space: pre-wrap; */
    margin-bottom: 1em;
    background: #F6F6F3;
    outline: 1px solid #B8B6AE;
    padding: 12px;
    border-radius: 2fr;
    font-weight: 300;
    
    p{
        margin-bottom: 0;
        margin-block-start: 0;
        margin-block-end: 0;
    }
    
    b.max-act{
        border-radius: 4px;
        padding: 1px;
        cursor: default;
        white-space: pre;
        outline: 1px solid #000;
        background: var(--accent-orange);
    }
}

.prompt-inline, kbd, code{
    background: #F6F6F3;
    font-family: monospace;
    font-style: normal;
    padding: 2px 4px;
    border-radius: 2px;
    border: 1px solid #B8B6AE;
    font-weight: 100;
    margin-left: 2px;
    margin-right: 2px;
    box-decoration-break: clone;
}

kbd {
    box-shadow: 0 1px 1px rgba(0,0,0,0.8);
}

.sn-figma-div{
    margin-top: 1em;
    margin-bottom: 2em;
}

@media (max-width: 1048px) {
    .sn-figma-div {
        padding-left: 4px;
        padding-right: 4px;
    }
}

.prune-code{
    overflow-x: scroll;
}


figure.hide { display: none; }

/* ───── visual TOC (thumbnail grid under the title) ─────
   Expanded server-side from [[VISUAL_TOC]] in the gdoc — see
   figure_refs.VisualToc. One .visual-toc-top tile per gdoc-H1 section;
   thumbnail on top, title below, links to the section anchor. Independent of
   <d-contents> / buildToc.  Adapted from clt_paper paper.css:410-553. */
.visual-toc {
    grid-column: page;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 0 0 30px;
}
@media (min-width: 800px) { .visual-toc { grid-template-columns: repeat(4, 1fr); gap: 16px; } }

.visual-toc a.visual-toc-top {
    display: flex; flex-direction: column;
    border: 1px solid var(--rule); border-radius: 6px;
    overflow: hidden; background: #fff;
    text-decoration: none; cursor: pointer;
    transition: box-shadow .2s, transform .2s;
}
.visual-toc a.visual-toc-top:hover {
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    transform: scale(1.02);
}
.visual-toc-top img {
    width: 100%; display: block;
    border-bottom: 1px solid var(--rule);
}
/* gdoc pasted thumbnails arrive wrapped in <figure class="gdoc-image"> — reset
   the article-column figure styling so they fill the tile. */
.visual-toc figure, .visual-toc figure.gdoc-image {
    margin: 0; padding: 0; max-width: none; line-height: 0;
}
.visual-toc d-tochead {
    display: block; padding: 10px 12px;
    font-family: var(--font-sans); font-size: var(--fs-small);
    font-weight: 600; line-height: 1.3; color: var(--text);
}
.visual-toc d-tochead .toc-num {
    display: block; font-weight: 400; font-size: var(--fs-label);
    color: var(--text-light); margin-bottom: 2px;
}

* > * {
    /* outline: 1px solid #f00; */
}
