
  /*
    Layout: news-portal front page. Centered masthead, centered section nav,
    then one lead block on a 4-track grid: lead story | two story columns |
    headlines rail. Black ground, white condensed headlines, grey metadata.
    Story covers are drawn on canvas per section until real photos are set.
  */
  :root {
    --bg: #000000;
    --surface: #0d0d0d;
    --surface-2: #161616;
    --fg: #ffffff;
    --muted: #a1a1aa;
    --subtle: #71717a;
    --border: #242424;
    --font-head: "Oswald", "Arial Narrow", "Roboto Condensed", sans-serif;
    --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
    color-scheme: dark;
  }

  * { box-sizing: border-box; }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
  }
  body::before {
    content: "";
    position: fixed;
    inset: 0 0 auto;
    height: env(safe-area-inset-top, 0px);
    z-index: 30;
    background: var(--bg);
  }
  a { color: inherit; text-decoration: none; }
  img, canvas { display: block; max-width: 100%; }
  ::selection { background: var(--fg); color: var(--bg); }
  :focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }

  .wrap {
    max-width: 1240px;
    margin-inline: auto;
    padding-left: max(20px, env(safe-area-inset-left, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px));
  }

  .label {
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding-inline: 18px;
    border-radius: 4px;
    border: 1px solid transparent;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    transition: opacity 0.15s, border-color 0.15s;
  }
  .btn-solid { background: var(--fg); color: var(--bg); }
  .btn-solid:hover { opacity: 0.85; }

  /* ---------- masthead ---------- */
  .masthead {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    padding-block: 22px 16px;
  }
  .masthead-date {
    font-size: 0.8rem;
    color: var(--muted);
  }
  .logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.6rem;
    letter-spacing: 0.01em;
  }
  .logo svg { width: 26px; height: 30px; }
  .masthead-actions { justify-self: end; }

  /* ---------- section nav ---------- */
  .site-nav {
    position: sticky;
    top: env(safe-area-inset-top, 0px);
    z-index: 20;
    background: var(--bg);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }
  .site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .site-nav ul::-webkit-scrollbar { display: none; }
  .site-nav a {
    display: block;
    padding: 14px 14px 13px;
    font-size: 0.95rem;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color 0.15s;
  }
  .site-nav a:hover { color: var(--fg); }
  .site-nav a[aria-current="page"] {
    color: var(--fg);
    border-bottom-color: var(--fg);
  }

  /* ---------- lead block ---------- */
  .lead {
    display: grid;
    grid-template-columns: 1.75fr 1fr 1fr 1.25fr;
    grid-template-rows: auto 1fr;
    align-items: start;
    gap: 28px 24px;
    padding-block: 36px 56px;
  }

  .cover {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-width: 100%;
    overflow: hidden;
    background: var(--surface);
  }
  .cover canvas, .cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
  }
  .story:hover .cover canvas,
  .story:hover .cover img { transform: scale(1.03); }

  .story { display: flex; flex-direction: column; min-width: 0; }
  .story-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-top: 12px;
  }
  .story-meta time {
    font-size: 0.78rem;
    color: var(--subtle);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }
  .story h2, .story h3 {
    margin: 8px 0 0;
    font-family: var(--font-head);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: 0.005em;
    text-wrap: balance;
  }
  .story h3 { font-size: 1.32rem; }
  .story h2 a, .story h3 a { transition: color 0.15s; }
  .story h2 a:hover, .story h3 a:hover { color: var(--muted); }

  .story-lead { grid-column: 1; grid-row: 1 / span 2; }
  .story-lead .cover { aspect-ratio: 4 / 3; }
  .story-lead h2 { font-size: clamp(2rem, 3.2vw, 2.75rem); font-weight: 600; line-height: 1.08; margin-top: 10px; }
  .story-lead p {
    margin: 14px 0 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--muted);
    max-width: 52ch;
  }
  .story-lead .story-meta { margin-top: 18px; }

  /* ---------- headlines rail ---------- */
  .rail {
    grid-column: 4;
    grid-row: 1 / span 2;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 24px 24px 20px;
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  .rail-title {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fg);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--fg);
  }
  .rail ol { list-style: none; margin: 0; padding: 0; }
  .rail li {
    padding-block: 18px;
    border-bottom: 1px solid var(--border);
  }
  .rail li:last-child { border-bottom: none; }
  .rail h3 {
    margin: 8px 0 0;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 1.15rem;
    line-height: 1.2;
    text-wrap: balance;
  }
  .rail h3 a:hover { color: var(--muted); }
  .rail-more {
    margin-top: auto;
    padding-top: 12px;
    font-family: var(--font-head);
    font-size: 1.05rem;
    font-weight: 500;
  }
  .rail-more:hover { color: var(--muted); }

  /* ---------- footer ---------- */
  footer { border-top: 1px solid var(--border); }
  .footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    padding-block: 48px 24px;
  }
  .footer-grid p { margin: 12px 0 0; font-size: 0.88rem; line-height: 1.55; color: var(--muted); max-width: 32ch; }
  .footer-grid ul { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
  .footer-grid ul a { font-size: 0.92rem; }
  .footer-grid ul a:hover { color: var(--muted); }
  .footer-grid .logo { font-size: 1.25rem; }
  .footer-grid .logo svg { width: 20px; height: 24px; }
  .copyright { padding-block: 20px 32px; font-size: 0.8rem; color: var(--subtle); border-top: 1px solid var(--border); }

  /* ---------- responsive ---------- */
  @media (max-width: 1080px) {
    .lead { grid-template-columns: 1fr 1fr; }
    .story-lead { grid-column: 1 / -1; grid-row: auto; }
    .story-lead .cover { aspect-ratio: 16 / 9; }
    .rail { grid-column: 1 / -1; grid-row: auto; }
  }
  @media (max-width: 720px) {
    .masthead { grid-template-columns: 1fr auto; }
    .masthead-date { display: none; }
    .site-nav ul { justify-content: flex-start; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
  }
  @media (max-width: 560px) {
    .lead { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
  }
  @media (prefers-reduced-motion: reduce) {
    .cover canvas, .cover img { transition: none; }
    .story:hover .cover canvas, .story:hover .cover img { transform: none; }
  }

  .logo img.logo-img { height: 36px; width: auto; display: block; }
  .footer-grid .logo img.logo-img { height: 28px; }
  .masthead-actions a.quiet {
    font-size: 0.9rem; color: var(--muted); transition: color 0.15s;
  }
  .masthead-actions a.quiet:hover { color: var(--fg); }
