:root {
  --bg: #0b0b0f;
  --surface: #121218;
  --surface-2: #181820;
  --text: #f6f6f2;
  --muted: #a9a9b2;
  --line: rgba(255,255,255,.11);
  --accent: #ffd84d;
  --danger: #ff5d6c;
  --good: #65d991;
  --radius: 24px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Georgian", sans-serif;
  background:
    radial-gradient(circle at 18% 0%, rgba(255,216,77,.12), transparent 28rem),
    radial-gradient(circle at 90% 28%, rgba(255,93,108,.08), transparent 26rem),
    var(--bg);
  color: var(--text);
}

button, textarea { font: inherit; }

button { cursor: pointer; }

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.site-header {
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  letter-spacing: -.03em;
  font-size: 20px;
}

.brand-mark { font-size: 26px; }

.beta {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px 6px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .12em;
}

main {
  width: min(100% - 32px, 980px);
  margin: 0 auto;
}

.hero {
  padding: 72px 0 40px;
  text-align: center;
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  font-weight: 800;
}

h1 {
  margin: 15px auto 20px;
  max-width: 850px;
  font-size: clamp(48px, 9vw, 96px);
  line-height: .95;
  letter-spacing: -.065em;
}

h1 span, .how-it-works h2 span { color: var(--accent); }

.lead {
  max-width: 720px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(17px, 2.5vw, 21px);
  line-height: 1.65;
}

.lead strong { color: var(--text); }

.analyzer-card {
  margin: 44px auto 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(18,18,24,.82);
  backdrop-filter: blur(20px);
  text-align: left;
  box-shadow: 0 30px 80px rgba(0,0,0,.28);
}

.analyzer-card label {
  display: block;
  margin: 2px 4px 10px;
  font-weight: 800;
}

textarea {
  width: 100%;
  min-height: 210px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #0d0d12;
  color: var(--text);
  padding: 18px;
  line-height: 1.6;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

textarea:focus {
  border-color: rgba(255,216,77,.6);
  box-shadow: 0 0 0 4px rgba(255,216,77,.08);
}

textarea::placeholder { color: #777781; }

.textarea-meta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 4px 0;
  color: var(--muted);
  font-size: 12px;
}

.examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.chip {
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  border-radius: 999px;
  padding: 9px 12px;
}

.chip:hover {
  color: var(--text);
  border-color: rgba(255,216,77,.35);
}

.primary-btn, .secondary-btn {
  border: 0;
  border-radius: 16px;
  font-weight: 850;
  transition: transform .15s, opacity .15s, background .15s;
}

.primary-btn {
  width: 100%;
  min-height: 58px;
  padding: 14px 20px;
  background: var(--accent);
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.primary-btn:hover, .secondary-btn:hover { transform: translateY(-1px); }

.primary-btn:disabled { opacity: .55; cursor: wait; }

.secondary-btn {
  padding: 11px 15px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.form-error {
  margin: 12px 4px 0;
  color: #ff9ba5;
  font-size: 14px;
}

.loading-card {
  margin: 20px 0 72px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  display: flex;
  gap: 16px;
  align-items: center;
  text-align: left;
}

.loading-card[hidden] { display: none; }

.loading-card p {
  margin: 4px 0 0;
  color: var(--muted);
}

.spinner {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 3px solid rgba(255,255,255,.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}

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

.result-section {
  margin: 18px 0 90px;
}

.result-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.result-top h2 {
  margin: 6px 0 0;
  font-size: clamp(30px, 5vw, 52px);
  letter-spacing: -.04em;
}

.score-card,
.verdict-card,
.panel {
  border: 1px solid var(--line);
  background: rgba(18,18,24,.86);
  border-radius: var(--radius);
}

.score-card {
  padding: 28px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 30px;
}

.score-number {
  min-width: 170px;
  font-size: clamp(56px, 10vw, 86px);
  font-weight: 900;
  letter-spacing: -.07em;
  line-height: 1;
}

.score-number small {
  color: var(--muted);
  font-size: 18px;
  letter-spacing: -.02em;
  font-weight: 700;
}

.meter-track {
  height: 18px;
  background: #26262e;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.07);
}

.meter-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #65d991 0%, #ffd84d 46%, #ff9d48 68%, #ff5d6c 100%);
  transition: width .9s cubic-bezier(.2,.8,.2,1);
}

.meter-labels {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.verdict-card {
  margin-top: 14px;
  padding: 24px 26px;
}

.level-badge {
  display: inline-block;
  border-radius: 999px;
  background: rgba(255,216,77,.12);
  color: var(--accent);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 850;
  margin-bottom: 8px;
}

.verdict-card p {
  margin: 6px 0 0;
  font-size: 20px;
  line-height: 1.55;
}

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

.panel {
  padding: 24px;
}

.panel h3 {
  margin: 0 0 14px;
  font-size: 18px;
}

.panel ul, .panel ol {
  margin: 0;
  padding-left: 22px;
  color: #d8d8dc;
  line-height: 1.6;
}

.panel li + li { margin-top: 9px; }

.panel.danger { box-shadow: inset 0 1px 0 rgba(255,93,108,.12); }
.panel.good { box-shadow: inset 0 1px 0 rgba(101,217,145,.12); }

.questions { margin-top: 14px; }

.result-disclaimer {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  margin: 16px 4px;
}

.wide { width: 100%; }

.how-it-works {
  padding: 60px 0 100px;
  border-top: 1px solid var(--line);
}

.how-it-works h2 {
  margin: 10px 0 32px;
  font-size: clamp(34px, 7vw, 64px);
  letter-spacing: -.055em;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.feature {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  background: rgba(18,18,24,.55);
}

.feature > span { font-size: 26px; }

.feature strong {
  display: block;
  margin: 12px 0 8px;
}

.feature p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

footer {
  width: min(100% - 32px, 980px);
  margin: 0 auto;
  padding: 34px 0 50px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

footer p { margin: 4px 0; }

@media (max-width: 720px) {
  .site-header { padding-inline: 16px; }
  main, footer { width: min(100% - 24px, 980px); }
  .hero { padding-top: 46px; }
  .analyzer-card { padding: 14px; }
  .textarea-meta { flex-direction: column; gap: 5px; }
  .score-card { grid-template-columns: 1fr; gap: 18px; }
  .score-number { min-width: 0; }
  .grid, .feature-grid { grid-template-columns: 1fr; }
  .result-top { align-items: center; }
}

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