:root {
  --ink: #152033;
  --muted: rgba(21,32,51,0.72);
  --surface: rgba(255,255,255,0.82);
  --border: rgba(48,73,116,0.15);
  --accent: #2f6fed;
  --danger: #c6284a;
  --success: #0f8c5c;
  --shadow: 0 18px 44px rgba(18, 33, 70, 0.12);
  --shadow-soft: 0 10px 24px rgba(18, 33, 70, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(101, 157, 255, 0.20), transparent 34rem),
    linear-gradient(135deg, #f8fbff 0%, #edf6ff 42%, #f5f0ff 100%);
  padding:
    max(20px, env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right))
    max(32px, env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
  overflow-x: clip;
}

.shell {
  width: min(980px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.top-backbar {
  display: flex;
  justify-content: flex-start;
}

.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
  background: linear-gradient(135deg, #3b82f6, #1f6fff);
  color: #fff;
  box-shadow: 0 14px 28px rgba(31, 111, 255, 0.22);
  cursor: pointer;
  font: inherit;
}

.btn:hover,
button:hover {
  transform: translateY(-1px);
}

.btn.ghost,
button.ghost {
  background: rgba(255,255,255,0.68);
  color: var(--ink);
  border-color: var(--border);
  box-shadow: var(--shadow-soft);
}

.btn.danger,
button.danger {
  background: linear-gradient(135deg, #d53a5b, #bb2345);
}

.page {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.08;
}

h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

p, li, label, .muted {
  color: var(--muted);
}

.intro {
  margin-bottom: 22px;
  font-size: 16px;
}

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

.card {
  background: rgba(255,255,255,0.68);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field input {
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(48,73,116,0.18);
  background: rgba(255,255,255,0.94);
  color: var(--ink);
  padding: 0 14px;
  font: inherit;
  box-shadow: inset 0 1px 2px rgba(21,32,51,0.06);
}

.field input:focus {
  outline: none;
  border-color: rgba(47,111,237,0.5);
  box-shadow: 0 0 0 4px rgba(47,111,237,0.14);
}

.checks {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
}

.check input {
  margin-top: 2px;
}

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

.status {
  min-height: 24px;
  font-size: 14px;
}

.status.error {
  color: var(--danger);
}

.status.success {
  color: var(--success);
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

.hidden {
  display: none !important;
}

@media (max-width: 780px) {
  .page {
    padding: 22px 16px;
    border-radius: 18px;
  }

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

  .actions,
  .inline-links {
    flex-direction: column;
    align-items: stretch;
  }

  .btn,
  button {
    width: 100%;
  }
}
