/* The archive uses the post heading color for chronology and link feedback. */
.archive-legacy{
  --archive-accent-surface:color-mix(in srgb, var(--post-heading) 11%, var(--bg-elev));
  --archive-accent-border:color-mix(in srgb, var(--post-heading) 42%, var(--background));
}
.archive-legacy .browse-fields label{
  color:var(--post-heading);
  font-weight:600;
}
.archive-legacy .archive-filter .browse-year{
  border-color:var(--archive-accent-border);
  background-color:var(--archive-accent-surface);
}
.archive-legacy .browse-year:focus-visible,
.archive-legacy__title:focus-visible{
  outline:2px solid var(--post-heading);
  outline-offset:3px;
}

/* Center the list and its filters inside the full-width article. */
.archive-legacy__list{
  max-width:900px;
  margin:0 auto;
  padding:50px 24px;
}
.archive-legacy__container:not([hidden]) ~ .archive-legacy__container:not([hidden]){
  margin-top:24px;
}
.archive-legacy__key{
  display:inline-flex;
  align-items:center;
  padding:5px 12px;
  margin-bottom:14px;
  border:1px solid var(--archive-accent-border);
  background:var(--archive-accent-surface);
  color:var(--post-heading);
  font-family:var(--mono);
  font-weight:700;
  font-size:15px; /* closer to the parent theme's archive month header size */
  letter-spacing:.04em;
}
.archive-legacy__ul{
  list-style:none;
  margin:0;
  padding:0 0 0 14px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
/* Each li carries its own connector segment (not one bar on the ul) so hovering one post
   only highlights that post's own segment. Segments extend into half the 8px gap above and
   below so the line still reads as continuous when nothing is hovered; the first/last item
   trims that to a 1px inset at the outer edge, matching the old single-bar look there. */
.archive-legacy__li{
  position:relative;
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.archive-legacy__li::before{
  content:"";
  position:absolute;
  left:-14px;
  top:-4px;
  bottom:-4px;
  width:4px;
  background:var(--archive-accent-border);
  transition:background .2s;
}
.archive-legacy__li:first-child::before{
  top:1px;
}
.archive-legacy__li:last-child::before{
  bottom:1px;
}
.archive-legacy__li:is(:hover,:focus-within)::before{
  background:var(--post-heading);
}
.archive-legacy__date{
  flex-shrink:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  /* Fixed width (not min-width) - min-width let a single-digit day ("Aug 8") shrink-wrap
     smaller than a double-digit one ("Sep 10"), so pills in the same list visibly varied in
     size depending on which day of the month it was. 70px comfortably fits the widest
     realistic case (3-letter month + 2-digit day) without the text wrapping. */
  width:70px;
  padding:5px 8px;
  border:1px solid var(--hero-border);
  background:color-mix(in srgb, var(--post-heading) 5%, var(--bg-elev));
  color:var(--foreground);
  font-family:var(--mono);
  font-weight:700;
  font-size:13px; /* closer to the parent theme's date pill size */
  letter-spacing:.02em;
}
.archive-legacy__title{
  color:var(--foreground);
  font-size:17px; /* the parent theme's title has no size override, just inherits body size; this reads clearly bigger without overpowering the date/key pills */
  font-weight:500;
  text-decoration:none;
}
.archive-legacy__title:is(:hover,:focus-visible){
  color:var(--post-heading);
  text-decoration:none;
}
/* Pins the category badge to the row's own right edge (rather than immediately trailing the
   title with a gap) so it actually uses the wide empty space every row otherwise had - see
   the comment above this markup in list.html. */
.archive-legacy__category{
  margin-left:auto;
}
.archive-legacy .badge{
  border-color:var(--hero-border);
  border-radius:2px;
}
/* Typography comes from the neighboring category labels in each archive view. */
.archive-difficulty{
  --archive-difficulty-color:var(--foreground);
  background:color-mix(in srgb, var(--archive-difficulty-color) 14%, var(--background));
  color:color-mix(in srgb, var(--archive-difficulty-color) 55%, var(--foreground));
}
.archive-difficulty.diff-easy{ --archive-difficulty-color:#8fa77b; }
.archive-difficulty.diff-medium{ --archive-difficulty-color:#b5a078; }
.archive-difficulty.diff-hard{ --archive-difficulty-color:#b28582; }
.archive-difficulty.diff-insane{ --archive-difficulty-color:#969daa; }
/* Both archive views show only the title and date at the mobile breakpoint. */
@media (max-width:768px){
  .archive-legacy__category,
  .archive-difficulty{ display:none; }
}
@media (max-width:480px){
  .archive-legacy__li{ gap:6px; }
  .archive-legacy__title{ font-size:15px; }
}
