/* Sane House Media v2 — the Journal: index, about teaser and story pages. */

/* ---------- index ---------- */
.jhead { background: var(--paper); }
.jmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: .78rem; font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; }
.jmeta__cat { color: var(--rec-ink); }
.jmeta > * + *::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; margin-right: 14px; vertical-align: middle; }
.jlead { padding: 0 var(--gut) clamp(48px, 6vw, 88px); background: var(--paper); }
.jcard__link { display: grid; gap: 18px; text-decoration: none; color: inherit; }
.jcard__img { overflow: hidden; border-radius: 12px; aspect-ratio: 3 / 2; background: var(--cyc); }
.jcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out); }
.jcard__text { display: grid; gap: 10px; align-content: start; }
.jcard h3 { font-size: var(--step-1); font-weight: 800; line-height: 1.15; text-wrap: balance; transition: color 200ms ease; }
.jcard p:not(.jmeta) { color: var(--muted); max-width: 52ch; }
.jcard__more { font-weight: 700; font-size: var(--step--1); border-bottom: 2px solid var(--rec); justify-self: start; padding-bottom: 2px; }
@media (hover: hover) { .jcard__link:hover .jcard__img img { transform: scale(1.05); } .jcard__link:hover h3 { color: var(--rec-ink); } }
.jcard__link:focus-visible { outline: 2px solid var(--rec); outline-offset: 6px; border-radius: 12px; }
.jcard--lead .jcard__link { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.jcard--lead .jcard__img { aspect-ratio: 16 / 10; }
.jcard--lead h3 { font-size: clamp(2.2rem, 1.2rem + 2.6vw, 4rem); font-variation-settings: "wdth" 62; font-stretch: 62%; line-height: .95; }
.jcard--lead p:not(.jmeta) { font-size: var(--step-1); line-height: 1.4; }
.jlist { padding: clamp(56px, 7vw, 100px) var(--gut); background: var(--cyc); }
.jfilter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(28px, 4vw, 48px); }
.jfilter button { font: inherit; font-weight: 700; font-size: var(--step--1); min-height: 44px; padding: .6em 1.15em; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; transition: background 200ms ease, color 200ms ease, transform 160ms var(--ease-out); }
.jfilter button:active { transform: scale(.96); }
.jfilter button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.jgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 4vw, 56px) clamp(20px, 2.4vw, 36px); }
.jmap { background: var(--paper); }
.jstops { display: grid; align-content: center; counter-reset: stop; }
.jstops a { display: grid; grid-template-columns: 34px 110px 1fr; gap: 12px; align-items: baseline; padding: 14px 10px; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 650; border-radius: 8px; transition: background 200ms ease; }
.jstops a::before { counter-increment: stop; content: counter(stop, decimal-leading-zero); font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.jstops a span { color: var(--rec-ink); font-weight: 800; }
.jstops a:hover, .jstops a.is-active, .jstops a:focus-visible { background: var(--cyc); }
.jsub { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 72px); align-items: end; padding: clamp(64px, 8vw, 120px) var(--gut); background: var(--slate); color: var(--on-slate); }
.jsub p { margin-top: 14px; color: var(--on-slate-muted); max-width: 44ch; }
.jsub__form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.jsub__form .btn { min-height: 52px; }
.jsub .jsub__note { grid-column: 1 / -1; font-size: .8rem; margin-top: 0; }
.jteaser { padding: clamp(80px, 10vw, 140px) var(--gut); background: var(--cyc); display: grid; gap: clamp(28px, 4vw, 48px); justify-items: start; }
.jteaser .jgrid { width: 100%; }

/* ---------- a story ---------- */
.readbar { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 110; pointer-events: none; }
.readbar i { position: absolute; inset: 0; background: var(--rec); transform-origin: left; transform: scaleX(0); }
.readtime { position: fixed; right: var(--gut); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 60; pointer-events: none; opacity: 0; transform: translateY(8px); transition: opacity 250ms ease, transform 250ms var(--ease-out); }
.readtime.is-on { opacity: 1; transform: none; }
.readtime span { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: var(--paper); font-size: .75rem; font-weight: 700; padding: 7px 12px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.readtime span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rec); animation: blink 1.2s steps(1, end) infinite; }
.post { background: var(--paper); }
.post__hero { position: relative; height: 92svh; min-height: 560px; overflow: hidden; background: var(--slate); color: #fff; }
.post__cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 17, 22, .5) 0%, rgba(14, 17, 22, .05) 35%, rgba(14, 17, 22, .85) 100%); }
.post__head { position: absolute; left: var(--gut); right: var(--gut); bottom: clamp(36px, 7vh, 80px); display: grid; gap: 16px; max-width: 1100px; justify-items: start; }
.post__head .jmeta, .post__head .jmeta__cat { color: rgba(255, 255, 255, .85); }
.post__back { font-weight: 700; font-size: var(--step--1); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.post__back::before { content: ""; width: 18px; height: 2px; background: var(--rec); }
.post__title { font-size: clamp(2.6rem, 1.4rem + 5vw, 6.4rem); font-weight: 800; font-variation-settings: "wdth" 62; font-stretch: 62%; line-height: .95; text-wrap: balance; max-width: 18ch; }
.post__dek { font-size: var(--step-1); line-height: 1.4; max-width: 46ch; color: rgba(255, 255, 255, .88); }
.post__credit { max-width: calc(68ch + 2 * var(--gut)); margin: 14px auto 0; padding: 0 var(--gut); font-size: .8rem; color: var(--muted); }
.post__body { max-width: calc(68ch + 2 * var(--gut)); margin: 0 auto; padding: clamp(40px, 6vw, 80px) var(--gut) 0; display: grid; gap: 1.4em; font-size: clamp(1.06rem, 1rem + .3vw, 1.22rem); line-height: 1.72; }
.post__body p { text-wrap: pretty; }
.post__first::first-letter { float: left; font-size: 4.6em; line-height: .82; font-weight: 800; font-variation-settings: "wdth" 62; font-stretch: 62%; color: var(--rec); margin: .06em .1em 0 0; }
.post__body h2 { font-size: var(--step-2); font-weight: 800; font-variation-settings: "wdth" 75; font-stretch: 75%; line-height: 1.1; margin-top: .6em; }
.post__body blockquote { border-left: 3px solid var(--rec); padding-left: 1em; font-size: 1.2em; font-weight: 600; }
.post__fig { margin: 1.2em calc(-1 * min(14vw, 200px)); display: grid; gap: 10px; }
.post__fig img { width: 100%; border-radius: 10px; }
.post__fig figcaption { font-size: .82rem; line-height: 1.5; color: var(--muted); padding: 0 4px; max-width: 70ch; }
.post__foot { max-width: calc(68ch + 2 * var(--gut)); margin: 48px auto 0; padding: 22px var(--gut) 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid var(--line); }
.post__sign { font-weight: 800; font-variation-settings: "wdth" 75; font-stretch: 75%; font-size: var(--step-1); }
.post__nav { max-width: 1100px; margin: clamp(48px, 6vw, 80px) auto 0; padding: 0 var(--gut); display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.post__pn { display: grid; gap: 6px; padding: 22px; border-radius: 12px; background: var(--cyc); text-decoration: none; transition: background 200ms ease, color 200ms ease, transform 160ms var(--ease-out); }
.post__pn:active { transform: scale(.98); }
.post__pn span { font-size: .78rem; color: var(--muted); font-weight: 650; }
.post__pn b { font-size: var(--step-1); line-height: 1.2; }
.post__pn--next { grid-column: 2; text-align: right; }
@media (hover: hover) { .post__pn:hover { background: var(--ink); color: var(--paper); } .post__pn:hover span { color: var(--on-slate-muted); } }
.post__all { text-align: center; padding: 36px 0 clamp(64px, 8vw, 110px); }

@media (max-width: 1000px) {
  .jgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jcard--lead .jcard__link, .jsub { grid-template-columns: minmax(0, 1fr); }
  .jcard--lead h3 { font-size: var(--step-2); }
  .post__fig { margin-inline: 0; }
}
@media (max-width: 640px) {
  .jgrid { grid-template-columns: minmax(0, 1fr); }
  .jsub__form { grid-template-columns: minmax(0, 1fr); }
  .jstops a { grid-template-columns: 28px 84px 1fr; padding: 12px 4px; }
  .post__nav { grid-template-columns: minmax(0, 1fr); }
  .post__pn--next { grid-column: auto; text-align: left; }
  .post__foot { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .readtime span::before { animation: none; } }
.jpager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: clamp(40px, 5vw, 64px); }
.jpager button { font: inherit; font-weight: 700; font-size: var(--step--1); min-width: 44px; min-height: 44px; padding: .5em 1em; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
.jpager button[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.jpager button:disabled { opacity: .35; cursor: default; }
.jpager button:not(:disabled):not([aria-current]):hover { border-color: var(--rec); color: var(--rec); }
