/* Patches page — uses the colors and fonts from theme.css */

h1, h2 { margin: 0; }
h1 { font-family: 'Archivo', sans-serif; font-stretch: 112%; font-size: clamp(22px, 3vw, 30px); font-weight: 800; letter-spacing: -0.02em; margin-top: 4px; color: var(--strong); }
h2 { font-family: 'Archivo', sans-serif; font-stretch: 108%; font-size: 17px; font-weight: 650; color: var(--strong); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }


/* Buttons */
.btn { min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; text-decoration: none; }
.btn:hover { border-color: var(--accent); color: var(--text); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { filter: brightness(1.1); }
.btn.on { background: var(--accent-bg); border-color: var(--accent-bd); color: var(--accent-text); }
.link-btn { background: none; border: 0; padding: 8px 4px; font: inherit; font-size: 14px; color: var(--accent-text); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

main { display: flex; flex-direction: column; gap: 24px; padding-top: 32px; padding-bottom: 56px; }

.notice { background: var(--warn-bg); border: 1px solid var(--warn-bd); color: var(--warn-text); border-radius: 10px; padding: 12px 16px; font-size: 14px; }

/* Stack */
.stack-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border: 1px solid var(--border-2); background: var(--surface); border-radius: 999px; font-size: 14px; }
.chip button { width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--chip); color: var(--body); cursor: pointer; font-size: 15px; line-height: 1; }
.chip button:hover { background: var(--line); }
.stack-form { display: flex; gap: 6px; }
.stack-form input { color: var(--text); min-height: 40px; padding: 0 12px; border: 1px solid var(--border-2); border-radius: 8px; font: inherit; font-size: 14px; width: 180px; background: var(--surface); }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px 24px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; }
.row { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.grow { flex: 999 1 520px; min-width: 0; }
.side { flex: 1 1 340px; min-width: 0; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.kpi-label { font-size: 14px; color: var(--body); }
.kpi-value { font-size: 40px; font-weight: 700; line-height: 1.2; }
.kpi-value.alert { color: var(--danger-strong); }
.kpi-value .of { font-size: 18px; font-weight: 500; color: var(--muted); }
.kpi-sub { font-size: 13px; color: var(--muted); }
.bar { height: 6px; border-radius: 3px; background: var(--border); margin-top: 8px; overflow: hidden; }
.bar-fill { height: 6px; width: 0; background: var(--accent); border-radius: 3px; transition: width .3s; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-top: 1px solid var(--line); padding: 14px 0; }
.vuln { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.vuln-main { flex: 1 1 260px; min-width: 0; }
.vuln-title { font-weight: 600; }
.vuln-meta { font-size: 13px; color: var(--muted); }
.vuln-due { font-size: 14px; font-weight: 600; min-width: 92px; color: var(--body); }
.vuln-due.hot { color: var(--danger-strong); }
.vuln.done .vuln-title { text-decoration: line-through; color: var(--muted); }
.vuln-actions { display: flex; gap: 8px; }
.details { flex-basis: 100%; background: var(--inset); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; font-size: 14px; color: var(--body); }
.details p { margin: 0 0 8px; }
.details p:last-child { margin: 0; }
.dot { flex: none; display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot-red { background: var(--danger); }
.dot-gray { background: var(--muted); }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--danger-bg); color: var(--danger-text); margin-left: 6px; vertical-align: 1px; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: var(--muted); padding-top: 12px; border-top: 1px solid var(--line); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .dot { width: 8px; height: 8px; }
.empty { color: var(--muted); padding: 14px 0; border-top: 1px solid var(--line); }

/* Vendors */
.vendor-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.vendor-name { font-weight: 600; }
.pill { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--danger-bg); color: var(--danger-text); white-space: nowrap; }
.pill.gray { background: var(--chip); color: var(--body); }
.vendor-text { font-size: 13px; color: var(--body); margin-top: 2px; }
.vendor-time { font-size: 12px; color: var(--muted); margin-top: 2px; }
.all-ok { display: flex; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--body); }
.list.compact > li { padding: 8px 0; display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }

/* Chart */
.chart { display: flex; align-items: flex-end; gap: 8px; height: 170px; border-bottom: 1px solid var(--border); margin-top: 18px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.chart .num { font-size: 11px; color: var(--muted); }
.chart .b { width: 100%; max-width: 28px; background: var(--border-2); border-radius: 4px 4px 0 0; min-height: 2px; }
.chart .col:last-child .b { background: var(--accent); }
.chart-labels { display: flex; gap: 8px; margin-top: 6px; }
.chart-labels span { flex: 1; text-align: center; font-size: 11px; color: var(--muted); }

/* Sponsor */
.sponsor { display: flex; flex-direction: column; gap: 8px; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .1em; color: var(--muted); }
.sponsor-name { font-weight: 600; }
.sponsor p { margin: 0; font-size: 14px; }

/* Footer */

@media (max-width: 600px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .chart { gap: 4px; }
  .chart .num { display: none; }
  .chart-labels { gap: 4px; }
  .stack-form input { width: 140px; }
}
