/* Thal University Bhakkar - main stylesheet
   Palette: deep green + gold. Light theme by default, dark via [data-theme="dark"]. */

:root {
  --bg: #f5f8f4;
  --surface: #ffffff;
  --surface-2: #eaf1ec;
  --text: #14211b;
  --muted: #55675d;
  --line: #d6e0d9;
  --accent: #0f4a35;
  --green: #0f4a35;
  --green-deep: #082b1f;
  --gold: #c8a24a;
  --gold-soft: #f2e7c9;
  --btn-bg: #0f4a35;
  --btn-text: #ffffff;
  --shadow: 0 1px 2px rgba(8, 43, 31, .06), 0 8px 24px -12px rgba(8, 43, 31, .18);
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-ur: 'Noto Naskh Arabic', 'Noto Nastaliq Urdu', 'Segoe UI', Tahoma, serif;
  --header-h: 72px;
}

[data-theme="dark"] {
  --bg: #0a1310;
  --surface: #111d17;
  --surface-2: #172721;
  --text: #e8f0ea;
  --muted: #9bb0a4;
  --line: #243729;
  --accent: #7fd1a8;
  --gold-soft: #2b2a17;
  --btn-bg: #d4ae55;
  --btn-text: #0a1310;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px -14px rgba(0, 0, 0, .7);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #1a1405; padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 600; }
.skip-link:focus { left: 8px; }
.icon { width: 1.25em; height: 1.25em; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.prose { max-width: 68ch; }
.muted { color: var(--muted); }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h); display: flex; align-items: center; transition: background .25s, box-shadow .25s, color .25s; color: #fff; }
.site-header.is-solid { background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--text); box-shadow: 0 1px 0 var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 40px; height: 40px; }
.brand b { display: block; font-family: var(--font-head); font-size: 1.12rem; line-height: 1.05; }
.brand span { display: block; font-size: .72rem; opacity: .75; }
.nav { display: none; align-items: center; gap: 4px; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: .92rem; font-weight: 500; opacity: .88; transition: background .2s, opacity .2s; }
.nav a:hover { opacity: 1; background: rgba(127, 127, 127, .16); }
.nav a[aria-current="page"] { opacity: 1; background: rgba(200, 162, 74, .22); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 999px; border: 1px solid transparent; background: transparent; color: inherit; cursor: pointer; transition: background .2s; }
.icon-btn:hover { background: rgba(127, 127, 127, .18); }
.menu-btn { display: grid; }
@media (min-width: 1180px) { .nav { display: flex; } .menu-btn { display: none; } }
@media (max-width: 639px) { .hide-sm { display: none; } }

.drawer { position: fixed; inset: 0; z-index: 60; display: none; }
.drawer.open { display: block; }
.drawer-bg { position: absolute; inset: 0; background: rgba(4, 18, 12, .55); }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(340px, 86vw); background: var(--surface); color: var(--text); padding: 20px; display: flex; flex-direction: column; gap: 4px; animation: slideIn .25s ease; overflow-y: auto; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-panel a { text-decoration: none; padding: 12px 14px; border-radius: 10px; font-weight: 500; }
.drawer-panel a:hover, .drawer-panel a[aria-current="page"] { background: var(--surface-2); }
.drawer-panel .drawer-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: .95rem; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: inherit; transition: transform .15s, background .2s, box-shadow .2s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--btn-bg); color: var(--btn-text); }
.btn-primary:hover { box-shadow: 0 8px 20px -8px var(--btn-bg); }
.btn-gold { background: var(--gold); color: #1d1704; }
.btn-gold:hover { box-shadow: 0 8px 22px -8px var(--gold); }
.btn-outline { border-color: currentColor; background: transparent; color: inherit; }
.btn-outline:hover { background: rgba(127, 127, 127, .14); }
.btn-sm { padding: 8px 16px; font-size: .86rem; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--accent); text-decoration: none; }
.link-arrow:hover .icon { transform: translateX(3px); }
.link-arrow .icon { transition: transform .2s; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--green-deep); color: #f4f7f3; padding: calc(var(--header-h) + 56px) 0 88px; overflow: hidden; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cpath d='M36 6 46 26 66 36 46 46 36 66 26 46 6 36 26 26Z' fill='none' stroke='%23c8a24a' stroke-opacity='.16' stroke-width='1'/%3E%3C/svg%3E"); }
.hero::after { content: ""; position: absolute; inset: auto -10% -40% auto; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(200, 162, 74, .18), transparent); z-index: -1; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr .85fr; } }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); font-weight: 500; letter-spacing: -0.03em; }
.hero h1 em { font-style: italic; color: var(--gold); font-weight: 400; }
.hero p.lead { margin-top: 20px; font-size: 1.12rem; color: #c9d8cf; max-width: 52ch; }
.hero-cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn-outline { color: #fff; }
.arch { position: relative; max-width: 420px; margin-inline: auto; width: 100%; }
.arch-frame { border-radius: 999px 999px 18px 18px; overflow: hidden; aspect-ratio: 4 / 5; border: 2px solid var(--gold); padding: 10px; }
.arch-frame img { width: 100%; height: 100%; object-fit: cover; border-radius: 999px 999px 10px 10px; }
.arch-note { position: absolute; left: -6%; bottom: 8%; background: var(--surface); color: var(--text); border-radius: 14px; padding: 14px 18px; box-shadow: var(--shadow); max-width: 230px; font-size: .88rem; }
.arch-note b { display: block; font-family: var(--font-head); font-size: 1.05rem; }
@media (max-width: 520px) { .arch-note { left: 0; } }
.reveal-hero > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.reveal-hero > *:nth-child(2) { animation-delay: .08s; } .reveal-hero > *:nth-child(3) { animation-delay: .16s; } .reveal-hero > *:nth-child(4) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.page-hero { background: var(--green-deep); color: #f4f7f3; padding: calc(var(--header-h) + 44px) 0 48px; position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; opacity: .5; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cpath d='M36 6 46 26 66 36 46 46 36 66 26 46 6 36 26 26Z' fill='none' stroke='%23c8a24a' stroke-opacity='.14' stroke-width='1'/%3E%3C/svg%3E"); }
.page-hero .wrap { position: relative; }
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 500; }
.page-hero p { margin-top: 12px; color: #c9d8cf; max-width: 60ch; }
.crumbs { font-size: .85rem; color: #a9bfb2; margin-bottom: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--gold); }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section.alt { background: var(--surface-2); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); max-width: 20ch; }
.section-head p { color: var(--muted); max-width: 50ch; margin-top: 10px; }

.stats { background: var(--surface); border-bottom: 1px solid var(--line); }
.stats .wrap { display: grid; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .stats .wrap { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 30px 8px; text-align: left; border-left: 1px solid var(--line); padding-left: 24px; }
.stat:first-child { border-left: 0; }
@media (max-width: 719px) { .stat:nth-child(3) { border-left: 0; } .stat { border-top: 1px solid var(--line); } .stat:nth-child(-n+2) { border-top: 0; } }
.stat b { display: block; font-family: var(--font-head); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 500; color: var(--accent); line-height: 1; }
.stat span { color: var(--muted); font-size: .92rem; }

.split { display: grid; gap: 44px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split.flip > :first-child { order: 2; } }
.photo { border-radius: 18px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-2); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.img-fallback { background: linear-gradient(135deg, #0f4a35, #1c6b4d) !important; }
img.is-broken { visibility: hidden; }
.stack > * + * { margin-top: 16px; }

/* ---------- Cards and lists ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

.dept-tile { display: flex; flex-direction: column; gap: 10px; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 6px 16px 16px 6px; padding: 22px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.dept-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-left-color: var(--green); }
[data-theme="dark"] .dept-tile:hover { border-left-color: var(--accent); }
.dept-tile .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.dept-tile h3 { font-size: 1.2rem; }
.dept-tile p { color: var(--muted); font-size: .92rem; }
.dept-tile .meta { margin-top: auto; font-size: .85rem; color: var(--accent); font-weight: 600; }

.fac-card { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.fac-card .photo { border-radius: 0; aspect-ratio: 16 / 10; }
.fac-card div.body { padding: 18px 20px 22px; }
.fac-card h3 { font-size: 1.1rem; display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.fac-card p { color: var(--muted); font-size: .93rem; }

.news-item { display: grid; grid-template-columns: 74px 1fr; gap: 18px; padding: 18px 0; border-top: 1px solid var(--line); }
.news-item:first-child { border-top: 0; padding-top: 0; }
.date-box { text-align: center; border: 1px solid var(--line); border-radius: 12px; padding: 8px 4px; background: var(--surface); height: fit-content; }
.date-box b { display: block; font-family: var(--font-head); font-size: 1.5rem; line-height: 1; color: var(--accent); }
.date-box span { font-size: .75rem; color: var(--muted); }
.news-item h3, .event-item h3 { font-size: 1.1rem; font-family: var(--font-body); font-weight: 650; letter-spacing: 0; }
.news-item p, .event-item p { color: var(--muted); font-size: .93rem; margin-top: 4px; }
.event-item { display: grid; grid-template-columns: 74px 1fr; gap: 18px; padding: 16px 0; border-top: 1px solid var(--line); }
.event-item:first-child { border-top: 0; padding-top: 0; }
.event-item .where { font-size: .82rem; color: var(--accent); font-weight: 600; margin-top: 6px; display: flex; gap: 6px; align-items: center; }

.quote { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.quote p { font-family: var(--font-head); font-size: 1.12rem; line-height: 1.5; }
.quote footer { margin-top: auto; font-size: .88rem; color: var(--muted); }
.quote footer b { display: block; color: var(--text); font-size: .95rem; }

.cta-band { background: var(--green); color: #fff; border-radius: 24px; padding: 48px; display: grid; gap: 24px; align-items: center; position: relative; overflow: hidden; }
[data-theme="dark"] .cta-band { background: #123f2f; }
@media (min-width: 800px) { .cta-band { grid-template-columns: 1.4fr auto; } }
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 500; }
.cta-band p { color: #cfe0d6; margin-top: 8px; }

.chip { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--surface-2); color: var(--accent); font-size: .8rem; font-weight: 600; border: 1px solid var(--line); }
.chip-gold { background: var(--gold-soft); color: #6b5314; border-color: transparent; }
[data-theme="dark"] .chip-gold { color: #e4c878; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
table.t { width: 100%; border-collapse: collapse; min-width: 520px; }
table.t th, table.t td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); font-size: .95rem; }
table.t th { background: var(--surface-2); font-weight: 650; font-size: .85rem; color: var(--muted); }
table.t tr:last-child td { border-bottom: 0; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.t tfoot td { font-weight: 700; background: var(--surface-2); }

/* ---------- Department detail ---------- */
.subnav { position: sticky; top: var(--header-h); z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.subnav .wrap { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; }
.subnav a { white-space: nowrap; text-decoration: none; padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: .9rem; color: var(--muted); }
.subnav a:hover, .subnav a.on { background: var(--surface-2); color: var(--accent); }
.teacher { display: flex; flex-direction: column; gap: 12px; }
.teacher .avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-family: var(--font-head); font-size: 1.15rem; }
[data-theme="dark"] .teacher .avatar { background: var(--btn-bg); color: var(--btn-text); }
.teacher h3 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 650; letter-spacing: 0; }
.teacher .role { color: var(--muted); font-size: .88rem; }
.teacher .qual { font-size: .88rem; }
.act-group { border-top: 1px solid var(--line); padding: 18px 0; display: grid; gap: 6px 24px; }
@media (min-width: 720px) { .act-group { grid-template-columns: 160px 1fr; } }
.act-group h3 { font-family: var(--font-body); font-size: .95rem; font-weight: 650; color: var(--accent); letter-spacing: 0; }
.act-group li { margin-bottom: 10px; list-style: none; } .act-group ul { padding: 0; margin: 0; }
.act-group li b { display: block; }
.act-group li span { color: var(--muted); font-size: .92rem; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .85rem; font-weight: 600; }
.field input, .field select, .field textarea { font: inherit; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid color-mix(in srgb, var(--gold) 60%, transparent); border-color: var(--gold); }
.field input[readonly] { background: var(--surface-2); }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.form-error { color: #b3261e; font-size: .85rem; min-height: 1.2em; }
[data-theme="dark"] .form-error { color: #ff9b94; }

/* ---------- Timeline and FAQ ---------- */
.timeline { list-style: none; margin: 0; padding: 0; counter-reset: step; position: relative; }
.timeline li { position: relative; padding: 0 0 28px 64px; counter-increment: step; }
.timeline li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-family: var(--font-head); font-size: 1.1rem; z-index: 1; }
[data-theme="dark"] .timeline li::before { background: var(--btn-bg); color: var(--btn-text); }
.timeline li::after { content: ""; position: absolute; left: 21px; top: 44px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline h3 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 650; letter-spacing: 0; padding-top: 8px; }
.timeline p { color: var(--muted); margin-top: 4px; }
details.faq { border-top: 1px solid var(--line); padding: 4px 0; }
details.faq:last-child { border-bottom: 1px solid var(--line); }
details.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; font-weight: 650; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary .icon { transition: transform .25s; color: var(--accent); }
details.faq[open] summary .icon { transform: rotate(180deg); }
details.faq p { padding: 0 0 18px; color: var(--muted); max-width: 70ch; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list .icon { color: var(--accent); margin-top: 4px; }

.side-layout { display: grid; gap: 32px; }
@media (min-width: 960px) { .side-layout { grid-template-columns: 220px 1fr; align-items: start; } .side-nav { position: sticky; top: calc(var(--header-h) + 20px); } }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { text-decoration: none; padding: 9px 14px; border-radius: 10px; font-weight: 500; font-size: .93rem; color: var(--muted); }
.side-nav a:hover { background: var(--surface-2); color: var(--accent); }
@media (max-width: 959px) { .side-nav { flex-direction: row; overflow-x: auto; } .side-nav a { white-space: nowrap; } }
.info-block { padding: 8px 0 44px; }
.info-block h2 { font-size: 1.7rem; margin-bottom: 14px; }

/* ---------- Transport ---------- */
.route { display: flex; flex-direction: column; gap: 14px; }
.route h3 { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; }
.route ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .92rem; }
.route li { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.route .fees { display: flex; gap: 20px; margin-top: auto; padding-top: 6px; }
.route .fees b { font-family: var(--font-head); font-size: 1.3rem; display: block; color: var(--accent); }
.route .fees span { font-size: .8rem; color: var(--muted); }

/* ---------- Challan ---------- */
.challan-sheet { background: #fff; color: #111; border: 1px solid #222; padding: 16px; font-size: 12.5px; line-height: 1.45; }
.challan-copies { display: grid; gap: 16px; }
@media (min-width: 1000px) { .challan-copies { grid-template-columns: repeat(3, 1fr); } }
.challan-sheet h4 { font-family: var(--font-body); font-size: 14px; text-align: center; margin: 0; letter-spacing: 0; }
.challan-sheet .sub { text-align: center; font-size: 11px; margin-bottom: 8px; }
.challan-sheet .tag { display: block; text-align: center; font-weight: 700; border: 1px solid #222; padding: 2px; margin: 6px 0 10px; font-size: 11px; }
.challan-sheet dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; }
.challan-sheet dt { font-weight: 600; }
.challan-sheet dd { margin: 0; border-bottom: 1px dotted #888; }
.challan-sheet .amount { margin-top: 10px; border: 2px solid #111; padding: 6px; text-align: center; font-size: 15px; font-weight: 700; }
.challan-sheet .bank { margin-top: 10px; border-top: 1px solid #222; padding-top: 6px; font-size: 11px; }
.challan-sheet .sign { display: flex; justify-content: space-between; margin-top: 26px; font-size: 11px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-deep); color: #c9d8cf; padding: 64px 0 28px; }
.site-footer .cols { display: grid; gap: 36px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-footer h4 { font-family: var(--font-body); font-size: .95rem; font-weight: 650; color: #fff; margin-bottom: 14px; letter-spacing: 0; }
.site-footer a { text-decoration: none; display: block; padding: 3px 0; color: #b4c8bb; font-size: .93rem; }
.site-footer a:hover { color: var(--gold); }
.site-footer .contact-line { display: flex; gap: 10px; font-size: .93rem; margin-bottom: 10px; }
.site-footer .contact-line .icon { margin-top: 4px; color: var(--gold); }
.socials { display: flex; gap: 8px; margin-top: 14px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .22); display: grid; place-items: center; padding: 0; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 40px; padding-top: 20px; font-size: .85rem; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

.page-loading { min-height: 50vh; display: grid; place-items: center; color: var(--muted); }
.notice { border-left: 4px solid var(--gold); background: var(--gold-soft); color: var(--text); padding: 14px 18px; border-radius: 8px; font-size: .92rem; }
[data-theme="dark"] .notice { color: #e9dfb8; }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Chatbot ---------- */
.chat-fab { position: fixed; right: 20px; bottom: 20px; z-index: 70; width: 62px; height: 62px; border-radius: 50%; border: 0; cursor: pointer; background: var(--gold); color: #1d1704; display: grid; place-items: center; box-shadow: 0 10px 28px -6px rgba(8, 43, 31, .55); transition: transform .2s; }
.chat-fab:hover { transform: scale(1.06); }
.chat-fab .icon { width: 28px; height: 28px; }
.chat-fab.hidden { transform: scale(0); pointer-events: none; }
.chat-win { position: fixed; right: 20px; bottom: 20px; z-index: 80; width: min(400px, calc(100vw - 24px)); height: min(640px, calc(100vh - 40px)); height: min(640px, calc(100dvh - 40px)); display: flex; flex-direction: column; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .45); transform-origin: bottom right; opacity: 0; transform: scale(.88) translateY(16px); pointer-events: none; transition: opacity .22s ease, transform .25s cubic-bezier(.2, .8, .2, 1); }
.chat-win.open { opacity: 1; transform: none; pointer-events: auto; }
@media (max-width: 480px) { .chat-win { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; } }
.chat-head { background: var(--green-deep); color: #fff; padding: 14px 14px 14px 18px; display: flex; align-items: center; gap: 10px; }
.chat-head img { width: 36px; height: 36px; }
.chat-head .t { flex: 1; min-width: 0; }
.chat-head b { display: block; font-family: var(--font-head); font-size: 1.02rem; line-height: 1.1; }
.chat-head span { font-size: .75rem; color: #a9bfb2; }
.chat-head .icon-btn { width: 36px; height: 36px; color: #fff; }
.chat-head .icon-btn[aria-pressed="true"] { background: rgba(200, 162, 74, .3); color: var(--gold); }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); scroll-behavior: smooth; }
.msg { max-width: 86%; display: flex; flex-direction: column; gap: 4px; }
.msg.user { align-self: flex-end; align-items: flex-end; }
.msg.bot { align-self: flex-start; }
.bubble { padding: 10px 14px; border-radius: 16px; font-size: .93rem; line-height: 1.55; word-wrap: break-word; overflow-wrap: anywhere; unicode-bidi: plaintext; text-align: start; }
.bubble:lang(ur), .bubble.ur { font-family: var(--font-ur); font-size: 1.05rem; line-height: 1.9; }
.msg.user .bubble { background: var(--green); color: #fff; border-bottom-right-radius: 4px; }
[data-theme="dark"] .msg.user .bubble { background: var(--btn-bg); color: var(--btn-text); }
.msg.bot .bubble { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.err .bubble { background: #fdecea; color: #7a1c14; border-color: #f4c3be; }
[data-theme="dark"] .msg.err .bubble { background: #3a1714; color: #ffb4ad; border-color: #5c2a25; }
.msg .meta { display: flex; align-items: center; gap: 8px; font-size: .72rem; color: var(--muted); }
.speak { border: 0; background: transparent; color: var(--accent); cursor: pointer; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; padding: 0; }
.speak:hover { background: var(--surface-2); }
.speak .icon { width: 16px; height: 16px; }
.speak.loading { opacity: .5; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .2; } }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: bounce 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
.chat-chips { display: flex; gap: 8px; padding: 10px 14px 0; overflow-x: auto; background: var(--surface); border-top: 1px solid var(--line); }
.chat-chips button { white-space: nowrap; border: 1px solid var(--line); background: var(--surface-2); color: var(--accent); padding: 6px 14px; border-radius: 999px; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.chat-chips button:hover { border-color: var(--gold); }
.chat-form { display: flex; align-items: flex-end; gap: 8px; padding: 12px 14px 14px; background: var(--surface); }
.chat-form textarea { flex: 1; resize: none; max-height: 110px; font: inherit; font-size: .93rem; padding: 10px 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--bg); color: var(--text); unicode-bidi: plaintext; }
.chat-form textarea:focus { outline: 2px solid var(--gold); border-color: transparent; }
.chat-form .round { width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; flex: none; }
.chat-form .mic { background: var(--surface-2); color: var(--accent); border: 1px solid var(--line); }
.chat-form .mic.rec { background: #c62828; color: #fff; border-color: #c62828; animation: pulse 1.1s infinite; }
.chat-form .send { background: var(--btn-bg); color: var(--btn-text); }
.chat-form .send:disabled { opacity: .45; cursor: not-allowed; }
.chat-foot { text-align: center; font-size: .7rem; color: var(--muted); padding: 0 12px 10px; background: var(--surface); }

@media print {
  body * { visibility: hidden !important; }
  #challan-print, #challan-print * { visibility: visible !important; }
  #challan-print { position: absolute; left: 0; top: 0; width: 100%; }
  .challan-copies { grid-template-columns: repeat(3, 1fr) !important; gap: 8px; }
  .challan-sheet { font-size: 10px; padding: 8px; }
  @page { size: A4 landscape; margin: 8mm; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
