/* Monthly recap hub (/recap) and recap articles (/recap/<month>-<year>). Built by scripts/updates/build.mjs.
   Kind colours match the /updates badges: devaluation red, revaluation green, launch indigo, offer blue. */
.rc, .rc-art {
  --rc-devaluation: #dc2626;
  --rc-revaluation: #047857;
  --rc-launch: #4f46e5;
  --rc-offer: #1d4ed8;
  --rc-other: var(--muted);
}
html[data-theme="dark"] :is(.rc, .rc-art) {
  --rc-devaluation: #ff6b6b;
  --rc-revaluation: #34d399;
  --rc-launch: #a5b4fc;
  --rc-offer: #60a5fa;
}

.rc-feature { display: grid; gap: 16px; }
@media (min-width: 960px) { .rc-feature { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px; } }

/* Latest recap card */
.rc-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 200ms ease-out, box-shadow 200ms ease-out;
}
@media (min-width: 720px) { .rc-card { padding: 36px; } }
@media (hover: hover) {
  .rc-card:hover { border-color: var(--line-strong); box-shadow: 0 1px 2px rgb(0 0 0 / 0.03), 0 18px 40px -22px rgb(0 0 0 / 0.22); }
  .rc-card:hover .rc-go svg { translate: 3px 0; }
}
.rc-card-top { display: flex; align-items: center; gap: 10px; }
.rc-month { font-size: 0.9375rem; font-weight: 600; color: var(--up-accent); }
.rc-latest {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--up-brand);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}
.rc-card-title {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.rc-card-sum { max-width: 60ch; color: var(--muted); font-size: 1rem; line-height: 1.55; text-wrap: pretty; }

/* Count row: one number per kind of change */
.up .rc-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 8px;
  margin-block-start: 6px;
}
.rc-stats li {
  display: grid;
  gap: 2px;
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: var(--up-fill);
}
.rc-stats strong {
  font-size: 2rem;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--rc-kind, var(--text));
}
.rc-stats span { font-size: 0.8125rem; color: var(--muted); }
:is(.rc-stats li, .rc-next li)[data-kind="devaluation"] { --rc-kind: var(--rc-devaluation); }
:is(.rc-stats li, .rc-next li)[data-kind="revaluation"] { --rc-kind: var(--rc-revaluation); }
:is(.rc-stats li, .rc-next li)[data-kind="launch"] { --rc-kind: var(--rc-launch); }
:is(.rc-stats li, .rc-next li)[data-kind="offer"] { --rc-kind: var(--rc-offer); }
:is(.rc-stats li, .rc-next li)[data-kind="other"] { --rc-kind: var(--rc-other); }

.rc-go { display: inline-flex; align-items: center; gap: 6px; margin-block-start: 4px; font-weight: 600; }
.rc-go svg { flex: none; transition: translate 200ms var(--up-ease); }

/* Coming next month */
.rc-next {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
}
.rc-next h2 { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.02em; }
.rc-next ol { display: grid; margin-block-start: 14px !important; }
.rc-next li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  padding-block: 11px;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  line-height: 1.45;
}
.rc-next li:first-child { border-top: 0; }
.rc-next-date { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Every recap */
.rc-all { margin-block-start: 64px; }
.rc-all h2 { font-size: 1.5rem; font-weight: 650; letter-spacing: -0.02em; }
.up .rc-months {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-block-start: 18px;
}
.rc-month-card {
  position: relative;
  display: grid;
  gap: 4px;
  height: 100%;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
a.rc-month-card svg { position: absolute; top: 22px; right: 20px; color: var(--muted); transition: translate 200ms var(--up-ease); }
@media (hover: hover) {
  a.rc-month-card:hover { border-color: var(--line-strong); }
  a.rc-month-card:hover svg { translate: 3px 0; color: var(--text); }
}
.rc-month-card.is-next { border-style: dashed; background: transparent; }
.rc-month-card.is-next .rc-month-name { color: var(--muted); }
.rc-month-name { font-size: 1.0625rem; font-weight: 650; letter-spacing: -0.01em; }
.rc-month-meta { font-size: 0.875rem; color: var(--muted); }
.rc-empty { color: var(--muted); }

/* ==========================================================================
   Recap article (/recap/<month>-<year>)
   ========================================================================== */
.rc-art { --rc-mess: #b45309; }
html[data-theme="dark"] .rc-art { --rc-mess: #fbbf24; }
.up-article.rc-art .rv-article { max-width: 760px; }
@media (min-width: 960px) {
  .up-article.rc-art .rv-body { grid-template-columns: 190px minmax(0, 1fr); gap: 56px; }
}
.rc-art [data-kind="devaluation"] { --rc-kind: var(--rc-devaluation); }
.rc-art [data-kind="revaluation"] { --rc-kind: var(--rc-revaluation); }
.rc-art [data-kind="launch"] { --rc-kind: var(--rc-launch); }
.rc-art [data-kind="offer"] { --rc-kind: var(--rc-offer); }
.rc-art [data-kind="other"] { --rc-kind: var(--rc-other); }
.rc-art [data-kind="mess"] { --rc-kind: var(--rc-mess); }

/* At a glance: counts that double as filters */
.rc-glance-wrap > p { margin: 0 0 20px; color: var(--text); font-size: 1.0625rem; line-height: 1.6; }
.rc-glance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 720px) { .rc-glance { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.rc-filter {
  display: grid;
  justify-items: start;
  gap: 4px;
  min-height: 84px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease-out, background-color 160ms ease-out, scale 120ms ease-out;
}
.rc-filter strong { font-size: 1.75rem; font-weight: 650; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--rc-kind, var(--text)); }
.rc-filter span { font-size: 0.8125rem; line-height: 1.25; color: var(--muted); }
.rc-filter[aria-pressed="true"] { border-color: var(--rc-kind, var(--text)); box-shadow: inset 0 0 0 1px var(--rc-kind, var(--text)); }
.rc-filter[data-filter="all"][aria-pressed="true"] { background: var(--text); border-color: var(--text); box-shadow: none; }
.rc-filter[data-filter="all"][aria-pressed="true"] :is(strong, span) { color: var(--page); }
.rc-filter:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.rc-filter:active { scale: 0.97; }
@media (hover: hover) { .rc-filter:hover { border-color: var(--line-strong); } }
.rc-filter-note { margin: 12px 0 0; font-size: 0.875rem; color: var(--muted); }

/* Ten-day blocks */
.rc-period h2 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.rc-count { font-size: 0.875rem; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.rc-timeline { position: relative; display: grid; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.rc-item {
  position: relative;
  display: grid;
  grid-template-columns: 48px 40px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 16px 18px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}
.rc-date { display: grid; justify-items: center; padding: 8px 0 6px; line-height: 1; border-radius: 12px; background: color-mix(in srgb, var(--rc-kind) 10%, transparent); }
.rc-day { font-size: 1.5rem; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--rc-kind); }
.rc-mon { margin-top: 4px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.rc-logo {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.rc-logo img { width: 30px; height: 30px; object-fit: contain; }
.rc-logo-letter { background: var(--up-fill-strong); color: var(--text); font-weight: 700; font-size: 1.0625rem; }
.rc-item-body { display: grid; justify-items: start; gap: 6px; min-width: 0; }
.rc-badge {
  padding: 2px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--rc-kind) 12%, transparent);
  color: var(--rc-kind);
  font-size: 0.75rem;
  font-weight: 700;
}
.rc-art .rc-text { margin: 0; font-size: 1rem; line-height: 1.55; text-wrap: pretty; }
.rc-art .rv-article a.rc-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}
.rc-art .rv-article a.rc-cta.is-own { color: var(--up-accent); }
.rc-cta svg { flex: none; transition: translate 200ms var(--up-ease); }
@media (hover: hover) {
  .rc-art .rv-article a.rc-cta:hover { color: var(--text); }
  .rc-art .rv-article a.rc-cta:hover svg { translate: 2px 0; }
}
@media (max-width: 520px) {
  .rc-item { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 14px 14px 14px 12px; }
  .rc-item .rc-logo { display: none; }
}

/* Highlights */
.rc-highlights { display: grid; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .rc-highlights { grid-template-columns: 1fr 1fr; } }
.rc-hl {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--rc-kind);
  border-radius: 20px;
  background: var(--surface);
}
.rc-hl-label { font-size: 0.8125rem; font-weight: 700; color: var(--rc-kind); text-transform: uppercase; letter-spacing: 0.04em; }
.rc-hl-who { display: flex; align-items: center; gap: 10px; font-size: 1.125rem; }
.rc-hl-who .rc-logo { width: 34px; height: 34px; border-radius: 10px; }
.rc-hl-who .rc-logo img { width: 26px; height: 26px; }
.rc-art .rc-hl p { margin: 0; color: var(--muted); font-size: 0.9375rem; line-height: 1.5; }

/* Coming next month */
.rc-upcoming { display: grid; margin: 20px 0 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); overflow: hidden; }
.rc-upcoming li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  line-height: 1.45;
}
.rc-upcoming li:first-child { border-top: 0; }
.rc-up-date { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rc-up-when { font-size: 0.8125rem; font-weight: 600; white-space: nowrap; color: var(--muted); }
.rc-up-when:empty { display: none; }
.rc-up-when[data-state="soon"] { padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--up-brand) 14%, transparent); color: var(--up-accent); }
.rc-up-when[data-state="past"] { color: var(--rc-revaluation); }
@media (max-width: 520px) {
  .rc-upcoming li { grid-template-columns: 52px minmax(0, 1fr); padding: 13px 14px; }
  .rc-up-when { grid-column: 2; justify-self: start; }
}

/* What I'd do: numbered */
.rc-art .rv-article .rc-prose ul { counter-reset: rc-step; display: grid; gap: 10px; margin: 16px 0 0; padding: 0; list-style: none; }
.rc-art .rv-article .rc-prose li::marker { content: none; }
.rc-art .rv-article .rc-prose li { margin: 0; counter-increment: rc-step; position: relative; padding: 14px 16px 14px 52px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.rc-prose li::before {
  content: counter(rc-step);
  position: absolute;
  top: 13px;
  left: 14px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--up-brand);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
}

/* Pager */
.rc-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border: 1px dashed var(--line-strong); border-radius: 20px; }
.rc-art .rv-article a.rc-pager-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.rc-art .rc-pager-next { margin: 0; color: var(--muted); font-size: 0.9375rem; }
.rc-pager-next span { margin-inline-end: 8px; font-weight: 600; color: var(--text); }

/* Filters hide items with [hidden]; keep that stronger than the grid/flex display rules above. */
.rc-item[hidden],
.rc-period[hidden],
.rc-filter-note[hidden] { display: none !important; }
