/* =============================================================
   Daily Blink v2 — additions and overrides.
   Loaded after bootstrap.min.css, main.css and blink.css, which
   are copied unchanged from the original site.
   ============================================================= */

/* -------------------------------------------------------------
   Self-hosted fonts (latin subset; variable weight files).
   Licences: ../fonts/Lora-OFL.txt, ../fonts/Oswald-OFL.txt
   ------------------------------------------------------------- */
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/lora-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Lora";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/lora-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url("../fonts/oswald-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --blink-ink: #111;
  --blink-text: #333;
  --blink-muted: #666;   /* 5.7:1 on white: small grey text stays readable */
  --blink-faint: #aaa;   /* 2.3:1: source links only, by owner's choice; dark on hover/focus */
  --blink-rule: #e5e5e5;
  --blink-accent: #ca2026;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* -------------------------------------------------------------
   Keyboard focus and skip link
   ------------------------------------------------------------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--blink-ink);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 10px;
  top: -60px;
  z-index: 100000;
  padding: 8px 14px;
  background-color: var(--blink-ink);
  color: #fff;
  font-family: "Oswald", serif;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.skip-link:focus,
.skip-link:active {
  top: 10px;
  color: #fff;
}

main:focus {
  outline: none;
}

/* -------------------------------------------------------------
   Header bar
   ------------------------------------------------------------- */
.article-bar-logo img {
  margin-bottom: 10px;
}

/* The bar no longer has prev/next arrows beside the date (the Editions panel
   and the links at the end of the article cover that), so drop the offsets
   the theme used to make room for them and sit both labels on the edges. */
.article-bar .hover-nav,
.article-bar .hover-nav-right {
  left: 0;
}
.article-bar .hover-date,
.article-bar .editions-toggle {
  margin: 0;
}

/* "Editions" is a real button; make it look like the bar's other labels. */
.editions-toggle {
  background: none;
  border: 0;
  padding: 0;
  margin: 0 4px;
  color: inherit;
  line-height: 30px;
  text-transform: uppercase;
  font-size: 14px;
  font-family: "Oswald", serif;
}

/* -------------------------------------------------------------
   Edition page: notes, lead and reading column
   ------------------------------------------------------------- */
.edition-note {
  max-width: 780px;
  margin: -30px auto 20px;
  text-align: center;
  font-style: italic;
  font-size: 14px;
  color: var(--blink-muted);
}

.location-switcher {
  margin: -30px 0 25px;
  text-align: center;
  font-family: "Oswald", serif;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--blink-muted);
}
.location-switcher a {
  margin: 0 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.location-switcher a[aria-current="page"] {
  color: var(--blink-ink);
  font-weight: 600;
  text-decoration: none;
}

/* The day as one article: lead headline (h1), standfirst (.sapo), then
   every story flowing through the old article page's two justified columns
   with the centre rule (.article-fullpage / .post-content in main.css,
   which also drops to one column below 768px). To go back to a single
   reading column, add `columns: auto; max-width: 780px; margin: 40px auto 0`
   here and hide `.edition-body:before`. */
.edition-article .sapo p {
  max-width: 780px;
}

.article-fullpage .edition-body {
  margin: 50px 0 0;
  -webkit-hyphens: auto;
  hyphens: auto;
  overflow-wrap: break-word;
}
/* A story may run from the first column into the second, but only between
   paragraphs: a paragraph is never split. So the second column starts with
   either a subheading or a whole paragraph, never the tail of one. The rules
   after this keep a subheading with the paragraph below it and a sources
   line with the paragraph above it. */
.edition-body p,
.edition-body .story-keep,
.edition-body .in-brief {
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  break-inside: avoid;
}
/* Browsers do not all honour "keep this heading with what follows", and a
   two-line subheading could itself be cut in half. So the template boxes each
   subheading with its first paragraph, and each sources line with the last
   paragraph, in a .story-keep block that cannot be split. */
.edition-body .edition-story-headline {
  -webkit-column-break-inside: avoid;
  break-inside: avoid;
}
.edition-body .edition-story-headline {
  -webkit-column-break-after: avoid;
  break-after: avoid;
}
.edition-body p.item-sources {
  -webkit-column-break-before: avoid;
  break-before: avoid;
}
.article-fullpage .edition-body p {
  line-height: 1.65;
  color: var(--blink-text);
  margin: 0 0 18px;
}

.edition-story {
  margin: 0 0 34px;
}
.edition-story-headline {
  font-size: 24px;
  line-height: 1.25;
  text-align: left;
  -webkit-hyphens: manual;
  hyphens: manual;
  color: var(--blink-ink);
  margin: 0 0 12px;
}

/* Justified text on a narrow screen leaves wide gaps: align left there.
   (main.css already does this for .post-content below 768px; repeated
   here so the rule does not depend on selector order.) */
@media screen and (max-width: 767px) {
  .article-fullpage .edition-body {
    text-align: left;
    -webkit-hyphens: manual;
    hyphens: manual;
  }
  .edition-story-headline {
    font-size: 21px;
  }
}

/* Sources: a small, quiet line under each story, right-aligned. */
.article-fullpage .edition-body p.item-sources {
  margin: -8px 0 0;
  text-align: right;
  -webkit-hyphens: manual;
  hyphens: manual;
  font-family: "Oswald", serif;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.5px;
  line-height: 1.8;
  color: var(--blink-faint);
}
/* Deliberately quiet: faint and not underlined until pointed at or focused. */
.item-sources a,
.in-brief-source {
  color: var(--blink-faint);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}
.in-brief-source {
  font-family: "Oswald", serif;
  font-weight: 300;
  font-size: 11px; /* same as .item-sources */
  /* One unbreakable unit: justification stretches the gaps between words in
     the paragraph, but must not stretch the gap inside "The Guardian". */
  display: inline-block;
  text-align: left;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.item-sources a:hover,
.item-sources a:focus-visible,
.in-brief-source:hover,
.in-brief-source:focus-visible {
  color: var(--blink-ink);
  text-decoration: underline;
  text-decoration-color: var(--blink-ink);
}
.item-sources-sep {
  margin: 0 6px;
}

/* Section captions are headings now; keep the theme's caption look. */
h2.col-caption {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
}

/* In brief: the last section of the article, one short paragraph each. */
.in-brief {
  margin: 0;
}
/* It runs as one paragraph: a wider gap after each item's source marks where
   the next sentence starts. No gap after the last one. */
.in-brief-item:not(:last-child) .in-brief-source {
  margin-right: 0.9em;
}

/* Corrections and end marker */
.edition-corrections {
  max-width: 780px;
  margin: 30px auto 0;
  padding: 14px 18px;
  border-left: 3px solid var(--blink-ink);
  background-color: #fafafa;
  font-size: 14px;
  color: var(--blink-text);
}
.edition-corrections p {
  margin: 0 0 6px;
}
.edition-corrections p:last-child {
  margin-bottom: 0;
}
.edition-corrections-date {
  font-weight: 700;
}

.edition-end {
  max-width: 780px;
  margin: 40px auto 0;
  text-align: center;
}
.edition-end-marker {
  font-style: italic;
  font-size: 20px;
  margin: 0 0 10px;
}
.edition-end-nav {
  margin: 0;
  font-family: "Oswald", serif;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.edition-end-nav a {
  margin: 0 10px;
  border-bottom: 1px solid var(--blink-ink);
}
.edition-end-nav a:hover {
  color: var(--blink-accent);
  border-color: var(--blink-accent);
}

/* -------------------------------------------------------------
   Bottom columns and footer
   ------------------------------------------------------------- */
/* "Full archive" ends where the numbers in the calendar's last column end.
   Those numbers are centred in a column one seventh of the width, so their
   right edge is half a column (1/14) in from the table edge, less half the
   width of a two-digit number (about 7px at the calendar's 13px Oswald). */
.edition-calendar {
  table-layout: fixed;
}
.bottom-col-link {
  margin-top: 8px;
  text-align: right;
  padding-right: calc(100% / 14 - 7px);
}
/* Same quiet style as the source links: small, faint, no underline until
   pointed at or focused. */
.bottom-col-link a,
.recent-post .more-link {
  font-family: "Oswald", serif;
  font-weight: 300;
  font-size: 14px;
  letter-spacing: 0.5px;
  color: var(--blink-faint);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}
.bottom-col-link a:hover,
.bottom-col-link a:focus-visible,
.recent-post .more-link:hover,
.recent-post .more-link:focus-visible {
  color: var(--blink-ink);
  text-decoration: underline;
  text-decoration-color: var(--blink-ink);
}
.recent-post .more-link {
  display: inline-block;
  margin-top: 10px;
}
.edition-calendar caption {
  padding: 0;
}

.footer .allright p.footer-tagline,
.footer .allright p.ai-disclosure {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  font-size: 14px;
  margin-bottom: 12px;
}
.footer .allright p.ai-disclosure a,
.footer-links a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* Vertical rhythm: logo, tagline and links sit as one group with even gaps.
   The theme stacks three paddings between the logo and the text below it
   (about 40px) against 12px between tagline and links; even them out. */
/* The page box already has a 50px margin below it; the theme then adds 50px
   of footer padding above the logo, leaving about 110px. Drop that padding
   so the logo sits about 60px below the box. */
.footer {
  padding-top: 0;
}
.footer a.logo {
  padding-bottom: 0;
}
.footer .footer-bar {
  padding-top: 0;
}
.footer .allright {
  padding: 18px 0 0;
}
.footer .allright p.footer-tagline {
  margin-bottom: 18px;
  line-height: 1.4;
}

/* Laid out as a centred row with one even gap, so the space on each side of
   a dot is identical however the HTML is spaced. Wraps on narrow screens. */
.footer .allright p.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 6px 12px;
}
/* The theme's letter-spacing adds space after the last letter, which the
   underline covers. Match it on the left so the underline sits centred. */
.footer-links a {
  padding-left: 2px;
}
.footer-links-sep {
  margin: 0;
  letter-spacing: 0;
}

.totop {
  color: var(--blink-ink);
  text-decoration: none;
}
.totop:hover,
.totop:focus {
  color: var(--blink-ink);
  text-decoration: none;
}
.totop:focus {
  bottom: 0;
}

/* -------------------------------------------------------------
   Archive (pre-rendered; reuses the .archive-* classes)
   ------------------------------------------------------------- */
.archive-month-nav h1,
.archive-container > h1 {
  font-family: "Oswald", serif;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--blink-text);
  margin: 0;
  min-width: 220px;
  text-align: center;
}
.archive-container > h1 {
  margin-bottom: 30px;
}
a.archive-nav-btn {
  display: inline-block;
  text-decoration: none;
}
.archive-nav-btn.is-disabled {
  opacity: 0.3;
  cursor: default;
}
.archive-day-num.is-empty {
  color: #ccc;
}
.archive-cal-cell a .archive-day-num {
  display: block;
}
.archive-cal-cell a:focus-visible {
  outline-offset: 4px;
}

.archive-year {
  font-family: "Oswald", serif;
  font-weight: 400;
  font-size: 18px;
  letter-spacing: 2px;
  margin: 30px 0 10px;
  border-bottom: 1px solid var(--blink-ink);
  padding-bottom: 6px;
}
.archive-months {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.archive-months a {
  display: block;
  border: 1px solid #e0e0e0;
  background: #fafafa;
  padding: 10px 12px;
}
.archive-months a:hover {
  border-color: #bbb;
  background: #f5f5f5;
}
.archive-months-name {
  display: block;
  font-family: "Oswald", serif;
  font-size: 18px;
  font-weight: 500;
  color: #222;
}
.archive-months-count {
  display: block;
  font-size: 13px;
  font-style: italic;
  color: var(--blink-muted);
}

/* -------------------------------------------------------------
   Text pages (About, How this is made, Sources)
   ------------------------------------------------------------- */
.page-text {
  max-width: 780px;
  margin: 0 auto 30px;
}
.page-text h1 {
  text-align: center;
  font-size: 34px;
  margin: 0 0 30px;
}
.page-text h2 {
  font-size: 22px;
  margin: 32px 0 10px;
}
.page-text h3 {
  font-size: 18px;
  margin: 22px 0 8px;
}
.page-text p,
.page-text li {
  font-size: 17px;
  line-height: 1.7;
  color: var(--blink-text);
}
.page-text a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.page-text a:hover {
  color: var(--blink-accent);
}
.sources-domain {
  color: var(--blink-muted);
  font-size: 14px;
}

.page-404 .my-btn {
  color: #fff;
}
