:root {
  --paper: #0B1220;
  --snow: #141B28;
  --mist: #2A3344;
  --ink: #E6E9ED;
  --ink-muted: rgba(230, 233, 237, 0.65);
  --signal: #2DD4BF;
  --signal-hover: #5EEAD4;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
.card {
  position: relative;
  width: min(440px, 92vw);
  padding: 2.5rem 2rem 2rem;
  border-radius: 12px;
  background: var(--snow);
  border: 1px solid var(--mist);
  text-align: center;
}
.card--wide { width: min(520px, 94vw); }
.km0-lang-switch {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--mist);
  background: transparent;
  font-size: 0.75rem;
  font-weight: 500;
}
.km0-lang-switch__btn {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  font: inherit;
  padding: 6px 10px;
  transition: color 0.2s ease, background 0.2s ease;
}
.km0-lang-switch__btn:hover { color: var(--ink); }
.km0-lang-switch__btn--active {
  background: var(--mist);
  color: var(--ink);
}
.km0-lang-switch__btn:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}
.logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.25rem;
  display: block;
}
.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 0.75rem;
}
h1 {
  margin: 0 0 0.5rem;
  font-family: 'Bricolage Grotesque', 'IBM Plex Sans', sans-serif;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
}
.tagline {
  margin: 0 0 1.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.intro {
  margin: 0 0 1.25rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.theme-form-row { margin: 14px auto; max-width: 320px; }
.dex-btn {
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  padding: 0;
  width: 100%;
}
.dex-btn:focus {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}
.theme-btn-provider {
  background: #ffffff;
  border: 1px solid rgba(11, 18, 32, 0.08);
  border-radius: 8px;
  box-shadow: none;
  color: #0B1220;
  min-height: 44px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.theme-btn-provider:hover {
  background: #f3f4f6;
}
.dex-btn-icon {
  background-position: center;
  background-repeat: no-repeat;
  background-size: 24px;
  border-radius: 8px 0 0 8px;
  flex-shrink: 0;
  height: 44px;
  margin-right: 8px;
  width: 44px;
}
.dex-btn-icon--google {
  background-color: #ffffff;
  background-image: url(https://cloud.km0digital.com/dex/static/img/google-icon.svg);
}
.dex-btn-text {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  padding-right: 12px;
  text-align: center;
}
.landing-divider {
  color: var(--ink-muted);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  margin: 1.25rem 0 0.75rem;
  text-transform: uppercase;
}
.btn-local, .btn-secondary {
  align-items: center;
  background: transparent;
  border: 1px solid var(--mist);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  justify-content: center;
  margin: 0 auto;
  max-width: 320px;
  padding: 0.85rem 2rem;
  text-decoration: none;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
  width: 100%;
}
.btn-local:hover, .btn-secondary:hover {
  border-color: var(--signal);
  color: var(--signal-hover);
}
.btn-local:focus-visible, .btn-secondary:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}
.btn-primary {
  align-items: center;
  background: var(--signal);
  border: 0;
  border-radius: 8px;
  color: var(--paper);
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  justify-content: center;
  padding: 0.85rem 2rem;
  text-decoration: none;
  transition: background 0.2s var(--ease);
  width: 100%;
}
.btn-primary:hover {
  background: var(--signal-hover);
}
.btn-primary:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.service-grid {
  display: grid;
  gap: 0.75rem;
  max-width: 320px;
  margin: 0 auto;
  text-align: left;
}
.service-tile {
  display: block;
  padding: 1rem 1.15rem;
  border-radius: 8px;
  border: 1px solid var(--mist);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.service-tile:hover {
  border-color: var(--signal);
  background: rgba(45, 212, 191, 0.08);
}
.service-tile strong { display: block; font-size: 1rem; margin-bottom: 0.25rem; }
.service-tile span { font-size: 0.82rem; color: var(--ink-muted); }
.register-form { text-align: left; max-width: 320px; margin: 0 auto; }
.field { margin-bottom: 0.85rem; }
.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-muted);
  margin-bottom: 0.35rem;
}
.field input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--mist);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
}
.field input:focus {
  outline: none;
  border-color: var(--signal);
}
.field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--ink-muted);
  padding-left: 0.25rem;
}
.form-error, .success-banner {
  display: none;
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.4;
}
.form-error--visible, .success-banner--visible { display: block; }
.form-error {
  background: rgba(255, 80, 80, 0.12);
  border: 1px solid rgba(255, 80, 80, 0.3);
  color: #ffb4b4;
}
.success-banner {
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.35);
  color: var(--signal-hover);
}
.pricing-notice {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--mist);
  color: var(--ink-muted);
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: left;
}
.pricing-notice a {
  color: var(--signal);
  text-decoration: none;
  font-weight: 500;
}
.pricing-notice a:hover {
  color: var(--signal-hover);
  text-decoration: underline;
}
.text-link, .signin-link, .register-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--signal);
  text-decoration: none;
}
.text-link:hover, .signin-link:hover, .register-link:hover {
  color: var(--signal-hover);
}
.logout-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 320px;
  margin: 0 auto;
}
footer {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--ink-muted);
}
footer a {
  color: var(--ink-muted);
  text-decoration: none;
}
footer a:hover { color: var(--signal); }
