:root {
  --bg: #faf9f7;
  --card: #ffffff;
  --ink: #1c1917;
  --muted: #78716c;
  --line: #e7e5e4;
  --accent: #b45309;
  --accent-soft: #fef3c7;
  --good: #16a34a;
  --neutral: #d97706;
  --bad: #dc2626;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Noto Sans Telugu", "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 32px;
}

header { text-align: center; margin-bottom: 32px; }

header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

header h1 span { color: var(--accent); }

.tag { color: var(--muted); margin-top: 6px; font-size: 0.95rem; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.hidden { display: none; }

/* form */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

.person h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 12px;
}

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  margin: 12px 0 6px;
}

input[type="text"], select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: 500 0.95rem "Noto Sans Telugu", "Inter", sans-serif;
  color: var(--ink);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2378716c' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}

input:focus, select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }

.primary {
  width: 100%;
  margin-top: 24px;
  padding: 13px;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font: 600 1rem "Noto Sans Telugu", "Inter", sans-serif;
  cursor: pointer;
  transition: filter 0.15s;
}

.primary:hover { filter: brightness(1.05); }
.primary:active { transform: scale(0.995); }

.share-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.secondary {
  flex: 1;
  padding: 11px;
  border: 1.5px solid var(--accent);
  border-radius: 12px;
  background: #fff;
  color: var(--accent);
  font: 600 0.95rem "Noto Sans Telugu", "Inter", sans-serif;
  cursor: pointer;
  transition: all 0.15s;
}

.secondary:hover { background: var(--accent-soft); }
.secondary:active { transform: scale(0.995); }

/* result */
.result { margin-top: 24px; }

.score-row {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.ring {
  flex: none;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--accent) 0%, var(--line) 0);
  transition: background 0.6s ease;
}

.ring-inner {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--card);
  display: grid;
  place-items: center;
}

.ring strong { font-size: 1.25rem; font-weight: 700; }

.verdict h2 {
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  line-height: 1.35;
}

.muted { color: var(--muted); font-size: 0.9rem; margin-top: 3px; }

/* koota table */
.koota-table {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.koota-table th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 8px 6px;
  border-bottom: 2px solid var(--line);
}

.koota-table td {
  padding: 10px 6px;
  border-bottom: 1px solid var(--line);
}

.koota-table tbody tr:last-child td { border-bottom: none; }

.koota-table td:first-child { font-weight: 600; }

.koota-table th:not(:first-child),
.koota-table td:not(:first-child) { text-align: center; }

.pts { font-weight: 700; }
.pts.good { color: var(--good); }
.pts.neutral { color: var(--neutral); }
.pts.bad { color: var(--bad); }

.total-row td {
  font-weight: 700;
  border-top: 2px solid var(--line);
  border-bottom: none;
  padding-top: 12px;
}

.note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  background: #f5f5f4;
  border-radius: 10px;
  padding: 12px 14px;
}

footer { text-align: center; margin-top: 28px; }
footer p { font-size: 0.78rem; }
