/* /versiones/ and /en/releases/: the release history. «Tinta y marfil» (docs/brand/BRAND.md): the
   site's tokens only, so each brand's colours apply; the accent marks the big versions. */

.vh-hero { padding-bottom: 28px; }

/* Filters: under the top bar while scrolling. */
.vh-bar { position: sticky; top: 68px; z-index: 5; background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.vh-bar-in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-top: 12px; padding-bottom: 12px; }
.vh-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--paper-2); border: 1px solid var(--line); }
.vh-seg button { appearance: none; border: 0; background: transparent; color: var(--ink-2); font: 600 13.5px/1 var(--sans); height: 32px; padding: 0 12px; border-radius: 8px; cursor: pointer; white-space: nowrap; transition: background 160ms, color 160ms, box-shadow 160ms; }
.vh-seg button:hover { color: var(--ink); }
.vh-seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.vh-search { margin-left: auto; position: relative; display: flex; align-items: center; flex: 1 1 220px; max-width: 320px; color: var(--ink-3); }
.vh-search svg { position: absolute; left: 12px; pointer-events: none; }
.vh-search input { width: 100%; height: 40px; padding: 0 12px 0 36px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 500 14.5px var(--sans); }
.vh-search input::placeholder { color: var(--ink-3); }
.vh-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* «Últimos 30 días»: one column per day, growing in one after another; big versions in the accent. */
.vh-days { margin: 28px 0 0; padding: 18px 20px 14px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--accent-soft) 35%, var(--surface))); box-shadow: var(--shadow-1); max-width: 760px; animation: vh-in 420ms var(--ease) both; }
.vh-days-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px 16px; margin-bottom: 14px; }
.vh-days-title { grid-column: 1 / -1; font: 600 12px/1.2 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.vh-days-total { display: flex; align-items: baseline; gap: 8px; }
.vh-days-total strong { font: 480 40px/1 var(--serif); letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.vh-days-total span { font-size: 14.5px; color: var(--ink-2); }
.vh-days-sub { align-self: center; justify-self: end; font-size: 13px; color: var(--ink-3); text-align: right; }
.vh-days-plot { position: relative; display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 4px; align-items: end; height: 132px; padding-bottom: 1px; border-bottom: 1px solid var(--line-2); background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% 40px; background-position: 0 -1px; }
.vh-day { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; border-radius: 6px 6px 0 0; text-decoration: none; outline: none; }
.vh-day.has { cursor: pointer; }
.vh-day-bar { display: flex; flex-direction: column-reverse; width: 100%; max-width: 18px; height: max(4px, calc(var(--n) * (100% - 16px))); flex: none; border-radius: 5px 5px 2px 2px; overflow: hidden; background: var(--line); transform-origin: bottom; animation: vh-grow 640ms var(--ease) backwards; animation-delay: calc(var(--i) * 18ms); transition: filter 160ms, transform 160ms; }
.vh-day:not(.has) .vh-day-bar { height: 4px; opacity: 0.7; }
.vh-day-seg { flex: var(--k) 1 0; min-height: 0; }
.vh-day-seg.big { background: var(--accent); }
.vh-day-seg.patch { background: color-mix(in srgb, var(--accent) 62%, var(--surface)); }
.vh-day-n { margin-bottom: 4px; font: 600 11px/1 var(--sans); color: var(--ink-2); font-variant-numeric: tabular-nums; animation: vh-in 420ms var(--ease) backwards; animation-delay: calc(var(--i) * 18ms + 380ms); }
.vh-day.has:hover .vh-day-n, .vh-day.has:focus-visible .vh-day-n { color: var(--accent); }
.vh-day.has:hover .vh-day-bar, .vh-day.has:focus-visible .vh-day-bar { transform: scaleY(1.04); filter: brightness(1.12); }
.vh-day.has:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.vh-day.today::after { content: ""; position: absolute; bottom: -7px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--accent); }
@keyframes vh-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.vh-day-tip { position: absolute; bottom: calc(100% + 8px); left: 50%; z-index: 3; display: flex; flex-direction: column; gap: 2px; padding: 7px 10px; border-radius: 9px; background: var(--ink); color: var(--paper); font: 500 12px/1.35 var(--sans); white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(-50%, 4px); transition: opacity 140ms, transform 140ms; }
.vh-day-tip strong { font-weight: 650; }
.vh-day:nth-child(-n + 5) .vh-day-tip { left: 0; transform: translate(0, 4px); }
.vh-day:nth-last-child(-n + 5) .vh-day-tip { left: auto; right: 0; transform: translate(0, 4px); }
.vh-day:hover .vh-day-tip, .vh-day:focus-visible .vh-day-tip { opacity: 1; transform: translate(-50%, 0); }
.vh-day:nth-child(-n + 5):hover .vh-day-tip, .vh-day:nth-child(-n + 5):focus-visible .vh-day-tip, .vh-day:nth-last-child(-n + 5):hover .vh-day-tip, .vh-day:nth-last-child(-n + 5):focus-visible .vh-day-tip { transform: none; }
.vh-days-axis { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.vh-days-axis .today { color: var(--accent); font-weight: 600; }
.vh-days-legend { display: flex; gap: 16px; margin: 10px 0 0; font-size: 12.5px; color: var(--ink-2); }
.vh-days-legend span { display: inline-flex; align-items: center; gap: 6px; }
.vh-days-legend span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; }
.vh-days-legend .big::before { background: var(--accent); }
.vh-days-legend .patch::before { background: color-mix(in srgb, var(--accent) 62%, var(--surface)); }
@media (max-width: 760px) {
  .vh-days { padding: 16px 14px 12px; }
  .vh-days-plot { gap: 2px; height: 96px; background-size: 100% 32px; }
  .vh-days-head { grid-template-columns: 1fr; }
  .vh-days-sub { justify-self: start; text-align: left; }
  .vh-days-total strong { font-size: 34px; }
}

/* The period at a glance: the numbers and the rhythm of versions. */
.vh-overview { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 36px 0 8px; }
.vh-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-1); overflow: hidden; }
.vh-stats > div { padding: 18px 20px; border-left: 1px solid var(--line); min-width: 0; }
.vh-stats > div:first-child { border-left: 0; }
.vh-stats dt { font: 600 12px/1.2 var(--sans); letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); }
.vh-stats dd { margin: 8px 0 0; font: 480 34px/1 var(--serif); letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.vh-latest dd { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.vh-latest dd a { color: var(--accent); text-decoration: none; }
.vh-latest dd a:hover { text-decoration: underline; }
.vh-latest dd span { font: 500 13.5px/1.3 var(--sans); color: var(--ink-3); letter-spacing: 0; }

.vh-chart { margin: 0; padding: 14px 18px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.vh-chart svg { width: 100%; height: 92px; overflow: visible; }
.vh-mark { cursor: pointer; }
.vh-axis { stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.vh-mark line { stroke: var(--line-2); stroke-width: 2; vector-effect: non-scaling-stroke; transition: stroke 160ms; }
.vh-mark circle { fill: var(--surface); stroke: var(--ink-3); stroke-width: 1.6; vector-effect: non-scaling-stroke; transition: fill 160ms, stroke 160ms; }
.vh-mark.big circle { fill: var(--accent); stroke: var(--accent); }
.vh-mark.big line { stroke: color-mix(in srgb, var(--accent) 45%, var(--line-2)); }
.vh-mark:hover line, .vh-mark:focus-visible line { stroke: var(--ink); }
.vh-mark:hover circle, .vh-mark:focus-visible circle { stroke: var(--ink); fill: var(--ink); }
.vh-ticks { display: flex; justify-content: space-between; margin-top: 4px; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* The list: a timeline of versions grouped by month. */
.vh-list { position: relative; padding: 18px 0 96px; }
.vh-loading, .vh-empty { padding: 56px 0; color: var(--ink-3); text-align: center; }
.vh-empty p { color: var(--ink-2); font-size: 16.5px; margin-bottom: 18px; }
.vh-loading { animation: vh-pulse 1.4s var(--ease) infinite alternate; }
@keyframes vh-pulse { from { opacity: 0.45; } to { opacity: 1; } }
.vh-month { margin: 40px 0 6px; padding-left: 232px; }
.vh-month:first-child { margin-top: 18px; }
.vh-month span { display: inline-block; padding: 6px 10px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); color: var(--ink-2); letter-spacing: 0.08em; }

.vh-release { position: relative; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; padding: 30px 0; border-top: 1px solid var(--line); scroll-margin-top: 150px; animation: vh-in 420ms var(--ease) both; }
.vh-month + .vh-release { border-top: 0; }
@keyframes vh-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.vh-release::before { content: ""; position: absolute; left: 214px; top: 40px; width: 9px; height: 9px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink-3); }
.vh-release.big::before { background: var(--accent); border-color: var(--accent); width: 11px; height: 11px; left: 213px; top: 39px; box-shadow: 0 0 0 4px var(--accent-soft); }
.vh-list::before { content: ""; position: absolute; left: 220px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.vh-release:target .vh-meta h2 { color: var(--accent); }
.vh-release:target { background: linear-gradient(90deg, transparent, var(--accent-soft) 40%, transparent); }

.vh-meta { position: relative; align-self: start; }
.vh-meta h2 { font: 480 32px/1 var(--serif); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.vh-release.patch .vh-meta h2 { font-size: 26px; color: var(--ink-2); }
.vh-date { margin-top: 10px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--ink-2); }
.vh-date span { font-size: 13px; color: var(--ink-3); }
.vh-badges { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.vh-badge { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; font: 600 12px/1 var(--sans); border: 1px solid var(--line); background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.vh-badge.big { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.vh-badge.now { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.vh-badge.rolling { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.vh-link { position: absolute; top: 4px; right: 34px; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; color: var(--ink-3); opacity: 0; transition: opacity 160ms, background 160ms, color 160ms; }
.vh-release:hover .vh-link, .vh-link:focus-visible { opacity: 1; }
.vh-link:hover { background: var(--paper-2); color: var(--ink); }
.vh-link[data-copied]::after { content: attr(data-copied); position: absolute; left: 34px; top: 4px; padding: 3px 8px; border-radius: 6px; background: var(--ink); color: var(--paper); font: 600 12px/1.4 var(--sans); white-space: nowrap; }

.vh-body { max-width: 760px; min-width: 0; }
.vh-body h3 { font: 600 17px/1.35 var(--sans); letter-spacing: 0; color: var(--ink); margin: 26px 0 8px; }
.vh-body h3:first-child, .vh-found + h3 { margin-top: 2px; }
.vh-body ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.vh-body li { position: relative; padding-left: 20px; color: var(--ink-2); font-size: 16px; line-height: 1.6; }
.vh-body li::before { content: ""; position: absolute; left: 3px; top: 0.72em; width: 6px; height: 1.5px; border-radius: 2px; background: var(--ink-3); }
.vh-release.big .vh-body li::before { background: var(--accent); }
.vh-quiet { color: var(--ink-3); font-style: italic; }
.vh-found { margin-bottom: 12px; font: 600 12.5px/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.vh-hit { background: var(--accent-soft); color: var(--ink); border-radius: 3px; padding: 0 2px; }
.vh-more { margin-top: 16px; appearance: none; border: 1px dashed var(--line-2); background: transparent; color: var(--accent); font: 600 14px/1 var(--sans); height: 36px; padding: 0 14px; border-radius: 9px; cursor: pointer; transition: border-color 160ms, background 160ms; }
.vh-more:hover { border-color: var(--accent); background: var(--accent-soft); }

@media (max-width: 860px) {
  .vh-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vh-stats > div:nth-child(3) { border-left: 0; }
  .vh-stats > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .vh-bar { position: static; }
  .vh-bar-in { padding-top: 10px; padding-bottom: 10px; gap: 8px; }
  .vh-seg { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .vh-seg::-webkit-scrollbar { display: none; }
  .vh-seg button { flex: 1 0 auto; padding: 0 10px; }
  .vh-search { max-width: none; margin-left: 0; flex-basis: 100%; }
  .vh-list::before { left: 4px; }
  .vh-month { padding-left: 22px; }
  .vh-release { grid-template-columns: 1fr; gap: 14px; padding: 24px 0 24px 22px; scroll-margin-top: 84px; }
  .vh-release::before { left: -2px; top: 32px; }
  .vh-release.big::before { left: -3px; top: 31px; }
  .vh-link { right: 0; opacity: 1; }
  .vh-date { flex-direction: row; flex-wrap: wrap; gap: 4px 10px; }
  .vh-stats dd { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .vh-release, .vh-loading, .vh-days, .vh-day-bar, .vh-day-n { animation: none; }
}
@media print {
  .vh-bar, .vh-chart, .vh-link, .vh-more, .vh-day-tip { display: none !important; }
}
