:root {
  color-scheme: light;
  font-family: Georgia, 'Times New Roman', serif;
  color: #173b3b;
  background: #e7f0ed;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 255, 255, .85), transparent 34%),
    linear-gradient(135deg, #e7f0ed, #c9dfd9);
}

.setup-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 18px;
}

.setup-panel {
  width: min(100%, 520px);
  padding: clamp(28px, 6vw, 56px);
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(13, 92, 93, .16);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(23, 59, 59, .16);
}

.setup-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #0d5c5d;
  font: 700 1.15rem/1.1 Georgia, 'Times New Roman', serif;
  letter-spacing: .04em;
}

.setup-mark {
  display: block;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  object-fit: contain;
}

.setup-eyebrow {
  margin: 42px 0 10px;
  color: #a3542d;
  font: 700 .74rem/1.2 Arial, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: #143a3a;
  font-size: clamp(2rem, 7vw, 3.4rem);
  line-height: .98;
  font-weight: 500;
}

.setup-lede {
  margin: 18px 0 28px;
  color: #55706d;
  font: 1rem/1.55 Arial, sans-serif;
}

form { display: grid; gap: 16px; }

label {
  display: grid;
  gap: 7px;
  color: #294e4c;
  font: 700 .82rem/1.2 Arial, sans-serif;
}

input {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  color: #173b3b;
  background: #f7fbf9;
  border: 1px solid #b9d2cc;
  border-radius: 4px;
  font: 1rem/1.2 Arial, sans-serif;
}

input:focus {
  outline: 3px solid rgba(163, 84, 45, .22);
  border-color: #a3542d;
}

button {
  min-height: 48px;
  margin-top: 6px;
  padding: 12px 18px;
  color: #fff;
  background: #0d5c5d;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font: 700 .92rem/1.2 Arial, sans-serif;
}

button:disabled { cursor: wait; opacity: .65; }

.welcome-secondary {
  width: 100%;
  margin-top: 12px;
  color: #0d5c5d;
  background: transparent;
  border: 1px solid #9bbfba;
}

.welcome-token-form { margin-top: 20px; }

.welcome-break-glass {
  margin-top: 26px;
  color: #55706d;
  font: .82rem/1.4 Arial, sans-serif;
}

.welcome-break-glass summary { cursor: pointer; }

.welcome-break-glass form {
  margin-top: 14px;
}

.setup-message {
  margin: 4px 0 0;
  color: #55706d;
  font: .88rem/1.45 Arial, sans-serif;
}

.setup-requirements {
  margin: -6px 0 0;
  color: #55706d;
  font: .78rem/1.45 Arial, sans-serif;
}

.setup-error { color: #a33f35; }

@media (max-width: 520px) {
  .setup-shell { padding: 0; }
  .setup-panel {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

.welcome-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.welcome-home-link { text-decoration: none; }

.welcome-logo {
  display: block;
  width: 46px;
  height: 46px;
  max-width: 46px;
  max-height: 46px;
  flex: 0 0 46px;
  object-fit: contain;
}

.welcome-theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  margin: 0;
  padding: 7px 10px;
  color: #55706d;
  background: transparent;
  border: 1px solid #b9d2cc;
  font-size: .74rem;
}

.welcome-theme span:first-child { color: #a3542d; font-size: 1rem; }

.welcome-setup {
  display: block;
  margin: 0 0 24px;
  padding: 12px 14px;
  color: #fff;
  background: #0d5c5d;
  border-radius: 4px;
  font: 700 .92rem/1.2 Arial, sans-serif;
  text-decoration: none;
  text-align: center;
}

.welcome-setup:hover { background: #084849; }

.welcome-invite {
  margin: 24px 0 0;
  color: #6a817d;
  font: .82rem/1.45 Arial, sans-serif;
  text-align: center;
}

.welcome-docs {
  margin: 12px 0 0;
  color: #6a817d;
  font: .82rem/1.45 Arial, sans-serif;
  text-align: center;
}

.welcome-docs a {
  color: #0d5c5d;
  font-weight: 700;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="dark"] body {
  color: #e5f0eb;
  background: radial-gradient(circle at 15% 10%, rgba(49, 84, 78, .55), transparent 34%), linear-gradient(135deg, #152422, #203b36);
}

html[data-theme="dark"] .setup-panel {
  background: rgba(22, 35, 33, .96);
  border-color: #355951;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

html[data-theme="dark"] h1 { color: #e7f4ef; }
html[data-theme="dark"] .setup-lede,
html[data-theme="dark"] .setup-message,
html[data-theme="dark"] .setup-requirements,
html[data-theme="dark"] .welcome-invite,
html[data-theme="dark"] .welcome-docs,
html[data-theme="dark"] .welcome-theme { color: #b1c8c1; }
html[data-theme="dark"] label { color: #c7ddd6; }
html[data-theme="dark"] input { color: #e7f4ef; background: #1b2d2a; border-color: #41685e; }
html[data-theme="dark"] .welcome-theme,
html[data-theme="dark"] .welcome-secondary { border-color: #41685e; color: #b7d8cf; }
html[data-theme="dark"] .welcome-docs a { color: #83c8bb; }
html[data-theme="dark"] .welcome-setup { background: #287d78; color: #effaf6; }