:root {
  color-scheme: light;
  --outer: #98a29d;
  --shell: #dfe7e2;
  --shell-accent: #c7d9cd;
  --panel: #eef3f0;
  --soft: #dfe7e2;
  --raised: #cadfd1;
  --ink: #29352f;
  --muted: #4f5e56;
  --faint: #89958e;
  --line: #c4cec8;
  --accent: #62ad7f;
  --accent-dark: #356b49;
  --danger: #a95769;
  --terminal: #344139;
  --terminal-ink: #d1ddd5;
  --focus: #35694b;
  --body: "Avenir Next", Inter, system-ui, sans-serif;
  --mono: "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 20rem;
  background: var(--outer);
}

body {
  min-height: 100dvh;
  margin: 0;
  padding: clamp(0.5rem, 1.5vw, 1.25rem);
  color: var(--ink);
  background: var(--outer);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.45;
}

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

button,
select,
input[type="file"],
input[type="radio"],
input[type="checkbox"] {
  cursor: pointer;
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 0.2rem solid var(--focus);
  outline-offset: 0.18rem;
}

.skip-link {
  position: fixed;
  inset: 0.75rem auto auto 0.75rem;
  z-index: 10;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  color: #fff;
  background: var(--ink);
  border-radius: 999px;
  clip-path: inset(50%);
}

.skip-link:focus {
  width: auto;
  height: auto;
  padding: 0.7rem 1rem;
  clip-path: none;
}

.auth-view {
  display: grid;
  min-height: calc(100dvh - 2.5rem);
  padding: 1rem;
  place-items: center;
}

.login-card {
  width: min(100%, 25rem);
  padding: clamp(1.25rem, 4vw, 2rem);
  background: var(--panel);
  border: 1px solid rgb(255 255 255 / 65%);
  border-radius: 1.35rem;
  box-shadow: 0 1.5rem 4rem rgb(39 52 45 / 20%);
}

.brand-chip {
  display: inline-flex;
  margin-block-end: 1.5rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid #87948d;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.login-card h1 {
  margin-block-end: 0.45rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  font-size: clamp(1.7rem, 7vw, 2.25rem);
  font-weight: 560;
  line-height: 1.05;
}

.login-copy,
.auth-help {
  color: var(--muted);
  font-size: 0.85rem;
}

.login-copy {
  margin-block-end: 1.25rem;
}

.login-card form,
.account-dialog form {
  gap: 0.85rem;
}

.auth-field label {
  display: block;
  margin-block-end: 0.3rem;
  color: #46534c;
  font-size: 0.78rem;
  font-weight: 700;
}

.auth-field input {
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.75rem;
  color: var(--ink);
  background: rgb(255 255 255 / 65%);
  border: 1px solid #aab8af;
  border-radius: 0.75rem;
  font-size: 1rem;
}

.auth-field input:user-invalid {
  border-color: var(--danger);
  box-shadow: inset 0 0 0 1px var(--danger);
}

.field-hint {
  display: block;
  margin-block: -0.1rem 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.password-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.4rem;
}

.password-toggle,
.header-button {
  min-height: 2.25rem;
  padding: 0.35rem 0.65rem;
  color: var(--ink);
  background: rgb(255 255 255 / 45%);
  border: 1px solid #9eada4;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 650;
}

.password-toggle:hover,
.header-button:hover {
  background: var(--raised);
}

.auth-help {
  margin: 1rem 0 0;
}

.login-state {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.app-shell {
  width: min(100%, 96rem);
  margin-inline: auto;
  overflow: hidden;
  background: linear-gradient(115deg, var(--shell) 0 42%, var(--shell-accent) 100%);
  border: 1px solid #b9c5be;
  border-radius: clamp(1rem, 2vw, 1.5rem);
  box-shadow: 0 1.5rem 4rem rgb(39 52 45 / 18%);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem clamp(1rem, 2vw, 1.5rem) 0.55rem;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.account-nav {
  display: flex;
  gap: 0.35rem;
}

h1,
h2,
h3,
p {
  margin-block-start: 0;
}

h1 {
  margin: 0;
  padding: 0.25rem 0.75rem;
  border: 1px solid #87948d;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}

h2 {
  margin-block-end: 0.65rem;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 520;
  letter-spacing: -0.055em;
  line-height: 1;
}

h3 {
  margin-block-end: 0.85rem;
  font-size: 1rem;
  font-weight: 650;
}

.server-state {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.76rem;
}

.signal-dot {
  width: 0.55rem;
  height: 0.55rem;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 0.25rem rgb(98 173 127 / 14%);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(23rem, 0.9fr) minmax(0, 1.25fr);
  gap: 0.65rem;
  padding: 0 clamp(0.5rem, 1vw, 0.75rem) clamp(0.5rem, 1vw, 0.75rem);
}

.panel {
  min-width: 0;
  padding: clamp(0.7rem, 1.2vw, 1rem);
  background: rgb(238 243 240 / 88%);
  border: 1px solid rgb(255 255 255 / 55%);
  border-radius: clamp(0.9rem, 1.5vw, 1.25rem);
}

.controls {
  font-size: 0.9rem;
}

.controls > h2 {
  margin-block-end: 0.5rem;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
}

form {
  display: grid;
  gap: 0.35rem;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0.5rem;
  background: var(--soft);
  border: 0;
  border-radius: 0.75rem;
}

fieldset:disabled {
  opacity: 0.58;
}

legend {
  padding: 0 0.25rem;
  font-size: 0.76rem;
  font-weight: 700;
}

legend span {
  margin-inline-start: 0.35rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 500;
}

.field-heading,
.actions,
.report-heading,
.progress-line,
.log-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.field-heading {
  margin-block-end: 0.25rem;
}

.inline-state {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.text-button {
  min-height: 1.9rem;
  padding: 0.2rem 0.55rem;
  color: var(--accent-dark);
  background: transparent;
  border: 1px solid #9db3a5;
  border-radius: 999px;
  white-space: nowrap;
}

.text-button:hover {
  background: var(--raised);
}

.track-search-label {
  display: block;
  margin-block-end: 0.2rem;
  color: #46534c;
  font-size: 0.68rem;
  font-weight: 650;
}

.track-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  margin-block-end: 0.3rem;
}

.track-search input {
  min-width: 0;
  min-height: 2rem;
  padding: 0.3rem 0.55rem;
  color: var(--ink);
  background: rgb(255 255 255 / 58%);
  border: 1px solid #b6c2ba;
  border-radius: 0.85rem;
  font-size: 0.78rem;
}

.track-search output {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  white-space: nowrap;
}

.track-list {
  display: grid;
  max-height: 8.5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: rgb(255 255 255 / 36%);
  border-radius: 0.9rem;
}

.track-option {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  gap: 0.5rem;
  align-items: center;
  min-height: 2rem;
  padding: 0.2rem 0.4rem;
  border-block-end: 1px solid var(--line);
}

.track-option:last-child {
  border-block-end: 0;
}

.track-option:hover,
.track-option:has(input:checked) {
  background: var(--raised);
}

.track-option input,
.mode-card input {
  width: 1rem;
  height: 1rem;
  margin: 0.15rem 0 0;
  accent-color: var(--accent-dark);
}

.track-copy {
  min-width: 0;
  overflow: hidden;
  font-weight: 400;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-wrap: nowrap;
}

.track-copy strong {
  font-weight: 650;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.mode-card {
  display: grid;
  grid-template-columns: 1.25rem auto 1fr;
  gap: 0.4rem;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.25rem 0.4rem;
  background: rgb(255 255 255 / 36%);
  border: 1px solid transparent;
  border-radius: 0.75rem;
}

.mode-card:has(input:checked) {
  background: var(--raised);
  border-color: #91b59d;
}

.mode-card strong,
.mode-card span {
  grid-column: auto;
}

.mode-card input {
  margin: 0;
}

.mode-card span {
  display: none;
}

.scenario-select {
  width: 100%;
  min-height: 2.1rem;
  padding: 0.25rem 0.45rem;
  color: var(--ink);
  background: rgb(255 255 255 / 58%);
  border: 1px solid #b6c2ba;
  border-radius: 0.7rem;
  font-size: 0.82rem;
}

.scenario-desc {
  margin: 0.3rem 0 0;
  padding: 0.3rem 0.45rem;
  color: var(--muted);
  background: rgb(255 255 255 / 36%);
  border-radius: 0.65rem;
  font-size: 0.68rem;
  line-height: 1.3;
}

.proxy-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.proxy-heading > span {
  color: #46534c;
  font-size: 0.64rem;
  font-weight: 650;
  white-space: nowrap;
}

.proxy-source {
  display: flex;
  gap: 0.2rem;
}

.proxy-source label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 1.75rem;
  padding: 0.1rem 0.4rem;
  background: rgb(255 255 255 / 36%);
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 650;
  cursor: pointer;
}

.proxy-source label:has(input:checked) {
  background: var(--raised);
  border-color: #91b59d;
}

.proxy-source input {
  width: 0.85rem;
  height: 0.85rem;
  margin: 0;
  accent-color: var(--accent-dark);
}

.proxy-input {
  margin-block-start: 0.3rem;
}

.parameter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.3rem;
  margin-block-start: 0.3rem;
}

.field {
  min-width: 0;
}

.field label {
  display: block;
  margin-block-end: 0.2rem;
  color: #46534c;
  font-size: 0.64rem;
  font-weight: 650;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 2.1rem;
  padding: 0.25rem 0.4rem;
  color: var(--ink);
  background: rgb(255 255 255 / 58%);
  border: 1px solid #b6c2ba;
  border-radius: 0.7rem;
  font-size: 0.82rem;
}

.field textarea {
  display: block;
  resize: vertical;
}

.field input[type="file"] {
  padding: 0.15rem;
}

.field input[type="file"]::file-selector-button {
  min-height: 1.65rem;
  margin-inline-end: 0.45rem;
  padding-inline: 0.55rem;
  color: var(--ink);
  background: var(--raised);
  border: 0;
  border-radius: 0.65rem;
  font-weight: 650;
}

.field input:user-invalid {
  border-color: var(--danger);
  box-shadow: inset 0 0 0 1px var(--danger);
}

.message {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border-radius: 0.8rem;
}

.error {
  color: #713847;
  background: #ead6dc;
}

.success {
  color: #28563a;
  background: #d2e5d8;
}

.account-dialog {
  width: min(92vw, 42rem);
  max-height: 86dvh;
  padding: 1rem;
  overflow: auto;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid #aab8af;
  border-radius: 1.15rem;
  box-shadow: 0 1.5rem 5rem rgb(20 30 24 / 34%);
}

.account-dialog::backdrop {
  background: rgb(28 39 33 / 58%);
  backdrop-filter: blur(0.2rem);
}

.dialog-heading,
.users-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.dialog-heading {
  margin-block-end: 1rem;
}

.dialog-heading h2,
.users-heading h3 {
  margin: 0;
}

.eyebrow {
  margin: 0 0 0.2rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.create-user-form {
  margin-block-end: 0.75rem;
  padding: 0.75rem;
  background: var(--soft);
  border-radius: 0.9rem;
}

.credentials-panel {
  margin-block: 0.75rem;
  padding: 0.75rem;
  background: #d2e5d8;
  border: 1px solid #9db9a6;
  border-radius: 0.9rem;
}

.credentials-panel h3,
.credentials-panel p {
  margin-block-end: 0.35rem;
}

.credentials-panel p {
  color: var(--muted);
  font-size: 0.76rem;
}

.credentials-panel code {
  display: block;
  margin-block: 0.55rem;
  padding: 0.65rem;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  background: rgb(255 255 255 / 55%);
  border-radius: 0.65rem;
  font-size: 0.82rem;
}

.users-heading {
  align-items: center;
  margin-block: 1rem 0.45rem;
}

.users-heading span {
  min-width: 1.7rem;
  padding: 0.15rem 0.45rem;
  color: var(--muted);
  background: var(--soft);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-align: center;
}

.users-list {
  display: grid;
  max-height: 45dvh;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) auto auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.65rem;
  border-block-end: 1px solid var(--line);
}

.user-row:last-child {
  border-block-end: 0;
}

.user-row[data-active="false"] {
  background: #eadfe1;
}

.user-copy {
  display: grid;
  min-width: 0;
}

.user-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-copy span,
.user-status {
  color: var(--muted);
  font-size: 0.7rem;
}

.user-status {
  white-space: nowrap;
}

.user-actions {
  display: flex;
  gap: 0.35rem;
}

.account-dialog > form > .primary-button,
.create-user-form > .primary-button {
  width: 100%;
}

.actions {
  justify-content: stretch;
}

.primary-button,
.secondary-button {
  min-height: 2.25rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.primary-button {
  flex: 1;
  color: #eef6f1;
  background: var(--ink);
}

.primary-button:hover {
  background: #3b4941;
}

.secondary-button {
  color: #713847;
  background: #ead6dc;
  border-color: #d2a8b3;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.report-heading {
  align-items: flex-start;
}

.report {
  display: flex;
  flex-direction: column;
}

.run-state,
.event-state {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.65rem;
  color: var(--muted);
  background: rgb(255 255 255 / 40%);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.68rem;
  white-space: nowrap;
}

.run-state::before,
.event-state::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  background: var(--faint);
  border-radius: 50%;
}

.run-state[data-state="running"]::before,
.event-state[data-state="live"]::before {
  background: var(--accent);
  animation: signal 1.3s ease-in-out infinite;
}

.run-state[data-state="done"]::before,
.event-state[data-state="done"]::before {
  background: var(--accent-dark);
}

.run-state[data-state="error"]::before,
.event-state[data-state="error"]::before {
  background: var(--danger);
}

.event-state[data-state="connecting"]::before {
  background: #a58b55;
}

.progress-card,
.results-card {
  padding: 0.65rem;
  background: rgb(255 255 255 / 44%);
  border-radius: 0.9rem;
}

.progress-line p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.progress-line output {
  font-family: var(--mono);
  font-size: 0.8rem;
}

progress {
  display: block;
  width: 100%;
  height: 0.65rem;
  margin-block-start: 0.4rem;
  overflow: hidden;
  appearance: none;
  background: #afbeb5;
  border: 0;
  border-radius: 999px;
}

progress::-webkit-progress-bar {
  background: #afbeb5;
  border-radius: 999px;
}

progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 999px;
  transition: width 180ms ease-out;
}

progress::-moz-progress-bar {
  background: var(--accent);
  border-radius: 999px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0.45rem 0;
}

.metrics div {
  min-width: 0;
  padding: 0.5rem;
  background: var(--soft);
  border-radius: 0.75rem;
}

.metrics dt {
  color: var(--muted);
  font-size: 0.68rem;
}

.metrics dd {
  margin: 0.15rem 0 0;
  overflow: hidden;
  font-family: var(--mono);
  font-size: clamp(0.9rem, 1.4vw, 1.1rem);
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.results-card {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 10rem;
  margin-block-end: 0.45rem;
}

.empty-report {
  display: grid;
  flex: 1;
  min-height: 4rem;
  place-items: center;
  color: var(--muted);
  border: 1px dashed #b0bdb5;
  border-radius: 0.9rem;
  font-size: 0.82rem;
}

.table-wrap {
  max-height: 14rem;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.7rem;
}

th,
td {
  padding: 0.45rem;
  text-align: start;
  vertical-align: top;
  border-block-end: 1px solid var(--line);
}

thead th {
  position: sticky;
  inset-block-start: 0;
  z-index: 1;
  color: var(--muted);
  background: #e4ebe7;
}

tbody tr:last-child td {
  border-block-end: 0;
}

tbody tr[data-result="failed"] td:first-child::before {
  content: "! ";
  color: var(--danger);
}

tbody tr[data-result="success"] td:first-child::before {
  content: "✓ ";
  color: var(--accent-dark);
}

td:nth-child(2) {
  min-width: 12rem;
  word-break: break-word;
}

td:last-child {
  min-width: 13rem;
  color: var(--muted);
  white-space: normal;
}

.log-card {
  min-height: 7.5rem;
  padding: 0.65rem;
  color: var(--terminal-ink);
  background: var(--terminal);
  border-radius: 0.9rem;
}

.log-card h3 {
  margin: 0;
  color: #e2ebe5;
}

.event-state {
  color: #bac7bf;
  background: rgb(255 255 255 / 8%);
}

.log-empty {
  margin: 1.6rem 0;
  color: #9caaa1;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-align: center;
}

.event-log {
  max-height: 7.5rem;
  margin: 0.45rem 0 0;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  list-style: none;
  font-family: var(--mono);
  font-size: 0.68rem;
}

.event-log li {
  display: grid;
  grid-template-columns: 3.5rem minmax(6rem, auto) 1fr;
  gap: 0.65rem;
  padding: 0.32rem 0;
  border-block-end: 1px solid rgb(255 255 255 / 8%);
}

.log-sequence {
  color: #a3b2a8;
}

.log-type {
  color: #94c5a7;
}

.event-log li[data-type="error"] .log-type,
.event-log li[data-type="cancelled"] .log-type {
  color: #d69aa8;
}

.log-payload {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #c4d0c8;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  border: 0 !important;
  clip-path: inset(50%) !important;
}

@keyframes signal {
  50% { opacity: 0.35; }
}

@media (min-width: 70.01rem) and (min-height: 42rem) {
  html,
  body {
    block-size: 100dvh;
  }

  body {
    overflow: hidden;
  }

  .app-shell {
    display: flex;
    flex-direction: column;
    block-size: 100%;
  }

  .workspace {
    flex: 1;
    min-block-size: 0;
  }

  .panel {
    min-block-size: 0;
  }

  .controls {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .controls form {
    flex: 1;
    min-block-size: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr) auto auto auto;
    grid-auto-rows: auto;
  }

  .track-settings {
    display: flex;
    flex-direction: column;
    grid-column: 1 / -1;
    min-block-size: 0;
  }

  .mode-settings {
    grid-column: 1;
  }

  .scenario-settings {
    grid-column: 2;
  }

  .parameter-settings,
  .controls form > .message,
  .actions {
    grid-column: 1 / -1;
  }

  .mode-settings .mode-grid {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .proxy-control {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.35rem;
    align-items: center;
  }

  .proxy-input {
    margin: 0;
  }

  .proxy-input textarea {
    min-height: 3.2rem;
    max-height: 6rem;
  }

  .parameter-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .parameter-grid .field {
    display: flex;
    flex-direction: column;
  }

  .parameter-grid .field input {
    margin-block-start: auto;
  }

  .track-list {
    flex: 1;
    min-block-size: 2.5rem;
    max-block-size: none;
  }

  .report {
    overflow: hidden;
  }

  .results-card {
    min-block-size: 0;
  }

  .table-wrap {
    flex: 1;
    min-block-size: 0;
    max-block-size: none;
  }
}

@media (max-width: 70rem) {
  .workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 48rem) {
  body {
    padding: 0;
  }

  .auth-view {
    min-height: 100dvh;
  }

  .app-shell {
    border: 0;
    border-radius: 0;
  }

  .workspace {
    padding-inline: 0.6rem;
  }

  .panel {
    padding: 1rem;
  }

  .parameter-grid,
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-log li {
    grid-template-columns: 2.75rem 1fr;
  }

  .log-payload {
    grid-column: 1 / -1;
  }

  .user-row {
    grid-template-columns: 1fr auto;
  }

  .user-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 32rem) {
  .app-header,
  .field-heading,
  .actions,
  .report-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .server-state {
    align-self: flex-start;
  }

  .header-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .account-nav {
    flex-wrap: wrap;
  }

  .mode-grid,
  .parameter-grid {
    grid-template-columns: 1fr;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .account-dialog {
    width: calc(100vw - 1rem);
    padding: 0.8rem;
  }

  .user-row {
    grid-template-columns: 1fr;
  }

  .user-actions,
  .user-status {
    grid-column: 1;
  }
}

@media (pointer: coarse) {
  button,
  input,
  select,
  .track-option,
  .mode-card,
  .proxy-source label {
    min-height: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
