:root {
  --bg: #070d14;
  --bg-soft: #0d1724;
  --ink: #e5edf7;
  --muted: #9db0c6;
  --accent: #34d399;
  --accent-2: #38bdf8;
  --line: #1f3246;
  --card: #0f1d2e;
  --danger: #f87171;
  --ok: #4ade80;
  --warn: #f59e0b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 15% -10%, rgba(56, 189, 248, 0.14), transparent 35%),
              radial-gradient(circle at 85% -10%, rgba(52, 211, 153, 0.12), transparent 34%),
              url("qa-bg.svg") center top / cover no-repeat,
              var(--bg);
  font-family: "Segoe UI Variable", "Trebuchet MS", "Tahoma", sans-serif;
  min-height: 100vh;
  line-height: 1.55;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(to right, rgba(56, 189, 248, 0.07) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(56, 189, 248, 0.06) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.35;
}

.shell {
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 2rem 0 4rem;
  position: relative;
  z-index: 1;
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(11, 21, 33, 0.84);
  backdrop-filter: blur(8px);
}

.brand {
  color: #f3fbff;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.03em;
}

.top-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.top-nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  border: 1px solid #31577a;
  background: rgba(17, 33, 51, 0.9);
  border-radius: 999px;
  padding: 0.38rem 0.72rem;
  display: inline-flex;
  align-items: center;
}

.top-nav-links a:hover,
.top-nav-links a:focus-visible {
  color: #ffffff;
  border-color: #66a0c9;
  background: rgba(27, 52, 77, 0.95);
}

.top-nav-links a[aria-current="page"] {
  border-color: #66a0c9;
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.25), rgba(56, 189, 248, 0.25));
}

.hero h1 {
  margin: 0.4rem 0 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.2;
}

.hero {
  margin-top: 1.4rem;
}

.hero-home {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1rem;
  align-items: stretch;
}

.hero-copy,
.hero-graphic {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(15, 29, 46, 0.96), rgba(9, 18, 31, 0.96));
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.3);
  padding: 1.2rem;
}

.hero-graphic {
  position: relative;
  overflow: hidden;
}

.hero-graphic::before {
  content: "";
  position: absolute;
  right: -42px;
  top: -58px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.42), transparent 66%);
}

.hero-graphic h2 {
  margin-top: 0;
}

.hero-graphic ul {
  margin: 0;
  padding-left: 1.1rem;
}

.hero-graphic li {
  margin-bottom: 0.45rem;
}

.kicker {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin: 0;
}

.lede {
  margin-top: 0.7rem;
  max-width: 60ch;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.highlight-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(14, 27, 42, 0.9);
  padding: 1rem;
}

.highlight-card h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.card, .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.05rem;
  box-shadow: 0 14px 28px rgba(2, 10, 20, 0.35);
  margin-top: 1rem;
}

.card h3 {
  margin-top: 0;
}

.status {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status.passed { background: rgba(74, 222, 128, 0.16); color: var(--ok); }
.status.failed { background: rgba(248, 113, 113, 0.16); color: var(--danger); }
.status.skipped, .status.not-run, .status.partial { background: rgba(245, 158, 11, 0.16); color: var(--warn); }

.muted { color: var(--muted); font-size: 0.92rem; }

.stale {
  color: var(--warn);
  font-weight: 700;
}

.cta-row,
.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.btn,
.link-row a,
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.45rem 0.85rem;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.btn-primary {
  color: #03111d;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.btn-outline,
.link-row a,
.back-link {
  color: var(--ink);
  border-color: #31577a;
  background: rgba(14, 26, 41, 0.78);
}

.btn:hover,
.btn:focus-visible,
.link-row a:hover,
.link-row a:focus-visible,
.back-link:hover,
.back-link:focus-visible {
  transform: translateY(-1px);
  border-color: #5a88b1;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.meta-value {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.meta-value-commit {
  font-size: clamp(0.72rem, 1.5vw, 0.9rem);
  line-height: 1.35;
}

.suite-table {
  width: 100%;
  border-collapse: collapse;
}

.suite-table th, .suite-table td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 0.6rem 0.45rem;
  font-size: 0.95rem;
  vertical-align: top;
}

.suite-table th {
  color: var(--muted);
  font-weight: 700;
}

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

.history-list li {
  border-bottom: 1px solid var(--line);
  padding: 0.6rem 0;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
}

@media (max-width: 700px) {
  .top-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-home {
    grid-template-columns: 1fr;
  }

  .suite-table { font-size: 0.86rem; display: block; overflow-x: auto; }

  .proof-strip { flex-direction: column; gap: 0.3rem; }
  .strip-sep { display: none; }
}

/* ── Proof strip ─────────────────────────────── */
.proof-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.8rem;
  margin-top: 1rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(9, 18, 31, 0.82);
  font-size: 0.9rem;
}

.strip-item { display: flex; align-items: center; gap: 0.3rem; }
.strip-sep  { color: var(--line); }
.strip-muted { color: var(--muted); }
.strip-ok   { color: var(--ok);   font-weight: 700; }
.strip-fail { color: var(--danger); font-weight: 700; }

.strip-tools { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.tool-chip {
  background: rgba(52, 211, 153, 0.12);
  color: var(--accent);
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
}

/* ── Portfolio card fields ───────────────────── */
.field-label {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.1rem;
}

.portfolio-field {
  margin: 0.45rem 0;
  font-size: 0.93rem;

/* ── Portfolio category grouping ─────────────── */
.portfolio-category {
  margin-top: 2rem;
}

.category-heading {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
  gap: 1rem;
}

.portfolio-card {
  min-width: 0;
}
}

/* ── Dashboard context ───────────────────────── */
.dashboard-context {
  margin-top: 0.5rem;
  max-width: 72ch;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ── Project context panel ───────────────────── */
.project-context {
  margin-top: 1rem;
}

.project-context ul {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}

.project-context li {
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

