:root {
  --primary: #0f172a;
  --secondary: #334155;
  --cta: #0369a1;
  --cta-hover: #075985;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #020617;
  --muted: #475569;
  --border: #e2e8f0;
  --accent: #ffc75e;
  --ring: #38bdf8;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(2, 6, 23, 0.06), 0 8px 24px rgba(2, 6, 23, 0.06);
  --transition: 180ms ease;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 520px at 15% -10%, #e0f2fe 0%, rgba(224, 242, 254, 0) 60%),
    radial-gradient(900px 480px at 100% 0%, #eef2ff 0%, rgba(238, 242, 255, 0) 55%),
    var(--bg);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

a { color: var(--cta); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0;
  z-index: 20;
}
.skip-link:focus { left: 0; }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header / brand */
.site-header { padding: 1.5rem 0 0; }
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 1.05rem;
}
.brand__name {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cta);
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  border-radius: 999px;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
  padding: 3rem 0 3.5rem;
}
.hero__eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.hero__title {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--primary);
}
.hero__lead {
  margin: 0;
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 46ch;
}

/* Form card */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
}
.panel__title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
}
.panel__hint {
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label { font-weight: 600; font-size: 0.9rem; }
.control {
  height: 48px;
  padding: 0 0.85rem;
  font: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.control:hover { border-color: #cbd5e1; }
.control:focus-visible {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35);
}

.btn {
  margin-top: 1.25rem;
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 1.25rem;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--cta);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.btn:hover { background: var(--cta-hover); }
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.45);
}
.btn:disabled { cursor: progress; opacity: 0.75; }
.btn__spinner { display: none; width: 18px; height: 18px; }
.btn[data-loading='true'] .btn__spinner { display: inline-block; animation: spin 0.7s linear infinite; }
.btn[data-loading='true'] .btn__label { opacity: 0.9; }

.status {
  margin-top: 0.9rem;
  min-height: 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
}
.status[data-state='error'] { color: #b91c1c; }
.status[data-state='success'] { color: #15803d; }
.status[data-state='loading'] { color: var(--cta); }

/* Info section */
.info {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
  padding: 0 0 3rem;
}
.info__title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0 0 0.75rem;
}
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.doc-list li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  color: var(--secondary);
}
.doc-list svg { flex: 0 0 auto; margin-top: 2px; color: var(--cta); }

.legend {
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.legend__row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.legend__row:last-child { margin-bottom: 0; }
.swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(2, 6, 23, 0.12); }
.swatch--free { background: var(--accent); }
.swatch--work { background: #fff; }

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer__version { font-weight: 600; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 1.75rem; padding: 2rem 0 2.5rem; }
  .info { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .field-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
