:root {
  color-scheme: light;
  --page: #f4f0e7;
  --card: rgba(255, 255, 255, 0.94);
  --ink: #173632;
  --muted: #687b77;
  --primary: #126057;
  --primary-dark: #0a4c45;
  --gold: #d7aa58;
  --line: #dce5e2;
  --danger: #b53b48;
  --success: #18724f;
  font-family: Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(215, 170, 88, 0.2), transparent 27rem),
    radial-gradient(circle at 88% 82%, rgba(18, 96, 87, 0.16), transparent 28rem),
    var(--page);
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  width: 18rem;
  height: 18rem;
  border: 1px solid rgba(18, 96, 87, 0.1);
  border-radius: 50%;
  content: '';
}

body::before { top: -8rem; right: -6rem; }
body::after { bottom: -9rem; left: -5rem; }

.page-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 2rem 1rem;
}

.form-card {
  position: relative;
  width: min(100%, 31rem);
  padding: 3.25rem 3rem 2rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 1.75rem;
  background: var(--card);
  box-shadow: 0 1.5rem 4rem rgba(37, 61, 56, 0.13);
  backdrop-filter: blur(12px);
}

.form-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--gold), var(--primary));
  content: '';
}

.brand-mark {
  display: grid;
  width: 4.25rem;
  height: 4.25rem;
  margin: 0 auto 1rem;
  place-items: center;
  border-radius: 1.35rem;
  color: #fff;
  background: linear-gradient(145deg, #19766c, var(--primary-dark));
  box-shadow: 0 0.75rem 1.5rem rgba(18, 96, 87, 0.22);
  transform: rotate(3deg);
}

.brand-mark svg { width: 2rem; fill: var(--gold); transform: rotate(-3deg); }
.form-header { margin-bottom: 2rem; text-align: center; }
.eyebrow { margin: 0 0 0.35rem; color: var(--primary); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.05em; }
h1 { margin: 0; font-size: clamp(1.75rem, 6vw, 2.35rem); line-height: 1.35; }
.form-header > p:last-child { margin: 0.6rem 0 0; color: var(--muted); font-size: 0.93rem; }

.field { margin-bottom: 1.25rem; }
.field label { display: block; margin: 0 0 0.5rem; font-size: 0.9rem; font-weight: 700; }
.input-wrap { position: relative; }
.input-icon {
  position: absolute;
  top: 50%;
  right: 1rem;
  width: 1.25rem;
  color: #78908b;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  transform: translateY(-50%);
  pointer-events: none;
}

input {
  width: 100%;
  height: 3.35rem;
  padding: 0 3rem 0 1rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  outline: none;
  color: var(--ink);
  background: #fbfcfb;
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input::placeholder { color: #9caeaa; }
input:hover { border-color: #b8cbc6; }
input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(18, 96, 87, 0.1); }
#mobile { direction: ltr; text-align: right; }
.field-help, .field-error { min-height: 1.1rem; margin: 0.38rem 0 0; font-size: 0.76rem; }
.field-help { color: var(--muted); }
.field-error { display: none; color: var(--danger); }
.has-error .field-help { display: none; }
.has-error .field-error { display: block; }
.has-error input { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(181, 59, 72, 0.08); }

.submit-button {
  display: flex;
  width: 100%;
  min-height: 3.5rem;
  margin-top: 1.6rem;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border: 0;
  border-radius: 0.95rem;
  color: #fff;
  background: linear-gradient(135deg, #177167, var(--primary-dark));
  box-shadow: 0 0.75rem 1.5rem rgba(18, 96, 87, 0.2);
  cursor: pointer;
  font: 700 1rem/1 Tahoma, Arial, sans-serif;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.submit-button svg { width: 1.2rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; transform: rotate(180deg); }
.submit-button:hover { box-shadow: 0 1rem 1.8rem rgba(18, 96, 87, 0.27); transform: translateY(-2px); }
.submit-button:active { transform: translateY(0); }
.submit-button:focus-visible { outline: 3px solid rgba(215, 170, 88, 0.7); outline-offset: 3px; }
.submit-button:disabled { opacity: 0.72; cursor: wait; transform: none; }

.alert { display: flex; margin-bottom: 1.25rem; padding: 0.8rem 0.9rem; align-items: center; gap: 0.65rem; border-radius: 0.8rem; font-size: 0.85rem; }
.alert-icon { display: grid; flex: 0 0 1.5rem; height: 1.5rem; place-items: center; border-radius: 50%; color: #fff; font-weight: 800; }
.alert-success { color: var(--success); background: #eaf7f0; }
.alert-success .alert-icon { background: var(--success); }
.alert-error { color: var(--danger); background: #fff0f1; }
.alert-error .alert-icon { background: var(--danger); }
.form-result:empty { display: none; }

.result-panel {
  position: relative;
  margin-bottom: 1.4rem;
  overflow: hidden;
  border: 1px solid #cde5da;
  border-radius: 1rem;
  background: #f7fcf9;
  box-shadow: 0 0.5rem 1.25rem rgba(24, 114, 79, 0.08);
}

.result-warning { border-color: #ead8ad; background: #fffdf7; }
.result-heading { display: flex; padding: 1rem; align-items: center; gap: 0.75rem; }
.result-main-icon {
  display: grid;
  flex: 0 0 2.35rem;
  height: 2.35rem;
  place-items: center;
  border-radius: 0.75rem;
  color: #fff;
  background: var(--success);
  box-shadow: 0 0.4rem 0.9rem rgba(24, 114, 79, 0.2);
  font-size: 1.1rem;
  font-weight: 800;
}

.result-close-button {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  display: grid;
  width: 1.9rem;
  height: 1.9rem;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0.6rem;
  color: #80621f;
  background: rgba(215, 170, 88, 0.16);
  cursor: pointer;
  font: 700 1.25rem/1 Tahoma, Arial, sans-serif;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.result-close-button:hover { color: #60460f; background: rgba(215, 170, 88, 0.3); transform: scale(1.05); }
.result-close-button:focus-visible { outline: 3px solid rgba(215, 170, 88, 0.55); outline-offset: 2px; }

.result-heading strong { display: block; color: var(--ink); font-size: 0.95rem; }
.result-heading p { margin: 0.12rem 0 0; color: var(--muted); font-size: 0.74rem; }
.result-details { border-top: 1px solid rgba(24, 114, 79, 0.1); }
.result-item { display: flex; padding: 0.72rem 1rem; align-items: center; gap: 0.6rem; color: #49605b; font-size: 0.78rem; }
.result-item + .result-item { border-top: 1px solid rgba(24, 114, 79, 0.08); }
.result-item-icon { display: grid; flex: 0 0 1.25rem; height: 1.25rem; place-items: center; border-radius: 50%; color: #fff; font-size: 0.7rem; font-weight: 800; }
.result-item.is-success .result-item-icon { background: var(--success); }
.result-item.is-warning .result-item-icon { background: #c28a20; }
.result-item.is-warning { color: #80621f; }

.privacy-note { display: flex; margin: 1.4rem 0 0; align-items: center; justify-content: center; gap: 0.4rem; color: var(--muted); font-size: 0.75rem; }
.privacy-note svg { width: 1rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.trap { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 520px) {
  .page-shell { padding: 1rem 0.75rem; }
  .form-card { padding: 2.5rem 1.25rem 1.5rem; border-radius: 1.4rem; }
  .brand-mark { width: 3.75rem; height: 3.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
