:root {
  --ink: #172033;
  --muted: #667085;
  --paper: #f3f4f6;
  --surface: #ffffff;
  --line: #d8dee9;
  --head: #111827;
  --soft: #eef2f7;
  --focus: #334155;
  --danger-bg: #fff7ed;
  --danger-border: #fed7aa;
  --danger-text: #9a3412;
  --shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
  --sans: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--paper);
}

html.site-gate-pending body { visibility: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 14px;
}

button, a, summary { font: inherit; }

.page-shell {
  width: min(1500px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #fff;
  background: var(--head);
  font-size: 13px;
  font-weight: 800;
}

.brand strong,
.brand small { display: block; }

.brand strong { font-size: 15px; }

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.logout {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  font-weight: 700;
}

.logout:hover,
.logout:focus-visible {
  border-color: var(--focus);
  outline: none;
}

main { padding-top: 36px; }

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

.eyebrow,
.source-label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.intro {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.as-of {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.source-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.source-strip strong {
  display: block;
  font-size: 13px;
}

.source-label {
  display: block;
  margin-bottom: 3px;
}

.source-meta {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.status-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--muted);
}

.status-error {
  border-color: var(--danger-border);
  background: var(--danger-bg);
  color: var(--danger-text);
}

.lane-stack {
  display: grid;
  gap: 16px;
}

.lane-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.lane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  color: #fff;
  background: var(--head);
}

.lane-head h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: 0.01em;
}

.lane-head span {
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
}

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  min-width: 1220px;
  border-collapse: collapse;
  font-size: 11px;
}

th {
  padding: 7px 6px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: #334155;
  text-align: left;
  vertical-align: top;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

td {
  padding: 8px 7px;
  border: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.35;
}

tbody tr:hover { background: #fafbfc; }

.automation-cell { min-width: 190px; font-weight: 700; }

.automation-cell details { margin: 0; }

.automation-cell summary {
  cursor: pointer;
  list-style-position: outside;
}

.row-details {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  word-break: break-word;
}

.row-details span { display: block; }

.row-details b {
  color: #475569;
  font-weight: 800;
}

.schedule-cell { min-width: 190px; }
.runtime-cell { min-width: 145px; white-space: nowrap; }
.result-cell { min-width: 120px; font-weight: 700; }
.change-cell { min-width: 300px; max-width: 480px; }
.ivan-cell { min-width: 58px; font-weight: 700; text-align: center; }

@media (max-width: 760px) {
  .page-shell { padding: 0 12px 32px; }
  .topbar { min-height: 64px; }
  main { padding-top: 26px; }
  .page-heading,
  .source-strip { align-items: flex-start; flex-direction: column; }
  .page-heading { gap: 12px; }
  .as-of { white-space: normal; }
  .source-meta { flex-direction: column; gap: 4px; text-align: left; }
}
