@font-face {
  font-family: 'Instrument Sans';
  src: url('./instrument-sans-variable.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --cream: #f4efe3;
  --paper: #fffdf7;
  --forest: #1f3d2f;
  --moss: #4f6f58;
  --line: #d8d2c0;
  --amber: #a97731;
  --shadow: 0 14px 34px rgba(31, 61, 47, 0.09);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--forest);
  font:
    15px/1.55 'Instrument Sans',
    sans-serif;
}
.page {
  width: min(1180px, 100%);
  margin: auto;
  padding: 20px clamp(14px, 4vw, 40px) 30px;
}
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 20px;
}
.badge,
.local-mark,
.agent-status {
  border: 1px solid #c7bfa8;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 650;
  color: var(--moss);
  background: #faf7ec;
  white-space: nowrap;
}
.hero {
  padding: clamp(26px, 5vw, 48px) 0 24px;
  max-width: 720px;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--moss);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
h1,
h2,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.045em;
  margin-bottom: 14px;
}
h2 {
  font-size: 15px;
  letter-spacing: -0.01em;
}
.lede {
  color: #526656;
  margin: 0;
  max-width: 64ch;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 288px;
  gap: 20px;
  align-items: start;
}
.office-panel,
.sidebar,
.side-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.office-panel {
  padding: clamp(13px, 3vw, 22px);
  min-width: 0;
}
.panel-heading,
.sidebar-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.panel-heading h2,
.sidebar-heading h2 {
  margin: 0;
}
.muted {
  margin: 3px 0 0;
  color: #647466;
  font-size: 12px;
}
.local-mark {
  font-size: 10px;
  background: #e8efe5;
  border-color: #ccd8c5;
  color: var(--forest);
}
.stage {
  position: relative;
  min-height: 420px;
  margin: 16px 0;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(150deg, #e6ead9, #d6dfcc 55%, #cbd7c4);
  border: 1px solid #cad3bf;
  display: grid;
  place-items: center;
}
.stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
.stage-placeholder {
  position: relative;
  margin: 0;
  padding: 20px;
  color: #4b624f;
  font-size: 13px;
  text-align: center;
  max-width: 34ch;
}
.fallback {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid #d8c79d;
  border-radius: 9px;
  background: #fbf4df;
}
.fallback h2 {
  font-size: 14px;
  margin-bottom: 6px;
}
.fallback-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 12px;
}
.controls {
  display: flex;
  align-items: end;
  gap: 9px;
  flex-wrap: wrap;
  padding-top: 4px;
}
.control {
  appearance: none;
  min-height: 44px;
  border: 1px solid #bfc9b8;
  border-radius: 8px;
  padding: 9px 12px;
  background: #fff;
  color: var(--forest);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.control:hover {
  background: #edf2e8;
}
.control:focus-visible,
.agent:focus-visible,
.orbit:focus-visible {
  outline: 3px solid #7a9a7d;
  outline-offset: 2px;
}
.control.primary {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
}
.control.primary:hover {
  background: #2b513d;
}
.control[aria-pressed='true'] {
  background: #e4ecdf;
  border-color: #789174;
}
.field {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--moss);
  min-height: 44px;
}
.field select {
  min-height: 44px;
}
.orbit-field {
  flex: 1 1 170px;
}
.orbit {
  accent-color: var(--forest);
  min-width: 90px;
  max-width: 150px;
}
.orbit-field output {
  font-variant-numeric: tabular-nums;
  color: var(--forest);
  min-width: 34px;
}
.sidebar {
  padding: 16px;
  display: grid;
  gap: 14px;
  min-width: 0;
}
.side-card {
  border-radius: 10px;
  padding: 13px;
  box-shadow: none;
  background: #fdfbf4;
}
.sidebar-copy {
  margin: 8px 0 12px;
  line-height: 1.45;
}
.agent-list {
  display: grid;
  gap: 7px;
}
.agent {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 44px;
  padding: 7px;
  text-align: left;
  border: 1px solid #ddd8c8;
  border-radius: 8px;
  background: #fff;
  color: var(--forest);
  font: inherit;
  cursor: pointer;
}
.agent:hover {
  background: #f7f4e9;
}
.agent[aria-pressed='true'] {
  border-color: #6e8a70;
  background: #edf3e8;
  box-shadow: inset 3px 0 var(--forest);
}
.agent-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #e3ebdc;
  color: var(--forest);
  font-weight: 800;
}
.agent-copy {
  display: grid;
  min-width: 0;
}
.agent-name {
  font-size: 13px;
  font-weight: 700;
}
.agent-role {
  font-size: 11px;
  color: #647466;
}
.agent-status {
  font-size: 10px;
  padding: 3px 7px;
}
.agent-status[data-status='working'] {
  background: #dfeadd;
  border-color: #9eb89b;
}
.agent-status[data-status='walking'] {
  background: #eee7d4;
  border-color: #cdbb8f;
}
.agent-status[data-status='speaking'] {
  background: #e8e2d2;
  border-color: #b9a979;
}
#detail {
  margin: 6px 0 0;
  font-size: 12px;
  color: #4f6254;
  overflow-wrap: anywhere;
}
.metrics {
  font-size: 12px;
  color: #4f6254;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.footer {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: #5d7061;
}
.footer p {
  margin-bottom: 2px;
}
@media (max-width: 820px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .sidebar {
    order: 2;
  }
  .stage {
    min-height: 320px;
  }
  .sidebar {
    grid-template-columns: 1fr 1fr;
  }
  .sidebar > section:first-child,
  .sidebar-heading,
  .sidebar-copy {
    grid-column: 1/-1;
  }
}
@media (max-width: 520px) {
  .page {
    padding: 15px 13px 24px;
  }
  .stage {
    min-height: 320px;
  }
  .sidebar {
    grid-template-columns: 1fr;
  }
  .sidebar > section:first-child {
    grid-column: auto;
  }
  .controls {
    gap: 8px;
  }
  .control,
  .field {
    flex: 1 1 calc(50% - 8px);
  }
  .orbit-field {
    flex-basis: 100%;
  }
  .orbit {
    max-width: none;
    flex: 1;
  }
  .fallback-list {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms;
  }
}
