:root {
  color-scheme: light dark;
  --bg: #f7f8f6;
  --surface: #fff;
  --fg: #202b2b;
  --muted: #5a6b68;
  --line: #dbe2df;
  --accent: #1f584a;
  --on-accent: #fff;
  --soft: #edf3ef;
  --focus: #2569b4;
  --error: #9e3327;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 100%;
  line-height: 1.6;
  background: var(--bg);
  color: var(--fg);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151c1b;
    --surface: #1c2624;
    --fg: #edf3ef;
    --muted: #a8b9b2;
    --line: #35443e;
    --accent: #b9ddc9;
    --on-accent: #14271e;
    --soft: #25372e;
    --focus: #8dbfff;
    --error: #ffa89a;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151c1b;
  --surface: #1c2624;
  --fg: #edf3ef;
  --muted: #a8b9b2;
  --line: #35443e;
  --accent: #b9ddc9;
  --on-accent: #14271e;
  --soft: #25372e;
  --focus: #8dbfff;
  --error: #ffa89a;
}
:root[data-theme="light"] {
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.65;
}
button,
input,
select {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}
button {
  min-height: 2.8rem;
  padding: 0.65rem 1rem;
  font-weight: 600;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
a {
  color: inherit;
}
.skip-link {
  position: absolute;
  top: -10rem;
  left: 1rem;
  background: var(--surface);
  padding: 0.75rem;
  z-index: 1;
}
.skip-link:focus {
  top: 0.5rem;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 4vw;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.wordmark {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  text-decoration: none;
}
.wordmark span {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0;
  font-weight: 500;
}
.header-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.quiet {
  color: var(--fg);
  background: transparent;
  border-color: transparent;
  font-size: 0.85rem;
}
.quiet:hover {
  background: var(--soft);
}
.layout {
  max-width: 80rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(13rem, 23%) minmax(0, 1fr);
  min-height: 82vh;
}
aside {
  padding: 3rem 2rem;
  border-right: 1px solid var(--line);
}
.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 0.6rem;
}
.steps {
  list-style: none;
  margin: 2rem 0;
  padding: 0;
}
.steps li {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  color: var(--muted);
  margin-bottom: 1.8rem;
  font-size: 0.9rem;
}
.steps li[aria-current="step"],
.steps li[data-complete="true"] {
  color: var(--fg);
}
.step-number {
  display: grid;
  place-items: center;
  flex: 0 0 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-size: 0.75rem;
}
[aria-current="step"] .step-number {
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent);
}
[data-complete="true"] .step-number {
  color: var(--accent);
  background: var(--soft);
}
.steps small {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 0.2rem;
}
.preview-note {
  font-size: 0.78rem;
  color: var(--fg);
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}
.preview-note span {
  color: var(--muted);
}
main {
  width: 100%;
  max-width: 49rem;
  padding: 3rem clamp(1.3rem, 5vw, 4.5rem);
}
h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  line-height: 1.16;
  font-weight: 600;
  letter-spacing: -0.045em;
  margin: 0;
}
.intro {
  color: var(--muted);
  margin-top: 1rem;
  max-width: 34rem;
}
#status {
  min-height: 1.6rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 1.5rem 0 0.6rem;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: clamp(1.3rem, 3vw, 2rem);
}
h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.035em;
  margin: 0 0 1rem;
  overflow-wrap: anywhere;
}
.panel p {
  color: var(--muted);
}
.primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  width: 100%;
  margin-top: 1.6rem;
}
.primary:hover {
  filter: brightness(0.93);
}
.secondary {
  color: var(--fg);
  background: var(--surface);
  margin-top: 1rem;
}
.secondary:hover {
  background: var(--soft);
}
.panel .fine-print {
  font-size: 0.78rem;
  margin: 1.2rem 0 0;
}
label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-top: 1.6rem;
  margin-bottom: 0.5rem;
}
input,
select {
  background: var(--bg);
  color: var(--fg);
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.8rem;
}
.field-help {
  font-size: 0.78rem;
  margin-top: 0.5rem;
}
.identity {
  color: var(--fg);
  overflow-wrap: anywhere;
}
.workspace-details {
  font-size: 0.82rem;
  margin: 1.4rem 0;
}
dt {
  color: var(--muted);
}
dd {
  margin: 0.25rem 0 0;
  font-family: ui-monospace, monospace;
  overflow-wrap: anywhere;
}
.notice {
  background: var(--soft);
  border-radius: 0.6rem;
  padding: 1rem 1.2rem;
}
.notice h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
}
.notice p {
  font-size: 0.85rem;
  margin: 0.4rem 0 0;
}
.error-panel #error-message {
  color: var(--error);
}
footer {
  font-size: 0.75rem;
  color: var(--muted);
  padding-top: 2rem;
}
.tenant-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.tenant-list li {
  margin: 0.6rem 0;
}
.tenant-list button {
  text-align: left;
  width: 100%;
  color: var(--fg);
  background: var(--bg);
  overflow-wrap: anywhere;
}
.tenant-list button:hover {
  background: var(--soft);
}
#setup-form,
#setup-review,
#setup-detail {
  margin-top: 1.5rem;
}
.workspace-section {
  border-top: 1px solid var(--line);
  margin-top: 1.8rem;
  padding-top: 1.6rem;
}
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.section-heading h3 {
  font-size: 1rem;
  margin: 0;
}
.status-pill {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999rem;
  color: var(--muted);
  font-size: 0.72rem;
  padding: 0.25rem 0.65rem;
}
.credential-notice {
  color: var(--fg);
  font-size: 0.85rem;
  margin-top: 1rem;
}
.secret-reveal {
  background: var(--soft);
  border: 1px solid var(--accent);
  border-radius: 0.6rem;
  margin-top: 1.4rem;
  padding: clamp(1rem, 3vw, 1.4rem);
}
.secret-reveal h4,
.credential-list-heading h4 {
  font-size: 0.95rem;
  margin: 0;
}
.secret-reveal p {
  font-size: 0.85rem;
}
.secret-value {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  display: block;
  font-size: 0.78rem;
  margin-top: 1rem;
  overflow-wrap: anywhere;
  padding: 0.8rem;
  user-select: all;
}
.button-row,
.credential-confirmation {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}
.primary.compact,
.secondary.compact,
.danger-button,
.danger-link {
  margin-top: 0;
  width: auto;
}
.credential-list-heading {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
  margin-top: 1.8rem;
}
.credential-list-heading p {
  font-size: 0.8rem;
  margin: 0;
}
.credential-list {
  list-style: none;
  margin: 0.8rem 0 0;
  padding: 0;
}
.credential-card {
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  margin-top: 0.75rem;
  padding: 1rem;
}
.credential-card-heading {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}
.credential-card code {
  display: block;
  font-size: 0.75rem;
  margin-top: 0.55rem;
  overflow-wrap: anywhere;
}
.credential-card p {
  font-size: 0.78rem;
  margin: 0.55rem 0 0;
  overflow-wrap: anywhere;
}
.danger-link {
  background: transparent;
  border-color: transparent;
  color: var(--error);
  min-height: 2.4rem;
  padding-left: 0;
  padding-right: 0;
}
.danger-button {
  background: var(--error);
  border-color: var(--error);
  color: var(--surface);
}
.credential-confirmation {
  align-items: flex-start;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.credential-confirmation p {
  flex: 1 1 100%;
  margin: 0;
}
#credential-recovery {
  margin-top: 1rem;
}
#credential-recovery strong {
  font-size: 0.85rem;
}
.billing-notice {
  color: var(--fg);
  font-size: 0.85rem;
  margin-top: 1rem;
}
.plan-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}
.plan-card {
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1rem;
}
.plan-card h4,
.overage-form h4,
#billing-pending h4 {
  font-size: 1rem;
  margin: 0;
}
.plan-card p,
.overage-form p,
#billing-pending p {
  font-size: 0.82rem;
  margin: 0.55rem 0 0;
}
.plan-card .plan-action {
  margin-top: auto;
}
#billing-pending,
#billing-management {
  margin-top: 1rem;
}
.overage-form {
  border-top: 1px solid var(--line);
  margin-top: 1.4rem;
  padding-top: 1.4rem;
}
.checkbox-row {
  align-items: flex-start;
  display: flex;
  gap: 0.65rem;
}
.checkbox-row input {
  flex: 0 0 auto;
  min-height: 1.25rem;
  width: 1.25rem;
}
.usage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.usage-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  min-width: 0;
  padding: 0.9rem;
}
.usage-card span,
.usage-card small {
  color: var(--muted);
  display: block;
  font-size: 0.72rem;
}
.usage-card strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0.25rem;
  overflow-wrap: anywhere;
}
.usage-card progress {
  accent-color: var(--accent);
  display: block;
  height: 0.45rem;
  margin: 0.75rem 0 0.45rem;
  width: 100%;
}
#tenant-setup h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.record-id {
  font:
    0.75rem ui-monospace,
    monospace;
  overflow-wrap: anywhere;
}
body[data-phase="workspace"] main > .eyebrow,
body[data-phase="workspace"] main > .intro {
  display: none;
}
body[data-phase="workspace"] #status {
  margin-top: 0.25rem;
}
body[data-phase="workspace"] main {
  padding-top: 2rem;
}
#workspace > .eyebrow {
  margin-bottom: 0.25rem;
}
#workspace > h2 {
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}
#workspace > p {
  margin: 0.4rem 0;
  font-size: 0.85rem;
}
#workspace .workspace-details {
  margin: 0.6rem 0 1.3rem;
  font-size: 0.72rem;
}
.sdk-example {
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.75rem;
  line-height: 1.6;
}
@media (max-width: 48rem) {
  .layout {
    display: block;
  }
  aside {
    padding: 1.5rem 5vw 0;
    border-right: 0;
  }
  aside > .eyebrow,
  .preview-note {
    display: none;
  }
  .steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0;
  }
  .steps li {
    display: block;
    margin: 0;
    font-size: 0.75rem;
  }
  .step-number {
    width: 1.9rem;
    margin-bottom: 0.5rem;
  }
  .steps small {
    display: none;
  }
  main {
    padding: 2rem 5vw;
    max-width: 100%;
  }
  h1 {
    font-size: 2rem;
  }
  .topbar {
    padding: 1rem 5vw;
  }
  .usage-grid {
    grid-template-columns: 1fr;
  }
  .plan-grid {
    grid-template-columns: 1fr;
  }
}
