@font-face {
  font-family: "Audiowide";
  src: url("assets/Audiowide-Regular.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

:root {
  --ink: #17242b;
  --muted: #5f6f77;
  --line: #d9e0e3;
  --soft: #f5f8f8;
  --accent: #087b72;
  --accent-dark: #05645e;
  --success: #19704f;
  --warning: #9a6100;
  --danger: #a33b37;
  color: var(--ink);
  background: #fbfcfc;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }

.page-header, main, footer {
  width: min(760px, calc(100% - 40px));
  margin-inline: auto;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  padding: 54px 0 34px;
}

h1, h2, h3 { font-family: "Audiowide", ui-sans-serif, sans-serif; font-weight: 400; }
h1 { font-size: clamp(2rem, 6vw, 3.2rem); letter-spacing: -.035em; margin: 0 0 10px; }
.page-header p { color: var(--muted); line-height: 1.55; margin: 0; max-width: 590px; }

.workflow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}
.workflow li { color: #829097; font-size: .77rem; font-weight: 700; position: relative; text-align: center; }
.workflow li::before { background: var(--line); content: ""; height: 2px; left: -50%; position: absolute; top: 13px; width: 100%; z-index: -1; }
.workflow li:first-child::before { display: none; }
.workflow span { align-items: center; background: #fff; border: 2px solid var(--line); border-radius: 50%; display: flex; height: 28px; justify-content: center; margin: 0 auto 7px; width: 28px; }
.workflow li.active, .workflow li.complete { color: var(--accent-dark); }
.workflow li.active span { border-color: var(--accent); box-shadow: 0 0 0 4px #e5f2f0; }
.workflow li.complete span { background: var(--accent); border-color: var(--accent); color: white; }
.workflow li.complete::before, .workflow li.active::before { background: var(--accent); }

.panel { background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 35px rgba(23, 36, 43, .06); padding: clamp(22px, 5vw, 38px); }
.panel-header { align-items: flex-start; display: flex; justify-content: space-between; gap: 24px; }
.stage-label { color: var(--accent); font-size: .74rem; font-weight: 800; letter-spacing: .09em; margin: 0 0 7px; text-transform: uppercase; }
h2 { font-size: 1.45rem; margin: 0; }
h3 { font-size: 1rem; margin: 0 0 14px; }
.state-indicator { background: var(--soft); border-radius: 999px; color: var(--muted); font-size: .76rem; font-weight: 700; padding: 7px 10px; }

.status { align-items: flex-start; background: var(--soft); border-radius: 9px; display: flex; gap: 13px; margin: 24px 0; padding: 16px; }
.status p { color: var(--muted); line-height: 1.45; margin: 4px 0 0; }
.status-dot { background: #819097; border-radius: 50%; flex: 0 0 auto; height: 9px; margin-top: 6px; width: 9px; }
.status.working .status-dot { animation: pulse 1.2s infinite; background: var(--warning); box-shadow: 0 0 0 4px #f5e7c8; }
.status.success { background: #eaf5f0; }
.status.success .status-dot { background: var(--success); }
.status.error { background: #fbeeed; }
.status.error .status-dot { background: var(--danger); }
.status.restart { background: #fff5de; }
.status.restart .status-dot { background: var(--warning); }
@keyframes pulse { 50% { opacity: .45; } }

.completion-result { align-items: flex-start; background: #eaf5f0; border: 1px solid #bddfce; border-radius: 12px; display: flex; gap: 18px; margin-bottom: 24px; padding: 22px; }
.completion-result p { color: #365e4d; line-height: 1.55; margin: 7px 0 0; }
.completion-check { align-items: center; background: var(--success); border-radius: 50%; color: white; display: flex; flex: 0 0 auto; font-size: 1.8rem; font-weight: 800; height: 48px; justify-content: center; line-height: 1; width: 48px; }

.primary-action { display: flex; }
.button { align-items: center; appearance: none; border-radius: 8px; cursor: pointer; display: inline-flex; font: inherit; font-weight: 750; justify-content: center; min-height: 48px; padding: 0 20px; }
.button:focus-visible, summary:focus-visible { outline: 3px solid rgba(8, 123, 114, .3); outline-offset: 3px; }
.button:disabled, .button[aria-disabled="true"] { cursor: not-allowed; opacity: .46; }
.primary { background: var(--accent); border: 1px solid var(--accent); color: white; }
.primary:hover:not(:disabled):not([aria-disabled="true"]) { background: var(--accent-dark); }

.summary { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 24px; }
.summary dl { display: grid; gap: 12px; grid-template-columns: 2fr repeat(3, 1fr); margin: 0; }
.summary dl div { min-width: 0; }
dt { color: var(--muted); font-size: .76rem; margin-bottom: 4px; }
dd { font-weight: 720; margin: 0; overflow-wrap: anywhere; }

.details { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; }
summary { color: var(--accent-dark); cursor: pointer; font-weight: 750; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; margin-top: 15px; width: 100%; }
th, td { border-bottom: 1px solid #e7ebed; padding: 10px 8px; text-align: left; }
th { color: var(--muted); font-size: .75rem; text-transform: uppercase; }
td { font-variant-numeric: tabular-nums; }
td:first-child { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88rem; }
.empty-row { color: var(--muted); font-family: inherit !important; text-align: center; }
.diagnostics-list { margin: 15px 0 0; }
.diagnostics-list div { display: grid; gap: 10px; grid-template-columns: 130px 1fr; padding: 6px 0; }
.diagnostics-list dd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; }

footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .77rem; margin-top: 60px; padding: 20px 0 32px; }
#app-version { float: right; }
.hidden { display: none !important; }
.visually-hidden { height: 1px; margin: -1px; opacity: 0; overflow: hidden; position: absolute; width: 1px; }

@media (max-width: 620px) {
  .page-header { display: block; padding-top: 34px; }
  .workflow li { font-size: 0; }
  .workflow span { font-size: .77rem; }
  .panel-header { display: block; }
  .state-indicator { display: inline-block; margin-top: 14px; }
  .button { width: 100%; }
  .summary dl { grid-template-columns: 1fr 1fr; }
  .summary dl div:first-child { grid-column: 1 / -1; }
  .diagnostics-list div { display: block; }
  .diagnostics-list dt { margin-top: 10px; }
  .completion-result { display: block; }
  .completion-check { margin-bottom: 16px; }
  #app-version { display: block; float: none; margin-top: 7px; }
}
