:root {
  color-scheme: dark;
  --bg: #080d16;
  --sidebar: #0b121e;
  --panel: #101a29;
  --panel-soft: #0d1725;
  --line: #213047;
  --line-strong: #30435f;
  --text: #edf3fb;
  --muted: #8d9bb0;
  --faint: #5c6b81;
  --accent: #76a7ff;
  --accent-soft: #182c4d;
  --green: #58d39b;
  --green-soft: #12382e;
  --amber: #f2bd67;
  --amber-soft: #3b2b16;
  --red: #f07183;
  --red-soft: #3d1e2a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(circle at 72% -10%, #1a3154 0, transparent 32%), var(--bg);
  color: var(--text);
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app { min-height: 100vh; display: grid; grid-template-columns: 246px minmax(0, 1fr); }

aside {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 16px 18px;
  background: linear-gradient(180deg, #0d1725, var(--sidebar));
  border-right: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; padding: 0 9px 20px; }
.brand > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #91bcff, #557de7);
  color: #081224;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 8px 24px #426ccc40;
}
.brand b { font-size: 16px; letter-spacing: -.02em; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: .02em; }

aside > button#new {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #4d73b1;
  border-radius: 8px;
  background: var(--accent-soft);
  color: #cfe0ff;
  font-weight: 700;
  text-align: left;
}
aside > button#new:hover { border-color: var(--accent); background: #203a65; }
.label { margin: 26px 10px 2px; color: var(--faint); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
aside > a { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 9px 11px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 13px; }
aside > a:hover, aside > a.active { background: #152238; color: #d9e6fb; }
aside > a.active { box-shadow: inset 2px 0 0 var(--accent); }
aside > a i { margin-left: auto; color: var(--faint); font-size: 10px; font-style: normal; }
.push { flex: 1; }
.guard { display: flex; align-items: center; gap: 9px; margin: 12px 6px 8px; padding: 11px 9px; border: 1px solid #21493c; border-radius: 8px; background: #0f281f; }
.guard em { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px #58d39b1a; }
.guard b { font-size: 11px; }
.guard small { display: block; margin-top: 3px; color: #8ac7ae; font-size: 10px; font-weight: 500; }
.repo { color: #8da9d2 !important; font-size: 11px !important; }

main { min-width: 0; }
header { height: 70px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(22px, 4vw, 54px); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
header b { color: #dce7f7; font-weight: 650; }
header label { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; }
header strong { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; background: #304568; color: #d9e7ff; font-size: 11px; }

main > * { max-width: 1170px; margin-right: auto; margin-left: auto; }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 42px clamp(22px, 4vw, 54px) 30px; }
.intro p { margin: 0 0 10px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.intro h1 { margin: 0 0 10px; color: #f5f8ff; font-size: clamp(28px, 4vw, 44px); line-height: 1.06; letter-spacing: -.045em; }
.intro span { color: var(--muted); font-size: 13px; line-height: 1.7; }
.intro mark { flex: 0 0 auto; padding: 8px 11px; border: 1px solid #285443; border-radius: 999px; background: #10271f; color: #8ad7b4; font-size: 11px; white-space: nowrap; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; padding: 0 clamp(22px, 4vw, 54px); }
.card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(145deg, #111d2d, var(--panel)); box-shadow: 0 12px 30px #00000012; }
.request, .result { grid-column: 1 / -1; }
.card > .head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 21px 14px; }
.head h2 { margin: 0; color: #e6eefb; font-size: 14px; font-weight: 720; letter-spacing: -.01em; }
.head h2 small { margin-right: 8px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.head i { padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); font-size: 10px; font-style: normal; white-space: nowrap; }
.head i.ok { border-color: #286149; background: var(--green-soft); color: #8ee2bc; }

.request { padding-bottom: 20px; }
.request > label, .row > label { display: block; padding: 0 21px; color: #b8c5d8; font-size: 11px; font-weight: 650; }
.request textarea, .request input, .request select { display: block; width: 100%; margin-top: 8px; border: 1px solid #2b3c56; border-radius: 7px; outline: 0; background: #0c1523; color: var(--text); font-size: 13px; transition: border-color .16s, box-shadow .16s; }
.request textarea { min-height: 82px; resize: vertical; padding: 12px 13px; line-height: 1.55; }
.request input, .request select { height: 40px; padding: 0 12px; }
.request textarea:focus, .request input:focus, .request select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #76a7ff1a; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.approve { display: flex !important; align-items: center; gap: 8px; margin-top: 14px; color: #9aabc1 !important; font-weight: 500 !important; }
.approve input { width: 15px !important; height: 15px !important; margin: 0 !important; accent-color: var(--accent); }
.approve small { color: var(--faint); font-size: 10px; font-weight: 500; }
.run { display: block; margin: 18px 21px 0; padding: 11px 16px; border: 1px solid #76a7ff; border-radius: 7px; background: linear-gradient(135deg, #76a7ff, #5f87df); color: #071120; font-size: 12px; font-weight: 800; box-shadow: 0 8px 20px #5d86e52b; }
.run:hover { filter: brightness(1.1); }
.run:disabled { cursor: wait; opacity: .65; }

.pipeline { padding: 0 21px 17px; }
.pipeline > div { position: relative; display: grid; grid-template-columns: 29px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 55px; }
.pipeline > div:not(:last-child)::after { position: absolute; top: 38px; bottom: -2px; left: 13px; width: 1px; background: #293a53; content: ""; }
.pipeline > div > b { z-index: 1; display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid #334662; border-radius: 50%; background: #132033; color: var(--muted); font-size: 10px; }
.pipeline > div > span { color: #c2cfdf; font-size: 12px; font-weight: 650; }
.pipeline > div > span small { display: block; margin-top: 3px; color: var(--faint); font-size: 9px; font-weight: 500; }
.pipeline > div > i { color: var(--faint); font-size: 10px; font-style: normal; }
.pipeline > div[data-state="active"] > b { border-color: var(--accent); background: #1b3966; color: #cfe0ff; box-shadow: 0 0 0 4px #76a7ff12; }
.pipeline > div[data-state="active"] > i { color: var(--accent); }
.pipeline > div[data-state="done"] > b { border-color: #2d765c; background: var(--green-soft); color: #8ee2bc; }
.pipeline > div[data-state="done"] > i { color: var(--green); }
.pipeline > div[data-state="blocked"] > b { border-color: #8a3d52; background: var(--red-soft); color: var(--red); }
.pipeline > div[data-state="blocked"] > i { color: var(--red); }
.gap { display: none; margin: 0 21px 20px; padding: 11px 12px; border: 1px solid #745628; border-radius: 7px; background: var(--amber-soft); color: var(--amber); font-size: 11px; }
.gap.show { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 8px; }
.gap small { grid-column: 2; color: #c5a36e; font-size: 10px; }
.gap em { grid-column: 3; grid-row: 1 / span 2; padding: 4px 7px; border-radius: 999px; background: #5b411b; color: #f7cb7c; font-size: 9px; font-style: normal; }

.profile { display: flex; align-items: end; justify-content: space-between; padding: 0 21px; }
.profile small { display: block; color: var(--faint); font-size: 10px; }
.profile strong { display: block; margin-top: 4px; color: #edf4ff; font-size: 22px; letter-spacing: -.04em; }
.profile > b { color: var(--accent); font-size: 13px; }
.track { height: 7px; margin: 15px 21px 8px; overflow: hidden; border-radius: 99px; background: #1c2a3f; }
.track span { display: block; width: 25%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6a9dff, #86c6ff); transition: width .35s ease; }
.ticks { display: flex; justify-content: space-between; padding: 0 21px; color: var(--faint); font-size: 9px; }
.caps { margin: 16px 21px 19px; border-top: 1px solid #1e2c40; }
.caps p { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 0 2px; margin: 0; padding: 10px 0; border-bottom: 1px solid #1e2c40; color: var(--muted); font-size: 11px; }
.caps p:last-child { border-bottom: 0; }
.caps p > small { grid-column: 2; margin-top: 3px; color: var(--faint); font-size: 9px; }
.caps p > b { grid-column: 3; grid-row: 1 / span 2; color: var(--faint); font-size: 9px; font-weight: 600; }
.caps p.loaded { color: #bfead6; }
.caps p.loaded > b { color: var(--green); }
.caps p.enabled { color: #d7e5ff; }
.caps p.enabled > b { color: var(--accent); }

.evidence { grid-column: 1 / -1; }
.evidence > .head { padding-bottom: 11px; }
.events { display: flex; flex-direction: column; min-height: 122px; max-height: 230px; margin: 0 21px 20px; overflow: auto; border: 1px solid #1d2c41; border-radius: 7px; background: #0b1421; }
.events p { display: none; }
.events span { display: block; padding: 17px; color: var(--faint); font-size: 11px; }
.event { display: grid; grid-template-columns: 66px 22px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid #182538; color: #b7c6d9; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.event:last-child { border-bottom: 0; }
.event time { color: var(--faint); }
.event b { color: var(--green); font-size: 11px; }
.event em { color: var(--faint); font-size: 9px; font-style: normal; }
.event.warn b, .event.warn em { color: var(--amber); }
.event.blocked b, .event.blocked em { color: var(--red); }

.result { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 23px 24px; border-color: #284163; background: linear-gradient(110deg, #13233a, #101a29 65%); }
.result p { margin: 0 0 8px; color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.result h2 { margin: 0 0 7px; color: #f0f6ff; font-size: 21px; letter-spacing: -.03em; }
.result > div > span { color: var(--muted); font-size: 11px; line-height: 1.6; }
.result dl { display: grid; grid-template-columns: repeat(3, minmax(90px, 1fr)); gap: 10px; min-width: 330px; margin: 0; }
.result dl div { padding: 10px 12px; border: 1px solid #2b3d57; border-radius: 7px; background: #0d1828; }
.result dt { color: var(--faint); font-size: 9px; }
.result dd { margin: 5px 0 0; color: #d5e2f4; font-size: 11px; font-weight: 700; }
.result dd.pass { color: var(--green); }
.result dd.stop { color: var(--red); }

footer { padding: 28px clamp(22px, 4vw, 54px) 26px; color: var(--faint); font-size: 10px; }

@media (max-width: 900px) {
  .app { grid-template-columns: 210px minmax(0, 1fr); }
  .result { align-items: stretch; flex-direction: column; gap: 18px; }
  .result dl { min-width: 0; width: 100%; }
}

@media (max-width: 700px) {
  .app { display: block; }
  aside { min-height: 0; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 13px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { margin-right: auto; padding: 0; }
  aside > button#new { width: auto; }
  aside > a, aside > .label, aside > .push, aside > .guard, aside > .repo { display: none; }
  header { height: 55px; padding: 0 18px; }
  header span { font-size: 11px; }
  .intro { display: block; padding: 30px 18px 24px; }
  .intro mark { display: inline-block; margin-top: 16px; }
  .grid { grid-template-columns: 1fr; gap: 13px; padding: 0 18px; }
  .request, .result, .evidence { grid-column: 1; }
  .row { grid-template-columns: 1fr; gap: 12px; }
  .result dl { grid-template-columns: repeat(3, 1fr); }
  .result dl div { padding: 9px; }
  .result dd { font-size: 10px; }
  footer { padding: 22px 18px; }
}

@media (max-width: 430px) {
  .intro h1 { font-size: 32px; }
  .ticks { font-size: 8px; }
  .event { grid-template-columns: 53px 18px minmax(0, 1fr); }
  .event em { display: none; }
}
