/* ============================================================
   Page-specific layout
   ============================================================ */

/* -- overview --------------------------------------------------- */

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr);
  gap: var(--s4);
  align-items: start;
  margin-top: var(--s4);
}
@media (max-width: 1100px) {
  .overview-grid { grid-template-columns: minmax(0, 1fr); }
}

/* the expiry board: one row per cert, rail in the middle */
.expiry-board {
  padding: var(--s1) 0;
}
.expiry-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) minmax(120px, 2fr) 76px 84px;
  gap: var(--s3);
  align-items: center;
  padding: 6px var(--s3);
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
}
.expiry-row:last-child { border-bottom: 0; }
.expiry-row:hover { background: var(--surface-3); }
.expiry-row .dom {
  font-family: var(--mono);
  color: var(--text-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.expiry-row a.dom:hover { text-decoration: underline; }
.expiry-scale {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) minmax(120px, 2fr) 76px 84px;
  gap: var(--s3);
  padding: var(--s1) var(--s3) var(--s2);
  font-size: var(--fs-micro);
  color: var(--faint);
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--mono);
}
.expiry-scale .ticks {
  display: flex;
  justify-content: space-between;
}
@media (max-width: 720px) {
  .expiry-row, .expiry-scale {
    grid-template-columns: minmax(110px, 1fr) minmax(90px, 1.5fr);
    row-gap: var(--s1);
  }
  .expiry-row .col-hidden { display: none; }
  .expiry-scale .col-hidden { display: none; }
}

/* -- activity feed list ----------------------------------------- */

.feed {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--fs-sm);
}
.feed li {
  display: flex;
  gap: var(--s2);
  padding: 6px var(--s3);
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.feed li:last-child { border-bottom: 0; }
.feed .t {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  color: var(--faint);
  white-space: nowrap;
  flex: 0 0 auto;
  min-width: 58px;
}
.feed .what {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feed .what .who { color: var(--muted); }
.feed .what .obj {
  font-family: var(--mono);
  color: var(--text-strong);
}

/* -- finding rows ------------------------------------------------ */

.finding-item {
  display: grid;
  grid-template-columns: 64px minmax(130px, 1fr) minmax(0, 2fr) auto;
  gap: var(--s3);
  align-items: center;
  padding: var(--s2) var(--s3);
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
}
.finding-item:last-child { border-bottom: 0; }
.finding-item:hover { background: var(--surface-3); }
.finding-item .f-kind {
  font-family: var(--mono);
  color: var(--text);
  font-size: var(--fs-sm);
}
.finding-item .f-target {
  font-family: var(--mono);
  color: var(--text-strong);
}
.finding-item .f-detail {
  color: var(--muted);
  font-size: var(--fs-sm);
  overflow: hidden;
  text-overflow: ellipsis;
}
.finding-item .f-actions {
  display: flex;
  gap: var(--s1);
  justify-content: flex-end;
  white-space: nowrap;
}
@media (max-width: 820px) {
  .finding-item {
    grid-template-columns: 60px minmax(0, 1fr) auto;
  }
  .finding-item .f-detail { display: none; }
}

.sev-group-head {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) var(--s3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-micro);
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .04em;
}

/* -- filter bar -------------------------------------------------- */

.filters {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
  margin-bottom: var(--s3);
}
.filters .search {
  min-width: 180px;
  max-width: 280px;
}
.filters select { width: auto; min-width: 108px; }
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--s3);
}
.tabs a {
  padding: var(--s2) var(--s3);
  font-size: var(--fs-sm);
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.tabs a.on { color: var(--text-strong); border-bottom-color: var(--brand); }
.tabs a .count {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  color: var(--faint);
  margin-left: var(--s1);
}

/* -- detail page sections ---------------------------------------- */

.detail-head {
  display: flex;
  align-items: flex-start;
  gap: var(--s4);
  flex-wrap: wrap;
  padding-bottom: var(--s4);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--s4);
}
.detail-head .id-block { flex: 1; min-width: 260px; }
.detail-head .id-name {
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 600;
  color: var(--text-strong);
  word-break: break-all;
}
.detail-head .id-meta {
  display: flex;
  align-items: center;
  gap: var(--s3);
  flex-wrap: wrap;
  margin-top: var(--s2);
  font-size: var(--fs-sm);
  color: var(--muted);
}
.detail-head .id-life {
  min-width: 260px;
  max-width: 380px;
  flex: 1;
}

.section { margin-top: var(--s5); }
.section > h2 {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-bottom: var(--s2);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--faint);
}
.section > h2 .spacer { flex: 1; }
.section > h2 .tag { text-transform: none; letter-spacing: 0; }

/* -- issue form (collapsible) ------------------------------------ */

.issue-panel {
  margin-top: var(--s4);
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
}
.issue-panel summary {
  padding: var(--s3) var(--s4);
  cursor: pointer;
  font-size: var(--fs-sm);
  color: var(--text);
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.issue-panel summary::-webkit-details-marker { display: none; }
.issue-panel summary::before {
  content: "+";
  font-family: var(--mono);
  color: var(--faint);
  width: 12px;
}
.issue-panel[open] summary::before { content: "−"; }
.issue-panel summary:hover { background: var(--surface-2); }
.issue-panel .issue-body {
  padding: 0 var(--s4) var(--s4);
  border-top: 1px solid var(--line);
  padding-top: var(--s4);
}
.issue-panel .summary-line {
  margin-top: var(--s3);
  font-size: var(--fs-sm);
  color: var(--muted);
  font-family: var(--mono);
}

/* -- run log drawer ---------------------------------------------- */

details.tx {
  border-bottom: 1px solid var(--line);
}
details.tx > summary {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 6px var(--s3);
  font-size: var(--fs-sm);
  cursor: pointer;
  list-style: none;
}
details.tx > summary::-webkit-details-marker { display: none; }
details.tx > summary:hover { background: var(--surface-3); }
details.tx .tx-body {
  padding: var(--s2) var(--s3) var(--s3) var(--s5);
  font-size: var(--fs-sm);
  color: var(--muted);
}
details.tx .tx-body ul { margin: 0; padding-left: var(--s4); font-family: var(--mono); }

pre.log {
  margin: 0;
  padding: var(--s3);
  font-family: var(--mono);
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  overflow: auto;
  max-height: 60vh;
  white-space: pre-wrap;
  word-break: break-word;
}

/* -- 404 --------------------------------------------------------- */

.not-found {
  max-width: 460px;
  margin: 12vh auto;
  text-align: center;
}
.not-found .nf-code {
  font-family: var(--mono);
  font-size: 48px;
  font-weight: 700;
  color: var(--line-strong);
  line-height: 1;
}
.not-found p { margin-top: var(--s3); color: var(--muted); }
