:root {
  --bg: #f6f7f9; --panel: #ffffff; --text: #1d2330; --muted: #5d6677; --border: #dde1e7;
  --accent: #154273; --accent-text: #ffffff; --code: #eef1f5;
  --ok: #1e7b3b; --ok-bg: #e3f4e8; --warn: #8a5a00; --warn-bg: #fdf1d8; --err: #a32020; --err-bg: #fbe4e4;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151b; --panel: #1b2029; --text: #e3e7ee; --muted: #9aa3b2; --border: #2c3340;
    --accent: #6ea8e8; --accent-text: #0d1117; --code: #232a35;
    --ok: #6fd18f; --ok-bg: #173323; --warn: #f0c060; --warn-bg: #3a2e12; --err: #f08a8a; --err-bg: #3d1b1b;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
header { background: var(--accent); color: var(--accent-text); padding: 1.25rem 1rem; }
header .wrap, main { max-width: 72rem; margin: 0 auto; }
header h1 { margin: 0; font-size: 1.35rem; }
main { padding: 1.25rem 1rem 3rem; }
h2 { font-size: 1.05rem; margin: 1.75rem 0 .75rem; }
/* Each card spans four rows of the grid (service, FSC badges, proves, button) and takes them
   over with subgrid, so the same part lines up across the cards of a row. */
.cards { display: grid; gap: .5rem .75rem; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); }
.row-title { font-size: .95rem; font-weight: 600; color: var(--muted); margin: 1.25rem 0 .5rem; }
.row-title:first-of-type { margin-top: 0; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: .5rem; align-content: start; }
.cards > .card { margin-bottom: .25rem; }   /* with the row gap: .75rem between rows of cards */
.card h3 { margin: 0; font-size: 1rem; }
.card .fsc { display: flex; flex-wrap: wrap; gap: .4rem; }
.fsc-badge { font-size: .85rem; font-weight: 600; padding: .15rem .6rem; border-radius: 999px; border: 1px solid var(--border); }
.fsc-badge b { margin-left: .2rem; }
.fsc-badge.yes { color: var(--ok); background: var(--ok-bg); border-color: transparent; }
.fsc-badge.no { color: var(--muted); background: var(--code); }
.fsc-badge.part { color: var(--warn); background: var(--warn-bg); border-color: transparent; }
.card .proves::first-letter { text-transform: uppercase; }   /* proves starts lower case in services.json */
.card .proves { align-self: start; font-size: .9rem; border-left: 3px solid var(--accent); padding: .1rem 0 .1rem .6rem; }
.card code { background: var(--code); padding: .1rem .35rem; border-radius: 4px; font-size: .82rem; word-break: break-all; }
.card .foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; align-self: end; padding-top: .25rem; }
.note { color: var(--muted); font-size: .82rem; font-style: italic; }
button { font: inherit; font-weight: 600; border: 0; border-radius: 6px; padding: .45rem 1rem; background: var(--accent); color: var(--accent-text); cursor: pointer; }
button:hover:not(:disabled) { filter: brightness(1.1); }
button:disabled { opacity: .4; cursor: not-allowed; }
button.small { padding: .2rem .6rem; font-size: .8rem; font-weight: 500; background: var(--code); color: var(--text); }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: .75rem; }
.meta .muted { color: var(--muted); }
.badge { font-weight: 700; font-size: .85rem; padding: .15rem .55rem; border-radius: 999px; background: var(--code); }
.badge.ok { color: var(--ok); background: var(--ok-bg); }
.badge.warn { color: var(--warn); background: var(--warn-bg); }
.badge.err { color: var(--err); background: var(--err-bg); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; }
pre { margin: 0; background: var(--code); padding: 1rem; border-radius: 8px; overflow: auto; max-height: 70vh; font-size: .82rem; line-height: 1.45; }
.empty { color: var(--muted); }
.source { margin-top: 1rem; }
.source h3 { font-size: .95rem; margin: 0 0 .4rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th, td { text-align: left; padding: .4rem .6rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; }
td.hash { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; }
details { margin-top: .75rem; }
summary { cursor: pointer; color: var(--muted); font-size: .85rem; }
.error { color: var(--err); }
