/* Summit profile backups — plain CSS, no external fonts. */
:root {
  color-scheme: light;
  --bg: #f6f6f4;
  --surface: #fcfcfb;
  --border: #e2e1dc;
  --text: #0b0b0b;
  --text-2: #52514e;
  --muted: #7a7974;
  --accent: #2a78d6;
  --series-1: #2a78d6;
  --grid: #e9e8e3;
  --good-bg: #e3f4e8; --good-fg: #145c2c;
  --warn-bg: #fff3d6; --warn-fg: #7a4d00;
  --bad-bg: #fde4e1;  --bad-fg: #8f1d12;
  --info-bg: #e5eefa; --info-fg: #1b4f8f;
  --radius: 8px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121211; --surface: #1a1a19; --border: #2e2e2c; --text: #ffffff;
    --text-2: #c3c2b7; --muted: #95948c; --accent: #6aa7ef; --series-1: #3987e5; --grid: #2a2a28;
    --good-bg: #16361f; --good-fg: #9fe0b1; --warn-bg: #3a2e10; --warn-fg: #f3cf7a;
    --bad-bg: #3d1a16; --bad-fg: #f7b1a8; --info-bg: #182a42; --info-fg: #a9c9f2;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121211; --surface: #1a1a19; --border: #2e2e2c; --text: #ffffff;
  --text-2: #c3c2b7; --muted: #95948c; --accent: #6aa7ef; --series-1: #3987e5; --grid: #2a2a28;
  --good-bg: #16361f; --good-fg: #9fe0b1; --warn-bg: #3a2e10; --warn-fg: #f3cf7a;
  --bad-bg: #3d1a16; --bad-fg: #f7b1a8; --info-bg: #182a42; --info-fg: #a9c9f2;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: 1.25rem 0 1rem; font-weight: 650; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; font-weight: 600; }
code { font-size: .9em; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; color: var(--text-2); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.count { font-size: 1rem; font-weight: 400; }

/* top bar */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 56px; }
.brand { font-weight: 700; color: var(--text); }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a { padding: 6px 10px; border-radius: 6px; color: var(--text-2); }
.nav a[aria-current="page"] { background: var(--info-bg); color: var(--info-fg); }
.nav a:hover { text-decoration: none; background: var(--bg); }
.logout { margin: 0; }
.btn-link { background: none; border: 0; color: var(--text-2); font: inherit; padding: 6px 10px; cursor: pointer; border-radius: 6px; }
.btn-link:hover { background: var(--bg); }

/* cards, tiles */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 0 0 16px; }
.narrow { max-width: 480px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.tile-label { color: var(--text-2); font-size: .85rem; }
.tile-value { font-size: 1.9rem; font-weight: 650; line-height: 1.2; margin: 4px 0; font-variant-numeric: tabular-nums; }
.tile-value-sm { font-size: 1.1rem; margin: 8px 0; }
.tile-sub { color: var(--muted); font-size: .85rem; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid2 > .card { margin: 0; }
.chart-wide { grid-column: 1 / -1; }
.chart-card { margin: 0; }
.chart-card figcaption { font-weight: 600; margin-bottom: 8px; }
.chart-box { position: relative; height: 260px; }
.chart-box-tall { height: 320px; }
.chart-table { margin-top: 8px; font-size: .9rem; }
.chart-table summary { cursor: pointer; color: var(--text-2); }
section.grid2 + section { margin-top: 16px; }
.grid2 + .card { margin-top: 16px; }

/* alerts & badges */
.alert { background: var(--warn-bg); color: var(--warn-fg); border-radius: var(--radius); padding: 10px 14px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .8rem; font-weight: 600; vertical-align: middle; white-space: nowrap; }
.badge-success { background: var(--good-bg); color: var(--good-fg); }
.badge-partial, .badge-running { background: var(--warn-bg); color: var(--warn-fg); }
.badge-failed { background: var(--bad-bg); color: var(--bad-fg); }
.badge-deleted { background: var(--bad-bg); color: var(--bad-fg); font-weight: 500; }

/* tables */
.table-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th, .table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: .8rem; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .02em; background: var(--surface); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--bg); }
.table.compact th, .table.compact td { padding: 4px 8px; }
.num { text-align: right !important; white-space: nowrap; }
.ellipsis { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* forms */
.search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.search input[type="search"] { flex: 1 1 260px; }
input[type="text"], input[type="password"], input[type="search"] {
  font: inherit; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text); width: 100%;
}
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.btn { font: inherit; padding: 8px 16px; border: 0; border-radius: 6px; background: var(--accent); color: #fff; cursor: pointer; font-weight: 600; }
.btn:hover { filter: brightness(1.05); }
.login { max-width: 360px; margin: 10vh auto 0; }
.login form { display: grid; gap: 8px; }
.login label { font-size: .9rem; color: var(--text-2); margin-top: 4px; }
.login .btn { margin-top: 12px; }

/* detail */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 16px; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
address { font-style: normal; margin-bottom: 16px; }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--info-bg); color: var(--info-fg); padding: 2px 10px; border-radius: 999px; font-size: .9rem; }
.tag-deleted, .note-deleted { text-decoration: line-through; opacity: .6; }
.notes { margin: 0; padding-left: 1.4rem; }
.notes li { margin-bottom: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }

.pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 16px 0 32px; }

@media (max-width: 720px) {
  body { font-size: 14px; }
  .grid2 { grid-template-columns: 1fr; }
  .tile-value { font-size: 1.5rem; }
  .chart-box { height: 220px; }
  .chart-box-tall { height: 280px; }
  .table th, .table td { padding: 6px 8px; }
}
