/* ===== Variables (required - the other rules use these) ===== */
:root {
  --brand: #8c1515;
  --brand-dark: #5f0e0e;
  --brand-2: #8c1515;
  --tint: #fdf2f2;
  --tint-2: #fbe4e4;
  --brand-rgb: 140, 21, 21;
  --accent: #f59e0b;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
}
* { box-sizing: border-box; }
body {
  font-family: 'Poppins', sans-serif;
  color: var(--ink);
  background: #f1f5f9;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Header ===== */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(15, 23, 42, .05);
  position: sticky; top: 0; z-index: 20;
}
.site-header .inner {
  max-width: 1100px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.site-header img { height: 52px; width: auto; max-width: 38vw; object-fit: contain; }
@media (max-width: 575px) { .site-header img { height: 40px; } }
.header-tag {
  font-size: .8rem; font-weight: 600; color: var(--brand);
  background: var(--tint-2); padding: 6px 14px; border-radius: 50px; white-space: nowrap;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff; padding: 44px 20px 110px; text-align: center;
}
.hero h1 { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 700; margin: 0 0 8px; }
.hero p  { margin: 0; opacity: .85; font-size: .95rem; }

/* ===== Card ===== */
.form-wrap { max-width: 640px; width: 100%; margin: -80px auto 40px; padding: 0 16px; flex: 1; }
.form-card {
  background: #fff; border-radius: 18px; padding: 32px 30px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, .12);
}
@media (max-width: 575px) { .form-card { padding: 24px 18px; } }

.f-label { font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.f-label span { color: #ef4444; }

/* ===== Inputs (note the leading dots on every class) ===== */
.input-group > .input-group-text {
  background: #f8fafc;
  border: 1.5px solid var(--line);
  border-right: 0;
  color: var(--brand-2);
  border-radius: 10px 0 0 10px;
  padding: 0 14px;
}
.input-group > .form-control,
.input-group > .form-select {
  border: 1.5px solid var(--line);
  border-left: 0;
  border-radius: 0 10px 10px 0;
  padding: 12px 14px;
  font-size: .95rem;
}
.input-group > .form-control:focus,
.input-group > .form-select:focus {
  box-shadow: none;
  border-color: var(--brand-2);
}
.input-group:focus-within > .input-group-text { border-color: var(--brand-2); }

.input-group.has-error > .input-group-text,
.input-group.has-error > .form-control,
.input-group.has-error > .form-select { border-color: #ef4444; }

/* ===== Choice cards (Question Type) ===== */
.choice-grid { display: grid; gap: 12px; }
.choice-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px;
  transition: all .15s ease; background: #fff; height: 100%;
}
.choice label:hover { border-color: var(--brand-2); background: var(--tint); }
.choice .ico {
  width: 38px; height: 38px; border-radius: 10px; flex: 0 0 38px;
  display: grid; place-items: center; background: var(--tint); color: var(--brand-2); font-size: 1.1rem;
}
.choice .t1 { font-weight: 600; font-size: .9rem; line-height: 1.2; }
.choice .t2 { font-size: .75rem; color: var(--muted); }
.choice .tamil { font-family: 'Noto Sans Tamil', 'Poppins', sans-serif; }
.choice input:checked + label {
  border-color: var(--brand-2); background: var(--tint);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .15);
}
.choice input:checked + label .ico { background: var(--brand-2); color: #fff; }
.choice input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 420px) { .choice-grid.cols-2 { grid-template-columns: 1fr; } }

/* ===== Validation text ===== */
label.error {
  display: block; width: 100%; color: #ef4444; font-size: .8rem; margin-top: 6px; font-weight: 500;
}

/* ===== Button ===== */
.btn-submit {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; border: 0; border-radius: 12px; padding: 14px; font-weight: 600; font-size: 1rem;
  box-shadow: 0 8px 20px rgba(var(--brand-rgb), .3); transition: transform .1s, box-shadow .2s;
}
.btn-submit:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 12px 24px rgba(var(--brand-rgb), .35); }
.btn-submit:disabled { opacity: .7; transform: none; }

.alert { border-radius: 12px; font-size: .9rem; }
.site-footer { text-align: center; font-size: .8rem; color: var(--muted); padding: 0 0 22px; }