/* Scholarship Bonafide Certificate Portal
   Mobile-first, no framework, no webfonts — most students arrive on a phone
   over a slow connection, so the whole stylesheet stays small and render-blocking
   work stays near zero. */

:root {
  --brand: #c20002;
  --brand-dark: #8e0001;
  --brand-tint: #fdf2f2;
  --ink: #16191d;
  --ink-2: #454c55;
  --ink-3: #6b737d;
  --line: #e2e6ea;
  --line-2: #cfd5dc;
  --bg: #f4f6f8;
  --card: #ffffff;
  --ok: #0a7a3d;
  --ok-bg: #eaf7ef;
  --warn: #8a5a00;
  --warn-bg: #fff6e5;
  --err: #b3261e;
  --err-bg: #fdecea;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; height: auto; }
a { color: var(--brand-dark); }
a:hover { color: var(--brand); }

/* ---------- layout ---------- */

.wrap { width: 100%; max-width: 940px; margin: 0 auto; padding: 0 16px; }
.wrap-narrow { max-width: 620px; }
.wrap-wide { max-width: 1240px; }

.site-header {
  background: var(--card);
  border-bottom: 3px solid var(--brand);
  box-shadow: var(--shadow);
}
/* On a phone the brand sits on row 1 and the links scroll horizontally on row 2,
   so the header never eats a third of the screen. */
.site-header .bar {
  display: grid; grid-template-columns: auto 1fr; align-items: center;
  column-gap: 11px; row-gap: 6px; padding: 10px 0;
}
.site-header .mark {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%;
  background: var(--brand-tint); display: grid; place-items: center;
  color: var(--brand); font-weight: 700; font-size: 14px;
}
.site-header .brand { min-width: 0; }
.site-header h1 {
  margin: 0; font-size: 15px; line-height: 1.2; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.site-header .sub {
  margin: 0; font-size: 11.5px; color: var(--ink-3); line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.site-header nav {
  grid-column: 1 / -1; display: flex; gap: 2px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; margin: 0 -16px; padding: 0 16px;
}
.site-header nav::-webkit-scrollbar { display: none; }
.site-header nav a {
  font-size: 13.5px; padding: 6px 10px; border-radius: 7px;
  text-decoration: none; color: var(--ink-2); white-space: nowrap;
}
.site-header nav a:hover { background: var(--bg); color: var(--ink); }

main { padding: 22px 0 56px; }

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: 20px 0;
  font-size: 13px;
  color: var(--ink-3);
}
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; }
.site-footer a { color: var(--ink-2); }

/* ---------- cards & headings ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
}
.card > h2, .card > h3 { margin-top: 0; }

h2 { font-size: 19px; margin: 0 0 4px; letter-spacing: -.01em; }
h3 { font-size: 16px; margin: 0 0 4px; }
.lede { color: var(--ink-3); font-size: 14.5px; margin: 0 0 16px; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); font-weight: 700; margin: 0 0 10px; }

/* ---------- steps ---------- */

.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 18px; flex-wrap: wrap; }
.steps li {
  flex: 1 1 auto; min-width: 84px; font-size: 12px; color: var(--ink-3);
  padding: 7px 4px 0; border-top: 3px solid var(--line-2); text-align: center;
}
.steps li.done { border-top-color: var(--ok); color: var(--ok); }
.steps li.now { border-top-color: var(--brand); color: var(--brand); font-weight: 700; }

/* ---------- college picker ---------- */

.college-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.college-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--brand);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; text-decoration: none; color: inherit;
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.college-card:hover, .college-card:focus-visible {
  box-shadow: 0 4px 14px rgba(16, 24, 40, .12); transform: translateY(-1px); color: inherit;
}
.college-card .logo { width: 62px; height: 62px; flex: 0 0 62px; object-fit: contain; }
.college-card .name { font-weight: 700; font-size: 15.5px; line-height: 1.3; }
.college-card .meta { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.college-card .courses { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.college-card .go { margin-left: auto; align-self: center; color: var(--brand); font-size: 22px; }

.pill {
  display: inline-block; font-size: 11.5px; line-height: 1.5;
  padding: 2px 8px; border-radius: 999px;
  background: var(--brand-tint); color: var(--brand-dark); border: 1px solid #f3d4d4;
}

/* ---------- letterhead preview ---------- */

.letterhead {
  display: flex; gap: 14px; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  background: linear-gradient(#fff, #fcfcfd);
}
.letterhead img { width: 58px; height: 58px; flex: 0 0 58px; object-fit: contain; }
.letterhead .t1 { font-weight: 700; font-size: 15px; line-height: 1.25; }
.letterhead .t2 { font-size: 12.5px; color: var(--ink-3); }

/* ---------- forms ---------- */

.field { margin-bottom: 14px; }
.field > label, .field > .label {
  display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px;
}
.field .hint { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.req { color: var(--brand); }

input[type=text], input[type=tel], input[type=email], input[type=number],
input[type=password], input[type=date], input[type=search], select, textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;                 /* 16px stops iOS Safari zooming on focus */
  color: var(--ink);
  background: #fff;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  appearance: none;
  -webkit-appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b737d' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(194, 0, 2, .12);
}
input[disabled], select[disabled] { background: #f2f4f6; color: var(--ink-3); cursor: not-allowed; }
input.err, select.err { border-color: var(--err); }
.field .msg { font-size: 12.5px; color: var(--err); margin-top: 4px; }

.grid2 { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
.grid3 { display: grid; gap: 0 14px; grid-template-columns: 1fr; }

.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-row label {
  flex: 1 1 auto; min-width: 88px; text-align: center; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 10px;
  font-size: 14.5px; background: #fff;
}
.radio-row input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-row input:checked + span { color: var(--brand-dark); font-weight: 700; }
.radio-row label:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 15px; font-weight: 600;
  padding: 11px 18px; min-height: 44px;
  border-radius: 8px; border: 1px solid transparent;
  background: var(--brand); color: #fff;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn:disabled, .btn[aria-disabled=true] { opacity: .55; cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--ink-2); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--bg); color: var(--ink); }
.btn-ok { background: var(--ok); }
.btn-ok:hover { background: #075c2e; }
.btn-sm { font-size: 13.5px; padding: 7px 12px; min-height: 36px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.btn-row .grow { flex: 1 1 200px; }

/* ---------- notices ---------- */

.note { border-radius: 8px; padding: 11px 14px; font-size: 14px; margin-bottom: 14px; border: 1px solid; }
.note-ok   { background: var(--ok-bg);   border-color: #bfe3cd; color: #08492a; }
.note-warn { background: var(--warn-bg); border-color: #f0dcb0; color: #6b4600; }
.note-err  { background: var(--err-bg);  border-color: #f3c7c3; color: #8c1d18; }
.note-info { background: #eef4fd;        border-color: #cbdcf7; color: #1d3f72; }
.note strong { display: block; }

/* ---------- data display ---------- */

.dl { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; }
.dl > div {
  display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line);
  font-size: 14.5px;
}
.dl > div:last-child { border-bottom: 0; }
.dl dt { flex: 0 0 44%; color: var(--ink-3); margin: 0; font-size: 13.5px; }
.dl dd { margin: 0; font-weight: 600; word-break: break-word; }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; }
table.data th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-3); background: #fafbfc; font-weight: 700; white-space: nowrap; }
table.data tbody tr:hover { background: #fafbfc; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -18px; padding: 0 18px; }

.fee-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.fee-table td { padding: 9px 12px; border: 1px solid var(--line-2); }
.fee-table td.amt { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fee-table tr.total td { font-weight: 700; background: #fafbfc; }

/* ---------- payment ---------- */

.pay-box { text-align: center; }
.pay-amount { font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.pay-qr {
  display: inline-block; padding: 12px; background: #fff;
  border: 1px solid var(--line-2); border-radius: 12px; margin: 12px 0 6px;
}
.pay-qr svg, .pay-qr img { display: block; width: 216px; height: 216px; }
.pay-vpa {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px; background: var(--bg); border: 1px dashed var(--line-2);
  border-radius: 8px; padding: 8px 12px; display: inline-block; margin-top: 4px;
  user-select: all;
}
.upi-apps { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }

/* ---------- status badges ---------- */

.badge { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .03em;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap; text-transform: uppercase; }
.badge-ok   { background: var(--ok-bg);   color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-err  { background: var(--err-bg);  color: var(--err); }
.badge-mute { background: #eef0f3;        color: var(--ink-3); }

/* ---------- verification result ---------- */

.verify-hero { text-align: center; padding: 24px 16px; border-radius: var(--radius); margin-bottom: 18px; }
.verify-hero.ok  { background: var(--ok-bg);  border: 1px solid #bfe3cd; }
.verify-hero.bad { background: var(--err-bg); border: 1px solid #f3c7c3; }
.verify-hero .icon { font-size: 40px; line-height: 1; }
.verify-hero h2 { margin: 8px 0 2px; }

/* ---------- utilities ---------- */

.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.center { text-align: center; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.mt16 { margin-top: 16px; } .mb16 { margin-bottom: 16px; }
.nowrap { white-space: nowrap; }
.hide { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- wider screens ---------- */

@media (min-width: 620px) {
  .grid2 { grid-template-columns: 1fr 1fr; }
  .grid3 { grid-template-columns: 1fr 1fr 1fr; }
  .dl { grid-template-columns: 1fr 1fr; gap: 0 26px; }
  .card { padding: 22px; }

  .site-header .bar {
    grid-template-columns: auto 1fr auto; min-height: 62px; row-gap: 0; padding: 12px 0;
  }
  .site-header .mark { width: 40px; height: 40px; flex-basis: 40px; font-size: 15px; }
  .site-header h1 { font-size: 17px; }
  .site-header .sub { font-size: 12.5px; }
  .site-header nav {
    grid-column: auto; justify-self: end; overflow: visible; margin: 0; padding: 0; gap: 4px;
  }
  .steps li { min-width: 0; }
}

@media (min-width: 900px) {
  .college-grid { grid-template-columns: 1fr; }
}

@media print {
  .site-header, .site-footer, .btn-row, .steps, .no-print { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 0; }
}
