/* SevaAI, phone first. Designed at 360-430 px wide; wider screens get the same column, centred. */
:root {
  --bg: #f3f5f4;
  --surface: #ffffff;
  --surface-2: #eef2f1;
  --ink: #142027;
  --ink-2: #3f4f58;
  --ink-3: #66767f;
  --line: #dde4e3;
  --accent: #0b6e8a;
  --accent-2: #0f8f86;
  --accent-ink: #ffffff;
  --accent-soft: #e2f1f4;
  --good: #187a43;
  --good-soft: #e2f3e8;
  --warn: #8f5b00;
  --warn-soft: #fbf0d6;
  --bad: #b3261e;
  --bad-soft: #fbe6e4;
  --radius: 16px;
  --radius-s: 12px;
  --shadow: 0 1px 2px rgba(20, 32, 39, .05), 0 4px 14px rgba(20, 32, 39, .06);
  --bar-h: 56px;
  --dock-h: 0px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --col: 560px;
  --font: "Noto Sans", "Noto Sans Kannada", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-kn: "Noto Sans Kannada", "Noto Sans", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1619; --surface: #172227; --surface-2: #1f2c32; --ink: #e7eef1; --ink-2: #b4c2c9; --ink-3: #8a9ba3; --line: #2a3a41;
    --accent: #52b8d2; --accent-2: #4cc2b6; --accent-ink: #062530; --accent-soft: #15353f;
    --good: #5fcb8c; --good-soft: #143426; --warn: #e5b45c; --warn-soft: #382d15; --bad: #f08a80; --bad-soft: #3c1f1c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .25);
  }
}
:root[data-theme="dark"] {
  --bg: #0e1619; --surface: #172227; --surface-2: #1f2c32; --ink: #e7eef1; --ink-2: #b4c2c9; --ink-3: #8a9ba3; --line: #2a3a41;
  --accent: #52b8d2; --accent-2: #4cc2b6; --accent-ink: #062530; --accent-soft: #15353f;
  --good: #5fcb8c; --good-soft: #143426; --warn: #e5b45c; --warn-soft: #382d15; --bad: #f08a80; --bad-soft: #3c1f1c;
}

/* Base */
html { -webkit-tap-highlight-color: transparent; }
body { background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); }
:lang(kn) body, body:lang(kn) { font-family: var(--font-kn); line-height: 1.65; }
h1 { font-size: 1.4rem; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; }
button { -webkit-appearance: none; appearance: none; }
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=date], select, textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--ink);
  padding: 12px 14px; min-height: 50px; font-size: 16px; /* 16px stops phones zooming in */ }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input:disabled { background: var(--surface-2); color: var(--ink-2); border-style: dashed; }
.btn:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--ink-3); }
.small { font-size: .88rem; }
.tiny { font-size: .78rem; }
.grow { flex: 1; min-width: 0; }
.good-text { color: var(--good); font-weight: 600; }

/* App bar */
.appbar { position: sticky; top: 0; z-index: 40; height: calc(var(--bar-h) + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 8px 0;
  display: flex; align-items: center; gap: 6px; background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.appbar .mark { width: 36px; height: 36px; margin-left: 6px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 36px; text-decoration: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font: 700 .95rem var(--font-kn); }
.bar-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; padding-left: 4px; }
.bar-title strong { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-title small { font-size: .76rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 44px; height: 44px; flex: 0 0 44px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font-size: 1.6rem; line-height: 1;
  display: grid; place-items: center; cursor: pointer; }
.icon-btn:active { background: var(--surface-2); }
.lang { flex: 0 0 auto; height: 36px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: .85rem; cursor: pointer; margin-right: 4px; }
.lang:lang(kn) { font-family: var(--font-kn); }

/* Page column and the bottom dock */
main { max-width: var(--col); margin: 0 auto; padding: 12px 16px calc(var(--dock-h) + 28px + var(--safe-b)); }
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: none; padding: 10px 12px calc(10px + var(--safe-b));
  background: color-mix(in srgb, var(--surface) 94%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); box-shadow: 0 -4px 18px rgba(20, 32, 39, .06); }
.dock.on { display: block; }
.dock > * { max-width: calc(var(--col) - 8px); margin-left: auto; margin-right: auto; }
.dock > * + * { margin-top: 8px; }
.dock-row { display: flex; gap: 8px; }
.dock-row > .btn { flex: 1; }
.dock-row > .btn.icon { flex: 0 0 52px; font-size: 1.25rem; padding: 0; }
.toast { bottom: calc(var(--dock-h) + 16px); border-radius: 999px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 10px 16px; border-radius: var(--radius-s);
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: .98rem; text-decoration: none; cursor: pointer;
  text-align: center; line-height: 1.25; transition: transform .08s, filter .15s; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.good { background: var(--good); border-color: var(--good); color: #fff; }
.btn.ghost { background: transparent; border-style: dashed; color: var(--ink-2); font-weight: 500; }
.btn.block { display: flex; width: 100%; }
.btn.big { min-height: 56px; font-size: 1.05rem; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: .86rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.two .btn { min-width: 0; padding-left: 8px; padding-right: 8px; }
.inline { display: flex; gap: 8px; }
.inline > input, .inline > select { flex: 1; min-width: 0; }

/* Cards and bits */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px; }
.card h2 { margin-bottom: 6px; }
.notice { border-radius: var(--radius-s); padding: 12px 14px; background: var(--accent-soft); color: var(--ink); margin-bottom: 12px; }
.notice.warn { background: var(--warn-soft); }
.chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600; white-space: nowrap;
  background: var(--surface-2); color: var(--ink-2); }
.chip.good { background: var(--good-soft); color: var(--good); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.accent, .chip.busy { background: var(--accent-soft); color: var(--accent); }
.section { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 26px 4px 10px; }
:lang(kn) .section { text-transform: none; letter-spacing: 0; font-size: .9rem; }
.tile { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; background: var(--accent-soft); }
.tile.big { width: 64px; height: 64px; font-size: 2rem; border-radius: 20px; margin-bottom: 10px; }
.chev { color: var(--ink-3); font-size: 1.4rem; line-height: 1; }
.meter { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.meter > div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; transition: width .4s; }
.progress-card { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 12px; }
.privacy { font-size: .84rem; color: var(--ink-3); text-align: center; margin: 24px 8px 0; }
.dots { display: inline-block; width: 28px; height: 8px; margin-right: 8px; vertical-align: middle;
  background: radial-gradient(circle, var(--ink-3) 3px, transparent 3.5px) 0 50% / 10px 8px repeat-x; animation: dots 1s steps(4) infinite; }
@keyframes dots { from { width: 0; } to { width: 32px; } }
@media (prefers-reduced-motion: reduce) { .dots { animation: none; width: 28px; } .btn, .meter > div { transition: none; } }

/* Home */
.banner { font-size: .78rem; color: var(--warn); background: var(--warn-soft); border-radius: 10px; padding: 7px 12px; margin: 0 0 6px; text-align: center; }
.hero { padding: 18px 2px 6px; }
.hero .hello { margin: 0 0 2px; font-weight: 600; color: var(--accent); }
.hero h1 { font-size: 1.6rem; margin: 0 0 6px; }
.hero > p.muted { margin-bottom: 14px; }
.askbar { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 2px solid var(--accent); border-radius: 999px; padding: 5px 5px 5px 16px;
  box-shadow: 0 6px 22px rgba(11, 110, 138, .14); }
.askbar input { flex: 1; min-width: 0; border: 0; background: transparent; min-height: 46px; padding: 0; box-shadow: none !important; }
.send { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); font-size: 1.1rem; cursor: pointer; }
.send:disabled { opacity: .4; }
.chips-row { display: flex; gap: 8px; overflow-x: auto; margin: 12px -16px 4px; padding: 2px 16px 6px; scroll-snap-type: x proximity; scroll-padding-inline: 16px; scrollbar-width: none; }
.chips-row::-webkit-scrollbar { display: none; }
.chip-btn { flex: 0 0 auto; scroll-snap-align: start; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px;
  padding: 8px 14px; min-height: 40px; font-size: .88rem; cursor: pointer; white-space: nowrap; }
.chip-btn:active { background: var(--accent-soft); border-color: var(--accent); }
.answer { margin-top: 12px; border: 1.5px solid var(--accent); }
.answer-svc { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.list { display: grid; gap: 8px; }
.svc { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius); padding: 12px 12px 12px 12px; cursor: pointer; color: var(--ink); min-height: 68px; box-shadow: var(--shadow); }
.svc:active { transform: scale(.99); background: var(--surface-2); }
.svc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.svc-text strong { font-size: 1rem; }
.ring { --p: 0; width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-2) 0); }
.ring.full { background: var(--good); }
.ring.full > span { color: var(--good); }
.ring > span { width: 36px; height: 36px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: .72rem; font-weight: 700; }

/* Service intro (basic services) */
.intro { text-align: center; padding: 14px 8px 4px; }
.intro .tile { margin: 0 auto 10px; }
ul.ticks { list-style: none; padding: 0; margin: 0; }
ul.ticks li { position: relative; padding: 6px 0 6px 26px; border-top: 1px solid var(--line); }
ul.ticks li:first-child { border-top: 0; }
ul.ticks li::before { content: "✓"; position: absolute; left: 2px; color: var(--good); font-weight: 700; }

/* Stepper: five bars, the step's name, and chat or form */
.stepper { margin: -2px -4px 14px; }
.bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.bars button { height: 28px; border: 0; background: transparent; padding: 11px 0; cursor: pointer; }
.bars button span { display: block; height: 6px; border-radius: 99px; background: var(--line); }
.bars button.done span { background: var(--good); }
.bars button.now span { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.step-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px; }
.step-name { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.step-name b { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: .8rem; }
.toggle { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.toggle button { border: 0; background: transparent; color: var(--ink-2); border-radius: 999px; padding: 6px 12px; min-height: 36px; font-weight: 600; font-size: .86rem; cursor: pointer; }
.toggle button[aria-pressed=true] { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }

/* Form questions */
.q { padding: 14px 16px; }
label.field { display: block; font-weight: 600; margin-bottom: 8px; line-height: 1.4; }
.q label.field { display: flex; gap: 10px; font-size: 1.02rem; }
.qn { flex: 0 0 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: .78rem; font-weight: 700; margin-top: 1px; }
.help { margin: -2px 0 10px; font-size: .9rem; }
.help summary { cursor: pointer; color: var(--accent); font-weight: 600; list-style: none; display: inline-flex; align-items: center; min-height: 32px; }
.help summary::-webkit-details-marker { display: none; }
.help > div { background: var(--accent-soft); border-radius: var(--radius-s); padding: 10px 12px; margin-top: 4px; line-height: 1.55; }
.live { font-size: .88rem; color: var(--accent); font-weight: 600; margin-top: 6px; }
.live:empty { display: none; }
.err { color: var(--bad); font-size: .88rem; margin-top: 6px; font-weight: 500; }
.err:empty { display: none; }
.has-err { border-color: var(--bad); }
.has-err input, .has-err select { border-color: var(--bad); }
.yesno { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.yesno button { min-height: 52px; border-radius: var(--radius-s); border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 1rem; cursor: pointer; }
.yesno button[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.opts { display: grid; gap: 8px; }
.opt { display: flex; gap: 12px; align-items: center; border: 1.5px solid var(--line); border-radius: var(--radius-s); padding: 12px 14px; min-height: 52px;
  cursor: pointer; background: var(--surface); color: var(--ink); text-align: left; font-size: .98rem; line-height: 1.35; width: 100%; }
.opt input { width: 22px; height: 22px; flex: 0 0 22px; accent-color: var(--accent); margin: 0; }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.opt .box { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 6px; border: 2px solid var(--line); display: grid; place-items: center; }
.opt.check[aria-pressed=true] { border-color: var(--accent); background: var(--accent-soft); }
.opt.check[aria-pressed=true] .box { background: var(--accent); border-color: var(--accent); }
.opt.check[aria-pressed=true] .box::after { content: "✓"; color: var(--accent-ink); font-size: .8rem; font-weight: 700; }

/* Eligibility result */
.result { border-width: 1.5px; }
.result.eligible { border-color: var(--good); }
.result.not_eligible { border-color: var(--bad); }
.result-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.result-head h2 { margin: 0; font-size: 1.15rem; }
.badge { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--warn-soft); color: var(--warn); flex: 0 0 34px; }
.eligible .badge { background: var(--good-soft); color: var(--good); }
.not_eligible .badge { background: var(--bad-soft); color: var(--bad); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.facts > div { background: var(--surface-2); border-radius: var(--radius-s); padding: 10px 12px; display: flex; flex-direction: column; }
.facts small { color: var(--ink-3); font-size: .78rem; }
.facts b { font-size: 1.15rem; }
.note-list { margin: 6px 0; padding-left: 20px; }
.note-list li { margin-bottom: 4px; }
.fee-details summary { cursor: pointer; font-weight: 600; color: var(--accent); min-height: 40px; display: flex; align-items: center; }
ul.lines { list-style: none; padding: 0; margin: 6px 0; }
ul.lines li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: .92rem; }
ul.lines li.sum { font-weight: 700; border-top: 2px solid var(--ink-3); }

/* Documents */
.doc { padding: 14px; }
.doc-head { display: flex; gap: 12px; align-items: flex-start; }
.doc-head .dot { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; border: 2px dashed var(--line); display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.doc.good .dot { background: var(--good); border: 0; color: #fff; }
.doc.bad .dot { background: var(--bad); border: 0; color: #fff; }
.doc.warn .dot { background: var(--warn); border: 0; color: #fff; }
.doc.busy .dot { border-color: var(--accent); color: var(--accent); }
.doc.bad { border-color: var(--bad); }
.problems { margin: 10px 0 0; padding-left: 20px; font-size: .92rem; }
.problems li.fix { color: var(--bad); }
.problems li.warn { color: var(--warn); }
.seen { margin-top: 6px; }
.prepared { display: flex; gap: 12px; align-items: center; margin-top: 10px; padding: 10px; background: var(--surface-2); border-radius: var(--radius-s); }
.prepared img { max-height: 72px; max-width: 96px; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.prepared .btn { margin-top: 6px; }

/* Details form */
.form { padding: 16px; }
.field-row { margin-bottom: 18px; }
.field-row:last-child { margin-bottom: 0; }
.field-row.locked label.field::after { content: " 🔒"; font-size: .8rem; }
.opt-tag { margin-left: 8px; font-weight: 500; font-size: .76rem; color: var(--ink-3); background: var(--surface-2); padding: 2px 8px; border-radius: 99px; }

/* Values to copy into the portal */
.kvs { background: var(--surface-2); border-radius: var(--radius-s); padding: 4px 12px; margin: 10px 0; }
.kvs-title { font-size: .76rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; padding: 8px 0 2px; }
:lang(kn) .kvs-title { text-transform: none; letter-spacing: 0; }
.kv { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.kvs-title + .kv { border-top: 0; }
.kv .k { font-size: .78rem; color: var(--ink-3); }
.kv .v { font-weight: 600; word-break: break-word; }
.copy { flex: 0 0 auto; min-width: 64px; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--accent); background: var(--surface);
  color: var(--accent); font-weight: 600; font-size: .85rem; cursor: pointer; display: inline-grid; place-items: center; text-decoration: none; }
.copy.did { background: var(--good); border-color: var(--good); color: #fff; }

/* Apply: an accordion of portal steps */
ol.acc { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.acc-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; scroll-margin-top: calc(var(--bar-h) + 8px); }
.acc-item.open { border-color: var(--accent); box-shadow: var(--shadow); }
.acc-head { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 14px; border: 0; background: transparent; color: var(--ink);
  text-align: left; font-weight: 600; font-size: 1rem; cursor: pointer; line-height: 1.35; }
.acc-head .n { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .9rem; }
.acc-item.open .acc-head .n { background: var(--accent); color: var(--accent-ink); }
.acc-item.done .acc-head .n { background: var(--good); color: #fff; }
.acc-item.done:not(.open) .acc-head { color: var(--ink-3); }
.acc-head .chev { transform: rotate(90deg); transition: transform .15s; }
.acc-item.open .acc-head .chev { transform: rotate(-90deg); }
.acc-body { padding: 0 14px 14px; }
.acc-body > p { margin-bottom: 10px; }
.refbox { margin-top: 12px; }
.ref-card .ref { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 1.5rem; font-weight: 800; letter-spacing: .02em; margin: 2px 0 6px; word-break: break-all; }
.ref-card .meter { margin: 14px 0 8px; }
.due { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: .9rem; }

/* Chat */
.chat-intro { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 14px; }
.chat-intro > div { flex: 1; min-width: 0; }
.chat-intro p { margin: 2px 0 0; font-size: .9rem; color: var(--ink-2); }
.facts-pill { flex: 1 0 100%; border: 0; background: var(--good-soft); color: var(--good); border-radius: 999px; padding: 8px 14px; min-height: 40px;
  font-weight: 600; font-size: .88rem; cursor: pointer; text-align: center; }
.log { display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 18px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; font-size: .98rem; }
.msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 6px; }
.msg.ok { background: var(--good-soft); border-color: transparent; color: var(--ink); font-size: .9rem; }
.msg.bad { background: var(--bad-soft); border-color: transparent; }
.msg.info { background: var(--accent-soft); border-color: transparent; }
.msg.good { background: var(--good-soft); border-color: var(--good); font-weight: 500; }
.msg.bad { border-left: 4px solid var(--bad); }
.msg.tip { background: var(--warn-soft); border-color: transparent; }
.msg.typing { padding: 14px 16px; }
.msg .prepared { background: var(--surface-2); }
.pad { align-self: stretch; display: grid; gap: 8px; margin: 4px 0 6px; padding: 10px; background: var(--surface); border: 1.5px solid var(--accent-soft);
  border-radius: var(--radius); }
.pad .two { margin-top: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { flex: 1 1 auto; min-height: 48px; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--accent); background: var(--surface); color: var(--accent);
  font-weight: 600; font-size: .95rem; cursor: pointer; }
.pill:active, .opt:active, .yesno button:active { background: var(--accent-soft); }
.helpers { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.helpers::-webkit-scrollbar { display: none; }
.helpers .chip-btn { min-height: 36px; padding: 6px 12px; }
.composer { display: flex; gap: 8px; align-items: center; }
.composer input { flex: 1; min-width: 0; border-radius: 999px; min-height: 48px; padding: 10px 18px; background: var(--surface-2); border-color: transparent; }
.composer input:focus { background: var(--surface); }

/* Bottom sheets (more menu, ask) */
dialog.sheet { margin: auto 0 0; width: 100%; max-width: 100%; max-height: 88vh; padding: 0; border: 0; border-radius: 22px 22px 0 0; background: var(--surface);
  color: var(--ink); display: flex; flex-direction: column; animation: up .2s ease-out; }
dialog.sheet:not([open]) { display: none; }
@keyframes up { from { transform: translateY(40px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { dialog.sheet { animation: none; } }
@media (min-width: 600px) { dialog.sheet { max-width: var(--col); margin: auto auto 0; } }
dialog.sheet::backdrop { background: rgba(8, 16, 20, .45); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 10px 6px 18px; position: relative; }
.sheet-head::before { content: ""; position: absolute; top: 6px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--line); }
.sheet-head .icon-btn { font-size: 1.1rem; }
.sheet-body { padding: 4px 18px calc(18px + var(--safe-b)); overflow-y: auto; }
.sheet-body > .log { max-height: 50vh; overflow-y: auto; margin-bottom: 10px; padding: 4px 0; }
.sheet-body .result { box-shadow: none; }
.menu { display: grid; gap: 2px; margin-bottom: 6px; }
.menu-item { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 52px; padding: 0 6px; border: 0; border-bottom: 1px solid var(--line); background: transparent;
  color: var(--ink); font-size: 1rem; text-align: left; cursor: pointer; text-decoration: none; }
.menu-item.danger { color: var(--bad); border-bottom: 0; }
ul.sources { padding-left: 18px; font-size: .88rem; }
ul.sources li { margin-bottom: 6px; }

/* Printable application sheet */
.printable h1 { font-size: 1.25rem; }
.printable .kvs { background: transparent; padding: 0; }
.not-form { border: 2px solid var(--warn); background: var(--warn-soft); color: var(--ink); border-radius: var(--radius-s); padding: 10px 12px; font-weight: 600; font-size: .92rem; }
.sheet-step { margin-top: 14px; break-inside: avoid; }
.sheet-step h3 { font-size: 1rem; margin: 0 0 4px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.sheet-docs li { padding: 3px 0; }
.kv .k.on-portal { font-style: italic; }
ul.plain { list-style: none; padding: 0; }

@media (min-width: 700px) {
  main { padding-top: 20px; }
  .hero h1 { font-size: 1.9rem; }
}
@media print {
  .appbar, .dock, .stepper, .banner, .copy, .no-print, dialog { display: none !important; }
  body { background: #fff; color: #000; }
  main { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 0; }
  .not-form { border: 2px solid #000; background: none; }
  .sheet-step { break-inside: avoid; page-break-inside: avoid; }
  .printable .kvs { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
  .printable .kv { padding: 5px 0; break-inside: avoid; }
  .printable .kvs .kv:nth-child(2) { border-top: 0; }
}
/* Wider screens: the app bar lines up with the centred column. */
@media (min-width: 600px) {
  .appbar { padding-left: max(8px, calc((100vw - var(--col)) / 2)); padding-right: max(8px, calc((100vw - var(--col)) / 2)); }
}

/* Artwork slots (static/img/); hidden until the files exist. */
.appbar .mark img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; display: block; }
.appbar .mark:has(img) { background: none; }
.tile img { width: 76%; height: 76%; object-fit: contain; display: block; }
.hero-art { width: 100%; max-height: 210px; object-fit: contain; margin: -6px auto 8px; display: block; }
.ref-art { width: 120px; height: 120px; object-fit: contain; margin: 0 auto 6px; display: block; }
.guide-art { width: 64px; height: 64px; flex: 0 0 64px; object-fit: contain; border-radius: 10px; background: var(--surface-2); }

/* Home: the services dashboard */
.dash-head { padding: 12px 2px 2px; }
.greet-row { display: flex; gap: 12px; align-items: flex-start; }
.bot-face { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 16px; display: grid; place-items: center; color: #fff; overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); font: 700 1.05rem var(--font-kn); box-shadow: 0 6px 16px rgba(11, 110, 138, .25); }
.bot-face img { width: 100%; height: 100%; object-fit: cover; }
.dash-head .hello { margin: 2px 0 0; font-weight: 600; color: var(--accent); font-size: .92rem; }
.dash-head h1 { font-size: 1.4rem; margin: 2px 0 6px; }
.dash-head > p.muted { margin: 0 0 12px; }
.search-wrap { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: 0 6px 0 16px;
  box-shadow: var(--shadow); }
.search-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-wrap input.search { border: 0; background: transparent; min-height: 48px; padding: 0 6px 0 0; box-shadow: none !important; }
.svc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.svc-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; min-height: 172px; padding: 14px 12px 12px;
  border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); cursor: pointer;
  transition: transform .08s; }
.svc-card:active { transform: scale(.98); background: var(--surface-2); }
.svc-card .tile.big { width: 60px; height: 60px; flex: 0 0 60px; margin: 0 0 4px; border-radius: 18px; }
.svc-card strong { font-size: .98rem; line-height: 1.3; }
.svc-card .mini-facts { margin-top: auto; padding-top: 4px; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mini-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.mini-facts span { font-size: .78rem; background: var(--surface-2); border-radius: 999px; padding: 3px 9px; color: var(--ink-2); }
.mini-facts span.basic-tag { background: var(--warn-soft); color: var(--warn); }
.no-match { text-align: center; margin-top: 16px; }
.privacy a { color: var(--accent); font-weight: 600; white-space: nowrap; }
@media (min-width: 600px) { .svc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .svc-card { transition: none; } }

/* The assistant: a floating button on every screen, and a chat panel that slides up over the page */
main.has-fab { padding-bottom: calc(var(--dock-h) + 96px + var(--safe-b)); }
.fab { position: fixed; z-index: 35; right: max(16px, calc((100vw - var(--col)) / 2 + 16px)); bottom: calc(var(--dock-h) + 16px + var(--safe-b));
  display: flex; align-items: center; gap: 10px; height: 60px; min-width: 60px; padding: 6px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--ink); font-weight: 700; font-size: .95rem;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent), 0 10px 28px rgba(8, 40, 52, .28);
  animation: fab-in .25s ease-out; transition: transform .1s; }
.fab[hidden] { display: none; }
.fab:active { transform: scale(.96); }
.fab-face { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); font: 700 1rem var(--font-kn); }
.fab-face img { width: 100%; height: 100%; object-fit: cover; }
.fab-label { display: none; padding-right: 14px; white-space: nowrap; }
.fab.wide .fab-label { display: inline; }
/* A soft glow ring, like a phone assistant listening. */
.fab::after { content: ""; position: absolute; inset: -4px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), #f2a33a, var(--accent));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  opacity: .9; animation: spin 6s linear infinite; }
.fab.wide::after { -webkit-mask: none; mask: none; inset: auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fab-in { from { transform: translateY(16px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }

dialog.assistant { position: fixed; inset: auto 8px calc(8px + var(--safe-b)) 8px; margin: 0 auto; width: auto; max-width: min(560px, calc(100vw - 16px));
  max-height: min(78dvh, 680px); padding: 0; border: 0; border-radius: 26px; background: var(--surface); color: var(--ink);
  display: flex; flex-direction: column; overflow: hidden; animation: asst-up .22s cubic-bezier(.2, .8, .2, 1);
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, transparent), 0 18px 60px rgba(4, 20, 28, .4); }
dialog.assistant:not([open]) { display: none; }
dialog.assistant::backdrop { background: rgba(6, 14, 18, .38); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
/* A thin colour band along the top edge marks it as SevaAI, not part of the page underneath. */
dialog.assistant::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2), #f2a33a); }
@keyframes asst-up { from { transform: translateY(48px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.asst-head { display: flex; align-items: center; gap: 10px; padding: 16px 8px 10px 14px; border-bottom: 1px solid var(--line); }
.asst-head .bot-face { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; box-shadow: none; }
.asst-head strong { display: block; font-size: 1rem; line-height: 1.2; }
.asst-head small { display: block; color: var(--ink-3); font-size: .78rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asst-head .icon-btn { font-size: 1.1rem; }
.asst-log { flex: 1; min-height: 140px; overflow-y: auto; padding: 14px 14px 8px; overscroll-behavior: contain; }
.asst-log .answer { align-self: stretch; margin: 0; }
.asst-try { margin: 4px 2px -2px; }
.asst-chips { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.asst-chips .chip-btn { white-space: normal; text-align: left; border-radius: 16px; line-height: 1.35; }
dialog.assistant .composer { padding: 10px 12px 12px; border-top: 1px solid var(--line); }
@media (prefers-reduced-motion: reduce) {
  .fab, dialog.assistant { animation: none; }
  .fab::after { animation: none; }
}

/* Chat pad extras */
.pad-help { background: var(--accent-soft); border-radius: var(--radius-s); padding: 10px 12px; font-size: .92rem; }
.pad-help strong { display: block; color: var(--accent); font-size: .85rem; margin-bottom: 2px; }
.pad-help p { margin: 0; }
.dmy { display: grid; grid-template-columns: 1fr 1.2fr 1.2fr; gap: 6px; }
.dmy select { padding: 10px 8px; min-height: 48px; }
.dmy .btn { grid-column: 1 / -1; }
.helpers .chip-btn[aria-pressed=true] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* SevaAI Fill card on the Apply step */
.card.ext { border: 1.5px solid var(--accent); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 60%); }
.card.ext h3 { margin: 0 0 6px; font-size: 1rem; }
.card.ext summary { cursor: pointer; font-weight: 700; min-height: 32px; display: flex; align-items: center; }
.card.ext ol { padding-left: 20px; margin: 8px 0 12px; }

/* Saved details: people on the dashboard, and the "whose application?" list */
.avatar { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.avatar.ghost { background: var(--surface-2); color: var(--accent); border: 1.5px dashed var(--accent); font-size: 1.2rem; }
.people { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
.people::-webkit-scrollbar { display: none; }
.person { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; min-width: 150px; max-width: 230px; padding: 10px 14px 10px 10px; scroll-snap-align: start;
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; text-align: left; }
.person.add { box-shadow: none; border-style: dashed; }
.person-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.person-text strong, .person-text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-text small { font-size: .78rem; }
.people-cta { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 14px; padding: 12px 14px; text-align: left; cursor: pointer;
  border: 1.5px dashed var(--accent); border-radius: 18px; background: var(--accent-soft); color: var(--ink); }
.people-cta strong { font-size: .96rem; }
small.block, .block { display: block; }
.menu-item .avatar { margin-right: 4px; }
.menu-item strong { display: block; }
.person-form .card h2 { margin-bottom: 12px; }
.danger-text { color: var(--bad); border-color: var(--bad); }

/* Every Seva Sindhu service: the directory and the way into it */
.ss-cta { margin-bottom: 12px; }
details.dept { padding: 0; overflow: hidden; }
details.dept summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; cursor: pointer; list-style: none; }
details.dept summary::-webkit-details-marker { display: none; }
details.dept[open] summary { border-bottom: 1px solid var(--line); }
details.dept .list { padding: 10px; }
.mini-facts.center { justify-content: center; margin-top: 6px; }

/* Saved people in SevaAI Fill (the Chrome extension) */
.ext-people { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.ext-people .grow { flex: 1; }
.ext-people small { flex-basis: 100%; }

/* Help-desk mode */
.desk-card { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft, #e2f1f4); }
.desk-card .grow { flex: 1; }
.desk-next { font-size: 1.2rem; }
blockquote.consent { margin: 10px 0; padding: 10px 12px; border-left: 4px solid var(--accent); background: var(--surface-2, #f1f4f3); border-radius: 8px; line-height: 1.5; }
