/* Feeds from Paper: your notes as a full-page newspaper, light or dark */
.app.is-paper { --paper: #eeeae4; --ink: #2b2926; --soft: #5f5b55; --link: #0b5a7a; --photo: #d8d3cb; --dot: #55524d; --veil: rgba(238, 234, 228, 0.6); --shadow: rgba(43, 41, 38, 0.35); --rule: rgba(43, 41, 38, 0.25);
  display: block; background: var(--paper); }
.app.is-paper.is-dark { --paper: #161514; --ink: #eeeae4; --soft: #a9a49c; --link: #7fc3e0; --photo: #211f1d; --dot: #4a4742; --veil: rgba(22, 21, 20, 0.55); --shadow: rgba(0, 0, 0, 0.6); --rule: rgba(238, 234, 228, 0.25); color-scheme: dark; }
.is-paper .header, .is-paper .rail { display: none; }
.is-paper .content { height: 100%; margin: 0; padding: 0; border-radius: 0; background: var(--paper); }

.paper { --gutter: max(3vw, 16px); container-type: inline-size; min-height: 100%; padding: 0 var(--gutter) calc(48px + env(safe-area-inset-bottom)); background: var(--paper); color: var(--ink); font-family: "Newsreader", Georgia, "Times New Roman", serif; }
.paper a { color: inherit; }
.paper a.paper__tag { color: var(--paper); }
.paper a.paper__more, .paper a.paper__inline { color: var(--link); }
.paper__label, .paper__tab, .paper__tag, .paper__kicker, .paper__index h3, .paper__dateline, .paper__small, .paper__button, .paper__nav { font-family: var(--font); }

/* Top bar: stays in view while you read */
.paper__nav { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 16px; margin: 0 calc(-1 * var(--gutter)) 12px; padding: 6px var(--gutter); background: var(--paper); border-bottom: 1px solid var(--rule); font-size: 0.85rem; font-weight: 700; }
.paper__nav a, .paper__theme { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; text-decoration: none; }
.paper__nav a:first-child { margin-right: auto; }
.paper__nav a:hover { text-decoration: underline; }
.paper__theme { padding: 0 12px; border: 1px solid var(--ink); border-radius: 999px; min-height: 36px; font-size: 0.8rem; }
.paper__theme:hover { background: var(--ink); color: var(--paper); }

.paper__strip { display: flex; flex-wrap: wrap; gap: 8px 4px; }
.paper__tab { display: flex; flex: none; flex-direction: column; gap: 5px; padding-right: 10px; white-space: nowrap; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.paper__bar { display: block; height: 14px; margin-right: -10px; background: var(--tone); }
.paper__tab:hover .paper__bar, .paper__tab.is-current .paper__bar { box-shadow: 0 3px 0 var(--ink); }
.paper__tab.is-current { text-decoration: underline; text-underline-offset: 3px; }

.paper__head-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 12px; margin-top: 8px; }
.paper__name { font-family: "Instrument Serif", Georgia, serif; font-size: 8cqw; font-weight: 400; letter-spacing: -0.02em; line-height: 0.95; text-align: center; text-wrap: balance; }
.paper__side { display: flex; flex-direction: column; padding-bottom: 6px; }
.paper__side--right { align-items: flex-end; text-align: right; }
.paper__label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.paper__side strong { font-family: var(--font); font-size: 3.2cqw; font-weight: 700; letter-spacing: -0.04em; line-height: 1.1; }
.paper__small { color: var(--soft); font-size: 0.8rem; }
.paper__dateline { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin: 12px 0 16px; padding: 6px 0; border-block: 1px solid var(--ink); font-size: 0.82rem; }

.paper__big { margin: 0; font-family: "Instrument Serif", Georgia, serif; font-size: var(--size); font-weight: 400; letter-spacing: -0.02em; line-height: 1; }
.paper__big-link { display: block; text-decoration: none; }
.paper__line { display: block; padding-block: 0.04em; overflow-wrap: anywhere; }
.paper__line--block { margin-top: 0.1em; padding: 0.04em 0.06em 0.12em; background: var(--ink); color: var(--paper); }
.paper__stand { margin: 14px 0 26px; font-size: 1.2rem; line-height: 1.5; font-style: italic; }

.paper__front { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 3cqw; align-items: start; }
.paper__photo { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background-color: var(--photo);
  background-image: radial-gradient(circle, var(--dot) 36%, transparent 40%); background-size: 7px 7px; }
.paper__photo::before { content: ""; position: absolute; top: 8%; right: -3%; width: 62%; aspect-ratio: 1; border-radius: 50%; background: var(--tone);
  -webkit-mask-image: radial-gradient(circle, #000 52%, transparent 58%); mask-image: radial-gradient(circle, #000 52%, transparent 58%); -webkit-mask-size: 5px 5px; mask-size: 5px 5px; }
.paper__shots { position: absolute; inset: 9% 8%; display: flex; justify-content: center; gap: 3%; }
.paper__shots::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, transparent 42%, var(--veil) 50%); background-size: 4px 4px; pointer-events: none; }
.paper__shots img { height: 100%; width: auto; max-width: 32%; object-fit: cover; object-position: top; filter: grayscale(1) contrast(1.25); background: var(--paper); box-shadow: 5px 5px 0 var(--shadow); }
.is-dark .paper__shots img { filter: grayscale(1) contrast(1.1) brightness(0.8); }
.paper__caption { margin-top: 8px; color: var(--soft); font-size: 0.85rem; font-style: italic; }

.paper__tag { display: flex; justify-content: space-between; align-items: end; padding: 10px 14px; background: var(--ink); color: var(--paper); text-decoration: none; }
.paper__tag span { font-family: "Instrument Serif", Georgia, serif; font-size: 2rem; line-height: 1.1; }
.paper__tag em { padding-left: 34px; background: linear-gradient(var(--tone), var(--tone)) left center / 28px 12px no-repeat; font-size: 0.7rem; font-style: normal; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.paper__title { margin: 14px 0 8px; font-family: "Instrument Serif", Georgia, serif; font-size: 2.1rem; font-weight: 400; letter-spacing: -0.01em; line-height: 1.05; }
.paper__title a { text-decoration: none; }
.paper__title a:hover, .paper__card-title a:hover { text-decoration: underline; }
.paper__body { font-size: 1.05rem; line-height: 1.5; }
.paper__more { display: inline-block; margin: 10px 0 18px; font-style: italic; }
.paper__index { border: 2px solid var(--ink); }
.paper__index h3 { padding: 8px 14px; background: var(--ink); color: var(--paper); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.paper__index > div { padding: 10px 14px; }
.paper__row { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; font-family: var(--font); font-size: 0.88rem; text-decoration: none; }
.paper__row:hover span:first-child { text-decoration: underline; }
.paper__dots { flex: 1; border-bottom: 1px dotted var(--ink); }

.paper__rest { margin-top: 34px; }
.paper__rule { padding-top: 8px; border-top: 4px double var(--ink); font-family: "Instrument Serif", Georgia, serif; font-size: 1.8rem; font-weight: 400; }
.paper__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 24px 3cqw; margin-top: 14px; }
.paper__card { padding-top: 10px; border-top: 6px solid var(--tone); }
.paper__kicker { color: var(--soft); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.paper__card-title { margin: 6px 0; font-family: "Instrument Serif", Georgia, serif; font-size: 1.6rem; font-weight: 400; line-height: 1.1; }
.paper__card-title a { text-decoration: none; }
.paper__card p { color: var(--soft); line-height: 1.45; }
.paper__button { display: block; margin: 24px auto 0; padding: 14px 24px; border: 2px solid var(--ink); font-weight: 700; }
.paper__button:hover { background: var(--ink); color: var(--paper); }
.paper__done { margin-top: 10px; columns: 2; column-gap: 24px; color: var(--soft); }
.paper__done li { padding: 3px 0; break-inside: avoid; text-decoration: line-through; }
.paper__empty { margin: 40px 0; font-size: 1.3rem; font-style: italic; text-align: center; }

/* Phones and narrow windows: one column, bigger text, sections slide sideways */
@container (max-width: 760px) {
  .paper__strip { flex-wrap: nowrap; margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 6px; overflow-x: auto; scrollbar-width: none; }
  .paper__strip::-webkit-scrollbar { display: none; }
  .paper__tab { padding-block: 4px; }
  .paper__head-row { grid-template-columns: 1fr 1fr; }
  .paper__name { grid-column: 1 / -1; grid-row: 1; font-size: 15cqw; }
  .paper__side strong { font-size: 2rem; }
  .paper__front { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .paper__stand { font-size: 1.25rem; line-height: 1.35; }
  .paper__body, .paper__card p { font-size: 1.1rem; }
  .paper__more { padding-block: 8px; }
  .paper__done { columns: 1; }
}
@container (min-width: 1500px) { .paper__title { font-size: 2.6rem; } .paper__body { font-size: 1.15rem; } }

/* One story, set for reading */
.paper__section { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; letter-spacing: 0.08em; text-transform: uppercase; }
.paper__chip { width: 28px; height: 12px; background: var(--tone); }
.paper__story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 26cqw); gap: 4cqw; align-items: start; margin-top: 8px; padding-top: 22px; border-top: 4px double var(--ink); }
.paper__text { max-width: 68ch; font-size: 1.25rem; line-height: 1.95; letter-spacing: 0.005em; }
.paper__text h3 { margin: 1.4rem 0 0.5rem; font-family: "Instrument Serif", Georgia, serif; font-size: 2.1rem; font-weight: 400; line-height: 1.2; }
.paper__text p { margin: 0 0 1.4em; white-space: pre-line; overflow-wrap: anywhere; }
.paper__text > section:first-of-type h3 { margin-top: 1.6rem; }
.paper__brief { padding: 18px 20px 14px; border-block: 2px solid var(--ink); }
.paper__brief h3 { margin: 0 0 10px; font-size: 1.6rem; line-height: 1.2; }
.paper__brief ul { padding-left: 1.2em; list-style: square; }
.paper__brief li { margin: 0 0 10px; line-height: 1.65; }
.paper__code { margin-top: 12px; padding: 18px 20px; overflow-x: auto; background: var(--ink); color: var(--paper); font: 0.88rem/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.paper__next { display: block; margin-top: 2.4em; padding: 16px 0; border-top: 4px double var(--ink); text-decoration: none; }
.paper__next-title { display: block; margin-top: 8px; line-height: 1.2; font-family: "Instrument Serif", Georgia, serif; font-size: 2rem; line-height: 1.1; }
.paper__next:hover .paper__next-title { text-decoration: underline; }

.paper__aside { display: flex; flex-direction: column; gap: 18px; }
.paper__done { padding: 14px 18px; border: 2px solid var(--ink); background: var(--ink); color: var(--paper); font-family: var(--font); font-size: 0.95rem; font-weight: 700; }
.paper__done.is-done { background: transparent; color: var(--ink); }
.paper__done:hover { opacity: 0.85; }
.paper__aside .paper__index { border-color: var(--ink); }
.paper__row[href] span:first-child { min-width: 0; overflow-wrap: anywhere; text-decoration: underline; text-underline-offset: 3px; }
.paper__row[href] { align-items: flex-start; }
.paper__row[href] .paper__dots { min-width: 12px; margin-top: 0.9em; }
.paper__check { font-size: 1.05rem; line-height: 1.7; }
.paper__aside .shots { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.paper .shot { position: relative; height: 150px; min-height: 0; border-radius: 0; background: var(--photo); filter: grayscale(1); }
.paper .shot:hover { filter: none; }
.paper__remarks { width: 100%; padding: 10px 12px; border: 1px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); font: 1rem/1.5 "Newsreader", Georgia, serif; resize: vertical; }
.paper__remarks:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }

.shot { position: relative; }
.shot__state { position: absolute; inset: auto 6px 6px; padding: 4px 8px; border-radius: 999px; background: rgba(32, 33, 36, 0.85); color: #fff; font-size: 0.7rem; text-align: center; }
.shot__state--processing { background: #0b57d0; }
.shot__state--failed { background: #b3261e; }

@container (max-width: 900px) {
  .paper__story { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .paper__text { font-size: 1.2rem; line-height: 1.9; }
}

.paper--article .paper__big { line-height: 1.08; }
.paper--article .paper__line--block { margin-top: 0.14em; padding-block: 0.08em 0.16em; }
.paper__row { line-height: 1.5; }
