* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button,
input,
select {
  color: inherit;
}
button {
  background: none;
  border: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
a {
  touch-action: manipulation;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
/* The hidden attribute must win over display rules such as .button's inline-flex. */
[hidden] {
  display: none !important;
}
button:not(:disabled),
a {
  transition:
    background 0.18s,
    color 0.18s,
    border-color 0.18s,
    transform 0.18s;
}
input,
select,
textarea {
  min-width: 0;
  width: 100%;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 12px 14px;
}
input::placeholder {
  color: var(--subtle);
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}
:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.3;
  font-weight: 600;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.35px;
}
h3 {
  font-size: 16px;
  letter-spacing: -0.25px;
}
svg {
  flex-shrink: 0;
  vertical-align: middle;
}
::selection {
  background: #4f46e580;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  min-height: 42px;
}
.button.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: inset 0 1px 0 #ffffff14;
}
.button.primary:hover {
  background: var(--accent-hover);
}
.button.secondary {
  background: #ffffff03;
  border-color: var(--border);
}
.button.secondary:hover {
  background: var(--surface-raised);
  border-color: #454a67;
}
.button.danger {
  background: #40242e;
  border-color: #693344;
  color: #ffbcc8;
}
.button.danger:hover {
  background: #57303f;
}
.button.full {
  width: 100%;
}
.button.small-button {
  padding: 8px 13px;
  min-height: 36px;
  font-size: 12px;
}
.button.large-button {
  padding: 14px 22px;
  min-height: 50px;
  font-size: 14px;
}
.icon-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 7px;
  color: var(--muted);
  flex-shrink: 0;
}
.icon-button:hover {
  color: white;
  background: #ffffff08;
}
.brand {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.9px;
  white-space: nowrap;
}
.brand-light {
  font-weight: 400;
}
.brand-dot {
  color: #8c83ff;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-light);
  font-size: 12px;
  padding: 0;
}
.text-link:hover {
  color: #d5d1ff;
}
.eyebrow {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.8px;
  line-height: 1.6;
}
.muted {
  color: var(--muted);
}
.fine-print {
  font-size: 11px;
  color: var(--muted);
}
.spaced {
  margin-top: 20px;
}
.mono {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-variant-numeric: tabular-nums;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.section-heading p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}
.avatar {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #302840;
  color: #e5cee9;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
.avatar.small {
  width: 30px;
  height: 30px;
  background: #342f48;
}
.avatar.large {
  width: 54px;
  height: 54px;
  font-size: 22px;
}
.green-dot,
.preview-label > span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}
.preview-label {
  display: flex;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #abb2c4;
  padding: 3px 8px;
  border-radius: 5px;
  background: #ffffff04;
  border: 1px solid #323646;
}
.status > span {
  width: 5px;
  height: 5px;
  background: #828a9d;
  border-radius: 50%;
}
.status.running {
  color: #84dfbb;
  border-color: #284839;
  background: #14322755;
}
.status.running > span {
  background: #71dab1;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
}
.field label {
  font-size: 12px;
  font-weight: 500;
}
.field > span {
  color: var(--muted);
  font-size: 11px;
}
.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.label-row .text-link {
  font-size: 11px;
}
.modal {
  width: min(480px, calc(100vw - 32px));
  background: var(--surface);
  color: var(--text);
  padding: 26px;
  border-radius: 14px;
  border: 1px solid #3a3e56;
  box-shadow: 0 30px 90px #0008;
}
.modal::backdrop {
  background: #050610c9;
  backdrop-filter: blur(5px);
}
.modal-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.modal-heading h2 {
  font-size: 21px;
}
.modal-copy {
  color: var(--muted);
  margin-bottom: 22px;
  font-size: 13px;
  line-height: 1.8;
}
.modal-copy strong {
  color: var(--text);
  font-weight: 500;
}
.confirm-cost {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 0;
  border-block: 1px solid var(--border);
  margin-bottom: 12px;
}
.confirm-cost span {
  color: var(--muted);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 26px;
}
.empty-state {
  padding: 70px 20px;
  text-align: center;
  color: var(--muted);
}
.empty-state > svg {
  color: var(--accent-light);
  margin-bottom: 15px;
}
.empty-state h2,
.empty-state h3 {
  color: var(--text);
  margin-bottom: 8px;
}
.empty-state .button {
  margin-top: 20px;
}
.toast {
  position: fixed;
  z-index: 100;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 19px;
  max-width: calc(100vw - 32px);
  border: 1px solid #3f4760;
  border-radius: 10px;
  background: #242a3c;
  box-shadow: 0 10px 40px #0005;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast svg {
  color: var(--success);
}
.toast.error {
  border-color: #5a2b3a;
}
.toast.error svg {
  color: var(--danger);
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 999;
  padding: 12px 20px;
  background: var(--accent);
  transform: translateY(-150%);
}
.skip-link:focus {
  transform: translateY(0);
}
.mobile-only {
  display: none;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.back-link:hover {
  color: white;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

@media (max-width: 760px) {
  h1 {
    font-size: 26px;
  }
  .mobile-only {
    display: inline-flex;
  }
  /* Finger-sized targets on phones. */
  .icon-button {
    width: 40px;
    height: 40px;
  }
  .text-link {
    min-height: 40px;
  }
  .section-heading {
    align-items: flex-start;
  }
  .section-heading > .text-link {
    margin-top: 3px;
    white-space: nowrap;
  }
  .toast {
    width: max-content;
  }
}
.form-error {
  display: none;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #5a2b3a;
  border-radius: 7px;
  background: #2a1520;
  color: var(--danger);
  font-size: 12px;
}
.form-error.visible {
  display: block;
}

/* Shown over the page when a signed-in workspace cannot reach the server (store.js). */
.connection-problem {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px 16px;
  text-align: center;
  background: var(--canvas);
}
.connection-problem > svg {
  color: var(--accent-light);
}
.connection-problem h1 {
  font-size: 22px;
}
.connection-problem p {
  max-width: 420px;
  color: var(--muted);
}
