:root {
  color-scheme: light;
  --ink: #182526;
  --muted: #627172;
  --line: #d9e1de;
  --paper: #f4f7f4;
  --white: #fff;
  --teal: #12645d;
  --teal-dark: #0d4e49;
  --soft-teal: #e5f2ef;
  --red: #9f3127;
  --shadow: 0 14px 40px rgb(24 37 38 / 7%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 85% 0%, rgb(212 233 226 / 68%), transparent 34rem),
    var(--paper);
}

[hidden] { display: none !important; }

.site-header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

.brand {
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 780;
  letter-spacing: -.04em;
  text-decoration: none;
}

.brand span { color: var(--teal); padding: 0 .12em; }
.header-note, .muted, .hint, .site-footer { color: var(--muted); }
.header-note { font-size: .84rem; }

.shell {
  width: min(100% - 32px, 980px);
  margin: 42px auto 68px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgb(255 255 255 / 94%);
  padding: clamp(22px, 4vw, 34px);
  box-shadow: var(--shadow);
}

.login-panel { width: min(100%, 520px); margin: 9vh auto 0; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 11px; font-size: clamp(1.8rem, 4vw, 2.5rem); letter-spacing: -.045em; line-height: 1.12; }
h2 { margin-bottom: 0; font-size: 1.2rem; letter-spacing: -.025em; }
.lede { max-width: 680px; margin-bottom: 25px; color: var(--muted); line-height: 1.6; }

.stack { display: grid; gap: 11px; }
label { font-size: .87rem; font-weight: 720; }
input, select, textarea {
  width: 100%;
  border: 1px solid #c7d2cf;
  border-radius: 10px;
  padding: 12px 13px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  line-height: 1.5;
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgb(18 100 93 / 17%); border-color: var(--teal); }
textarea { resize: vertical; }
textarea[readonly] { background: #f8faf9; }

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 16px;
  font: inherit;
  font-size: .9rem;
  font-weight: 750;
  cursor: pointer;
}
.button.primary { color: #fff; background: var(--teal); }
.button.primary:hover:not(:disabled) { background: var(--teal-dark); }
.button:disabled { cursor: wait; opacity: .65; }
.button.secondary { border-color: var(--line); color: var(--ink); background: #fff; }
.button.secondary:hover { border-color: var(--teal); color: var(--teal-dark); }

.task-summary {
  display: grid;
  gap: 10px;
  margin: 7px 0 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 18px;
  background: #fbfcfb;
}
.task-heading, .section-heading, .event-heading, .run-heading, .run-state { display: flex; align-items: center; }
.task-heading { justify-content: space-between; gap: 12px; }
.task-heading h2 { font-size: 1.05rem; }
.tag { border-radius: 99px; padding: 5px 9px; color: var(--teal-dark); background: var(--soft-teal); font-size: .75rem; font-weight: 750; }
.task-summary .muted { margin-bottom: 0; line-height: 1.5; }
.hint { margin: -5px 0 4px; font-size: .78rem; line-height: 1.45; }
.demo-info { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin: -7px 0 22px; border: 1px solid var(--line); border-radius: 11px; padding: 11px 14px; background: #fbfcfb; }
.availability, .model-config { margin: 0; font-size: .8rem; }
.availability { color: #155c42; font-weight: 800; }
.availability.busy { color: #86521b; }
.model-config { color: var(--muted); }

.run-view { display: grid; gap: 18px; }
.run-heading { justify-content: space-between; gap: 20px; }
.run-heading .lede { margin: 8px 0 0; }
.run-state { flex-direction: column; align-items: flex-end; gap: 12px; }
.customized-tag { display: inline-block; margin-top: 4px; color: #805322; background: #fff2d9; }
.run-metadata { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.metadata-grid { display: grid; flex: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; margin: 0; }
.metadata-grid dt { margin-bottom: 3px; color: var(--muted); font-size: .75rem; font-weight: 700; }
.metadata-grid dd { margin: 0; overflow-wrap: anywhere; font-size: .79rem; font-variant-numeric: tabular-nums; }
.download-button { flex: 0 0 auto; text-decoration: none; }
.status-pill { border-radius: 99px; padding: 7px 11px; color: #4d6060; background: #edf1f0; font-size: .76rem; font-weight: 800; text-transform: capitalize; white-space: nowrap; }
.status-pill.running { color: #86521b; background: #fff2d9; }
.status-pill.succeeded { color: #155c42; background: #e1f3e9; }
.status-pill.failed, .status-pill.interrupted { color: #872d24; background: #fbe9e6; }
.message { margin: 0; border-radius: 10px; padding: 11px 13px; font-size: .88rem; line-height: 1.5; }
.message.error { border: 1px solid #efc4bf; color: var(--red); background: #fff4f2; }

.section-heading { justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.section-heading .eyebrow { margin-bottom: 5px; }
.section-heading .muted { font-size: .8rem; white-space: nowrap; }
.usage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 18px; margin: 0; }
.usage-grid dt { color: var(--muted); font-size: .78rem; text-transform: capitalize; }
.usage-grid dd { margin: 2px 0 0; font-size: 1.1rem; font-weight: 760; font-variant-numeric: tabular-nums; }

.timeline { display: grid; gap: 11px; }
.event-card { border: 1px solid var(--line); border-radius: 12px; padding: 13px; background: #fbfcfb; }
.event-heading { justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.event-heading strong { color: var(--teal-dark); font-size: .86rem; overflow-wrap: anywhere; }
.event-heading time { color: var(--muted); font-size: .73rem; font-variant-numeric: tabular-nums; text-align: right; }
details > summary { color: var(--muted); font-size: .8rem; font-weight: 700; cursor: pointer; }
.json-block {
  max-width: 100%;
  overflow: auto;
  border: 1px solid #e1e7e4;
  border-radius: 9px;
  padding: 13px;
  background: #f5f8f7;
  color: #213434;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .76rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.event-json { max-height: 520px; margin: 11px 0 0; }
.viewport-image { display: block; width: min(100%, 700px); max-height: 480px; object-fit: contain; margin: 10px auto 13px; border: 1px solid var(--line); border-radius: 9px; background: #eef2f0; }
.site-footer { padding: 0 16px 25px; font-size: .76rem; text-align: center; }

@media (max-width: 640px) {
  .site-header { height: 60px; padding: 0 17px; }
  .shell { width: min(100% - 22px, 980px); margin-top: 24px; }
  .panel { border-radius: 14px; padding: 20px; }
  .run-heading { align-items: flex-start; flex-direction: column; }
  .run-state { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; }
  .run-metadata { align-items: stretch; flex-direction: column; }
  .metadata-grid { grid-template-columns: minmax(0, 1fr); }
  .usage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading { align-items: flex-start; }
  .event-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
}
