/*
 * Omarchy Mac Lab, in Omarchy's design language (omarchy.org): dark Tokyo
 * Night, JetBrains Mono, green brand, terminal cards with their title set into
 * the top border. One look for the public pages and the lab's.
 */

@font-face {
  font-display: swap;
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 300;
  src: url("JetBrainsMono-Light-48a53f6e5f95e259.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  src: url("JetBrainsMono-Regular-a9cb1cd82332b23a.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  src: url("JetBrainsMono-Bold-c503cc5ec5f8b2c7.woff2") format("woff2");
}

:root {
  /* Tokyo Night, as omarchy.org's root.css names it */
  --night: #1a1b26;
  --storm: #24283b;
  --terminal-black: #414868;
  --blue: #7aa2f7;
  --cyan: #7dcfff;
  --white: #c0caf5;
  --green: #9ece6a;
  --turquoise: #b4f9f8;
  /* the rest of the Tokyo Night palette, for the colour code */
  --yellow: #e0af68;
  --red: #f7768e;
  --orange: #ff9e64;
  --magenta: #bb9af7;
  --comment: #565f89;
  --fg-dim: #a9b1d6;
  --deep: #16161e;

  --border: rgb(65 72 104 / 0.8);
  --font: "JetBrains Mono", ui-monospace, monospace;
  --space: 1rem;
  --radius: 4px;
  --transition: 0.15s cubic-bezier(0.33, 1, 0.68, 1);
  color-scheme: dark;
}

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

html { font-size: 15px; }

body {
  background: var(--night);
  color: var(--blue);
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-weight: 300;
  line-height: 1.5;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
}

a {
  color: var(--cyan);
  font-weight: 700;
  text-decoration-thickness: 0.0875em;
  text-underline-offset: 0.15em;
  transition: color var(--transition);
}

a:hover { color: var(--turquoise); }

h1, h2, h3 { color: var(--white); font-weight: 700; line-height: 1.2; }
h1 { font-size: 1.8rem; margin: 0 0 0.4em; }
h3 { font-size: 1rem; margin: 1.4em 0 0.5em; color: var(--fg-dim); }
p { margin: 0 0 0.8em; }
code, pre { font-family: var(--font); }
code { color: var(--white); }

.dim { color: var(--comment); }
.ok { color: var(--green); }
.bad { color: var(--red); }
.nowrap { white-space: nowrap; }
.subtitle { color: var(--fg-dim); margin-bottom: 1.5em; }

/* header */

.site-header { border-bottom: 1px solid var(--border); }

.header-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding: 0.9rem clamp(1rem, 4vw, 3rem);
}

.brand {
  align-items: center;
  color: var(--green);
  display: inline-flex;
  gap: 0.6rem;
  text-decoration: none;
}

.brand-logo { display: block; height: 24px; width: 24px; }
.brand-name { font-weight: 700; letter-spacing: -0.01em; }
.brand-suffix { color: var(--white); font-weight: 400; }

.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }

.site-nav a, .lab-nav a, .filters a {
  color: var(--fg-dim);
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover, .lab-nav a:hover, .filters a:hover { color: var(--white); }
.site-nav a.current, .lab-nav a.current, .filters a.current { color: var(--green); }
.sign-in { color: var(--fg-dim); font-weight: 400; white-space: nowrap; }

/* row 2: the lab, only when signed in */

.lab-row {
  align-items: center;
  background: var(--deep);
  border-top: 1px solid rgb(65 72 104 / 0.4);
  display: flex;
  gap: 1.1rem;
  overflow-x: auto;
  padding: 0.45rem clamp(1rem, 4vw, 3rem);
  scrollbar-width: none;
}

.lab-tag {
  background: var(--green);
  border-radius: 3px;
  color: var(--night);
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.05em 0.5em;
  text-transform: uppercase;
}

.lab-nav { display: flex; gap: 0.25rem 1.1rem; }
.lab-row .grow { flex: 1; }
.count { background: var(--red); border-radius: 999px; color: var(--night); font-size: 0.72em; font-weight: 700; margin-left: 0.3em; padding: 0 0.5em; }
.fleet { color: var(--comment); font-size: 0.85em; white-space: nowrap; }
.fleet::before { background: var(--green); border-radius: 50%; content: ""; display: inline-block; height: 7px; margin-right: 0.5em; width: 7px; }
.viewer { align-items: center; display: inline-flex; gap: 0.5rem; white-space: nowrap; }
.viewer .handle { color: var(--white); font-weight: 400; }
.link-button { background: none; border: 0; color: var(--cyan); cursor: pointer; font: inherit; font-size: 0.85em; padding: 0; text-decoration: underline; text-underline-offset: 0.15em; }
.link-button:hover { color: var(--turquoise); }

.button {
  background: transparent;
  border: 1px solid var(--green);
  border-radius: var(--radius);
  color: var(--green);
  cursor: pointer;
  display: inline-block;
  font: inherit;
  font-weight: 700;
  padding: 0.35em 0.9em;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.button:hover { background: var(--green); color: var(--night); }
.button-install { margin-left: auto; background: var(--green); color: var(--night); white-space: nowrap; }
.button-install:hover { background: var(--turquoise); border-color: var(--turquoise); }
.button-danger { border-color: var(--red); color: var(--red); }
.button-danger:hover { background: var(--red); color: var(--night); }
.button-small { font-size: 0.85em; padding: 0.15em 0.6em; }

/* the admin's prefilled GitHub issue */
.issue-link { color: var(--cyan); font-size: 0.8em; white-space: nowrap; }
.issue-link::before { content: "+ "; color: var(--comment); }
a.badge-regression { text-decoration: none; }

/* layout */

.site-main {
  flex: 1;
  margin: 0 auto;
  max-width: 88rem;
  padding: 2rem clamp(1rem, 4vw, 3rem) 3rem;
  width: 100%;
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--fg-dim);
  font-size: 0.85em;
  padding: 1.25rem clamp(1rem, 4vw, 3rem);
}

.site-footer p { margin: 0.2em 0; }

.grid {
  display: grid;
  gap: 0 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 28rem), 1fr));
}

.flash {
  border: 1px solid var(--green);
  color: var(--green);
  margin: 1rem auto 0;
  max-width: 88rem;
  padding: 0.5rem 1rem;
  width: calc(100% - 2 * clamp(1rem, 4vw, 3rem));
}

.flash-alert { border-color: var(--red); color: var(--red); }

/* terminal cards: the title sits in the top border, like a TUI box */

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 1.75rem 0;
  padding: 1.4rem clamp(0.9rem, 2vw, 1.5rem) 1rem;
  position: relative;
}

.card-title {
  background: var(--night);
  color: var(--green);
  font-size: 0.95rem;
  font-weight: 700;
  left: 1rem;
  margin: 0;
  padding: 0 0.5em;
  position: absolute;
  text-transform: lowercase;
  top: -0.7em;
}

.card.narrow { max-width: 40rem; }

/* home */

.hero {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  margin: 1rem 0 2.5rem;
}

.hero-logo { height: clamp(64px, 10vw, 112px); width: clamp(64px, 10vw, 112px); }
.hero h1 { color: var(--green); font-size: clamp(1.8rem, 5vw, 3.2rem); margin: 0; letter-spacing: -0.02em; }
.tagline { color: var(--white); font-size: 1.1rem; margin: 0.3em 0 0; }

.command {
  background: var(--deep);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--white);
  overflow-x: auto;
  padding: 0.75rem 1rem;
  white-space: pre-wrap;
  word-break: break-all;
}

.prompt { color: var(--green); user-select: none; }
.links { margin: 0; padding-left: 1.1em; }
.links li { margin: 0.3em 0; }

/* colour code */

.cell-works { --state: var(--green); }
.cell-partial { --state: var(--yellow); }
.cell-regression { --state: var(--red); }
.cell-fails { --state: var(--orange); }
.cell-missing { --state: var(--blue); }
.cell-unknown { --state: var(--magenta); }
.cell-not-applicable { --state: transparent; }
.cell-not-tested { --state: var(--terminal-black); }
.cell-hint-works { --hint: var(--green); }
.cell-hint-partial { --hint: var(--yellow); }
.cell-hint-regression { --hint: var(--red); }
.cell-hint-fails { --hint: var(--orange); }
.cell-hint-missing { --hint: var(--blue); }
.cell-hint-unknown { --hint: var(--magenta); }
.cell-hint-not-applicable, .cell-hint-not-tested { --hint: var(--comment); }

.cell, .swatch, .chip-result {
  background: var(--state);
  color: var(--night);
  font-weight: 700;
  text-align: center;
}

.cell-not-applicable, .cell-not-tested { color: var(--comment); }
.cell-not-applicable { border: 1px dashed var(--terminal-black); }

.cell-unconfirmed {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--hint);
  color: var(--hint);
}

.cell a { color: inherit; display: block; text-decoration: none; }

.swatch, .chip-result {
  border-radius: 2px;
  display: inline-block;
  height: 1.3em;
  line-height: 1.3em;
  vertical-align: middle;
  width: 1.3em;
}

.chip-result { margin-right: 0.15em; }

.legend {
  color: var(--fg-dim);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.85em;
  gap: 0.4em 1.2em;
  list-style: none;
  margin: 1rem 0 0.4rem;
  padding: 0;
}

.legend-note { color: var(--comment); font-size: 0.85em; max-width: 60rem; }

.badge {
  border: 1px solid currentColor;
  border-radius: 2px;
  display: inline-block;
  font-size: 0.8em;
  font-weight: 400;
  line-height: 1.4;
  padding: 0 0.45em;
  white-space: nowrap;
}

.badge-works { color: var(--green); }
.badge-partial { color: var(--yellow); }
.badge-regression { color: var(--red); }
.badge-fails { color: var(--orange); }
.badge-missing { color: var(--blue); }
.badge-unknown { color: var(--magenta); }
.badge-not-applicable, .badge-not-tested { color: var(--comment); }
.badge-community { color: var(--cyan); }
.badge-tester { color: var(--green); font-weight: 700; }
.badge-unconfirmed { border-style: dashed; color: var(--comment); }

/* a cell coloured by tester runs */
.cell-tester { box-shadow: inset 0 0 0 2px var(--night); }

.layer {
  color: var(--comment);
  font-size: 0.8em;
  font-weight: 400;
}

.layer-aurora { color: var(--magenta); }
.layer-omarchy { color: var(--green); }

/* the matrix */

.matrix-view-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 1.2rem 0 0.8rem;
}

.matrix-view-label { color: var(--fg-dim); font-size: 0.85rem; }

.matrix-view-switch {
  background: var(--deep);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: grid;
  gap: 0.2rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 100%;
  padding: 0.25rem;
  width: 21rem;
}

.matrix-view-switch a {
  align-items: center;
  border-radius: var(--radius);
  color: var(--fg-dim);
  display: flex;
  font-size: 0.9rem;
  font-weight: 400;
  justify-content: center;
  min-height: 3rem;
  padding: 0.4rem 0.75rem;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.matrix-view-switch a:hover { background: var(--storm); color: var(--white); }
.matrix-view-switch a[aria-current="page"] { background: var(--green); color: var(--night); font-weight: 700; }
.matrix-view-switch a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.matrix-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.matrix {
  border-collapse: separate;
  border-spacing: 3px;
  font-size: 0.85rem;
}

.matrix .row-head {
  background: var(--night);
  font-weight: 400;
  left: 0;
  min-width: 15rem;
  padding: 0.2rem 1rem 0.2rem 0;
  position: sticky;
  text-align: left;
  vertical-align: bottom;
  z-index: 1;
}

.matrix tbody .row-head a { color: var(--white); }
.row-meta { color: var(--comment); display: block; font-size: 0.85em; }
.matrix-note { color: var(--fg-dim); font-size: 0.85rem; max-width: 70rem; }
.matrix-grouped .row-head { max-width: 24rem; }
.matrix-grouped .row-meta { overflow-wrap: anywhere; }
.matrix-history .row-head { border-left: 1px solid var(--border); padding-left: 1rem; }
.model-toggle { background: transparent; border: 0; color: var(--cyan); cursor: pointer; font: inherit; font-size: 0.85em; margin-top: 0.25rem; padding: 0; }
.model-toggle:hover { color: var(--turquoise); }

.feature-head {
  height: 11.5rem;
  padding: 0 0 0.4rem;
  vertical-align: bottom;
  white-space: nowrap;
  width: 1.9rem;
}

.feature-head a {
  color: var(--fg-dim);
  display: inline-block;
  font-weight: 400;
  max-height: 11rem;
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  transform: rotate(180deg);
  writing-mode: vertical-rl;
}

.feature-head a:hover { color: var(--white); }
.feature-head.layer-aurora a { color: var(--magenta); }
.feature-head.layer-omarchy a { color: var(--green); }

.matrix .cell {
  border-radius: 2px;
  height: 1.9rem;
  min-width: 1.9rem;
  padding: 0;
}

/* lists */

.list {
  border-collapse: collapse;
  font-size: 0.9rem;
  width: 100%;
}

.list th {
  border-bottom: 1px solid var(--border);
  color: var(--fg-dim);
  font-weight: 400;
  padding: 0.35rem 0.75rem 0.35rem 0;
  text-align: left;
  white-space: nowrap;
}

.list td {
  border-bottom: 1px solid rgb(65 72 104 / 0.35);
  padding: 0.4rem 0.75rem 0.4rem 0;
  vertical-align: top;
}

.list .cell { height: 1.6rem; min-width: 1.6rem; width: 1.6rem; padding: 0; }
.list td.cell { border-bottom-color: var(--night); }
.features-table { width: auto; }
.features-table td:first-child { min-width: 22rem; }
.features-table .config-head { padding: 0.35rem 0.4rem; text-align: center; }
.config-head a { color: var(--fg-dim); font-weight: 400; text-decoration: none; }
.configuration-key { color: var(--fg-dim); font-size: 0.85rem; margin: 0 0 1rem; overflow-wrap: anywhere; padding-left: 2rem; }
.configuration-key li { margin-bottom: 0.35rem; }
.feature-note { color: var(--fg-dim); font-size: 0.85rem; }
.feature-catalogue th:first-child { width: 46%; }
.feature-catalogue th:nth-child(2) { width: 4rem; }
.feature-results { display: flex; flex-wrap: wrap; gap: 0.3rem; list-style: none; margin: 0; padding: 0; position: relative; }
.feature-results .chip-result { display: block; margin: 0; text-align: center; text-decoration: none; }
.feature-results .chip-result:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.result-tooltip {
  background: var(--storm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 0.3rem 1.2rem rgb(0 0 0 / 0.3);
  color: var(--fg-dim);
  display: grid;
  font-size: 0.8rem;
  font-weight: 400;
  gap: 0.25rem;
  left: 0;
  max-width: 100%;
  opacity: 0;
  overflow-wrap: anywhere;
  padding: 0.7rem 0.8rem;
  pointer-events: none;
  position: absolute;
  right: auto;
  text-align: left;
  top: calc(100% + 0.4rem);
  transition: opacity var(--transition);
  visibility: hidden;
  width: 26rem;
  z-index: 5;
}
.result-tooltip strong { color: var(--white); }
.expected-yes { color: var(--green); }
.expected-no { color: var(--yellow); }
.expected-none { color: var(--comment); }
.summary { color: var(--fg-dim); }
.actions { display: flex; gap: 0.5rem; }
.actions form { margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; margin-bottom: 0.5rem; }
.credit { font-size: 0.85em; margin-top: 1rem; }

/* benchmarks: a bar per row, against the best Mac on the same benchmark */

.benchmark-table .score-head { min-width: 16rem; }
.score-cell { min-width: 16rem; position: relative; }
.score-bar {
  border-left: 2px solid var(--green);
  height: calc(100% - 0.6rem);
  left: 0;
  position: absolute;
  top: 0.3rem;
  width: 95%;
}
.score-bar rect { fill: rgb(158 206 106 / 0.24); }
.score-value { color: var(--white); position: relative; padding-left: 0.4rem; }
.score-range { font-size: 0.85em; position: relative; padding-left: 0.4rem; }
.check .score { color: var(--green); }
.check .score strong { color: var(--white); }

/* report pages: terminal output */

.terminal {
  background: var(--deep);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.terminal-bar {
  background: var(--storm);
  border-bottom: 1px solid var(--border);
  display: flex;
  font-size: 0.85em;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.4rem 1rem;
}

.terminal-title { color: var(--green); font-weight: 700; }
.terminal-body { padding: 1rem clamp(0.9rem, 2vw, 1.5rem) 1.5rem; }
.prompt-line { color: var(--fg-dim); margin-bottom: 0.8rem; }
.terminal h1 { font-size: 1.35rem; color: var(--white); }
.report-badges { margin-bottom: 1rem; }

.machine {
  display: grid;
  gap: 0.1rem 1.5rem;
  grid-template-columns: max-content 1fr;
  margin: 0 0 1.5rem;
}

.machine dt { color: var(--comment); }
.machine dd { color: var(--white); margin: 0; overflow-wrap: anywhere; }

.section-title {
  align-items: center;
  color: var(--green);
  display: flex;
  font-size: 0.95rem;
  gap: 0.75rem;
  margin: 1.4rem 0 0.4rem;
  text-transform: lowercase;
}

.section-title::after {
  border-top: 1px solid var(--border);
  content: "";
  flex: 1;
}

.checks { list-style: none; margin: 0; padding: 0; }

.check {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.8rem;
  padding: 0.2rem 0;
}

.status {
  border-radius: 2px;
  color: var(--night);
  font-size: 0.8em;
  font-weight: 700;
  padding: 0 0.4em;
  text-align: center;
  width: 3.4em;
}

.status-pass { background: var(--green); }
.status-fail { background: var(--red); }
.status-skip { background: var(--terminal-black); color: var(--white); }
.status-gap { background: var(--blue); }
.build { color: var(--fg-dim); font-size: 0.9em; }
.build-id { color: var(--white); }
.gap { color: var(--blue); }
.package-table { color: var(--fg-dim); font-size: 0.85em; margin: 0.5rem 0 0; }
.package-table td { padding: 0 1rem 0 0; }
.check-id { color: var(--white); min-width: 16rem; }
.feature { color: var(--comment); font-size: 0.9em; }

.evidence {
  border-left: 2px solid var(--terminal-black);
  color: var(--fg-dim);
  flex-basis: 100%;
  font-size: 0.85em;
  margin: 0.1rem 0 0.4rem 4.2em;
  overflow-x: auto;
  padding: 0 0 0 0.8rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.check-fail .evidence { border-left-color: var(--red); }

.packages { margin: 0.8rem 0 1.5rem; }
.packages summary { color: var(--green); cursor: pointer; }
.packages pre { color: var(--fg-dim); font-size: 0.85em; margin: 0.5rem 0 0; overflow-x: auto; }

/* forms */

.form { display: grid; gap: 0.6rem; max-width: 24rem; }
.form input[type="password"], .form input[type="text"] {
  background: var(--deep);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--white);
  font: inherit;
  padding: 0.45em 0.7em;
}
.form input[type="password"]:focus, .form input[type="text"]:focus { border-color: var(--green); outline: none; }
.form .button { justify-self: start; }
.form-inline { align-items: center; display: flex; flex-wrap: wrap; margin-top: 1rem; max-width: none; }
form.inline { display: inline; }

@media (max-width: 40rem) {
  .check-id { min-width: 0; }
  .evidence { margin-left: 0; }
  .matrix-view-label { width: 100%; }
  .matrix-view-switch { width: 100%; }
  .matrix .row-head { min-width: 10rem; }
}

/* filter bar: a GET form, so every filtered view is a link */

.filter-bar {
  align-items: flex-end;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin: 1rem 0 0.6rem;
  padding: 0.7rem clamp(0.7rem, 2vw, 1rem);
}

.filter-fields { display: flex; flex: 1; flex-wrap: wrap; gap: 0.5rem 0.9rem; }
.filter-field { display: grid; font-size: 0.8em; gap: 0.2rem; min-width: 0; }
.filter-field > span { color: var(--comment); text-transform: lowercase; }
.filter-field select, .filter-field input[type="date"] {
  background: var(--deep);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--white);
  color-scheme: dark;
  font: inherit;
  max-width: 14rem;
  padding: 0.25em 0.4em;
}
.filter-field select:focus, .filter-field input:focus { border-color: var(--green); outline: none; }
.filter-check { align-items: center; align-self: end; display: flex; gap: 0.4rem; padding-bottom: 0.3em; }
.filter-check > span { color: var(--fg-dim); }
.filter-check input { accent-color: var(--green); margin: 0; }

.filter-status { align-items: baseline; display: flex; flex-wrap: wrap; font-size: 0.85em; gap: 0.35rem 0.6rem; margin: 0 0 0.8rem; }
.filter-count { color: var(--white); }
.filter-chip {
  border: 1px solid var(--cyan);
  border-radius: var(--radius);
  color: var(--cyan);
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 0 0.45em;
  text-decoration: none;
  white-space: normal;
}
.filter-chip:hover { border-color: var(--red); color: var(--red); }
.filter-clear { color: var(--fg-dim); }
.filter-exports { color: var(--comment); }
.filter-exports a { margin-left: 0.3em; }
.cell-hidden { opacity: 0.35; }

@media (max-width: 40rem) {
  .filter-field { flex: 1 1 42%; }
  .filter-field select, .filter-field input[type="date"] { max-width: none; width: 100%; }
}

/* candidate sets */

.verdict { font-weight: 700; }
.verdict-ready { color: var(--green); }
.verdict-blocked { color: var(--red); }
.verdict-waiting { color: var(--yellow); }

/* The bring-up table on /models. */
.lineup-table td { vertical-align: top; }
.lineup-note { margin-left: 0.4em; }
.lineup-tested { margin-top: 0.3em; font-size: 0.9em; color: var(--comment); }
.lineup-row[data-tested="false"] td:first-child strong { color: var(--comment); }

/* Feature page results: one row per model and stack, its builds below. */
.feature-result-table td { vertical-align: middle; }
.feature-result-table td.cell { width: 1.8em; min-width: 1.8em; padding: 0.15em 0; }
.feature-result-table tbody + tbody { border-top: 0; }
.feature-history td { font-size: 0.9em; }
.feature-history td.build-label { padding-left: 1.5rem; border-left: 1px solid var(--border); }
.feature-result-table .model-toggle { margin-left: 0.5em; }
.feature-result-table td.summary { padding-left: 0.75rem; }
.result-tooltip .tooltip-verdict { align-items: center; display: flex; font-weight: 700; gap: 0.5rem; }
.result-tooltip .tooltip-verdict .swatch { flex: none; }

/* Matrix cells: the tooltip is copied into one floating box (result_tooltips.js), clear of the scrolling table. */
.cell-tooltip { display: none; }
.result-tooltip.floating { left: 0; max-width: calc(100vw - 16px); opacity: 1; position: fixed; top: 0; visibility: visible; z-index: 20; }
.result-tooltip.floating[hidden] { display: none; }
/* The square a tooltip is about: a thick bright outline, and the tooltip's pointer touching it. */
.cell.tooltip-target, .chip-result.tooltip-target { outline: 3px solid var(--white); outline-offset: 1px; position: relative; z-index: 2; }
.result-tooltip.floating { overflow: visible; }
.result-tooltip.floating::before {
  background: inherit;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-right: 0;
  content: "";
  height: 12px;
  left: calc(var(--arrow-x, 24px) - 6px);
  position: absolute;
  top: -7px;
  transform: rotate(45deg);
  width: 12px;
}
.result-tooltip.floating[data-placement="above"]::before { bottom: -7px; top: auto; transform: rotate(225deg); }

/* Preview: the lab before it opens */

.preview-banner {
  border-bottom: 1px solid var(--yellow);
  color: var(--yellow);
  margin: 0;
  padding: 0.45rem clamp(1rem, 4vw, 3rem);
}

/* the two texts */

.legal {
  color: var(--fg-dim);
  margin: 0;
  overflow-x: auto;
  white-space: pre-wrap;
}

.legal-version { color: var(--comment); font-size: 0.85em; overflow-wrap: anywhere; }

/* the lab's pages: cards, tables, badges and buttons */

.card.attention { border-color: var(--yellow); }
.card.attention .card-title { color: var(--yellow); }
.card-tools { background: var(--night); padding: 0 0.5em; position: absolute; right: 1rem; top: -0.8em; }

.kind-admin { color: var(--magenta); }
.kind-maintainer { color: var(--blue); }
.kind-mteam { color: var(--green); }
.kind-external { color: var(--yellow); }
.kind-none { color: var(--comment); }
.kind-blocked { color: var(--red); }

.state-qualified { color: var(--green); }
.state-not-qualified { color: var(--red); }
.state-revoked { color: var(--orange); }
.state-none { color: var(--comment); }
.lab-verdict { color: var(--fg-dim); display: block; font-size: 0.9em; }
.asking { border: 1px solid var(--yellow); padding: 0.8rem 1rem; }
.release-warning { color: var(--yellow); }

.button-plain { border-color: var(--border); color: var(--white); font-weight: 400; }
.button-plain:hover { background: transparent; border-color: var(--green); color: var(--green); }
.button-danger.armed { background: var(--red); color: var(--night); white-space: normal; }

.chips { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; }
.chip { border: 1px solid rgb(65 72 104 / 0.4); border-radius: 999px; color: var(--fg-dim); font-size: 0.85em; font-weight: 400; padding: 0.05em 0.7em; text-decoration: none; }
.chip.current { background: rgb(122 162 247 / 0.14); border-color: var(--blue); color: var(--white); }

.facts { display: grid; gap: 0.45rem 1.2rem; grid-template-columns: max-content 1fr; margin: 0; }
.facts dt { color: var(--comment); }
.facts dd { color: var(--white); margin: 0; overflow-wrap: anywhere; }

.record { font-size: 0.9em; list-style: none; margin: 0; padding: 0; }
.record li { border-bottom: 1px solid rgb(65 72 104 / 0.35); padding: 0.35em 0; }
.record li:last-child { border: 0; }
.record .when { color: var(--comment); display: block; font-size: 0.9em; }

.scroll { max-width: 100%; overflow-x: auto; }

/* People: the table, a row opened in place, the record beside it */

.split { display: grid; gap: 0 1.5rem; }
.you { color: var(--comment); font-size: 0.85em; }
.person-toggle { color: var(--white); text-decoration: none; }
.person-toggle:hover b { color: var(--green); }
.person-row.open td { background: rgb(65 72 104 / 0.18); }
.person-detail > td { background: var(--deep); padding: 1rem; white-space: normal; }
.person-blocks { display: grid; gap: 1rem 2rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.person-blocks .wide { grid-column: 1 / -1; }
.person-blocks h3 { margin-top: 0; }
.person-blocks ul { list-style: none; margin: 0; padding: 0; }
.person-blocks li { margin-bottom: 0.35em; }
.person-blocks p { font-size: 0.9em; margin: 0.4em 0 0; }
@media (min-width: 1520px) { .split { align-items: start; grid-template-columns: minmax(0, 1fr) 22rem; } }
.list .actions { justify-content: flex-end; white-space: nowrap; }

/* a Mac's page: its tabs, the fence in place of Live, the screen and the logs */

.crumb { color: var(--comment); margin: 0 0 0.3em; }
.tabs { border-bottom: 1px solid var(--border); display: flex; gap: 0.2rem; margin: 0 0 1.5rem; }
.tabs a { border: 1px solid transparent; border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; color: var(--fg-dim); font-weight: 400; padding: 0.25em 0.9em; text-decoration: none; }
.tabs a.current { background: var(--night); border-color: var(--border); color: var(--green); font-weight: 700; margin-bottom: -1px; }
.fence { border-left: 3px solid var(--yellow); margin: 0 0 1.5em; padding: 0.2em 0 0.2em 0.8em; }
.fence .form-inline { margin-top: 0.5rem; }
.facts .form-inline { margin-top: 0.4rem; }
.screen { border: 1px solid var(--border); border-radius: var(--radius); display: block; height: auto; max-width: min(100%, 64rem); }
.screen[hidden] { display: none; }
.term { background: var(--deep); border: 1px solid var(--border); border-radius: var(--radius); color: var(--fg-dim); font-size: 0.85em; margin: 0; max-height: 30rem; overflow: auto; padding: 0.6em 0.8em; white-space: pre-wrap; word-break: break-all; }
button.chip { background: transparent; cursor: pointer; font-family: inherit; }

/* Jobs, Builds and "Boot a kernel" */

.job-ok { color: var(--green); }
.job-bad { color: var(--red); }
.job-warn { color: var(--yellow); }
.job-live { color: var(--blue); }
.job-dim { color: var(--comment); }
.log { font-size: 0.85em; margin: 0.5rem 0 0; max-height: 24rem; overflow: auto; }
.boot { display: grid; gap: 1.2rem; }
.boot fieldset { border: 0; display: grid; gap: 0.45rem; margin: 0; min-width: 0; padding: 0; }
.boot legend { color: var(--comment); font-size: 0.85em; margin-bottom: 0.35rem; padding: 0; text-transform: lowercase; }
.boot p { margin: 0; }
.boot input[type="text"], .boot select, .boot textarea {
  background: var(--deep);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--white);
  color-scheme: dark;
  font: inherit;
  max-width: 100%;
  min-width: 0;
  padding: 0.45em 0.7em;
}
.boot input[type="text"]:focus, .boot select:focus, .boot textarea:focus { border-color: var(--green); outline: none; }
.boot input[type="checkbox"], .boot input[type="radio"] { accent-color: var(--green); }
.boot-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* My Macs: one card per Mac a person lends */

#lend-another { margin: 0 0 1.5rem; }
.mac-card h3 { border-top: 1px solid rgb(65 72 104 / 0.35); padding-top: 1em; text-transform: lowercase; }
.mac-card:target { border-color: var(--green); }
.record li:target { color: var(--white); }
.controls { align-items: center; display: flex; flex-wrap: wrap; gap: 0.5rem 0.8rem; margin: 1.2rem 0 0; }
.controls p { flex-basis: 100%; font-size: 0.9em; margin: 0; }
.controls input[type="datetime-local"] {
  background: var(--deep);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--white);
  color-scheme: dark;
  font: inherit;
  font-size: 0.85em;
  padding: 0.1em 0.4em;
}
.controls input[type="datetime-local"]:focus { border-color: var(--green); outline: none; }
.steps { margin: 0.4em 0; padding-left: 1.6em; }
.commands { margin: 0; }
.commands dt { margin-top: 0.6em; overflow-wrap: anywhere; }
.commands dd { color: var(--fg-dim); font-size: 0.9em; margin: 0; }

/* phone width: each row of the header scrolls sideways, tables stack */

@media (max-width: 760px) {
  html { font-size: 14px; }
  .header-row { gap: 0.5rem 0.8rem; justify-content: space-between; }
  .header-row .site-nav { flex-wrap: nowrap; order: 5; overflow-x: auto; scrollbar-width: none; width: 100%; }
  .fleet { display: none; }
  .facts { gap: 0.1rem; grid-template-columns: 1fr; }
  .facts dd { margin-bottom: 0.6rem; }
  .stack thead { display: none; }
  .stack tr { border-bottom: 1px solid rgb(65 72 104 / 0.35); display: block; padding: 0.5em 0; }
  .stack tr:last-child { border: 0; }
  .stack td { border: 0; display: block; padding: 0.1em 0.3em 0.1em 9.3em; position: relative; white-space: normal; }
  .stack td[data-label]::before { color: var(--comment); content: attr(data-label); font-size: 0.85em; left: 0.3em; position: absolute; top: 0.25em; }
  .stack td:first-child { font-size: 1.05em; padding-left: 0.3em; }
  .stack td:first-child::before { display: none; }
  .stack tr.person-detail { padding: 0; }
  .stack tr.person-detail > td { padding: 1rem 0.6rem; }
  .stack .actions { justify-content: flex-start; padding: 0.4em 0.3em 0; white-space: normal; }
}

/* a value to copy, its Copy button beside it (shown by app.js) */

.copyable { align-items: baseline; display: inline-flex; flex-wrap: wrap; gap: 0.2em 0.5em; max-width: 100%; vertical-align: baseline; white-space: normal; }
.copyable [data-copy] { min-width: 0; overflow-wrap: anywhere; }
.copy-button { flex: none; font-size: 0.75em; line-height: 1.4; padding: 0.05em 0.55em; }
.copy-button[hidden] { display: none; }
.copyable-block { align-items: flex-start; display: flex; flex-wrap: nowrap; margin: 0 0 0.8em; }
.copyable-block > pre { flex: 1; margin: 0; min-width: 0; }
.copyable-block > .copy-button { margin-top: 0.7rem; }
.copyable-title { display: flex; margin: 0 0 0.4em; }
.copyable-title h1 { margin: 0; }
.command .copyable { white-space: pre-wrap; }

.visually-hidden { clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }

@media (max-width: 40rem) {
  .copyable-block { flex-direction: column; }
  .copyable-block > pre { width: 100%; }
  .copyable-block > .copy-button { align-self: flex-end; margin-top: 0.4em; }
}
