/* ReMCP application system. Shared tokens inherit the public-site palette. */
:root {
  --app-bg: #111410;
  --app-panel: #191d17;
  --app-border: #30372b;
  --app-muted: #a0aa95;
  --app-accent: #c1f17a;
}
.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;
}
.ui-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: middle;
}
select,
input {
  color: var(--ink);
  background: var(--app-panel);
  border: 1px solid var(--app-border);
  border-radius: 7px;
  padding: 10px 12px;
  min-height: 42px;
  font: inherit;
  font-size: 13px;
}
select {
  cursor: pointer;
  padding-right: 28px;
}
.error:empty {
  display: none;
}
.login-layout {
  width: min(1160px, 100%);
  margin: auto;
  padding: 90px 24px 110px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 100px;
  align-items: center;
  min-height: calc(100svh - 240px);
}
.login-story h1 {
  font-weight: 500;
  font-size: clamp(48px, 5.5vw, 76px);
  line-height: 1.06;
  letter-spacing: -0.06em;
  margin: 25px 0;
}
.login-story h1 span {
  color: var(--accent);
}
.login-story > p:not(.eyebrow) {
  max-width: 380px;
  font-size: 17px;
  color: var(--muted);
  line-height: 1.7;
}
.login-benefits {
  display: grid;
  gap: 20px;
  margin-top: 36px;
  font-size: 14px;
}
.login-benefits span {
  display: flex;
  align-items: center;
  gap: 13px;
}
.login-benefits .ui-icon {
  color: var(--accent);
}
.login-card {
  border: 1px solid var(--app-border);
  border-radius: 16px;
  padding: 40px;
  background: var(--app-panel);
  box-shadow: 0 20px 70px #0002;
}
.login-emblem {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 14px;
  font-size: 44px;
  margin-bottom: 32px;
}
.login-card .eyebrow {
  font: 10px monospace;
  letter-spacing: 0.1em;
}
.login-card h2 {
  font-size: 30px;
  letter-spacing: -0.045em;
  font-weight: 500;
  margin: 14px 0;
}
.login-card .muted {
  font-size: 14px;
  line-height: 1.7;
}
.login-card .provider-stack {
  width: 100%;
  margin: 28px 0 20px;
  gap: 12px;
}
.login-card .provider-button {
  min-height: 50px;
}
.login-legal {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 26px;
}
.login-legal a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.login-trust {
  display: flex;
  gap: 8px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 11px;
}
.login-trust .ui-icon {
  width: 15px;
  height: 15px;
}
.not-found {
  max-width: 750px;
  margin: auto;
  padding: 130px 24px;
}
.not-found h1 {
  font-size: 56px;
  letter-spacing: -0.05em;
}
.not-found .text-link {
  margin-left: 25px;
}
.workspace-app {
  background: var(--app-bg);
}
.workspace-app button,
.workspace-app a {
  transition:
    background-color 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease;
}
.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 250px;
  background: #151913;
  border-right: 1px solid var(--app-border);
  padding: 30px 20px 20px;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.app-sidebar > .wordmark {
  margin-left: 12px;
  font-size: 25px;
}
.workspace-switch {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 14px 10px;
  border: 1px solid var(--app-border);
  border-radius: 9px;
  margin-top: 35px;
}
.workspace-avatar {
  background: #303c25;
  color: var(--accent);
  border: 1px solid #49583a;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 15px;
}
.workspace-switch strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}
.workspace-switch small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.nav-group-title {
  font: 9px monospace;
  letter-spacing: 0.14em;
  color: #909b85;
  margin: 30px 12px 14px;
}
.app-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.app-sidebar nav a,
.sidebar-bottom > a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 12px;
  color: #a6af9c;
  font-size: 13px;
  border-radius: 7px;
}
.app-sidebar nav a:hover,
.sidebar-bottom > a:hover {
  background: #242b1e;
  color: var(--ink);
}
.app-sidebar nav a[aria-current] {
  background: #2b3721;
  color: var(--accent);
}
.nav-plus {
  margin-left: auto;
  font-size: 16px;
  opacity: 0.6;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 30px;
}
.sidebar-bottom > a {
  font-size: 12px;
}
.sidebar-brand-note {
  border-top: 1px solid var(--line);
  margin-top: 15px;
  padding: 22px 10px 0;
  font: 8px monospace;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.sidebar-brand-note i,
.live-label i {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 7px;
}
.app-body {
  margin-left: 250px;
  min-width: 0;
}
.app-topbar {
  min-height: 76px;
  padding: 0 42px;
  border-bottom: 1px solid var(--app-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.breadcrumbs {
  color: var(--muted);
  font-size: 12px;
}
.breadcrumbs span {
  margin: 0 15px;
  color: #58624e;
}
.breadcrumbs strong {
  font-weight: 400;
  color: var(--ink);
}
.app-topbar > div {
  display: flex;
  align-items: center;
  gap: 20px;
}
.back-to-site {
  color: var(--muted);
  font-size: 12px;
}
.account-button {
  border: 1px solid var(--line);
  background: var(--app-panel);
  color: var(--muted);
  width: 36px;
  height: 36px;
  border-radius: 9px;
}
.account-button:hover {
  color: var(--accent);
}
.app-main {
  max-width: 1460px;
  padding: 46px 42px 20px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  align-items: center;
  margin-bottom: 36px;
}
.page-heading .eyebrow {
  font: 9px monospace;
  letter-spacing: 0.12em;
  margin: 0 0 14px;
}
.page-heading h1 {
  font-size: clamp(30px, 3vw, 44px);
  letter-spacing: -0.045em;
  font-weight: 500;
  line-height: 1.13;
  margin: 0 0 13px;
}
.title-dot {
  color: var(--accent);
}
.page-heading .muted {
  font-size: 14px;
  margin: 0;
}
.page-heading > .button {
  white-space: nowrap;
}
.workspace-app .button {
  min-height: 44px;
  font-size: 12px;
  padding: 12px 16px;
  font-weight: 600;
}
.workspace-app .button .ui-icon {
  width: 16px;
  height: 16px;
}
.workspace-app .button span {
  font-size: inherit;
  margin: 0;
}
.section-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.live-label {
  color: var(--app-muted);
  font: 10px monospace;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.select-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}
.select-label select {
  max-width: 190px;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.metric-card {
  background: var(--app-panel);
  padding: 22px;
  border: 1px solid var(--app-border);
  border-radius: 10px;
}
.metric-card > span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--app-muted);
}
.metric-card .ui-icon {
  width: 16px;
  height: 16px;
  color: #8a997c;
}
.metric-card > strong {
  display: block;
  font-size: 36px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.04em;
  margin: 26px 0 12px;
  font-variant-numeric: tabular-nums;
}
.metric-card > small {
  font-size: 10px;
  color: var(--muted);
  display: block;
  min-height: 30px;
}
.metric-card:first-child {
  border-color: #4b5c3a;
  background: linear-gradient(120deg, #28341f, #1b2117);
}
.metric-card:first-child > strong {
  color: var(--accent);
}
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(270px, 1fr);
  gap: 22px;
  margin-bottom: 24px;
}
.app-panel {
  background: var(--app-panel);
  border: 1px solid var(--app-border);
  border-radius: 11px;
  padding: 25px;
  min-width: 0;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 24px;
}
.panel-heading h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.02em;
  font-weight: 500;
}
.panel-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.panel-heading > .ui-icon {
  color: var(--muted);
}
.panel-heading .text-link {
  font-size: 11px;
}
.chart-legend {
  display: flex;
  gap: 12px;
  font-size: 9px;
  color: var(--muted);
}
.chart-legend i {
  display: inline-block;
  background: var(--accent);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  margin-right: 4px;
}
.chart-legend .failed-dot {
  background: #ee9684;
}
.usage-chart {
  min-height: 190px;
}
.usage-chart svg {
  display: block;
  width: 100%;
  height: auto;
}
.chart-grid-line {
  stroke: #333c2c;
  stroke-width: 1;
  stroke-dasharray: 3 5;
}
.chart-axis {
  fill: #a0aa95;
  font: 10px monospace;
}
.chart-bar-success {
  fill: var(--accent);
}
.chart-bar-failed {
  fill: #ee9684;
}
.chart-summary {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 10px;
}
.tool-row {
  margin: 22px 0;
}
.tool-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  margin-bottom: 10px;
}
.tool-label code {
  font-size: 11px;
  overflow-wrap: anywhere;
}
.tool-label span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tool-bar {
  width: 100%;
  height: 5px;
}
.tool-track {
  fill: #30382a;
}
.empty-state {
  text-align: center;
  padding: 32px 20px;
  max-width: 550px;
  margin: auto;
}
.empty-state > .ui-icon,
.empty-symbol {
  display: block;
  color: #8a9c77;
  width: 30px;
  height: 30px;
  margin: 0 auto 15px;
  font-size: 28px;
}
.empty-state h3 {
  font-size: 16px;
  font-weight: 500;
  margin: 12px 0;
}
.empty-state p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  max-width: 350px;
  margin: 0 auto 18px;
}
.tool-breakdown .empty-state {
  padding: 35px 0;
}
.tool-breakdown .empty-state p {
  max-width: 230px;
}
.onboarding {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px;
  border: 1px solid #455735;
  border-radius: 10px;
  background: radial-gradient(at 0% 0%, #344526, #1b2217);
  margin-bottom: 24px;
}
.onboarding .eyebrow {
  font: 8px monospace;
  margin: 0 0 10px;
}
.onboarding h2 {
  font-size: 21px;
  letter-spacing: -0.035em;
  font-weight: 500;
  margin: 0 0 8px;
}
.onboarding p:not(.eyebrow) {
  color: var(--muted);
  font-size: 12px;
  max-width: 480px;
  margin: 0;
}
.onboarding-icon {
  color: var(--accent);
  font-size: 44px;
}
.onboarding .button {
  flex-shrink: 0;
  margin-left: auto;
}
.table-scroll {
  width: 100%;
  overflow-x: auto;
}
.activity-table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 12px;
}
.activity-table th {
  color: var(--muted);
  font-weight: 400;
  font: 10px monospace;
  padding: 0 10px 15px;
  white-space: nowrap;
}
.activity-table td {
  border-top: 1px solid var(--line);
  padding: 18px 10px;
}
.activity-table td:first-child {
  width: 45%;
}
.activity-table code {
  font-size: 12px;
}
.activity-table small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 6px;
  overflow-wrap: anywhere;
}
.activity-table time,
.duration-cell {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  white-space: nowrap;
  font-size: 11px;
}
.badge {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  white-space: nowrap;
  border: 1px solid #46503d;
  border-radius: 5px;
  color: #aeb7a4;
  font-size: 10px;
  padding: 4px 7px;
}
.badge-success {
  color: #c1f17a;
  border-color: #485c33;
  background: #293820;
}
.badge-failed {
  color: #ffb4a5;
  border-color: #654238;
  background: #392820;
}
.activity-filters {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.results-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 22px;
  color: var(--muted);
  font-size: 10px;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 10px;
}
.pagination span {
  color: var(--muted);
  font-size: 11px;
}
.pagination .button {
  min-height: 36px;
  padding: 8px 12px;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
}
.search-field > .ui-icon {
  color: var(--muted);
}
.search-field input {
  min-width: 260px;
}
.devices-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.devices-grid > .empty-state {
  grid-column: 1/-1;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  width: 100%;
  max-width: none;
  padding: 70px 24px;
}
.device-card {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--app-border);
  background: var(--app-panel);
  border-radius: 12px;
}
.device-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.device-platform-icon {
  color: var(--accent);
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background: #2c3823;
  display: grid;
  place-items: center;
  font: 22px monospace;
}
.device-card h2 {
  font-size: 18px;
  font-weight: 500;
  margin: 23px 0 5px;
  overflow-wrap: anywhere;
}
.device-host {
  font: 11px monospace;
  color: var(--muted);
  margin: 0;
  overflow-wrap: anywhere;
}
.device-facts {
  border-top: 1px solid var(--line);
  margin: 22px 0 18px;
  padding-top: 12px;
}
.device-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
  font-size: 10px;
}
.device-facts dt {
  color: var(--muted);
}
.device-facts dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}
.revoke-button {
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: #dfa397;
  font-size: 11px;
  min-height: 32px;
}
.revoke-button:hover {
  color: #ffc1b3;
}
.sandbox-note {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
  margin-top: 35px;
}
.sandbox-note > .ui-icon {
  color: var(--muted);
  margin-top: 4px;
}
.sandbox-note h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 500;
}
.sandbox-note p {
  color: var(--muted);
  max-width: 650px;
  font-size: 12px;
  margin: 0;
}
.connect-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: start;
}
.pairing-studio {
  padding: 0;
  overflow: hidden;
}
.studio-top {
  padding: 20px 26px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  background: #1e2519;
}
.studio-top > span:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
  font: 9px monospace;
  letter-spacing: 0.08em;
  color: #c2cbb8;
}
.studio-top .ui-icon {
  color: var(--accent);
  width: 16px;
  height: 16px;
}
.setup-steps {
  list-style: none;
  padding: 28px;
  margin: 0;
}
.setup-steps > li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 16px;
  position: relative;
  padding-bottom: 35px;
}
.setup-steps > li:last-child {
  padding-bottom: 0;
}
.setup-steps > li > span {
  font: 10px monospace;
  display: grid;
  place-items: center;
  height: 26px;
  border: 1px solid #52633f;
  color: var(--accent);
  border-radius: 50%;
  background: #29351f;
}
.setup-steps h2 {
  margin: 3px 0 9px;
  font-size: 16px;
  font-weight: 500;
}
.setup-steps p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.platform-options {
  display: flex;
  gap: 8px;
  margin: 20px 0 12px;
}
.platform-options button {
  border: 1px solid var(--line-strong);
  background: var(--app-bg);
  border-radius: 7px;
  color: var(--muted);
  padding: 10px 18px;
  font-size: 12px;
}
.platform-options button[aria-pressed="true"] {
  color: var(--accent);
  border-color: #7c9b59;
  background: #28351e;
}
.setup-steps .small-note {
  font-size: 10px;
  margin-bottom: 0;
}
.pair-placeholder {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px dashed var(--line-strong);
  background: var(--app-bg);
  border-radius: 9px;
  margin: 20px 0;
  padding: 20px;
}
.pair-placeholder .ui-icon {
  color: #8fa27b;
  margin-bottom: 12px;
}
.pair-placeholder p {
  margin: 0;
  font-size: 11px;
}
.pair-code-heading {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.pair-code-heading > span {
  font: 8px monospace;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.pair-code-heading > strong {
  font: 20px monospace;
  letter-spacing: 0.15em;
  color: var(--accent);
}
.pair-timer {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 12px 0 22px;
  font-size: 10px;
  color: var(--muted);
}
.pair-timer time {
  white-space: nowrap;
  color: var(--accent);
  font: 10px monospace;
}
.pair-complete {
  display: flex;
  gap: 10px;
  padding: 16px;
  border: 1px solid #52683e;
  background: #293820;
  border-radius: 8px;
}

/* The connect page lists machines as they arrive, so the command run on another computer is
   visibly working without anyone refreshing the page. */
.waiting-devices {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 6px;
}
.waiting-device {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}
.waiting-device strong {
  font-weight: 600;
}
.device-history-panel { margin-top: 20px; }
.device-history { display: grid; gap: 10px; margin-top: 12px; }
.history-row { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.02); }
.history-row h3 { margin: 0; font-size: 14px; }
.history-row .badge { justify-self: start; }
.pair-fallback {
  margin-top: 18px;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}
.pair-fallback summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
}
.pair-fallback > p {
  margin: 10px 0 12px;
  color: var(--muted);
  font-size: 12px;
}
.pair-complete .ui-icon {
  color: var(--accent);
}
.pair-complete strong {
  color: var(--accent);
  font-size: 12px;
}
.pair-complete p {
  margin: 8px 0 0;
}
.pair-complete .text-link {
  font-size: 11px;
}
.endpoint-card .eyebrow {
  font: 8px/1.6 monospace;
  letter-spacing: 0.08em;
  margin-top: 24px;
}
.endpoint-card h2 {
  font-weight: 500;
  font-size: 25px;
  line-height: 1.18;
  letter-spacing: -0.04em;
}
.endpoint-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.endpoint-card .endpoint-facts {
  margin-top: 22px;
  font-size: 11px;
}
.endpoint-card .text-link {
  font-size: 11px;
}
.connection-tip {
  padding: 26px;
}
.connection-tip > .ui-icon {
  color: var(--accent);
}
.connection-tip h3 {
  font-size: 14px;
  font-weight: 500;
}
.connection-tip p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.small-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
  margin-top: 22px;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.settings-grid .muted {
  font-size: 13px;
  line-height: 1.8;
}
.settings-grid .text-link {
  display: flex;
  font-size: 12px;
}
.settings-list {
  margin: 25px 0;
}
.settings-list > div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 15px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.settings-list dt {
  color: var(--muted);
}
.settings-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.error-banner {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #755044;
  background: #382921;
  color: #ffc2b3;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 26px;
}
.error-banner button {
  border: 1px solid #9b6a5b;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  padding: 6px 10px;
  white-space: nowrap;
}
.revoke-dialog {
  border: 1px solid #555f49;
  border-radius: 14px;
  background: var(--app-panel);
  color: var(--ink);
  padding: 30px;
  width: min(480px, calc(100% - 32px));
  box-shadow: 0 40px 150px #0009;
}
.revoke-dialog::backdrop {
  background: #060805ba;
  backdrop-filter: blur(4px);
}
.revoke-dialog h2 {
  font-weight: 500;
  font-size: 25px;
  letter-spacing: -0.03em;
}
.revoke-dialog p {
  font-size: 13px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.dialog-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 28px;
}
.workspace-app .danger-button {
  background: #f5ad9b;
  border-color: #f5ad9b;
  color: #341d17;
}
.app-footer {
  display: flex;
  gap: 20px;
  padding: 40px 0 0;
  margin-top: 30px;
  font-size: 10px;
  color: #8a957e;
}
.app-footer > span {
  margin-right: auto;
}
@media (min-width: 1600px) {
  .app-main {
    padding-top: 60px;
  }
  .usage-chart {
    min-height: 240px;
  }
}
@media (max-width: 1250px) {
  .app-sidebar {
    width: 220px;
    padding-inline: 14px;
  }
  .app-body {
    margin-left: 220px;
  }
  .app-main {
    padding: 32px 25px 20px;
  }
  .app-topbar {
    padding-inline: 25px;
  }
  .metric-grid {
    gap: 10px;
  }
  .metric-card {
    padding: 18px;
  }
  .devices-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .section-toolbar {
    flex-wrap: wrap;
  }
  .connect-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .connect-aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .overview-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(230px, 1fr);
  }
}
@media (max-width: 1000px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .onboarding {
    flex-wrap: wrap;
  }
  .onboarding .button {
    margin-left: 0;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .login-layout {
    gap: 45px;
  }
  .login-card {
    padding: 28px;
  }
  .page-heading {
    flex-wrap: wrap;
  }
  .back-to-site {
    display: none;
  }
}
@media (max-width: 760px) {
  .app-sidebar {
    position: relative;
    inset: auto;
    width: 100%;
    padding: 18px 18px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .app-sidebar > .wordmark {
    font-size: 21px;
    margin-left: 0;
  }
  .workspace-switch,
  .nav-group-title,
  .sidebar-bottom {
    display: none;
  }
  .app-sidebar nav {
    flex-direction: row;
    margin-top: 18px;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
  }
  .app-sidebar nav a {
    flex-shrink: 0;
    padding: 10px 12px;
    font-size: 11px;
    gap: 6px;
  }
  .app-sidebar nav .ui-icon {
    width: 15px;
    height: 15px;
  }
  .nav-plus {
    display: none;
  }
  .app-body {
    margin-left: 0;
  }
  .app-topbar {
    min-height: 56px;
    padding: 0 20px;
  }
  .app-main {
    padding: 28px 18px 20px;
  }
  .page-heading {
    gap: 18px;
    margin-bottom: 26px;
  }
  .page-heading h1 {
    font-size: 32px;
  }
  .page-heading .muted {
    font-size: 12px;
    max-width: 360px;
    line-height: 1.7;
  }
  .filters {
    gap: 8px;
  }
  .select-label {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    font-size: 10px;
  }
  .select-label select {
    font-size: 11px;
    padding: 9px;
    min-height: 39px;
    max-width: 140px;
  }
  .metric-card > strong {
    font-size: 30px;
  }
  .metric-card > span {
    font-size: 11px;
  }
  .metric-card {
    padding: 17px;
  }
  .app-panel {
    padding: 20px;
  }
  .chart-legend {
    font-size: 8px;
    gap: 8px;
  }
  .activity-table th {
    font-size: 9px;
  }
  .activity-table td {
    padding: 15px 8px;
  }
  .activity-table code {
    font-size: 10px;
  }
  .activity-table time {
    font-size: 9px;
  }
  .activity-table {
    min-width: 420px;
  }
  .devices-grid {
    grid-template-columns: 1fr;
  }
  .search-field input {
    min-width: 0;
    width: 200px;
  }
  .search-field > .ui-icon {
    display: none;
  }
  .connect-aside {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .setup-steps {
    padding: 22px 18px;
  }
  .setup-steps > li {
    gap: 12px;
    grid-template-columns: 22px minmax(0, 1fr);
  }
  .setup-steps > li > span {
    height: 22px;
    font-size: 9px;
  }
  .platform-options button {
    padding: 9px 12px;
    font-size: 11px;
  }
  .pairing-studio {
    padding: 0;
  }
  .studio-top {
    padding: 18px;
  }
  .studio-top .badge {
    font-size: 8px;
  }
  .pair-code-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .pair-timer {
    flex-wrap: wrap;
  }
  .onboarding {
    padding: 22px;
    gap: 14px;
  }
  .onboarding-icon {
    display: none;
  }
  .results-line {
    font-size: 9px;
  }
  .app-footer {
    font-size: 8px;
    gap: 12px;
  }
  .login-layout {
    grid-template-columns: 1fr;
    gap: 35px;
    padding: 45px 20px 60px;
  }
  .login-story h1 {
    font-size: 49px;
  }
  .login-story h1 br {
    display: none;
  }
  .login-story .login-benefits {
    display: none;
  }
  .login-story > p:not(.eyebrow) {
    font-size: 14px;
  }
  .login-story h1 span {
    display: block;
  }
  .login-story {
    max-width: 500px;
    margin: auto;
  }
  .login-card {
    width: 100%;
    max-width: 500px;
    margin: auto;
  }
  .login-card h2 {
    font-size: 28px;
  }
  .not-found h1 {
    font-size: 42px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .metric-grid,
  .connect-layout,
  .devices-grid,
  .settings-grid {
    animation: workspace-enter 0.35s ease-out both;
  }
  @keyframes workspace-enter {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Observability: five live signals, threshold breaches, and roomier fact labels. */
.metric-grid.observability-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.observability-table td {
  font-variant-numeric: tabular-nums;
}
.observability-panel .settings-list > div {
  grid-template-columns: 120px minmax(0, 1fr);
}
.breaches {
  --breach-border: #755044;
  --breach-bg: #382921;
  --breach-ink: #ffc2b3;
  border: 1px solid var(--breach-border);
  border-radius: 11px;
  background: var(--breach-bg);
  color: var(--breach-ink);
  padding: 20px 24px;
  margin-bottom: 22px;
}
.breaches h2 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.breaches ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  font-size: 12px;
  line-height: 1.6;
}
.breaches .small-note {
  color: inherit;
  opacity: 0.8;
  margin-top: 14px;
}
/* All-clear is the normal state; it should read as calm confirmation, not as a warning. */
.breaches.all-clear {
  --breach-border: #2f4a3c;
  --breach-bg: #17251d;
  --breach-ink: #a9dcc0;
}
.breaches.all-clear ul:empty {
  display: none;
}
.breaches.all-clear h2::before {
  content: "✓";
  margin-right: 8px;
  font-size: 14px;
}
@media (max-width: 1250px) {
  .metric-grid.observability-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 1000px) {
  .metric-grid.observability-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .observability-table {
    min-width: 640px;
  }
}

/* A machine that cannot run tools right now: visible, but quieter than an error banner. */
.device-warning {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid #755044;
  background: #382921;
  color: #ffc2b3;
  font-size: 12px;
  line-height: 1.5;
}
.device-warning strong {
  font-weight: 600;
}

/* Consent screen: one command, one button, nothing overlapping. */
.connect-steps { list-style:none; margin:0 0 18px; padding:0; display:grid; gap:14px; }
.connect-steps > li { display:flex; gap:10px; align-items:flex-start; }
.connect-steps > li > span { flex:none; width:20px; height:20px; border-radius:50%; border:1px solid var(--line); display:grid; place-items:center; font-size:11px; color:var(--muted); }
.connect-steps p { margin:0 0 8px; }
.command-row { display:flex; gap:8px; align-items:center; }
.command-row code { flex:1; min-width:0; overflow-x:auto; white-space:nowrap; padding:10px 12px; border:1px solid var(--line); border-radius:8px; font-size:12px; }
.copy-button { flex:none; border:1px solid var(--line); background:transparent; color:var(--fg); border-radius:8px; padding:8px 12px; font-size:12px; cursor:pointer; }
.copy-button:hover { border-color:var(--accent); color:var(--accent); }
.machines-head { display:flex; justify-content:space-between; gap:12px; align-items:baseline; }
.oauth-actions { margin-top:16px; }
