/* The illustrated frontispiece sets the title across the page and binds the notes to its plate. */
.vl-story {
    --reading-width: 680px;
    --reading-wide: 1100px;
    --story-width: 1520px;
    --story-gutter: var(--gutter);
    min-inline-size: 0;
}
.vl-story-head {
    max-width: var(--story-width);
    margin: clamp(35px, 4.3vw, 70px) auto clamp(44px, 6.4vw, 100px);
    padding-inline: var(--story-gutter);
}
.vl-story-copy, .vl-story-note {
    min-width: 0;
    max-width: 800px;
    margin-inline: auto;
}
.vl-story-title {
    margin: 0;
    font: 630 clamp(2.9rem, 6.3vw, 6.75rem)/.98 var(--font-display);
    letter-spacing: -.04em;
    text-wrap: balance;
    overflow-wrap: anywhere;
}
.vl-story-note { margin-top: clamp(16px, 2vw, 30px); }
.vl-story-dek {
    margin: 0;
    max-width: 44ch;
    font: 400 clamp(1.25rem, 1.8vw, 1.65rem)/1.29 var(--font-text);
    text-wrap: pretty;
    color: var(--ink);
}
.vl-story-copy > .vl-story-dek { margin-top: 1rem; }
.vl-story-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .9rem; color: var(--muted); }
.vl-story-dek + .vl-story-meta { margin-top: clamp(20px, 2.2vw, 36px); }
.vl-story-meta p { margin: 0; }
.vl-story-credit { font: 600 .93rem/1.4 var(--ui); color: var(--ink); }
.vl-story-credit a:hover { text-decoration: underline; }
.vl-story-date { font: 450 .79rem/1.55 var(--ui); }
.vl-chapters {
    position: relative;
    width: fit-content;
    margin-top: clamp(1rem, 1.8vw, 1.8rem);
    color: var(--edition-ink, var(--accent));
    font: 600 .85rem/1.45 var(--ui);
}
.vl-chapters summary { list-style: none; cursor: pointer; padding-block: .3rem; }
.vl-chapters summary::-webkit-details-marker { display: none; }
.vl-chapters summary::after { content: ''; display: inline-block; width: .46em; height: .46em; border-inline-end: 1.4px solid; border-block-end: 1.4px solid; transform: translateY(-.23em) rotate(45deg); margin-inline-start: .7em; }
.vl-chapters[open] summary::after { transform: translateY(.02em) rotate(225deg); }
.vl-chapters ol { margin: .5rem 0 0; max-width: 35ch; padding-inline-start: 1.6rem; list-style-type: decimal-leading-zero; }
.vl-chapters li { padding-inline-start: .35em; padding-block: .16em; }
.vl-chapters li::marker { font-variant-numeric: tabular-nums; font-weight: 450; }
.vl-chapters a:hover { text-decoration: underline; }
.vl-story-plate { min-inline-size: 0; max-width: 960px; margin: clamp(25px, 3vw, 46px) auto 0; }
.vl-story-plate img { display: block; width: 100%; height: auto; }
.vl-story-plate figcaption, .vl-reading figcaption {
    font: 450 .8rem/1.5 var(--ui);
    color: var(--muted);
    text-align: start;
    overflow-wrap: anywhere;
}
.vl-story-plate figcaption { margin-top: .72rem; }
.vl-story-plate figcaption a { color: inherit; text-decoration: underline; }
/* The mounted plate opens to its entire original canvas, on a quiet viewing sheet. */
.vl-story--feature .vl-plate-image { position: relative; }
.vl-plate-open { position: absolute; inset: 0; cursor: zoom-in; }
.vl-plate-action, .vl-plate-close {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--edition-ink, var(--accent));
    background: var(--paper);
    font: 600 .78rem/1.3 var(--ui);
}
.vl-plate-action { position: absolute; inset: auto .7rem .7rem auto; padding: .5rem .65rem; }
.vl-plate-open:hover .vl-plate-action, .vl-plate-open:focus-visible .vl-plate-action, .vl-plate-close:hover { text-decoration: underline; text-underline-offset: .2em; }
.vl-plate-dialog:not([open]) { display: none; }
.vl-plate-dialog[open] {
    position: fixed;
    inset: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: .65rem;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: max(12px, env(safe-area-inset-top)) max(18px, 3vw) max(18px, env(safe-area-inset-bottom));
    border: 0;
    color: var(--ink);
    background: var(--paper);
    overscroll-behavior: contain;
}
:root:has(.vl-plate-dialog[open]) { overflow: hidden; }
.vl-plate-toolbar { display: flex; justify-content: end; }
.vl-plate-close { min-height: 44px; padding: .4rem .65rem; border: 0; }
.vl-full-plate { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0,1fr) auto; margin: 0; }
.vl-full-plate img { width: 100%; height: 100%; object-fit: contain; }
.vl-full-plate figcaption { justify-self: center; max-width: 85ch; max-height: 24vh; overflow-y: auto; padding-top: .85rem; text-align: center; font: 450 .84rem/1.4 var(--ui); }
.vl-full-plate figcaption a { text-decoration: underline; }
.vl-story--feature .vl-story-head { margin-block: clamp(28px, 3.6vw, 58px) clamp(40px, 5.3vw, 80px); }
.vl-story--feature .vl-story-copy { max-width: none; margin: 0; }
.vl-story--feature .vl-story-title {
    font-size: clamp(3.9rem, 9.8vw, 9.3rem);
    font-weight: 555;
    font-variation-settings: 'opsz' 55;
    line-height: .93;
    letter-spacing: -.035em;
    color: var(--edition-ink, var(--accent));
}
.vl-story--feature .vl-story-head:not(.has-plate) {
    max-width: calc(1180px + 2 * var(--story-gutter));
}
.vl-story--feature .vl-story-head:not(.has-plate) .vl-story-note { margin-inline: 0; }
[data-feature="Split spread"] .vl-story--feature .has-plate {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(24px, 2.7vw, 42px) clamp(34px, 4.5vw, 76px);
}
[data-feature="Split spread"] .vl-story--feature .has-plate .vl-story-copy { grid-column: 1 / -1; }
[data-feature="Split spread"] .vl-story--feature .has-plate .vl-story-plate { width: 100%; max-width: none; margin: 0; }
[data-feature="Split spread"] .vl-story--feature .has-plate .vl-plate-image {
    position: relative;
    isolation: isolate;
}
[data-feature="Split spread"] .vl-story--feature .has-plate .vl-plate-image::before {
    content: '';
    position: absolute;
    inset: 9px -5px -7px 12px;
    z-index: -1;
    background: var(--edition-ink, var(--accent));
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 99.4%);
}
[data-feature="Split spread"] .vl-story--feature .has-plate .vl-story-plate img { aspect-ratio: 1.72; object-fit: cover; }
[data-feature="Split spread"] .vl-story--feature .has-plate .vl-story-plate figcaption { margin-top: .95rem; }
[data-feature="Split spread"] .vl-story--feature .has-plate .vl-story-note { width: 100%; margin: clamp(12px, 2vw, 32px) 0 0; }
[data-feature="Split spread"] .vl-story--feature .has-plate .vl-story-dek { font-size: clamp(1.45rem, 2.03vw, 1.95rem); line-height: 1.23; }
[data-feature="Split spread"] .vl-story--feature .has-plate .vl-story-meta { display: grid; gap: .22rem; }
[data-feature="Full bleed"] .vl-story:not(.vl-story--dispatch, .vl-story--portfolio) .vl-story-head { max-width: none; padding-inline: 0; }
[data-feature="Full bleed"] .vl-story:not(.vl-story--dispatch, .vl-story--portfolio) :is(.vl-story-copy, .vl-story-note) { width: min(800px, calc(100% - 2 * var(--story-gutter))); margin-inline: auto; }
[data-feature="Full bleed"] .vl-story--feature .vl-story-copy { width: min(calc(var(--story-width) - 2 * var(--story-gutter)), calc(100% - 2 * var(--story-gutter))); }
[data-feature="Full bleed"] .vl-story:not(.vl-story--dispatch, .vl-story--portfolio) .vl-story-plate { max-width: none; }
[data-feature="Full bleed"] .vl-story:not(.vl-story--dispatch, .vl-story--portfolio) .vl-story-plate img { width: 100%; max-height: 76svh; object-fit: cover; }
[data-feature="Full bleed"] .vl-story:not(.vl-story--dispatch, .vl-story--portfolio) .vl-story-plate figcaption { padding-inline: var(--story-gutter); }
[data-feature="Framed plate"] .vl-story:not(.vl-story--dispatch, .vl-story--portfolio) .vl-story-plate { padding: clamp(10px, 1.3vw, 20px); background: var(--paper-deep); }
.vl-story--dispatch .vl-story-head { max-width: calc(var(--reading-width) + 2 * var(--story-gutter)); margin-block: clamp(30px, 4vw, 58px) 30px; }
.vl-story--dispatch .vl-story-title { font-size: clamp(2.55rem, 4.8vw, 4.7rem); }
.vl-story--dispatch .vl-story-plate img { max-height: 390px; object-fit: contain; object-position: left center; }
.vl-story--dispatch .vl-story-dek { font-size: 1.2rem; }
@media (max-width: 860px) {
    [data-feature="Split spread"] .vl-story--feature .has-plate { display: block; }
    [data-feature="Split spread"] .vl-story--feature .has-plate .vl-story-plate { margin-top: clamp(22px, 4vw, 38px); }
    [data-feature="Split spread"] .vl-story--feature .has-plate .vl-story-plate img { aspect-ratio: 1.55; }
    [data-feature="Split spread"] .vl-story--feature .has-plate .vl-story-note { max-width: 41rem; margin-top: clamp(22px, 4.2vw, 38px); }
}
@media (max-width: 560px) {
    .vl-story-head { margin-top: 32px; }
    .vl-story-meta { display: grid; gap: .22rem; }
    .vl-story--feature .vl-story-title { font-size: clamp(3.45rem, 14.25vw, 4.85rem); }
    [data-feature="Split spread"] .vl-story--feature .has-plate .vl-story-dek { font-size: 1.45rem; }
    .vl-story--dispatch .vl-story-meta { margin-top: 1rem; }
}

/* Full/wide/editorial tracks share one containing block, including scrollbar width. */
.vl-reading.gh-content {
    --outer: max(var(--story-gutter), calc((100% - var(--reading-wide)) / 2));
    --inner: max(0px, calc((100% - var(--reading-width)) / 2 - var(--outer)));
    display: grid;
    grid-template-columns: [full-start] var(--outer) [wide-start] var(--inner)
        [body-start] minmax(0, 1fr) [body-end] var(--inner) [wide-end] var(--outer) [full-end];
    max-width: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font: 400 clamp(1.15rem, 1.1vw + .4rem, 1.3rem)/1.63 var(--font-text);
    overflow-wrap: break-word;
}
.vl-reading > * {
    grid-column: body-start / body-end;
    min-inline-size: 0;
    max-inline-size: 100%;
    margin: 0;
}
.vl-reading > * + * { margin-block-start: 1.15em; }
.vl-reading > :is(h2,h3,h4,h5,h6) {
    font-family: var(--font-display);
    font-weight: 620;
    line-height: 1.05;
    text-wrap: balance;
    scroll-margin-top: 1em;
}
.vl-reading > :is(h2,h3,h4,h5,h6):not(:first-child) { margin-top: 1.65em; }
.vl-reading > h2 { font-size: clamp(2rem, 3.6vw, 3.35rem); letter-spacing: -.04em; color: var(--edition-ink, var(--accent)); }
.vl-reading > h3 { font: italic 400 clamp(1.55rem, 2.5vw, 2.1rem)/1.17 var(--font-text); }
.vl-reading > :is(h4,h5,h6) { font: 600 1rem/1.45 var(--ui); }
.vl-reading > :is(h2,h3,h4,h5,h6) + * { margin-top: .65em; }
.vl-reading > p a, .vl-reading li a, .vl-reading figcaption a, .vl-reading > blockquote a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--accent-text, var(--ink));
    text-underline-offset: .13em;
}
.vl-reading > :is(ul,ol) { padding-inline-start: 1.25em; }
.vl-reading > blockquote:not(.kg-blockquote-alt) {
    margin-block: .5em .22em;
    padding: .55em 0 .55em clamp(14px, 3.2vw, 48px);
    color: var(--edition-ink, var(--accent));
    font: italic 400 clamp(1.65rem, 3.2vw, 2.65rem)/1.15 var(--font-text);
    text-wrap: pretty;
}
.vl-reading > blockquote.kg-blockquote-alt {
    margin-inline: 0;
    padding: .7em 0;
    border-block: 1px solid var(--rule);
    font: 600 clamp(1.85rem,3.8vw,3rem)/1.11 var(--font-display);
    text-align: start;
}
.vl-reading > hr {
    border: 0;
    height: auto;
    text-align: center;
    color: var(--muted);
    font: italic 1.4em/1.3 var(--font-text);
}
.vl-reading > hr::after { content: "§"; }
.vl-reading > pre { padding: 1em; background: var(--paper-deep); overflow-x: auto; }
.vl-reading :not(pre) > code { font-size: .83em; background: var(--paper-deep); padding: .1em .25em; overflow-wrap: anywhere; }
.vl-reading > table {
    display: block;
    width: fit-content;
    overflow-x: auto;
    border-collapse: collapse;
    font: .9rem/1.5 var(--ui);
}
.vl-reading :is(th,td) { border-bottom: 1px solid var(--rule); padding: .6em .9em .6em 0; text-align: start; }
.vl-reading :is(figure,iframe,video,embed,object,canvas,svg) { max-width: 100%; }
.vl-reading .kg-embed-card :is(iframe[src*="youtube"],iframe[src*="vimeo.com"]) {
    display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
}
.vl-reading > .kg-width-wide, .vl-reading > .kg-width-full {
    position: static;
    width: 100%;
    left: auto;
    transform: none;
    margin-inline: 0;
    margin-block-start: clamp(2rem, 4.5vw, 4rem);
}
.vl-reading > .kg-width-wide { grid-column: wide-start / wide-end; }
.vl-reading > .kg-width-full { grid-column: full-start / full-end; }
.vl-reading > .kg-width-full figcaption { padding-inline: var(--story-gutter); }
.vl-reading > :is(.kg-width-wide,.kg-width-full) + * { margin-block-start: clamp(1.75rem, 3.5vw, 3rem); }
.vl-reading > :first-child { margin-block-start: 0; }
.vl-reading .kg-image-card img { margin-inline: auto; }
.vl-reading figcaption { margin-top: .7rem; }
.vl-reading .kg-audio-card, .vl-reading .kg-file-card { overflow-wrap: anywhere; }
.vl-reading .kg-bookmark-container, .vl-reading .kg-file-card-container { color: inherit; }
.vl-reading .kg-gallery-image { min-width: 0; }
.vl-reading .kg-toggle-card .kg-toggle-heading-text { margin: 0; }
.vl-page > .vl-reading:first-child { margin-top: clamp(24px, 4vw, 60px); }

/* In a portfolio, the artwork keeps its native proportions and the caption has its own space. */
.vl-story--portfolio {
    --reading-wide: 1200px;
}
.vl-story--portfolio .vl-story-head {
    max-width: calc(var(--reading-wide) + 2 * var(--story-gutter));
    margin-bottom: clamp(2.5rem, 5vw, 5rem);
}
.vl-story--portfolio .vl-story-title {
    color: var(--edition-ink);
    font-size: clamp(3.1rem, 6.3vw, 6.7rem);
    font-weight: 560;
    line-height: .98;
    text-wrap: pretty;
}
.vl-story--portfolio :is(.vl-story-copy, .vl-story-note) { margin-inline: 0; }
.vl-story--portfolio .vl-story-plate {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
    margin: clamp(1.5rem, 3vw, 3rem) 0 0;
}
.vl-story--portfolio .vl-plate-image {
    position: relative;
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
}
.vl-story--portfolio .vl-plate-image img { width: auto; max-height: 76svh; object-fit: contain; }
.vl-story--portfolio .vl-story-plate figcaption { text-align: center; }
.vl-story--portfolio .vl-reading > :is(.kg-image-card, .kg-gallery-card):not(.kg-width-full) {
    grid-column: wide-start / wide-end;
}
.vl-story--portfolio .vl-reading > :is(.kg-image-card, .kg-gallery-card):not(:first-child) {
    margin-block-start: clamp(2.4rem, 6vw, 5.8rem);
}
.vl-story--portfolio .vl-reading > .kg-image-card img {
    width: auto;
    max-height: 90svh;
    object-fit: contain;
}
.vl-story--portfolio .vl-reading > .kg-image-card.kg-width-full img {
    width: 100%;
    max-height: none;
}
@media (min-width: 800px) {
    .vl-story--portfolio .vl-story-head {
        display: grid;
        grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
        column-gap: clamp(3rem, 7vw, 7.5rem);
        align-items: end;
    }
    .vl-story--portfolio .vl-story-note { margin-block: 0; }
    .vl-story--portfolio .vl-reading > .kg-image-card:not(.kg-width-wide, .kg-width-full):has(> figcaption) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(10rem, 19%);
        align-items: end;
        gap: clamp(1.5rem, 3vw, 3rem);
    }
    .vl-story--portfolio .vl-reading > .kg-image-card:not(.kg-width-wide, .kg-width-full) figcaption {
        margin: 0 0 .15em;
        max-width: 29ch;
    }
}
/* The first and last text marks belong to their actual prose boundaries. */
[data-dropcap] .vl-story--feature .vl-reading > p:first-child::first-letter,
[data-dropcap] .vl-story--story .vl-reading > p:first-child::first-letter {
    float: left;
    padding: .06em .08em 0 0;
    font: italic 400 4.55em/.74 var(--font-text);
    color: var(--edition-ink, var(--accent));
}
.vl-story:not(.vl-page) .vl-reading > p:last-child::after {
    content: "";
    display: inline-block;
    width: .4em;
    height: .4em;
    margin-inline-start: .35em;
    background: currentColor;
}
.vl-story:not(.vl-page) .vl-reading:has(> :last-child:not(p))::after {
    content: "";
    grid-column: body-start / body-end;
    justify-self: end;
    margin-top: 1.25em;
    width: .4em;
    height: .4em;
    background: var(--ink);
}
.vl-story-foot, .vl-story-comments {
    width: min(var(--reading-width), calc(100% - 2 * var(--story-gutter)));
    margin: clamp(42px, 6vw, 85px) auto 0;
}
.vl-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem .8rem;
    margin: 0 0 1rem;
    font: 500 .8rem/1.5 var(--ui);
    color: var(--muted);
}
.vl-tags:empty { display: none; }
.vl-tags a, .vl-story-collection { text-decoration: underline; text-underline-offset: .2em; }
.vl-tags a:hover, .vl-story-collection:hover { color: var(--ink); }
.vl-author-name:hover { text-decoration: underline; text-underline-offset: .15em; }
.vl-author-card {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
    border-block-start: 1px solid var(--rule);
    padding: 1.1rem 0;
}
.vl-author-card img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.vl-author-name { font: 400 1.55rem/1.2 var(--font-display); }
.vl-author-card p { margin: .3rem 0 0; font-size: 1rem; color: var(--ink-soft); }
.vl-story-next {
    display: grid;
    justify-items: start;
    gap: .65rem;
    margin-top: 1.5rem;
    border-block-start: 1px solid var(--rule);
    padding-block-start: clamp(20px, 2.5vw, 35px);
    color: var(--edition-ink, var(--accent));
}
.vl-story-next > span, .vl-story-collection { font: 550 .88rem/1.5 var(--ui); }
.vl-story-next strong {
    font: 550 clamp(1.85rem, 3.4vw, 3rem)/1.03 var(--font-display);
    letter-spacing: -.035em;
    text-wrap: balance;
    overflow-wrap: anywhere;
}
.vl-story-next:hover strong { text-decoration: underline; text-underline-offset: .12em; text-decoration-thickness: .045em; }
.vl-story-collection { display: inline-block; margin-top: 1.2rem; color: var(--muted); }
.vl-running-progress {
    position: fixed;
    inset: 0 0 auto;
    z-index: 15;
    height: 2px;
    pointer-events: none;
    background: var(--edition-ink, var(--accent));
    transform-origin: left;
    transform: scaleX(0);
}
[dir="rtl"] .vl-running-progress { transform-origin: right; }
