/* ============================================================
   Shared stylesheet for every page.
   Change colours here once and the whole site updates.
   ============================================================ */
:root {
  --brand: #7a1f2b;        /* main colour (maroon) */
  --brand-light: #f6ecee;  /* soft background tint */
  --accent: #c8963e;       /* gold accent */
  --text: #1f1f1f;
  --muted: #5f6368;
  --border: #e3e3e3;
  --bg: #ffffff;
  --radius: 10px;
  --max: 1040px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Noto Sans Tamil", "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { color: var(--brand); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- Header / navigation ---------- */
.site-header {
  background: var(--brand);
  color: #fff;
  position: sticky; top: 0; z-index: 10;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 60px; flex-wrap: wrap;
}
.site-title { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.site-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.site-nav a {
  color: #fff; text-decoration: none; padding: 6px 12px; border-radius: 6px; font-size: .95rem;
}
.site-nav a:hover, .site-nav a.active { background: rgba(255,255,255,.18); }

/* ---------- Page body ---------- */
main.wrap { padding: 32px 20px 48px; }
h1 { font-size: 1.8rem; margin: 0 0 8px; color: var(--brand); }
h2 { font-size: 1.3rem; margin: 32px 0 12px; }
.lead { color: var(--muted); font-size: 1.05rem; margin: 0 0 24px; }

.hero {
  background: var(--brand-light);
  border-radius: var(--radius);
  padding: 32px 24px;
  margin-bottom: 24px;
}

/* Card grid used on home, tests and admin pages */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; background: #fff; text-decoration: none; color: var(--text);
  display: block; transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.card h3 { margin: 0 0 6px; font-size: 1.05rem; color: var(--brand); }
.card p { margin: 0; color: var(--muted); font-size: .93rem; }
.tag {
  display: inline-block; font-size: .75rem; padding: 2px 8px; border-radius: 99px;
  background: var(--brand-light); color: var(--brand); margin-bottom: 8px;
}
.tag.done { background: #e8f3ec; color: #1e6b3a; }

.btn {
  display: inline-block; background: var(--brand); color: #fff; text-decoration: none;
  padding: 10px 18px; border-radius: 8px; font-weight: 600;
}
.btn:hover { opacity: .9; }
.btn.secondary { background: #fff; color: var(--brand); border: 1px solid var(--brand); }

.note {
  border-left: 4px solid var(--accent); background: #fffaf0;
  padding: 12px 16px; border-radius: 6px; margin: 16px 0;
}

/* Embedded Google Form */
.form-frame { width: 100%; min-height: 900px; border: 1px solid var(--border); border-radius: var(--radius); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; padding: 20px 0; }

/* ---------- Admin area ---------- */
body.admin .site-header { background: #22303c; }
body.admin h1 { color: #22303c; }

@media (max-width: 600px) {
  h1 { font-size: 1.45rem; }
  .form-frame { min-height: 1100px; }
}
