:root {
  color-scheme: light;
  --bg: #f4f0e8;
  --bg-accent: #e8ecf4;
  --panel: rgba(255, 255, 255, 0.9);
  --text: #17202a;
  --muted: #5a6572;
  --line: rgba(23, 32, 42, 0.12);
  --accent: #0f5fa8;
  --accent-dark: #0b4a82;
  --shadow: 0 20px 50px rgba(23, 32, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  line-height: 1.5;
  background:
    radial-gradient(circle at top left, rgba(15, 95, 168, 0.14), transparent 36%),
    radial-gradient(circle at right 15%, rgba(255, 193, 7, 0.16), transparent 28%),
    linear-gradient(180deg, var(--bg), var(--bg-accent));
  min-height: 100vh;
}

.shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 56px;
  display: grid;
  gap: 24px;
}

.hero,
.panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.hero {
  padding: 28px;
}

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

h1,
h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.1;
}

h1 {
  max-width: 12ch;
  font-size: clamp(2.3rem, 6vw, 4.8rem);
}

.lede {
  max-width: 68ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.03rem;
}

.notice {
  margin-top: 20px;
  padding: 14px 16px;
  border-left: 4px solid var(--accent);
  border-radius: 14px;
  background: rgba(15, 95, 168, 0.08);
  color: var(--text);
}

.cta-row {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid rgba(15, 95, 168, 0.26);
  border-radius: 999px;
  background: rgba(15, 95, 168, 0.08);
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 700;
  transition: background 0.12s ease, transform 0.12s ease, border-color 0.12s ease;
}

.button-link:hover {
  background: rgba(15, 95, 168, 0.14);
  border-color: rgba(15, 95, 168, 0.4);
}

.button-link:active {
  transform: translateY(1px);
}

.api-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.panel {
  padding: 24px;
}

.form {
  display: grid;
  gap: 18px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 8px;
}

label span,
.stack h2 {
  font-weight: 700;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  color: var(--text);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(15, 95, 168, 0.18);
  border-color: rgba(15, 95, 168, 0.65);
}

.stack {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.hidden {
  display: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 4px;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}

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

button:active {
  transform: translateY(1px);
}

.status {
  margin: 0;
  color: var(--muted);
}

.submission-result {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  display: grid;
  gap: 12px;
}

.submission-message {
  margin: 0;
  color: var(--text);
  font-weight: 600;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 20px, 1040px);
    padding-top: 20px;
  }

  .hero,
  .panel {
    padding: 20px;
    border-radius: 20px;
  }

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

  h1 {
    max-width: none;
  }
}
