*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: #0d0d0d;
  color: #e8e8e8;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── HEADER ── */
.header {
  max-width: 700px;
  margin: 0 auto;
  padding: 36px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-text h1 { font-size: 16px; font-weight: 700; color: #e8e8e8; }
.brand-text p  { font-size: 12px; color: #555; margin-top: 1px; }

.hdr-right { display: flex; gap: 8px; }

.hbtn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #252525;
  background: #161616;
  color: #aaa;
  font-family: inherit;
  transition: border-color .15s, color .15s;
}
.hbtn:hover { border-color: #444; color: #e8e8e8; }
.hbtn.red {
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
}
.hbtn.red:hover { background: #a93226; border-color: #a93226; }

/* ── HERO ── */
.hero {
  max-width: 700px;
  margin: 48px auto 0;
  padding: 0 24px;
}

.hero h2 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
  color: #e8e8e8;
}

.hero h2 span { color: #c0392b; }

.hero p {
  margin-top: 14px;
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  max-width: 440px;
}

/* ── FORM ── */
.form {
  max-width: 700px;
  margin: 40px auto 0;
  padding: 0 24px 100px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ── CARD ── */
.card {
  background: #141414;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  padding: 24px;
  transition: border-color .2s;
}
.card + .card { margin-top: 8px; }
.card:focus-within { border-color: #333; }

.card-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #8a8a8a; 
  margin-bottom: 12px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: #f1f1f1; 
  margin-bottom: 14px;
}

input[type=text], textarea {
  width: 100%;
  background: #0d0d0d;
  border: 1px solid #1f1f1f;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  color: #e8e8e8;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
input::placeholder, textarea::placeholder {  color: #7a7a7a; }
input:focus, textarea:focus { border-color: #3a3a3a; }

textarea { resize: vertical; min-height: 120px; line-height: 1.6; }

.hint { font-size: 12px; color: #9a9a9a; margin-top: 10px; line-height: 1.6; }

.row { display: flex; gap: 8px; }
.row input { flex: 1; }

.loc-btn {
  white-space: nowrap;
  padding: 12px 16px;
  background: #0d0d0d;
  border: 1px solid #1f1f1f;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, color .15s;
}
.loc-btn:hover { border-color: #333; color: #aaa; }

/* ── AI PANEL ── */
.ai-panel {
  background: #141414;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  padding: 22px 24px;
  margin-top: 8px;
  display: none;
  flex-direction: column;
  gap: 16px;
}
.ai-panel.on { display: flex; }

.ai-top { display: flex; align-items: center; gap: 10px; }

.ai-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #e8e8e8;
  animation: pulse 1.6s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.15} }

.ai-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #3d3d3d;
}

.risk-tag {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: .3px;
}
.rL { background: #0d2b1a; color: #4ade80; }
.rM { background: #2b1d00; color: #fbbf24; }
.rH { background: #2b0a0a; color: #f87171; }

.ai-text {
  font-size: 13.5px;
  line-height: 1.75;
  color: #555;
  white-space: pre-wrap;
}
.ai-text.active { color: #aaa; }

/* ── ACTIONS ── */
.actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.btn-assist {
  padding: 13px 22px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #252525;
  background: #141414;
  color: #666;
  font-family: inherit;
  transition: all .15s;
}
.btn-assist:hover { border-color: #3a3a3a; color: #e8e8e8; }

.btn-submit {
  flex: 1;
  padding: 13px 22px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  background: #e8e8e8;
  color: #0d0d0d;
  font-family: inherit;
  transition: background .15s;
}
.btn-submit:hover { background: #cfcfcf; }
.btn-submit:active { background: #bbb; }

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(70px);
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  color: #e8e8e8;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 30px rgba(0,0,0,.4);
  transition: transform .25s ease;
  z-index: 999;
  white-space: nowrap;
}
.toast.up { transform: translateX(-50%) translateY(0); }
.toast.ok  { border-color: #1a3a2a; color: #4ade80; }
.toast.bad { border-color: #3a1a1a; color: #f87171; }

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: #7a7a7a;
}

@media (max-width: 600px) {
  .header { padding: 24px 16px 0; }
  .hero { padding: 0 16px; margin-top: 36px; }
  .hero h2 { font-size: 30px; }
  .form { padding: 0 16px 80px; }
  .row { flex-direction: column; }
}
