/**
 * The daily briefing, the weather, and today.
 *
 * Three features that share one thing: they are the parts of this site that
 * are not somebody else's article, so they are allowed a slightly different
 * voice while using the same tokens as everything else.
 *
 * Loaded after theme-port.css and written entirely against the custom
 * properties in theme-system.css — no literal colours anywhere — so both
 * colour schemes come for free and a rebrand does not have to find this file.
 *
 *   1. Shared page head
 *   2. The briefing (single day)
 *   3. The briefing archive
 *   4. The homepage card
 *   5. Weather
 *   6. Today
 *   7. Small screens
 */

/* 1. Shared page head ==================================================== */

.page-head {
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}

.page-head__title {
  font-size: clamp(24px, 3.6vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  margin: 0 0 8px;
}

.page-head__note {
  max-width: 70ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* 2. The briefing ======================================================== */

.brief {
  padding-bottom: 8px;
}

.brief__head {
  padding-bottom: 18px;
  border-bottom: 2px solid var(--text-strong);
}

.brief__kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
}

.brief__kicker svg {
  width: 15px;
  height: 15px;
}

.brief__title {
  font-size: clamp(26px, 4.4vw, 40px);
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-strong);
  margin: 0 0 12px;
}

.brief__dateline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13.5px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.brief__sep {
  opacity: 0.6;
}

.brief__lead {
  margin: 22px 0 0;
  font-size: 18.5px;
  line-height: 1.62;
  color: var(--text);
}

/* The credit sits above the fold on purpose: a reader should know whether a
   paragraph was written or assembled before they read the paragraph. */
.brief__credit {
  margin: 14px 0 0;
  padding-left: 12px;
  border-left: 3px solid var(--brand);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

.brief__section {
  margin-top: 34px;
}

.brief__section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-strong);
}

.brief__section-title a {
  color: inherit;
}

.brief__section-title a:hover {
  color: var(--brand);
}

.brief__dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--brand);
  flex: none;
}

.brief__summary {
  margin: 0 0 14px;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--text);
}

.brief__stories {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.brief__stories li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--text-strong);
}

.brief__story-source {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-2);
  white-space: nowrap;
}

.brief__stories a:hover {
  color: var(--brand);
}

.brief__sources {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.brief__sources-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.brief__nav {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 14px;
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.brief__nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 0;
  max-width: 48%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-strong);
  transition: border-color 0.16s var(--ease);
}

.brief__nav-link:hover {
  border-color: var(--line-strong);
}

.brief__nav-link em {
  display: block;
  font-style: normal;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted-2);
}

.brief__nav-link--next {
  justify-content: flex-end;
  text-align: right;
}

.brief__nav-link svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--muted-2);
}

/* 3. The briefing archive ================================================ */

.brief-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brief-teaser {
  display: flex;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.brief-teaser:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.brief-teaser__date {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 66px;
  padding: 8px 0;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--brand);
}

.brief-teaser__day {
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.brief-teaser__month {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brief-teaser__body {
  min-width: 0;
}

.brief-teaser__title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}

.brief-teaser__title a:hover {
  color: var(--brand);
}

.brief-teaser__lead {
  margin: 0 0 8px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
}

.brief-teaser__meta {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.brief-missing__back {
  margin-top: 26px;
}

/* 4. The homepage card =================================================== */

/*
 * The card is a block, not an inline aside, so it is spaced like one on every
 * page that shows it. The bottom used to be 6px, which was invisible on the
 * homepage — `.layout` underneath it adds 28px of its own padding — and plainly
 * wrong on /today, where the card is followed by a section head with no top
 * spacing at all and the two ran together.
 */
.daily {
  position: relative;
  margin: 26px 0 28px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.daily__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.daily__kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--brand);
}

.daily__kicker svg {
  width: 15px;
  height: 15px;
}

.daily__date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.daily__today {
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.daily__title {
  margin: 0 0 10px;
  font-size: clamp(22px, 3.2vw, 29px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.022em;
  color: var(--text-strong);
}

.daily__title a:hover {
  color: var(--brand);
}

.daily__lead {
  max-width: 78ch;
  margin: 0 0 16px;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--text);
}

.daily__sections {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

.daily__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.daily__meta {
  font-size: 12.5px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.daily__dot {
  margin: 0 5px;
  opacity: 0.6;
}

.daily__credit {
  color: var(--muted);
}

/* 5. Weather ============================================================= */

.city-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.chip--active,
.chip[aria-current="page"] {
  background: var(--text-strong);
  border-color: var(--text-strong);
  color: var(--bg);
  font-weight: 600;
}

.chip--sm {
  padding: 5px 11px;
  font-size: 12.5px;
}

.wx-block {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.wx-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--brand-soft), var(--surface) 62%);
}

.wx-hero__now {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 220px;
}

.wx-hero__icon svg {
  width: 62px;
  height: 62px;
  color: var(--brand);
}

.wx-hero__temp {
  font-size: 46px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

.wx-hero__temp span {
  font-size: 20px;
  font-weight: 600;
  opacity: 0.7;
}

.wx-hero__cond {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.wx-hero__feels {
  font-size: 13px;
  color: var(--muted-2);
}

.wx-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 14px 20px;
  flex: 1 1 300px;
  margin: 0;
}

.wx-fact dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.wx-fact dd {
  margin: 3px 0 0;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

.wx-aqi {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  min-width: 132px;
}

.wx-aqi__value {
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text-strong);
}

.wx-aqi__label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.wx-aqi__label em {
  display: block;
  font-style: normal;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.wx-aqi__pm {
  font-size: 11.5px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.wx-aqi--good .wx-aqi__value,
.wx-aqi--good .wx-aqi__label em {
  color: var(--accent-good);
}

.wx-aqi--warn .wx-aqi__value,
.wx-aqi--warn .wx-aqi__label em {
  color: oklch(0.72 0.15 75);
}

.wx-aqi--severe .wx-aqi__value,
.wx-aqi--severe .wx-aqi__label em {
  color: oklch(0.62 0.19 28);
}

.wx-advice {
  margin: 0;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
}

.wx-hours__title,
.wx-days__title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.wx-hours__strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.wx-hour {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 62px;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.wx-hour.is-now {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}

.wx-hour__temp {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-strong);
}

.wx-hour.is-now .wx-hour__temp {
  color: var(--brand);
}

.wx-days__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 12px;
}

.wx-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 14px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-align: center;
}

.wx-day.is-today {
  border-color: var(--brand);
}

.wx-day__name {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.wx-day.is-today .wx-day__name {
  color: var(--brand);
}

.wx-day__icon svg {
  width: 30px;
  height: 30px;
  color: var(--brand);
}

.wx-day__cond {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.35;
}

.wx-day__range {
  display: flex;
  gap: 7px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.wx-day__hi {
  font-weight: 700;
  color: var(--text-strong);
}

.wx-day__lo {
  color: var(--muted-2);
}

.wx-day__rain {
  font-size: 11.5px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.wx-source {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted-2);
}

.wx-source a {
  color: var(--muted);
  text-decoration: underline;
}

.wx-note__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 0;
}

/* The sidebar pill. One reading, one number: the widget is a doorway. */
.wx {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.16s var(--ease);
}

.wx:hover {
  border-color: var(--line-strong);
}

.wx__icon {
  flex: none;
}

.wx__icon svg {
  width: 34px;
  height: 34px;
  color: var(--brand);
}

.wx__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}

.wx__temp {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-variant-numeric: tabular-nums;
}

.wx__value {
  font-size: 23px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}

.wx__unit {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-2);
}

.wx__place {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-strong);
}

.wx__cond {
  font-size: 12.5px;
  color: var(--muted-2);
}

.wx__side {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.wx__range {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.wx__hi {
  font-weight: 700;
  color: var(--text-strong);
}

.wx__lo {
  margin-left: 5px;
  color: var(--muted-2);
}

.wx__aqi {
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  white-space: nowrap;
}

.wx__aqi--warn {
  color: oklch(0.66 0.15 75);
}

.wx__aqi--severe {
  color: oklch(0.58 0.19 28);
}

/* 6. Today =============================================================== */

.today-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(150deg, var(--brand-soft), var(--surface) 60%);
  margin-bottom: 18px;
}

.today-hero__kicker {
  margin: 0 0 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--brand);
}

.today-hero__ad {
  margin: 0;
  font-size: clamp(22px, 3.6vw, 31px);
  font-weight: 700;
  letter-spacing: -0.022em;
  color: var(--text-strong);
}

.today-hero__bs {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 6px 0 0;
}

.today-hero__bs-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.today-hero__bs-value {
  font-size: 19px;
  font-weight: 700;
  color: var(--brand);
}

.today-hero__clock {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin: 12px 0 0;
}

.today-hero__time {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

.today-hero__zone {
  font-size: 12.5px;
  color: var(--muted-2);
}

.today-hero__offset {
  font-variant-numeric: tabular-nums;
}

.today-hero__wx {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.today-hero__wx-icon svg {
  width: 42px;
  height: 42px;
  color: var(--brand);
}

.today-hero__wx-temp {
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

.today-hero__wx-cond {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.today-hero__wx-cond em {
  font-style: normal;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-2);
}

.today-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.today-stats .stat {
  flex: 1 1 140px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

/* 7. Small screens ======================================================= */

@media (max-width: 767px) {
  .daily {
    padding: 18px;
  }

  .brief__lead {
    font-size: 17px;
  }

  .brief-teaser {
    flex-direction: column;
    gap: 12px;
  }

  .brief-teaser__date {
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
    width: auto;
    padding: 5px 12px;
    align-self: flex-start;
  }

  .brief-teaser__day {
    font-size: 17px;
  }

  .brief-teaser__month {
    margin-top: 0;
  }

  .brief__nav {
    flex-direction: column;
  }

  .brief__nav-link {
    max-width: none;
  }

  .wx-hero,
  .today-hero {
    padding: 18px;
  }

  .wx-hero__temp {
    font-size: 38px;
  }

  .today-hero__wx {
    width: 100%;
  }
}
