/* ==========================================================================
   The Daily Focus News — stylesheet
   No build step, no external fonts, no external requests of any kind.
   ========================================================================== */

:root {
  --ink:        #10151c;
  --ink-soft:   #46505f;
  --ink-faint:  #6f7a8a;
  --paper:      #ffffff;
  --surface:    #f5f7f9;
  --surface-2:  #eceff3;
  --line:       #dde2e9;
  --line-soft:  #e8ecf1;

  --navy:       #10243f;
  --navy-soft:  #1c3a63;
  --accent:     #b3261e;
  --accent-ink: #8e1d17;

  --focus:      #1c5fd6;

  --radius:     10px;
  --radius-sm:  6px;
  --shadow:     0 1px 2px rgba(16, 21, 28, .06), 0 8px 24px -12px rgba(16, 21, 28, .18);
  --shadow-lg:  0 2px 4px rgba(16, 21, 28, .06), 0 24px 48px -20px rgba(16, 21, 28, .28);

  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
                  Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;

  --wrap: 1200px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:       #e7edf5;
    --ink-soft:  #a5b1c2;
    --ink-faint: #7d8899;
    --paper:     #0e1319;
    --surface:   #151b23;
    --surface-2: #1c242e;
    --line:      #26303c;
    --line-soft: #202932;
    --navy:      #dce6f4;
    --navy-soft: #b8c8de;
    --accent:    #f0564c;
    --accent-ink:#ff7268;
    --focus:     #6fa8ff;
    --shadow:    0 1px 2px rgba(0,0,0,.5), 0 8px 24px -12px rgba(0,0,0,.7);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.5), 0 24px 48px -20px rgba(0,0,0,.8);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: var(--paper);
  padding: 10px 16px; z-index: 100; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------------- masthead */

.topbar {
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
  font-size: 12.5px;
  color: var(--ink-faint);
}
.topbar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 38px;
}
.topbar time { letter-spacing: .04em; text-transform: uppercase; font-weight: 600; }
.topbar .tagline { font-style: italic; }

.masthead {
  text-align: center;
  padding: 26px 20px 20px;
  border-bottom: 3px double var(--line);
}
.masthead__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 6.4vw, 62px);
  line-height: 1;
  letter-spacing: .01em;
  margin: 0;
  color: var(--navy);
}
.masthead__title .focus { color: var(--accent); }
.masthead__rule {
  width: 72px; height: 3px; margin: 14px auto 0;
  background: var(--accent);
}

/* --------------------------------------------------------------------- nav */

.nav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap {
  display: flex; align-items: center; gap: 14px;
  min-height: 52px;
}
.nav__links {
  display: flex; gap: 2px; overflow-x: auto; flex: 1;
  scrollbar-width: none; -ms-overflow-style: none;
  margin: 0; padding: 0; list-style: none;
  /* Fade the right edge so a clipped section reads as "scroll for more"
     rather than as a section that got cut off. */
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
}
.nav__links::-webkit-scrollbar { display: none; }

.nav__link {
  display: block; white-space: nowrap;
  padding: 9px 13px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600; letter-spacing: .015em;
  color: var(--ink-soft);
  transition: background .15s, color .15s;
}
.nav__link:hover { background: var(--surface-2); color: var(--ink); }
.nav__link[aria-current="page"] {
  color: var(--paper); background: var(--navy);
}
@media (prefers-color-scheme: dark) {
  .nav__link[aria-current="page"] { color: var(--paper); background: var(--navy-soft); }
}

.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 14px;
  min-width: 190px;
}
.search:focus-within { border-color: var(--focus); background: var(--paper); }

/* Below a comfortable desktop width the search collapses to its icon so the
   section list keeps the room, and expands again the moment it is focused. */
@media (max-width: 1060px) {
  .search { min-width: 0; padding: 6px 10px; transition: min-width .18s ease; }
  .search input { width: 0; padding: 0; }
  .search:focus-within { min-width: 210px; padding: 6px 14px; }
  .search:focus-within input { width: 100%; }
}
.search input {
  border: 0; background: transparent; outline: none;
  font: inherit; font-size: 14px; color: var(--ink);
  width: 100%; min-width: 0;
}
.search svg { flex: none; opacity: .5; }

/* -------------------------------------------------------------- view modes */

.viewbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 22px 0 6px;
}
.viewbar__heading {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 700; margin: 0;
  letter-spacing: -.01em;
}
.viewbar__sub { color: var(--ink-faint); font-size: 13.5px; margin: 3px 0 0; }

.segmented {
  display: inline-flex; background: var(--surface-2);
  border-radius: 999px; padding: 3px; gap: 2px;
}
.segmented button {
  appearance: none; border: 0; background: transparent;
  font: inherit; font-size: 13px; font-weight: 600;
  color: var(--ink-soft); cursor: pointer;
  padding: 7px 15px; border-radius: 999px;
  transition: background .15s, color .15s;
}
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] {
  background: var(--paper); color: var(--ink); box-shadow: var(--shadow);
}

/* ------------------------------------------------------------------- cards */

main { padding-bottom: 64px; }

.lead {
  display: grid; gap: 26px;
  grid-template-columns: 1fr;
  padding: 20px 0 8px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 26px;
}
@media (min-width: 900px) {
  .lead { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 34px; }
}

.grid {
  display: grid; gap: 26px 24px;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
}

.card { display: flex; flex-direction: column; min-width: 0; }
.card__media {
  position: relative; display: block;
  aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius); background: var(--surface-2);
  margin-bottom: 12px;
}
.card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.card:hover .card__media img { transform: scale(1.035); }

/* Typographic tile shown whenever a story has no image that passed screening. */
.card__media--none {
  display: grid; place-items: center; padding: 16px;
  background: linear-gradient(140deg,
    color-mix(in srgb, var(--cat, var(--navy)) 16%, var(--surface)),
    var(--surface));
  border: 1px solid var(--line-soft);
}
.card__media--none span {
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--cat, var(--navy)); text-align: center; opacity: .8;
}

.card__badge {
  position: absolute; left: 10px; bottom: 10px;
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(9, 13, 19, .82); color: #fff;
  font-size: 11.5px; font-weight: 700; letter-spacing: .03em;
  padding: 4px 9px; border-radius: 999px;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}

.card__cat {
  display: inline-block; font-size: 11px; font-weight: 800;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--cat, var(--accent));
  margin-bottom: 6px;
}
.card__title {
  font-family: var(--font-display);
  font-size: 19px; line-height: 1.25; font-weight: 700;
  margin: 0 0 7px; letter-spacing: -.005em;
}
.card__title a:hover { color: var(--accent-ink); }
.card__standfirst {
  margin: 0; color: var(--ink-soft); font-size: 14.5px; line-height: 1.5;
}
.card__meta {
  margin-top: 10px; font-size: 12.5px; color: var(--ink-faint);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.card__meta .dot { opacity: .45; }

/* The lead story runs larger. */
.card--lead .card__title { font-size: clamp(26px, 3.5vw, 40px); line-height: 1.14; }
.card--lead .card__standfirst { font-size: 17px; }
.card--lead .card__media { aspect-ratio: 3 / 2; }

/* The rail beside the lead is a compact stacked list. */
.rail { display: flex; flex-direction: column; gap: 0; }
.rail .card { padding: 15px 0; border-top: 1px solid var(--line-soft); }
.rail .card:first-child { padding-top: 0; border-top: 0; }
.rail .card__title { font-size: 17px; }
.rail .card__media { display: none; }

/* ------------------------------------------------------------ video pieces */

.videogrid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.player {
  position: relative; aspect-ratio: 16 / 9;
  background: #05080c; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line);
}
.player iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Click-to-load facade: nothing is requested from YouTube until you press play. */
.player__facade {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; padding: 0; margin: 0; cursor: pointer;
  background: #05080c; display: block;
}
.player__facade img { width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.player__facade:hover img { opacity: 1; }
.player__play {
  position: absolute; inset: 0; display: grid; place-items: center;
  pointer-events: none;
}
.player__play span {
  width: 62px; height: 44px; border-radius: 11px;
  background: rgba(12, 16, 22, .78); border: 1px solid rgba(255,255,255,.22);
  display: grid; place-items: center;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  transition: background .15s, transform .15s;
}
.player__facade:hover .player__play span {
  background: var(--accent); transform: scale(1.06);
}
.player__play svg { fill: #fff; margin-left: 2px; }

.player__len {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(9, 13, 19, .86); color: #fff;
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
  padding: 2px 7px; border-radius: 4px;
}

.videocard__title {
  font-size: 15px; font-weight: 650; line-height: 1.4;
  margin: 11px 0 4px;
}
.videocard__meta { font-size: 12.5px; color: var(--ink-faint); }

/* ---------------------------------------------------------- article page */

.article { max-width: 760px; margin: 0 auto; padding-top: 26px; }
.article__cat {
  font-size: 11.5px; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--cat, var(--accent));
}
.article__headline {
  font-family: var(--font-display);
  font-size: clamp(30px, 5.2vw, 47px); line-height: 1.12;
  font-weight: 700; letter-spacing: -.012em;
  margin: 10px 0 14px;
}
.article__standfirst {
  font-size: 19px; line-height: 1.5; color: var(--ink-soft);
  margin: 0 0 18px;
}
.article__meta {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  font-size: 13px; color: var(--ink-faint);
  padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.article__figure { margin: 22px 0; }
.article__figure img { width: 100%; border-radius: var(--radius); }
.article__figure figcaption {
  font-size: 12.5px; color: var(--ink-faint); margin-top: 8px; font-style: italic;
}
.article__body p {
  font-family: var(--font-display);
  font-size: 19px; line-height: 1.68; margin: 0 0 20px;
}
.article__body p:first-of-type::first-letter {
  float: left; font-size: 3.05em; line-height: .84;
  padding: 4px 9px 0 0; font-weight: 700; color: var(--navy);
}

.section-head {
  display: flex; align-items: baseline; gap: 12px;
  margin: 42px 0 18px; padding-bottom: 10px;
  border-bottom: 2px solid var(--navy);
}
.section-head h2 {
  font-family: var(--font-display); font-size: 22px; margin: 0; font-weight: 700;
}
.section-head span { font-size: 13px; color: var(--ink-faint); }

.notice {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 14px 16px; font-size: 13.5px; color: var(--ink-soft);
  margin: 22px 0;
}
.notice strong { color: var(--ink); }

/* ------------------------------------------------------- states & footer */

.empty {
  text-align: center; padding: 70px 20px; color: var(--ink-faint);
}
.empty h2 {
  font-family: var(--font-display); color: var(--ink);
  font-size: 22px; margin: 0 0 8px;
}
.empty p { margin: 0 auto; max-width: 42ch; font-size: 14.5px; }

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface) 50%, var(--surface-2) 75%);
  background-size: 300% 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { to { background-position: -300% 0; } }
@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; }
  * { transition: none !important; }
}
.skeleton--media { aspect-ratio: 16/9; border-radius: var(--radius); margin-bottom: 12px; }
.skeleton--line { height: 13px; margin-bottom: 8px; }
.skeleton--line.short { width: 55%; }

.pager { display: flex; justify-content: center; padding: 38px 0 0; }
.btn {
  appearance: none; font: inherit; font-size: 14px; font-weight: 650;
  cursor: pointer; padding: 11px 26px; border-radius: 999px;
  background: var(--navy); color: var(--paper); border: 1px solid transparent;
  transition: opacity .15s, transform .15s;
}
.btn:hover { opacity: .88; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: default; }
.btn--quiet { background: transparent; color: var(--ink); border-color: var(--line); }
@media (prefers-color-scheme: dark) { .btn { color: #0e1319; } }

.footer {
  border-top: 3px double var(--line);
  background: var(--surface);
  padding: 34px 0 46px; margin-top: 40px;
  font-size: 13px; color: var(--ink-faint);
}
.footer__grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 26px;
}
.footer h3 {
  font-size: 11.5px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink); margin: 0 0 10px; font-weight: 800;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 6px; }
.footer a:hover { color: var(--ink); text-decoration: underline; }
.footer__legal {
  border-top: 1px solid var(--line); padding-top: 18px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer__brand {
  font-family: var(--font-display); font-weight: 700;
  color: var(--ink); font-size: 15px;
}

/* ------------------------------------------------------------- utilities
   Small helpers so no page needs an inline style attribute. That lets the
   Content-Security-Policy keep style-src at 'self' with no 'unsafe-inline'. */

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.m0 { margin: 0; }
.center { text-align: center; }
.mt-lg { margin-top: 40px; }
.mt-md { margin: 28px 0 0; }
.underline { text-decoration: underline; }

.skeleton--eyebrow { width: 30%; height: 11px; }
.skeleton--head { height: 34px; margin-top: 14px; }
.skeleton--head-2 { height: 34px; width: 75%; }
.skeleton--hero { margin-top: 22px; }
