/* panel-newspaper.css — the release newspaper (panel-newspaper.js).

   Newsprint in both themes: it is a printed thing put down on the panel, not a
   surface of it, so it keeps its own paper and ink instead of the theme tokens.
   The four faces are the panel's own, each in the job a paper gives it:
     Instrument Serif   masthead and headlines (the display face)
     Newsreader         dek, body and captions (made for reading news)
     Alegreya Sans      kickers and "In brief"
     IBM Plex Mono      ears, dateline, edition numbers

   .pxnews-sheet is ALSO rasterised for the crumple: its rules are copied into
   an SVG foreignObject where nothing of the panel's sheet applies — no reset,
   no body font, no theme. So every rule under .pxnews-sheet states what it
   needs itself, and none may depend on an ancestor outside it. */

/* ---- the open paper --------------------------------------------------- */
.pxnews {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.pxnews-scrim {
  position: absolute; inset: 0;
  background: rgba(var(--ink-rgb), .62);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  animation: pxnews-fade .32s ease backwards;
  transition: opacity .45s ease;
}
.pxnews.is-leaving .pxnews-scrim { opacity: 0; }
.pxnews.is-leaving .pxnews-close { opacity: 0; pointer-events: none; }

/* The tilt and the fit ride on the individual transform properties, so the
   drop-in can animate `translate` without restating either. The pages share
   one grid cell, so they are all the tallest one's height and the stage is
   exactly one page. */
.pxnews-stage {
  position: relative; flex: none;
  display: grid;
  rotate: var(--pxnews-tilt, 0deg);
  scale: var(--pxnews-fit, 1);
  cursor: grab; touch-action: none;
  user-select: none; -webkit-user-select: none;
  /* backwards, not both: a fill that outlived the animation would pin
     opacity at 1 over the inline 0 that hides the page while the GL sheet
     stands in for it. */
  animation: pxnews-drop .5s cubic-bezier(.2, .9, .25, 1.08) backwards;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .28)) drop-shadow(0 2px 4px rgba(0, 0, 0, .18));
}
.pxnews-stage:active { cursor: grabbing; }
/* The front page lies on the rest of the edition: two folded papers under it,
   askew, a masthead's rules showing along their tops. On the stage, not the
   sheet, so the snapshot the crumple takes is the top page alone; they leave
   with the stage when the GL sheet takes over. */
.pxnews-stage::before, .pxnews-stage::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to bottom, transparent 0 22px, rgba(26, 25, 24, .55) 22px 23px, transparent 23px 26px, rgba(26, 25, 24, .4) 26px 27px, transparent 27px),
    linear-gradient(to bottom, transparent 0 48%, rgba(60, 48, 30, .12) 50%, rgba(255, 255, 255, .35) 50.6%, transparent 53%),
    var(--pxn-pile-bg);
  box-shadow: 1px 1px 0 #d2c8b3, 2px 2px 0 #e2dbcb, 3px 3px 0 #c6bba3, 4px 4px 0 #ddd5c3;
}
.pxnews-stage::before { --pxn-pile-bg: #e0d8c6; translate: -14px -12px; rotate: -3.2deg; }
.pxnews-stage::after  { --pxn-pile-bg: #e9e2d3; translate: 12px -6px; rotate: 2.4deg; }
@keyframes pxnews-drop {
  from { translate: 0 -36px; opacity: 0; }
  to   { translate: 0 0; opacity: 1; }
}
/* Floating up from what was clicked (pxNewsRise sets where, and how small):
   it leaves that spot at that size, its shadow growing as it lifts off. */
.pxnews-stage.pxnews-rise {
  animation: pxnews-rise .7s cubic-bezier(.3, .75, .22, 1) backwards;
}
@keyframes pxnews-rise {
  from {
    translate: var(--pxnews-from-x, 0px) var(--pxnews-from-y, 0px);
    scale: calc(var(--pxnews-fit, 1) * var(--pxnews-from-s, .5));
    rotate: -4deg; opacity: .25;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .2)) drop-shadow(0 1px 1px rgba(0, 0, 0, .12));
  }
  25% { opacity: 1; }
}

/* The pages, stacked. The one under the top page shows only while the top
   one is turned away; the rest wait out of sight. */
.pxnews-stage > .pxnews-sheet { grid-area: 1 / 1; }
.pxnews-stage > .pxnews-sheet[data-at="top"] { z-index: 3; }
.pxnews-stage > .pxnews-sheet[data-at="under"] { z-index: 2; }
.pxnews-stage > .pxnews-sheet[data-at="off"] { z-index: 1; visibility: hidden; }
/* A turn: out to the left, then back under the pile; "in" is the same, run
   backwards, for the page coming out from under it. */
.pxnews-stage > .pxnews-sheet[data-turn] {
  visibility: visible;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
  animation: pxnews-turn .5s cubic-bezier(.45, .05, .35, 1);
}
.pxnews-stage > .pxnews-sheet[data-turn="in"] { animation-direction: reverse; }
@keyframes pxnews-turn {
  0%   { translate: 0 0; rotate: 0deg; z-index: 4; }
  48%  { translate: -64% -3%; rotate: -7deg; z-index: 4; }
  52%  { translate: -64% -3%; rotate: -7deg; z-index: 0; }
  100% { translate: 0 0; rotate: 0deg; z-index: 0; }
}
.pxnews-live {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
/* While it is open it is in your hands, not on the doorstep or in the rail. */
.pxnews-in-hand :is(.pxnews-doorstep, .pxnews-slip) { visibility: hidden; }
@keyframes pxnews-fade { from { opacity: 0; } }
/* No WebGL, no snapshot, or reduced motion: × folds it away in CSS instead. */
.pxnews-stage.pxnews-fold-out {
  transition: translate .38s cubic-bezier(.5, 0, .75, 0), scale .38s ease-in, opacity .3s ease .08s;
  translate: 60px 140px; scale: calc(var(--pxnews-fit, 1) * .2); opacity: 0;
}

.pxnews-close {
  position: absolute; top: -13px; right: -13px; z-index: 1;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer;
  background: #1a1918; color: #f2eee4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
  transition: transform .15s ease, opacity .2s ease;
}
.pxnews-close svg { width: 14px; height: 14px; stroke: currentColor; }
.pxnews-close:hover { transform: rotate(90deg) scale(1.06); }
.pxnews-close:focus-visible { outline: 2px solid #2c6582; outline-offset: 2px; }

/* The GL sheet's stage: the whole window, so a thrown ball can cross it.
   Hidden until the paper is grabbed or tossed. */
.pxnews-gl {
  position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 9001;
  pointer-events: none; visibility: hidden;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .18));
}

@media (prefers-reduced-motion: reduce) {
  .pxnews-scrim, .pxnews-stage, .pxnews-stage.pxnews-rise, .pxnews-stage > .pxnews-sheet { animation: none; }
  .pxnews-stage { cursor: pointer; }
  .pxnews-stage.pxnews-fold-out { transition: opacity .12s linear; translate: none; scale: var(--pxnews-fit, 1); }
}

/* ---- the sheet itself (rasterised too: self-contained, see above) ------ */
.pxnews-sheet {
  --pxn-ink: #1a1918;
  --pxn-soft: rgba(26, 25, 24, .74);
  --pxn-faint: rgba(26, 25, 24, .55);
  --pxn-rule: rgba(26, 25, 24, .85);
  --pxn-hair: rgba(26, 25, 24, .28);
  --pxn-accent: #2c6582;
  box-sizing: border-box;
  /* One layout at every panel width, scaled to fit (--pxnews-fit) rather
     than reflowed: a page narrowed to a docked panel set its columns three
     words wide and grew taller than it got narrower. */
  width: 440px;
  display: flex; flex-direction: column;
  margin: 0; padding: 16px 18px 12px;
  background-color: #f2eee4;
  background-image:
    radial-gradient(130% 90% at 18% 8%, rgba(255, 253, 246, .9), rgba(255, 253, 246, 0) 60%),
    radial-gradient(120% 120% at 100% 100%, rgba(150, 128, 92, .14), rgba(150, 128, 92, 0) 55%);
  color: var(--pxn-ink);
  font: 400 11.5px/1.42 'Newsreader', Georgia, serif;
  text-align: left;
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}
.pxnews-sheet * { box-sizing: border-box; margin: 0; padding: 0; }

.pxn-mast { text-align: center; }
.pxn-ears {
  display: flex; justify-content: space-between; gap: 8px;
  font: 400 7.5px/1 'IBM Plex Mono', Menlo, monospace;
  letter-spacing: .14em; text-transform: uppercase; color: var(--pxn-faint);
}
.pxn-title {
  margin: 4px 0 6px;
  font: 400 43px/.95 'Instrument Serif', Georgia, serif;
  letter-spacing: -.012em; color: var(--pxn-ink);
  white-space: nowrap;
}
.pxn-dateline {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 4px 0 3px;
  border-top: 2.5px double var(--pxn-rule);
  border-bottom: 1px solid var(--pxn-rule);
  font: 400 7.5px/1.2 'IBM Plex Mono', Menlo, monospace;
  letter-spacing: .14em; text-transform: uppercase; color: var(--pxn-soft);
}
.pxn-motto { font: italic 400 10.5px/1 'Instrument Serif', Georgia, serif; letter-spacing: 0; text-transform: none; color: var(--pxn-ink); }

.pxn-kicker {
  font: 700 8px/1 'Alegreya Sans', system-ui, sans-serif;
  letter-spacing: .16em; text-transform: uppercase; color: var(--pxn-accent);
}
.pxn-lead { padding: 10px 0 10px; border-bottom: 1px solid var(--pxn-rule); }
.pxn-lead .pxn-kicker { text-align: center; }
.pxn-hed {
  margin: 5px 0 6px; text-align: center;
  font: 400 30px/1.0 'Instrument Serif', Georgia, serif;
  letter-spacing: -.01em; color: var(--pxn-ink);
  text-wrap: balance;
}
.pxn-dek {
  margin: 0 auto 9px; max-width: 360px; text-align: center;
  font: italic 400 12.5px/1.3 'Newsreader', Georgia, serif; color: var(--pxn-soft);
  text-wrap: balance;
}
.pxn-cols { column-count: 2; column-gap: 16px; column-rule: 1px solid var(--pxn-hair); }
.pxn-body {
  text-align: justify; hyphens: auto; -webkit-hyphens: auto;
  font: 400 11.5px/1.42 'Newsreader', Georgia, serif; color: var(--pxn-ink);
}
.pxn-body + .pxn-body { text-indent: 1em; }
.pxn-drop::first-letter {
  float: left; margin: 2px 4px 0 0;
  font: 400 40px/.78 'Instrument Serif', Georgia, serif; color: var(--pxn-ink);
}

.pxn-grid {
  display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px;
  padding: 10px 0;
}
.pxn-grid-one { grid-template-columns: 1fr; }
.pxn-col + .pxn-col { border-left: 1px solid var(--pxn-hair); padding-left: 15px; margin-left: -1px; }
.pxn-story + .pxn-story { margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--pxn-hair); }
.pxn-hed2 {
  margin: 4px 0 5px;
  font: 400 19px/1.02 'Instrument Serif', Georgia, serif; color: var(--pxn-ink);
  text-wrap: balance;
}
.pxn-fig { margin: 2px 0 6px; }
.pxn-fig-art { display: block; width: 100%; height: auto; border: 1px solid var(--pxn-hair); }
.pxn-eq {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 4px; border: 1px solid var(--pxn-hair);
  background: rgba(26, 25, 24, .035);
  font: 400 15px/1 'Newsreader', Georgia, serif; color: var(--pxn-ink);
  white-space: nowrap;
}
.pxn-eq i { font-style: italic; }
.pxn-eq sup { font-size: .62em; vertical-align: .55em; line-height: 0; }
.pxn-frac { display: inline-flex; flex-direction: column; align-items: center; }
.pxn-frac > span { padding: 0 3px; }
.pxn-frac > span + span { margin-top: 3px; padding-top: 3px; border-top: 1px solid var(--pxn-ink); }
.pxn-root > span { border-top: 1px solid var(--pxn-ink); padding: 1px 1px 0; }
.pxn-fig figcaption {
  margin-top: 3px;
  font: italic 400 9.5px/1.25 'Newsreader', Georgia, serif; color: var(--pxn-faint);
}

.pxn-briefs { padding: 10px 0 11px; border-bottom: 1px solid var(--pxn-rule); }
.pxn-briefs-k {
  margin-bottom: 7px;
  font: italic 400 24px/1 'Instrument Serif', Georgia, serif; color: var(--pxn-ink);
}
.pxn-briefs ul {
  list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px;
  font: 500 13px/1.28 'Alegreya Sans', system-ui, sans-serif; color: var(--pxn-soft);
}
.pxn-briefs li { padding-left: 1.05em; text-indent: -1.05em; }
.pxn-briefs li::before { content: "§ "; font: 400 9px/1 'IBM Plex Mono', Menlo, monospace; color: var(--pxn-accent); }

.pxn-foot {
  margin-top: auto;
  display: flex; justify-content: space-between; gap: 8px;
  padding-top: 6px; border-top: 2.5px double var(--pxn-rule);
  font: 400 7.5px/1.3 'IBM Plex Mono', Menlo, monospace;
  letter-spacing: .12em; text-transform: uppercase; color: var(--pxn-faint);
}

/* Page one: what is inside, after the lead. */
.pxn-inside { padding: 9px 0 10px; }
.pxn-inside-k {
  margin-bottom: 5px;
  font: italic 400 16px/1 'Instrument Serif', Georgia, serif; color: var(--pxn-ink);
}
.pxn-inside ul { list-style: none; }
.pxn-inside li {
  display: flex; align-items: baseline; gap: 10px;
  padding: 5px 0 4px; border-top: 1px solid var(--pxn-hair);
}
.pxn-inside-kick {
  flex: none; width: 66px;
  font: 700 7.5px/1 'Alegreya Sans', system-ui, sans-serif;
  letter-spacing: .16em; text-transform: uppercase; color: var(--pxn-accent);
}
.pxn-inside-hed { flex: 1; min-width: 0; font: 400 14px/1.1 'Instrument Serif', Georgia, serif; color: var(--pxn-ink); }
.pxn-inside-pg { flex: none; font: 400 8px/1 'IBM Plex Mono', Menlo, monospace; letter-spacing: .1em; color: var(--pxn-faint); }
.pxn-inside-pg::before { content: "p. "; }

/* Pages two and three: a running head where the masthead was. */
.pxn-run {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  padding-bottom: 5px; border-bottom: 2.5px double var(--pxn-rule);
  font: 400 7.5px/1 'IBM Plex Mono', Menlo, monospace;
  letter-spacing: .14em; text-transform: uppercase; color: var(--pxn-soft);
}
.pxn-run > span:first-child {
  font: 400 17px/1 'Instrument Serif', Georgia, serif;
  letter-spacing: -.01em; text-transform: none; color: var(--pxn-ink);
}
.pxn-run-sec { font: italic 400 12px/1 'Instrument Serif', Georgia, serif; letter-spacing: 0; text-transform: none; color: var(--pxn-ink); }

/* Page two's first story, across the page, its picture beside the text. */
.pxn-feature { padding: 10px 0 11px; border-bottom: 1px solid var(--pxn-rule); }
.pxn-hed3 {
  margin: 5px 0 8px;
  font: 400 27px/1 'Instrument Serif', Georgia, serif;
  letter-spacing: -.01em; color: var(--pxn-ink); text-wrap: balance;
}
.pxn-feature-row { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; align-items: start; }
.pxn-feature-row .pxn-fig { margin: 2px 0 0; }
.pxn-page2 .pxn-body { font-size: 12.5px; line-height: 1.45; }
.pxn-page2 .pxn-hed2 { font-size: 21px; }
.pxn-page2 .pxn-fig figcaption { font-size: 10px; }
.pxn-feature-plain .pxn-feature-row { display: block; column-count: 2; column-gap: 16px; column-rule: 1px solid var(--pxn-hair); }

/* Page three: the archive and how to read the paper. */
.pxn-archive { padding: 10px 0 11px; border-bottom: 1px solid var(--pxn-rule); }
.pxn-archive ul { list-style: none; margin-top: 6px; }
.pxn-archive li {
  display: grid; grid-template-columns: 136px 1fr; column-gap: 10px; align-items: baseline;
  padding: 5px 0 4px; border-top: 1px solid var(--pxn-hair);
}
.pxn-archive-no {
  font: 400 7.5px/1.2 'IBM Plex Mono', Menlo, monospace;
  letter-spacing: .12em; text-transform: uppercase; color: var(--pxn-faint);
}
.pxn-archive-hed { font: 400 16px/1.12 'Instrument Serif', Georgia, serif; color: var(--pxn-ink); }
.pxn-archive-none { margin-top: 6px; font: italic 400 11.5px/1.3 'Newsreader', Georgia, serif; color: var(--pxn-soft); }
.pxn-howto { padding: 10px 0 10px; }
.pxn-howto .pxn-body { margin-top: 6px; font-size: 12.5px; line-height: 1.45; }

/* ---- on the doorstep: the new tab's corner ---------------------------- */
/* Bottom right of the empty view, opposite where the incognito eye
   used to sit, in the band .main.empty-mode's padding leaves under the composer.

   A PILE, NOT A SHEET. The edition lands on top of three folded papers, all
   lying back on the desk (rotateX), each a little askew, so the corner reads
   as newsprint with weight rather than a card. The top paper is folded in
   half: a crease across its middle, the lower half in its own shade, and a
   stepped edge on its right and foot for the pages under the fold. Sized in
   em off one font-size that grows with the window, so the doorstep is large
   in a full tab and still fits a side panel. */
.pxnews-doorstep {
  position: absolute; right: 26px; bottom: 22px; z-index: 5;
  display: none;
  width: clamp(230px, 30vw, 330px);
  font-size: clamp(10.5px, 1.3vw, 15px);
  margin: 0; padding: 0; border: none; background: none;
  cursor: pointer; text-align: left; color: #1a1918;
  perspective: 1100px; perspective-origin: 50% 0;
  isolation: isolate;
}
.main.empty-mode .pxnews-doorstep:not([hidden]) { display: flex; }
.main.px-incognito .pxnews-doorstep { display: none; }
.pxnews-doorstep:focus-visible { outline: none; }

.pxnews-ds-paper, .pxnews-ds-pile {
  transform-origin: 50% 100%;
  transform: rotateX(16deg) rotateZ(-3.5deg);
  transition: transform .3s cubic-bezier(.2, .8, .3, 1);
}
.pxnews-doorstep:hover :is(.pxnews-ds-paper, .pxnews-ds-pile),
.pxnews-doorstep:focus-visible :is(.pxnews-ds-paper, .pxnews-ds-pile) {
  transform: translateY(-.35em) rotateX(7deg) rotateZ(-1.5deg);
}
/* The top paper. */
.pxnews-ds-paper {
  position: relative; width: 100%;
  display: flex; flex-direction: column; gap: .32em;
  padding: .85em 1.05em .95em;
  background:
    /* the fold: a shadowed valley with a lit lip */
    linear-gradient(to bottom, transparent 0 47%, rgba(60, 48, 30, .14) 49.2%, rgba(255, 255, 255, .6) 50.2%, rgba(60, 48, 30, .07) 51.4%, transparent 54%),
    radial-gradient(120% 70% at 20% 0, rgba(255, 253, 246, .85), rgba(255, 253, 246, 0) 60%),
    linear-gradient(to bottom, #f3efe5 0, #efe9dc 49.5%, #e5ddcc 50.5%, #ebe4d4 100%);
  box-shadow:
    /* pages under the fold, a step at a time */
    1px 1px 0 #ddd4c1, 2px 2px 0 #ece6d7, 3px 3px 0 #d4cab5, 4px 4px 0 #e8e1d1, 5px 5px 0 #cbc0a9,
    /* on the desk */
    0 1.6em 2.4em rgba(0, 0, 0, .34), 0 .3em .6em rgba(0, 0, 0, .22);
}
.pxnews-doorstep:focus-visible .pxnews-ds-paper {
  box-shadow: 0 0 0 2px #2c6582, 5px 5px 0 #cbc0a9, 0 1.6em 2.4em rgba(0, 0, 0, .34);
}
/* The pile: three papers of the same size under it, each its own shade, with
   a masthead's rules showing where its top edge clears the next. */
.pxnews-ds-pile { position: absolute; inset: 0; z-index: -1; }
.pxnews-ds-pile i {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, transparent 0 9%, rgba(26, 25, 24, .55) 9% calc(9% + 1px), transparent calc(9% + 1px) 11%, rgba(26, 25, 24, .4) 11% calc(11% + 1px), transparent calc(11% + 1px)),
    linear-gradient(to right, transparent 0 18%, rgba(26, 25, 24, .16) 18% 82%, transparent 82%) 0 3.5% / 100% 3.5% no-repeat,
    linear-gradient(to bottom, transparent 0 48%, rgba(60, 48, 30, .12) 50%, transparent 53%),
    var(--pxn-pile-bg, #e9e2d3);
  box-shadow: 1px 1px 0 #d2c8b3, 2px 2px 0 #e2dbcb, 3px 3px 0 #c6bba3, 0 .5em 1em rgba(0, 0, 0, .22);
}
.pxnews-ds-pile i:nth-child(1) { --pxn-pile-bg: #e2dac8; translate: -1.3em -1.5em; rotate: -9deg; }
.pxnews-ds-pile i:nth-child(2) { --pxn-pile-bg: #ece6d8; translate: 1.1em -.95em; rotate: 5.5deg; }
.pxnews-ds-pile i:nth-child(3) { --pxn-pile-bg: #e6dfcf; translate: -.4em -.45em; rotate: -2.5deg; }

.pxnews-ds-ears {
  display: flex; justify-content: space-between;
  font: 400 .5em/1 'IBM Plex Mono', Menlo, monospace;
  letter-spacing: .14em; text-transform: uppercase; color: rgba(26, 25, 24, .55);
}
.pxnews-ds-mast {
  font: 400 1.95em/1 'Instrument Serif', Georgia, serif; letter-spacing: -.012em;
  text-align: center; white-space: nowrap;
}
.pxnews-ds-rule { height: .3em; border-top: 2.5px double rgba(26, 25, 24, .82); border-bottom: 1px solid rgba(26, 25, 24, .82); }
.pxnews-ds-kicker {
  margin-top: .2em; text-align: center;
  font: 700 .58em/1 'Alegreya Sans', system-ui, sans-serif;
  letter-spacing: .16em; text-transform: uppercase; color: #2c6582;
}
.pxnews-ds-head {
  text-align: center;
  font: 400 1.45em/1.02 'Instrument Serif', Georgia, serif; text-wrap: balance;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.pxnews-ds-dek {
  text-align: center;
  font: italic 400 .78em/1.28 'Newsreader', Georgia, serif; color: rgba(26, 25, 24, .72); text-wrap: balance;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* Two columns of type too small to read, which is what a folded paper shows. */
.pxnews-ds-cols {
  height: 3.1em; margin-top: .15em;
  background:
    linear-gradient(rgba(26, 25, 24, .2), rgba(26, 25, 24, .2)) 50% 0 / 1px 100% no-repeat,
    repeating-linear-gradient(to bottom, rgba(26, 25, 24, .26) 0 1px, transparent 1px .44em) 0 0 / 47% 100% no-repeat,
    repeating-linear-gradient(to bottom, rgba(26, 25, 24, .26) 0 1px, transparent 1px .44em) 100% .22em / 47% 100% no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
}
.pxnews-ds-meta {
  padding-top: .35em; border-top: 1px solid rgba(26, 25, 24, .3);
  font: 400 .5em/1 'IBM Plex Mono', Menlo, monospace;
  letter-spacing: .14em; text-transform: uppercase; color: rgba(26, 25, 24, .55);
}
/* A short panel has no band under the composer to put it in. */
@media (max-height: 600px) {
  .main.empty-mode .pxnews-doorstep:not([hidden]) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pxnews-ds-paper, .pxnews-ds-pile { transition: none; }
}

/* ---- the slip: tucked behind the account row ---------------------------- */
/* It sits UNDER the profile row and dissolves into it, the way the chat list
   fades out above that row (.px-edge-bottom): its last 12px run beneath the
   row, and a mask fades the lower part of the paper to nothing before it gets
   there. A mask and not a gradient overlay, for the list's reason: the rail is
   glass, so there is no flat colour to paint a fade in. Hover or focus slides
   it out from behind the row, whole.
   The padding is room for the × and the paper's shadow, which a mask would
   otherwise clip at the border box; the margin gives it back. */
@property --pxnews-tuck {
  syntax: "<length>"; inherits: false; initial-value: 0px;
}
.pxnews-slip {
  position: relative; flex-shrink: 0;
  margin: 2px 6px -12px; padding: 10px 10px 0;
  rotate: -1deg;
  --pxnews-tuck: 34px;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--pxnews-tuck)), transparent calc(100% - var(--pxnews-tuck) + 26px));
  mask-image: linear-gradient(to bottom, #000 calc(100% - var(--pxnews-tuck)), transparent calc(100% - var(--pxnews-tuck) + 26px));
  transition: --pxnews-tuck .28s cubic-bezier(.2, .8, .3, 1), translate .28s cubic-bezier(.2, .8, .3, 1);
}
.pxnews-slip:hover, .pxnews-slip:focus-within, .pxnews-slip[data-leaving] {
  --pxnews-tuck: -26px; translate: 0 -12px;
}
/* The row it hides behind paints over it, and takes the clicks there. */
.pxnews-slip:not([hidden]) ~ :is(.auth-who, .auth-cta) { position: relative; z-index: 1; }
.pxnews-slip[hidden] { display: none; }
/* A stack, not a slip: two folded papers under the top one, askew, their
   mastheads' rules showing where they clear it. Inside the slip, so they ride
   its hover and leave with it when it is thrown. */
.pxnews-slip-pile { position: absolute; inset: 10px 10px 0; z-index: -1; pointer-events: none; }
.pxnews-slip-pile i {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, transparent 0 7px, rgba(26, 25, 24, .5) 7px 8px, transparent 8px 10px, rgba(26, 25, 24, .35) 10px 11px, transparent 11px),
    var(--pxn-pile-bg, #e6dfcf);
  box-shadow: 1px 1px 0 #d2c8b3, 2px 2px 0 #c6bba3, 0 3px 7px rgba(0, 0, 0, .24);
}
.pxnews-slip-pile i:nth-child(1) { --pxn-pile-bg: #e0d8c6; translate: -5px -9px; rotate: -4.5deg; }
.pxnews-slip-pile i:nth-child(2) { --pxn-pile-bg: #ebe5d7; translate: 6px -5px; rotate: 3deg; }
/* The paper is the part that crumples, so it is self-contained like the
   sheet: it is rasterised on its own, without the × beside it. */
.pxnews-slip-paper {
  box-sizing: border-box;
  display: flex; flex-direction: column; gap: 4px; width: 100%;
  margin: 0; padding: 8px 10px 7px;
  border: none; cursor: pointer; text-align: left;
  /* Folded: a crease across the middle and the lower half in its own shade,
     with the pages under the fold stepped along its edge. */
  background:
    linear-gradient(to bottom, transparent 0 46%, rgba(60, 48, 30, .14) 49%, rgba(255, 255, 255, .55) 50.5%, transparent 54%),
    linear-gradient(to bottom, #f3efe5 0, #efe9dc 49.5%, #e6dfcf 50.5%, #ebe4d4 100%);
  color: #1a1918;
  box-shadow: 1px 1px 0 #ddd4c1, 2px 2px 0 #cfc5b0, 3px 3px 0 #e2dbcb,
              0 4px 9px rgba(0, 0, 0, .26), 0 1px 3px rgba(0, 0, 0, .2);
  -webkit-font-smoothing: antialiased;
  transition: translate .18s ease, box-shadow .18s ease;
}
.pxnews-slip-paper:focus-visible { outline: none; box-shadow: 0 0 0 2px #2c6582, 0 4px 9px rgba(0, 0, 0, .26); }
.pxnews-slip-mast {
  display: block; padding-bottom: 3px;
  border-bottom: 2px double rgba(26, 25, 24, .8);
  font: 400 17px/1 'Instrument Serif', Georgia, serif; letter-spacing: -.01em;
  white-space: nowrap;
}
.pxnews-slip-meta {
  display: block;
  font: 400 7.5px/1 'IBM Plex Mono', Menlo, monospace;
  letter-spacing: .14em; text-transform: uppercase; color: rgba(26, 25, 24, .6);
}
.pxnews-slip-x {
  position: absolute; top: 3px; right: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer;
  background: #1a1918; color: #f2eee4;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
  opacity: 0; transition: opacity .15s ease;
}
.pxnews-slip-x svg { width: 10px; height: 10px; stroke: currentColor; }
.pxnews-slip:hover .pxnews-slip-x, .pxnews-slip:focus-within .pxnews-slip-x { opacity: 1; }
.pxnews-slip-x:focus-visible { outline: 2px solid #2c6582; outline-offset: 1px; }
@media (hover: none) { .pxnews-slip-x { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .pxnews-slip, .pxnews-slip-paper { transition: none; }
}

/* ---- Settings → Account → What's new ------------------------------------ */
/* Not newsprint: rows of the settings pane, in its tokens. Each opens that
   edition's paper (pxNewsPaintSettings fills the list). */
.set-news { display: flex; flex-direction: column; gap: 6px; }
.set-news-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; column-gap: 12px;
  width: 100%; box-sizing: border-box;
  padding: 10px 12px; border: none; border-radius: var(--r-card);
  background: var(--s-card); box-shadow: var(--lit-card);
  color: var(--t-primary); text-align: left; cursor: pointer;
  transition: background .15s ease;
}
.set-news-item:hover { background: var(--s-inter); }
.set-news-item:focus-visible { outline: none; box-shadow: var(--lit-card), 0 0 0 1px var(--rim); }
.set-news-no { font: 500 10px/1 var(--mono); letter-spacing: .08em; color: var(--t-meta); }
.set-news-hed {
  font: 400 15px/1.25 var(--serif); color: var(--t-primary); text-wrap: balance;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.set-news-date { font: 400 10px/1 var(--mono); letter-spacing: .04em; color: var(--t-faint); }
.set-news-new { color: var(--t-primary); font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .set-news-item { transition: none; } }
