/*
 * flakytest.dev design system.
 *
 * Everything is driven by the custom properties on :root. Dark mode follows the OS unless the viewer picked a
 * theme (html[data-theme]); the dark values are declared for both cases.
 */

:root {
  color-scheme: light;
  --font-sans: "Inter", "Inter Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-2: #f2f2ef;
  --surface-3: #e9e9e5;
  --border: #e3e2dd;
  --border-strong: #cfcec7;
  --text: #121413;
  --text-2: #4d4f4c;
  --text-3: #6f716d;
  --link: #006b4a;

  --accent: #00875e;
  --accent-strong: #006b4a;
  --accent-text: #ffffff;
  --accent-soft: #e2f4ec;
  --accent-ring: rgba(0, 135, 94, 0.35);
  --glow: rgba(0, 170, 115, 0.16);

  --good: #0a7d32;
  --good-soft: #e3f4e7;
  --warn: #8a5a00;
  --warn-soft: #fbf0d9;
  --bad: #b42828;
  --bad-soft: #fbe6e4;
  --info: #1f5fae;
  --info-soft: #e4eefb;
  --flaky: #8a3fb0;
  --flaky-soft: #f3e8f9;

  /* Categorical series, fixed order (colour follows the entity, never its rank) */
  --s0: #a9a8a1;
  --s1: #2a78d6;
  --s2: #eb6834;
  --s3: #1baf7a;
  --s4: #eda100;
  --s5: #e87ba4;
  --s6: #008300;
  --s7: #6250d6;
  --s8: #e34948;

  /* Test phases: one hue, three steps, in phase order */
  --ph-setup: #0b6b55;
  --ph-call: #26a982;
  --ph-teardown: #94d8bf;

  --ci: #1f5fae;
  --ci-soft: #e4eefb;
  --local: #7a4b00;
  --local-soft: #f8eedc;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 20, 0.06);
  --shadow: 0 1px 2px rgba(16, 24, 20, 0.05), 0 4px 16px rgba(16, 24, 20, 0.06);
  --shadow-lg: 0 2px 6px rgba(16, 24, 20, 0.06), 0 24px 60px rgba(16, 24, 20, 0.12);
  --gutter: 16px;
  --max: 1240px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0c0c;
    --surface: #131515;
    --surface-2: #1a1c1c;
    --surface-3: #232625;
    --border: #262928;
    --border-strong: #363a38;
    --text: #eef0ed;
    --text-2: #bfc3be;
    --text-3: #8d918c;
    --link: #4fd8a5;
    --accent: #2ccf93;
    --accent-strong: #4fd8a5;
    --accent-text: #04140d;
    --accent-soft: #10291f;
    --accent-ring: rgba(44, 207, 147, 0.4);
    --glow: rgba(44, 207, 147, 0.12);
    --good: #4cc970;
    --good-soft: #10261a;
    --warn: #f0b84a;
    --warn-soft: #2b2110;
    --bad: #f07a72;
    --bad-soft: #2d1514;
    --info: #79aef0;
    --info-soft: #132235;
    --flaky: #cf98ef;
    --flaky-soft: #261a30;
    --s0: #5d605c;
    --s1: #3987e5;
    --s2: #d95926;
    --s3: #199e70;
    --s4: #c98500;
    --s5: #d55181;
    --s6: #008300;
    --s7: #9085e9;
    --s8: #e66767;
    --ph-setup: #1d8f70;
    --ph-call: #3ec99b;
    --ph-teardown: #a5e6cf;
    --ci: #79aef0;
    --ci-soft: #132235;
    --local: #f0b84a;
    --local-soft: #2b2110;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.4), 0 30px 70px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0c0c;
  --surface: #131515;
  --surface-2: #1a1c1c;
  --surface-3: #232625;
  --border: #262928;
  --border-strong: #363a38;
  --text: #eef0ed;
  --text-2: #bfc3be;
  --text-3: #8d918c;
  --link: #4fd8a5;
  --accent: #2ccf93;
  --accent-strong: #4fd8a5;
  --accent-text: #04140d;
  --accent-soft: #10291f;
  --accent-ring: rgba(44, 207, 147, 0.4);
  --glow: rgba(44, 207, 147, 0.12);
  --good: #4cc970;
  --good-soft: #10261a;
  --warn: #f0b84a;
  --warn-soft: #2b2110;
  --bad: #f07a72;
  --bad-soft: #2d1514;
  --info: #79aef0;
  --info-soft: #132235;
  --flaky: #cf98ef;
  --flaky-soft: #261a30;
  --s0: #5d605c;
  --s1: #3987e5;
  --s2: #d95926;
  --s3: #199e70;
  --s4: #c98500;
  --s5: #d55181;
  --s6: #008300;
  --s7: #9085e9;
  --s8: #e66767;
  --ph-setup: #1d8f70;
  --ph-call: #3ec99b;
  --ph-teardown: #a5e6cf;
  --ci: #79aef0;
  --ci-soft: #132235;
  --local: #f0b84a;
  --local-soft: #2b2110;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.4), 0 30px 70px rgba(0, 0, 0, 0.5);
}

/* Base */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection {
  background: var(--accent-ring);
}

h1,
h2,
h3,
h4,
h5 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 650;
}

h1 {
  font-size: 1.75rem;
}

h2 {
  font-size: 1.25rem;
}

h3 {
  font-size: 1.05rem;
}

h4 {
  font-size: 0.95rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--link);
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

code,
kbd,
pre,
samp {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

:not(pre) > code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.1em 0.4em;
  border-radius: 5px;
  overflow-wrap: anywhere;
}

pre {
  margin: 0 0 1em;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: 1.6;
}

pre.wrap {
  white-space: pre-wrap;
  word-break: break-word;
}

small,
.small {
  font-size: 0.85em;
}

ul,
ol {
  padding-left: 1.3em;
}

mark {
  background: var(--warn-soft);
  color: var(--text);
  padding: 0 0.2em;
  border-radius: 3px;
}

/* Utilities */

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (min-width: 720px) {
  :root {
    --gutter: 28px;
  }
}

.muted {
  color: var(--text-2);
}

.faint {
  color: var(--text-3);
}

.mono {
  font-family: var(--font-mono);
}

.num {
  font-variant-numeric: tabular-nums;
}

.right {
  text-align: right;
}

.nowrap {
  white-space: nowrap;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.between {
  justify-content: space-between;
}

.grow {
  flex: 1 1 auto;
  min-width: 0;
}

.mt-0 {
  margin-top: 0;
}

.mb-0 {
  margin-bottom: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 719px) {
  .hide-sm {
    display: none !important;
  }
}

@media (max-width: 999px) {
  .hide-md {
    display: none !important;
  }
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-2,
.grid-3,
.grid-4,
.grid-5 {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .grid-2,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-3,
  .grid-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .grid-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.split {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1000px) {
  .split {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  }

  .split-even {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

/* Buttons */

.btn,
button,
input[type="submit"],
input[type="button"] {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 550;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s;
}

.btn:hover,
button:hover,
input[type="submit"]:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.btn-primary,
button[type="submit"]:not(.btn-ghost):not(.btn-danger):not(.btn),
input[type="submit"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.btn-primary:hover,
button[type="submit"]:not(.btn-ghost):not(.btn-danger):not(.btn):hover,
input[type="submit"]:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--accent-text);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--text-2);
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

.btn-danger {
  background: var(--bad);
  border-color: var(--bad);
  color: #fff;
}

.btn-danger:hover {
  background: var(--bad);
  filter: brightness(0.92);
}

.btn-lg {
  height: 46px;
  padding: 0 20px;
  font-size: 15px;
  border-radius: 10px;
}

.btn-sm {
  height: 30px;
  padding: 0 10px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  width: 36px;
  padding: 0;
}

.btn svg,
.icon {
  width: 18px;
  height: 18px;
  flex: none;
}

/* Forms */

label {
  display: block;
  font-weight: 550;
  font-size: 14px;
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="number"],
select,
textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  transition: border-color 0.12s, box-shadow 0.12s;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  vertical-align: -3px;
  margin: 0 6px 0 0;
}

.field {
  margin-bottom: 16px;
}

.helptext,
.field-help {
  display: block;
  color: var(--text-3);
  font-size: 13px;
  margin-top: 4px;
}

.errorlist {
  list-style: none;
  padding: 0;
  margin: 4px 0 8px;
  color: var(--bad);
  font-size: 13px;
}

form p {
  margin-bottom: 14px;
}

/* Surfaces */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.card-body {
  padding: 18px 20px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.card-head h2,
.card-head h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.card-head .sub {
  color: var(--text-3);
  font-size: 13px;
}

.card-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-2);
}

.section {
  margin-bottom: 20px;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 12px;
}

.section-title h2 {
  margin: 0;
  font-size: 17px;
}

.callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--info-soft);
  color: var(--text);
  border: 1px solid transparent;
  font-size: 14px;
}

.callout > svg {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--info);
  margin-top: 1px;
}

.callout-warn {
  background: var(--warn-soft);
}

.callout-warn > svg {
  color: var(--warn);
}

.callout-bad {
  background: var(--bad-soft);
}

.callout-bad > svg {
  color: var(--bad);
}

.callout p:last-child {
  margin-bottom: 0;
}

.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-2);
}

.empty h3 {
  color: var(--text);
}

/* Badges */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border);
  vertical-align: middle;
}

.badge svg {
  width: 13px;
  height: 13px;
}

.badge-ci {
  background: var(--ci-soft);
  color: var(--ci);
  border-color: transparent;
}

.badge-local {
  background: var(--local-soft);
  color: var(--local);
  border-color: transparent;
}

.badge-pass,
.badge-passed,
.badge-good,
.badge-regression_caught {
  background: var(--good-soft);
  color: var(--good);
  border-color: transparent;
}

.badge-fail,
.badge-failed,
.badge-error,
.badge-bad,
.badge-ongoing {
  background: var(--bad-soft);
  color: var(--bad);
  border-color: transparent;
}

.badge-flaky {
  background: var(--flaky-soft);
  color: var(--flaky);
  border-color: transparent;
}

.badge-warn,
.badge-muted,
.badge-test_changed,
.badge-medium {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: transparent;
}

.badge-high {
  background: var(--bad-soft);
  color: var(--bad);
  border-color: transparent;
}

.badge-low,
.badge-resolved,
.badge-skipped {
  background: var(--surface-2);
  color: var(--text-2);
}

.badge-running {
  background: var(--info-soft);
  color: var(--info);
  border-color: transparent;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--s0);
  flex: none;
}

.dot-1 { background: var(--s1); }
.dot-2 { background: var(--s2); }
.dot-3 { background: var(--s3); }
.dot-4 { background: var(--s4); }
.dot-5 { background: var(--s5); }
.dot-6 { background: var(--s6); }
.dot-7 { background: var(--s7); }
.dot-8 { background: var(--s8); }

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-3);
}

.status-dot.pass {
  background: var(--good);
}

.status-dot.fail {
  background: var(--bad);
}

.status-dot.running {
  background: var(--info);
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

/* Tables */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}

th {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  background: var(--surface);
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: var(--surface-2);
}

td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.table-tight td,
.table-tight th {
  padding: 7px 12px;
}

th[data-sort] {
  cursor: pointer;
  user-select: none;
}

th[data-sort]::after {
  content: "";
  display: inline-block;
  width: 0;
  margin-left: 4px;
}

th[aria-sort="ascending"]::after {
  content: "\2191";
}

th[aria-sort="descending"]::after {
  content: "\2193";
}

th[aria-sort] {
  color: var(--text);
}

.test-name {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.test-name .path {
  color: var(--text-3);
}

.test-name a {
  color: var(--text);
}

.test-name a:hover .leaf {
  text-decoration: underline;
}

.cell-why {
  min-width: 220px;
}

.why-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
  margin-top: 6px;
  flex-wrap: wrap;
}

.why-line strong {
  color: var(--text);
  font-weight: 600;
}

/* Share bars */

.bar {
  display: flex;
  gap: 2px;
  height: 8px;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface-3);
}

.bar-lg {
  height: 14px;
  border-radius: 5px;
}

.bar > span {
  display: block;
  height: 100%;
  min-width: 2px;
  background: var(--s0);
}

.bar > span:last-child {
  border-radius: 0 4px 4px 0;
}

.bar .s1 { background: var(--s1); }
.bar .s2 { background: var(--s2); }
.bar .s3 { background: var(--s3); }
.bar .s4 { background: var(--s4); }
.bar .s5 { background: var(--s5); }
.bar .s6 { background: var(--s6); }
.bar .s7 { background: var(--s7); }
.bar .s8 { background: var(--s8); }
.bar .setup { background: var(--ph-setup); }
.bar .call { background: var(--ph-call); }
.bar .teardown { background: var(--ph-teardown); }

.meter {
  height: 6px;
  border-radius: 3px;
  background: var(--surface-3);
  overflow: hidden;
  min-width: 60px;
}

.meter > span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 10px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend .sw {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--s0);
}

.sw.s1 { background: var(--s1); }
.sw.s2 { background: var(--s2); }
.sw.s3 { background: var(--s3); }
.sw.s4 { background: var(--s4); }
.sw.s5 { background: var(--s5); }
.sw.s6 { background: var(--s6); }
.sw.s7 { background: var(--s7); }
.sw.s8 { background: var(--s8); }
.sw.setup { background: var(--ph-setup); }
.sw.call { background: var(--ph-call); }
.sw.teardown { background: var(--ph-teardown); }

.breakdown-row {
  display: grid;
  grid-template-columns: minmax(110px, 200px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13.5px;
}

.breakdown-row:last-child {
  border-bottom: 0;
}

.breakdown-row .name {
  min-width: 0;
}

.breakdown-row .val {
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
  white-space: nowrap;
}

.cat-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13.5px;
}

.cat-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
}

.cat-list .val {
  margin-left: auto;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

/* App shell */

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.app-header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: linear-gradient(140deg, var(--accent) 0%, #0a5f8a 100%);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.brand-mark svg {
  width: 15px;
  height: 15px;
  color: #fff;
}

.brand .tld {
  color: var(--text-3);
  font-weight: 500;
}

.crumb-sep {
  color: var(--border-strong);
  font-size: 20px;
  font-weight: 300;
}

.project-switch {
  position: relative;
}

.project-switch > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  max-width: 220px;
}

.project-switch > summary::-webkit-details-marker {
  display: none;
}

.project-switch > summary:hover {
  background: var(--surface-2);
}

.menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  max-width: calc(100vw - 32px);
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 30;
}

.menu-right {
  left: auto;
  right: 0;
}

.menu a,
.menu button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  background: transparent;
  border: 0;
  box-shadow: none;
  height: auto;
  justify-content: flex-start;
}

.menu a:hover,
.menu button:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.menu .menu-label {
  padding: 6px 10px 4px;
  font-size: 12px;
  color: var(--text-3);
}

.menu hr {
  margin: 6px 0;
}

details.dropdown {
  position: relative;
}

details.dropdown > summary {
  list-style: none;
  cursor: pointer;
}

details.dropdown > summary::-webkit-details-marker {
  display: none;
}

.app-nav {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: -1px;
}

.app-nav::-webkit-scrollbar {
  display: none;
}

.app-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px 12px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 550;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.app-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.app-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.app-nav svg {
  width: 16px;
  height: 16px;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
}

main.app-main {
  padding: 24px 0 64px;
  min-height: calc(100vh - 160px);
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.page-head h1 {
  margin: 0;
  font-size: 22px;
}

.page-head .eyebrow {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 4px;
}

.page-head .eyebrow a {
  color: var(--text-3);
}

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.segmented a,
.segmented button {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.segmented a:hover {
  color: var(--text);
  text-decoration: none;
}

.segmented a[aria-current="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.env-select {
  min-width: 0;
  max-width: 320px;
  height: 36px;
  min-height: 36px;
  padding: 0 32px 0 12px;
  font-weight: 550;
}

.app-footer {
  border-top: 1px solid var(--border);
  padding: 22px 0 36px;
  font-size: 13px;
  color: var(--text-3);
}

.app-footer a {
  color: var(--text-2);
}

.app-footer .links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.messages {
  margin: 16px 0 0;
}

.message {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--info-soft);
  margin-bottom: 8px;
  font-size: 14px;
}

.message.success {
  background: var(--good-soft);
}

.message.warning {
  background: var(--warn-soft);
}

.message.error {
  background: var(--bad-soft);
}

.message .close {
  cursor: pointer;
  width: 18px;
  height: 18px;
}

/* KPIs */

.kpis {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 20px;
}

@media (min-width: 720px) {
  .kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.kpi {
  padding: 14px 16px 16px;
}

.kpi .label {
  font-size: 12.5px;
  color: var(--text-3);
  font-weight: 550;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kpi .value {
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.03em;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.kpi .value small {
  font-size: 14px;
  color: var(--text-3);
  font-weight: 500;
  letter-spacing: 0;
}

.kpi .delta {
  font-size: 12.5px;
  margin-top: 4px;
  color: var(--text-3);
}

.delta-up {
  color: var(--bad);
}

.delta-down {
  color: var(--good);
}

.chart-box {
  position: relative;
  height: 260px;
  padding: 12px 16px 16px;
}

.chart-box.short {
  height: 200px;
}

/* Insights */

.insight {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.insight:last-child {
  border-bottom: 0;
}

.insight-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.insight-impact {
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
}

.insight-impact strong {
  display: block;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.insight-impact span {
  font-size: 12px;
  color: var(--text-3);
}

.insight h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.insight .summary {
  color: var(--text-2);
  font-size: 14px;
  margin: 0;
}

.insight details {
  margin-top: 10px;
  font-size: 14px;
}

.insight details > summary {
  cursor: pointer;
  color: var(--link);
  font-weight: 550;
  font-size: 13.5px;
}

.insight .fix {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--accent-soft);
  font-size: 14px;
}

.insight .fix strong {
  color: var(--accent-strong);
}

.rank {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border);
}

/* Call tree */

.calltree {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
  overflow-x: auto;
  padding: 8px 12px 12px;
}

.calltree details > summary {
  list-style: none;
  cursor: pointer;
}

.calltree details > summary::-webkit-details-marker {
  display: none;
}

.calltree {
  --indent: 14px;
}

.ct-node > summary,
.ct-leaf {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) 72px 52px;
  gap: 10px;
  align-items: center;
  padding: 3px 8px 3px calc(20px + var(--d, 0) * var(--indent));
  border-radius: 5px;
  white-space: nowrap;
}

.ct-node > summary:hover,
.ct-leaf:hover {
  background: var(--surface-2);
}

.ct-node > summary::before {
  content: "\25B8";
  position: absolute;
  left: calc(5px + var(--d, 0) * var(--indent));
  color: var(--text-3);
  transition: transform 0.1s;
}

.ct-node[open] > summary::before {
  transform: rotate(90deg);
}

.ct-children {
  margin: 0;
}

.ct-bar {
  position: absolute;
  left: calc(var(--d, 0) * var(--indent));
  bottom: 1px;
  height: 2px;
  width: var(--w);
  background: var(--accent);
  opacity: 0.45;
  border-radius: 2px;
}

.ct-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ct-loc {
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
}

.ct-time,
.ct-pct {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ct-pct {
  color: var(--text-3);
}

.ct-phase > summary .ct-name {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 11.5px;
  color: var(--text-2);
}

.ct-test .ct-name,
.ct-app .ct-name {
  color: var(--accent-strong);
}

.ct-lib .ct-name {
  color: var(--text);
}

.ct-stdlib .ct-name,
.ct-native .ct-name,
.ct-framework .ct-name {
  color: var(--text-2);
  font-weight: 500;
}

.ct-more {
  padding: 2px 8px 2px calc(20px + var(--d, 0) * var(--indent));
  color: var(--text-3);
  font-style: italic;
}

/* Code blocks with copy */

.code {
  position: relative;
  margin: 0 0 1em;
}

.code pre {
  margin: 0;
  padding-right: 76px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #0f1412;
  color: #dfe7e2;
  border-color: #1f2a25;
  font-size: 13px;
}

.code pre .c {
  color: #7f8f88;
}

.code pre .p {
  color: #4fd8a5;
  user-select: none;
}

.code pre .k {
  color: #f0b84a;
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  height: 28px;
  padding: 0 8px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #dfe7e2;
  box-shadow: none;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.secret {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.secret code {
  font-size: 13px;
}

/* Dialog */

dialog {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  width: min(480px, calc(100vw - 32px));
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

dialog::backdrop {
  background: rgba(10, 12, 11, 0.5);
  backdrop-filter: blur(2px);
}

dialog .card-body {
  padding: 20px 22px;
}

/* Tabs */

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  overflow-x: auto;
}

.tabs a {
  padding: 8px 12px;
  color: var(--text-2);
  font-weight: 550;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}

.tabs a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.tabs a:hover {
  text-decoration: none;
  color: var(--text);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-2);
}

.kv {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 18px;
  font-size: 14px;
  margin: 0;
}

.kv dt {
  color: var(--text-3);
}

.kv dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}

.steps > li {
  position: relative;
  padding: 0 0 22px 44px;
}

.steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.steps > li h3 {
  margin-bottom: 6px;
}

.loader {
  display: inline-flex;
  gap: 4px;
  vertical-align: middle;
}

.loader i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1s ease-in-out infinite;
}

.loader i:nth-child(2) {
  animation-delay: 0.15s;
}

.loader i:nth-child(3) {
  animation-delay: 0.3s;
}

.outcome-strip {
  display: flex;
  gap: 2px;
  height: 28px;
  align-items: stretch;
}

.outcome-strip a,
.outcome-strip span {
  flex: 1 1 0;
  min-width: 3px;
  max-width: 14px;
  border-radius: 2px;
  background: var(--good);
  opacity: 0.85;
}

.outcome-strip .failed,
.outcome-strip .error {
  background: var(--bad);
}

.outcome-strip .skipped,
.outcome-strip .muted {
  background: var(--s0);
}

/* Prose pages (legal, docs, changelog) */

.prose {
  max-width: 760px;
  font-size: 16px;
  line-height: 1.7;
}

.prose h1 {
  font-size: 2.1rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.6em;
}

.prose h2 {
  font-size: 1.35rem;
  margin-top: 2em;
}

.prose h3 {
  font-size: 1.1rem;
  margin-top: 1.6em;
}

.prose h4 {
  margin-top: 1.4em;
}

.prose img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 12px 0;
  height: auto;
}

.prose li {
  margin-bottom: 0.3em;
}

.prose table {
  margin-bottom: 1em;
}

.prose article {
  margin-bottom: 1em;
}

/* Auth pages */

.auth-card {
  max-width: 420px;
  margin: 48px auto;
  padding: 28px;
}

.auth-card h1 {
  font-size: 22px;
  text-align: center;
  margin-bottom: 20px;
}

.or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-3);
  font-size: 13px;
  margin: 20px 0;
}

.or::before,
.or::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--border);
}

.btn-github {
  background: #1b1f23;
  border-color: #1b1f23;
  color: #fff;
}

.btn-github:hover {
  background: #000;
  color: #fff;
}

.btn-github img {
  width: 20px;
  height: 20px;
}

/* Theme toggle: a moon in light mode, a sun in dark mode */

.theme-toggle .i-sun {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun {
    display: block;
  }

  :root:not([data-theme="light"]) .theme-toggle .i-moon {
    display: none;
  }
}

:root[data-theme="dark"] .theme-toggle .i-sun {
  display: block;
}

:root[data-theme="dark"] .theme-toggle .i-moon {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Marketing site shell */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 62px;
}

.site-nav {
  display: flex;
  gap: 22px;
}

.site-nav a {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 550;
}

.site-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.page-pad {
  padding-top: 40px;
  padding-bottom: 80px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 40px;
  background: var(--surface);
}

.footer-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-grid h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: 12px;
}

.footer-grid a:not(.brand) {
  display: block;
  color: var(--text-2);
  font-size: 14px;
  padding: 3px 0;
}

.footer-blurb {
  max-width: 340px;
  margin-top: 12px;
}

.footer-copy {
  margin: 32px 0 0;
}

.project-card {
  color: var(--text);
  transition: border-color 0.12s, box-shadow 0.12s, transform 0.12s;
}

.project-card:hover {
  text-decoration: none;
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
}

.project-card .card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.project-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.project-card h2 {
  font-size: 17px;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.project-card h2 a,
.project-card h2 a:hover {
  color: inherit;
  text-decoration: none;
}

/* The whole card opens the dashboard; the chart and the insights link sit above that link */
.project-card .stretched::after {
  content: "";
  position: absolute;
  inset: 0;
}

.project-card-value {
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.project-spark {
  position: relative;
  z-index: 1;
  height: 56px;
  margin: 10px 0 12px;
}

.project-insights {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}

.project-insights:hover {
  text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.project-insights .icon {
  flex: none;
  margin-top: 1px;
  color: var(--accent);
}

.project-insights > span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.project-insights.none {
  background: var(--surface-2);
}

.project-insights.none .icon {
  color: var(--text-3);
}

.project-card-meta {
  margin-top: auto;
  padding-top: 12px;
}

.insight,
.insight .fix,
.insight .summary {
  overflow-wrap: anywhere;
}

.insight-head .grow {
  min-width: 0;
}

.env-select {
  width: auto;
}

.cell-why .bar,
.cell-why .why-line {
  max-width: 460px;
}

.table-tight .test-name .path {
  display: block;
  font-size: 11.5px;
}

.breakdown-row .bar-track {
  min-width: 0;
}

/* Landing page */

.lp-hero {
  position: relative;
  padding: 72px 0 56px;
  overflow: hidden;
}

.lp-hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto;
  height: 900px;
  background:
    radial-gradient(600px 340px at 18% 30%, var(--glow), transparent 70%),
    radial-gradient(520px 320px at 85% 20%, color-mix(in srgb, var(--s1) 14%, transparent), transparent 70%);
  pointer-events: none;
}

.lp-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 20%, transparent 75%);
  opacity: 0.45;
  pointer-events: none;
}

.lp-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 48px;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

@media (min-width: 1080px) {
  .lp-hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  }
}

.lp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 550;
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}

.lp-eyebrow:hover {
  text-decoration: none;
  color: var(--text);
}

.lp-hero h1 {
  font-size: clamp(2.4rem, 5.6vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 750;
  margin-bottom: 22px;
}

.lp-hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent) 10%, var(--s1) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lp-lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--text-2);
  max-width: 560px;
  line-height: 1.6;
  margin-bottom: 26px;
}

.lp-lead-sm {
  font-size: 1.08rem;
  color: var(--text-2);
  line-height: 1.65;
}

.lp-install {
  max-width: 460px;
}

.lp-install pre {
  font-size: 14px;
}

.lp-ctas {
  margin: 22px 0 14px;
  gap: 10px;
}

.lp-window,
.lp-terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.lp-window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.lp-window-bar > i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--border-strong);
}

.lp-window-title {
  margin: 0 auto;
  padding-right: 40px;
  font-size: 12.5px;
  color: var(--text-3);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lp-window-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 640px) {
  .lp-window-body {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }
}

.lp-list {
  padding: 14px;
  border-right: 1px solid var(--border);
}

.lp-list-head {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  font-weight: 600;
  padding: 0 8px 8px;
}

.lp-test {
  padding: 9px 8px;
  border-radius: 8px;
}

.lp-test.is-active {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}

.lp-test-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 12.5px;
}

.lp-test-row strong {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.lp-name {
  font-family: var(--font-mono);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lp-detail {
  padding: 18px;
  font-size: 13px;
}

.lp-detail-title {
  font-family: var(--font-mono);
  font-weight: 650;
  margin-bottom: 12px;
}

.lp-why {
  margin-top: 16px;
  line-height: 1.5;
}

.lp-code {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 11.5px;
  display: grid;
  gap: 2px;
}

.lp-code code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 11.5px;
}

.lp-fix {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--accent-soft);
}

.lp-fix p {
  margin: 6px 0 0;
  color: var(--text-2);
}

.lp-fix code {
  font-size: 11px;
}

.lp-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 18px 0;
}

.lp-strip .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 28px;
  font-weight: 650;
  color: var(--text-2);
  letter-spacing: -0.01em;
}

.lp-section {
  padding: 88px 0;
}

.lp-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.lp-section-head {
  max-width: 680px;
  margin: 0 auto 44px;
  text-align: center;
}

.lp-section-head h2,
.lp-split h2,
.lp-cta h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
  font-weight: 720;
  margin-bottom: 14px;
}

.lp-section-head p {
  color: var(--text-2);
  font-size: 1.05rem;
  line-height: 1.65;
}

.lp-kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 650;
  color: var(--accent-strong);
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}

.lp-step {
  padding: 4px 4px 0;
}

.lp-step-n {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 750;
  margin-bottom: 14px;
}

.lp-terminal {
  margin-top: 44px;
  background: #0f1412;
  border-color: #1f2a25;
}

.lp-terminal .lp-window-bar {
  background: #151c19;
  border-color: #1f2a25;
}

.lp-terminal .lp-window-bar > i {
  background: #2b3833;
}

.lp-terminal pre {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #dfe7e2;
  font-size: 13px;
  line-height: 1.7;
  padding: 18px 22px;
}

.lp-terminal .faint {
  color: #7f8f88;
}

.lp-terminal .k {
  color: #4fd8a5;
}

.lp-terminal strong {
  color: #fff;
}

.lp-features .card {
  padding: 24px;
}

.lp-features h3 {
  font-size: 16px;
  margin-top: 14px;
}

.lp-features p {
  margin: 0;
  font-size: 14.5px;
}

.lp-icon {
  width: 34px;
  height: 34px;
  padding: 7px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.lp-split {
  display: grid;
  gap: 48px;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

@media (min-width: 1000px) {
  .lp-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  }
}

.lp-checks {
  list-style: none;
  padding: 0;
  margin: 20px 0 28px;
}

.lp-checks li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 0;
  color: var(--text-2);
}

.lp-checks .icon {
  color: var(--accent);
  margin-top: 3px;
}

.lp-compare {
  box-shadow: var(--shadow-lg);
}

.lp-agent-code .code pre {
  font-size: 13px;
}

.lp-chat {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.lp-chat-q {
  justify-self: end;
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px 14px 4px 14px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 550;
}

.lp-chat-a {
  max-width: 92%;
  padding: 12px 14px;
  border-radius: 14px 14px 14px 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 14.5px;
  line-height: 1.6;
}

.lp-chat-a .badge {
  margin-right: 4px;
}

.lp-faq {
  max-width: 780px;
}

.lp-faq details {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.lp-faq summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 16px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.lp-faq summary::-webkit-details-marker {
  display: none;
}

.lp-faq summary::after {
  content: "+";
  color: var(--text-3);
  font-weight: 400;
  font-size: 20px;
  line-height: 1;
}

.lp-faq details[open] summary::after {
  content: "\2212";
}

.lp-faq details p {
  margin: 12px 0 0;
  color: var(--text-2);
}

.lp-about {
  display: flex;
  gap: 24px;
  align-items: center;
  max-width: 780px;
}

.lp-about img {
  border-radius: 50%;
  flex: none;
  object-fit: cover;
}

@media (max-width: 600px) {
  .lp-about {
    flex-direction: column;
    text-align: center;
  }
}

.lp-cta {
  padding: 96px 0 104px;
  text-align: center;
  background:
    radial-gradient(600px 260px at 50% 0%, var(--glow), transparent 70%),
    var(--bg);
  border-top: 1px solid var(--border);
}

.lp-cta-code {
  max-width: 520px;
  margin: 26px auto 24px;
  text-align: left;
}

@media (max-width: 639px) {
  .lp-list {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .lp-section {
    padding: 60px 0;
  }

  .lp-hero {
    padding: 40px 0 40px;
  }
}

.auth-card .helptext,
.auth-card .helptext ul {
  font-size: 12.5px;
}

.auth-card ul.helptext,
.auth-card .helptext ul {
  padding-left: 1.1em;
  margin: 4px 0 0;
}

.inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Docs: table of contents beside the page */

.docs {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.docs-toc {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.5;
}

.docs-toc h4 {
  margin: 16px 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
}

.docs-toc h4:first-child {
  margin-top: 0;
}

.docs-toc a {
  display: block;
  padding: 3px 0;
  color: var(--text-2);
  text-decoration: none;
}

.docs-toc a:hover {
  color: var(--link);
}

.docs .prose {
  max-width: 800px;
}

.docs .prose h2 {
  scroll-margin-top: 84px;
  padding-top: 0.6em;
  border-top: 1px solid var(--border);
}

.docs .prose h3 {
  scroll-margin-top: 84px;
}

.docs .prose td code {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .docs {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .docs-toc {
    position: static;
    max-height: none;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    columns: 2;
    column-gap: 16px;
    font-size: 13px;
  }

  .docs-toc h4 {
    break-after: avoid;
  }

  .docs-toc a {
    padding: 2px 0;
  }
}

/* Account settings */

.account-settings {
  max-width: 640px;
}

.choice-list {
  display: flex;
  flex-direction: column;
}

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  cursor: pointer;
}

.choice:first-child {
  border-top: 0;
}

.choice input {
  margin: 0;
}

.inline-select {
  width: auto;
  height: 30px;
  padding-top: 0;
  padding-bottom: 0;
}
