/* ==========================================================================
   ISSF Education Support Portal — design system
   Green & white identity, Bengali-first typography, mobile-first layout.
   ========================================================================== */
@font-face {
  font-family: 'Hind Siliguri';
  src: url('/assets/fonts/HindSiliguri-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Hind Siliguri';
  src: url('/assets/fonts/HindSiliguri-Bold.ttf') format('truetype');
  font-weight: 500 800;
  font-display: swap;
}

:root {
  --green: #0b7a4b;
  --green-600: #08653f;
  --green-800: #064530;
  --green-50: #eef7f2;
  --green-100: #d8ece1;
  --gold: #c8a24a;
  --gold-50: #fdf7e8;
  --ink: #16241f;
  --ink-2: #3d4f48;
  --muted: #5f706a;
  --line: #dfe8e4;
  --bg: #f7faf8;
  --white: #fff;
  --red: #b4291f;
  --red-50: #fdeeed;
  --amber: #a86a00;
  --amber-50: #fdf4e3;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(9, 48, 35, .06), 0 1px 3px rgba(9, 48, 35, .05);
  --shadow: 0 6px 24px rgba(9, 48, 35, .08);
  --shadow-lg: 0 18px 50px rgba(9, 48, 35, .12);
  --max: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Hind Siliguri', 'Noto Sans Bengali', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--green-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; color: var(--green-800); font-weight: 700; }
h1 { font-size: clamp(1.7rem, 4.4vw, 2.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.3rem, 3vw, 1.75rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; margin: 0 0 1rem; }
li { margin-bottom: .35rem; }
small, .small { font-size: .86rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section--tight { padding: 36px 0; }
.section--green { background: var(--green-50); }

/* ------------------------------- header -------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  display: flex; align-items: center; gap: 14px;
  min-height: 68px; padding-block: 8px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand img { width: 46px; height: 46px; border-radius: 50%; flex: none; }
.brand .name { font-weight: 700; color: var(--green-800); line-height: 1.15; font-size: 1rem; }
.brand .sub { font-size: .74rem; color: var(--muted); line-height: 1.2; }
.nav { margin-left: auto; display: none; gap: 16px; align-items: center; }
.nav a { color: var(--ink-2); font-size: .9rem; white-space: nowrap; }
.nav a:hover { color: var(--green-600); text-decoration: none; }
@media (min-width: 1024px) { .nav { display: flex; gap: 18px; } }
@media (min-width: 1180px) { .nav { gap: 24px; } .nav a { font-size: .95rem; } }
@media (max-width: 1179px) { .brand .sub { display: none; } .brand .name { font-size: .92rem; } }
@media (max-width: 1099px) { .nav { gap: 13px; } .nav a { font-size: .84rem; } .site-header .btn--sm { padding: 6px 14px; } }
/* keep button colours readable inside the header (link colour must not win) */
.site-header .btn--primary { color: #fff; }
.site-header .btn--gold { color: #26300f; }
.site-header .btn--ghost { color: var(--green-600); }

/* ------------------------------- buttons ------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 22px;
  border: 1px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 600; letter-spacing: .1px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--green); color: #fff; box-shadow: 0 6px 18px rgba(11, 122, 75, .22); }
.btn--primary:hover { background: var(--green-600); }
.btn--gold { background: var(--gold); color: #26300f; }
.btn--ghost { background: #fff; color: var(--green-600); border-color: var(--green-100); }
.btn--ghost:hover { background: var(--green-50); }
.btn--danger { background: var(--red); color: #fff; }
.btn--sm { min-height: 38px; padding: 6px 16px; font-size: .9rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* -------------------------------- cards -------------------------------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
}
.card--pad-lg { padding: 30px; }
.grid { display: grid; gap: 18px; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .grid--2 { grid-template-columns: 1fr 1fr; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  background: var(--green-50); color: var(--green-600); border: 1px solid var(--green-100);
}
.pill--gold { background: var(--gold-50); color: #7a5a12; border-color: #efe0bc; }
.pill--red { background: var(--red-50); color: var(--red); border-color: #f6d3d0; }
.pill--amber { background: var(--amber-50); color: var(--amber); border-color: #f0dfba; }
.pill--grey { background: #f1f5f3; color: var(--ink-2); border-color: var(--line); }

/* --------------------------------- hero -------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(200, 162, 74, .18), transparent 60%),
    linear-gradient(160deg, #075c38 0%, #0b7a4b 55%, #0e8a55 100%);
  color: #fff;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px);
  background-size: 22px 22px; opacity: .5; pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; padding-block: 54px 60px; }
.hero h1 { color: #fff; }
.hero p.lead { font-size: 1.08rem; color: #dbeee5; max-width: 60ch; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
  padding: 5px 14px; border-radius: 999px; font-size: .82rem; margin-bottom: 18px;
}
.hero .grid { align-items: center; }
.hero-figure {
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 18px; padding: 18px; backdrop-filter: blur(4px);
}
.hero-figure img { width: 128px; margin: 0 auto 12px; }
.hero-figure .kv { display: grid; gap: 8px; font-size: .88rem; color: #d9ece4; }
.hero-figure .kv div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed rgba(255,255,255,.18); padding-bottom: 6px; }
.hero-figure .kv b { color: #fff; font-weight: 600; }

.stat-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 26px; }
@media (min-width: 720px) { .stat-strip { grid-template-columns: repeat(4, 1fr); } }
.stat-strip .stat {
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px; padding: 12px 14px;
}
.stat-strip .n { font-size: 1.2rem; font-weight: 700; color: #fff; line-height: 1.25; }
@media (min-width: 900px) { .stat-strip .n { font-size: 1.32rem; } }
.stat-strip .l { font-size: .78rem; color: #cfe6dc; }

/* -------------------------------- steps -------------------------------- */
.steps { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.steps .step {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px; font-size: .84rem;
  background: #fff; border: 1px solid var(--line); color: var(--muted);
}
.steps .step .dot {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: #eef2f0; color: var(--muted); font-size: .74rem; font-weight: 700;
}
.steps .step.is-active { border-color: var(--green); color: var(--green-600); background: var(--green-50); }
.steps .step.is-active .dot { background: var(--green); color: #fff; }
.steps .step.is-done .dot { background: var(--green-100); color: var(--green-600); }

.progress { height: 6px; background: var(--green-100); border-radius: 999px; overflow: hidden; margin-bottom: 26px; }
.progress > i { display: block; height: 100%; width: 20%; background: var(--green); transition: width .3s ease; }

/* --------------------------------- form -------------------------------- */
.form-shell { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
@media (min-width: 720px) { .form-shell { padding: 34px; } }

fieldset { border: 0; padding: 0; margin: 0 0 8px; }
legend { font-size: 1.05rem; font-weight: 700; color: var(--green-800); padding: 0; margin-bottom: 4px; }
.field-help { font-size: .82rem; color: var(--muted); margin: 0 0 12px; }

.form-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .span-2 { grid-column: span 2; } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .label { font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.field .req { color: var(--red); }
.field .hint { font-size: .78rem; color: var(--muted); font-weight: 400; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field input[type="date"],
.field input[type="number"], .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 13px;
  border: 1px solid #cfdad5; border-radius: var(--radius-sm);
  font: inherit; font-size: .96rem; color: var(--ink); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(11, 122, 75, .14);
}
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--red); }
.field .error { color: var(--red); font-size: .8rem; min-height: 1em; }
.field .error:empty { display: none; }

.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-row label {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid #cfdad5; border-radius: 999px; padding: 8px 14px;
  font-size: .9rem; cursor: pointer; background: #fff;
}
.radio-row label:hover { border-color: var(--green); }
.radio-row input { accent-color: var(--green); margin: 0; }
.radio-row input:checked + span { font-weight: 600; color: var(--green-600); }
.radio-row label:has(input:checked) { border-color: var(--green); background: var(--green-50); }

.check-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .check-grid { grid-template-columns: 1fr 1fr; } }
.check-grid label, .check-line {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid #cfdad5; border-radius: var(--radius-sm);
  padding: 11px 13px; font-size: .92rem; cursor: pointer; background: #fff;
}
.check-grid label:hover { border-color: var(--green); }
.check-grid label:has(input:checked), .check-line:has(input:checked) { border-color: var(--green); background: var(--green-50); }
.check-grid input, .check-line input { margin-top: 4px; accent-color: var(--green); flex: none; }

/* uploads */
.upload-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .upload-grid { grid-template-columns: 1fr 1fr; } }
.upload-box {
  border: 1.5px dashed #c3d3cb; border-radius: var(--radius-sm); padding: 14px;
  background: #fbfdfc; transition: border-color .15s, background .15s;
}
.upload-box.has-file { border-style: solid; border-color: var(--green); background: var(--green-50); }
.upload-box .uhead { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.upload-box .utitle { font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.upload-box .utag { font-size: .72rem; color: var(--muted); }
.upload-box input[type="file"] {
  width: 100%; font: inherit; font-size: .84rem; margin-top: 8px; color: var(--ink-2);
}
.upload-box input[type="file"]::file-selector-button {
  font: inherit; font-size: .82rem; margin-right: 10px; padding: 7px 12px;
  border: 1px solid var(--green-100); background: #fff; color: var(--green-600);
  border-radius: 8px; cursor: pointer;
}
.upload-box .picked { font-size: .8rem; color: var(--green-600); margin-top: 6px; word-break: break-all; }
.photo-preview { margin-top: 10px; display: flex; align-items: center; gap: 12px; }
.photo-preview img { width: 76px; height: 92px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: none; }
.photo-preview img.on { display: block; }

.form-actions {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line);
}

.alert { border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 18px; font-size: .92rem; border: 1px solid; }
.alert--error { background: var(--red-50); border-color: #f0cbc7; color: #8b2119; }
.alert--ok { background: var(--green-50); border-color: var(--green-100); color: #0a5537; }
.alert--warn { background: var(--amber-50); border-color: #f0dfba; color: #7a5200; }
.alert ul { margin: 6px 0 0; }

/* -------------------------------- tables ------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 720px; }
table.data th {
  text-align: left; padding: 12px 14px; background: #f4f8f6; color: var(--green-800);
  font-weight: 600; font-size: .82rem; white-space: nowrap; border-bottom: 1px solid var(--line);
}
table.data td { padding: 12px 14px; border-bottom: 1px solid #eff4f1; vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #fafcfb; }
table.data a { font-weight: 600; }

dl.kv-list { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; }
@media (min-width: 640px) { dl.kv-list { grid-template-columns: 1fr 1fr; column-gap: 26px; } }
dl.kv-list > div { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid #eff4f1; }
dl.kv-list dt { color: var(--muted); font-size: .88rem; }
dl.kv-list dd { margin: 0; font-weight: 600; text-align: right; font-size: .92rem; word-break: break-word; }

/* -------------------------------- footer ------------------------------- */
.site-footer { background: #06382a; color: #cde2d8; margin-top: 40px; padding: 42px 0 26px; font-size: .9rem; }
.site-footer a { color: #eaf5ef; }
.site-footer .grid { gap: 26px; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .14); margin-top: 28px; padding-top: 16px; font-size: .8rem; color: #a7c6b8; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }

/* -------------------------------- misc --------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  background: #10281f; color: #fff; padding: 12px 20px; border-radius: 999px;
  font-size: .9rem; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; z-index: 200; max-width: 90vw; text-align: center;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.skeleton { background: linear-gradient(90deg, #eef3f0 25%, #f7faf8 37%, #eef3f0 63%); background-size: 400% 100%; animation: sk 1.2s infinite; border-radius: 8px; height: 14px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 18px 26px; border-left: 2px solid var(--green-100); margin: 0; }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px;
  border-radius: 50%; background: #fff; border: 2px solid var(--green);
}
.timeline .t-when { font-size: .78rem; color: var(--muted); }
.timeline .t-what { font-weight: 600; font-size: .95rem; color: var(--ink); }

.summary-box { background: var(--green-50); border: 1px solid var(--green-100); border-radius: var(--radius); padding: 18px; }
.summary-box .big { font-size: 1.5rem; font-weight: 700; color: var(--green-600); letter-spacing: .5px; }

.notice-strip { background: var(--gold-50); border-bottom: 1px solid #efe0bc; color: #6b4f10; font-size: .88rem; padding: 9px 0; }
.notice-strip .wrap { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 999; background: #fff; padding: 8px 14px; border-radius: 8px; }

@media print {
  .site-header, .site-footer, .no-print, .notice-strip { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ccc; }
}

/* --- inline icons (replace colour emoji so Bengali webfonts render consistently) --- */
svg.ico { vertical-align: -0.18em; flex: 0 0 auto; }
h3 > svg.ico, .eyebrow svg.ico { color: var(--green-600); margin-right: 6px; }
.notice svg.ico, .topbar svg.ico { margin-right: 4px; }
.tick { color: var(--green-600); display: inline-flex; }
.tick svg.ico { width: 15px; height: 15px; }
li > svg.ico { color: var(--green-600); }

/* extra alert tone used by the MFA / help panels */
.alert--info { background: #eef6fb; border-color: #bfd9ea; color: #17475f; }

/* ------------------------- language switch (BN / EN) ------------------------ */
.lang-switch {
  display: inline-flex; align-items: stretch; flex: 0 0 auto;
  border: 1px solid var(--line); background: #fff; border-radius: 14px;
  padding: 3px; gap: 3px; box-shadow: 0 1px 2px rgba(12, 48, 36, .05);
}
.lang-switch button {
  font: inherit; font-size: .84rem; font-weight: 600; line-height: 1;
  padding: 8px 16px; min-width: 58px;
  border: 0; border-radius: 11px;
  background: transparent; color: var(--ink, #1f2b28); cursor: pointer;
  white-space: nowrap; transition: background .15s ease, color .15s ease;
}
.lang-switch button:hover { background: #eef7f2; color: var(--green-800, #0b5c3c); }
.lang-switch button.on {
  background: #a9e5c6;                 /* light green segment, as in the approved design */
  color: var(--green-800, #0b5c3c); font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(11, 92, 60, .10);
}
.lang-switch button:focus-visible { outline: 2px solid var(--green, #0b7a4b); outline-offset: 2px; }
.site-header .bar { flex-wrap: wrap; }
@media (max-width: 560px) {
  .lang-switch button { padding: 7px 12px; min-width: 46px; font-size: .78rem; }
  .lang-switch { border-radius: 12px; }
}
}
