/* Artie — Journal. Long reads printed on the main site's paper. artie.css supplies the inks, the type, the questions
   sheet, the red contact card and the wax-sealed footer; this adds the reading column: the short-answer card (the line
   search engines and AI answers quote), contents, tables, timelines, checklists and perforated photographs in the text. */
.top.bar { position: relative; color: var(--ink); font-family: var(--display); }
.top.bar nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }

.post { --ghost: rgb(55 100 228 / .35); padding: clamp(8px, 2vw, 24px) var(--pad) clamp(64px, 8vw, 120px); }
.crumbs { max-width: 62rem; margin: 0 auto clamp(28px, 4vw, 48px); font: 400 12px/1.6 var(--display); letter-spacing: .16em; text-transform: uppercase; }
.crumbs a { opacity: .75; }
.crumbs a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.head { max-width: 62rem; margin: 0 auto; }
.head .kicker { color: var(--red-ink); margin-bottom: 20px; }
.head h1 { font-size: clamp(30px, 4.1vw, 58px); max-width: 17em; filter: url(#hand-l); text-shadow: .03em .02em 0 var(--ghost); }
.dek { max-width: 32em; margin-top: 26px; font: italic 400 clamp(21px, 1.9vw, 27px)/1.35 var(--text); }
.meta { margin-top: 22px; font: 400 12px/1.8 var(--display); letter-spacing: .16em; text-transform: uppercase; }
.meta a { text-decoration: underline; text-underline-offset: 3px; }

.hero { max-width: 80rem; margin: clamp(36px, 5vw, 64px) auto 0; }
.hero img { height: auto; aspect-ratio: 16 / 9; }
.hero figcaption, .body figcaption { margin-top: 10px; font-size: 15px; font-style: italic; opacity: .8; }

/* the short answer: a yellow linen card, the first thing a reader (or an answer engine) needs */
.answer { max-width: 35rem; margin: clamp(40px, 6vw, 72px) auto 0; padding: clamp(24px, 3vw, 40px); rotate: -.4deg;
  background: var(--linen), var(--yellow); background-blend-mode: multiply; box-shadow: 0 1px 0 rgb(20 20 19 / .12); }
.answer .kicker { margin-bottom: 12px; }
.answer p:not(.kicker) { font-size: clamp(20px, 1.6vw, 23px); line-height: 1.5; }

.toc { max-width: 35rem; margin: clamp(40px, 5vw, 56px) auto 0; }
.toc .kicker { margin-bottom: 14px; }
.toc ol { list-style: none; counter-reset: t; border-bottom: 1px solid rgb(20 20 19 / .2); }
.toc li { counter-increment: t; border-top: 1px solid rgb(20 20 19 / .2); }
.toc a { display: grid; grid-template-columns: 2.6em 1fr; gap: 12px; padding: 10px 0; }
.toc a::before { content: counter(t, decimal-leading-zero); font: 700 13px/1 var(--stencil); letter-spacing: .14em; color: var(--red-ink); padding-top: .45em; }
.toc a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* the reading column */
.body { max-width: 35rem; margin: 0 auto; counter-reset: s; font-size: clamp(19px, 1.35vw, 21px); line-height: 1.62; }
.body > * + * { margin-top: 1em; }
.body h2 { counter-increment: s; margin: clamp(56px, 7vw, 88px) 0 20px; font: 400 clamp(23px, 2.1vw, 30px)/1.2 var(--display); text-transform: uppercase; letter-spacing: .08em; text-wrap: balance; filter: url(#hand-s); scroll-margin-top: 24px; }
.body h2::before { content: "Nº " counter(s, decimal-leading-zero); display: block; margin-bottom: 14px; font: 700 13px/1 var(--stencil); letter-spacing: .22em; color: var(--red-ink); }
.body h3 { margin: 34px 0 8px; font: 500 clamp(22px, 1.8vw, 26px)/1.2 var(--text); text-shadow: .035em .022em 0 var(--ghost); }
.body a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--red-ink); }
.body a:hover { color: var(--red-ink); }
.body strong { font-weight: 600; }
.body ul, .body ol { padding-left: 1.2em; }
.body ul { list-style: square; }
.body li::marker { color: var(--red-ink); }
.body li + li { margin-top: .45em; }
.body ul.check { list-style: none; padding-left: 0; }
.body ul.check li { position: relative; padding-left: 1.7em; }
.body ul.check li::before { content: ""; position: absolute; left: 0; top: .38em; width: .78em; height: .78em; border: 1.5px solid var(--red); }

.table { overflow-x: auto; margin: 32px 0; }
.body table { width: 100%; min-width: 600px; border-collapse: collapse; font-size: .86em; line-height: 1.4; }
.body th { padding: 10px 14px 10px 0; border-bottom: 2px solid; font: 700 11px/1.3 var(--stencil); letter-spacing: .16em; text-transform: uppercase; text-align: left; vertical-align: bottom; }
.body td { padding: 12px 14px 12px 0; border-bottom: 1px solid rgb(20 20 19 / .2); vertical-align: top; }
.body td:first-child { font-weight: 600; }

.timeline { display: grid; grid-template-columns: 5.4em 1fr; gap: 12px 18px; margin: 28px 0; padding: 22px 0; border-block: 1px solid rgb(20 20 19 / .2); }
.timeline dt { font: 700 15px/1.5 var(--stencil); letter-spacing: .06em; color: var(--red-ink); padding-top: .2em; }

.note { margin: 36px 0; padding: 22px 26px; border: 1.5px solid var(--red); rotate: .3deg; }
.note .kicker { color: var(--red-ink); margin-bottom: 8px; }
.note p + p { margin-top: .7em; }

/* photographs inside the text are postage stamps, like the portfolio strips */
.body figure { margin: 40px 0; }
.body figure img { height: auto; }
.body figure:nth-of-type(odd) img { rotate: -.6deg; }
.body figure:nth-of-type(even) img { rotate: .5deg; }
.body figure.single { width: min(100%, 26rem); margin-inline: auto; } /* a lone portrait photo, kept to stamp size */
.pics { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.pics figcaption { grid-column: 1 / -1; }

/* more to read */
.more { --ghost: rgb(205 57 43 / .3); padding: calc(var(--pad) * 1.5) var(--pad) calc(var(--pad) * 2); border-top: 1px solid rgb(20 20 19 / .2); }
.more .kicker { margin-bottom: clamp(24px, 3vw, 40px); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 40px clamp(20px, 3vw, 40px); }
.card img { height: auto; aspect-ratio: 4 / 5; }
.card .kicker { margin-top: 16px; font-size: 11px; color: var(--red-ink); }
.card :is(h2, h3) { margin-top: 8px; font: 500 clamp(21px, 1.6vw, 24px)/1.2 var(--text); text-shadow: .035em .022em 0 var(--ghost); }
.card p { margin-top: 8px; font-size: 17px; line-height: 1.45; }
.card:hover :is(h2, h3) { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* the journal's own front page */
.index { padding: clamp(8px, 2vw, 24px) var(--pad) clamp(64px, 8vw, 120px); --ghost: rgb(55 100 228 / .35); }
.index .head { margin-bottom: clamp(40px, 6vw, 80px); }
@media (min-width: 900px) {   /* five guides: two across, then three, so none is left on a row by itself */
  .index .cards { grid-template-columns: repeat(6, 1fr); }
  .index .card { grid-column: span 2; }
  .index .card:nth-child(-n+2) { grid-column: span 3; }
  .index .card:nth-child(-n+2) img { aspect-ratio: 3 / 2; }
}

/* a table wider than the column fades at the edge it continues past, until it's scrolled to the end */
@property --edge { syntax: "<length>"; inherits: false; initial-value: 0px; }
@supports (animation-timeline: scroll()) {
  .table { -webkit-mask: linear-gradient(90deg, #000 calc(100% - var(--edge)), #0000); mask: linear-gradient(90deg, #000 calc(100% - var(--edge)), #0000);
    animation: edge linear both; animation-timeline: scroll(self inline); }
  @keyframes edge { from { --edge: 56px; } 92% { --edge: 56px; } to { --edge: 0px; } }
}

@media (prefers-reduced-motion: no-preference) {
  .card img { transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
  .card:hover img { transform: translateY(-6px) rotate(-.6deg); }
}
@media (max-width: 820px) {
  .head h1 { font-size: clamp(26px, 7.4vw, 36px); filter: url(#hand); }
  .hero img { aspect-ratio: 4 / 3; }
  .timeline { grid-template-columns: 4.6em 1fr; }
}
