/* ==========================================================================
   Compute Base — Design System
   Monochrome. Flat. No gradients. No shadows for depth, only for layering.
   ========================================================================== */

:root {
  color-scheme: dark;

  --bg: #000000;
  --surface: #0b0b0b;
  --surface-2: #151515;
  --surface-3: #1f1f1f;

  --line: #242424;
  --line-2: #383838;
  --line-3: #585858;

  --ink: #ffffff;
  --ink-2: #a6a6a6;
  --ink-3: #6b6b6b;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;

  font-family: Inter, "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, system-ui, sans-serif;
  font-synthesis-weight: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
dl,
dd,
figure {
  margin: 0;
}

code,
pre {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

h1 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -.015em;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.25;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.shell {
  width: min(100% - 32px, 720px);
  margin: auto;
  padding: max(28px, env(safe-area-inset-top)) 0 max(64px, env(safe-area-inset-bottom));
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--ink-3);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.muted {
  margin-top: 10px;
  color: var(--ink-2);
  font-size: .9375rem;
}

.fine {
  color: var(--ink-3);
  font-size: .8125rem;
}

.hidden {
  display: none !important;
}

/* ---------------------------------------------------------------- Top bar */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.mark {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: var(--r-md);
}

.brand-subtitle {
  margin-top: 1px;
  color: var(--ink-3);
  font-size: .8125rem;
}

.brand-link:hover .brand-subtitle {
  color: var(--ink-2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Header controls share one size so buttons and the status pill line up.
   min-height is required: the global button rule sets 54px, which would
   otherwise win over height and leave the buttons taller than the pill. */
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-full);
  background: transparent;
  color: var(--ink-2);
  font-size: .8125rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color .14s ease, border-color .14s ease, background .14s ease;
}

.nav-btn:hover {
  border-color: var(--line-3);
  background: var(--surface-2);
  color: var(--ink);
}

.nav-btn.active {
  border-color: var(--ink);
  color: var(--ink);
}

.nav-btn svg {
  flex-shrink: 0;
}

.nav-btn .chevron {
  margin-left: -2px;
  transition: transform .18s ease;
}

.dropdown-trigger[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

/* Hidden by default: the dropdown supersedes it, but tests and no-JS keep it. */
.provider-switch {
  display: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  min-height: 40px;
  flex: 0 0 auto;
  padding: 0 15px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-full);
  color: var(--ink-2);
  font-size: .8125rem;
  font-weight: 650;
  white-space: nowrap;
}

.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: .55;
}

.pill.ready {
  border-color: var(--ink);
  background: var(--ink);
  color: #000;
}

.pill.ready::before {
  opacity: 1;
}

.pill.starting,
.pill.stopping {
  border-color: var(--line-3);
  color: var(--ink);
}

.pill.starting::before,
.pill.stopping::before {
  animation: blink 1.3s ease-in-out infinite;
}

.pill.locked {
  border-color: var(--line-2);
  color: var(--ink-3);
}

@keyframes blink {
  50% {
    opacity: .2;
  }
}

/* --------------------------------------------------------- Provider menu */

.provider-dropdown-container {
  position: relative;
}

.running-indicator-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--r-full);
  background: var(--ink);
  color: #000;
  font-size: .6875rem;
  font-weight: 750;
}

.provider-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 100;
  width: 330px;
  padding: 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: 0 20px 48px rgba(0, 0, 0, .8);
  animation: dropIn .16s ease;
}

@keyframes dropIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .12em;
}

.active-count-text {
  color: var(--ink-2);
  letter-spacing: .04em;
  text-transform: none;
}

.provider-section+.provider-section {
  margin-top: 4px;
}

.provider-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding: 11px 10px;
  border-radius: var(--r-md);
  color: var(--ink);
  text-decoration: none;
  transition: background .12s ease;
}

.provider-item:hover {
  background: var(--surface-2);
}

.provider-item.current {
  background: var(--surface-3);
}

.item-title {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: .9375rem;
  font-weight: 600;
}

.provider-tag {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: .6875rem;
  font-weight: 750;
  letter-spacing: .02em;
}

.provider-item.current .provider-tag {
  border-color: var(--ink);
  background: var(--ink);
  color: #000;
}

.brand-logo {
  display: block;
  width: 100%;
  height: 100%;
}
.provider-tag .brand-logo {
  max-width: 16px;
  max-height: 16px;
}
.running-tag .brand-logo {
  max-width: 20px;
  max-height: 20px;
}
.provider-icon .brand-logo {
  max-width: 24px;
  max-height: 24px;
}
.provider-item.current .provider-tag .brand-logo.gh-logo {
  fill: #000;
}

.slot-selector-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: 16px;
}

.slot-bar-label {
  color: var(--ink-3);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.slot-pills {
  display: flex;
  gap: 6px;
}

.slot-pill {
  appearance: none;
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  font-size: .8125rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all .15s ease;
}

.slot-pill:hover {
  border-color: var(--line-3);
  color: var(--ink);
}

.slot-pill.active {
  background: var(--ink);
  color: #000000;
  border-color: var(--ink);
}

.url-display-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.url-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.url-tag {
  color: var(--ink-3);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.url-field {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--ink);
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .8125rem;
  outline: none;
  padding: 0;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  cursor: pointer;
  white-space: nowrap;
}

.copy-btn svg {
  flex-shrink: 0;
}

.running-card-url {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  margin-bottom: 12px;
  overflow: hidden;
}

.running-card-url .url-code {
  color: var(--ink-2);
  font-size: .75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.provider-badge {
  flex: 0 0 auto;
  color: var(--ink-3);
  font-size: .75rem;
  font-weight: 600;
}

.provider-badge.ready {
  color: var(--ink);
}

.account-sublist {
  padding: 2px 0 2px 51px;
}

.acc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 10px 5px 0;
  color: var(--ink-3);
  font-size: .8125rem;
}

.acc-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-acc {
  display: block;
  padding: 2px 0 6px;
  color: var(--ink-3);
  font-size: .8125rem;
}

/* -------------------------------------------------------------- Surfaces */

.card {
  margin-bottom: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
}

.focus-card {
  border-color: var(--line-2);
}

.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

/* ----------------------------------------------------------------- Intro */

.intro {
  margin-bottom: 32px;
}

.intro h2 {
  font-size: 2.125rem;
}

.intro .muted {
  max-width: 46ch;
  font-size: 1rem;
}

/* --------------------------------------------------------------- Buttons */

button,
.button,
input {
  font: inherit;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 54px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--ink);
  font-size: .9375rem;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease, color .14s ease, opacity .14s ease;
}

button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.primary,
.open {
  background: var(--ink);
  color: #000;
}

.primary:hover:not(:disabled),
.open:hover {
  background: var(--ink-2);
}

.danger {
  border-color: var(--line-3);
  color: var(--ink);
}

.danger:hover {
  background: var(--surface-3);
}

.ghost {
  border-color: var(--line-2);
  color: var(--ink-2);
}

.ghost:hover {
  border-color: var(--line-3);
  background: var(--surface-2);
  color: var(--ink);
}

.compact {
  min-height: 40px;
  padding: 0 16px;
  border-color: var(--line-2);
  color: var(--ink);
  font-size: .875rem;
}

.compact:hover {
  border-color: var(--line-3);
  background: var(--surface-2);
}

.primary.compact,
.open.compact {
  background: var(--ink);
  color: #000;
}

.primary.compact:hover,
.open.compact:hover {
  background: var(--ink-2);
  color: #000;
}

.text-button,
.text-link,
.text-danger {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--line-3);
}

.text-button:hover,
.text-link:hover,
.text-danger:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.text-danger {
  margin-top: 24px;
}

button.is-loading::before {
  content: "";
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  opacity: .7;
  animation: spin .75s linear infinite;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.actions>* {
  flex: 1 1 190px;
}

/* ----------------------------------------------------------------- Forms */

form {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

label {
  color: var(--ink-2);
  font-size: .8125rem;
  font-weight: 650;
}

label+input {
  margin-bottom: 8px;
}

input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  outline: none;
  background: var(--bg);
  color: var(--ink);
  transition: border-color .14s ease;
}

input::placeholder {
  color: var(--ink-3);
}

input:focus {
  border-color: var(--ink);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.form-actions>* {
  flex: 1 1 160px;
}

.setup-command {
  margin: 18px 0 24px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
  color: var(--ink-2);
  font-size: .8125rem;
  line-height: 1.7;
  white-space: pre;
  overflow-x: auto;
}

/* ---------------------------------------------------------- Status block */

.status-layout {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.status-icon {
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  color: var(--ink-3);
  font-size: .8125rem;
  font-weight: 700;
}

.status-icon.ready {
  border-color: var(--ink);
  background: var(--ink);
  color: #000;
}

.status-icon.starting,
.status-icon.stopping {
  border-color: var(--line-3);
  color: transparent;
}

.status-icon.starting::before,
.status-icon.stopping::before {
  content: "";
  width: 17px;
  height: 17px;
  border: 2px solid var(--line-3);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

.duration-timer {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  padding: 5px 13px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-full);
  color: var(--ink-2);
  font-size: .8125rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.activity-spinner {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border: 2px solid var(--line-2);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

.initial-loading {
  display: flex;
  align-items: center;
  gap: 16px;
}

.initial-loading strong {
  display: block;
  font-size: 1rem;
}

.initial-loading p {
  margin-top: 2px;
  color: var(--ink-3);
  font-size: .875rem;
}

/* --------------------------------------------------------------- Stepper */

.progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.progress li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding-top: 12px;
  border-top: 2px solid var(--line);
  color: var(--ink-3);
}

.progress li>span {
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: .625rem;
  font-weight: 750;
}

.progress strong {
  overflow: hidden;
  font-size: .8125rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress li.active {
  border-top-color: var(--ink);
  color: var(--ink);
}

.progress li.done {
  border-top-color: var(--line-3);
  color: var(--ink-2);
}

.progress li.done>span {
  border-color: var(--ink-2);
  background: var(--ink-2);
  color: #000;
}

/* ------------------------------------------------------- Loading + busy */

.loading-panel {
  margin-top: 24px;
}

.loading-line {
  height: 3px;
  overflow: hidden;
  border-radius: var(--r-full);
  background: var(--line);
}

.loading-line span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--ink);
  transition: width .35s ease;
}

.loading-copy {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  color: var(--ink-2);
  font-size: .8125rem;
}

#progressText {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#progressCount {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

#busyPanel {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  color: var(--ink-2);
  font-size: .875rem;
}

/* --------------------------------------------------------- Step tracker */

.stage-tracker {
  margin-top: 24px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface-2);
}

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

.stage-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-3);
  font-size: .875rem;
}

.stage-list .dot {
  display: grid;
  place-items: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  font-size: .625rem;
  font-weight: 750;
}

.stage-list li.done {
  color: var(--ink-2);
}

.stage-list li.done .dot {
  border-color: var(--ink-2);
  background: var(--ink-2);
  color: #000;
}

.stage-list li.active {
  color: var(--ink);
  font-weight: 650;
}

.stage-list li.active .dot {
  border: 2px solid var(--line-2);
  border-top-color: var(--ink);
  animation: spin .75s linear infinite;
}

.stage-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  margin-top: 16px;
  color: var(--ink-3);
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
}

.open-hint {
  margin-top: 14px;
}

.running-skeleton {
  min-height: 150px;
}

@media (prefers-reduced-motion: reduce) {
  .stage-list li.active .dot {
    animation: none;
    border-color: var(--ink);
  }
}

/* --------------------------------------------------------------- Details */

dl,
.details {
  display: grid;
  grid-template-columns: minmax(140px, .8fr) 1.2fr;
  gap: 0 20px;
  margin-top: 26px;
  border-top: 1px solid var(--line);
}

dl div {
  display: contents;
}

dt {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  font-size: .875rem;
}

dd {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: .875rem;
  overflow-wrap: anywhere;
}

dd code {
  color: var(--ink);
  font-size: .8125rem;
}

/* -------------------------------------------------------------- Accounts */

.account-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.system-choice {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin: 18px 0 4px;
}

.system-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 14px 18px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  text-align: left;
}

.system-option:hover {
  border-color: var(--line-3);
  background: var(--surface-2);
}

.system-option.active {
  border-color: var(--ink);
  background: var(--surface-2);
}

.system-option small {
  color: var(--ink-3);
  font-size: .8125rem;
  font-weight: 500;
}

.account-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 68px;
  padding: 14px 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  text-align: left;
}

.account-choice:hover {
  border-color: var(--line-3);
  background: var(--surface-2);
}

.account-choice.active {
  border-color: var(--ink);
  background: var(--surface-2);
}

.account-choice small {
  display: block;
  margin-top: 3px;
  color: var(--ink-3);
  font-size: .8125rem;
  font-weight: 500;
}

.account-choice>span:last-child {
  flex: 0 0 auto;
  color: var(--ink-2);
  font-size: .875rem;
}

.account-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
}

.account-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.account-icon {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink);
}

.account-card strong {
  display: block;
  overflow: hidden;
  font-size: .9375rem;
  text-overflow: ellipsis;
}

.secondary-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* ------------------------------------------------- Provider cards (home) */

.providers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.provider-card {
  display: flex;
  flex-direction: column;
  min-height: 232px;
  margin: 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  transition: border-color .14s ease;
}

.provider-card:hover {
  border-color: var(--line-2);
}

.provider-card h3 {
  margin: 20px 0 8px;
}

.provider-card p {
  color: var(--ink-2);
  font-size: .9375rem;
}

.provider-card .card-cta {
  margin-top: auto;
  padding-top: 24px;
}

.provider-card .card-cta>* {
  width: 100%;
}

.provider-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  color: var(--ink);
  font-size: .8125rem;
  font-weight: 750;
}

.skeleton {
  min-height: 232px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: .5;
  }
}

/* ----------------------------------------------------------------- Error */

.error {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  padding: 18px 20px;
  border: 1px solid var(--ink);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  color: var(--ink);
  font-size: .9375rem;
}

.error::before {
  content: "!";
  flex: 0 0 auto;
  font-weight: 800;
}

/* ------------------------------------------------- Sync Card Widget */

.sync-card {
  margin-top: 16px;
  padding: 18px 24px;
}

.sync-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.sync-status-indicator {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.sync-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background-color .2s ease, box-shadow .2s ease;
}

.sync-dot.in-sync {
  background-color: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.sync-dot.unsynced {
  background-color: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
  animation: pulse-sync 1.8s infinite;
}

.sync-dot.syncing {
  background-color: #3b82f6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
  animation: pulse-sync 0.8s infinite;
}

@keyframes pulse-sync {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(1.15);
  }
}

.sync-status-indicator strong {
  display: block;
  font-size: .9375rem;
  font-weight: 650;
  color: var(--ink);
}

.sync-status-indicator p {
  margin: 2px 0 0;
  font-size: .8125rem;
  color: var(--ink-2);
}

.sync-layout .button.secondary {
  padding: 8px 16px;
  font-size: .875rem;
}

/* ---------------------------------------------------- Running browsers (home) */

.running-section {
  margin-bottom: 36px;
}

.running-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.running-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  min-width: 22px;
  padding: 0 8px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-full);
  background: var(--surface-3);
  color: var(--ink);
  font-size: .75rem;
  font-weight: 700;
}

.running-grid {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.running-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  transition: border-color .14s ease;
}

.running-card:hover {
  border-color: var(--line-2);
}

.running-card.is-active {
  border-color: var(--line-2);
}

.running-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.running-card-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.running-tag {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--ink);
  font-size: .75rem;
  font-weight: 750;
}

.running-card-titles {
  min-width: 0;
}

.running-card-title {
  margin: 0;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

.running-card-sub {
  margin-top: 2px;
  color: var(--ink-3);
  font-size: .8125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg);
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.metric-label {
  color: var(--ink-3);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.metric-value {
  color: var(--ink);
  font-size: .9375rem;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-sub {
  color: var(--ink-3);
  font-size: .75rem;
}

.running-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.no-running-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--ink-2);
}

.no-running-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: .875rem;
}

/* ------------------------------------------------------------ Responsive */

@media (max-width: 560px) {
  .shell {
    width: min(100% - 24px, 720px);
  }

  .card {
    padding: 22px;
  }

  .intro h2 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.375rem;
  }

  .provider-menu {
    width: min(330px, calc(100vw - 32px));
  }

  dl,
  .details {
    grid-template-columns: 1fr;
    gap: 0;
  }

  dt {
    padding-bottom: 0;
    border-bottom: 0;
  }

  dd {
    padding-top: 4px;
  }

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

  .secondary-actions {
    width: 100%;
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before {
    animation: none !important;
    transition: none !important;
  }
}
