/* TesCam Today magazine (tescamstudio.com/news). Sits on site.css and uses
   the site's own type: the rounded display face (--rounded, SF Pro Rounded
   on Apple devices, Inter elsewhere) at 800 for the nameplate and
   headlines, Inter for everything else, and the site's 24px cards.

   Layout: one reading column on phones. From 1000px the edition's contents
   move into a sticky sidebar beside the column. */
.news-wrap {
  --ink: rgba(255,255,255,.80);
  --r: 20px;
  --hair: rgba(255,255,255,.10);
  --panel: rgba(255,255,255,.035);
  --gold: #f0c15c; --link: #7aa7ff;
  --c: #9a9aa5; /* the story's category colour, set per story */
  max-width: 1160px; margin: 0 auto; padding: 0 24px 96px;
  color: var(--t1); font-size: 16px; line-height: 1.5;
}
.news-wrap a { color: var(--link); }
.news-wrap h1, .news-wrap h2, .news-wrap h3, .news-wrap h4 { font-weight: inherit; }

/* ─── Masthead ─────────────────────────────────────────────────────────── */
.news-wrap .mast { text-align: center; padding: 40px 0 28px; border-bottom: 1px solid var(--stroke); }
.news-wrap .mast h1 { font-family: var(--rounded); font-weight: 800; font-size: clamp(3rem, 9vw, 5.4rem); line-height: 1; letter-spacing: -0.035em; margin: 0 0 10px; padding-bottom: .06em;
  background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,.62) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.news-wrap .mast .motto { font-size: clamp(1rem, 1.6vw, 1.2rem); color: var(--t2); }
.news-wrap .folio { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 16px; margin-top: 20px; font-size: .9rem; color: var(--t2); }
.news-wrap .folio .ed { font-weight: 600; color: var(--t1); font-variant-numeric: tabular-nums; }
.news-wrap .folio .pill { font-variant-numeric: tabular-nums; }
.news-wrap .folio .pill time { letter-spacing: .6px; }
/* Phones: the nav already carries the brand, so the masthead stays short and
   the first story starts on the first screen. */
@media (max-width: 640px) {
  .news-wrap .mast { padding: 18px 0 16px; }
  .news-wrap .mast h1 { font-size: 2.6rem; margin-bottom: 4px; }
  .news-wrap .mast .motto { font-size: .95rem; }
  .news-wrap .folio { margin-top: 10px; gap: 6px 10px; font-size: .82rem; }
  .news-wrap .folio .pill { padding: 4px 10px; font-size: .66rem; }
}

/* ─── Page grid ────────────────────────────────────────────────────────── */
.news-wrap .paper { display: block; margin-top: 30px; }
@media (max-width: 640px) { .news-wrap .paper { margin-top: 18px; } }
.news-wrap .col { min-width: 0; }
.news-wrap .rail { display: none; }
@media (min-width: 1000px) {
  .news-wrap .paper { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; align-items: start; margin-top: 40px; }
  .news-wrap .col { max-width: 740px; }
  .news-wrap .rail { display: block; position: sticky; top: calc(var(--nav-h) + 24px); max-height: calc(100vh - var(--nav-h) - 48px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
  .news-wrap .toc-inline, .news-wrap .app.app-inline { display: none; }
}

/* ─── Labels ───────────────────────────────────────────────────────────── */
.news-wrap .label { font-size: .72rem; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--t2); }
.news-wrap .cat { display: inline-flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--c); }
.news-wrap .cat::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.news-wrap .chip { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: .65rem; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; background: rgba(240,193,92,.14); color: var(--gold); }

/* ─── Stories ──────────────────────────────────────────────────────────── */
.news-wrap .story { margin: 0 0 24px; background: var(--card); border: 1px solid var(--stroke); border-radius: 24px; overflow: hidden; }
.news-wrap .story .in { padding: 26px 30px 24px; }
@media (max-width: 640px) { .news-wrap .story { margin-bottom: 16px; border-radius: 20px; } .news-wrap .story .in { padding: 18px 18px 16px; } }
.news-wrap .story .meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; min-height: 30px; }
.news-wrap .story .no { font-size: .8rem; font-weight: 700; color: var(--t3); font-variant-numeric: tabular-nums; }
.news-wrap .share { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 99px; background: var(--card-2); border: 1px solid var(--stroke-2); font-size: .8rem; font-weight: 600; color: var(--t2); transition: color .15s, border-color .15s, background .15s; }
.news-wrap .share:hover { color: var(--t1); border-color: rgba(255,255,255,.3); background: var(--card-2); }
.news-wrap .share svg { width: 13px; height: 13px; }
.news-wrap .story h2 { font-family: var(--rounded); font-weight: 800; font-size: clamp(1.6rem, 3.6vw, 2.15rem); line-height: 1.1; letter-spacing: -0.025em; margin: 12px 0 12px; color: #fff; text-wrap: balance; }
.news-wrap .story.opener h2 { font-size: clamp(2.1rem, 5vw, 3.1rem); line-height: 1.05; letter-spacing: -0.03em; margin-top: 14px;
  background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,.7) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.news-wrap .story h2 a { color: inherit; text-decoration: none; }
.news-wrap .dek { font-size: 1.1rem; line-height: 1.55; color: var(--t2); margin: 0 0 24px; text-wrap: pretty; }
.news-wrap .story.opener .dek { font-size: clamp(1.1rem, 1.6vw, 1.25rem); }
.news-wrap figure { position: relative; margin: 0 0 26px; }
.news-wrap .story > figure { margin: 0; }
.news-wrap .story > figure img { border-radius: 0; border: 0; }
.news-wrap figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r); border: 1px solid var(--stroke); background: #111; }
/* Picture credit sits on the picture, bottom right. */
.news-wrap figcaption { position: absolute; right: 10px; bottom: 10px; max-width: calc(100% - 20px); padding: 3px 10px; border-radius: 99px; background: rgba(0,0,0,.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 11px; color: rgba(255,255,255,.82); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news-wrap figcaption a { color: inherit; text-decoration: none; }
.news-wrap figcaption a:hover { text-decoration: underline; }
.news-wrap .body { font-size: 1.08rem; line-height: 1.75; color: var(--ink); }
.news-wrap .body p { margin: 0 0 1.1em; }
.news-wrap .body b { color: #fff; font-weight: 600; }
.news-wrap .body a { text-decoration-thickness: 1px; text-underline-offset: 3px; }

.news-wrap .why { margin: 28px 0; padding: 20px 22px; border-radius: var(--r); background: var(--panel); background: color-mix(in srgb, var(--c) 9%, transparent); border: 1px solid color-mix(in srgb, var(--c) 22%, transparent); }
.news-wrap .why h4 { font-size: .72rem; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--c); margin-bottom: 6px; }
.news-wrap .why p { font-size: 1rem; line-height: 1.6; color: var(--t1); }

.news-wrap blockquote { margin: 30px 0; padding: 2px 0 2px 22px; border-left: 3px solid var(--c); }
.news-wrap blockquote p { font-family: var(--rounded); font-weight: 700; font-size: clamp(1.25rem, 2.4vw, 1.5rem); line-height: 1.35; letter-spacing: -0.015em; color: #fff; text-wrap: pretty; }
.news-wrap blockquote cite { display: block; margin-top: 10px; font-style: normal; font-size: .85rem; color: var(--t2); }

.news-wrap .facts { margin: 28px 0; padding: 20px 22px 12px; border-radius: var(--r); background: var(--card); border: 1px solid var(--stroke); }
.news-wrap .facts h4 { margin-bottom: 4px; }
.news-wrap .facts ul { list-style: none; }
.news-wrap .facts li { position: relative; padding: 10px 0 10px 20px; font-size: .95rem; line-height: 1.55; color: var(--t1); border-top: 1px solid var(--stroke); }
.news-wrap .facts li:first-child { border-top: 0; }
.news-wrap .facts li::before { content: ""; position: absolute; left: 2px; top: 19px; width: 6px; height: 6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.news-wrap sup { line-height: 0; }
.news-wrap sup + sup::before { content: ","; font-size: 10px; color: var(--t3); }
.news-wrap sup a { font-size: 10px; font-weight: 700; color: var(--t3); text-decoration: none; margin-left: 2px; }
.news-wrap sup a:hover { color: var(--link); }

.news-wrap .x { display: block; margin: 12px 0; padding: 16px 18px; border-radius: var(--r); background: var(--card); border: 1px solid var(--stroke); color: var(--t1); text-decoration: none; font-size: 15px; line-height: 1.5; transition: border-color .15s; }
.news-wrap .x:hover { border-color: var(--stroke-2); }
.news-wrap .x .who { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--t2); margin-bottom: 4px; }
.news-wrap .x .who svg { width: 13px; height: 13px; }

.news-wrap .srcs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0 6px; }
.news-wrap .srcs .label { margin-right: 4px; }
.news-wrap .src { display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px 5px 5px; border-radius: 99px; background: var(--card-2); border: 1px solid var(--stroke-2); font-size: .8rem; font-weight: 500; color: var(--t2); text-decoration: none; transition: color .15s, border-color .15s; }
.news-wrap .src:hover { color: var(--t1); border-color: rgba(255,255,255,.3); }
.news-wrap .src .n { display: grid; place-items: center; min-width: 20px; height: 20px; border-radius: 99px; background: rgba(255,255,255,.08); font-size: 10px; font-weight: 700; color: var(--t2); }

/* ─── Contents (sidebar on wide screens, inline on phones) ─────────────── */
.news-wrap .toc ol { list-style: none; margin-top: 8px; }
.news-wrap .toc li a { display: grid; grid-template-columns: 24px 1fr; gap: 0 8px; padding: 10px 0; border-top: 1px solid var(--hair); color: var(--t1); text-decoration: none; }
.news-wrap .toc li:first-child a { border-top: 0; }
.news-wrap .toc .n { font-size: .85rem; font-weight: 700; line-height: 1.5; color: var(--c); font-variant-numeric: tabular-nums; }
.news-wrap .toc .cat { display: none; }
.news-wrap .toc .h { font-size: .95rem; font-weight: 600; line-height: 1.4; transition: color .15s; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-wrap .toc li a:hover .h { color: var(--link); }
.news-wrap .toc-inline { margin: 0 0 16px; padding: 22px 22px 10px; border-radius: 24px; background: var(--card); border: 1px solid var(--stroke); }
.news-wrap .toc-inline .cat { display: inline-flex; grid-column: 2; font-size: .65rem; margin-bottom: 3px; }
.news-wrap .toc-inline .cat::before { display: none; }
.news-wrap .toc-inline .h { grid-column: 2; font-size: 1rem; }
.news-wrap .toc-inline .n { color: var(--t3); }
.news-wrap .rail .toc li a { padding-left: 10px; box-shadow: inset 2px 0 0 transparent; transition: box-shadow .2s; }
.news-wrap .rail .toc .h { color: var(--t2); }
.news-wrap .rail .toc a.on { box-shadow: inset 2px 0 0 var(--c); }
.news-wrap .rail .toc a.on .h { color: #fff; }
.news-wrap .rail .app { margin-top: 22px; }

/* App card */
.news-wrap .app { display: flex; gap: 14px; align-items: flex-start; padding: 22px; border-radius: 24px; background: var(--card); border: 1px solid var(--stroke); }
.news-wrap .app img { width: 44px; height: 44px; border-radius: 11px; flex: none; }
.news-wrap .app b { display: block; font-family: var(--rounded); font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; color: var(--t1); }
.news-wrap .app p { font-size: .88rem; line-height: 1.5; color: var(--t2); margin: 3px 0 12px; }
.news-wrap .app .btn { color: #fff; }
.news-wrap .app-inline { margin-top: 40px; }

/* ─── More from today: stories 6+ open in place ────────────────────────── */
.news-wrap .more { margin: 8px 0 24px; padding: 22px 26px 8px; background: var(--card); border: 1px solid var(--stroke); border-radius: 24px; }
@media (max-width: 640px) { .news-wrap .more { padding: 18px 18px 6px; border-radius: 20px; } }
.news-wrap .more-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.news-wrap .more-head h3 { font-family: var(--rounded); font-size: clamp(1.6rem, 3.4vw, 2rem); font-weight: 800; letter-spacing: -0.03em; color: #fff; }
.news-wrap .more-all { font-size: 13px; font-weight: 600; color: var(--link); padding: 4px 0; }
.news-wrap .more-story { border-top: 1px solid var(--hair); }
.news-wrap .more-story:first-of-type { border-top: 0; }
.news-wrap .more-story summary { display: flex; align-items: center; gap: 16px; padding: 16px 0; cursor: pointer; list-style: none; }
.news-wrap .more-story summary::-webkit-details-marker { display: none; }
.news-wrap .more-story .thumb { flex: none; width: 96px; aspect-ratio: 4 / 3; border-radius: 14px; background: #111 center / cover no-repeat; }
.news-wrap .more-story .thumb.none { background: linear-gradient(135deg, color-mix(in srgb, var(--c) 40%, #000), #0d0d0f); }
.news-wrap .more-story .t { flex: 1; min-width: 0; }
.news-wrap .more-story .t b { display: block; font-family: var(--rounded); font-size: 1.12rem; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; margin-top: 6px; color: var(--t1); text-wrap: balance; }
.news-wrap .more-story summary:hover .t b { color: #fff; }
.news-wrap .more-story .chev { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--stroke-2); color: var(--t2); transition: transform .2s; }
.news-wrap .more-story .chev svg { width: 12px; height: 12px; }
.news-wrap .more-story[open] .chev { transform: rotate(180deg); }
.news-wrap .more-story .story { margin: 0; background: none; border: 0; border-radius: 0; overflow: visible; }
.news-wrap .more-story .story > figure { margin: 4px 0 0; }
.news-wrap .more-story .story > figure img { border-radius: var(--r); }
.news-wrap .more-story .story .in { padding: 18px 0 22px; }
.news-wrap .more-story .story h2 { font-size: clamp(1.45rem, 3vw, 1.8rem); }
@media (max-width: 640px) {
  .news-wrap .more-story .thumb { width: 76px; }
  .news-wrap .more-story .t b { font-size: 1.02rem; }
}

/* ─── Footer of the edition ────────────────────────────────────────────── */
.news-wrap .end { margin-top: 40px; }
.news-wrap .end .report { font-size: 14px; color: var(--t2); }
.news-wrap .archive { margin-top: 26px; }
.news-wrap .archive ul { list-style: none; margin-top: 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.news-wrap .archive a { display: block; height: 100%; padding: 18px 20px; border-radius: var(--r); background: var(--card); border: 1px solid var(--stroke); text-decoration: none; transition: border-color .15s; }
.news-wrap .archive a:hover { border-color: var(--stroke-2); }
.news-wrap .archive b { display: block; font-family: var(--rounded); font-size: 1rem; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; color: var(--t1); }
.news-wrap .archive span { display: block; margin-top: 6px; font-size: 12px; color: var(--t3); }

/* ─── Odds and ends ────────────────────────────────────────────────────── */
.news-wrap .news-empty { text-align: center; padding: 80px 0; font-family: var(--rounded); font-weight: 700; font-size: 1.4rem; color: var(--t2); }
.news-wrap .news-empty a { display: inline-block; margin-top: 12px; font-family: var(--inter); font-weight: 600; font-size: .95rem; }
.news-wrap .news-stg { margin: 22px 0 0; padding: 10px 16px; border-radius: 12px; background: rgba(240,193,92,.12); color: var(--gold); font-size: 13px; text-align: center; }
/* Shared story (/news/<edition>/<n>): the story leads, then the edition. */
.news-wrap .shared-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; margin: 0 0 28px; padding: 14px 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--stroke); font-size: 13.5px; color: var(--t2); }
.news-wrap .shared-note a { font-weight: 600; text-decoration: none; }
@media (max-width: 640px) { .news-wrap .shared-note { margin-bottom: 18px; padding: 10px 14px; border-radius: 14px; font-size: .8rem; } }
.news-wrap .also { display: flex; align-items: center; gap: 14px; margin: 36px 0 16px; }
.news-wrap .also::after { content: ""; flex: 1; height: 1px; background: var(--stroke-2); }
.news-wrap .toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); padding: 10px 16px; border-radius: 999px; background: rgba(30,30,34,.96); border: 1px solid var(--stroke-2); font-size: 14px; color: var(--t1); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 200; }
.news-wrap .toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 600px) { .news-wrap { padding: 0 16px 72px; } }
