:root {
  color-scheme: light;
  --bg: #f4f6f1;
  --surface: #ffffff;
  --ink: #17211d;
  --muted: #68736d;
  --line: #dfe5dd;
  --green: #0d7a55;
  --green-dark: #07563c;
  --gold: #e7b84b;
  --red: #b63e3e;
  --shadow: 0 18px 50px rgba(19, 32, 27, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(13, 122, 85, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(231, 184, 75, 0.12), transparent 38%),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  min-height: 44px;
  padding: 0 16px;
  font-weight: 900;
}

button:hover {
  background: var(--green-dark);
}

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

.hidden {
  display: none !important;
}

.version-shell {
  display: grid;
  align-content: center;
  gap: 22px;
  width: min(760px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 44px 0;
}

.version-hero {
  display: grid;
  gap: 10px;
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.7rem, 8vw, 5.6rem);
  line-height: 0.92;
}

h2 {
  font-size: 1.35rem;
  line-height: 1.1;
}

.version-hero p {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.02rem;
  font-weight: 800;
}

.gate-card,
.admin-router {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  padding: 20px;
}

.gate-form,
.settings-form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.text-button {
  justify-self: start;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  min-height: 38px;
}

.text-button:hover,
.ghost-button:hover {
  background: #eef4ee;
}

.ghost-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.form-message {
  min-height: 20px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

.form-message[data-tone="good"] {
  color: var(--green-dark);
}

.form-message[data-tone="bad"] {
  color: var(--red);
}

.settings-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.settings-head span {
  border-radius: 999px;
  background: #eef4ee;
  color: var(--green-dark);
  padding: 6px 10px;
  font-size: 0.76rem;
  font-weight: 950;
}

.settings-head span[data-active="claude"] {
  background: #fff2c9;
  color: #7a5500;
}

.version-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.version-choice label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 12px;
  cursor: pointer;
}

.version-choice input {
  width: auto;
  min-height: auto;
  margin-top: 4px;
}

.version-choice span {
  display: grid;
  gap: 3px;
}

.version-choice strong {
  color: var(--ink);
}

.version-choice em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

.settings-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .version-choice {
    grid-template-columns: 1fr;
  }

  .settings-head {
    flex-direction: column;
  }
}
