/* The Rania Post, site-wide: the New Yorker grammar. Ported from version217 (approved 27 Sep 2026).
   Loaded after styles.css by nyShell in functions/_render.js. */

@import url('https://fonts.googleapis.com/css2?family=Libre+Caslon+Display&family=Libre+Caslon+Text:ital,wght@0,400;0,700;1,400&family=Jost:wght@400;500;600&display=swap');

:root {
  --ny-ink: #000; --ny-soft: #333; --ny-grey: #6b6b6b; --ny-rule: #e0e0e0; --ny-bg: #fff; --ny-tint: #f4f3ef;
  --ny-red: #c8102e; --ny-hero: #000; --ny-hero-ink: #fff;
  --ny-caslon: 'Libre Caslon Text', Georgia, serif;
  --ny-disp: 'Libre Caslon Display', 'Libre Caslon Text', Georgia, serif;
  --ny-sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;
}
[data-theme="dark"] { --ny-ink: #ededed; --ny-soft: #cfcfcf; --ny-grey: #9a9a9a; --ny-rule: #2c2f33; --ny-bg: #0d0e10; --ny-tint: #17181b; --ny-red: #ff6470; --ny-hero: #000; }

body.ny { background: var(--ny-bg); color: var(--ny-ink); font-family: var(--ny-caslon); margin: 0; }
body.ny a { color: inherit; text-decoration: none; }
.ny h1, .ny h2, .ny h3 { margin: 0; font-weight: 400; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---- header: slim, nameplate centred, sticky ---- */
.ny-top { position: sticky; top: 0; z-index: 20; background: var(--ny-bg); border-bottom: 1px solid var(--ny-rule); }
.ny-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 64px; padding: 0 64px; }
.ny-date { font-family: var(--ny-sans); font-size: 12px; font-weight: 500; color: var(--ny-grey); }
.ny-name { font-family: 'UnifrakturCook', Georgia, serif; font-weight: 700; font-size: 34px; line-height: 1; letter-spacing: -.01em; }
.ny-right { display: flex; justify-content: flex-end; align-items: center; gap: 18px; }
.ny-right .toggle { font-family: var(--ny-sans); font-size: 12px; font-weight: 500; background: none; border: 0; color: var(--ny-ink); cursor: pointer; padding: 0; }
.ny-right .toggle .sun, .ny-right .toggle .moon { display: none; }
.ny-sub { font-family: var(--ny-sans); font-size: 12px; font-weight: 500; background: var(--ny-red); color: #fff !important; padding: 5px 10px; }
.ny-nav { display: flex; justify-content: center; gap: 32px; height: 44px; align-items: center; border-top: 1px solid var(--ny-rule); margin: 0 64px; }
.ny-nav a { font-family: var(--ny-sans); font-size: 13px; font-weight: 500; }
.ny-nav a:hover, .ny-nav a.on { color: var(--ny-red); }
.ny-top.slim .ny-nav { display: none; }

/* ---- the split hero: one story owns the screen ---- */
.ny-hero { display: grid; grid-template-columns: 1fr 1fr; height: calc(100vh - 109px); min-height: 560px; max-height: 820px; background: var(--ny-hero); }
.ny-hero-txt { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 0 9%; color: var(--ny-hero-ink); }
.ny-hero .rubric a { color: #ff6470; }
.ny-hero h1 { font-family: var(--ny-disp); font-size: 44px; line-height: 1.08; text-transform: uppercase; letter-spacing: .01em; margin: 14px 0 22px; text-wrap: balance; }
.ny-hero .dek { font-size: 21px; line-height: 1.45; color: #e6e6e6; max-width: 30em; margin: 0 0 18px; text-wrap: pretty; }
.ny-hero .by { color: #fff; font-size: 15px; }
.ny-hero-pic { display: block; overflow: hidden; position: relative; }
.ny-hero-pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.ny-hero-pic:hover img { transform: scale(1.02); }
/* JADE's still carries a banner burned into its foot: take the picture from the top and push the banner out of frame */
.ny-hero-pic.f-bar img { height: 124%; object-position: 30% 0; }

/* ---- shared small type ---- */
.rubric { font-family: var(--ny-sans); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; margin: 0; }
.rubric a { color: var(--ny-red); }
.by { font-family: var(--ny-sans); font-size: 15px; font-weight: 600; margin: 0; }
.by.date { font-weight: 400; color: var(--ny-grey); }

/* ---- rows of equal cards divided by hairlines ---- */
.ny-main { max-width: 1384px; margin: 0 auto; padding: 0 64px; }
.ny-row { padding: 64px 0 56px; border-bottom: 1px solid var(--ny-rule); }
.ny-head { font-family: var(--ny-disp); font-size: 32px; line-height: 1; text-transform: uppercase; letter-spacing: .02em; text-align: center; margin-bottom: 48px !important; }
.ny-grid { display: grid; }
.ny-grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ny-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ny-grid { column-gap: 33px; }
.card { position: relative; }
.card + .card::before { content: ""; position: absolute; left: -17px; top: 0; bottom: 0; border-left: 1px solid var(--ny-rule); }
.card .pic { display: block; aspect-ratio: 4 / 3; overflow: hidden; margin-bottom: 16px; background: var(--ny-tint); }
.card .pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.card:hover .pic img { transform: scale(1.03); }
.pic.f-whole img { object-fit: contain; padding: 6%; box-sizing: border-box; mix-blend-mode: multiply; }
.pic.f-left img { object-position: 0 50%; }
.pic.f-top img { object-position: 50% 0; }
/* JADE's still: banner in the bottom 15%, so cards take it from the top and push the banner out */
.pic.f-bar img { height: 122% !important; object-position: 25% 0 !important; }
.card .rubric { margin-bottom: 8px; }
.card h3 { font-size: 22px; line-height: 28px; margin-bottom: 10px; text-wrap: balance; }
.card h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.card .dek { font-size: 17px; line-height: 24px; color: var(--ny-soft); margin: 0 0 12px; text-wrap: pretty; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- the tinted band: one piece, its opening, a drop capital ---- */
.ny-band { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; background: var(--ny-tint); margin: 64px 0 0; padding: 64px 96px; }
.ny-band-l { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ny-band-l h2 { font-family: var(--ny-disp); font-size: 34px; line-height: 1.1; text-transform: uppercase; text-wrap: balance; }
.ny-band-l .pic { display: block; width: 100%; max-width: 420px; aspect-ratio: 4 / 3; overflow: hidden; margin: 10px 0 6px; }
.ny-band-l .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ny-excerpt p { font-size: 20px; line-height: 32px; margin: 0 0 18px; color: var(--ny-ink); }
.ny-excerpt p:first-child::first-letter { font-family: var(--ny-disp); float: left; font-size: 78px; line-height: 64px; padding: 6px 10px 0 0; }
.ny-excerpt { max-height: 420px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent); }
.ny-more { display: inline-block; margin-top: 8px; font-size: 20px; color: #1455a0 !important; }
[data-theme="dark"] .ny-more { color: #6fa8ff !important; }

/* ---- the letter ---- */
.ny-letter { text-align: center; padding: 72px 0; }
.ny-letter .ny-head { margin-bottom: 16px !important; }
.ny-letter > p { font-size: 18px; color: var(--ny-soft); margin: 0 0 24px; }
.ny-letter form { display: flex; justify-content: center; gap: 0; }
.ny-letter input { font: 15px var(--ny-sans); width: 320px; padding: 12px 14px; border: 1px solid var(--ny-ink); border-right: 0; background: var(--ny-bg); color: var(--ny-ink); }
.ny-letter button { font: 500 14px var(--ny-sans); padding: 0 22px; background: var(--ny-ink); color: var(--ny-bg); border: 1px solid var(--ny-ink); cursor: pointer; }

/* ---- footer ---- */
.ny-foot { background: #000; color: #fff; text-align: center; padding: 56px 24px 64px; }
.ny-foot .ny-name { font-size: 40px; color: #fff; }
.ny-foot nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 28px; margin: 24px 0; }
.ny-foot nav a { font-family: var(--ny-sans); font-size: 13px; font-weight: 500; color: #fff; }
.ny-foot p { font-family: var(--ny-sans); font-size: 12px; color: #999; margin: 0; }


/* ================= section pages ================= */
.ny-shead { text-align: center; padding: 72px 24px 56px; border-bottom: 1px solid var(--ny-rule); margin: 0 64px; }
.ny-shead h1 { font-family: var(--ny-disp); font-size: 88px; line-height: 1; text-transform: uppercase; letter-spacing: .01em; }
.ny-shead p { font-size: 20px; line-height: 30px; color: var(--ny-soft); max-width: 36em; margin: 20px auto 0; text-wrap: pretty; }
.ny-slead { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 56px 0; border-bottom: 1px solid var(--ny-rule); }
.ny-slead-pic { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ny-tint); }
.ny-slead-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ny-slead-t { text-align: center; padding: 0 32px; }
.ny-slead-t h2 { font-family: var(--ny-disp); font-size: 40px; line-height: 1.1; text-transform: uppercase; margin: 12px 0 18px !important; text-wrap: balance; }
.ny-slead-t .dek { font-size: 19px; line-height: 28px; color: var(--ny-soft); margin: 0 0 18px; text-wrap: pretty; }
.ny-list { max-width: 900px; margin: 0 auto; padding: 64px 0 24px; border-bottom: 1px solid var(--ny-rule); }
.lrow { display: grid; grid-template-columns: 1fr 260px; gap: 32px; padding: 0 0 32px; margin-bottom: 32px; border-bottom: 1px solid var(--ny-rule); }
.lrow:last-child { border-bottom: 0; }
.lrow h3 { font-size: 26px; line-height: 32px; margin: 8px 0 10px !important; }
.lrow .dek { font-size: 17px; line-height: 24px; color: var(--ny-soft); margin: 0 0 12px; }
.lrow .pic { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ny-tint); }
.lrow .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ny-grid.g1 { grid-template-columns: minmax(0, 420px); justify-content: center; }
.ny-grid.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 900px; margin: 0 auto; }
.ny-grid.g1 .card, .ny-grid.g1 { text-align: left; }

/* ================= article pages ================= */
body.ny .ny-ahero { display: grid; grid-template-columns: 1fr 1fr; min-height: 640px; }
body.ny .ny-ahero.dark { background: #000; color: #fff; }
body.ny .ny-ahero.light { background: var(--ny-bg); border-bottom: 1px solid var(--ny-rule); }
body.ny .ny-ahero-t { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 64px 9%; }
body.ny .ny-ahero.dark .rubric a { color: #ff6470; }
body.ny .ny-ahero h1 { font-family: var(--ny-disp); font-size: 46px; line-height: 1.08; text-transform: uppercase; letter-spacing: .01em; margin: 14px 0 22px !important; text-wrap: balance; }
body.ny .ny-ahero .dek { font-style: italic; font-size: 21px; line-height: 1.45; max-width: 28em; margin: 0 0 22px; text-wrap: pretty; }
body.ny .ny-ahero.dark .dek { color: #e6e6e6; }
body.ny .ny-ahero.light .dek { color: var(--ny-soft); }
body.ny .ny-ahero .by { font-size: 15px; }
body.ny .ny-ahero .date { font-family: var(--ny-sans); font-size: 13px; margin: 6px 0 0; opacity: .8; }
body.ny .ny-ahero-pic { margin: 0; padding: 40px 40px 40px 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
body.ny .ny-ahero-pic img { max-width: 100%; max-height: 720px; object-fit: contain; display: block; }
body.ny .ny-ahero.light .ny-ahero-pic img { mix-blend-mode: multiply; }
/* JADE: the banner sits in the bottom 15% of the still; clip it off */
body.ny .ny-ahero-pic.f-bar img { clip-path: inset(0 0 15.5% 0); margin-bottom: -8.5%; }
/* f-bleed: the photograph fills its half of the black box edge to edge (Nicole Schaaf piece, 30 Sep 2026) */
body.ny .ny-ahero-pic.f-bleed { padding: 0; align-items: stretch; }
body.ny .ny-ahero-pic.f-bleed img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; object-position: 50% 55%; }
@media (max-width: 900px) { body.ny .ny-ahero-pic.f-bleed img { height: auto; aspect-ratio: 3 / 2; } }
body.ny .ny-cap { font-family: var(--ny-sans); font-size: 13px; color: var(--ny-grey); max-width: 1384px; margin: 12px auto 0; padding: 0 64px; text-align: right; }
body.ny .ny-body { max-width: 650px; margin: 56px auto 24px; padding: 0 24px; font-family: var(--ny-caslon); color: var(--ny-ink); }
body.ny .ny-body p { font-size: 20px; line-height: 1.62; margin: 0 0 1.15em; }
body.ny .ny-body a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--ny-rule); }
body.ny .ny-body a:hover { text-decoration-color: currentColor; }
body.ny .ny-body p.drop::first-letter, body.ny .ny-body > p:first-child::first-letter { font-family: var(--ny-disp); float: left; font-size: 88px; line-height: 70px; padding: 8px 10px 0 0; }
body.ny .ny-body h2, body.ny .ny-body h3 { font-family: var(--ny-disp); font-size: 26px; line-height: 1.2; text-align: center; margin: 1.8em 0 .9em !important; }
body.ny .ny-body p.pq { font-family: var(--ny-disp); font-size: 32px; line-height: 1.25; text-align: center; margin: 1.4em -40px; padding: 28px 0; border-top: 1px solid var(--ny-ink); border-bottom: 1px solid var(--ny-ink); }
body.ny .ny-body figure { margin: 2em 0; }
body.ny .ny-body figure img { width: 100%; height: auto; display: block; }
body.ny .ny-body figure.portrait { max-width: 420px; margin-left: auto; margin-right: auto; }
body.ny .ny-body figcaption { font-family: var(--ny-sans); font-size: 13px; line-height: 1.4; color: var(--ny-grey); margin-top: 8px; }
body.ny .ny-body sup.fnref a { text-decoration: none; color: var(--ny-red); font-family: var(--ny-sans); font-size: 12px; }
body.ny .ny-body p.fnote { font-family: var(--ny-sans); font-size: 14px; line-height: 1.5; color: var(--ny-soft); }
body.ny .ny-body p.bio { font-style: italic; font-size: 17px; line-height: 1.5; color: var(--ny-soft); border-top: 1px solid var(--ny-rule); padding-top: 20px; margin-top: 2.4em; }
body.ny .ny-body p.bio::first-letter { all: unset; }
body.ny .ny-body > p:last-child:not(.bio)::after { content: "\2666"; margin-left: 6px; font-size: 14px; }
/* A song to read with: an "Editor's pick" card at the head of a piece (Nicole Schaaf piece, 30 Sep 2026).
   A record turns half out of its sleeve, the two tracks sit beside it, and a hand-drawn listener
   sits on the right. Set in the paper's own Caslon so it reads as part of the page. */
body.ny .ny-body .tune { position: relative; display: grid; grid-template-columns: 136px 1fr 96px; gap: 16px; align-items: center; background: radial-gradient(120% 140% at 0% 0%, #2a2118 0%, #121010 55%, #0b0b0b 100%); color: #f3ede4; border-radius: 18px; padding: 22px 20px 22px 22px; margin: 0 0 2.6em; overflow: hidden; box-shadow: 0 18px 40px -22px rgba(0,0,0,.55); font-family: var(--ny-caslon); }
body.ny .ny-body .tune .deck { position: relative; width: 136px; height: 96px; }
body.ny .ny-body .tune .sleeve { position: absolute; left: 0; top: 0; width: 96px; height: 96px; border-radius: 3px; object-fit: cover; z-index: 2; box-shadow: 6px 0 16px rgba(0,0,0,.6); margin: 0; }
body.ny .ny-body .tune .vinyl { position: absolute; left: 44px; top: 4px; width: 88px; height: 88px; border-radius: 50%; z-index: 1; background: repeating-radial-gradient(circle, #111 0 1.2px, #1c1c1c 1.6px 2.6px), #111; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 4px 14px rgba(0,0,0,.5); animation: tunespin 3.6s linear infinite; }
body.ny .ny-body .tune .vinyl::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 30deg, transparent 0 20%, rgba(255,255,255,.10) 26%, transparent 32% 70%, rgba(255,255,255,.07) 76%, transparent 82%); }
body.ny .ny-body .tune .vinyl img { position: absolute; left: 50%; top: 50%; width: 32px; height: 32px; margin: -16px 0 0 -16px; border-radius: 50%; object-fit: cover; }
body.ny .ny-body .tune .vinyl i { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: #0b0b0b; z-index: 1; }
body.ny .ny-body .tune .k { margin: 0 0 2px; font-style: italic; font-size: 19px; line-height: 1.2; color: #ff8a8f; }
body.ny .ny-body .tune .sub { margin: 0 0 8px; font-style: italic; font-size: 14px; line-height: 1.4; color: #b8ad9d; }
body.ny .ny-body .tune ol { list-style: none; margin: 0; padding: 0; }
body.ny .ny-body .tune li { margin: 0; border-top: 1px solid rgba(255,255,255,.09); }
body.ny .ny-body .tune li:last-child { border-bottom: 1px solid rgba(255,255,255,.09); }
body.ny .ny-body .tune li a { display: grid; grid-template-columns: 22px 1fr auto; align-items: baseline; gap: 6px; padding: 7px 0; text-decoration: none; color: #f3ede4; }
body.ny .ny-body .tune li a:hover .t { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
body.ny .ny-body .tune .n { font-size: 13px; color: #8d8375; }
body.ny .ny-body .tune .t { font-family: var(--ny-disp); font-size: 19px; line-height: 1.15; }
body.ny .ny-body .tune .a { font-style: italic; font-size: 13px; color: #a99f90; }
body.ny .ny-body .tune .more { margin: 10px 0 0; font-size: 13.5px; line-height: 1.45; color: #b8ad9d; }
body.ny .ny-body .tune .more a { color: #f3ede4; text-decoration: none; border-bottom: 1px solid rgba(255,138,143,.7); }
body.ny .ny-body .tune .more a:hover { color: #ff8a8f; }
body.ny .ny-body .tune .guy { width: 96px; height: auto; margin: 0; align-self: end; opacity: .92; }
@keyframes tunespin { to { transform: rotate(360deg); } }
@media (max-width: 600px) { body.ny .ny-body .tune { grid-template-columns: 1fr 84px; padding: 20px; } body.ny .ny-body .tune .deck { grid-column: 1 / -1; } body.ny .ny-body .tune .guy { width: 84px; } body.ny .ny-body .tune li a { grid-template-columns: 22px 1fr; row-gap: 0; } body.ny .ny-body .tune .a { grid-column: 2; } }
@media (prefers-reduced-motion: reduce) { body.ny .ny-body .tune .vinyl { animation: none; } }
/* The floating copy of the card (tune.js). Two forms, and neither ever sits on the words:
   .wide  a pill in the empty right margin; .dock  a small record in the header's nav row that opens on tap */
.tune-float { position: fixed; z-index: 30; font-family: var(--ny-caslon); color: #f3ede4; opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .28s ease, transform .28s cubic-bezier(.2,.8,.2,1); }
.tune-float.on { opacity: 1; transform: none; pointer-events: auto; }
.tune-float .tf-disc { display: block; border: 0; padding: 0; background: none; cursor: default; flex: 0 0 auto; }
.tune-float .tf-vinyl { position: relative; display: block; width: 44px; height: 44px; border-radius: 50%; background: repeating-radial-gradient(circle, #111 0 1px, #1e1e1e 1.4px 2.3px), #111; box-shadow: 0 0 0 1px rgba(255,255,255,.08); animation: tunespin 3.6s linear infinite; }
.tune-float .tf-vinyl img { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; object-fit: cover; }
.tune-float .tf-vinyl i { position: absolute; left: 50%; top: 50%; width: 3px; height: 3px; margin: -1.5px 0 0 -1.5px; border-radius: 50%; background: #0b0b0b; }
.tune-float .tf-k { display: block; font-style: italic; font-size: 14px; color: #ff8a8f; margin-bottom: 4px; }
.tune-float .tf-t { display: block; }
.tune-float .tf-t a { display: flex; gap: 8px; align-items: baseline; font-family: var(--ny-disp); font-size: 16px; line-height: 1.35; color: #f3ede4; text-decoration: none; padding: 2px 0; }
.tune-float .tf-t a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tune-float .tf-n { font-family: var(--ny-caslon); font-size: 11px; color: #8d8375; }
.tune-float .tf-dj { display: inline-block; margin-top: 6px; font-size: 12.5px; color: #b8ad9d; text-decoration: none; border-bottom: 1px solid rgba(255,138,143,.6); }
.tune-float .tf-dj:hover { color: #ff8a8f; }
/* wide: the pill lives in the margin */
.tune-float.wide { display: flex; align-items: center; gap: 14px; width: 300px; padding: 12px 16px 12px 12px; border-radius: 18px; background: rgba(14,12,11,.95); box-shadow: 0 14px 34px -14px rgba(0,0,0,.5); }
.tune-float.wide .tf-panel { min-width: 0; }
/* dock: a record in the nav row; the panel drops under the header on tap */
.tune-float.dock .tf-disc { cursor: pointer; border-radius: 50%; box-shadow: 0 0 0 3px #000; }
.tune-float.dock .tf-vinyl { width: 36px; height: 36px; }
.tune-float.dock .tf-vinyl img { width: 14px; height: 14px; margin: -7px 0 0 -7px; }
.tune-float.dock .tf-panel { position: absolute; right: 0; top: var(--panel-top, 52px); width: 250px; padding: 14px 16px; border-radius: 14px; background: rgba(14,12,11,.97); box-shadow: 0 18px 40px -14px rgba(0,0,0,.6); opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.tune-float.dock.open .tf-panel { opacity: 1; transform: none; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .tune-float .tf-vinyl { animation: none; } .tune-float, .tune-float .tf-panel { transition: opacity .2s; transform: none; } }

/* The email invitation (letter.js): a card in the bottom corner, never over the middle of the page */
.letter-float { position: fixed; right: 24px; bottom: 24px; z-index: 40; width: 330px; padding: 20px 22px 18px; border-radius: 18px; background: #faf7f1; color: #1a1714; border: 1px solid #e8dfcf; box-shadow: 0 22px 48px -18px rgba(0,0,0,.35); font-family: var(--ny-caslon); opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .35s ease, transform .35s cubic-bezier(.2,.8,.2,1); }
.letter-float.on { opacity: 1; transform: none; pointer-events: auto; }
.letter-float .lf-x { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 20px; line-height: 1; color: #8d8375; cursor: pointer; padding: 4px; }
.letter-float .lf-k { margin: 0 0 4px; font-style: italic; font-size: 14px; color: #c8102e; }
.letter-float .lf-h { margin: 0 0 14px; font-family: var(--ny-disp); font-size: 21px; line-height: 1.2; padding-right: 14px; }
.letter-float .lf-f { display: flex; gap: 8px; }
.letter-float input { flex: 1; min-width: 0; font: 15px var(--ny-caslon); padding: 10px 12px; border: 1px solid #d9cfbd; border-radius: 10px; background: #fff; color: #111; }
.letter-float input:focus { outline: 2px solid #1a1714; outline-offset: 1px; }
.letter-float .lf-f button { font: 600 14px var(--ny-sans); padding: 10px 14px; border: 0; border-radius: 10px; background: #111; color: #fff; cursor: pointer; }
.letter-float .lf-f button:disabled { opacity: .5; }
.letter-float .lf-m { margin: 8px 0 0; font-size: 13px; color: #6b6259; min-height: 0; }
.letter-float .lf-m:empty { display: none; }
.letter-float.done .lf-f { display: none; }
[data-theme="dark"] .letter-float { background: #17181b; color: #ededed; border-color: #2c2f33; }
[data-theme="dark"] .letter-float input { background: #0d0e10; color: #ededed; border-color: #2c2f33; }
[data-theme="dark"] .letter-float .lf-f button { background: #ededed; color: #111; }
[data-theme="dark"] .letter-float .lf-k { color: #ff6470; }
@media (max-width: 600px) {
  .letter-float { left: 10px; right: 10px; bottom: 10px; width: auto; padding: 16px 16px 14px; border-radius: 16px; }
  .letter-float .lf-h { font-size: 18px; margin-bottom: 10px; }
  .letter-float input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .letter-float { transition: opacity .2s; transform: none; } }
/* Hand drawings in the hero: one above the kicker, one beside the byline */
body.ny .ny-ahero .ny-doodle.k { display: block; width: 230px; max-width: 60%; height: auto; margin: 0 auto 18px; }
body.ny .ny-ahero .ny-byrow { display: flex; align-items: center; justify-content: center; gap: 14px; }
body.ny .ny-ahero .ny-doodle.b { width: 70px; height: auto; }
body.ny .ny-hero-txt .ny-doodle.k { display: block; width: 230px; max-width: 60%; height: auto; margin: 0 auto 18px; }
body.ny .ny-hero-txt .ny-byrow { display: flex; align-items: center; justify-content: center; gap: 14px; }
body.ny .ny-hero-txt .ny-doodle.b { width: 70px; height: auto; }
/* on a dark-hero article the header goes black with it, as on newyorker.com */
.hero-dark .ny-top { background: #000; border-bottom-color: #222; }
.hero-dark .ny-top, .hero-dark .ny-top a, .hero-dark .ny-right .toggle { color: #fff; }
.hero-dark .ny-nav { border-top-color: #222; }
.hero-dark .ny-date { color: #aaa; }

@media (max-width: 900px) {
  .ny-shead { margin: 0 16px; padding: 44px 0 36px; }
  .ny-shead h1 { font-size: 52px; }
  .ny-shead p { font-size: 17px; line-height: 26px; }
  .ny-slead { grid-template-columns: 1fr; gap: 24px; padding: 36px 0; }
  .ny-slead-t { padding: 0; }
  .ny-slead-t h2 { font-size: 30px; }
  .ny-list { padding: 44px 0 12px; }
  .lrow { grid-template-columns: 1fr 110px; gap: 16px; }
  .lrow h3 { font-size: 21px; line-height: 26px; }
  .lrow .dek { display: none; }
  .ny-grid.g2 { grid-template-columns: 1fr; }
  body.ny .ny-ahero { grid-template-columns: 1fr; min-height: 0; }
  body.ny .ny-ahero-pic { order: -1; padding: 0; }
  body.ny .ny-ahero.light .ny-ahero-pic { padding: 24px 16px 0; }
  body.ny .ny-ahero-t { padding: 32px 20px 40px; }
  body.ny .ny-ahero h1 { font-size: 30px; }
  body.ny .ny-ahero .dek { font-size: 18px; }
  body.ny .ny-cap { padding: 0 16px; text-align: left; }
  body.ny .ny-body { margin-top: 32px; padding: 0 20px; }
  body.ny .ny-body p { font-size: 18px; }
  body.ny .ny-body p.pq { font-size: 24px; margin: 1.2em 0; }
}

/* ---- phone ---- */
@media (max-width: 900px) {
  .ny-bar { grid-template-columns: auto 1fr; padding: 0 16px; height: 56px; }
  .ny-date { display: none; }
  .ny-name { font-size: 26px; }
  .ny-nav { margin: 0; padding: 0 16px; justify-content: flex-start; gap: 22px; overflow-x: auto; scrollbar-width: none; }
  .ny-nav::-webkit-scrollbar { display: none; }
  .ny-nav { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 40px; }
  .ny-nav a { white-space: nowrap; }
  .ny-hero { grid-template-columns: 1fr; height: auto; max-height: none; min-height: 0; }
  .ny-hero-pic { order: -1; aspect-ratio: 4 / 3; }
  .ny-hero-pic.f-bar img { object-position: 8% 0; }
  .card .pic { aspect-ratio: 3 / 2; }
  .ny-hero-txt { padding: 36px 20px 44px; }
  .ny-hero h1 { font-size: 30px; }
  .ny-hero .dek { font-size: 18px; }
  .ny-main { padding: 0 16px; }
  .ny-row { padding: 44px 0 36px; }
  .ny-head { font-size: 26px; margin-bottom: 28px !important; }
  .ny-grid.g4, .ny-grid.g3 { grid-template-columns: 1fr; }
  .card { padding: 0 0 28px; margin-bottom: 28px; border-bottom: 1px solid var(--ny-rule); }
  .card + .card::before { display: none; }
  .card:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
  .ny-band { grid-template-columns: 1fr; gap: 28px; padding: 44px 20px; margin: 44px -16px 0; }
  .ny-band-l h2 { font-size: 28px; }
  .ny-excerpt p { font-size: 18px; line-height: 28px; }
  .ny-letter input { width: auto; flex: 1; min-width: 0; }
}
@media (min-width: 901px) and (max-width: 1200px) { .ny-grid.g4 { grid-template-columns: repeat(2, 1fr); row-gap: 40px; } .card:nth-child(3)::before { display: none; } }

/* ---- live-site extras ---- */
body.ny .ny-art.article { max-width: none; margin: 0; padding: 0; border: 0; }
body.ny .ny-ahero.nopic { grid-template-columns: 1fr; min-height: 420px; }
body.ny .ny-ahero.nopic .ny-ahero-t { max-width: 900px; margin: 0 auto; }
.ny-hero.nopic { grid-template-columns: 1fr; }
.ny-slead.nopic { grid-template-columns: 1fr; }
.ny-tts { max-width: 650px; margin: 32px auto 0; padding: 0 24px; }
.ny-empty { text-align: center; font-size: 19px; color: var(--ny-grey); padding: 64px 0; }
body.ny .ny-body .img-wrap img { width: 100%; height: auto; }
body.ny .ny-body p.pq { border-left: 0; border-right: 0; padding: 28px 0; font-style: normal; color: var(--ny-ink); background: none; }

/* ================= Anas's hand (27 Sep 2026) =================
   The date, The Latest and The Letter are traced from his own writing; every other title stays in type.
   The section drawings are his ink, painted through a mask so they take the page's ink colour. */
.ny-date.is-hand { display: flex; align-items: center; font-size: 12px; color: var(--ny-ink); }
.ny-date .hand-date { display: block; width: auto; }
.ny-head.is-hand { line-height: 0; }
.ny-head .hand-title { display: inline-block; height: 58px; width: auto; }
.ny-letter .ny-head .hand-title { height: 64px; }
.ny-draw { --h: 150px; height: var(--h); width: calc(var(--h) * var(--ar)); max-width: 100%; margin: 0 auto 30px;
  background: var(--ny-ink); -webkit-mask: var(--draw) center / contain no-repeat; mask: var(--draw) center / contain no-repeat; }
.ny-draw-unfiltered { --h: 215px; }
.ny-draw-society { --h: 205px; }
.ny-draw-business { --h: 170px; }
@media (max-width: 900px) {
  .ny-draw { --h: 100px; margin-bottom: 22px; }
  .ny-date.is-hand { display: none; }
  .ny-ad { padding-left: 16px; padding-right: 16px; }
  .ny-draw-unfiltered, .ny-draw-society { --h: 140px; }
  .ny-head .hand-title { height: 44px; }
  .ny-letter .ny-head .hand-title { height: 48px; }
}
.hero-dark .ny-date.is-hand { color: #fff; }

/* ---- advertising, placed as newyorker.com places it (27 Sep 2026) ---- */
.ny-ad { background: var(--ny-bg); padding: 0 64px; }
.ny-ad .ad { margin: 0 auto; }
.ny-ad .ad-label { font-family: var(--ny-sans); font-size: 10px; font-weight: 500; letter-spacing: .16em; color: var(--ny-grey); margin-bottom: 12px; }
.ny-ad-crown { padding-top: 16px; padding-bottom: 16px; }
.ny-ad-crown .ad-label { display: none; }
.page-section .ny-ad-crown { padding-top: 24px; }
.ny-ad-mid { padding-top: 32px; padding-bottom: 40px; border-bottom: 1px solid var(--ny-rule); }
.ny-art + .ny-ad-mid { border-top: 1px solid var(--ny-rule); margin-top: 48px; }

/* ================= Anas's figures (27 Sep 2026) ================= */
.ink-art { position: relative; display: block; height: var(--h, 100px); width: calc(var(--h, 100px) * var(--ar)); }
.ink-art i { position: absolute; inset: 0; background: var(--art-ink, var(--ny-ink)); -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.ink-art i.red { background: var(--ny-red); }

/* he pushes through a drape above The Latest: the full drawing, on the page, rising into place */
.ny-peek { display: flex; justify-content: center; margin: -8px 0 6px; overflow: hidden; }
.ny-peek .ink-art { --h: 120px; transform: translateY(40%); opacity: 0; transition: transform .9s cubic-bezier(.2, 1.3, .4, 1) .1s, opacity .4s ease .1s; }
.ny-peek.cue-on .ink-art { transform: none; opacity: 1; }

/* he waves from his stool beside The Letter */
.ny-wave { display: flex; justify-content: center; margin-bottom: 18px; }
.ny-wave .ink-art { --h: 130px; transform-origin: 50% 100%; }
.ny-wave.cue-on .ink-art { animation: trp-wave 1.6s ease-in-out .2s 1; }
@keyframes trp-wave { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-5deg); } 45% { transform: rotate(4deg); } 70% { transform: rotate(-3deg); } }

/* he dives into the rest of the paper */
.ny-dive { display: flex; justify-content: center; margin: -24px 0 14px; }
.ny-dive .ink-art { --h: 86px; opacity: 0; transform: translate(-90px, -60px) rotate(-28deg); transition: transform 1s cubic-bezier(.2, .9, .3, 1.15), opacity .5s ease; }
.ny-dive.cue-on .ink-art { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .ny-peek .ink-art { --h: 88px; }
  .ny-wave .ink-art { --h: 100px; }
  .ny-dive .ink-art { --h: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .ny-peek .ink-art, .ny-dive .ink-art { transition: none; transform: none; opacity: 1; }
  .ny-wave.cue-on .ink-art { animation: none; }
}


/* ---- Careers, in the paper's own look, under Anas's hand-drawn nameplate ---- */
.ny-plate { display: flex; justify-content: center; margin: 0 auto 30px; }
.ny-plate .ink-art { --h: 150px; }
.ny-role-head .ny-plate .ink-art { --h: 96px; }
.ny-role-head .rubric { margin-bottom: 14px; }
.ny-role-head h1 { font-size: 64px; }
.ny-role-head .by { margin-top: 18px; }
.ny-careers { border-bottom: 0; }
.lrow.nopic { grid-template-columns: 1fr; text-align: center; }
.ny-careers .ny-more { font-size: 18px; }
.ny-apply { max-width: 650px; margin: 0 auto 72px; padding: 0 24px; }
.ny-apply .applyform { border-top: 1px solid var(--ny-ink); padding-top: 32px; margin-bottom: 28px; }
.ny-apply .blocktitle { font-family: var(--ny-disp); font-weight: 400; font-size: 32px; text-transform: uppercase; text-align: center; margin: 0 0 8px; }
.ny-apply .fine { text-align: center; font-family: var(--ny-sans); color: var(--ny-grey); }
.ny-apply label { display: block; font-family: var(--ny-sans); font-size: 14px; font-weight: 500; margin: 0 0 18px; }
.ny-apply input, .ny-apply textarea { display: block; width: 100%; box-sizing: border-box; margin-top: 6px; font: 16px var(--ny-caslon); padding: 12px 14px; border: 1px solid var(--ny-ink); border-radius: 0; background: var(--ny-bg); color: var(--ny-ink); }
.ny-apply button { font: 500 14px var(--ny-sans); padding: 13px 28px; background: var(--ny-ink); color: var(--ny-bg); border: 0; border-radius: 0; cursor: pointer; }
@media (max-width: 900px) {
  .ny-plate .ink-art { --h: 96px; }
  .ny-role-head .ny-plate .ink-art { --h: 72px; }
  .ny-role-head h1 { font-size: 40px; }
}

/* his star from The Latest, tucked on the nameplate's shoulder; it pops in once when the page opens */
.ny-bar .ny-name { position: relative; }
.ny-star { position: absolute; right: -17px; top: -9px; width: 15px; height: 15px; background: currentColor;
  -webkit-mask: url(/assets/draw/star.svg?v=1) center / contain no-repeat; mask: url(/assets/draw/star.svg?v=1) center / contain no-repeat;
  transform: scale(0) rotate(-60deg); animation: trp-star .7s cubic-bezier(.3, 1.6, .5, 1) .5s forwards; }
@keyframes trp-star { to { transform: scale(1) rotate(0); } }
@media (max-width: 900px) { .ny-star { right: -13px; top: -7px; width: 11px; height: 11px; } }
@media (prefers-reduced-motion: reduce) { .ny-star { animation: none; transform: none; } }

/* f-cover: the photograph fills the whole black band behind the title, darkened with shadow (Miora piece, 6 Oct 2026) */
body.ny .ny-ahero.cover { position: relative; grid-template-columns: 1fr; min-height: min(80vh, 760px); overflow: hidden; }
body.ny .ny-ahero.cover .ny-ahero-pic { position: absolute; inset: 0; padding: 0; z-index: 0; }
body.ny .ny-ahero.cover .ny-ahero-pic img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; object-position: 50% 35%; filter: brightness(.95) saturate(.95); }
body.ny .ny-ahero.cover .ny-ahero-pic::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 75% 85% at 50% 45%, rgba(0,0,0,.18) 0%, rgba(0,0,0,.62) 100%), linear-gradient(to bottom, rgba(0,0,0,.1) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,.85) 100%); }
body.ny .ny-ahero.cover .ny-ahero-t { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; padding: 96px 6% 72px; text-shadow: 0 2px 22px rgba(0,0,0,.65); }
body.ny .ny-ahero.cover h1 { font-size: 56px; }
@media (max-width: 900px) { body.ny .ny-ahero.cover { min-height: 560px; } body.ny .ny-ahero.cover .ny-ahero-t { padding: 72px 20px 48px; } body.ny .ny-ahero.cover h1 { font-size: 32px; } }

/* .fact: a dotted underline on a fact in the text; hover or tap shows the detail and the source (Miora piece, 6 Oct 2026) */
body.ny .ny-body .fact { position: relative; border-bottom: 1px dotted currentColor; cursor: help; outline: none; }
body.ny .ny-body .fact::after { content: attr(data-note); position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translate(-50%, 4px); width: max-content; max-width: min(320px, 80vw); padding: 11px 13px; background: #111; color: #f2f2f2; border-radius: 8px; box-shadow: 0 10px 28px rgba(0,0,0,.28); font: 400 13.5px/1.45 var(--ny-sans, system-ui, sans-serif); text-align: left; white-space: normal; opacity: 0; pointer-events: none; transition: opacity .16s ease, transform .16s ease; z-index: 30; }
body.ny .ny-body .fact:hover::after, body.ny .ny-body .fact:focus::after { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 900px) { body.ny .ny-body .fact::after { left: 0; transform: translate(0, 4px); } body.ny .ny-body .fact:hover::after, body.ny .ny-body .fact:focus::after { transform: translate(0, 0); } }
@media (prefers-reduced-motion: reduce) { body.ny .ny-body .fact::after { transition: none; } }

/* The reader wall (wall.js, 6 Oct 2026): after a quarter of a piece, the text fades and asks for an email */
body.ny .ny-body.walled { overflow: hidden; position: relative; }
body.ny .ny-body.walled::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 220px; background: linear-gradient(to bottom, rgba(255,255,255,0), var(--ny-bg, #fff) 85%); pointer-events: none; }
body.ny .trp-wall { max-width: 560px; margin: 8px auto 72px; padding: 36px 32px 32px; border-top: 3px solid #000; text-align: center; background: var(--ny-bg, #fff); }
body.ny .trp-wall-k { font-family: var(--ny-sans, system-ui, sans-serif); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #c8102e; margin: 0 0 10px; }
body.ny .trp-wall h3 { font-family: var(--ny-disp, Georgia, serif); font-size: 32px; font-weight: 400; margin: 0 0 10px; }
body.ny .trp-wall-d { font-size: 17px; line-height: 1.5; color: var(--ny-soft, #444); margin: 0 0 22px; }
body.ny .trp-wall form { display: flex; gap: 10px; }
body.ny .trp-wall input { flex: 1; min-width: 0; font: 16px var(--ny-sans, system-ui, sans-serif); padding: 13px 14px; border: 1px solid #bbb; border-radius: 6px; }
body.ny .trp-wall button { font: 600 15px var(--ny-sans, system-ui, sans-serif); padding: 13px 20px; background: #000; color: #fff; border: 0; border-radius: 6px; cursor: pointer; white-space: nowrap; }
body.ny .trp-wall button:disabled { opacity: .5; }
body.ny .trp-wall-err { color: #c8102e; font-size: 14px; margin: 12px 0 0; }
@media (max-width: 600px) { body.ny .trp-wall { padding: 28px 16px; } body.ny .trp-wall form { flex-direction: column; } }

/* Fact boxes on phones: a tap opens the note as a card pinned to the bottom of the screen, always fully on screen */
body.ny .ny-body .fact.open::after { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 900px), (hover: none) {
  body.ny .ny-body .fact { cursor: pointer; -webkit-tap-highlight-color: transparent; }
  body.ny .ny-body .fact:hover::after, body.ny .ny-body .fact:focus::after { opacity: 0; }
  body.ny .ny-body .fact.open { background: rgba(200,16,46,.08); }
  body.ny .ny-body .fact::after { position: fixed; left: 16px; right: 16px; bottom: 16px; top: auto; width: auto; max-width: none; transform: translateY(8px); font-size: 15px; padding: 14px 16px; z-index: 1000; }
  body.ny .ny-body .fact.open::after { opacity: 1; transform: translateY(0); }
}
