/* The redesigned home page, a prototype at /home-v2/ (templates/home_v2.html): an archive's front door
   in the 2009 colours. Blue #069 for links and titles, red #C00 on hover, greys #F7F7F7 / #CCC / #666,
   dotted separators; the section colours as tags, top borders and bars (--c), with the text-safe
   shade (--ct) wherever white text sits on them. The theme's fonts are kept. Everything is scoped to
   this page: .hv-* classes,. */

.hv-home { padding-block: 24px 40px; }
.hv-sr { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hv-date { color: var(--t9-color-text-faint); font-size: 0.8em; white-space: nowrap; }
.hv-tag { display: inline-block; padding: 1px 10px; background: var(--ct, var(--t9-color-text-dim)); color: var(--al-color-on-accent); font-weight: 700;
  font-size: 0.85em; text-decoration: none; box-shadow: 2px 2px 0 var(--al-color-line-strong); }
.hv-tag:hover { background: var(--al-color-accent); color: var(--al-color-on-accent); }
.hv-tag--sm { padding: 0 6px; font-size: 0.8em; box-shadow: none; }

/* ---- blocks ------------------------------------------------------------------------------------- */
.hv-block { margin-block-start: 36px; }
.hv-block__title { margin: 0 0 14px; color: var(--al-color-text); font-size: 1.3em; font-weight: 700; }
.hv-block__foot { margin: 10px 0 0; font-size: 0.9em; text-align: end; }

/* ---- 1. the archive at a glance ------------------------------------------------------------------ */
.hv-intro { padding: 22px 24px; background: var(--al-color-surface-sunk); border-block-start: 3px solid var(--al-color-accent); text-align: center; }
.hv-intro__title { margin: 0; color: var(--al-color-accent); font-size: 2em; font-weight: 700; }
.hv-intro__lede { margin: 6px 0 16px; color: var(--t9-color-text-soft); }   /* then the numbers (search is in the header) */
.hv-search { display: flex; gap: 6px; max-inline-size: 36rem; margin: 0 auto 16px; }
.hv-search__input { flex: 1; min-inline-size: 0; font-size: 1.05em; }
.hv-search__go { display: inline-flex; align-items: center; gap: 6px; background: var(--al-color-accent); border-color: var(--al-color-accent); }
.hv-search__go:hover { background: var(--al-color-accent-hover); border-color: var(--al-color-accent-hover); }
.hv-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 28px; margin: 0; padding: 0; list-style: none; color: var(--al-color-text-muted); }
.hv-stats b { color: var(--al-color-text); font-size: 1.35em; }
.hv-stats a { color: inherit; text-decoration: none; }
.hv-stats a:hover { color: var(--al-color-accent-hover); }

/* ---- 2. the timeline ---------------------------------------------------------------------------- */
.hv-tl { display: flex; gap: 10px; align-items: flex-end; overflow-x: auto; padding-block-end: 4px; }
/* every month's bar the same width: a year is as wide as its number of months (--n, set in index.html;
   2004 and 2010 are partial years) */
.hv-tl__year { flex: var(--n, 12) 1 0; display: flex; flex-direction: column; align-items: stretch; gap: 4px;
  min-inline-size: calc(var(--n, 12) * 0.625rem); }
.hv-tl__bars { display: flex; align-items: flex-end; gap: 2px; block-size: 110px; border-block-end: 1px solid var(--al-color-line); }
.hv-tl__bar { flex: 1; min-inline-size: 6px; block-size: max(var(--h), 2px); display: flex; flex-direction: column-reverse; }
.hv-tl__bar span { display: block; background: var(--c); min-block-size: 1px; }
.hv-tl__bar:hover { outline: 2px solid var(--al-color-accent-hover); outline-offset: 1px; }
.hv-tl__label { text-align: center; color: var(--al-color-text); font-weight: 700; text-decoration: none; }
.hv-tl__label span { color: var(--t9-color-text-faint); font-weight: 400; font-size: 0.85em; }
.hv-tl__label:hover { color: var(--al-color-accent-hover); }
.hv-tl__label--short { font-size: 0.75em; white-space: nowrap; }
.hv-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 10px 0 0; padding: 0; list-style: none; color: var(--al-color-text-muted); font-size: 0.8em; }
.hv-legend li::before { content: ""; display: inline-block; inline-size: 10px; block-size: 10px; margin-inline-end: 5px; background: var(--c); vertical-align: middle; }

/* ---- 3. the sections as shelves ----------------------------------------------------------------- */
.hv-shelves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.hv-shelf { display: flex; flex-direction: column; padding: 12px 14px 12px; border: 1px solid var(--al-color-line); border-block-start: 4px solid var(--c); background: var(--al-color-surface); }
.hv-shelf__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-block-end: 10px; }
.hv-shelf__meta { color: var(--t9-color-text-faint); font-size: 0.8em; }
.hv-feature { display: block; color: inherit; text-decoration: none; }
.hv-feature__img { float: left; inline-size: 120px; block-size: 90px; object-fit: cover; margin: 3px 12px 6px 0; }
.hv-feature__title { display: block; color: var(--al-color-accent); font-weight: 700; font-size: 1.1em; line-height: 1.35; }
.hv-feature:hover .hv-feature__title { color: var(--al-color-accent-hover); text-decoration: underline; }
.hv-feature__summary { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
  margin-block-start: 4px; color: var(--t9-color-text-soft); font-size: 0.9em; line-height: 1.6; }
.hv-feature::after { content: ""; display: block; clear: both; }
.hv-heads { margin: 10px 0 0; padding: 0; list-style: none; }
.hv-heads li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 0;
  background: url(/2009/dot.gif) repeat-x left top; font-size: 0.9em; line-height: 1.45; }
.hv-heads a { color: var(--al-color-accent); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-inline-size: 0; }
.hv-heads a:hover { color: var(--al-color-accent-hover); text-decoration: underline; }
.hv-more { margin-block-start: auto; padding-block-start: 10px; align-self: flex-end; color: var(--al-color-text-muted); font-size: 0.85em; text-decoration: none; }
.hv-more:hover { color: var(--al-color-accent-hover); }

/* ---- 4. on this day: one random article per year, as a ribbon with arrows (js/home.js) --------- */
.hv-otd[hidden] { display: none; }
.hv-otd .t9-otd__day { color: var(--t9-color-text-faint); font-weight: 400; font-size: 0.8em; }
.hv-ribbon-wrap { position: relative; }
.hv-ribbon { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(14rem, calc((100% - 36px) / 4)); gap: 12px;
  overflow-x: auto; scroll-snap-type: inline mandatory; scroll-padding-inline: 4px; scrollbar-width: none;
  margin: 0; padding: 2px 4px 8px; list-style: none; }
.hv-ribbon::-webkit-scrollbar { display: none; }
.hv-ribbon:focus-visible { outline: 2px solid var(--al-color-accent); outline-offset: 2px; }
.hv-ribbon li { scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px;
  background: var(--al-color-surface-sunk); border-block-start: 3px solid var(--al-color-accent); }
.hv-ribbon__year { color: var(--t9-color-text-faint); font-size: 1.5em; font-weight: 700; line-height: 1; }
.hv-ribbon a { color: var(--al-color-accent); font-weight: 700; text-decoration: none; line-height: 1.4;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.hv-ribbon a:hover { color: var(--al-color-accent-hover); text-decoration: underline; }
.hv-ribbon__date { margin-block-start: auto; color: var(--t9-color-text-faint); font-size: 0.8em; }
/* arrows over the ends, with a fade so the cut-off card reads as "more this way" */
.hv-ribbon__nav { position: absolute; inset-block-start: 50%; translate: 0 -50%; z-index: 2; display: grid; place-items: center;
  inline-size: 2.4rem; block-size: 2.4rem; border: 1px solid var(--al-color-line); border-radius: 50%; background: var(--al-color-surface); color: var(--al-color-accent);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); cursor: pointer; }
.hv-ribbon__nav[hidden] { display: none; }
.hv-ribbon__nav:hover:not(:disabled) { color: var(--al-color-on-accent); background: var(--al-color-accent); border-color: var(--al-color-accent); }
.hv-ribbon__nav:disabled { opacity: 0.35; cursor: default; box-shadow: none; }
.hv-ribbon__nav--back { inset-inline-start: -14px; }
.hv-ribbon__nav--next { inset-inline-end: -14px; }
/* the arrows are drawn in the template, pointing outward from their ends (the site is right to left) */
.hv-ribbon__icon { display: block; }
.hv-linkbutton { padding: 0; border: 0; background: none; color: var(--al-color-accent); font: inherit; cursor: pointer; }
.hv-linkbutton:hover { color: var(--al-color-accent-hover); text-decoration: underline; }

/* ---- each section's five most commented, one box per section ----------------------------------- */
.hv-best { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 22px; }
.hv-best__box { padding: 12px 14px 6px; border: 1px solid var(--al-color-line); border-block-start: 3px solid var(--ct); }
.hv-best__head { margin: 0 0 6px; font-size: 1em; }
.hv-best__list { margin: 0; padding: 0; list-style: none; }
.hv-best__list li { display: flex; gap: 10px; padding: 8px 0; background: url(/2009/dot.gif) repeat-x left top; }
.hv-best__list li:first-child { background: none; }
.hv-best__rank { flex: none; display: grid; place-items: center; inline-size: 1.6rem; block-size: 1.6rem; border-radius: 50%;
  background: var(--ct); color: var(--al-color-on-accent); font-size: 0.8em; font-weight: 700; }
.hv-best__body { display: flex; flex-direction: column; gap: 3px; min-inline-size: 0; }
.hv-best__title { color: var(--al-color-accent); font-weight: 700; text-decoration: none; line-height: 1.4; font-size: 0.95em; }
.hv-best__title:hover { color: var(--al-color-accent-hover); text-decoration: underline; }
.hv-best__meta { color: var(--t9-color-text-faint); font-size: 0.78em; }


/* ---- 6. the writers ------------------------------------------------------------------------------- */
.hv-writers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 14px; margin: 0; padding: 0; list-style: none; }
.hv-writers a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  color: inherit; text-decoration: none; }
.hv-writer__initial { grid-row: 1 / 3; display: grid; place-items: center; inline-size: 2.6rem; block-size: 2.6rem; border-radius: 50%;
  background: var(--ct); color: var(--al-color-on-accent); font-weight: 700; font-size: 1.1em; }
.hv-writer__name { color: var(--al-color-accent); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hv-writers a:hover .hv-writer__name { color: var(--al-color-accent-hover); text-decoration: underline; }
.hv-writer__meta { color: var(--t9-color-text-faint); font-size: 0.8em; }

/* ---- narrow screens ---------------------------------------------------------------------------- */
@media (max-width: 52rem) {
  .hv-home { padding-block-start: 12px; }
  .hv-intro { padding: 16px; }
  .hv-intro__title { font-size: 1.5em; }
  .hv-search__go span { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
  .hv-shelves, .hv-best { grid-template-columns: minmax(0, 1fr); }
  .hv-writers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hv-tl__year { min-inline-size: calc(var(--n, 12) * 0.75rem); flex: 0 0 auto; }
  .hv-ribbon { grid-auto-columns: 78%; }
  .hv-ribbon__nav--back { inset-inline-start: -6px; }
  .hv-ribbon__nav--next { inset-inline-end: -6px; }
}

/* every writer: a clear toggle (and a link to the authors page), then a filterable list (js/home.js) */
.hv-writers-more { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; margin-block-start: 18px; }
.hv-allwriters { flex: 1 1 auto; }                     /* the toggle first; the panel takes the row when open */
.hv-allwriters__toggle { list-style: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px;
  border: 1px solid var(--al-color-accent); background: var(--al-color-accent); color: var(--al-color-on-accent); font-weight: 700; cursor: pointer; user-select: none; }
.hv-allwriters__toggle::-webkit-details-marker { display: none; }
.hv-allwriters__toggle:hover { background: var(--al-color-accent-hover); border-color: var(--al-color-accent-hover); }
.hv-allwriters__toggle:focus-visible { outline: 2px solid var(--al-color-accent); outline-offset: 2px; }
.hv-allwriters__close { display: none; }
.hv-allwriters[open] .hv-allwriters__open { display: none; }
.hv-allwriters[open] .hv-allwriters__close { display: inline; }
.hv-allwriters__chevron { transition: transform 0.15s ease; }
.hv-allwriters[open] .hv-allwriters__chevron { transform: rotate(180deg); }
.hv-allwriters__panel { margin-block-start: 12px; padding: 14px; border: 1px solid var(--al-color-line); background: var(--al-color-surface-sunk); }
.hv-allwriters__filter { inline-size: 100%; max-inline-size: 22rem; margin-block-end: 12px; }
/* row by row, so the most-articles-first order reads across, then down */
.hv-allwriters__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0 24px;
  margin: 0; padding: 0; list-style: none; font-size: 0.9em; max-block-size: 28rem; overflow-y: auto; }
.hv-allwriters__list li { padding: 3px 0; }
.hv-allwriters__list li[hidden] { display: none; }
.hv-allwriters__list a { color: var(--al-color-accent); text-decoration: none; }
.hv-allwriters__list a:hover { color: var(--al-color-accent-hover); text-decoration: underline; }
.hv-allwriters__none { margin: 0; color: var(--t9-color-text-faint); }
.hv-button-outline { display: inline-flex; align-items: center; padding: 8px 16px; border: 1px solid var(--al-color-accent); color: var(--al-color-accent);
  font-weight: 700; text-decoration: none; background: var(--al-color-surface); }
.hv-button-outline:hover { border-color: var(--al-color-accent-hover); color: var(--al-color-accent-hover); }

/* ---- 1+2. the archive at a glance and the timeline, one full-width block (templates/index.html, .hv-hero) ---- */
.hv-hero { padding: 28px 32px 22px; background: var(--al-color-surface-sunk); border-block-start: 4px solid var(--al-color-accent); }
.hv-hero__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 40px; }
.hv-hero__intro { flex: 1 1 22rem; min-inline-size: 0; }
.hv-hero__title { margin: 0; color: var(--al-color-accent); font-size: 2.1em; font-weight: 700; line-height: 1.2; }
.hv-hero__lede { margin: 8px 0 0; color: var(--t9-color-text-soft); line-height: 1.7; }
.hv-hero__stats { display: flex; margin: 0; padding: 0; list-style: none; }
.hv-hero__stats li { padding-inline: 22px; border-inline-start: 1px solid var(--t9-color-line-mid); }
.hv-hero__stats li:first-child { padding-inline-start: 0; border-inline-start: 0; }
.hv-hero__stats a, .hv-hero__stats span { display: flex; flex-direction: column; align-items: flex-start; color: var(--al-color-text-muted);
  font-size: 0.85em; text-decoration: none; line-height: 1.35; }
.hv-hero__stats b { color: var(--al-color-accent); font-size: 1.9em; font-weight: 700; line-height: 1.15; }
.hv-hero__stats a:hover, .hv-hero__stats a:hover b { color: var(--al-color-accent-hover); }
.hv-hero__chart { margin-block-start: 24px; padding-block-start: 18px; border-block-start: 1px solid var(--t9-color-line-faint); }
.hv-hero__subtitle { margin: 0 0 14px; color: var(--al-color-text); font-size: 1.05em; font-weight: 700; }
.hv-hero__subtitle span { margin-inline-start: 8px; color: var(--t9-color-text-faint); font-size: 0.85em; font-weight: 400; }
.hv-hero .hv-tl { gap: 8px; }
.hv-hero .hv-tl__year { min-inline-size: 0; flex: var(--n, 12) 1 0; }
.hv-hero .hv-tl__bars { block-size: 150px; gap: 2px; border-block-end-color: var(--t9-color-fill-quiet); }
.hv-hero .hv-tl__bar { min-inline-size: 3px; }
.hv-hero .hv-tl__label { padding-block-start: 2px; font-size: 0.85em; }
.hv-hero .hv-legend { margin-block-start: 14px; font-size: 0.78em; gap: 4px 14px; }
@media (max-width: 52rem) {
  .hv-hero { padding: 20px 16px 16px; }
  .hv-hero__title { font-size: 1.6em; }
  .hv-hero__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 0; inline-size: 100%; }
  .hv-hero__stats li, .hv-hero__stats li:first-child { padding-inline: 0 12px; border: 0; }
  .hv-hero .hv-tl__year { min-inline-size: calc(var(--n, 12) * 0.75rem); flex: 0 0 auto; }
}

/* ---- spacing: room between the blocks and inside the boxes, so the page reads calmly ---------------- */
.hv-home { padding-block: 28px 64px; }
.hv-block { margin-block-start: 52px; }
.hv-block__title { margin: 0 0 18px; padding-block-end: 10px; border-block-end: 1px solid var(--t9-color-line-soft); font-size: 1.35em; }
.hv-shelves { gap: 26px; }
.hv-shelf { padding: 18px 20px 16px; }
.hv-shelf__head { margin-block-end: 14px; }
.hv-feature__summary { margin-block-start: 6px; line-height: 1.7; }
.hv-heads { margin-block-start: 14px; }
.hv-heads li { padding: 8px 0; }
.hv-more { padding-block-start: 14px; }
.hv-best { gap: 24px 26px; }
.hv-best__box { padding: 16px 18px 8px; }
.hv-best__head { margin-block-end: 8px; }
.hv-best__list li { padding: 10px 0; }
.hv-writers { gap: 14px 20px; }
.hv-writers-more { margin-block-start: 22px; }
.hv-ribbon { gap: 16px; }
.hv-ribbon li { padding: 14px 16px; }
.hv-block__foot { margin-block-start: 14px; }
@media (max-width: 52rem) {
  .hv-home { padding-block: 16px 40px; }
  .hv-block { margin-block-start: 40px; }
  .hv-shelves, .hv-best { gap: 18px; }
  .hv-shelf, .hv-best__box { padding-inline: 16px; }
}
  .hv-top .hv-tl__year { min-inline-size: calc(var(--n, 12) * 0.75rem); flex: 0 0 auto; }
}
@media (max-width: 52rem) {
  .hv-hero__subtitle span { display: block; margin: 2px 0 0; }   /* the explanation on its own line */
}
.hv-hero__chart { padding-block-start: 22px; }   /* no heading above the chart now: the rule, then the bars */

/* ---- the media block: a poll and a recording side by side (templates/index.html, .hv-extras) -------- */
.hv-extras { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; align-items: stretch; }
.hv-mini { flex: 1; }
.hv-mini .hv-more { margin-block-start: auto; }
@media (min-width: 52.01rem) { .hv-mini .ar-poll__options li { grid-template-columns: minmax(6rem, 2fr) 3fr 3rem; } }
.hv-mini__title { display: block; color: var(--al-color-accent); font-weight: 700; font-size: 1.1em; line-height: 1.35; }
.hv-mini .ar-recording__meta { margin: 4px 0 0; }
.hv-mini .ar-recording__player { max-inline-size: none; }
@media (max-width: 52rem) {
  .hv-extras { gap: 18px; grid-template-columns: minmax(0, 1fr); }
}

/* ---- the timeline, months: a column per month holding its bar, its readers' comments and any special
   file's diamond; a click opens the month below the chart (templates/index.html, js/home.js) ------------- */
.hv-tl__m { position: relative; flex: 1 1 0; min-inline-size: 3px; block-size: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.hv-tl__m .hv-tl__bar { flex: none; min-inline-size: 0; }
.hv-tl__said { position: absolute; inset-inline: -1px; inset-block-end: var(--s); block-size: 2px; background: #D35400; pointer-events: none; }
.hv-tl__mark { position: absolute; inset-block-end: calc(var(--h) + 8px + var(--i, 0) * 14px); inset-inline-start: 50%; z-index: 1;
  inline-size: 10px; block-size: 10px; margin-inline-start: -5px; background: var(--c); border: 2px solid #FFFFFF; outline: 1px solid var(--c); transform: rotate(45deg); }
.hv-tl__mark:hover, .hv-tl__mark:focus-visible { outline: 2px solid var(--al-color-accent-hover); }
.hv-tl__bar.is-open { outline: 2px solid var(--al-color-accent-hover); outline-offset: 1px; }
.hv-hero .hv-tl__bars { block-size: 150px; margin-block-start: 22px; }    /* room for the diamonds above the busiest bars */
.hv-legend__said::before { block-size: 2px !important; inline-size: 14px !important; background: #D35400 !important; }
.hv-legend__mark::before { inline-size: 8px !important; block-size: 8px !important; background: var(--t9-color-text-soft) !important; transform: rotate(45deg); }

.hv-tl-month { margin-block-start: 16px; padding: 14px 16px; background: var(--al-color-surface-sunk); border-inline-start: 3px solid var(--al-color-accent); }
.hv-tl-month__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 0 0 8px; }
.hv-tl-month__title { margin: 0; font-size: 1.1em; }
.hv-tl-month__nums { color: var(--t9-color-text-soft); font-size: 0.9em; }
.hv-tl-month__close { margin-inline-start: auto; padding: 2px 8px; border: 1px solid var(--t9-color-line-mid); background: none; color: var(--t9-color-text-soft); font: inherit; font-size: 0.85em; cursor: pointer; }
.hv-tl-month__close:hover { color: var(--al-color-accent-hover); border-color: var(--al-color-accent-hover); }
.hv-tl-month__list { margin: 0; padding: 0; list-style: none; columns: 2 18rem; column-gap: 28px; }
.hv-tl-month__list li { break-inside: avoid; display: flex; gap: 8px; align-items: baseline; padding: 5px 0; border-block-end: 1px dotted var(--t9-color-line-mid); }
.hv-tl-month__day { flex: none; min-inline-size: 1.6em; color: var(--t9-color-text-faint); font-size: 0.85em; }
.hv-tl-month__n { flex: none; margin-inline-start: auto; color: #A04000; font-size: 0.8em; }
.hv-tl-month__more { display: inline-block; margin-block-start: 10px; font-size: 0.9em; }
