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

:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --soft: #eef2ff;
  --primary: #5b6cff;
  --primary-dark: #4254e8;
  --accent: #77d6c5;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --success: #2f9e67;
  --warning: #a66a00;
  --danger: #d94848;
  --shadow: 0 18px 45px rgba(31, 41, 55, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(91, 108, 255, 0.12), transparent 30%),
    radial-gradient(circle at bottom right, rgba(119, 214, 197, 0.14), transparent 30%),
    var(--bg);
  color: var(--text);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.header {
  width: 92%;
  max-width: 1150px;
  margin: 20px auto 0;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo span:last-child {
  color: var(--primary);
}

.logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  display: grid;
  place-items: center;
}

.header-btn,
.primary-btn,
.primary-wide {
  border: none;
  background: linear-gradient(135deg, var(--primary), #8ea2ff);
  color: white;
  text-decoration: none;
  font-weight: 800;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(91, 108, 255, 0.18);
}

.header-btn {
  padding: 12px 16px;
}

.hero {
  width: 92%;
  max-width: 1150px;
  margin: auto;
  padding: 75px 0 45px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 42px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(42px, 7vw, 72px);
  line-height: 0.96;
  letter-spacing: -2.5px;
  margin-bottom: 20px;
}

.hero p {
  color: var(--muted);
  line-height: 1.75;
  font-size: 17px;
  max-width: 600px;
}

.primary-btn {
  display: inline-block;
  margin-top: 28px;
  padding: 15px 22px;
}

.hero-card {
  min-height: 330px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 30px;
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 30px;
}

.lock {
  font-size: 80px;
  margin-bottom: 15px;
}

.app-section {
  width: 92%;
  max-width: 1150px;
  margin: auto;
  padding: 45px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 25px;
}

.section-title h2 {
  font-size: clamp(30px, 5vw, 48px);
  letter-spacing: -1.5px;
  margin-bottom: 8px;
}

.section-title p {
  color: var(--muted);
}

.progress {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.step {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 17px;
  padding: 14px 10px;
  text-align: center;
}

.step span {
  width: 34px;
  height: 34px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--primary);
  font-weight: 800;
  display: grid;
  place-items: center;
}

.step p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.step.active {
  border-color: rgba(91, 108, 255, 0.25);
  background: #f4f6ff;
}

.step.done {
  background: #edf9f2;
  border-color: rgba(47, 158, 103, 0.25);
}

.step.done span {
  background: var(--success);
  color: white;
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.result-card {
  grid-column: span 2;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.mini-label {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.card h3 {
  font-size: 22px;
  line-height: 1.25;
}

.pill {
  padding: 8px 11px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.pill.good {
  background: #edf9f2;
  color: var(--success);
}

.pill.warn {
  background: #fff7e8;
  color: var(--warning);
}

.pill.bad {
  background: #fff0f0;
  color: var(--danger);
}

label {
  display: block;
  margin: 14px 0 8px;
  font-weight: 700;
  font-size: 14px;
}

.input-row {
  display: flex;
  gap: 10px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #fbfbfd;
  color: var(--text);
  border-radius: 16px;
  padding: 15px;
  outline: none;
}

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

input:focus,
textarea:focus {
  border-color: rgba(91, 108, 255, 0.35);
  box-shadow: 0 0 0 5px rgba(91, 108, 255, 0.08);
}

.icon-btn {
  width: 54px;
  border: none;
  border-radius: 15px;
  background: var(--primary);
  color: white;
}

.primary-wide,
.secondary-wide,
.clear-btn {
  width: 100%;
  padding: 15px;
  border-radius: 16px;
  font-weight: 800;
  margin-top: 15px;
}

.secondary-wide,
.clear-btn {
  background: #fbfbfd;
  color: var(--text);
  border: 1px solid var(--border);
}

.button-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.disabled,
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.small-help {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.result-wrap {
  position: relative;
}

.result-cover {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: rgba(251, 251, 253, 0.96);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.result-cover.hidden {
  display: none;
}

.safety {
  margin-top: 15px;
  padding: 15px;
  border-radius: 16px;
  background: #fff7e8;
  color: var(--warning);
  border: 1px solid #f6dfb8;
  line-height: 1.6;
  font-weight: 700;
}

.clear-btn {
  max-width: 260px;
  display: block;
  margin: 18px auto 0;
}

#toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 330px;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--primary);
  color: white;
  font-weight: 800;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 0.25s ease;
  z-index: 999;
}

#toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 850px) {
  .header-btn {
    display: none;
  }

  .hero,
  .tool-grid,
  .progress,
  .button-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 55px 0 30px;
  }

  .hero h1 {
    font-size: 48px;
  }

  .card-head {
    flex-direction: column;
  }

  .pill {
    width: fit-content;
  }

  .result-card {
    grid-column: span 1;
  }
}