:root {
  color-scheme: dark;
  --bg: #090d0b;
  --surface: #101713;
  --surface-2: #151d18;
  --line: #2b3930;
  --text: #f4f7f3;
  --muted: #a9b5ad;
  --green: #55c879;
  --gold: #d6b858;
  --red: #e27070;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font-family: Tahoma, Arial, sans-serif;
  letter-spacing: 0;
}

a { color: inherit; }

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(18px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  background: #0c110e;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
}

.brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.topbar nav { display: flex; gap: 20px; }
.topbar nav a { color: var(--muted); text-decoration: none; }
.topbar nav a:hover, .topbar nav a:focus-visible { color: var(--text); }

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 56px;
}

.title-band,
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
}

.title-band { padding: 10px 0 30px; }
.eyebrow { color: var(--gold); font-size: 12px; margin: 0 0 7px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(32px, 5vw, 58px); margin-bottom: 10px; }
h2 { font-size: 24px; margin-bottom: 0; }
.title-band p:last-child { color: var(--muted); margin-bottom: 0; }

.state {
  min-width: 190px;
  padding: 10px 12px;
  color: var(--gold);
  border: 1px solid #5b4d21;
  border-radius: 6px;
  background: #1d190c;
  text-align: center;
  font-weight: 700;
}

.state.ready { color: var(--green); border-color: #2f6f40; background: #102316; }
.state.error { color: var(--red); border-color: #6a3030; background: #271313; }

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.status-grid article { min-height: 112px; padding: 24px; border-inline-start: 1px solid var(--line); }
.status-grid article:last-child { border-inline-start: 0; }
.status-grid span { display: block; color: var(--muted); margin-bottom: 15px; }
.status-grid strong { font-size: 18px; overflow-wrap: anywhere; }

.workflow, .artifact, .uefi-fabric, .hardware-fabric { padding: 42px 0; border-bottom: 1px solid var(--line); }
.download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 8px 15px;
  border: 1px solid #397d4c;
  border-radius: 6px;
  background: #173320;
  text-decoration: none;
  font-weight: 700;
}
.download:hover, .download:focus-visible { background: #21492c; }
.download span { font-size: 20px; }

.steps {
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.steps li { min-height: 170px; padding: 22px; border-inline-start: 1px solid var(--line); background: var(--surface); }
.steps li:last-child { border-inline-start: 0; }
.steps li > span { display: block; color: var(--green); font-weight: 700; margin-bottom: 28px; }
.steps strong { display: block; margin-bottom: 8px; }
.steps p { color: var(--muted); line-height: 1.7; margin-bottom: 0; }

.capability-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.capability-filter select {
  min-width: 190px;
  min-height: 42px;
  padding: 7px 11px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.uefi-summary, .hardware-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 28px;
  border: 1px solid var(--line);
}

.uefi-summary div, .hardware-summary div {
  min-height: 88px;
  padding: 17px 20px;
  border-inline-start: 1px solid var(--line);
  background: var(--surface);
}

.uefi-summary div:last-child, .hardware-summary div:last-child { border-inline-start: 0; }
.uefi-summary span, .hardware-summary span { display: block; color: var(--muted); margin-bottom: 9px; }
.uefi-summary strong, .hardware-summary strong { font-size: 22px; }

.capability-table-wrap {
  margin-top: 22px;
  overflow-x: auto;
  border: 1px solid var(--line);
}

.capability-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  text-align: right;
}

.capability-table th,
.capability-table td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.capability-table th {
  color: var(--muted);
  background: #0c110e;
  font-size: 13px;
}

.capability-table tbody tr:last-child td { border-bottom: 0; }
.capability-table tbody tr:hover { background: var(--surface); }
.capability-table td:first-child {
  direction: ltr;
  font-family: monospace;
  color: var(--gold);
  white-space: nowrap;
}
.capability-table td:nth-child(n + 3) { font-size: 13px; color: var(--muted); }
.hardware-table td:first-child {
  direction: rtl;
  font-family: inherit;
  color: var(--text);
  white-space: normal;
  min-width: 210px;
}

.claim-boundary {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.artifact dl { margin: 28px 0 0; }
.artifact dl div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 20px; padding: 15px 0; border-top: 1px solid var(--line); }
.artifact dt { color: var(--muted); }
.artifact dd { margin: 0; direction: ltr; text-align: right; font-family: monospace; overflow-wrap: anywhere; }

.boundary { margin-top: 32px; padding: 20px 22px; border-inline-start: 4px solid var(--gold); background: var(--surface-2); }
.boundary strong { color: var(--gold); }
.boundary p { margin: 8px 0 0; color: var(--muted); line-height: 1.8; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(18px, 4vw, 64px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 820px) {
  .status-grid, .steps, .uefi-summary, .hardware-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status-grid article, .steps li { border-bottom: 1px solid var(--line); }
  .topbar nav a:last-child { display: none; }
}

@media (max-width: 560px) {
  .topbar { align-items: flex-start; }
  .topbar nav { padding-top: 10px; }
  main { width: min(100% - 24px, 1180px); padding-top: 24px; }
  .title-band, .section-heading { align-items: stretch; flex-direction: column; }
  .state, .download { width: 100%; }
  .status-grid, .steps, .uefi-summary, .hardware-summary { grid-template-columns: 1fr; }
  .status-grid article, .steps li { border-inline-start: 0; }
  .uefi-summary div, .hardware-summary div { border-inline-start: 0; border-bottom: 1px solid var(--line); }
  .uefi-summary div:last-child, .hardware-summary div:last-child { border-bottom: 0; }
  .capability-filter { align-items: stretch; flex-direction: column; }
  .capability-filter select { width: 100%; }
  .artifact dl div { grid-template-columns: 1fr; gap: 7px; }
  footer { flex-direction: column; }
}
