/* openplan-bench dashboard. Styled entirely through the Frontier tokens in
   tokens.css — no hex value belongs in this file. */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-body);
  font-family: var(--font-prose);
  font-size: var(--text-base);
  line-height: 1.6;
}

h1, h2, h3, h4, .label, th, nav, button, select, input {
  font-family: var(--font-display);
}

h1, h2, h3, h4 { color: var(--color-heading); line-height: 1.25; font-weight: 600; }
h1 { font-size: var(--text-3xl); margin: 0 0 .3rem; letter-spacing: -0.01em; }
h2 { font-size: var(--text-xl); margin: 2.6rem 0 .8rem; }
h3 { font-size: var(--text-lg); margin: 1.8rem 0 .5rem; }

a { color: var(--color-path); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

code, kbd, pre { font-family: var(--font-mono); font-size: 0.86em; }
pre {
  background: var(--color-bg-raised);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  padding: .85rem 1rem;
  overflow-x: auto;
}
code:not(pre code) {
  background: var(--color-bg-raised);
  border: 1px solid var(--color-line);
  border-radius: 4px;
  padding: .08em .34em;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem 5rem; }
.prose { max-width: var(--measure); }

/* --- masthead ---------------------------------------------------------- */
header.masthead {
  border-bottom: 1px solid var(--color-line);
  background: var(--color-bg-raised);
  padding: 1.5rem 0 1.25rem;
  margin-bottom: 2rem;
}
.masthead .wrap { padding-bottom: 0; }
.brandline { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.brandline img { width: 30px; height: 30px; display: block; }
.brandline .org {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 600;
}
.tagline { color: var(--color-muted); margin: 0; max-width: var(--measure); }

nav.tabs { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 1.1rem; }
nav.tabs a {
  color: var(--color-muted);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: .01em;
  padding-bottom: .5rem;
  border-bottom: 2px solid transparent;
}
nav.tabs a:hover { color: var(--color-heading); }
nav.tabs a[aria-current="page"] { color: var(--color-heading); border-bottom-color: var(--color-path); }

/* --- callouts ---------------------------------------------------------- */
.note {
  border-left: 3px solid var(--color-frontier);
  background: var(--color-frontier-soft);
  padding: .8rem 1rem;
  border-radius: 0 6px 6px 0;
  margin: 1.2rem 0;
  max-width: var(--measure);
}
.note.warn { border-left-color: var(--color-path); background: var(--color-path-soft); }
.note p { margin: 0; }
.note p + p { margin-top: .5rem; }
.note strong { color: var(--color-heading); }

/* --- stat strip -------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin: 1.4rem 0; }
.stat {
  background: var(--color-bg-raised);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  padding: .8rem .95rem;
}
.stat .k {
  display: block;
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 600;
}
.stat .v {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  color: var(--color-heading);
  margin-top: .2rem;
  line-height: 1.2;
}
.stat .v.accent { color: var(--color-path); }

/* --- suite cards ------------------------------------------------------- */
.suite {
  background: var(--color-bg-raised);
  border: 1px solid var(--color-line);
  border-radius: 10px;
  padding: 1.3rem 1.4rem 1.5rem;
  margin: 1.6rem 0;
}
.suite > h2 { margin-top: 0; }
.suite .meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-faint);
  margin: .1rem 0 .9rem;
  word-break: break-word;
}
.suite .desc { color: var(--color-muted); max-width: var(--measure); margin: 0 0 1rem; }

.badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  padding: .16rem .5rem;
  border-radius: 999px;
  border: 1px solid var(--color-line);
  color: var(--color-muted);
  vertical-align: middle;
  margin-left: .5rem;
}
.badge.runner { border-color: var(--color-path); color: var(--color-path); }

/* --- controls ---------------------------------------------------------- */
.controls { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .9rem 0; }
.controls input, .controls select {
  background: var(--color-bg);
  color: var(--color-body);
  border: 1px solid var(--color-line);
  border-radius: 6px;
  padding: .35rem .55rem;
  font-size: var(--text-sm);
}
.controls input:focus-visible, .controls select:focus-visible,
th[role="columnheader"]:focus-visible, .themetoggle:focus-visible {
  outline: 2px solid var(--color-path);
  outline-offset: 2px;
}
/* The filter input is labelled by aria-label; no visible label element. */
.controls .count { color: var(--color-faint); font-size: var(--text-sm); margin-left: auto; }

/* --- tables ------------------------------------------------------------ */
.tablewrap { overflow-x: auto; border: 1px solid var(--color-line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: var(--text-sm); }
/* Every table states the budget it was measured under. Coverage without a
   stated budget is not a number, so this is part of the table, not a note
   near it. */
table caption {
  caption-side: top;
  text-align: left;
  padding: .55rem .7rem;
  font-size: var(--text-xs);
  color: var(--color-muted);
  letter-spacing: var(--tracking-label);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-line);
}
p.caption {
  font-size: var(--text-xs);
  color: var(--color-faint);
  max-width: var(--measure);
  margin: .55rem 0 1.4rem;
}
p.caption strong { color: var(--color-muted); }
th, td { padding: .48rem .7rem; text-align: left; white-space: nowrap; }
th {
  background: var(--color-bg);
  color: var(--color-muted);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  font-weight: 600;
  border-bottom: 1px solid var(--color-line);
  position: sticky;
  top: 0;
  cursor: pointer;
  user-select: none;
}
th.num, td.num { text-align: right; font-family: var(--font-mono); }
th[aria-sort="ascending"]::after { content: " \2191"; color: var(--color-path); }
th[aria-sort="descending"]::after { content: " \2193"; color: var(--color-path); }
tbody tr { border-bottom: 1px solid var(--color-line); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--color-bg); }
td.name { font-family: var(--font-mono); color: var(--color-heading); white-space: nowrap; }

.pill { font-family: var(--font-display); font-size: var(--text-xs); font-weight: 600; padding: .1rem .45rem; border-radius: 4px; }
.pill.solved { color: var(--color-frontier); background: var(--color-frontier-soft); }
.pill.timeout, .pill.error, .pill.memory { color: var(--color-path); background: var(--color-path-soft); }
.pill.unsolved { color: var(--color-expanded); }
.pill.skipped, .pill.not-installed { color: var(--color-faint); }
.pill.partial { color: var(--color-expanded); }

.bar { display: block; height: 4px; border-radius: 2px; background: var(--color-frontier); min-width: 1px; }
.barcell { min-width: 78px; }

/* --- figures ----------------------------------------------------------- */
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.1rem; margin: 1.3rem 0; }
figure { margin: 0; }
figure img { width: 100%; height: auto; display: block; border: 1px solid var(--color-line); border-radius: 8px; }
figcaption { font-size: var(--text-xs); color: var(--color-faint); margin-top: .45rem; }

/* --- footer ------------------------------------------------------------ */
footer.foot { border-top: 1px solid var(--color-line); margin-top: 3.5rem; padding-top: 1.2rem; color: var(--color-faint); font-size: var(--text-sm); }
footer.foot p { margin: .3rem 0; max-width: var(--measure); }

.themetoggle {
  position: fixed; right: 1rem; bottom: 1rem;
  background: var(--color-bg-raised);
  color: var(--color-muted);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  padding: .45rem .9rem;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  cursor: pointer;
  z-index: 10;
}
.themetoggle:hover { color: var(--color-heading); border-color: var(--color-path); }

.empty { color: var(--color-faint); font-style: italic; padding: 1rem 0; }

ul.tight { max-width: var(--measure); padding-left: 1.2rem; }
ul.tight li { margin: .35rem 0; }

dl.defs { max-width: var(--measure); }
dl.defs dt { color: var(--color-heading); font-family: var(--font-display); font-weight: 600; margin-top: 1rem; }
dl.defs dd { margin: .25rem 0 0; }

@media (max-width: 620px) {
  h1 { font-size: var(--text-2xl); }
  .suite { padding: 1rem; }
  .controls .count { margin-left: 0; width: 100%; }
}
