@font-face { font-family: 'Mukta'; font-weight: 400; font-display: swap; src: url(fonts/mukta-400-devanagari.woff2) format('woff2'); unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A; }
@font-face { font-family: 'Mukta'; font-weight: 400; font-display: swap; src: url(fonts/mukta-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Mukta'; font-weight: 600; font-display: swap; src: url(fonts/mukta-600-devanagari.woff2) format('woff2'); unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A; }
@font-face { font-family: 'Mukta'; font-weight: 600; font-display: swap; src: url(fonts/mukta-600-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Mukta'; font-weight: 700; font-display: swap; src: url(fonts/mukta-700-devanagari.woff2) format('woff2'); unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A; }
@font-face { font-family: 'Mukta'; font-weight: 700; font-display: swap; src: url(fonts/mukta-700-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Tiro Devanagari Marathi'; font-weight: 400; font-display: swap; src: url(fonts/tiro-devanagari-marathi-400-devanagari.woff2) format('woff2'); unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A; }
@font-face { font-family: 'Tiro Devanagari Marathi'; font-weight: 400; font-display: swap; src: url(fonts/tiro-devanagari-marathi-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light;
  --ink: #1f1b16;
  --ink-2: #5e554a;
  --muted: #8a8073;
  --bg: #f7f5f1;
  --card: #ffffff;
  --wash: #fbfaf7;
  --line: #e6e1d8;
  --line-2: #efebe4;
  --gold: #d9d3c9;
  --saffron: #f28c28;
  --saffron-deep: #e07b16;
  --saffron-ink: #9a4a05;
  --saffron-bg: #fff1e6;
  --saffron-line: #ffe2c2;
  --ok: #15803d;
  --ok-bg: #ecf7ef;
  --ok-line: #bfe3cb;
  --err: #c2410c;
  --err-bg: #fff3ec;
  --err-line: #f6cbb4;
  --focus: rgba(242, 140, 40, .35);
  --radius: 10px;
  --serif: "Tiro Devanagari Marathi", Georgia, serif;
  font-size: 17px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Mukta, "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  padding-bottom: env(safe-area-inset-bottom);
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--saffron-ink); }

/* Header + menu */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--card); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.topbar-inner { max-width: 960px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 8px 16px; min-height: 56px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.05rem; line-height: 1.1; margin-right: auto; min-width: 0; }
.brand img { width: 30px; height: 30px; flex: none; }
.brand b { color: var(--saffron-deep); font-weight: 700; }
.nav-desk { display: none; gap: 22px; font-size: .95rem; }
.nav-desk a, .menu-pop a { color: var(--ink-2); text-decoration: none; }
.nav-desk a:hover, .nav-desk a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--saffron); text-underline-offset: 6px; text-decoration-thickness: 2px; }
#langSwitch { background: var(--wash); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: .9rem; font-weight: 600; }
.menu { position: relative; }
.menu > summary { list-style: none; width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; font-size: 1.3rem; color: var(--ink); }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover, .menu[open] > summary { background: var(--wash); }
.menu-pop { position: absolute; right: 0; top: 46px; width: 240px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 8px 24px rgba(31, 27, 22, .08); z-index: 40; }
.menu-pop a { display: block; padding: 10px 12px; border-radius: 8px; }
.menu-pop a:hover, .menu-pop a[aria-current="page"] { background: var(--saffron-bg); color: var(--ink); }
@media (min-width: 820px) { .nav-desk { display: flex; } .menu { display: none; } }

.steps { list-style: none; margin: 0 auto; padding: 8px 16px 10px; max-width: 680px; display: flex; counter-reset: step; }
.steps li { flex: 1; position: relative; counter-increment: step; font-size: .74rem; text-align: center; color: var(--muted); }
.steps li::before {
  content: counter(step); display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; margin: 0 auto 3px; border-radius: 50%;
  border: 2px solid var(--gold); background: #fff; color: var(--muted); font-weight: 700; font-size: .8rem;
  position: relative; z-index: 1;
}
.steps li + li::after { content: ""; position: absolute; top: 13px; right: 50%; width: 100%; height: 2px; background: var(--line); }
.steps li.done::before { content: "✓"; background: var(--saffron); border-color: var(--saffron); color: var(--ink); }
.steps li.done + li::after, .steps li.now::after { background: var(--saffron); }
.steps li.now::before { background: var(--ink); border-color: var(--ink); color: #fff; }
.steps li.now { color: var(--ink); font-weight: 700; }

main { max-width: 680px; margin: 0 auto; padding: 18px 16px 24px; outline: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--ink); }
h1 { font-size: 1.65rem; line-height: 1.3; margin: 4px 0 8px; }
h2 { font-size: 1.25rem; line-height: 1.35; margin: 22px 0 8px; }
h3 { font-size: 1.08rem; margin: 0 0 6px; }
.lead { color: var(--ink-2); margin: 0 0 16px; }
.muted { color: var(--muted); font-size: .88rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 14px; }
.loading { text-align: center; color: var(--muted); padding: 40px 0; }
.notice { background: var(--wash); border: 1px solid var(--line); border-left: 4px solid var(--saffron); border-radius: var(--radius); padding: 12px 14px; font-size: .86rem; color: var(--ink-2); }
.deadline { display: inline-flex; align-items: center; gap: 6px; background: var(--saffron-bg); color: var(--saffron-ink); border: 1px solid var(--saffron-line); border-radius: 999px; padding: 4px 12px; font-size: .86rem; font-weight: 600; margin-bottom: 12px; }
.deadline::before { content: "⏱"; }

.lang-grid { display: grid; gap: 10px; margin: 12px 0 18px; }
.lang-btn {
  display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 60px; padding: 12px 16px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); font-size: 1.2rem; font-weight: 700; color: var(--ink); cursor: pointer;
}
.lang-btn[aria-pressed="true"] { border: 2px solid var(--saffron); background: var(--saffron-bg); }
.lang-btn small { font-weight: 400; color: var(--muted); font-size: .86rem; }

.field { margin-bottom: 14px; }
.field label, .field .label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 5px; color: var(--ink); }
.field .req { color: var(--err); }
.field .opt { color: var(--muted); font-weight: 400; font-size: .8rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--gold); background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--saffron); }
.field input:disabled, .field select:disabled { background: var(--wash); color: var(--muted); }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.field .error { display: none; color: var(--err); font-size: .82rem; margin-top: 4px; font-weight: 600; }
.field.invalid input, .field.invalid select { border-color: var(--err); background: var(--err-bg); }
.field.invalid .error { display: block; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

details.section { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
details.section > summary {
  list-style: none; cursor: pointer; padding: 13px 16px; font-weight: 700; color: var(--ink);
  display: flex; justify-content: space-between; gap: 8px; align-items: center; border-left: 4px solid var(--saffron);
}
details.section[open] > summary { background: var(--wash); border-bottom: 1px solid var(--line); }
details.section > summary::-webkit-details-marker { display: none; }
details.section > summary::after { content: "▾"; color: var(--muted); transition: transform .2s; }
details.section[open] > summary::after { transform: rotate(180deg); }
details.section > summary .count { margin-left: auto; font-weight: 600; font-size: .76rem; color: var(--saffron-ink); background: var(--saffron-bg); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.q { padding: 14px 16px; border-top: 1px solid var(--line-2); }
.q:first-of-type { border-top: 0; }
.q-text { margin: 0 0 10px; font-size: .96rem; }
.q-text b { color: var(--saffron-deep); margin-right: 5px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; border: 0; margin: 0; padding: 0; }
.chips legend { font-size: .82rem; color: var(--muted); font-weight: 600; padding: 0; margin-bottom: 4px; width: 100%; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 14px 8px 10px;
  border-radius: 8px; border: 1px solid var(--gold); background: #fff; font-size: .92rem; font-weight: 600; color: var(--ink-2);
}
.chip span::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--gold); flex: 0 0 16px; background: #fff; }
.chip input:checked + span { border-color: var(--saffron); background: var(--saffron-bg); color: var(--ink); }
.chip input:checked + span::before { border-color: var(--saffron-deep); background: radial-gradient(circle, var(--saffron-deep) 0 4px, #fff 5px); }
.chip input:focus-visible + span { outline: 3px solid var(--focus); }
.reason { margin: 10px 0 0; font-size: .84rem; color: var(--ink-2); background: var(--wash); border-left: 3px solid var(--saffron); padding: 6px 10px; border-radius: 0 6px 6px 0; }
.reason .star { color: var(--saffron-deep); font-weight: 700; }
.age-row { display: grid; gap: 10px; }

.essay textarea { min-height: 220px; line-height: 1.6; font-size: .94rem; resize: vertical; }
.opt-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.opt-chips::-webkit-scrollbar { display: none; }
.opt-chips button { flex: 0 0 auto; max-width: 230px; text-align: left; border: 1px solid var(--gold); background: #fff; border-radius: 8px; padding: 8px 12px; font-size: .82rem; line-height: 1.3; cursor: pointer; color: var(--ink-2); }
.opt-chips button[aria-pressed="true"] { border-color: var(--saffron); background: var(--saffron); color: var(--ink); font-weight: 600; }
.counter { text-align: right; font-size: .78rem; color: var(--muted); margin-top: 4px; }
.counter.over { color: var(--err); font-weight: 700; }
.edited { font-size: .78rem; color: var(--saffron-ink); }

.summary dl { display: grid; grid-template-columns: auto 1fr; gap: 0; margin: 0; font-size: .92rem; }
.summary dt, .summary dd { padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.summary dt { color: var(--muted); padding-right: 14px; }
.summary dd { margin: 0; font-weight: 600; word-break: break-word; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; padding: 12px; margin: 4px 0 8px; cursor: pointer; background: var(--wash); border: 1px solid var(--line); border-radius: 8px; }
.consent input { width: 22px; height: 22px; flex: 0 0 22px; margin-top: 2px; accent-color: var(--saffron-deep); }
.warn { background: var(--err-bg); color: var(--err); border: 1px solid var(--err-line); border-radius: 8px; padding: 12px 14px; font-weight: 600; font-size: .9rem; }
.linkrow { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 50px; padding: 12px 20px; border-radius: 8px; border: 1px solid transparent; font-weight: 700; font-size: 1rem; cursor: pointer; text-decoration: none; transition: background-color .15s, transform .15s; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn-primary, .btn-saffron, .btn-wa { background: var(--saffron); color: var(--ink); }
.btn-primary:hover, .btn-saffron:hover, .btn-wa:hover { background: var(--saffron-deep); }
.btn-primary:disabled { background: var(--gold); color: var(--ink-2); cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--gold); }
.btn-ghost:hover { background: var(--wash); }
.btn-small { min-height: 40px; padding: 7px 14px; font-size: .88rem; }
.btn-block { width: 100%; }
.btn.busy { background: var(--saffron-bg); color: var(--saffron-ink); cursor: progress; }
.bottombar { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -2px 8px rgba(31, 27, 22, .05); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); z-index: 9; }
.bottombar-inner { max-width: 680px; margin: 0 auto; display: flex; gap: 10px; }
.bottombar .btn-primary { flex: 1; }
.bottombar .btn-ghost { min-width: 56px; }
body:has(.bottombar) .footer { padding-bottom: 110px; }

.toast { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 8px; font-size: .9rem; z-index: 20; max-width: calc(100% - 32px); text-align: center; box-shadow: 0 4px 14px rgba(0, 0, 0, .2); }

/* Footer */
.footer { border-top: 1px solid var(--line); background: var(--card); color: var(--ink-2); font-size: .84rem; text-align: center; padding: 18px 16px 24px; }
.footer p { max-width: 680px; margin: 0 auto 8px; }
.footer .foot-date { font-weight: 700; color: var(--saffron-ink); }
.footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; }
.footer a { color: var(--ink-2); }

/* Info pages */
.page .kicker { color: var(--saffron-deep); font-weight: 600; font-size: .9rem; margin: 6px 0 0; }
.page h1 { font-size: 1.9rem; }
.page p, .page li { color: var(--ink-2); }
.page ul { padding-left: 20px; margin: 8px 0; }
.page li { margin-bottom: 6px; }
.page blockquote { margin: 12px 0; padding: 14px 16px; background: var(--saffron-bg); border-left: 4px solid var(--saffron); border-radius: 0 8px 8px 0; font-family: var(--serif); font-size: 1.08rem; color: var(--ink); }
.page blockquote cite { display: block; margin-top: 6px; font-family: Mukta, sans-serif; font-style: normal; font-size: .84rem; color: var(--saffron-ink); }
.page .toc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 14px 0; }
.page .toc a { display: block; padding: 3px 0; }
.page .twocol { display: grid; gap: 12px; margin: 10px 0; }
.page .twocol > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.page .twocol .yes { border-top: 4px solid var(--saffron); }
.page .twocol .no { border-top: 4px solid var(--ink); }
.page .reasons { counter-reset: r; list-style: none; padding: 0; }
.page .reasons > li { counter-increment: r; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 14px 62px; position: relative; margin-bottom: 12px; }
.page .reasons > li::before { content: counter(r); position: absolute; left: 16px; top: 16px; width: 32px; height: 32px; border-radius: 50%; background: var(--saffron-bg); color: var(--saffron-ink); font-weight: 700; display: grid; place-items: center; }
.page .reasons p { margin: 0 0 8px; }
.page .tags { font-size: .8rem; color: var(--muted); }
.page .tags span { display: inline-block; background: var(--wash); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; margin: 2px 4px 2px 0; color: var(--ink-2); }
.page .cta { margin: 22px 0 8px; }
.back { display: inline-block; margin-bottom: 6px; font-size: .92rem; text-decoration: none; }

@media (min-width: 560px) {
  .age-row { grid-template-columns: 1fr 1fr; }
  .page .twocol { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Submission result + modal */
body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(31, 27, 22, .5); display: flex; align-items: flex-end; justify-content: center; }
.modal-sheet { background: #fff; width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 24px rgba(0, 0, 0, .15); outline: none; animation: sheet-up .22s ease-out; }
@media (min-width: 600px) { .modal { align-items: center; } .modal-sheet { border-radius: 14px; } }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .modal-sheet { animation: none; } }
.result { text-align: center; }
.result > * { margin-left: auto; margin-right: auto; }
.result-icon { width: 60px; height: 60px; border-radius: 50%; background: var(--saffron); color: var(--ink); font-size: 30px; font-weight: 700; display: grid; place-items: center; margin-bottom: 12px; }
.result-icon.ok { background: var(--ok); color: #fff; }
.result-icon-warn { background: var(--err); color: #fff; }
.result h2 { font-size: 1.45rem; margin: 0 0 8px; }
.result > p { color: var(--ink-2); font-size: .94rem; margin: 0 0 14px; }
.refbox { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; background: var(--wash); }
.refbox span { font-size: .86rem; color: var(--ink-2); }
.refbox strong { font-size: 1.08rem; color: var(--ink); letter-spacing: .3px; white-space: nowrap; }
.govbox { display: flex; gap: 10px; text-align: left; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; border: 1px solid; }
.govbox strong { display: block; font-size: .94rem; }
.govbox p { margin: 4px 0 0; font-size: .88rem; color: var(--ink-2); }
.govbox-icon { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700; color: #fff; }
.gov-ok { background: var(--ok-bg); border-color: var(--ok-line); }
.gov-ok strong { color: var(--ok); }
.gov-ok .govbox-icon { background: var(--ok); }
.gov-wait { background: var(--saffron-bg); border-color: var(--saffron-line); }
.gov-wait strong { color: var(--saffron-ink); }
.gov-wait .govbox-icon { background: var(--saffron-deep); }
.gov-bad { background: var(--err-bg); border-color: var(--err-line); }
.gov-bad strong { color: var(--err); }
.gov-bad .govbox-icon { background: var(--err); }
.offno b { color: var(--ink); }
.refnote { font-size: .8rem !important; color: var(--muted) !important; }
.result .btn { margin-top: 8px; }
