:root {
  color-scheme: light;
  --bg: #eef3f8;
  --surface: #ffffff;
  --surface-strong: #fbfdff;
  --ink: #17212b;
  --muted: #5a6876;
  --line: #d6dee8;
  --accent: #1a7565;
  --accent-strong: #125549;
  --warn: #9a4c33;
  --shadow: 0 12px 30px rgba(23, 33, 43, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #f7fafc 0%, var(--bg) 22%, #edf2f7 100%);
  color: var(--ink);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  padding: 28px 32px 20px;
  border-bottom: 1px solid rgba(23, 33, 43, 0.08);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
}

.brandline {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  font-weight: 650;
}

h2 {
  font-size: 18px;
  font-weight: 650;
}

h3 {
  font-size: 14px;
  font-weight: 650;
}

.statusbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.statuschip {
  padding: 8px 12px;
  border: 1px solid rgba(31, 107, 92, 0.22);
  border-radius: 8px;
  background: rgba(31, 107, 92, 0.08);
  color: var(--accent-strong);
  min-width: 120px;
  text-align: center;
}

.statusmeta {
  color: var(--muted);
  font-size: 14px;
}

.activitystrip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 68px;
  padding: 14px 16px;
  border: 1px solid rgba(23, 33, 43, 0.08);
  border-radius: 8px;
  background: rgba(26, 117, 101, 0.06);
}

.activitypulse {
  display: flex;
  align-items: center;
  gap: 6px;
}

.activitypulse span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.28;
  animation: pulse-dot 1s ease-in-out infinite;
}

.activitypulse span:nth-child(2) {
  animation-delay: 0.16s;
}

.activitypulse span:nth-child(3) {
  animation-delay: 0.32s;
}

.activitycopy {
  display: grid;
  gap: 4px;
}

.activitylabel {
  font-size: 14px;
  font-weight: 650;
}

.activitydetail {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.activityelapsed {
  min-width: 44px;
  text-align: right;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.shell {
  display: grid;
  grid-template-columns: minmax(320px, 460px) minmax(420px, 1fr);
  gap: 24px;
  padding: 24px 32px 40px;
}

.composer,
.results {
  display: grid;
  gap: 18px;
  align-content: start;
}

.sectionhead {
  display: grid;
  gap: 6px;
}

.sectionhead p {
  color: var(--muted);
  font-size: 14px;
}

.exampleblock,
.panel,
.composer {
  background: transparent;
}

.label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.field,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  padding: 12px 14px;
  font: inherit;
}

.textarea {
  resize: vertical;
  min-height: 180px;
}

.controlband {
  display: grid;
  gap: 18px;
  padding: 16px;
  border: 1px solid rgba(23, 33, 43, 0.08);
  border-radius: 8px;
  background: rgba(251, 253, 255, 0.8);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.segmented label,
.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-strong);
  font-size: 14px;
}

.twocol {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.primary {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: var(--accent);
  color: #f7fafd;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.primary:disabled {
  opacity: 0.6;
  cursor: wait;
}

.responsegrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  display: grid;
  gap: 10px;
  min-height: 168px;
  padding: 16px;
  border: 1px solid rgba(23, 33, 43, 0.08);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel p {
  line-height: 1.5;
}

.panel.is-pending p {
  color: var(--muted);
}

.panel.is-pending p::selection {
  background: transparent;
}

.panel.is-pending p::after {
  content: "";
  display: block;
  width: 100%;
  height: 10px;
  margin-top: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(214, 222, 232, 0.4) 0%, rgba(214, 222, 232, 0.9) 50%, rgba(214, 222, 232, 0.4) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.35s linear infinite;
}

.panel.is-pending:nth-child(2) p::after {
  width: 86%;
}

.panel.is-pending:nth-child(3) p::after {
  width: 78%;
}

.panel.is-pending:nth-child(4) p::after {
  width: 92%;
}

.metarow {
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: 16px;
}

.compact {
  min-height: 0;
}

.meta {
  display: grid;
  gap: 10px;
}

.meta div {
  display: grid;
  gap: 4px;
}

dt {
  color: var(--muted);
  font-size: 12px;
}

dd {
  margin: 0;
  font-size: 14px;
}

.codeblock {
  overflow: auto;
  max-height: 260px;
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  background: #17212b;
  color: #eef5fb;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

@keyframes pulse-dot {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.28;
  }

  50% {
    transform: translateY(-2px);
    opacity: 1;
  }
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

@media (max-width: 1080px) {
  .shell,
  .metarow {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar,
  .shell {
    padding-left: 18px;
    padding-right: 18px;
  }

  .topbar {
    align-items: start;
    flex-direction: column;
  }

  .responsegrid,
  .twocol,
  .segmented {
    grid-template-columns: 1fr;
  }

  .activitystrip {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .activityelapsed {
    text-align: left;
  }
}
