@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800;900&family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg: #070b16;
  --bg2: #111a2e;
  --bg3: #1a2440;
  --border: #2b3655;
  --text: #f4f6fb;
  --text-muted: #b7c0d8;
  --accent: #4c8cff;
  --teal: #1fdcc0;
  --purple: #a084ff;
  --gradient: linear-gradient(135deg, var(--teal), var(--purple));
  --font: 'Sora', sans-serif;
  --font-mono: 'Space Mono', monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(650px circle at 12% 15%, rgba(160, 132, 255, 0.28), transparent 60%),
    radial-gradient(550px circle at 88% 10%, rgba(76, 140, 255, 0.26), transparent 60%),
    radial-gradient(600px circle at 50% 90%, rgba(31, 220, 192, 0.2), transparent 60%);
  filter: blur(70px);
  pointer-events: none;
}

.bg-shape-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

.cur-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 9999;
}

.cur-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(76, 140, 255, 0.5);
  pointer-events: none;
  z-index: 9998;
}

.wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

header.site {
  border-bottom: 1px solid var(--border);
  padding: 26px 20px;
  margin-bottom: 40px;
}

header.site .inner {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

header.site .brand {
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

header.site .brand-mark {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  margin-right: 9px;
  opacity: 0.94;
}

header.site nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 22px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

header.site nav a:first-child { margin-left: 0; }

header.site nav a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

h1 {
  color: var(--text);
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

h2 {
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 2.6em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

h3 { color: var(--accent); font-size: 1rem; font-weight: 700; }

.lede {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2em;
}

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

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.card {
  display: block;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover { border-color: var(--accent); transform: translateY(-1px); }

.card h3 { margin-top: 0; }
.card p { margin-bottom: 0; color: var(--text-muted); font-size: 0.95rem; }

label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  margin: 1.4em 0 6px;
}

.field-hint {
  color: #666f87;
  font-size: 0.85rem;
  margin: -2px 0 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
select,
textarea {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 1rem;
}

textarea { min-height: 90px; resize: vertical; }

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}

button, .btn {
  display: inline-block;
  background: var(--gradient);
  color: #ffffff;
  border: none;
  border-radius: 40px;
  padding: 12px 26px;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  margin-right: 10px;
  margin-top: 10px;
  transition: filter 0.15s ease;
}

button:hover, .btn:hover { filter: brightness(1.1); }

button.secondary, .btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

button.secondary:hover, .btn.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
  filter: none;
}

button:disabled {
  background: var(--bg3);
  color: #545e78;
  cursor: not-allowed;
  filter: none;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}

.field-grid .full { grid-column: 1 / -1; }

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

.contract {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 30px;
  margin-top: 30px;
  font-size: 0.97rem;
}

.contract h2:first-child { margin-top: 0; }

.contract .fill {
  color: var(--teal);
  font-weight: 700;
}

.contract .fill.empty {
  color: #666f87;
  font-style: italic;
  font-weight: normal;
}

.contract ul { padding-left: 22px; }

.sig-block {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  margin-top: 18px;
}

canvas.sig-pad {
  width: 100%;
  height: 160px;
  background: var(--text);
  border-radius: 8px;
  touch-action: none;
  cursor: crosshair;
  display: block;
}

.sig-status {
  font-size: 0.85rem;
  color: #666f87;
  margin-top: 8px;
}

.sig-status.ready { color: var(--teal); }

.note {
  background: var(--bg2);
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 20px 0;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 6px 0;
}

.checklist-item input[type="checkbox"] {
  width: auto;
  margin-top: 5px;
  accent-color: var(--accent);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}

th, td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
  font-size: 0.92rem;
}

th { background: var(--bg2); color: var(--accent); }

.status-msg {
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

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