:root {
  color-scheme: light;
  --bg: #f5f2ee;
  --ink: #1e1a17;
  --muted: #6f655b;
  --primary: #e45f2b;
  --primary-dark: #c94f20;
  --border: #eadfd2;
  --card: #ffffffd1;
  --shadow: 0 25px 60px rgba(36, 22, 9, 0.08);
  --radius: 18px;
  --ok: #166740;
  --error: #a02240;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top right, #fff1df 0%, #f7efe5 45%, #f0e7dc 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(31, 25, 20, 0.06) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.55;
  pointer-events: none;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 30px 18px 52px;
}

h1,
p {
  margin: 0;
}

h1 {
  margin: 0;
  font-family: "Spectral", serif;
  font-size: clamp(1.9rem, 2.8vw, 2.7rem);
  line-height: 1.12;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.access-card {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.brand-wrap {
  display: grid;
  gap: 8px;
}

.hero-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
}

.language-switch select {
  border: 1px solid var(--border);
  border-radius: 999px;
  min-height: 32px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
}

.brand-bridge-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #efd8c4;
  background: rgba(255, 250, 244, 0.9);
  color: #7a5d48;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  width: fit-content;
}

.brand-bridge-link:hover {
  border-color: #e8b991;
  color: #a04d25;
}

.brand-bridge-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  padding: 2px;
  box-shadow: 0 4px 10px rgba(59, 30, 10, 0.12);
}

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.heading {
  display: grid;
  gap: 8px;
}

.subhead {
  color: var(--muted);
  max-width: 58ch;
}

.status {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.95rem;
}

.status.is-neutral {
  background: #fff8f2;
  color: var(--muted);
}

.status.is-ok {
  border-color: #98d3b3;
  background: #f3fdf7;
  color: var(--ok);
}

.status.is-error {
  border-color: #efbec8;
  background: #fff5f7;
  color: var(--error);
}

.profile-switch {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: #fbf2ea;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px;
}

.switch-btn {
  border: 1px solid transparent;
  border-radius: 10px;
  min-height: 42px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.switch-btn.is-active {
  background: #fff;
  border-color: #ebc8a8;
  color: #8f3f1b;
}

.profile-panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 16px;
}

.profile-panel[hidden] {
  display: none;
}

.stack {
  display: grid;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.95rem;
  font-weight: 600;
}

input,
button {
  font: inherit;
}

input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

input::placeholder {
  color: #8b7c6d;
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(228, 95, 43, 0.2);
  outline-offset: 1px;
}

.password-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.text-btn {
  border: 1px solid #e7c8ad;
  background: #fff;
  color: #8f3f1b;
  border-radius: 10px;
  min-height: 40px;
  padding: 0 12px;
  cursor: pointer;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  min-height: 42px;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}

.btn.primary:hover {
  background: var(--primary-dark);
}

.btn.ghost {
  background: #fff;
  color: #8f3f1b;
  border-color: #e7c8ad;
}

.btn.ghost:hover {
  background: #fff8f2;
}

.legal-footer {
  margin-top: 12px;
}

.legal-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid #e3d4c6;
  border-radius: 999px;
  background: rgba(255, 248, 240, 0.9);
  color: #6f655b;
  font-size: 0.84rem;
  text-decoration: none;
}

.legal-link::before {
  content: "🛡";
  font-size: 0.75rem;
  line-height: 1;
}

.legal-link:visited,
.legal-link:hover,
.legal-link:active {
  color: #6f655b;
  text-decoration: none;
}

.legal-link:hover {
  border-color: #d8c5b4;
  background: #fff4e9;
}

@media (max-width: 640px) {
  .access-card {
    padding: 18px;
    gap: 14px;
  }

  .profile-switch {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column;
  }

  .btn,
  .text-btn {
    width: 100%;
  }
}
