@import url('https://fonts.googleapis.com/css2?family=Tiro+Bangla&family=Hind+Siliguri:wght@400;500;600;700&display=swap');

/* ============================================================
   Design tokens — a light, near-monochrome "answer paper":
   black ink on warm white, with a single restrained accent —
   the red pen a teacher marks with — used only for the one
   moment that deserves it (correct answers, the timer).
   ============================================================ */
:root {
    --ink: #17140F;
    --muted: #6E6656;
    --paper: #ffffff;
    --bg-soft: #FAF8F3;
    --rule: #E6E1D3;

    --brand: #17140F;
    --brand-dark: #000000;
    --brand-light: #F0EEE8;

    --accent: #8C3B32;
    --accent-soft: #F4E4E1;

    --danger: #9C3B2E;
}

* { font-family: 'Hind Siliguri', 'Segoe UI', sans-serif; }
h1, h2, h3, .font-display { font-family: 'Tiro Bangla', 'Hind Siliguri', serif; }

html { scroll-behavior: smooth; }
body {
    background: var(--bg-soft);
    color: var(--ink);
}
a { color: var(--brand); }

/* ---------- Buttons ---------- */
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-outline-brand { border-color: var(--brand); color: var(--brand); }
.btn-outline-brand:hover { background: var(--brand); color: #fff; }
.text-brand { color: var(--brand); }
.bg-brand { background: var(--brand); }
.bg-brand-light { background: var(--brand-light); }

/* ============================================================
   Public site chrome — nav & footer
   ============================================================ */
.site-nav {
    background: var(--bg-soft);
    border-bottom: 1px solid var(--rule);
}
.site-nav .navbar-brand {
    font-family: 'Tiro Bangla', serif;
    font-size: 1.3rem;
    color: var(--brand-dark) !important;
}
.site-nav .nav-link { color: var(--ink); opacity: .8; }
.site-nav .nav-link:hover { opacity: 1; color: var(--brand); }

.footer {
    background: var(--brand-light);
    color: var(--muted);
    border-top: 1px solid var(--rule);
    padding: 48px 0 22px;
}
.footer h6, .footer h5 { color: var(--ink); }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--ink); }
.footer .rule { border-color: var(--rule); }

/* ============================================================
   Hero — asymmetric split, one deliberate visual: a mock
   answer sheet with a live timer, not a stat-box grid.
   ============================================================ */
.hero {
    background: var(--bg-soft);
    color: var(--ink);
    padding: 76px 0 96px;
    border-bottom: 1px solid var(--rule);
}
.hero h1 {
    font-size: clamp(2.1rem, 4vw, 3.1rem);
    line-height: 1.35;
    font-weight: 400;
    color: var(--ink);
}
.hero .lead {
    color: var(--muted);
    max-width: 46ch;
    font-size: 1.08rem;
}

.exam-mock {
    background: var(--paper);
    color: var(--ink);
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: 24px 26px;
    max-width: 360px;
    margin-inline: auto;
    transform: rotate(-2deg);
    box-shadow: 0 18px 40px rgba(23,20,15,0.1);
    animation: settle .6s ease-out;
}
@keyframes settle {
    from { transform: rotate(-9deg) translateY(-14px); opacity: 0; }
    to   { transform: rotate(-2.5deg) translateY(0); opacity: 1; }
}
.exam-mock .eyebrow {
    font-size: .78rem; color: var(--muted); margin-bottom: 6px;
}
.exam-mock .q-text { font-weight: 600; margin-bottom: 14px; }
.exam-mock .opt {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 10px; border-radius: 5px; margin-bottom: 6px;
    border: 1px solid var(--rule); font-size: .92rem;
}
.exam-mock .opt.correct { border-color: var(--accent); background: var(--accent-soft); }
.exam-mock .opt .dot {
    width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--rule); flex-shrink: 0;
}
.exam-mock .opt.correct .dot { border-color: var(--accent); background: var(--accent); }
.exam-mock .timer-chip {
    margin-top: 16px; display: inline-flex; align-items: center; gap: 8px;
    background: var(--accent-soft); color: var(--accent); font-weight: 600;
    padding: 6px 14px; border-radius: 999px; font-size: .85rem;
}

/* ============================================================
   How it works — a genuine sequence, so numbering earns its
   keep here (unlike the feature list below).
   ============================================================ */
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    position: relative;
}
.step { position: relative; padding-top: 8px; }
.step .n {
    font-family: 'Tiro Bangla', serif;
    font-size: 1.6rem;
    color: var(--accent);
    display: block;
    margin-bottom: 8px;
}
.step h6 { font-weight: 600; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .92rem; margin-bottom: 0; }
.step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 14px; left: calc(100% - 6px);
    width: calc(28px + 12px);
    border-top: 1px dashed var(--rule);
}
@media (max-width: 767px) {
    .steps { grid-template-columns: 1fr; gap: 22px; }
    .step:not(:last-child)::after { display: none; }
}

/* ============================================================
   Feature list — an editorial row list, not identical cards.
   No numerals: this is a set, not a sequence.
   ============================================================ */
.feature-row {
    display: flex; gap: 18px;
    padding: 22px 0;
    border-top: 1px solid var(--rule);
}
.feature-row:last-child { border-bottom: 1px solid var(--rule); }
.feature-row .glyph {
    font-size: 1.3rem; color: var(--brand);
    width: 40px; flex-shrink: 0;
}
.feature-row h6 { font-weight: 600; margin-bottom: 4px; }
.feature-row p { color: var(--muted); margin-bottom: 0; max-width: 62ch; }

.section-sticky-note { color: var(--muted); max-width: 32ch; }

/* ---------- Section titles ---------- */
.section-title { font-weight: 400; color: var(--ink); }
.section-subtitle { color: var(--muted); }
.section-pad { padding: 64px 0; }

/* ============================================================
   Exam cards — used on the public homepage and the student
   dashboard. Hairline border + a status-coloured left edge
   instead of a drop shadow.
   ============================================================ */
.exam-card {
    border-radius: 6px;
    border: 1px solid var(--rule);
    border-left: 3px solid var(--rule);
    background: var(--paper);
    overflow: hidden;
    height: 100%;
}
.exam-card.st-running { border-left-color: var(--accent); }
.exam-card.st-upcoming { border-left-color: var(--brand); }
.exam-card .exam-body { padding: 18px 20px; }
.badge-status-upcoming { background: var(--brand-light); color: var(--ink); }
.badge-status-running { background: var(--accent-soft); color: var(--accent); }
.badge-status-ended { background: #efece3; color: var(--muted); }

/* ---------- CTA panel ---------- */
.cta-panel {
    background: var(--brand-light);
    border: 1px solid var(--rule);
    border-radius: 10px;
    padding: 56px 24px;
    text-align: center;
}
.cta-panel .section-title { color: var(--ink); }
.cta-panel p { color: var(--muted); }

/* ---------- Auth ---------- */
.auth-wrap {
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    background: var(--bg-soft);
}
.auth-card {
    background: var(--paper);
    border-radius: 10px;
    border: 1px solid var(--rule);
    padding: 40px;
}

/* ---------- Dashboard ---------- */
.sidebar {
    background: var(--brand-dark);
    min-height: 100vh;
    color: #fff;
}
.sidebar a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    display: block;
    padding: 12px 20px;
    border-radius: 8px;
    margin: 2px 10px;
}
.sidebar a:hover, .sidebar a.active { background: rgba(255,255,255,0.12); color: #fff; }
.sidebar .brand { padding: 20px; font-family: 'Tiro Bangla', serif; font-size: 1.2rem; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 10px; }

.stat-card {
    background: var(--paper);
    border-radius: 8px;
    padding: 22px;
    border: 1px solid var(--rule);
}
.stat-card .num { font-size: 1.8rem; font-weight: 700; color: var(--brand); }

/* ---------- Timer (exam-taking page) ---------- */
#exam-timer {
    font-weight: 700;
    font-size: 1.3rem;
    background: var(--accent-soft);
    color: var(--accent);
    padding: 8px 18px;
    border-radius: 8px;
}
#exam-timer.text-danger { background: #f4dedb; color: var(--danger); }

.q-option label {
    display: block;
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 8px;
    cursor: pointer;
}
.q-option input:checked + label,
.q-option label.selected {
    border-color: var(--brand);
    background: var(--brand-light);
}
