/* The Weather Journal stylesheet, born in the 2026-08-20 redesign.
   Everything the hub and the update posts need beyond style.css.
   UNIFICATION DEBT (2026-08-20): the bottom bar + sheet below are the
   THIRD hand-rolled copy of the mobile shell (app, school, journal). The
   z-order law is copied from the school's 2026-08-19 trap fix: the sheet
   sits UNDER the bar (1300 vs 1400) so the Menu button that opened it can
   always close it. When the shells unify, this block and
   weather-school/school.css merge into one shared file. */

.st-wrap { max-width: 920px; margin: 0 auto; padding: 0 2px; }
.st-wrap .card { margin-bottom: 14px; }
.st-title { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.5px; line-height: 1.2; margin: 0 0 4px; }
.st-sub { color: var(--muted); margin: 0; line-height: 1.5; font-size: 0.88rem; }
.st-home { display: inline-block; margin-top: 4px; padding: 4px 0; color: var(--accent-ink); font-weight: 700; text-decoration: none; border-bottom: 1.5px solid var(--accent); }
.jl-back-row { display: flex; gap: 18px; flex-wrap: wrap; margin: 4px 0 0; }
.jf-kicker { display: block; font-size: 0.7rem; font-weight: 750; letter-spacing: 1.2px; color: var(--accent-ink); margin-bottom: 6px; }

/* masthead: the editor himself is the byline */
.jl-eyebrow { font-size: 0.7rem; font-weight: 750; letter-spacing: 1.6px; color: var(--accent-ink); margin: 0 0 8px; }
.jl-masthead { display: flex; align-items: center; gap: 18px; }
.jl-mast-art { width: 112px; height: 112px; flex: 0 0 auto; object-fit: contain; }
@media (max-width: 520px) { .jl-mast-art { width: 84px; height: 84px; } }
.jl-mast-row { display: flex; align-items: flex-start; gap: 14px; }
.jl-mast-eyes { display: inline-flex; gap: 6px; flex: 0 0 auto; margin-top: 6px; }
.jl-mast-eyes span { width: 22px; height: 22px; border-radius: 50%; background: #fff; position: relative;
  box-shadow: inset 0 0 0 2.5px #767d85; }
.jl-mast-eyes span::after { content: ""; position: absolute; top: 55%; left: 38%; width: 8px; height: 8px;
  border-radius: 50%; background: #111; }
.jl-mast-eyes span:last-child::after { left: 48%; top: 48%; }

/* chip row: one line, thumb-scrollable, never wraps */
.jl-chipbar { padding: 10px 12px; }
.jl-chips { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; }
.jl-chips::-webkit-scrollbar { display: none; }
.jl-chips .chip { flex: 0 0 auto; white-space: nowrap; }

/* the latest rail: native x-only snap, next-card peek, no autoplay ever.
   No content-visibility in here on purpose: horizontally offscreen slides
   would paint-flash mid-swipe (the 2026-08-19 white-flash lesson). */
.jl-latest { margin-bottom: 14px; }
.jl-rail { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.jl-rail::-webkit-scrollbar { display: none; }
.jl-slide { flex: 0 0 78%; max-width: 420px; scroll-snap-align: start; display: flex; flex-direction: column;
  justify-content: flex-end; gap: 4px; min-height: 190px; padding: 16px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--panel); text-decoration: none; color: inherit;
  position: relative; overflow: hidden; }
@media (min-width: 700px) { .jl-slide { flex-basis: 320px; } }
.jl-slide-title { font-size: 1.12rem; font-weight: 780; line-height: 1.25; letter-spacing: -0.3px; }
.jl-slide-hook { font-size: 0.82rem; color: var(--muted); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.jl-slide-eyes { position: absolute; top: 14px; right: 14px; display: inline-flex; gap: 4px; opacity: 0.5; }
.jl-slide-eyes span { width: 12px; height: 12px; border-radius: 50%; background: #fff;
  box-shadow: inset 0 0 0 1.5px #767d85; position: relative; }
.jl-slide-eyes span::after { content: ""; position: absolute; top: 50%; left: 40%; width: 5px; height: 5px;
  border-radius: 50%; background: #111; }
/* wing tints: enough to tell the lanes apart, not enough to shout */
.jl-slide[data-wing="explainers"] { background: linear-gradient(160deg, rgba(95, 176, 236, 0.14), var(--panel) 60%); }
.jl-slide[data-wing="updates"] { background: linear-gradient(160deg, rgba(255, 207, 92, 0.14), var(--panel) 60%); }
.jl-slide[data-wing="tales"] { background: linear-gradient(160deg, rgba(186, 130, 255, 0.13), var(--panel) 60%); }
.jl-slide[data-wing="field"] { background: linear-gradient(160deg, rgba(120, 220, 160, 0.13), var(--panel) 60%); }
.jl-slide-art { padding: 0; justify-content: flex-end; }
.jl-slide-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.jl-slide-art .jl-slide-text { position: relative; padding: 14px;
  background: linear-gradient(transparent, rgba(10, 12, 16, 0.82) 45%); border-radius: 0 0 16px 16px; }
.jl-slide-art .jl-slide-title { color: #fff; }
.jl-slide:hover .jl-slide-title, .jl-slide:focus .jl-slide-title { text-decoration: underline; text-decoration-color: var(--accent); }

/* the feed: one lane, newest first. Offscreen cards may skip rendering;
   the reservation keeps the scrollbar honest. */
.jl-item { display: block; text-decoration: none; color: inherit; padding: 14px 16px;
  content-visibility: auto; contain-intrinsic-size: auto 118px; }
.jl-item-meta { display: block; font-size: 0.68rem; font-weight: 750; letter-spacing: 1.1px;
  color: var(--accent-ink); margin-bottom: 4px; }
.jl-item-title { display: block; font-size: 1.02rem; font-weight: 760; line-height: 1.3;
  letter-spacing: -0.2px; margin-bottom: 4px; }
.jl-item-hook { display: block; font-size: 0.84rem; color: var(--muted); line-height: 1.5; }
.jl-item:hover .jl-item-title, .jl-item:focus .jl-item-title { text-decoration: underline; text-decoration-color: var(--accent); }
.jl-item-pinned { border-color: var(--accent); }
.jl-item-empty { font-style: italic; }
.jl-feed [hidden], .jl-latest[hidden], .st-wrap [hidden] { display: none !important; }

/* update post pages */
.jl-article .jl-p { line-height: 1.65; margin: 0 0 14px; }
.jl-article .st-title { margin-bottom: 14px; }
.jl-back-top { font-size: 0.82rem; font-weight: 700; color: var(--accent-ink); text-decoration: none;
  border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 13px; white-space: nowrap; }

/* subscribe strip (ported from the old hub) */
.sub-form { margin: 0; }
.sub-head { font-size: 0.78rem; font-weight: 750; letter-spacing: 1.2px; text-transform: uppercase; margin: 0 0 8px; }
.sub-row { display: flex; gap: 8px; flex-wrap: wrap; }
.sub-row input { flex: 1 1 220px; font-size: 16px; padding: 10px 12px; border-radius: 10px;
  border: 1.5px solid rgba(128,136,150,0.4); background: transparent; color: inherit; }
.sub-row input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.sub-row button { font-size: 16px; font-weight: 750; padding: 10px 18px; border-radius: 10px;
  border: none; background: var(--accent); color: #1c1f25; cursor: pointer; }
.sub-row button:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.sub-row button[disabled] { opacity: 0.6; cursor: default; }
#subHp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sub-note { font-size: 0.78rem; color: var(--muted); margin: 8px 0 0; line-height: 1.5; }
.sub-note a { color: var(--accent-ink); font-weight: 650; text-decoration: none; border-bottom: 1.5px solid var(--accent); }

/* ---------- mobile shell (see UNIFICATION DEBT note up top) ---------- */
@media (max-width: 899px) {
  .jl-back-top { display: none; }
  body { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .jl-mbar { display: flex; align-items: center; justify-content: space-between; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1400;
    padding: 11px 14px calc(11px + env(safe-area-inset-bottom, 0px));
    background: var(--panel); border-top: 1px solid var(--line); }
  .jl-mbar .mbar-home { display: flex; align-items: center; gap: 7px; text-decoration: none; color: inherit;
    font-weight: 750; font-size: 0.84rem; }
  .jl-mbar .mbar-home-eyes { display: inline-flex; gap: 3px; }
  .jl-mbar .mbar-home-eyes span { width: 9px; height: 9px; border-radius: 50%; background: var(--text);
    box-shadow: inset 0 0 0 2px var(--panel); }
  .jl-mbar .mbar-mid { flex: 1 1 auto; text-align: center; }
  .jl-mbar .mbar-title { font-weight: 800; font-size: 0.95rem; }
  .jl-mbar .mbar-menu { display: flex; align-items: center; gap: 6px; background: none; border: none;
    color: inherit; font: inherit; font-size: 0.84rem; font-weight: 750; cursor: pointer; padding: 6px 2px; }
  /* sheet UNDER the bar, always: the button that opened it must stay
     tappable to close it (the school trap, 2026-08-19, never again) */
  .jl-launcher { position: fixed; inset: 0; z-index: 1300; display: none; flex-direction: column; gap: 14px;
    padding: calc(20px + env(safe-area-inset-top, 0px)) 16px calc(96px + env(safe-area-inset-bottom, 0px));
    background: var(--bg); overflow-y: auto; overscroll-behavior: contain; }
  .jl-launcher.open { display: flex; }
  body.jl-launcher-open { overflow: hidden; }
  .jl-sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .jl-sheet-grid .gp-tile { display: flex; align-items: center; justify-content: center; padding: 18px 12px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 14px; text-decoration: none;
    color: inherit; font-weight: 750; }
  .jl-sheet-grid .gp-tile.current { border-color: var(--accent); }
  .launcher-head { display: flex; align-items: center; justify-content: space-between; }
  .launcher-title { font-weight: 700; font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
  .launcher-eyes { display: inline-flex; gap: 4px; }
  .launcher-eyes span { width: 12px; height: 12px; border-radius: 50%; background: #fff;
    box-shadow: inset 0 0 0 2px #767d85; }
  .launcher-close { background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px;
    color: var(--text); font-family: inherit; font-weight: 700; font-size: 0.85rem;
    padding: 7px 15px; cursor: pointer; }
}
@media (min-width: 900px) { .jl-mbar, .jl-launcher { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
  .jl-rail { scroll-behavior: auto; }
}


/* ---------- the front page grid (Joe: Google News, not an afterthought) ---------- */
.jl-strip { display: none; }
@media (min-width: 900px) {
  .jl-strip { display: flex; max-width: 1160px; margin: 0 auto 16px; padding: 0 14px; }
  .jl-strip .tab { text-decoration: none; white-space: nowrap; }
  .topbar, .st-wrap { max-width: 1160px; margin-left: auto; margin-right: auto; }
  .st-wrap { padding: 0 14px; }
  .jl-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
  .jl-aside { position: sticky; top: 14px; display: flex; flex-direction: column; }
  .jl-aside .card { margin-bottom: 14px; }
  /* the feed goes two-up like a news front; the newest story leads full-width */
  .jl-feed { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .jl-feed .card { margin-bottom: 0; }
  .jl-item-pinned, .jl-feed .jl-item-lead { grid-column: 1 / -1; }
  .jl-feed .jl-item-lead .jl-item-title { font-size: 1.35rem; }
}

/* real photos, real credit (NOAA/NASA public domain, licenses verified) */
.jl-slide-credit { position: absolute; right: 10px; bottom: 8px; font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.4px; color: rgba(255, 255, 255, 0.75); }
.jl-item-hasart { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 12px; align-items: center; }
.jl-item-thumb { width: 96px; height: 72px; object-fit: cover; border-radius: 10px; }
.jl-item-credit { display: block; font-size: 0.62rem; color: var(--muted); margin-top: 4px; letter-spacing: 0.3px; }

/* ---------- news-panel density (Joe: Google News, not marshmallows) ---------- */
.jl-panel-h { font-size: 0.98rem; font-weight: 800; margin: 2px 2px 4px; }
.jl-feed.card { padding: 14px 16px; }
.jl-row { display: block; text-decoration: none; color: inherit; padding: 12px 2px;
  border-top: 1px solid rgba(128, 136, 150, 0.16);
  content-visibility: auto; contain-intrinsic-size: auto 96px; }
.jl-row:first-of-type { border-top: none; }
.jl-row .jl-item-meta { margin-bottom: 2px; }
.jl-row .jl-item-title { margin-bottom: 2px; }
.jl-row .jl-item-hook { font-size: 0.82rem; }
.jl-row-by { display: block; font-size: 0.7rem; color: var(--muted); margin-top: 4px; }
.jl-row:hover .jl-item-title, .jl-row:focus .jl-item-title { text-decoration: underline; text-decoration-color: var(--accent); }
.jl-row-hasart { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 12px; align-items: center; }
.jl-row-thumb { width: 96px; height: 72px; object-fit: cover; border-radius: 10px; }
.jl-row-pinned .jl-item-meta { color: var(--accent-ink); }
.jl-row-empty { font-style: italic; }
.jl-row-lead .jl-item-title { font-size: 1.2rem; }

/* the rock's weather chip: the forecast follows you into the paper */
.jl-wx { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; padding: 12px 14px; }
.jl-wx-eyes { display: inline-flex; gap: 4px; }
.jl-wx-eyes span { width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: inset 0 0 0 2px #767d85; position: relative; }
.jl-wx-eyes span::after { content: ""; position: absolute; top: 50%; left: 40%; width: 6px; height: 6px;
  border-radius: 50%; background: #111; }
.jl-wx-read { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.jl-wx-temp { font-weight: 800; font-size: 1.15rem; }
.jl-wx-place { font-size: 0.74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jl-wx-go { margin-left: auto; font-size: 0.76rem; font-weight: 700; color: var(--accent-ink);
  border-bottom: 1.5px solid var(--accent); white-space: nowrap; }

/* desktop: the rail becomes a Google-style top cluster: lead photo left,
   headline stack right; the phone keeps the swipe rail untouched */
@media (min-width: 900px) {
  .jl-rail { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); gap: 0 18px;
    overflow: visible; padding: 0; scroll-snap-type: none; }
  .jl-latest { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 14px 16px; margin-bottom: 14px; }
  .jl-rail .jl-slide { max-width: none; border: none; border-radius: 12px; }
  .jl-rail .jl-slide:first-child { grid-row: 1 / span 4; min-height: 300px; }
  .jl-rail .jl-slide:not(:first-child) { background: none; min-height: 0; padding: 10px 2px;
    border-top: 1px solid rgba(128, 136, 150, 0.16); border-radius: 0; justify-content: flex-start; }
  .jl-rail .jl-slide:nth-child(2) { border-top: none; }
  .jl-rail .jl-slide:not(:first-child) .jl-slide-hook { -webkit-line-clamp: 2; }
  .jl-rail .jl-slide:not(:first-child) .jl-slide-eyes { display: none; }
}

/* the chip wears the Editor, not bare eyeballs (Joe, 2026-08-20) */
.jl-wx-face { width: 44px; height: 44px; object-fit: contain; flex: 0 0 auto; }

/* desktop cluster: the headline stack is text only; art belongs to the
   lead card (art slides keep their photos on the mobile rail) */
@media (min-width: 900px) {
  .jl-rail .jl-slide:not(:first-child) img { display: none; }
  .jl-rail .jl-slide.jl-slide-art:not(:first-child) { padding: 10px 2px; }
  .jl-rail .jl-slide:not(:first-child) .jl-slide-text { position: static; padding: 0; background: none; }
  .jl-rail .jl-slide:not(:first-child) .jl-slide-title { color: inherit; }
  .jl-rail .jl-slide:not(:first-child) .jl-slide-credit { display: none; }
}

/* Rock Bottom rides the receipts wing */
.jl-slide[data-wing="receipts"] { background: linear-gradient(160deg, rgba(236, 110, 95, 0.14), var(--panel) 60%); }

/* ---------- article layer (2026-08-20 design research spec) ----------
   The measure is the medicine: 680px at 1.06rem lands ~72 characters a
   line (the old 720px ran ~88). Header anatomy: kicker, headline, dek
   (the hook, promoted), byline row with the Editor's face, plain-text
   reading time. Rock Bottom's versus cards and METAR receipts graduate
   to house styles here so every future week inherits them. */
.jl-article { max-width: 680px; }
.jl-article .jl-p, .jl-article .rb-why { font-size: 1.06rem; line-height: 1.7; }
.jl-dek { font-size: 1.08rem; line-height: 1.55; color: var(--muted); margin: 6px 0 14px; }
.jl-byline { display: flex; align-items: center; gap: 10px; padding: 10px 0 14px;
  border-bottom: 1px solid rgba(128, 136, 150, 0.2); margin-bottom: 16px; }
.jl-byline img { width: 40px; height: 40px; object-fit: contain; }
.jl-byline-who { font-size: 0.86rem; font-weight: 750; }
.jl-byline-meta { display: block; font-size: 0.74rem; color: var(--muted); font-weight: 500; }

/* the box score: the week at a glance before the stories */
.rb-board { width: 100%; border-collapse: collapse; margin: 4px 0 6px;
  font-variant-numeric: tabular-nums; font-size: 0.86rem; }
.rb-board th { font-size: 0.66rem; font-weight: 750; letter-spacing: 1px; color: var(--muted);
  text-align: left; padding: 6px 8px 6px 0; border-bottom: 1px solid rgba(128, 136, 150, 0.3); }
.rb-board td { padding: 8px 8px 8px 0; border-bottom: 1px solid rgba(128, 136, 150, 0.14);
  vertical-align: top; }
.rb-board .rb-no { color: var(--accent); font-weight: 800; }
.rb-board .rb-miss { font-weight: 750; white-space: nowrap; }
.rb-board-note { font-size: 0.7rem; color: var(--muted); margin: 6px 0 0; }

/* Rock Bottom house styles (promoted from the week 33 page) */
.rb-item { border-top: 1px solid rgba(128, 136, 150, 0.2); padding: 20px 0 8px; margin-top: 8px; }
.rb-rank { font-size: 2rem; font-weight: 800; color: var(--accent); line-height: 1; }
.rb-place { font-size: 1.15rem; font-weight: 780; margin: 4px 0 10px; }
.rb-vs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 10px; }
@media (max-width: 480px) { .rb-vs { grid-template-columns: 1fr; } }
.rb-vs > div { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.rb-vs .lbl { display: block; font-size: 0.66rem; font-weight: 750; letter-spacing: 1px; color: var(--muted); margin-bottom: 3px; }
.rb-vs .val { font-weight: 750; font-size: 0.95rem; line-height: 1.35; }
.rb-why { margin: 0 0 8px; }
.rb-burn { line-height: 1.5; margin: 0 0 10px; color: var(--muted); font-style: italic; }
.rb-metar { font-family: ui-monospace, Menlo, monospace; font-size: 0.68rem; color: var(--muted);
  background: var(--panel-2); border-radius: 8px; padding: 8px 10px; overflow-x: auto; white-space: pre; }
.rb-note { font-size: 0.8rem; color: var(--muted); line-height: 1.55; }

/* no dead ends: every article exits into more of the paper */
.jl-more { margin-top: 20px; border-top: 1px solid rgba(128, 136, 150, 0.2); padding-top: 14px; }
.jl-more-h { font-size: 0.78rem; font-weight: 750; letter-spacing: 1.2px; text-transform: uppercase; margin: 0 0 10px; }
.jl-more-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 700px) { .jl-more-grid { grid-template-columns: 1fr 1fr 1fr; } }
.jl-more-card { display: block; text-decoration: none; color: inherit; background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.jl-more-card img { width: 100%; height: 110px; object-fit: cover; display: block; }
.jl-more-body { padding: 10px 12px 12px; }
.jl-more-kicker { display: block; font-size: 0.64rem; font-weight: 750; letter-spacing: 1px;
  color: var(--accent-ink); margin-bottom: 3px; }
.jl-more-title { display: block; font-size: 0.92rem; font-weight: 760; line-height: 1.3; }
.jl-more-card:hover .jl-more-title, .jl-more-card:focus .jl-more-title { text-decoration: underline; text-decoration-color: var(--accent); }
.jl-next-note { font-size: 0.8rem; color: var(--muted); margin-top: 12px; }

/* figures inside a Beat body (2026-09-06) */
.beat-fig { margin: 22px 0; }
.beat-fig img { display: block; width: 100%; max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line, #dde3ec); }
.beat-fig figcaption { margin-top: 8px; font-size: 0.86rem; color: var(--muted, #5b6472); line-height: 1.5; }
