@import url("https://fonts.googleapis.com/css2?family=Funnel+Sans:wght@500;600&family=IBM+Plex+Mono:wght@400;500;600&family=Inter:wght@400;500;600&display=swap");

:root {
  color-scheme: dark;
  --carbon: #090d12;
  --carbon-raised: #0e141b;
  --carbon-soft: #111920;
  --carbon-deep: #070b0f;
  --paper: #f0f4f2;
  --muted: #84919c;
  --muted-2: #61717e;
  --line: #28343f;
  --line-strong: #34414d;
  --lime: #b6ff4a;
  --lime-soft: #182318;
  --cyan: #55d6ff;
  --amber: #ffcf5c;
  --danger: #ff7b72;
  --display: "Funnel Sans", "Arial Narrow", sans-serif;
  --body: Inter, system-ui, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --topbar-height: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  overflow-x: hidden;
  background: var(--carbon);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  background:
    radial-gradient(circle at 62% 7%, rgb(85 214 255 / 4%), transparent 28rem),
    var(--carbon);
  color: var(--paper);
  font: 400 0.8125rem/1.55 var(--body);
}

button,
input {
  font: inherit;
}

button,
a,
input,
summary {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button {
  border: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  translate: 0 -160%;
  padding: 8px 12px;
  background: var(--lime);
  color: var(--carbon);
  font: 600 0.6875rem var(--mono);
}

.skip-link:focus {
  translate: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mono,
.eyebrow,
.badge,
.label,
.button,
.status-copy,
.metric dt,
.event time,
.field label,
.section-index {
  font-family: var(--mono);
}

.topbar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(13rem, 1fr) auto minmax(13rem, 1fr);
  align-items: center;
  min-height: var(--topbar-height);
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgb(14 20 27 / 96%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  text-decoration: none;
  font: 600 0.8125rem var(--mono);
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  background: var(--lime);
  clip-path: polygon(50% 0, 100% 26%, 82% 100%, 20% 84%, 0 31%);
}

.mode-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  background: var(--carbon);
}

.mode-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: #84919c;
  text-decoration: none;
  font: 600 0.5rem var(--mono);
  letter-spacing: 0.08em;
}

.mode-link[aria-current="page"] {
  background: var(--lime-soft);
  color: var(--lime);
}

.mode-link.is-locked {
  cursor: not-allowed;
  background: #12171d;
  color: #8996a0;
}

.topbar-meta {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
  color: #8d9ba8;
  font: 400 0.625rem var(--mono);
  white-space: nowrap;
}

.avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  background: #26313d;
  color: #d7dfdc;
  font: 600 0.5625rem var(--mono);
}

.app-menu {
  display: none;
  position: relative;
  justify-self: end;
}

.app-menu summary {
  cursor: pointer;
  list-style: none;
  color: var(--lime);
  font: 600 0.5625rem var(--mono);
}

.app-menu summary::-webkit-details-marker {
  display: none;
}

.app-menu[open] nav {
  position: absolute;
  top: 35px;
  right: 0;
  display: grid;
  width: min(17rem, calc(100vw - 32px));
  border: 1px solid var(--line-strong);
  background: #0b1016;
  box-shadow: 0 18px 60px rgb(0 0 0 / 40%);
}

.app-menu a {
  padding: 15px;
  border-bottom: 1px solid var(--line);
  color: #a9b4bc;
  text-decoration: none;
  font: 500 0.6875rem var(--mono);
}

.app-menu a[aria-current="page"] {
  color: var(--lime);
}

.app-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: calc(100vh - var(--topbar-height));
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
  padding: 24px 16px;
  border-right: 1px solid var(--line);
  background: #0b1016;
}

.sidebar-title,
.section-index,
.label,
.eyebrow {
  margin: 0;
  color: #7a8996;
  font: 600 0.5625rem var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.side-nav {
  display: grid;
  gap: 3px;
}

.side-nav a,
.side-nav span {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 0 10px;
  color: #9ba7b2;
  text-decoration: none;
  font-size: 0.8125rem;
}

.side-nav [aria-current="page"] {
  background: #1d2a1c;
  color: #ecf4e8;
  font-weight: 600;
}

.side-icon {
  width: 14px;
  color: #697887;
  text-align: center;
  font-family: var(--mono);
}

.side-nav [aria-current="page"] .side-icon {
  color: var(--lime);
}

.sidebar-divider {
  height: 1px;
  border: 0;
  margin: -1px 0 0;
  background: var(--line);
}

.environment-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #2c3a46;
}

.environment-card strong {
  color: #d8e0dd;
  font: 600 0.6875rem var(--mono);
}

.environment-card span {
  color: #73818d;
  font: 400 0.5625rem/1.65 var(--mono);
}

.sidebar-spacer {
  flex: 1;
}

.ghost-button,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #4b5a67;
  background: transparent;
  color: #aab5be;
  cursor: pointer;
  font: 600 0.5625rem var(--mono);
  letter-spacing: 0.04em;
}

.main {
  min-width: 0;
  padding: 24px;
}

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

.page-heading-copy {
  max-width: 54rem;
}

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

h1 {
  margin-bottom: 5px;
  color: #eff4f1;
  font: 600 clamp(1.65rem, 3vw, 2.125rem)/1.1 var(--display);
  letter-spacing: -0.025em;
}

.page-heading p {
  margin-bottom: 0;
  color: #7e8b96;
  font-size: 0.75rem;
}

.status-badge,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #385332;
  background: var(--lime-soft);
  color: var(--lime);
  white-space: nowrap;
  font: 600 0.5rem var(--mono);
  letter-spacing: 0.04em;
}

.status-badge::before,
.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-badge.is-locked {
  border-color: #3a4148;
  background: #12171d;
  color: #7b858e;
}

.safety-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  margin-bottom: 14px;
  padding: 8px 12px;
  border: 1px solid #2d3a46;
  background: #101820;
  color: #8f9da7;
  font-size: 0.6875rem;
}

.safety-strip strong {
  flex: 0 0 auto;
  color: var(--cyan);
  font: 600 0.5rem var(--mono);
  letter-spacing: 0.08em;
}

.scenario-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.mobile-scenario-select,
.mobile-fixture-card {
  display: none;
}

.scenario-card {
  position: relative;
  display: grid;
  align-content: start;
  min-width: 0;
  min-height: 142px;
  gap: 8px;
  padding: 14px;
  border: 1px solid #2a3540;
  background: #10161d;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.scenario-card::after {
  position: absolute;
  right: 14px;
  bottom: 12px;
  left: 14px;
  height: 3px;
  background: #26313d;
  content: "";
}

.scenario-card.is-selected {
  border-color: #639b4c;
  background: var(--lime-soft);
}

.scenario-card.is-selected::after {
  background: var(--lime);
}

.scenario-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #71808c;
  font: 400 0.5rem var(--mono);
}

.scenario-card.is-selected .scenario-meta span:first-child {
  color: var(--lime);
  font-weight: 600;
}

.scenario-card strong {
  overflow-wrap: anywhere;
  color: #afb9c2;
  font: 600 0.625rem/1.4 var(--mono);
}

.scenario-card.is-selected strong {
  color: #eaf2e6;
}

.scenario-card small {
  color: #84919c;
  font-size: 0.6875rem;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(330px, 1fr) minmax(220px, 270px);
  gap: 12px;
  min-width: 0;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--carbon-raised);
}

.config-panel,
.result-panel,
.timeline-panel {
  padding: 16px;
}

.config-panel {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading h2,
.config-panel h2 {
  margin: 0;
  color: #edf3f0;
  font: 600 1.25rem/1.2 var(--display);
}

.config-panel .eyebrow {
  margin-bottom: -7px;
}

.field-grid {
  display: grid;
  gap: 12px;
}

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

.field label {
  color: #84919c;
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.field input,
.search-field {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 9px;
  border: 1px solid #303c47;
  border-radius: 0;
  background: #0a0f14;
  color: #b8c2c9;
  font: 400 0.5625rem var(--mono);
}

.primary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  background: var(--lime);
  color: #0a0e11;
  cursor: pointer;
  font: 600 0.5625rem var(--mono);
  letter-spacing: 0.05em;
  text-decoration: none;
}

.primary-button:hover {
  background: #c5ff72;
}

.primary-button[disabled] {
  border: 1px solid #343d44;
  background: #171c21;
  color: #68727a;
  cursor: not-allowed;
}

.safety-note {
  margin: -4px 0 0;
  color: #84919c;
  font: 400 0.5rem/1.55 var(--mono);
}

.result-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #0c1218;
}

.result-heading {
  display: grid;
  gap: 4px;
}

.result-heading strong {
  color: #dce4e1;
  font: 600 0.625rem var(--mono);
}

.result-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: var(--lime-soft);
  color: var(--lime);
  font: 600 0.4375rem var(--mono);
  white-space: nowrap;
}

.result-state::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

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

.metric {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 82px;
  gap: 7px;
  padding: 10px;
  background: var(--carbon-soft);
}

.metric dt {
  overflow-wrap: anywhere;
  color: #84919c;
  font-size: 0.4375rem;
  font-weight: 600;
}

.metric dd {
  min-width: 0;
  margin: 0;
  color: var(--paper);
  font: 600 clamp(0.75rem, 1.5vw, 1.0625rem) var(--mono);
}

.metric:nth-child(2) dd {
  color: var(--lime);
}

.metric:nth-child(3) dd {
  color: var(--cyan);
}

.code-output {
  flex: 1;
  min-height: 190px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border: 0;
  background: var(--carbon-deep);
  color: #9eabb4;
  font: 400 0.625rem/1.75 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.code-output .code-label {
  color: var(--cyan);
  font-weight: 600;
}

.code-output .code-accent {
  color: var(--lime);
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.small-button {
  border-color: var(--line-strong);
}

.small-button:hover,
.ghost-button:hover {
  border-color: #72808b;
  color: var(--paper);
}

.timeline-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.event {
  position: relative;
  display: grid;
  min-height: 72px;
  padding-left: 28px;
}

.event::before {
  position: absolute;
  top: 5px;
  left: 3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  content: "";
}

.event::after {
  position: absolute;
  top: 17px;
  bottom: 5px;
  left: 6px;
  width: 1px;
  background: #33414d;
  content: "";
}

.event:last-child::before {
  background: var(--lime);
}

.event:last-child::after {
  display: none;
}

.event strong {
  color: #c6d0d6;
  font: 600 0.5625rem var(--mono);
}

.event time {
  color: #84919c;
  font-size: 0.5rem;
}

.timeline-panel .small-button {
  margin-top: auto;
}

.toast {
  position: fixed;
  z-index: 80;
  right: 20px;
  bottom: 20px;
  max-width: calc(100vw - 40px);
  padding: 10px 13px;
  border: 1px solid #49713b;
  background: #182318;
  color: var(--lime);
  font: 600 0.5625rem var(--mono);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Connect live account */
.connect-shell {
  grid-template-columns: 244px minmax(0, 1fr);
}

.step-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  min-height: 58px;
  gap: 12px;
}

.step-number {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: #151d25;
  color: #84919c;
  font: 600 0.5rem var(--mono);
}

.step.is-active .step-number {
  background: var(--lime);
  color: var(--carbon);
}

.step-copy {
  display: grid;
  gap: 3px;
}

.step-copy strong {
  color: #84919c;
  font-size: 0.75rem;
  font-weight: 400;
}

.step.is-active .step-copy strong {
  color: #ecf3ef;
  font-weight: 600;
}

.step-copy small {
  color: #84919c;
  font: 600 0.4375rem var(--mono);
}

.step.is-active .step-copy small {
  color: var(--lime);
}

.safe-default {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #2d3a46;
  background: #111820;
}

.safe-default strong {
  color: var(--cyan);
  font: 600 0.5rem var(--mono);
}

.safe-default p {
  margin: 0;
  color: #7f8c97;
  font-size: 0.625rem;
}

.connect-main {
  padding: 32px;
}

.connect-main .page-heading {
  align-items: end;
  margin-bottom: 22px;
}

.connection-time {
  flex: 0 0 auto;
  padding: 9px 12px;
  background: var(--carbon-soft);
  color: #a4b0ba;
  font: 600 0.5rem var(--mono);
}

.connect-layout {
  display: grid;
  grid-template-columns: minmax(20rem, 1fr) minmax(17rem, 340px);
  gap: 18px;
  align-items: start;
}

.provider-list {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.provider-options {
  display: grid;
  gap: 10px;
}

.connect-layout .section-index {
  margin-bottom: 10px;
}

.search-wrap {
  position: relative;
}

.search-wrap::before {
  position: absolute;
  top: 50%;
  left: 13px;
  color: #667581;
  font: 400 0.75rem var(--mono);
  content: "⌕";
  transform: translateY(-50%);
  pointer-events: none;
}

.search-field {
  height: 44px;
  padding-left: 34px;
  background: #0d1319;
}

.provider-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  min-height: 74px;
  gap: 13px;
  padding: 0 14px;
  border: 1px solid #2b3742;
  background: var(--carbon-raised);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.provider-row[aria-pressed="true"] {
  border-color: #6e9c55;
  background: #17211b;
}

.provider-logo {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  background: var(--provider-color, #34414d);
  color: #fff;
  font: 700 0.75rem var(--body);
}

.provider-google { --provider-color: #4285f4; }
.provider-meta { --provider-color: #1877f2; }
.provider-linkedin { --provider-color: #0a66c2; }
.provider-microsoft { --provider-color: #737373; }
.provider-reddit { --provider-color: #ff4500; }
.provider-tiktok { --provider-color: #222; }

.provider-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.provider-copy strong {
  overflow-wrap: anywhere;
  color: #dce4e1;
  font: 600 0.625rem var(--mono);
}

.provider-copy small {
  color: #84919c;
  font-size: 0.6875rem;
}

.provider-state {
  color: #74838f;
  font: 600 0.5rem var(--mono);
  white-space: nowrap;
}

.provider-row[aria-pressed="true"] .provider-state {
  color: var(--lime);
}

.provider-row[hidden] {
  display: none;
}

.connection-detail {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  gap: 18px;
  padding: 20px;
}

.provider-detail-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.provider-detail-heading .provider-logo {
  width: 40px;
  height: 40px;
}

.provider-detail-copy {
  display: grid;
  gap: 3px;
}

.provider-detail-copy h2 {
  margin: 0;
  font-size: 0.875rem;
}

.provider-detail-copy span {
  color: var(--cyan);
  font: 600 0.4375rem var(--mono);
}

.connection-detail > p {
  margin: 0;
  color: #84919c;
  font-size: 0.75rem;
}

.permissions {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.permissions li {
  position: relative;
  padding-left: 22px;
  color: #a2adb6;
  font-size: 0.6875rem;
}

.permissions li::before {
  position: absolute;
  left: 0;
  color: #5c6871;
  font: 600 0.625rem var(--mono);
  content: "—";
}

.gate-note {
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding: 11px;
  border: 1px solid #343d44;
  background: #11161b;
}

.gate-note strong {
  color: #98a2aa;
  font: 600 0.5rem var(--mono);
}

.gate-note span {
  color: #84919c;
  font-size: 0.625rem;
}

.security-note {
  color: #84919c;
  text-align: center;
  font: 400 0.5rem var(--mono);
}

.mobile-progress {
  display: none;
}

/* Production gate */
.production-shell .sidebar {
  filter: saturate(0.55);
}

.locked-nav-item {
  color: #84919c !important;
}

.production-main {
  position: relative;
}

.lock-banner {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #3b444c;
  background:
    linear-gradient(90deg, rgb(255 207 92 / 5%), transparent 38%),
    #10151a;
}

.lock-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #4a5157;
  color: var(--amber);
  font: 600 0.875rem var(--mono);
}

.lock-copy {
  display: grid;
  gap: 4px;
}

.lock-copy strong {
  color: #d4d8da;
  font: 600 0.6875rem var(--mono);
}

.lock-copy p {
  margin: 0;
  color: #77828a;
  font-size: 0.6875rem;
}

.zero-tools {
  min-width: 110px;
  text-align: right;
}

.zero-tools strong {
  display: block;
  color: #d4d8da;
  font: 600 1.25rem var(--mono);
}

.zero-tools span {
  color: #84919c;
  font: 600 0.4375rem var(--mono);
}

.environment-ladder {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.environment-step {
  position: relative;
  display: grid;
  min-height: 120px;
  align-content: start;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #10161d;
  color: inherit;
  text-decoration: none;
}

.environment-step.is-available {
  border-color: #4c663f;
  background: #152016;
}

.environment-step.is-locked {
  color: #66717a;
}

.environment-step .step-topline {
  display: flex;
  justify-content: space-between;
  color: #667684;
  font: 600 0.5rem var(--mono);
}

.environment-step.is-available .step-topline {
  color: var(--lime);
}

.environment-step h2 {
  margin: 0;
  color: #c5cccf;
  font: 600 0.875rem var(--display);
}

.environment-step p {
  margin: 0;
  color: #84919c;
  font-size: 0.6875rem;
}

.production-empty {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(300px, 1.3fr);
  min-height: 420px;
}

.empty-tools-list {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 20px;
  border-right: 1px solid var(--line);
}

.empty-tools-list h2,
.empty-console h2 {
  margin: 0;
  color: #d8dedc;
  font: 600 1rem var(--display);
}

.empty-count {
  display: grid;
  min-height: 170px;
  place-items: center;
  border: 1px dashed #303a42;
  background: #0b1015;
  text-align: center;
}

.empty-count strong {
  display: block;
  color: #74818a;
  font: 500 3rem/1 var(--mono);
}

.empty-count span {
  display: block;
  margin-top: 10px;
  color: #84919c;
  font: 600 0.5rem var(--mono);
}

.boundary-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.boundary-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid #202a32;
  color: #84919c;
  font-size: 0.6875rem;
}

.boundary-list strong {
  color: #7f898f;
  font: 600 0.5rem var(--mono);
}

.empty-console {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 20px;
  background: #0c1218;
}

.empty-state-code {
  min-height: 240px;
  margin: 0;
  padding: 18px;
  border: 1px solid #222e37;
  background: var(--carbon-deep);
  color: #76838c;
  font: 400 0.6875rem/1.8 var(--mono);
  white-space: pre-wrap;
}

.empty-state-code .code-key {
  color: var(--cyan);
}

.empty-state-code .code-value {
  color: #9ba5ab;
}

.production-note {
  margin: 0;
  color: #84919c;
  font-size: 0.6875rem;
}

.result-state.is-warning {
  color: var(--amber);
}

@media (max-width: 1100px) {
  .workbench {
    grid-template-columns: minmax(240px, 0.8fr) minmax(360px, 1.2fr);
  }

  .timeline-panel {
    grid-column: 1 / -1;
  }

  .timeline {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

  .event {
    min-height: 58px;
    padding-left: 20px;
  }

  .event::after {
    display: none;
  }

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

  .scenario-card {
    min-height: 110px;
  }
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .mode-switcher,
  .topbar-meta,
  .sidebar {
    display: none;
  }

  .app-menu {
    display: block;
  }

  .app-shell,
  .connect-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .main,
  .connect-main {
    padding: 22px 20px;
  }

  .connect-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .connection-detail {
    min-height: 430px;
  }

  .mobile-progress {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 18px;
  }

  .mobile-progress span {
    display: grid;
    height: 40px;
    place-items: center;
    border: 1px solid var(--line-strong);
    background: #151d25;
    color: #84919c;
    font: 600 0.5rem var(--mono);
  }

  .mobile-progress span:first-child {
    background: var(--lime);
    color: var(--carbon);
  }
}

@media (max-width: 700px) {
  .topbar {
    min-height: 64px;
    padding: 0 16px;
  }

  .brand {
    gap: 9px;
    font-size: 0.6875rem;
  }

  .brand-mark {
    width: 16px;
    height: 16px;
  }

  .main,
  .connect-main {
    padding: 22px 16px 32px;
  }

  .page-heading {
    display: grid;
    min-height: auto;
    gap: 14px;
    margin-bottom: 18px;
  }

  .page-heading h1 {
    font-size: 1.75rem;
  }

  .page-heading .status-badge,
  .connection-time {
    width: fit-content;
  }

  .safety-strip {
    align-items: start;
    flex-direction: column;
    gap: 5px;
  }

  .scenario-picker {
    grid-template-columns: minmax(0, 1fr);
  }

  .mobile-scenario-select {
    display: grid;
    gap: 7px;
    margin-bottom: 10px;
  }

  .mobile-scenario-select span {
    color: #667684;
    font: 600 0.5rem var(--mono);
    letter-spacing: 0.08em;
  }

  .mobile-scenario-select select {
    width: 100%;
    min-height: 44px;
    padding: 0 34px 0 11px;
    border: 1px solid #639b4c;
    border-radius: 0;
    background: #182318;
    color: #eaf2e6;
    font: 600 0.625rem var(--mono);
  }

  .scenario-card {
    display: none;
    min-height: 104px;
  }

  .scenario-card.is-selected {
    display: grid;
  }

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

  .config-panel,
  .result-panel,
  .timeline-panel {
    grid-column: 1;
    padding: 14px;
  }

  .metrics {
    gap: 7px;
  }

  .metric {
    min-height: 82px;
    padding: 9px;
  }

  .metric dd {
    font-size: clamp(0.6875rem, 3.6vw, 0.8125rem);
  }

  .timeline {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .mobile-fixture-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    margin-top: 12px;
  }

  .mobile-fixture-card strong,
  .mobile-fixture-card span {
    grid-column: 1;
  }

  .mobile-fixture-card .ghost-button {
    grid-column: 2;
    grid-row: 1 / span 2;
    min-width: 64px;
    min-height: 44px;
  }

  .event {
    min-height: 72px;
    padding-left: 28px;
  }

  .event::after {
    display: block;
  }

  .event:last-child::after {
    display: none;
  }

  .connect-main .page-heading {
    margin-bottom: 18px;
  }

  .connect-layout {
    gap: 18px;
  }

  .provider-row {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    min-height: 58px;
    gap: 11px;
    padding: 0 11px;
  }

  .provider-logo {
    width: 30px;
    height: 30px;
    font-size: 0.625rem;
  }

  .provider-copy small {
    display: none;
  }

  .provider-list .provider-row:nth-of-type(n + 5) {
    display: none;
  }

  .connection-detail {
    min-height: 440px;
    padding: 16px;
  }

  .primary-button {
    font-size: 0.625rem;
  }

  .lock-banner {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .zero-tools {
    grid-column: 1 / -1;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    text-align: left;
  }

  .environment-ladder {
    grid-template-columns: minmax(0, 1fr);
  }

  .environment-step {
    min-height: 104px;
  }

  .production-empty {
    grid-template-columns: minmax(0, 1fr);
  }

  .empty-tools-list {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .empty-console {
    padding: 16px;
  }
}

@media (max-width: 390px) {
  .brand-mark {
    width: 15px;
    height: 15px;
  }

  .result-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .provider-state {
    font-size: 0.5rem;
  }

  .lock-banner {
    padding: 14px;
  }
}

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

@keyframes event-arrive {
  from {
    opacity: 0.25;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-panel.is-running .event,
.timeline-panel.is-running .event {
  animation: event-arrive 300ms ease both;
}

.timeline-panel.is-running .event:nth-child(2) {
  animation-delay: 80ms;
}

.timeline-panel.is-running .event:nth-child(3) {
  animation-delay: 160ms;
}

.timeline-panel.is-running .event:nth-child(4) {
  animation-delay: 240ms;
}
