/* =============================================================================
   MILESTONES PAGE  (body[data-page="milestones"])
   Page-specific rules only - resets, tokens, topbar/nav, .page, .page-header/
   .page-title/.page-sub, .state-box/.spinner/.state-msg/.state-err, and the
   spin keyframe are already defined in /assets/css/styles.css and reused as-is.
   ============================================================================= */

/* ── Section headers ── */
.section-hdr{
  font-family:var(--mono);font-size:.7rem;font-weight:500;
  color:var(--muted);text-transform:uppercase;letter-spacing:.1em;
  margin:0 0 14px;
}

/* ── Controls ── */
body[data-page="milestones"] .controls{
  display:flex;align-items:center;gap:16px;
  margin-bottom:36px;flex-wrap:wrap;
}
.ctrl-item{display:flex;align-items:center;gap:8px}
.ctrl-label{
  font-family:var(--mono);font-size:.68rem;color:var(--muted);
  text-transform:uppercase;letter-spacing:.08em;white-space:nowrap;
}
.ctrl-select{
  appearance:none;-webkit-appearance:none;
  background-color:var(--surface);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%234e5568'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 10px center;
  border:1px solid var(--border);border-radius:6px;
  color:var(--text);font-family:var(--mono);font-size:.76rem;
  padding:7px 30px 7px 12px;cursor:pointer;outline:none;
  transition:border-color .15s,background-color .15s;min-width:140px;
}
.ctrl-select:hover{border-color:rgba(255,255,255,.14);background-color:var(--surface2)}
.ctrl-select:focus{border-color:rgba(255,255,255,.2)}
.ctrl-select option{background:#1c1f27}

/* ── Timeline ── */
.tl-wrap{
  position:relative;
  padding-left:40px;
}

/* vertical line - thin and quiet, no more orange-fading-to-gray gradient
   (that was implying a category color scheme up top that isn't real) */
.tl-line{
  position:absolute;
  left:10px;top:8px;bottom:0;width:1px;
  background:linear-gradient(to bottom, var(--border2) 0%, transparent 100%);
  pointer-events:none;
}

/* ── Month header ── */
.tl-month-hdr{
  position:relative;
  display:flex;align-items:center;gap:10px;
  padding:28px 0 14px;
}
.tl-month-hdr:first-child{padding-top:2px}

.tl-m-mark{
  position:absolute;left:-32px;top:50%;
  transform:translateY(-50%);
  width:6px;height:6px;border-radius:2px;
  background:var(--muted2);
  box-shadow:0 0 0 2.5px var(--bg);
}

.tl-m-label{
  font-family:var(--mono);font-size:.63rem;font-weight:500;
  color:var(--muted);text-transform:uppercase;letter-spacing:.14em;
  padding:3px 10px;border-radius:4px;
  border:1px solid var(--border2);background:var(--bg);
  white-space:nowrap;flex-shrink:0;
}

.tl-m-rule{
  flex:1;height:1px;
  background:linear-gradient(to right,var(--border) 0%,transparent 75%);
}

/* ── Item ── */
.tl-item{
  position:relative;
  margin-bottom:8px;
}

/* dot on the line - small, quiet tick for every entry. Only the single
   newest milestone (not "everything from the last week") gets the
   accent color, so it reads as one clear marker instead of a string of
   identical glowing bulbs. */
.tl-item::before{
  content:'';
  position:absolute;left:-32px;top:50%;
  transform:translateY(-50%);
  width:7px;height:7px;border-radius:50%;
  background:var(--bg);
  border:1.5px solid var(--muted2);
  z-index:1;
  transition:transform .15s ease,border-color .15s ease,background .15s ease;
}
.tl-item.newest::before{
  background:var(--accent);
  border-color:var(--accent);
}

.tl-item:hover::before{
  transform:translateY(-50%) scale(1.25);
  border-color:var(--text);
}
.tl-item.newest:hover::before{ border-color:var(--accent); }

/* subtle pulse ring, only on the single newest milestone */
@keyframes dot-pulse{
  0%,100%{box-shadow:0 0 0 0 rgba(255,204,0,.45)}
  55%    {box-shadow:0 0 0 5px rgba(255,204,0,0)}
}
.tl-item.newest::before{
  animation:dot-pulse 2.6s ease-in-out infinite;
}

/* ── Card ── */
.tl-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--r);
  padding:14px 18px;
  display:flex;align-items:center;gap:14px;
  position:relative;overflow:hidden;
  transition:border-color .15s,background .15s,transform .12s;
}

/* left accent bar - neutral for every card; only the newest milestone
   and hover state bring in any color */
.tl-card::before{
  content:'';
  position:absolute;left:0;top:0;bottom:0;width:2px;
  background:var(--border2);
  border-radius:2px 0 0 2px;
  opacity:.7;
  transition:opacity .15s,background .15s;
}
.tl-item.newest .tl-card::before{ background:var(--accent); }

.tl-item:hover .tl-card{
  background:rgba(28,31,39,.95);
  border-color:rgba(255,255,255,.1);
  transform:translateX(2px);
}
.tl-item:hover .tl-card::before{opacity:1}

/* icon - flat, consistent styling for every category; the SVG glyph
   itself (not a color) is what tells categories apart */
.tl-icon{
  width:38px;height:38px;border-radius:10px;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  background:rgba(124,132,153,.08);
  border:1px solid var(--border2);
  color:var(--muted);
}
.tl-icon svg{ width:18px;height:18px; }
.tl-item.newest .tl-icon{
  background:rgba(255,204,0,.1);
  border-color:rgba(255,204,0,.22);
  color:var(--accent);
}

/* body */
.tl-body{flex:1;min-width:0}

.tl-label{
  font-size:.88rem;font-weight:500;color:var(--text);letter-spacing:-.01em;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}

.tl-meta{
  display:flex;align-items:center;gap:6px;
  margin-top:3px;flex-wrap:wrap;
}
.tl-server{font-family:var(--mono);font-size:.68rem;color:var(--muted2)}
.tl-dot-sep{
  width:3px;height:3px;border-radius:50%;
  background:var(--muted2);flex-shrink:0;
}
.tl-by{font-family:var(--mono);font-size:.68rem;color:var(--muted)}
.tl-by b{color:var(--accent);font-weight:400}
/* right */
.tl-right{flex-shrink:0;text-align:right}
.tl-date{
  font-family:var(--mono);font-size:.64rem;
  color:var(--muted2);
}
.tl-server-tag{
  font-family:var(--mono);font-size:.64rem;
  color:var(--muted2);margin-top:2px;
}

/* ── Load more ── */
.lm-outer{padding:24px 0 0;display:flex;justify-content:center}
.lm-btn{
  font-family:var(--mono);font-size:.75rem;color:var(--muted);
  border:1px solid var(--border);background:var(--surface);
  padding:8px 28px;border-radius:5px;cursor:pointer;
  transition:color .15s,border-color .15s,background .15s;
}
.lm-btn:hover:not(:disabled){
  color:var(--text);border-color:rgba(255,255,255,.15);background:var(--surface2);
}
.lm-btn:disabled{opacity:.4;cursor:not-allowed}

/* ── Slide-in animation ── */
@keyframes slideIn{
  from{opacity:0;transform:translateX(-7px)}
  to  {opacity:1;transform:translateX(0)}
}

/* ── Responsive ── */
@media(max-width:640px){
  .tl-wrap{padding-left:28px}
  .tl-line{left:7px}
  .tl-item::before{left:-24px;width:10px;height:10px}
  .tl-m-mark{left:-22px;width:5px;height:5px}
  .tl-icon{width:32px;height:32px;font-size:.9rem;border-radius:8px}
  .tl-card{padding:11px 14px;gap:10px}
  .tl-label{font-size:.84rem}
}
