:root {
  --nt-page-bg: #0a0a0a;
  --nt-text: #e0e0e0;
  --nt-text-heading: #fff;
  --nt-text-muted: #a0a0a0;
  --nt-text-subtle: #aaa;
  --nt-text-faint: #bbb;
  --nt-text-dim: #ccc;
  --nt-text-body: #d0d0d0;
  --nt-text-essay: #d4d4d4;
  --nt-text-disabled: #666;
  --nt-text-hint: #555;
  --nt-text-soft: #b0b0b0;
  --nt-text-accent: #b8c7d6;
  --nt-surface: #1a1a1a;
  --nt-surface-raised: #222;
  --nt-surface-pressed: #333;
  --nt-surface-hover: #444;
  --nt-surface-code: #111;
  --nt-surface-claim: #1f1f1f;
  --nt-surface-week: #1c1c1c;
  --nt-surface-week-hover: #232323;
  --nt-surface-refresh: #2a2a2a;
  --nt-surface-refresh-hover: #383838;
  --nt-border: #2a2a2a;
  --nt-border-subtle: #333;
  --nt-border-strong: #444;
  --nt-border-hover: #555;
  --nt-border-divider: #2c2c2c;
  --nt-border-inner: #1a1a1a;
  --nt-link: #6eb5ff;
  --nt-link-alt: #7cacf8;
  --nt-link-source: #7fb2e5;
  --nt-positive: #81c784;
  --nt-positive-alt: #66bb6a;
  --nt-negative: #e57373;
  --nt-warning: #ffa726;
  --nt-warning-alt: #e5b257;
  --nt-warning-strong: #ff9800;
  --nt-stale-bg: #332b00;
  --nt-stale-border: #665500;
  --nt-stale-text: #ffcc00;
  --nt-skeleton-base: #252525;
  --nt-skeleton-mid: #303030;
  --nt-lesson-bg: #1a1a2e;
  --nt-lesson-border: #2a2a4a;
  --nt-lesson-heading: #9fa8da;
  --nt-accent-green-bg: #1e2a1e;
  --nt-alert-border: #5a2a2a;
  --nt-review-notes-border: #5a4a2a;
  --nt-key-border: #3a3520;
  --nt-key-text: #c9a800;
  --nt-error-border: #3a2020;
  --nt-meeting-pill-bg: #2a3540;
  --nt-meeting-pill-text: #9bb;
  --nt-holiday: #ffc147;
  --nt-holiday-name: #f5f5f5;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--nt-page-bg);
  color: var(--nt-text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

#app {
  width: 100%;
  max-width: 720px;
  padding: 40px 24px;
}

/* ── Masthead ──────────────────────────────────────────────────────────────── */

.masthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.masthead-text {
  flex: 1;
  text-align: center;
}

.masthead-actions {
  flex: 0 0 auto;
  padding-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.masthead h1 {
  /* Fraunces is loaded by the website (site.css @font-face); the extension
     ships no webfont and falls back to the system serif stack. */
  font-family: Fraunces, Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--nt-text-heading);
}

.dateline {
  font-size: 0.95rem;
  color: var(--nt-text-muted);
  margin-top: 8px;
}

.masthead-link {
  display: inline-block;
  font-size: 0.95rem;
  color: var(--nt-text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid var(--nt-surface-pressed);
  border-radius: 6px;
  transition: color 0.15s, border-color 0.15s;
}

.masthead-link:hover {
  color: var(--nt-text-heading);
  border-color: var(--nt-text-hint);
}

.edition-toggle {
  display: inline-flex;
  gap: 2px;
  margin-top: 12px;
  background: var(--nt-surface);
  border-radius: 6px;
  padding: 2px;
}

.edition-btn {
  padding: 4px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--nt-text-disabled);
  cursor: pointer;
  transition: all 0.15s ease;
}

.edition-btn:hover {
  color: var(--nt-text-subtle);
}

.edition-btn.active {
  background: var(--nt-surface-pressed);
  color: var(--nt-text-heading);
}

.edition-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Status / loading ─────────────────────────────────────────────────────── */

.status-message {
  text-align: center;
  color: var(--nt-text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-top: 48px;
}

.status-message p {
  margin-bottom: 12px;
}

.error-message {
  color: var(--nt-negative);
}

.btn-retry {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 24px;
  background: var(--nt-surface-pressed);
  color: var(--nt-text);
  border: 1px solid var(--nt-surface-hover);
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
}

.btn-retry:hover {
  background: var(--nt-surface-hover);
}

/* ── Skeleton loading ─────────────────────────────────────────────────────── */

.skeleton-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 32px;
}

.skeleton-card {
  background: var(--nt-surface);
  border: 1px solid var(--nt-border);
  border-radius: 12px;
  padding: 24px;
}

.skeleton-line {
  height: 14px;
  background: linear-gradient(90deg, var(--nt-skeleton-base) 25%, var(--nt-skeleton-mid) 50%, var(--nt-skeleton-base) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 12px;
}

.skeleton-line:last-child {
  margin-bottom: 0;
}

.w40 { width: 40%; }
.w50 { width: 50%; }
.w60 { width: 60%; }
.w70 { width: 70%; }
.w80 { width: 80%; }
.w90 { width: 90%; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Cards container ──────────────────────────────────────────────────────── */

.cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card {
  background: var(--nt-surface);
  border: 1px solid var(--nt-border);
  border-radius: 12px;
  padding: 24px;
}

.card h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--nt-text-heading);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--nt-border);
}

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--nt-text);
  margin-bottom: 8px;
}

/* Section identity: every card header carries its section emoji (shared
   metadata) so readers can spot a section at a glance while scrolling. */
.card-emoji {
  margin-right: 8px;
  font-size: 0.95em;
}

/* Generic uppercase sub-block label ("Yesterday", "Upcoming", …) shared by
   the sports blocks, the lesson's Wikipedia reading, and future sub-blocks. */
.block-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--nt-text-muted);
  margin: 0 0 6px;
}

/* Free-tier shared-cache warm-up placeholder — calm, not an error. */
.card-warming {
  opacity: 0.8;
}

.card-warming .warming-message {
  color: var(--nt-text-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* ── Mark-as-read toggle ───────────────────────────────────────────────────
   One 28px circular button that lives at the end of a card's title row in
   BOTH states, so it never moves when a section folds. The row gets an
   explicit line-height so the open <h2> and the collapsed stub label lay out
   to the same height (the h2's bolder weight must not shift the control). */
.card-title-row {
  display: flex;
  align-items: center;
  line-height: 1.3;
}

.section-toggle {
  flex: none;
  position: relative;
  /* Pinned to the row's FIRST line (not centred on the whole row) so a title
     or "· read" label that wraps never moves it; the negative vertical
     margins centre the 28px circle on that ~23px line without growing it. */
  align-self: flex-start;
  margin: -3px 0 -4px auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--nt-border-strong);
  background: transparent;
  color: var(--nt-text-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}

/* Invisible 44px hit area for touch without inflating the visible circle. */
.section-toggle::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
}

.section-toggle:hover,
.section-toggle:focus-visible {
  color: var(--nt-text-heading);
  border-color: var(--nt-border-hover);
}

.section-toggle:focus-visible {
  outline: 2px solid var(--nt-link);
  outline-offset: 2px;
}

.section-toggle:active {
  transform: scale(0.9);
}

/* Read state: filled check. Clicking again reopens the section. */
.section-toggle[aria-pressed="true"] {
  background: var(--nt-accent-green-bg);
  border-color: var(--nt-positive);
  color: var(--nt-positive);
}

.section-toggle[aria-pressed="true"]:hover,
.section-toggle[aria-pressed="true"]:focus-visible {
  color: var(--nt-positive);
  border-color: var(--nt-positive);
  background: var(--nt-surface-hover);
}

/* Section marked as read — the card folds up to just its title row. Card
   padding is inherited so the toggle keeps the exact offset it had open. */
.card-dismissed-label {
  color: var(--nt-text-muted);
  font-size: 1.1rem;
  font-weight: 400;
}

/* The agenda header already centers its action group on a taller <h2> box;
   inherit the row line-height there without turning the group into a title. */
.agenda-header-actions.card-title-row {
  line-height: inherit;
}

.agenda-header-actions .section-toggle {
  align-self: center;
  margin-top: -4px;
}

/* The fold is a View Transition on the section tile (see the hosts); honour
   the OS reduced-motion preference even if a host forgets to gate it. */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

a {
  color: var(--nt-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── Markets ──────────────────────────────────────────────────────────────── */

.market-mood {
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  color: var(--nt-text-muted);
}

.market-mood.positive { color: var(--nt-positive); }
.market-mood.negative { color: var(--nt-negative); }

.market-indices {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.index {
  flex: 1;
  min-width: 120px;
  background: var(--nt-surface-raised);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.index-label {
  display: block;
  font-size: 0.82rem;
  color: var(--nt-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.index-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--nt-text-heading);
}

.index-change {
  display: block;
  font-size: 0.9rem;
  margin-top: 4px;
}

.positive { color: var(--nt-positive); }
.negative { color: var(--nt-negative); }

.market-explanation {
  font-size: 0.95rem;
  color: var(--nt-text-subtle);
  line-height: 1.5;
}

.market-movers {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--nt-border);
}

.market-movers h3 {
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--nt-text-muted);
  margin-bottom: 8px;
}

.mover {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  font-size: 0.9rem;
}

.mover-ticker {
  font-weight: 600;
  color: var(--nt-text-heading);
  min-width: 50px;
}

.mover-change {
  font-weight: 500;
  min-width: 50px;
}

.mover-reason {
  color: var(--nt-text-muted);
  flex: 1;
}

/* "Data as of …" rides inside the Markets <h2> (like the weather location
   suffix) so the mark-as-read toggle stays the rightmost thing in the row.
   In the flex title row it floats right of the title; inline otherwise. */
.market-as-of {
  font-size: 0.82rem;
  color: var(--nt-text-disabled);
  font-weight: 400;
  margin-left: 10px;
}

.card-title-row .market-as-of {
  margin-left: auto;
}

.market-as-of + .section-toggle {
  margin-left: 12px;
}

.market-articles {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--nt-border);
}

/* When articles are the only body content, the card h2 already draws the
   rule — a second one directly beneath it read as a doubled divider. */
.card h2 + .market-articles {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.market-articles h3 {
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--nt-text-muted);
  margin-bottom: 8px;
}

.market-article {
  padding: 10px 0;
  border-bottom: 1px solid var(--nt-border-divider);
}

.market-article:last-child {
  border-bottom: none;
}

.market-article h3 {
  font-size: 0.95rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--nt-text);
  margin-bottom: 4px;
}

.market-article .news-summary {
  font-size: 0.9rem;
  color: var(--nt-text-muted);
  line-height: 1.4;
}

.market-article .news-sources {
  margin-top: 4px;
}

/* ── Weather ──────────────────────────────────────────────────────────────── */

.weather-alerts { margin: 4px 0 14px; }
.weather-alert {
  background: rgba(229, 87, 87, 0.1);
  border: 1px solid var(--nt-alert-border);
  border-left: 3px solid var(--nt-negative);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 8px;
}
.weather-alert-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.weather-alert-event { font-weight: 600; color: var(--nt-negative); font-size: 0.95rem; }
.weather-alert-sender { font-size: 0.78rem; color: var(--nt-text-muted); }
.weather-alert-desc {
  font-size: 0.86rem;
  color: var(--nt-text-faint);
  line-height: 1.5;
  margin: 4px 0 0;
}
.weather-today {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  margin-bottom: 12px;
}

.weather-temps {
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--nt-text-heading);
}

/* Today's arc: Morning / Afternoon / Evening under the high/low headline.
   Absent on cache rows that predate it (the block just doesn't render). */
.weather-periods {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: -4px 0 12px;
}

.weather-period {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
}

.weather-period-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nt-text-muted);
}

.weather-period-temp {
  font-weight: 600;
  color: var(--nt-text);
}

.weather-period-cond {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  color: var(--nt-text-muted);
}

.weather-period-cond:empty {
  display: none;
}

.weather-high {
  font-weight: 600;
}

.weather-sep {
  color: var(--nt-text-hint);
  margin: 0 4px;
}

.weather-low {
  color: var(--nt-text-muted);
}

.weather-condition {
  font-size: 1rem;
  color: var(--nt-text-subtle);
}

.weather-precip {
  font-size: 0.9rem;
  color: var(--nt-link);
}

.weather-summary {
  font-size: 0.95rem;
  color: var(--nt-text-subtle);
  line-height: 1.5;
  margin-bottom: 16px;
}

/* 5-day tiles. Each is a four-row grid (day · high/low · condition · rain)
   with the rain row a fixed height, so tiles stay aligned whether or not a
   day has anything to say in it. */
.weather-forecast {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--nt-border);
}

.forecast-day {
  display: grid;
  /* The rain row is the flexible one: the three rows above it are the same
     height in every tile, so they stay aligned across the strip while a
     two-line pill only pushes its own tile's bottom edge. */
  grid-template-rows: auto auto auto minmax(24px, 1fr);
  row-gap: 5px;
  justify-items: center;
  align-items: center;
  min-width: 0;
  background: var(--nt-surface-raised);
  border: 1px solid var(--nt-border);
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
}

.forecast-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nt-text-muted);
}

.forecast-temps {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.forecast-high {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--nt-text-heading);
}

.forecast-low {
  font-size: 0.9rem;
  color: var(--nt-text-muted);
}

.forecast-cond {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  font-size: 0.8rem;
  line-height: 1.2;
  color: var(--nt-text-subtle);
  /* Glyph + one line of text, so a tile whose condition has no glyph (or no
     condition at all) still lines up with its neighbours. */
  min-height: calc(26px + 3px + 1.2em);
}

/* ── Weather glyphs (render_icons.js) ──────────────────────────────────────
   Inline SVG drawn with currentColor, so the tint is just `color`. The word
   each glyph replaces stays in the DOM as .sr-only text + a title tooltip. */
.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;
}

.wx-cond {
  display: inline-flex;
  align-items: center;
}

.wx-icon {
  flex-shrink: 0;
  display: block;
  color: var(--nt-text-soft);
}

.wx-clear,
.wx-partly { color: var(--nt-holiday); }
/* Fixed blue, not --nt-link: the light theme remaps that token to the site's
   red accent, and a red rain cloud reads as a warning. */
.wx-rain,
.wx-drizzle { color: #4f94d4; }
.wx-snow { color: var(--nt-text-accent); }
.wx-storm,
.wx-tornado { color: var(--nt-warning); }

/* The rain line is a pill, not a warning: red read as an error, and rain
   is not one. Empty on a dry day — the row keeps its height regardless. */
.forecast-precip {
  display: inline-block;
  align-self: start;
  max-width: 100%;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.25;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--nt-link);
  background: color-mix(in srgb, var(--nt-link) 14%, transparent);
}

.forecast-precip:empty {
  display: none;
}

/* ── News list ────────────────────────────────────────────────────────────── */

.news-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--nt-border-divider);
}

.news-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.news-item h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--nt-text-heading);
  margin-bottom: 6px;
  line-height: 1.4;
}

.news-summary {
  font-size: 0.95rem;
  color: var(--nt-text-faint);
  line-height: 1.5;
  margin-bottom: 6px;
}

.news-why {
  font-size: 0.86rem;
  color: var(--nt-text-muted);
  line-height: 1.4;
}

.news-why strong {
  color: var(--nt-text-subtle);
}

/* Clustered-story bullets: distinct angles of one merged story, each with an
   optional per-bullet source link. */
.news-bullets {
  margin: 0 0 6px;
  padding-left: 18px;
  font-size: 0.9rem;
  color: var(--nt-text-faint);
  line-height: 1.5;
}

.news-bullets li {
  margin-bottom: 3px;
}

.news-bullet-source {
  font-size: 0.82rem;
  color: var(--nt-link-alt);
  text-decoration: none;
  white-space: nowrap;
}

.news-bullet-source:hover {
  text-decoration: underline;
}

.news-sources {
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--nt-text-muted);
}

/* Ranker evidence line ("3 outlets · found by 3/3 search engines · 2h old").
   Optional — absent on pre-signals cache rows. */
.news-signals {
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--nt-text-muted);
  opacity: 0.8;
  cursor: help;
}

.news-source-link {
  color: var(--nt-link-alt);
  text-decoration: none;
}

.news-source-link:hover {
  text-decoration: underline;
}

/* "Report an error" on every news story — deliberately quiet, same row as
   the sources so the card doesn't grow a button. */
.news-report-link {
  color: var(--nt-text-faint);
  text-decoration: none;
  white-space: nowrap;
}
.news-report-link:hover { color: var(--nt-text-muted); text-decoration: underline; }

/* Per-team badge above stories from a followed team's curated block. Pill
   styling matches the sports date chips so team context reads as one system. */
.news-team-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--nt-link-alt);
  background: rgba(110, 181, 255, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
}

/* League chip on a general ("Around your leagues") story — same slot and shape
   as the team tag, but neutral: it names a league, not one of your teams. */
.news-league-chip {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--nt-text-soft);
  background: var(--nt-surface-raised);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.news-league-chip .sport-icon {
  color: inherit;
}

/* The tag's sport glyph takes the tag's own color, not the muted default. */
.news-team-tag .sport-icon {
  color: inherit;
}

/* Followed team's color, matching its badge in the scoreboard block. */
.news-team-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  background: var(--team);
  box-shadow: 0 0 0 1px var(--nt-border-strong);
}

/* ── Team badge + sport glyph ─────────────────────────────────────────────
   `--team` / `--team-ink` are set inline from ESPN's official hex (validated
   server- and client-side). Without them — briefings cached before colors
   shipped — the badge falls back to a neutral chip. The ring keeps a black
   or white badge visible against either theme's surface. */
.team-badge {
  display: inline-block;
  min-width: 2.6em;
  margin-right: 7px;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.05em;
  text-align: center;
  vertical-align: 0.12em;
  white-space: nowrap;
  color: var(--team-ink, var(--nt-text-soft));
  background: var(--team, var(--nt-surface-pressed));
  box-shadow: 0 0 0 1px var(--nt-border-strong);
}

.sport-icon {
  display: inline-block;
  vertical-align: -0.18em;
  margin-right: 5px;
  color: var(--nt-text-muted);
}

/* ── Sports scoreboard + schedule (favorite teams) ───────────────────────── */

.sports-scoreboard,
.sports-upcoming {
  margin-bottom: 16px;
}

/* Season records — one chip per followed team ("Twins 65–72"). */
.sports-records {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.sports-record-chip {
  background: var(--nt-surface-raised);
  color: var(--nt-text);
  font-size: 0.86rem;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.sports-team {
  font-weight: 600;
  color: var(--nt-text-heading);
}

/* Yesterday's final — raised tile, same visual language as the Markets
   index tiles. */
.sports-final-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--team, transparent) 13%, transparent), transparent 65%),
    var(--nt-surface-raised);
  border-left: 3px solid var(--team, var(--nt-border-strong));
  border-radius: 8px;
  padding: 10px 14px 10px 12px;
  margin-bottom: 8px;
}

.sports-final-tile:last-child {
  margin-bottom: 0;
}

.sports-final-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--nt-text-muted);
  margin-bottom: 2px;
}

.sports-final-matchup {
  font-size: 0.95rem;
  color: var(--nt-text);
}

.sports-final-score {
  text-align: right;
  flex-shrink: 0;
}

.sports-score-num {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--nt-text-heading);
}

.sports-final-result {
  font-size: 0.82rem;
  font-weight: 600;
}

.sports-final-result.win { color: var(--nt-positive); }
.sports-final-result.loss { color: var(--nt-negative); }

/* Upcoming games — aligned fixture rows: date chip, matchup, kickoff time. */
.sports-fixture {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 0;
}

.sports-date-chip {
  flex-shrink: 0;
  min-width: 64px;
  text-align: center;
  background: var(--nt-surface-raised);
  color: var(--nt-text-soft);
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 5px;
  white-space: nowrap;
}

.sports-fixture-matchup {
  flex: 1;
  min-width: 0;
  font-size: 0.95rem;
  color: var(--nt-text);
}

.sports-fixture-time {
  flex-shrink: 0;
  font-size: 0.86rem;
  color: var(--nt-text-muted);
  white-space: nowrap;
}

.sports-season-tag {
  font-size: 0.78rem;
  color: var(--nt-text-muted);
  text-transform: capitalize;
  margin-left: 6px;
}

.sports-offseason {
  margin-bottom: 16px;
  color: var(--nt-text-muted);
  font-size: 0.9rem;
}

/* "Your teams" / "Around your leagues" — headings over the two story runs. */
.sports-stories-label {
  margin-top: 18px;
}

.sports-offseason-teams {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.sports-offseason-team {
  white-space: nowrap;
}

/* ── Recipe ───────────────────────────────────────────────────────────────── */

.recipe-card {
  margin-top: 16px;
  padding: 16px;
  background: rgba(255, 167, 38, 0.06);
  border: 1px solid rgba(255, 167, 38, 0.2);
  border-radius: 8px;
}

.recipe-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.recipe-badge {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 167, 38, 0.15);
  color: var(--nt-warning);
  padding: 3px 8px;
  border-radius: 4px;
}

.recipe-time {
  font-size: 0.82rem;
  color: var(--nt-text-muted);
}

.recipe-title {
  font-size: 1rem;
  color: var(--nt-text-heading);
  margin-bottom: 12px;
}

.recipe-section h4 {
  font-size: 0.86rem;
  color: var(--nt-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.recipe-section ul,
.recipe-section ol {
  padding-left: 20px;
  font-size: 0.9rem;
  color: var(--nt-text-dim);
  line-height: 1.6;
  margin-bottom: 12px;
}

.recipe-source {
  margin-top: 8px;
  font-size: 0.82rem;
}

/* ── Curriculum ───────────────────────────────────────────────────────────── */

.curriculum-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.86rem;
}

.curriculum-track {
  color: var(--nt-link);
  font-weight: 500;
}

.curriculum-progress {
  color: var(--nt-text-muted);
}

.progress-bar {
  height: 4px;
  background: var(--nt-surface-pressed);
  border-radius: 2px;
  margin-bottom: 16px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--nt-link);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.curriculum-title {
  font-size: 1.15rem;
  color: var(--nt-text-heading);
  margin-bottom: 8px;
}

.curriculum-hook {
  font-size: 0.95rem;
  color: var(--nt-text-subtle);
  font-style: italic;
  margin-bottom: 16px;
  line-height: 1.4;
}

.curriculum-content {
  margin-bottom: 16px;
}

.curriculum-content p {
  font-size: 0.95rem;
  color: var(--nt-text-dim);
  line-height: 1.6;
  margin-bottom: 12px;
}

.curriculum-content p:last-child {
  margin-bottom: 0;
}

.curriculum-so-what {
  background: var(--nt-accent-green-bg);
  border-left: 3px solid var(--nt-positive);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 16px;
}

.curriculum-so-what h3 {
  color: var(--nt-positive);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.curriculum-so-what p {
  font-size: 0.95rem;
  color: var(--nt-text-faint);
  line-height: 1.5;
}

.curriculum-questions {
  margin-bottom: 16px;
}

.curriculum-questions h3 {
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--nt-text-muted);
  margin-bottom: 8px;
}

.curriculum-questions ol {
  padding-left: 20px;
}

.curriculum-questions li {
  font-size: 0.95rem;
  color: var(--nt-text-faint);
  line-height: 1.5;
  margin-bottom: 6px;
}

.curriculum-exercise {
  background: var(--nt-lesson-bg);
  border: 1px solid var(--nt-lesson-border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.curriculum-exercise h3 {
  color: var(--nt-lesson-heading);
}

.curriculum-exercise p {
  font-size: 0.95rem;
  color: var(--nt-text-faint);
  line-height: 1.5;
}

.curriculum-exercise pre {
  background: var(--nt-surface-code);
  border-radius: 6px;
  padding: 12px;
  margin-top: 10px;
  overflow-x: auto;
}

.curriculum-exercise code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.86rem;
  color: var(--nt-text);
  white-space: pre;
}

.curriculum-resource {
  background: var(--nt-surface-raised);
  border-radius: 8px;
  padding: 12px 16px;
}

.resource-type {
  display: inline-block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--nt-surface-pressed);
  color: var(--nt-text-subtle);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.curriculum-resource strong {
  display: block;
  font-size: 0.95rem;
  color: var(--nt-link);
  margin-bottom: 4px;
}

.curriculum-resource p {
  font-size: 0.86rem;
  color: var(--nt-text-muted);
  line-height: 1.4;
}

/* Phase 12+: type-aware search link below the resource description.
   We don't trust Haiku to produce real URLs — sending the user to a
   search results page is reliably useful and never broken. */
.resource-search-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--primary, var(--nt-link));
  text-decoration: none;
}
.resource-search-link:hover { text-decoration: underline; }

/* Phase 12+: small inline banner inside the lesson card when the user
   has switched to a different track since today's lesson was generated.
   Mark Complete still works on the cached lesson (advances the paused
   enrollment); the notice just informs about the new track. */
.curriculum-track-changed-notice {
  padding: 10px 14px;
  margin-bottom: 14px;
  background: rgba(110, 181, 255, 0.08);
  border-left: 3px solid var(--primary, var(--nt-link));
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--nt-text-body);
  line-height: 1.5;
}
.curriculum-track-changed-notice strong { color: var(--nt-text-heading); }

/* ── Lesson accuracy review (judge transparency) ────────────────────────────
   Collapsible disclosure summarizing what the automated accuracy reviewer
   concluded — score, reasoning, any flagged notes, and the resource check.
   Served lessons always passed review; this just makes the "why" visible. */
.lesson-review {
  /* The accuracy review is always present as a collapsible disclosure. It
     starts expanded when the reader's `show_verification_details` setting is on
     (the host adds `open` after render); otherwise it sits collapsed to its
     one-line summary. */
  display: block;
  margin-top: 16px;
  background: rgba(110, 181, 255, 0.06);
  border: 1px solid var(--nt-surface-pressed);
  border-radius: 8px;
}
.lesson-review.has-notes {
  background: rgba(229, 178, 87, 0.06);
  border-color: var(--nt-review-notes-border);
}
.lesson-review-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.86rem;
  color: var(--nt-text-accent);
  list-style: none;
  user-select: none;
}
.lesson-review-summary::-webkit-details-marker { display: none; }
.lesson-review-badge {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(102, 187, 106, 0.18);
  color: var(--nt-positive-alt);
  font-size: 0.78rem;
  line-height: 18px;
  text-align: center;
}
.lesson-review.has-notes .lesson-review-badge {
  background: rgba(229, 178, 87, 0.18);
  color: var(--nt-warning-alt);
}
.lesson-review-label { flex: 1; }
.lesson-review-caret {
  flex-shrink: 0;
  font-size: 0.78rem;
  color: var(--nt-text-muted);
  transition: transform 0.15s;
}
.lesson-review[open] .lesson-review-caret { transform: rotate(180deg); }
.lesson-review-body {
  padding: 12px 14px 14px;
  border-top: 1px solid var(--nt-border-divider);
}
.lesson-review-reasoning {
  font-size: 0.86rem;
  color: var(--nt-text-faint);
  line-height: 1.5;
  margin-bottom: 10px;
}
.lesson-review-claims {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lesson-review-claim {
  padding: 8px 10px;
  background: var(--nt-surface-claim);
  border-left: 3px solid var(--nt-text-hint);
  border-radius: 4px;
}
.lesson-review-claim.sev-high { border-left-color: var(--nt-negative); }
.lesson-review-claim.sev-med { border-left-color: var(--nt-warning-alt); }
.lesson-review-claim.sev-low { border-left-color: var(--nt-text-muted); }
.lesson-review-issue {
  display: inline-block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--nt-text-subtle);
  margin-bottom: 3px;
}
.lesson-review-claim-text {
  display: block;
  font-size: 0.86rem;
  color: var(--nt-text-dim);
  line-height: 1.4;
}
.lesson-review-resource {
  font-size: 0.86rem;
  margin-bottom: 8px;
}
.lesson-review-resource.ok { color: var(--nt-positive-alt); }
.lesson-review-resource.warn { color: var(--nt-warning-alt); }
.lesson-review-sources {
  margin-bottom: 8px;
}
.lesson-review-sources-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--nt-text-muted);
  margin-bottom: 4px;
}
.lesson-review-source-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.lesson-review-source-list li {
  margin-bottom: 3px;
}
.lesson-review-source {
  font-size: 0.86rem;
  color: var(--nt-link-source);
  text-decoration: none;
}
.lesson-review-source:hover { text-decoration: underline; }
.lesson-review-source::after {
  content: ' ↗';
  font-size: 0.78rem;
  color: var(--nt-text-disabled);
}
.lesson-review-foot {
  font-size: 0.78rem;
  color: var(--nt-text-muted);
  line-height: 1.5;
  margin-top: 4px;
}

/* ── Deep-read essay ────────────────────────────────────────────────────── */
.essay-title {
  font-size: 1.4rem;
  line-height: 1.4;
  color: var(--nt-text-heading);
  margin: 4px 0 6px;
}
.essay-dek {
  font-size: 1rem;
  color: var(--nt-text-accent);
  line-height: 1.5;
  font-style: italic;
  margin-bottom: 8px;
}
.essay-reading-time {
  display: inline-block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--nt-text-muted);
  margin-bottom: 16px;
}
.essay-body { margin-bottom: 8px; }
.essay-section { margin-bottom: 22px; }
.essay-section h3 {
  font-size: 1.05rem;
  color: var(--nt-text-heading);
  margin-bottom: 8px;
}
.essay-section p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--nt-text-essay);
  margin-bottom: 12px;
}
.essay-takeaways {
  background: rgba(110, 181, 255, 0.06);
  border-left: 3px solid var(--primary, var(--nt-link));
  border-radius: 4px;
  padding: 12px 16px;
  margin: 16px 0;
}
.essay-takeaways h3 {
  font-size: 0.95rem;
  color: var(--nt-text-heading);
  margin-bottom: 8px;
}
.essay-takeaways ul { margin: 0; padding-left: 18px; }
.essay-takeaways li {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--nt-text-body);
  margin-bottom: 6px;
}
.essay-further-reading { margin-top: 16px; }
.essay-further-reading > h3 {
  font-size: 0.95rem;
  color: var(--nt-text-heading);
  margin-bottom: 8px;
}
.essay-reading-item {
  background: var(--nt-surface-raised);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 10px;
}
.essay-reading-item strong {
  display: block;
  font-size: 0.95rem;
  color: var(--nt-link);
  margin: 4px 0;
}
.essay-reading-item p {
  font-size: 0.86rem;
  color: var(--nt-text-muted);
  line-height: 1.4;
}

/* ── Lesson Wikipedia further reading ───────────────────────────────────── */

.lesson-wiki-reading {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--nt-border);
}

.lesson-wiki-reading ul {
  margin: 0;
  padding-left: 1.1rem;
}

.lesson-wiki-reading li {
  margin: 2px 0;
}

/* ── Lesson complete button ────────────────────────────────────────────── */

.btn-lesson-complete {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 12px 24px;
  background: var(--nt-surface-pressed);
  color: var(--nt-link);
  border: 1px solid var(--nt-link);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-lesson-complete:hover {
  background: rgba(110, 181, 255, 0.1);
}

.btn-lesson-complete:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Lesson verification notice ─────────────────────────────────────────── */

.curriculum-verification-notice {
  padding: 16px;
  background: var(--nt-lesson-bg);
  border: 1px solid var(--nt-surface-hover);
  border-radius: 8px;
  margin-top: 12px;
  text-align: center;
  color: var(--nt-text-subtle);
  font-size: 0.95rem;
}

/* ── Lesson error report ────────────────────────────────────────────────── */

.lesson-error-report {
  margin-top: 12px;
  text-align: center;
}

.btn-report-error {
  background: none;
  border: none;
  color: var(--nt-text-muted);
  font-size: 0.86rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px 0;
}
.btn-report-error:hover { color: var(--nt-text-faint); }

.report-error-form {
  margin-top: 10px;
  text-align: left;
}

.report-error-form select,
.report-error-form textarea {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  padding: 8px 10px;
  background: var(--nt-surface);
  color: var(--nt-text-body);
  border: 1px solid var(--nt-surface-hover);
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
}
.report-error-form select:focus,
.report-error-form textarea:focus {
  border-color: var(--nt-link);
  outline: none;
}

.report-error-actions {
  display: flex;
  gap: 8px;
}

.btn-report-submit {
  flex: 1;
  padding: 8px 16px;
  background: var(--nt-surface-pressed);
  color: var(--nt-warning-strong);
  border: 1px solid var(--nt-warning-strong);
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-report-submit:hover { background: rgba(255, 152, 0, 0.1); }
.btn-report-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-report-cancel {
  padding: 8px 16px;
  background: var(--nt-surface-pressed);
  color: var(--nt-text-muted);
  border: 1px solid var(--nt-text-hint);
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
}
.btn-report-cancel:hover { background: var(--nt-surface-hover); }

.report-success {
  color: var(--nt-positive-alt);
  font-size: 0.9rem;
  margin-top: 8px;
}

/* ── Stale briefing banner ───────────────────────────────────────────────── */

.stale-banner {
  background: var(--nt-stale-bg);
  border: 1px solid var(--nt-stale-border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 0.95rem;
  color: var(--nt-stale-text);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stale-icon {
  font-size: 1.1rem;
}

.btn-retry-inline {
  margin-top: 0;
  margin-left: auto;
  padding: 6px 16px;
  font-size: 0.86rem;
}

/* ── Export button ────────────────────────────────────────────────────────── */

.btn-export {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 16px;
  background: transparent;
  color: var(--nt-text-muted);
  border: 1px solid var(--nt-surface-hover);
  border-radius: 6px;
  font-size: 0.86rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-export:hover {
  background: var(--nt-surface-raised);
  color: var(--nt-text);
}

/* ── Refresh hint ────────────────────────────────────────────────────────── */

.refresh-hint {
  font-size: 0.82rem;
  color: var(--nt-text-hint);
  margin-top: 6px;
}

/* ── Section-level skeleton card ─────────────────────────────────────────── */

.card-skeleton {
  background: var(--nt-surface);
  border: 1px solid var(--nt-border);
  border-radius: 12px;
  padding: 24px;
}

.card-skeleton h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--nt-text-heading);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--nt-border);
}

.card-skeleton .skeleton-line {
  height: 14px;
  background: linear-gradient(90deg, var(--nt-skeleton-base) 25%, var(--nt-skeleton-mid) 50%, var(--nt-skeleton-base) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 12px;
}

.card-skeleton .skeleton-line:last-child {
  margin-bottom: 0;
}

/* ── Missing API key card ────────────────────────────────────────────────── */

.card-key-missing {
  background: var(--nt-surface);
  border: 1px solid var(--nt-key-border);
  border-radius: 12px;
  padding: 24px;
}

.card-key-missing h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--nt-text-heading);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--nt-key-border);
}

.key-notice {
  font-size: 0.95rem;
  color: var(--nt-key-text);
  line-height: 1.5;
  margin-bottom: 4px;
}

.key-notice-action {
  font-size: 0.9rem;
  color: var(--nt-text-subtle);
  line-height: 1.5;
  margin-bottom: 12px;
}

.key-notice-action a {
  color: var(--nt-link);
}

/* ── Section error card ──────────────────────────────────────────────────── */

.card-error {
  background: var(--nt-surface);
  border: 1px solid var(--nt-error-border);
  border-radius: 12px;
  padding: 24px;
}

.card-error h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--nt-text-heading);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--nt-error-border);
}

.card-error .error-message {
  font-size: 0.95rem;
  color: var(--nt-negative);
  line-height: 1.5;
  margin-bottom: 12px;
}

/* ── Section refresh button ──────────────────────────────────────────────── */

.btn-section-refresh {
  display: inline-block;
  padding: 8px 20px;
  background: var(--nt-border);
  color: var(--nt-text);
  border: 1px solid var(--nt-surface-hover);
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-section-refresh:hover {
  background: var(--nt-surface-refresh-hover);
}

.btn-section-refresh:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Phase 9: Agenda card ─────────────────────────────────────────────── */
/* Phase 12+: header has the freshness label + refresh button on the right. */
.agenda-header {
  display: flex;
  /* Top-align, not center: the <h2> box includes its 12px underline padding,
     so centering put the actions ~6px below the title text. */
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.agenda-header h2 { margin: 0; }
.agenda-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  /* 28px controls centred on the ~23px title line — same offset the
     mark-as-read toggle has on every other card and on the collapsed stub. */
  margin-top: -3px;
}
.agenda-fetched-at {
  font-size: 0.78rem;
  color: var(--nt-text-muted);
}
.agenda-refresh-btn {
  background: transparent;
  border: 1px solid var(--nt-surface-pressed);
  color: var(--nt-text-soft);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  transition: color 0.15s, border-color 0.15s, transform 0.15s;
}
.agenda-refresh-btn:hover { color: var(--nt-text-heading); border-color: var(--nt-text-hint); }
.agenda-refresh-btn:disabled { opacity: 0.5; cursor: default; }
.agenda-refresh-spinning { animation: agenda-spin 0.8s linear infinite; }
@keyframes agenda-spin { to { transform: rotate(360deg); } }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.agenda-narrative {
  font-size: 0.95rem;
  color: var(--nt-text);
  line-height: 1.5;
  margin-bottom: 12px;
}
.agenda-focus {
  font-size: 0.9rem;
  color: var(--nt-text-soft);
  background: rgba(110, 181, 255, 0.08);
  border: 1px solid rgba(110, 181, 255, 0.2);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 14px;
}
.agenda-focus strong { color: var(--nt-text-heading); }
.agenda-events {
  list-style: none;
  padding: 0;
  margin: 0;
}
.agenda-event {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.95rem;
}
.agenda-event:first-child { border-top: none; }
.agenda-event-time {
  color: var(--nt-text-muted);
  font-feature-settings: 'tnum';
  /* Phase 12+: widened from 56px to fit 'HH:MM–HH:MM' time ranges
     without wrapping. Falls back gracefully to 'HH:MM' alone. */
  min-width: 110px;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.agenda-event-title { flex: 1; color: var(--nt-text); }
.agenda-meeting-pill {
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--nt-meeting-pill-bg);
  color: var(--nt-meeting-pill-text);
  text-transform: lowercase;
}
.agenda-empty {
  font-size: 0.9rem;
  color: var(--nt-text-muted);
  font-style: italic;
  padding: 8px 0;
}

/* ── Phase 9: Week outlook (lives inside the agenda card) ─────────────── */
.week-outlook {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.week-outlook-header {
  font-size: 0.82rem;
  color: var(--nt-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.week-summary {
  font-size: 0.9rem;
  color: var(--nt-text-soft);
  line-height: 1.5;
  margin-bottom: 10px;
}
/* 7-day mini-grid: equal columns, compact density bars */
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
/* Phase 12+: tiles are clickable buttons (select-day action). Reset
   button browser defaults so styling matches the previous div tiles. */
.week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 6px;
  background: var(--nt-surface-week);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: inherit;
  font: inherit;
  cursor: pointer;
  position: relative;
  transition: background 0.12s, border-color 0.12s, transform 0.08s;
}
.week-day:hover {
  background: var(--nt-surface-week-hover);
  border-color: rgba(255, 255, 255, 0.12);
}
.week-day:active { transform: scale(0.97); }
.week-day:focus-visible {
  outline: 2px solid var(--primary, var(--nt-link));
  outline-offset: 2px;
}
.week-day-label {
  font-size: 0.78rem;
  color: var(--nt-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.week-day-count {
  font-size: 1rem;
  color: var(--nt-text-body);
  font-weight: 600;
  font-feature-settings: 'tnum';
  display: flex;
  align-items: center;
  gap: 4px;
}
.week-day-empty .week-day-count {
  color: var(--nt-surface-hover);
  font-weight: 400;
}
.week-day-light  { background: rgba(110, 181, 255, 0.06); }
.week-day-medium {
  background: rgba(110, 181, 255, 0.12);
  border-color: rgba(110, 181, 255, 0.2);
}
.week-day-heavy {
  background: rgba(110, 181, 255, 0.22);
  border-color: rgba(110, 181, 255, 0.4);
}
/* Phase 12+: today's tile gets a distinctive ring + bold day label so the
   user instantly sees where they are. Combines with density bucket. */
.week-day-today {
  border-color: var(--primary, var(--nt-link));
  box-shadow: 0 0 0 1px var(--primary, var(--nt-link)) inset;
}
.week-day-today .week-day-label {
  color: var(--primary, var(--nt-link));
  font-weight: 600;
}

/* Weekend tint — subtle warm wash that doesn't fight with the density
   bucket or today/holiday accents. Mixed via background-blend, not a
   replacement for the density background. */
.week-day-weekend {
  background-color: rgba(255, 200, 110, 0.05);
}
.week-day-light.week-day-weekend  { background-color: rgba(255, 200, 110, 0.09); }
.week-day-medium.week-day-weekend { background-color: rgba(255, 200, 110, 0.14); }
.week-day-heavy.week-day-weekend  { background-color: rgba(255, 200, 110, 0.20); }

/* Federal holiday — gold star in the top-right corner. Visually links
   to the holiday name in the banner above the tile grid. */
.week-day-holiday {
  border-color: rgba(255, 193, 71, 0.5);
}
.week-holiday-star {
  position: absolute;
  top: 3px;
  right: 5px;
  font-size: 0.78rem;
  color: var(--nt-holiday);
  line-height: 1;
}

/* User-clicked day — solid accent fill. Distinct from the today ring so
   when a user is browsing a future day, they can still see where today is. */
.week-day-selected {
  background: rgba(110, 181, 255, 0.28);
  border-color: var(--primary, var(--nt-link));
}
.week-day-selected .week-day-label,
.week-day-selected .week-day-count {
  color: var(--nt-text-heading);
}

/* Phase 12+ v2: agenda layout simplified. Today's section + a tile picker.
   Clicking a future tile expands a small panel below. */
.agenda-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 16px 0 12px;
}
.agenda-week-summary {
  font-size: 0.86rem;
  color: var(--nt-text-muted);
  margin: 0 0 10px 0;
}
.agenda-day-picker {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.agenda-day-panel {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(110, 181, 255, 0.06);
  border: 1px solid rgba(110, 181, 255, 0.18);
  border-radius: 6px;
}
.agenda-day-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: var(--nt-text-heading);
}
.agenda-day-holiday {
  font-size: 0.82rem;
  color: var(--nt-holiday);
  font-weight: 500;
}
.agenda-day-panel .agenda-events { margin-top: 4px; }
.week-allday-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--nt-warning);
  flex-shrink: 0;
}

/* Phase 12+: holidays banner — federal holidays in the next 7 days. Visually
   distinct from notable events (gold accent) so they read as "you should
   know about this" rather than blending into the regular highlight list. */
.week-holidays {
  list-style: none;
  padding: 8px 12px;
  margin: 0 0 12px 0;
  background: rgba(255, 193, 71, 0.08);
  border: 1px solid rgba(255, 193, 71, 0.28);
  border-radius: 6px;
}
.week-holiday-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  font-size: 0.95rem;
}
.week-holiday-item + .week-holiday-item {
  border-top: 1px solid rgba(255, 193, 71, 0.14);
  padding-top: 6px;
  margin-top: 2px;
}
.week-holiday-icon {
  color: var(--nt-holiday);
  flex-shrink: 0;
}
.week-holiday-day {
  color: var(--nt-holiday);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 70px;
}
.week-holiday-name {
  flex: 1;
  color: var(--nt-holiday-name);
  font-weight: 500;
}
.week-holiday-observed {
  color: var(--nt-text-muted);
  font-size: 0.82rem;
  font-weight: 400;
}

.week-notable {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
}
.week-notable-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
}
.week-notable-item:first-child { border-top: none; }
.week-notable-day {
  color: var(--nt-text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 36px;
}
.week-notable-time {
  color: var(--nt-text-subtle);
  font-feature-settings: 'tnum';
  font-size: 0.86rem;
  min-width: 56px;
}
.week-notable-title {
  flex: 1;
  color: var(--nt-text-body);
}
