/* DPP Gothic Press 3.8.3 - extras: the story-turn hint and slide, "Pass this paper to a friend", Letters to the
 * Editor, and the subscription ticket.
 * Each of the three slips is its own piece of paper: it sets its stock and its ink together, so it reads the same on
 * the sheet and on the dark surround. Stock and ink follow the page (--paper, --paper-inset, --ink, --rule); the
 * values after the commas are the London stock. Lettering is always the full ink. Type is named by role only.
 * (The hint is the exception: it is a row of the folio strip and prints on the strip's stock in the strip's ink.)
 * Width: --extras-measure; unless the page sets it, the folio strip's own (--dpp-folio-strip-max, 47rem). Set straight
 * into main, on the surround, a slip keeps the strip's 12 px gutters; set inside a sheet it fills that sheet's measure.
 * Where to set them: after a story and its folio strip, not inside the story's copy block (.dpp-publication-reading,
 * .post-content), whose rules for every paragraph, heading and list item are meant for the story's own words.
 */
.dpp-share-friend,
.dpp-letters-editor,
.dpp-subscription-ticket {
    --extras-paper: var(--paper, #e6dfd3);
    --extras-inset: var(--paper-inset, #ded6c7);
    --extras-ink: var(--ink, #191614);
    --extras-rule: var(--rule, #3a332c);
    box-sizing: border-box;
    width: min(100% - var(--extras-gutter, 0px), var(--extras-measure, var(--dpp-folio-strip-max, 47rem)));
    margin: 1rem auto;
    color: var(--extras-ink);
    font: 400 .85rem/1.5 var(--type-body);
    letter-spacing: 0;
    text-align: start;
    text-transform: none;
}
main > :is(.dpp-share-friend, .dpp-letters-editor, .dpp-subscription-ticket) { --extras-gutter: 24px; }
/* a sheet's rule for all its paragraphs or list items must not re-ink the lettering of a slip set inside it */
:is(.dpp-share-friend, .dpp-letters-editor, .dpp-subscription-ticket) :is(h2, p, li, label) { color: inherit; }

/* ---------- buttons shared by the share strip and the ticket ---------- */
.dpp-share-friend .dpp-share-friend-btn,
.dpp-subscription-ticket .dpp-subscription-ticket-btn {
    display: inline-flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: .45rem 1rem;
    border: 1px solid var(--extras-ink);
    border-radius: 0;
    background: var(--extras-ink);
    color: var(--extras-paper);
    font: 400 .95rem/1.15 var(--type-smallcaps);
    letter-spacing: .06em;
    text-align: center;
    text-decoration: none;
    text-transform: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}
.dpp-share-friend .dpp-share-friend-btn:is(:hover, :focus-visible),
.dpp-subscription-ticket .dpp-subscription-ticket-btn:is(:hover, :focus-visible),
.dpp-subscription-ticket .dpp-subscription-ticket-btn-alt {
    background: var(--extras-paper);
    color: var(--extras-ink);
}
.dpp-subscription-ticket .dpp-subscription-ticket-btn-alt:is(:hover, :focus-visible) {
    background: var(--extras-ink);
    color: var(--extras-paper);
}
.dpp-share-friend :is(.dpp-share-friend-btn, input):focus-visible,
.dpp-subscription-ticket a:focus-visible {
    outline: 2px solid var(--extras-ink);
    outline-offset: 2px;
}

/* ---------- the story-turn hint: dpp-reader-extras.js makes it and sets it as the first row of the folio strip
   (the strip is a two-column grid; the hint spans both), so the story sheet and its strip stay joined. It prints on
   the strip's own stock in the strip's own ink. It is a div named twice over, so that rules meant for a sheet's
   paragraphs, or for the strip's links, pass it by ---------- */
.dpp-turn-hint.dpp-turn-hint {
    grid-column: 1 / -1;
    box-sizing: border-box;
    margin: 0;
    padding: .45rem .9rem;
    border-bottom: 1px solid var(--rule, #3a332c);
    color: inherit;
    font: italic 400 .85rem/1.45 var(--type-deck);
    letter-spacing: 0;
    text-align: center;
    text-transform: none;
}

/* ---------- "Pass this paper to a friend" ---------- */
.dpp-share-friend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem 1.25rem;
    padding: 1rem 1.1rem .8rem;
    border: 1px solid var(--extras-rule);
    background: var(--extras-paper);
    box-shadow: inset 0 0 0 3px var(--extras-paper), inset 0 0 0 4px var(--extras-rule);
}
.dpp-share-friend .dpp-share-friend-head { flex: 1 1 15rem; min-width: 0; }
.dpp-share-friend .dpp-share-friend-title {
    margin: 0;
    padding: 0;
    border: 0;
    color: inherit;
    font: 400 1.3rem/1.15 var(--type-smallcaps);
    letter-spacing: .05em;
    text-transform: none;
}
.dpp-share-friend .dpp-share-friend-deck { margin: .2rem 0 0; font: italic 400 .85rem/1.45 var(--type-deck); }
.dpp-share-friend .dpp-share-friend-actions { display: flex; flex: 1 1 15rem; flex-wrap: wrap; gap: .5rem; margin: 0; }
.dpp-share-friend .dpp-share-friend-btn[hidden],
body:not(.js-enabled) .dpp-share-friend [data-dpp-share-copy] { display: none; }
.dpp-share-friend .dpp-share-friend-address {
    display: flex;
    flex: 1 1 100%;
    flex-wrap: wrap;
    align-items: center;
    gap: .3rem .7rem;
    min-width: 0;
    margin: 0;
    font: 400 .75rem/1.3 var(--type-label);
    letter-spacing: .1em;
    text-transform: uppercase;
}
.dpp-share-friend .dpp-share-friend-address input {
    flex: 1 1 14rem;
    box-sizing: border-box;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: .35rem .6rem;
    border: 1px solid var(--extras-rule);
    border-radius: 0;
    background: var(--extras-inset);
    color: var(--extras-ink);
    font: 400 .9rem/1.3 var(--type-classified);
    letter-spacing: 0;
    text-transform: none;
}
.dpp-share-friend .dpp-share-friend-status {
    flex: 1 1 100%;
    min-height: 1.45em;
    margin: 0;
    font: italic 400 .85rem/1.45 var(--type-deck);
}

/* ---------- Letters to the Editor: the frame only. Ghost's comments sit in an iframe no stylesheet reaches ---------- */
.dpp-letters-editor {
    border-top: 3px double var(--extras-rule);
    border-bottom: 3px double var(--extras-rule);
    background: var(--extras-paper);
}
.dpp-letters-editor .dpp-letters-editor-head { padding: .9rem 1rem 0; text-align: center; }
.dpp-letters-editor .dpp-letters-editor-title {
    margin: 0;
    padding: 0;
    border: 0;
    color: inherit;
    font: 400 1.5rem/1.15 var(--type-smallcaps);
    letter-spacing: .08em;
    text-transform: none;
}
.dpp-letters-editor .dpp-letters-editor-terms {
    max-width: 34em;
    margin: .3rem auto 0;
    font: italic 400 .85rem/1.45 var(--type-deck);
}
.dpp-letters-editor .dpp-letters-editor-terms::after {
    content: "";
    display: block;
    width: 5rem;
    margin: .7rem auto 0;
    border-top: 1px solid var(--extras-rule);
}
.dpp-letters-editor .dpp-letters-editor-column {
    min-height: 7rem;   /* room kept for Ghost's box while it loads, so the page below does not jump as far */
    margin: .8rem 1rem 1rem;
    padding: .25rem 1rem;
    border-left: 1px solid var(--extras-rule);
    border-right: 1px solid var(--extras-rule);
}

/* ---------- the subscription ticket: stub, perforation, nip and punched hole, all drawn here ---------- */
.dpp-subscription-ticket {
    container-type: inline-size;
    filter: drop-shadow(0 .15rem .3rem rgba(0, 0, 0, .4));
}
.dpp-subscription-ticket .dpp-subscription-ticket-card {
    --hole: .5rem;
    --nip: .45rem;
    --hole-x: calc(100% - 1.6rem);
    --hole-y: 1.4rem;
    --nip-x: -5rem;
    --ticket-cut:
        radial-gradient(circle at var(--hole-x) var(--hole-y), #000 var(--hole), transparent calc(var(--hole) + .5px)),
        radial-gradient(circle at var(--nip-x) 0, #000 var(--nip), transparent calc(var(--nip) + .5px)),
        radial-gradient(circle at var(--nip-x) 100%, #000 var(--nip), transparent calc(var(--nip) + .5px)),
        linear-gradient(#000, #000);
    display: grid;
    border: 1px solid var(--extras-rule);
    background: var(--extras-paper);
    -webkit-mask-image: var(--ticket-cut);
    -webkit-mask-composite: xor;
    mask-image: var(--ticket-cut);
    mask-composite: exclude;
}
.dpp-subscription-ticket .dpp-subscription-ticket-stub {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .1rem .7rem;
    margin: 0;
    padding: .7rem 3.3rem .6rem 1rem;
    border-bottom: 2px dotted var(--extras-rule);
    background: var(--extras-inset);
    font: 400 .7rem/1.3 var(--type-label);
    letter-spacing: .12em;
    text-transform: uppercase;
}
.dpp-subscription-ticket .dpp-subscription-ticket-stub b {
    font: 400 1.1rem/1.1 var(--type-smallcaps);
    letter-spacing: .06em;
    text-transform: none;
}
.dpp-subscription-ticket .dpp-subscription-ticket-body { min-width: 0; padding: .8rem 1rem 1rem; }
.dpp-subscription-ticket .dpp-subscription-ticket-window {
    margin: 0;
    font: 400 .7rem/1.3 var(--type-label);
    letter-spacing: .16em;
    text-transform: uppercase;
}
/* small caps, like the other two slips' headings: the headline face would be one more font file on a story page */
.dpp-subscription-ticket .dpp-subscription-ticket-title {
    margin: .1rem 0 .5rem;
    padding: 0;
    border: 0;
    color: inherit;
    font: 400 1.5rem/1.15 var(--type-smallcaps);
    letter-spacing: .04em;
    text-transform: none;
}
.dpp-subscription-ticket .dpp-subscription-ticket-line { margin: 0 0 .7rem; font: 400 .85rem/1.5 var(--type-body); }
.dpp-subscription-ticket .dpp-subscription-ticket-benefits { margin: 0 0 .7rem; padding: 0; list-style: none; }
.dpp-subscription-ticket .dpp-subscription-ticket-benefits li {
    margin: 0;
    padding: .3rem 0;
    border-top: 1px solid var(--extras-rule);
    font: 400 .85rem/1.5 var(--type-body);
}
.dpp-subscription-ticket .dpp-subscription-ticket-benefits li:last-child { border-bottom: 1px solid var(--extras-rule); }
.dpp-subscription-ticket .dpp-subscription-ticket-benefits b {
    font: 400 .95rem/1.2 var(--type-smallcaps);
    letter-spacing: .04em;
}
/* the fare panel holds the theme's own price partial (dpp-pulp-prices); only its setting is done here */
.dpp-subscription-ticket .dpp-subscription-ticket-fare {
    margin: 0 0 .8rem;
    padding: .55rem .8rem;
    border: 1px solid var(--extras-rule);
    background: var(--extras-inset);
}
.dpp-subscription-ticket .pulp-membership-prices { margin: 0; padding: 0; list-style: none; }
.dpp-subscription-ticket .pulp-membership-prices li { margin: 0; padding: .1rem 0; font: 400 .85rem/1.45 var(--type-classified); }
.dpp-subscription-ticket .pulp-membership-prices strong { font-weight: 700; }
.dpp-subscription-ticket .pulp-membership-prices a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: .15em;
}
.dpp-subscription-ticket .pulp-price-note { margin: .35rem 0 0; font: italic 400 .8rem/1.4 var(--type-deck); }
.dpp-subscription-ticket .dpp-subscription-ticket-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }

/* room enough: the stub stands at the side, torn along a perforation with a nip at each end */
@container (min-width: 34rem) {
    .dpp-subscription-ticket .dpp-subscription-ticket-card {
        --stub: 9rem;
        --hole-x: calc(var(--stub) / 2);
        --hole-y: calc(100% - 1.7rem);
        --nip-x: var(--stub);
        grid-template-columns: var(--stub) minmax(0, 1fr);
    }
    .dpp-subscription-ticket .dpp-subscription-ticket-stub {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: center;
        gap: .5rem;
        padding: 1rem .8rem 3.4rem;
        border-right: 2px dotted var(--extras-rule);
        border-bottom: 0;
        text-align: center;
    }
}

/* ---------- motion, only for readers who have not asked for stillness ---------- */
@media (prefers-reduced-motion: no-preference) {
    .dpp-subscription-ticket .dpp-subscription-ticket-card { transition: transform .2s ease-out; }
    html:not([data-dpp-motion="paused"]) .dpp-subscription-ticket:is(:hover, :focus-within) .dpp-subscription-ticket-card { transform: translateY(-3px); }
    /* the page turn: dpp-reader-extras.js sets data-dpp-turn for 200 ms before it follows the folio link */
    html[data-dpp-turn] { overflow-x: hidden; }
    html[data-dpp-turn] main { transition: transform .2s ease-in, opacity .2s ease-in; }
    html[data-dpp-turn="next"] main { transform: translateX(-2rem); opacity: .3; }
    html[data-dpp-turn="prev"] main { transform: translateX(2rem); opacity: .3; }
}

/* 3.8.3.1 edit 6 (L.D., 11 Nov 2026): the Orbiter's title was 16 px - an older "inherit !important" rule with a
   long :has() selector outranked its display size. The id below lifts this rule above it (an id beats any
   number of classes); html makes it match on every page, not only the front page. */
:is(#pulp-stories, html) article.dpp-publication-sheet[data-dpp-orbiter] .dpp-publication-reading > :is(h1, h2, h3) {
    font-family: var(--type-gothic) !important;
    font-size: clamp(1.6rem, 3vw, 2.3rem) !important;
    font-weight: 700 !important;
    line-height: 1.05 !important;
    letter-spacing: .02em !important;
    margin-block-start: 0;
}

/* The Pitifully Pathetic Pulp Fiction reading windows (L.D., 3.8.3.1 edits 12 and 13, 11 Nov 2026): no scroll bars
   and no frame. They still scroll by wheel, touch and keyboard, and "Scroll to read" stays beneath them. */
#pulp-stories .dpp-fiction-viewport { scrollbar-width: none; border: 0 !important; }
#pulp-stories .dpp-fiction-viewport::-webkit-scrollbar { display: none; }
