@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,600;0,9..40,700;1,9..40,400&family=Space+Grotesk:wght@600;700&display=swap");

:root {
  --ink: #1a2421;
  --muted: #5c6b66;
  --paper: #f3f6f4;
  --panel: rgba(255, 255, 255, 0.82);
  --line: #c5d2cb;
  --accent: #0f6b4c;
  --accent-deep: #0a4533;
  --warn: #9a3412;
  --shadow: 0 18px 50px rgba(26, 36, 33, 0.08);
  --radius: 14px;
  --font: "DM Sans", sans-serif;
  /* Space Grotesk: expressive display with a plain lowercase f (serif faces read oddly in “of”). */
  --display: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #d7ebe2 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #e8f0ff 0%, transparent 50%),
    linear-gradient(180deg, #eef3f0 0%, var(--paper) 40%, #e7eee9 100%);
  line-height: 1.45;
}

a { color: var(--accent-deep); }
.shell { width: min(1100px, calc(100% - 2rem)); margin: 0 auto; padding: 1.25rem 0 3rem; }
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.5rem;
}
.brand {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}
.nav { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.nav a, .nav button.linkish {
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.95rem;
  background: none; border: 0; cursor: pointer; padding: 0;
}
.nav a:hover, .nav button.linkish:hover { color: var(--accent); }

.panel {
  background: var(--panel);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.35rem;
}
.grid-2 { display: grid; gap: 1.25rem; }
@media (min-width: 880px) {
  .grid-2 { grid-template-columns: 1.1fr 0.9fr; align-items: start; }
}

h1, h2 {
  font-family: var(--display);
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}
.lede { color: var(--muted); margin: 0 0 1.25rem; }

label { display: block; font-size: 0.85rem; font-weight: 600; margin: 0.75rem 0 0.3rem; }
input, select, textarea, button {
  font: inherit;
}
input, select, textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.75rem; }
.check {
  display: flex; align-items: center; gap: 0.5rem; margin-top: 1rem; font-weight: 600;
}
.check input { width: auto; }

button.primary, .btn {
  appearance: none;
  border: 0;
  background: linear-gradient(180deg, #13845e, var(--accent));
  color: #fff;
  font-weight: 700;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  margin-top: 1rem;
}
button.primary:hover, .btn:hover { filter: brightness(1.05); }
button.secondary {
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  font-weight: 700; padding: 0.7rem 1rem; border-radius: 999px; cursor: pointer; margin-top: 0.75rem;
}
button.primary:disabled,
button.secondary:disabled,
.btn:disabled {
  background: #e4ebe7;
  color: #8b9893;
  border: 1px solid #d3ddd8;
  opacity: 1;
  cursor: not-allowed;
  filter: none;
  box-shadow: none;
}
button.primary:disabled:hover,
button.secondary:disabled:hover,
.btn:disabled:hover {
  filter: none;
  background: #e4ebe7;
  color: #8b9893;
}

.price-total {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin: 0.25rem 0;
}
.muted { color: var(--muted); }
.breakdown { list-style: none; padding: 0; margin: 1rem 0 0; }
.breakdown li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.45rem 0; border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.msg {
  white-space: pre-wrap;
  background: #f7faf8;
  border-left: 3px solid var(--accent);
  padding: 0.75rem 0.9rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.alert {
  background: #fff7ed; border: 1px solid #fdba74; color: var(--warn);
  padding: 0.75rem 0.9rem; border-radius: 10px; margin-bottom: 1rem;
}
.ok {
  background: #ecfdf5; border: 1px solid #6ee7b7; color: var(--accent-deep);
  padding: 0.75rem 0.9rem; border-radius: 10px; margin-bottom: 1rem;
}
.auth-box { width: min(420px, 100%); margin: 2rem auto; }
.tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.tabs button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 0.4rem 0.85rem; cursor: pointer; font-weight: 600;
}
.tabs button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th, .table td { text-align: left; padding: 0.45rem 0.35rem; border-bottom: 1px solid var(--line); }
.table input { padding: 0.35rem 0.45rem; }
.section-title { margin-top: 1.5rem; font-size: 1.15rem; }
.hidden { display: none !important; }
.turnstile-slot { margin-top: 1rem; min-height: 65px; }
.auth-actions {
  display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center; margin-top: 1rem;
}
.auth-actions .primary, .auth-actions .secondary {
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}
.auth-actions button.is-busy {
  cursor: wait;
}
.btn-spinner {
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
.auth-secondary { margin: 1rem 0 0; }
.auth-secondary .linkish {
  font-size: 0.9rem; color: var(--muted); font-weight: 600;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.panel { animation: rise 0.35s ease both; }
.price-total { transition: transform 0.2s ease; }
.price-total.pulse { transform: scale(1.03); }
