:root {
  --blue: #0B3A70;
  --blue2: #0B3A70;
  --blue-soft: #F1F5F9;
  --navy: #0B3A70;
  --bg: #F8FAFC;
  --surface: #ffffff;
  --line: #E2E8F0;
  --line2: #CBD5E1;
  --text: #0F172A;
  --text2: #1E293B;
  --muted: #475569;
  --soft: #F1F5F9;
  --green: #15803D;   --green-bg: #F0FDF4;  --green-line: #BBF7D0;
  --amber: #B45309;   --amber-bg: #FFFBEB;  --amber-line: #FDE68A;
  --red: #B91C1C;     --red-bg: #FEF2F2;    --red-line: #FECACA;
  --purple: #0B3A70;  --purple-bg: #F1F5F9; --purple-line: #CBD5E1;
  --cyan: #0B3A70;    --cyan-bg: #F1F5F9;   --cyan-line: #CBD5E1;
  --slate-bg: #F1F5F9;
  --saffron: #D97706;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .06);
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 13.5px; line-height: 1.5; color: var(--text);
  background: #F1F5F9;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--blue2); }

#app {
  position: relative; margin: 0 auto; max-width: 480px; height: 100dvh;
  background: var(--bg); overflow: hidden; display: flex; flex-direction: column;
}
#view { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* Desktop: present the app inside a phone frame */
@media (min-width: 620px) and (min-height: 700px) {
  body { display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 30% 20%, #e9f0f8, #c9d6e6); }
  #app { width: 400px; height: min(860px, 96dvh); border-radius: 40px; border: 11px solid #0b1220; box-shadow: 0 30px 80px rgba(10, 37, 64, .35); }
}

/* ---------- icons ---------- */
.ic { flex-shrink: 0; vertical-align: middle; }

/* ---------- header ---------- */
.hdr {
  display: flex; align-items: center; gap: 6px; padding: calc(10px + var(--safe-t)) 10px 10px;
  background: var(--surface); border-bottom: 1px solid var(--line); min-height: 56px; flex-shrink: 0;
}
.hdr h1 { flex: 1; font-size: 17px; font-weight: 700; color: var(--blue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 4px; }
.hdr .sub { font-size: 11px; color: var(--muted); font-weight: 500; }
.hdr-brand {
  background: linear-gradient(135deg, #0f4299, #1a56db); color: #fff; border: 0;
  padding: calc(12px + var(--safe-t)) 14px 12px; gap: 10px;
}
.hdr-brand .brand-logo { width: 38px; height: 38px; border-radius: 50%; background: #fff; padding: 2px; }
.hdr-brand .brand-t { flex: 1; line-height: 1.15; }
.hdr-brand .brand-t b { font-size: 17px; font-weight: 800; letter-spacing: .3px; display: block; }
.hdr-brand .brand-t span { font-size: 12px; opacity: .85; }
.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent;
  display: inline-flex; align-items: center; justify-content: center; color: var(--text2);
}
.icon-btn:active { background: var(--soft); }
.hdr-brand .icon-btn { color: #fff; }
.hdr-brand .icon-btn:active { background: rgba(255,255,255,.15); }
.dot-badge {
  position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  border: 2px solid #1a56db;
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: #d97706; color: #fff; font-weight: 700; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center; border: 2px solid rgba(255,255,255,.8); flex-shrink: 0;
}
.avatar.lg { width: 56px; height: 56px; font-size: 18px; border: 0; }

/* ---------- content ---------- */
.content { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 16px 16px 24px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.content.flush { padding: 0; }
.footer-bar {
  flex-shrink: 0; display: flex; gap: 10px; padding: 12px 16px calc(12px + var(--safe-b));
  background: var(--surface); border-top: 1px solid var(--line);
}
.footer-bar .btn { flex: 1; }

/* ---------- bottom tabs ---------- */
.tabbar {
  flex-shrink: 0; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface);
  border-top: 1px solid var(--line); padding: 6px 4px calc(6px + var(--safe-b));
}
.tabbar button {
  border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10.5px; font-weight: 600; color: var(--muted); padding: 4px 0; position: relative;
}
.tabbar button.on { color: var(--blue2); }
.tabbar button.on::before { content: ''; position: absolute; top: -6px; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--blue2); }
.tabbar .tab-badge { position: absolute; top: 0; left: calc(50% + 6px); background: #ef4444; color: #fff; font-size: 9.5px; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

/* ---------- typography helpers ---------- */
.h2 { font-size: 15px; font-weight: 700; color: var(--navy); }
.h3 { font-size: 13.5px; font-weight: 700; color: var(--navy); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.xs { font-size: 11px; }
.mono { font-family: var(--mono); font-size: 11.5px; word-break: break-all; }
.b { font-weight: 700; }
.center { text-align: center; }
.mt4 { margin-top: 4px; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.top { align-items: flex-start; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 20px 2px 10px; }
.section-title:first-child { margin-top: 0; }
.link { background: none; border: 0; padding: 0; color: var(--blue2); font-weight: 600; font-size: 12.5px; display: inline-flex; align-items: center; gap: 2px; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.card + .card { margin-top: 12px; }
.card.tight { padding: 0; overflow: hidden; }
.card-h { padding: 12px 14px; border-bottom: 1px solid var(--line); background: #f8fafc; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-b { padding: 14px; }
.inst-card { display: flex; gap: 12px; align-items: center; }
.inst-ico { width: 52px; height: 52px; border-radius: 14px; background: var(--blue-soft); color: var(--blue); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  border-radius: var(--radius); padding: 12px; background: var(--surface); border: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; text-align: left; box-shadow: var(--shadow);
}
.tile .num { font-size: 22px; font-weight: 800; line-height: 1; }
.tile .lbl { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 3px; line-height: 1.2; }
.tile-ico { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.qa {
  border-radius: var(--radius); padding: 16px 10px; border: 1px solid transparent; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 13px; text-align: center; min-height: 92px;
}
.qa .tile-ico { width: 42px; height: 42px; }
.tone-blue { background: var(--blue-soft); color: var(--blue); }
.tone-green { background: var(--green-bg); color: var(--green); }
.tone-amber { background: var(--amber-bg); color: var(--amber); }
.tone-red { background: var(--red-bg); color: var(--red); }
.tone-purple { background: var(--purple-bg); color: var(--purple); }
.tone-cyan { background: var(--cyan-bg); color: var(--cyan); }
.tone-slate { background: var(--slate-bg); color: var(--text2); }
.solid-blue { background: var(--blue2); color: #fff; }
.solid-green { background: #10b981; color: #fff; }
.solid-amber { background: #f59e0b; color: #fff; }
.solid-red { background: #f43f5e; color: #fff; }
.solid-purple { background: #8b5cf6; color: #fff; }
.solid-cyan { background: #06b6d4; color: #fff; }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.chip.blue { background: var(--blue-soft); color: var(--blue); border-color: #c7d7fb; }
.chip.green { background: var(--green-bg); color: var(--green); border-color: var(--green-line); }
.chip.amber { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-line); }
.chip.red { background: var(--red-bg); color: var(--red); border-color: var(--red-line); }
.chip.purple { background: var(--purple-bg); color: var(--purple); border-color: var(--purple-line); }
.chip.cyan { background: var(--cyan-bg); color: var(--cyan); border-color: var(--cyan-line); }
.chip.slate { background: var(--slate-bg); color: var(--text2); border-color: var(--line); }
.chip.sm { font-size: 10px; padding: 2px 7px; }

/* ---------- banners ---------- */
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: 12px; font-size: 12.5px; border: 1px solid; }
.banner.info { background: var(--blue-soft); border-color: #c7d7fb; color: #1e3a8a; }
.banner.ok { background: var(--green-bg); border-color: var(--green-line); color: #065f46; }
.banner.warn { background: var(--amber-bg); border-color: var(--amber-line); color: #78350f; }
.banner.err { background: var(--red-bg); border-color: var(--red-line); color: #9f1239; }
.banner.ai { background: linear-gradient(135deg, #f5f3ff, #eef2ff); border-color: var(--purple-line); color: #4c1d95; }

/* ---------- buttons ---------- */
.btn {
  border: 1px solid transparent; border-radius: 12px; padding: 12px 16px; font-weight: 700; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .08s, background .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--blue2); color: #fff; box-shadow: 0 4px 12px rgba(26, 86, 219, .25); }
.btn-outline { background: var(--surface); border-color: var(--blue2); color: var(--blue2); }
.btn-ghost { background: var(--soft); color: var(--text2); }
.btn-danger { background: var(--red-bg); color: var(--red); border-color: var(--red-line); }
.btn-success { background: #059669; color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 12px; font-size: 12.5px; border-radius: 10px; }
.btn-xs { padding: 5px 10px; font-size: 11.5px; border-radius: 8px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 16px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---------- forms ---------- */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.field > label .req { color: var(--red); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .ic { position: absolute; left: 12px; color: #94a3b8; pointer-events: none; }
.input-wrap > .input { padding-left: 38px; }
.input-wrap > .trail { position: absolute; right: 6px; }
.input {
  width: 100%; border: 1px solid var(--line2); background: var(--surface); border-radius: 11px; padding: 11px 12px;
  font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s; min-height: 44px;
}
.input:focus { border-color: var(--blue2); box-shadow: 0 0 0 3px rgba(26, 86, 219, .12); }
.input[readonly], .input:disabled { background: #f8fafc; color: var(--text2); }
.input.err { border-color: #fb7185; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
textarea.input { resize: vertical; min-height: 84px; }
.ferr { color: var(--red); font-size: 11.5px; margin-top: 5px; font-weight: 500; }
.hint { color: var(--muted); font-size: 11.5px; margin-top: 5px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--text2); }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--blue2); flex-shrink: 0; }

/* segmented */
.seg { display: flex; background: var(--soft); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 9px 6px; border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--blue2); box-shadow: 0 1px 3px rgba(15,23,42,.1); }
.pills { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pills button { flex-shrink: 0; border: 1px solid var(--line2); background: var(--surface); border-radius: 999px; padding: 7px 13px; font-size: 12.5px; font-weight: 600; color: var(--text2); }
.pills button.on { background: var(--blue2); border-color: var(--blue2); color: #fff; }
.toggle { position: relative; width: 44px; height: 26px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle span { position: absolute; inset: 0; background: var(--line2); border-radius: 13px; transition: .2s; }
.toggle span::after { content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%; top: 3px; left: 3px; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle input:checked + span { background: var(--blue2); }
.toggle input:checked + span::after { left: 21px; }

/* ---------- lists ---------- */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.li { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 0; background: none; width: 100%; text-align: left; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.li:active { background: #f8fafc; }
.li .li-ico { color: var(--blue2); }
.li .li-t { flex: 1; min-width: 0; font-weight: 600; font-size: 13.5px; }
.li .li-s { font-size: 11.5px; color: var(--muted); font-weight: 500; margin-top: 1px; }
.li .chev { color: #94a3b8; }
.li.danger .li-t, .li.danger .li-ico { color: var(--red); }
.type-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); width: 100%; text-align: left; box-shadow: var(--shadow); }
.type-card + .type-card { margin-top: 10px; }
.type-card.hl { background: #fffbeb; border-color: var(--amber-line); }
.type-card .t { font-weight: 700; color: var(--blue); font-size: 14px; }
.type-card .d { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.kv:last-child { border-bottom: 0; }
.kv > span:first-child { color: var(--muted); flex-shrink: 0; max-width: 45%; }
.kv > span:last-child { text-align: right; font-weight: 600; color: var(--text); word-break: break-word; }

.app-card { display: flex; gap: 12px; padding: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); width: 100%; text-align: left; box-shadow: var(--shadow); align-items: flex-start; }
.app-card + .app-card { margin-top: 10px; }
.app-card .no { font-weight: 700; font-size: 13px; color: var(--navy); }
.app-card .ty { font-size: 12px; color: var(--purple); font-weight: 600; margin-top: 2px; }

.search { position: relative; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; }
.search .input { padding-left: 38px; }

/* ---------- stepper ---------- */
.stepper { display: flex; align-items: flex-start; padding: 14px 10px 12px; background: var(--surface); border-bottom: 1px solid var(--line); flex-shrink: 0; }
.stepper .st { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; font-size: 10.5px; font-weight: 600; color: var(--muted); }
.stepper .st::before { content: ''; position: absolute; top: 12px; left: calc(-50% + 14px); right: calc(50% + 14px); height: 2px; background: var(--line2); }
.stepper .st:first-child::before { display: none; }
.stepper .st .n { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line2); background: var(--surface); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; z-index: 1; }
.stepper .st.done .n { background: #10b981; border-color: #10b981; color: #fff; }
.stepper .st.done::before, .stepper .st.cur::before { background: #10b981; }
.stepper .st.cur .n { background: var(--blue2); border-color: var(--blue2); color: #fff; box-shadow: 0 0 0 4px rgba(26,86,219,.15); }
.stepper .st.cur { color: var(--blue2); }

/* ---------- timeline ---------- */
.timeline { position: relative; padding-left: 4px; }
.tl { display: flex; gap: 12px; position: relative; padding-bottom: 14px; }
.tl:last-child { padding-bottom: 0; }
.tl::before { content: ''; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl .tdot { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--soft); color: var(--muted); border: 2px solid var(--line2); z-index: 1; }
.tl.done .tdot { background: #10b981; border-color: #10b981; color: #fff; }
.tl.done::before { background: #10b981; }
.tl.cur .tdot { background: var(--blue2); border-color: var(--blue2); color: #fff; }
.tl.warn .tdot { background: #f43f5e; border-color: #f43f5e; color: #fff; }
.tl .tt { font-weight: 700; font-size: 13px; }
.tl .ts { font-size: 11.5px; color: var(--muted); }

/* ---------- upload rows ---------- */
.up { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.up:last-child { border-bottom: 0; }
.up .fi { width: 38px; height: 38px; border-radius: 10px; background: var(--soft); color: var(--text2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.up.done .fi { background: var(--green-bg); color: var(--green); }
.up.bad .fi { background: var(--red-bg); color: var(--red); }
.up .nm { font-weight: 600; font-size: 13px; }
.up .meta { font-size: 11px; color: var(--muted); }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---------- progress ---------- */
.bar { height: 8px; background: var(--soft); border-radius: 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, #1a56db, #10b981); border-radius: 4px; }
.ring { width: 64px; height: 64px; }

/* ---------- AI validation ---------- */
.vrow { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.vrow:last-child { border-bottom: 0; }
.vstat { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.vstat.ok { background: #10b981; color: #fff; }
.vstat.warn { background: #f59e0b; color: #fff; }
.vstat.fail { background: #f43f5e; color: #fff; }
.vstat.run { border: 2.5px solid var(--blue-soft); border-top-color: var(--gold-y); animation: spin .8s linear infinite; }
.vstat.wait { background: var(--soft); }
@keyframes spin { to { transform: rotate(360deg); } }
.finding { border-left: 4px solid var(--line2); padding: 12px; background: var(--surface); border-radius: 0 12px 12px 0; border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.finding + .finding { margin-top: 10px; }
.finding.CRITICAL { border-left-color: #f43f5e; }
.finding.WARNING { border-left-color: #f59e0b; }
.finding.PASSED { border-left-color: #10b981; }
.finding.NOT_EVALUATED { border-left-color: var(--line2); }
.evidence { margin-top: 8px; padding: 8px 10px; background: #f8fafc; border: 1px dashed var(--line2); border-radius: 8px; font-family: var(--mono); font-size: 11px; color: var(--text2); }

/* ---------- splash ---------- */
.splash {
  --ob-pad: clamp(16px, 5.5vw, 24px);
  display: flex; flex-direction: column; padding: 0; overflow-x: hidden;
  background:
    radial-gradient(120% 60% at 50% 0%, #ffffff 0%, rgba(255,255,255,0) 70%),
    linear-gradient(180deg, #ffffff 0%, #f2f6fc 42%, #e4edf9 100%);
}
.ob {
  flex: 1 0 auto; display: flex; flex-direction: column; gap: clamp(14px, 2.6dvh, 24px);
  padding: calc(var(--safe-t) + clamp(18px, 3.6dvh, 34px)) var(--ob-pad) calc(var(--safe-b) + clamp(14px, 2.4dvh, 22px));
}
/* Brand lockup: emblem beside the council name */
.ob-brand { display: flex; align-items: center; justify-content: center; gap: 12px; }
.ob-logo {
  width: clamp(48px, 14vw, 60px); height: clamp(48px, 14vw, 60px); flex-shrink: 0;
  object-fit: contain; filter: drop-shadow(0 4px 10px rgba(217, 119, 6, .25));
}
.ob-org { display: flex; flex-direction: column; min-width: 0; text-align: left; text-wrap: balance; }
.ob-org b { font-size: clamp(13.5px, 3.9vw, 15.5px); font-weight: 800; line-height: 1.22; color: var(--navy); letter-spacing: -.1px; max-width: 14.5em; }
.ob-org span { font-size: clamp(11px, 3vw, 12px); font-weight: 500; color: var(--muted); margin-top: 3px; }
.ob-org span::before { content: ''; display: inline-block; width: 14px; height: 2px; border-radius: 1px; vertical-align: middle; margin: -2px 6px 0 0; background: linear-gradient(90deg, #f59e0b 0 33%, #cbd5e1 33% 66%, #16a34a 66%); }

/* Carousel */
.ob-carousel { flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center; }
.slides { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 calc(-1 * var(--ob-pad)); overscroll-behavior-x: contain; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; padding: 0 var(--ob-pad); text-align: center; will-change: opacity, transform; }
.ob-tag { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--blue); background: rgba(26, 86, 219, .08); border: 1px solid rgba(26, 86, 219, .14); }
.slide h1 { font-size: clamp(30px, 9.4vw, 38px); font-weight: 800; line-height: 1.05; letter-spacing: -.5px; color: var(--blue); margin-top: clamp(8px, 1.4dvh, 12px); }
.slide h2 { font-size: clamp(17px, 5.1vw, 20px); font-weight: 700; line-height: 1.25; letter-spacing: -.2px; color: var(--navy); margin-top: 6px; }
.slide p { font-size: clamp(12.5px, 3.5vw, 13.5px); line-height: 1.55; color: var(--text2); margin: 10px auto 0; max-width: 30em; }
.dots { display: flex; justify-content: center; gap: 2px; margin-top: clamp(10px, 1.8dvh, 16px); }
.dots button { width: 24px; height: 24px; padding: 0; border: 0; background: none; display: flex; align-items: center; justify-content: center; transition: width .25s ease; }
.dots button::before { content: ''; width: 7px; height: 7px; border-radius: 4px; background: #bfd0ea; transition: width .25s ease, background-color .25s ease; }
.dots button.on { width: 32px; }
.dots button.on::before { width: 22px; background: var(--blue2); }
.dots button:focus-visible { outline: 2px solid var(--blue2); outline-offset: 1px; border-radius: 6px; }

/* Building image: fixed responsive height, cropped (never stretched) to keep the emblem and signboard in frame */
.ob-figure {
  margin: 0; position: relative; flex-shrink: 0; overflow: hidden; border-radius: 22px; background: #dbe6f3;
  box-shadow: 0 14px 30px -12px rgba(10, 37, 64, .35), 0 0 0 1px rgba(15, 66, 153, .08);
}
/* The frame takes the photo's own aspect ratio (343x234), so the whole image is shown: no crop, no gaps, no distortion.
   On short screens the frame narrows (centred) instead of cropping. */
/* Office slideshow: a fixed frame (between the Delhi 1.57 and Mumbai 1.94 photo shapes) so both fill it with only a slight trim, never stretched. */
.ob-figure { --img-ratio: 1.72; width: min(100%, calc(var(--img-max-h, 30dvh) * var(--img-ratio))); align-self: center; aspect-ratio: 1.72; }
.ob-track { display: flex; height: 100%; will-change: transform; }
.ob-shot { position: relative; flex: 0 0 100%; height: 100%; background: #dbe6f3; }
.building-image { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; }
.ob-city { position: absolute; left: 10px; bottom: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 8px; border-radius: 999px;
  background: rgba(10, 37, 64, .55); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .2px; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); transition: opacity .35s ease, transform .35s ease; }
.ob-city.swap { opacity: 0; transform: translateX(8px); }
.ob-figure::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(180deg, rgba(10, 37, 64, 0) 55%, rgba(10, 37, 64, .22) 100%); }

/* Actions */
.splash-actions { display: grid; gap: 10px; }
.btn-hero {
  min-height: 52px; border-radius: 14px; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #1a56db 45%, #0f4299 100%);
  box-shadow: 0 10px 22px -8px rgba(15, 66, 153, .6), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-hero:active { box-shadow: 0 4px 10px -4px rgba(15, 66, 153, .6); }
.btn-tall { min-height: 52px; border-radius: 14px; font-size: 15px; border-width: 1.5px; }
.btn-hero:focus-visible, .btn-tall:focus-visible { outline: 3px solid rgba(26, 86, 219, .35); outline-offset: 2px; }

/* Short screens (e.g. 320x568): tighten vertical rhythm so it fits without scrolling */
@media (max-height: 700px) {
  .ob { gap: 12px; }
  .ob-figure { --img-max-h: 26dvh; }
}
@media (max-height: 640px) {
  .ob-city { left: 6px; bottom: 6px; padding: 2px 7px; font-size: 9.5px; }
  .ob-city .ic { display: none; }
  .ob { gap: 10px; }
  .ob-figure { --img-max-h: 17dvh; }
  .slide p { margin-top: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .dots button, .dots button::before { transition: none; }
}

.login-brand { text-align: center; margin: 4px 0 16px; }
.login-brand img { width: 64px; height: 64px; }
.login-brand h2 { font-size: 22px; font-weight: 800; color: var(--blue); margin-top: 6px; }
.login-brand p { font-size: 13px; color: var(--muted); font-weight: 600; }
.legal { font-size: 10.5px; color: #94a3b8; text-align: center; margin-top: 18px; line-height: 1.4; }

/* ---------- success ---------- */
.success-ring { width: 104px; height: 104px; border-radius: 50%; background: #10b981; color: #fff; display: flex; align-items: center; justify-content: center; margin: 18px auto 14px; box-shadow: 0 0 0 12px #d1fae5, 0 12px 30px rgba(16,185,129,.35); animation: pop .45s cubic-bezier(.2,1.4,.4,1); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; width: 6px; height: 10px; border-radius: 2px; top: -10px; animation: fall 1.8s ease-in forwards; }
@keyframes fall { to { transform: translateY(260px) rotate(260deg); opacity: 0; } }

/* ---------- sheet ---------- */
#sheet { position: absolute; inset: 0; z-index: 50; pointer-events: none; }
#sheet.open { pointer-events: auto; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(10, 23, 42, .45); animation: fade .2s; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 90%; background: var(--surface); border-radius: 22px 22px 0 0;
  display: flex; flex-direction: column; animation: up .25s cubic-bezier(.2,.9,.3,1); padding-bottom: var(--safe-b);
}
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line2); margin: 8px auto 0; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 18px; border-bottom: 1px solid var(--line); }
.sheet-head h3 { flex: 1; font-size: 16px; font-weight: 700; color: var(--navy); }
.sheet-body { overflow-y: auto; padding: 16px 18px 20px; }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } }

/* ---------- toast ---------- */
#toast { position: absolute; left: 16px; right: 16px; bottom: 84px; z-index: 60; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: #0f172a; color: #fff; padding: 11px 14px; border-radius: 12px; font-size: 13px; font-weight: 500; display: flex; gap: 10px; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: up .25s; }
.toast.ok .ic { color: #34d399; } .toast.err .ic { color: #fb7185; } .toast.warn .ic { color: #fbbf24; }

/* ---------- notice (official letter) ---------- */
.letter { background: #fff; border: 1px solid var(--line2); border-radius: 6px; padding: 18px 16px; font-family: Georgia, 'Times New Roman', serif; font-size: 12.5px; color: #111; line-height: 1.55; }
.letter .lh { text-align: center; border-bottom: 2px solid #111; padding-bottom: 10px; margin-bottom: 12px; }
.letter .lh img { width: 54px; height: 54px; }
.letter .lh .hi { font-size: 14px; font-weight: 700; }
.letter .lh .en { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.letter .lh small { display: block; font-size: 10px; color: #444; }
.letter table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 11.5px; }
.letter th, .letter td { border: 1px solid #999; padding: 6px; vertical-align: top; text-align: left; }
.letter th { background: #f1f1f1; }
.letter p + p { margin-top: 8px; }
.letter ol { padding-left: 18px; margin: 6px 0; }

details.acc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
details.acc + details.acc { margin-top: 8px; }
details.acc summary { padding: 12px 14px; font-weight: 600; font-size: 13px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 8px; cursor: pointer; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc[open] summary { border-bottom: 1px solid var(--line); }
details.acc .acc-b { padding: 12px 14px; font-size: 12.5px; color: var(--text2); }

.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty .ic { color: #cbd5e1; margin-bottom: 8px; }
.qr-box { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; width: 56px; height: 56px; flex-shrink: 0; }
.qr-box i { background: var(--navy); border-radius: 1px; }
.qr-box i.o { background: transparent; }

@media print {
  body { background: #fff; }
  #app { position: static; height: auto; border: 0; box-shadow: none; max-width: none; width: auto; border-radius: 0; overflow: visible; display: block; }
  #view { display: block; }
  .hdr, .tabbar, .footer-bar, .no-print, #toast, #sheet { display: none !important; }
  .content { overflow: visible; padding: 0; }
  .letter { border: 0; }
}
.tile .num, .tile .lbl { display: block; }

/* ---------- async / connectivity states ---------- */
.spin { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; vertical-align: -3px; opacity: .9; }
.spin.lg { width: 34px; height: 34px; border-width: 3.5px; color: var(--blue2); }
.offline-bar { flex-shrink: 0; display: flex; align-items: center; justify-content: center; gap: 6px; padding: calc(6px + var(--safe-t)) 12px 6px; background: #78350f; color: #fff; font-size: 12px; font-weight: 600; text-align: center; }
.boot { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 32px 24px; text-align: center; color: var(--muted); }
.boot .banner { width: 100%; }

/* ---------- onboarding: skip / links / fallbacks ---------- */
.ob-stage { position: relative; }
.ob-skip { position: absolute; top: -8px; right: -6px; z-index: 2; min-width: 48px; min-height: 40px; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--blue); font-weight: 700; font-size: 13.5px; }
.ob-skip:active { background: rgba(26, 86, 219, .08); }
.ob-skip:focus-visible, .ob-links button:focus-visible { outline: 2px solid var(--blue2); outline-offset: 1px; }
.ob-links { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 2px; margin-top: -6px; margin-bottom: -6px; font-size: 12px; color: var(--muted); }
.ob-links { flex-wrap: nowrap; white-space: nowrap; }
.ob-links button { border: 0; background: none; color: var(--text2); font-weight: 600; font-size: 12px; min-height: 32px; padding: 4px 5px; text-decoration: underline; text-decoration-color: rgba(51, 65, 85, .3); text-underline-offset: 3px; }
.ob-logo-fallback { width: clamp(48px, 14vw, 60px); height: clamp(48px, 14vw, 60px); border-radius: 50%; background: radial-gradient(circle, #fde68a, #f59e0b); color: #7c2d12; font-weight: 800; font-size: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ob-fallback { display: none; }
.ob-shot.failed .building-image { visibility: hidden; }
.ob-shot.failed .ob-fallback { display: flex; position: absolute; inset: 0; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--blue); font-weight: 700; font-size: 13px; background: linear-gradient(135deg, #dbe7f7, #eef4fb); }
.legal-doc h4 { font-size: 13px; color: var(--navy); margin: 14px 0 4px; }
.legal-doc p { font-size: 12.5px; color: var(--text2); line-height: 1.55; }

@media (max-width: 359px) { .wide-only { display: none; } }

/* ---------- language toggle ---------- */
.ob-lang { position: absolute; top: -8px; left: -6px; z-index: 2; min-height: 40px; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent;
  color: var(--blue); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 5px; }
.ob-lang:active { background: rgba(26, 86, 219, .08); }
.ob-lang:focus-visible { outline: 2px solid var(--blue2); outline-offset: 1px; }
html[lang="hi"] .slide h1 { letter-spacing: 0; }
html[lang="hi"] .tile .lbl, html[lang="hi"] .chip { line-height: 1.35; }

/* =====================================================================================
   Colour & motion theme (matches the staff web portal). Layered on top of the base styles;
   every animation is switched off when the device asks for reduced motion.
   ===================================================================================== */
:root {
  --brand-grad: #0B3A70;
  --aurora: #0B3A70;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08);
  --bg: #F1F5F9;
}
@keyframes fx-gradient { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes fx-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes fx-float { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(18px, -14px) scale(1.06); } }
@keyframes fx-shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }
@keyframes fx-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fx-rot-in { from { opacity: 0; transform: translateY(70%); } to { opacity: 1; transform: none; } }
@keyframes fx-pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); } 80%, 100% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); } }
@keyframes fx-glow { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: .9; transform: scale(1.12); } }

/* Desktop phone frame sits on a moving colour backdrop */
@media (min-width: 620px) and (min-height: 700px) {
  body { background: #F1F5F9; }
  #app { border-color: #1E293B; box-shadow: 0 20px 48px rgba(15, 23, 42, .16); }
}

/* Screen entrance: content blocks rise in one after another when you open a screen */
#view.enter .content > * { animation: fx-rise .5s cubic-bezier(.16, 1, .3, 1) both; }
#view.enter .content > *:nth-child(2) { animation-delay: .05s; }
#view.enter .content > *:nth-child(3) { animation-delay: .1s; }
#view.enter .content > *:nth-child(4) { animation-delay: .15s; }
#view.enter .content > *:nth-child(5) { animation-delay: .2s; }
#view.enter .content > *:nth-child(6) { animation-delay: .25s; }
#view.enter .content > *:nth-child(n+7) { animation-delay: .3s; }

/* Headers */
.hdr-brand {
  position: relative; overflow: hidden;
  background: #0B3A70;
}
.hdr-brand::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, #ff9933, #fff, #138808);
}
.hdr-brand::before { content: none; }
.hdr-brand > * { position: relative; z-index: 1; }
.hdr:not(.hdr-brand) { background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.hdr:not(.hdr-brand) h1 { color: #0B3A70; }
.hdr:not(.hdr-brand) h1 .sub { -webkit-text-fill-color: var(--muted); }

/* Bottom tab bar: active tab gets a colour pill */
.tabbar { background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.tabbar button { transition: color .2s; }
.tabbar button.on { color: #0B3A70; }
.tabbar button.on::before { width: 28px; height: 3px; background: #0B3A70; border-radius: 0 0 3px 3px; }
.tabbar button.on .ic { transform: translateY(-1px); }
.tabbar .ic { transition: transform .2s; }

/* Buttons */
.btn-primary, .btn-hero { background: #0B3A70; color: #fff; border-color: transparent; box-shadow: none; }
.btn-outline { border-color: #0B3A70; color: #0B3A70; }
.link { color: #2563EB; }

/* Cards, lists and tiles: softer, rounder, they give way when pressed */
.card, .list, .app-card, .type-card, .tile { border-color: #E2E8F0; }
.tile, .qa, .app-card, .type-card, .li { transition: transform .15s ease, box-shadow .2s ease; }
.tile:active, .qa:active, .app-card:active, .type-card:active { transform: scale(.97); }
.tile { position: relative; overflow: hidden; }
.tile::after {
  content: ""; position: absolute; right: -18px; top: -18px; width: 60px; height: 60px; border-radius: 50%;
  background: none;
}
.qa { position: relative; overflow: hidden; box-shadow: var(--shadow); }
.solid-blue, .solid-purple, .solid-cyan { background: #0B3A70; }
.solid-green { background: #15803D; }
.solid-amber { background: #B45309; }
.solid-red { background: #B91C1C; }
.solid-blue, .solid-green, .solid-amber, .solid-red, .solid-purple, .solid-cyan { box-shadow: none; }
.bar > i { background: #2563EB; }
.section-title .h2 { color: #0B3A70; }

/* Splash and login: gentle colour light, painted into the background (no positioned layers, so no overflow) */
.splash { background: linear-gradient(180deg, #fff 0%, #F1F5F9 100%); }
.login-brand { position: relative; }
.login-brand::before {
  content: ""; position: absolute; left: 50%; top: -6px; width: 120px; height: 120px; margin-left: -60px; border-radius: 50%;
  background: none; animation: none; z-index: 0;
}
.login-brand > * { position: relative; z-index: 1; }
.login-brand h2 { color: #0B3A70; }
.seg button.on { background: #0B3A70; color: #fff; box-shadow: none; }

/* Dashboard hero - Formal Institutional Header */
.hero {
  position: relative; border-radius: 8px; padding: 16px; color: #fff;
  background: #0B3A70;
  border-top: 3px solid #D97706;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
}
.hero > * { position: relative; z-index: 1; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hero-chip { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.25); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: #fff; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: #34d399; }
.live.demo i { background: #fbbf24; }
.hero-name { font-size: 16px; font-weight: 700; line-height: 1.3; margin-top: 8px; }
.hero-meta { font-size: 11.5px; color: rgba(255,255,255,.88); margin-top: 3px; }
.hero-fact { display: none; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.hero-stats > div { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); border-radius: 6px; padding: 8px 10px; min-width: 0; }
.hero-stats b { display: block; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.hero-stats span { font-size: 10px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: rgba(255,255,255,.82); }

/* Ticker hidden for clean government portal design */
.ticker { display: none; }

@media (prefers-reduced-motion: reduce) {
  body, .hdr-brand, .hdr-brand::before, .btn-primary, .btn-hero, .hero, .hero::before, .hero::after,
  .login-brand::before, .login-brand h2, .live i, .ticker-label i, .rot.in, #view.enter .content > * { animation: none !important; }
  .ticker-track { animation: none; flex-wrap: wrap; width: auto; }
  .ticker-track > [aria-hidden="true"] { display: none; }
}

/* ---------- AICTE leadership, handbook and about (bottom of the login page) ---------- */
.ai-info { margin: 28px -4px 0; padding-top: 22px; border-top: 1px solid var(--line); }
.ai-h { font-size: 16px; font-weight: 800; color: var(--navy); margin: 22px 0 10px; text-align: center; }
.ai-h:first-child { margin-top: 0; }
.ai-sub { font-size: 11.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--saffron); margin: 16px 0 8px; }
.ai-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ai-grid.lead { grid-template-columns: 1fr; }
.ai-grid.lead .ai-person { display: grid; grid-template-columns: 42% 1fr; align-items: center; }
.ai-grid.lead .ai-person figcaption { text-align: left; }
.ai-grid.lead .ai-person b { font-size: 14.5px; }
.ai-person { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.ai-photo { aspect-ratio: 340 / 242; background: var(--soft); display: flex; align-items: center; justify-content: center; }
.ai-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; display: block; }
.ai-photo span { font-size: 26px; font-weight: 800; color: var(--navy); opacity: .55; }
.ai-person figcaption { padding: 8px 10px 10px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.ai-person b { font-size: 13px; color: var(--text); line-height: 1.25; }
.ai-person small { font-size: 11.5px; color: var(--muted); }
.ai-book { display: grid; grid-template-columns: 38% 1fr; gap: 14px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: inherit; text-decoration: none; }
.ai-book img { width: 100%; height: auto; border-radius: 4px; box-shadow: 0 4px 14px rgba(15, 23, 42, .18); transition: transform .2s; }
.ai-book:hover img, .ai-book:focus-visible img { transform: translateY(-2px) scale(1.02); }
.ai-book span { display: flex; flex-direction: column; gap: 4px; }
.ai-book b { font-size: 15px; color: var(--navy); }
.ai-book small { font-size: 12px; color: var(--muted); line-height: 1.4; }
.ai-book em { font-style: normal; font-weight: 700; font-size: 13px; color: var(--blue); display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; }
.ai-about { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-align: center; }
.ai-about p { font-size: 12.5px; color: var(--text2); line-height: 1.55; margin: 8px 0; text-align: left; }
.ai-about dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 12px 0 0; text-align: left; font-size: 12.5px; }
.ai-about dt { font-weight: 700; color: var(--navy); }
.ai-about dd { margin: 0; color: var(--text2); min-width: 0; overflow-wrap: anywhere; }
.ai-about a { color: var(--blue); font-weight: 600; }
.ai-foot { font-size: 11px; color: var(--muted); text-align: center; margin: 16px 0 4px; }

/* ---------- launch screen: FDR Vault logo, "from AICTE" ---------- */
#launch { position: absolute; inset: 0; z-index: 1000; border-radius: inherit;   /* fills the app screen (inside the desktop phone frame too) */ background: #fff; display: flex; align-items: center; justify-content: center;
  transition: opacity .4s ease, visibility .4s; }
#launch.done { opacity: 0; visibility: hidden; }
#launch { overflow: hidden; flex-direction: column; background: linear-gradient(180deg, #FFFFFF 0%, #F6F8FB 70%, #EEF2F7 100%); font-family: 'Public Sans', system-ui, sans-serif; }
/* Navy-and-gold corner curves sweep in */
#launch .ln-swoosh { position: absolute; left: 0; width: 100%; height: 150px; pointer-events: none; }
#launch .ln-top { top: 0; animation: lnFromLeft .9s cubic-bezier(.16, 1, .3, 1) both; }
#launch .ln-bottom { bottom: 0; animation: lnFromRight .9s cubic-bezier(.16, 1, .3, 1) .1s both; }
/* AICTE New Delhi building, faded behind the logo */
#launch .ln-bg { position: absolute; left: 0; right: 0; top: 18%; height: 42%; background: url('delhi.webp') center / cover no-repeat; opacity: .1;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 72%); mask-image: radial-gradient(ellipse at center, #000 30%, transparent 72%);
  filter: grayscale(.6); animation: lnFade 1.2s ease .2s both; }
#launch .ln-center { position: relative; display: flex; flex-direction: column; align-items: center; margin-top: -60px; }
/* Logo: pops in, a light sheen passes across it, then it floats gently */
#launch .ln-logo { position: relative; width: 150px; height: 194px; animation: lnPop .8s cubic-bezier(.34, 1.56, .64, 1) .15s both, lnFloat 3s ease-in-out 1.2s infinite; }
#launch .ln-logo img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(10, 35, 71, .18)); }
#launch .ln-logo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .85) 50%, transparent 65%);
  background-size: 250% 100%; background-position: 150% 0; mix-blend-mode: soft-light; animation: lnSheen 1.1s ease 1s both; pointer-events: none;
  -webkit-mask: url('fdr-vault-mark.png') center / contain no-repeat; mask: url('fdr-vault-mark.png') center / contain no-repeat; }
/* Title: letters rise in one after another */
#launch .ln-title { margin: 14px 0 0; font: 700 38px/1.1 'Libre Baskerville', Georgia, 'Times New Roman', serif; color: #0B2F5B; letter-spacing: 1px; display: flex; }
#launch .ln-title span { display: inline-block; animation: lnRise .55s cubic-bezier(.16, 1, .3, 1) both; }
#launch .ln-title .sp { width: .32em; }
#launch .ln-title span:nth-child(1) { animation-delay: .7s; } #launch .ln-title span:nth-child(2) { animation-delay: .76s; }
#launch .ln-title span:nth-child(3) { animation-delay: .82s; } #launch .ln-title span:nth-child(5) { animation-delay: .9s; }
#launch .ln-title span:nth-child(6) { animation-delay: .96s; } #launch .ln-title span:nth-child(7) { animation-delay: 1.02s; }
#launch .ln-title span:nth-child(8) { animation-delay: 1.08s; } #launch .ln-title span:nth-child(9) { animation-delay: 1.14s; }
/* Gold rule draws out, then the three words appear one by one */
#launch .ln-rule { display: block; height: 2px; width: 230px; margin-top: 12px; background: linear-gradient(90deg, transparent, #D6A62E 15%, #D6A62E 85%, transparent);
  transform-origin: center; animation: lnDraw .7s ease 1.25s both; }
#launch .ln-tag { margin: 12px 0 0; display: flex; align-items: center; gap: 10px; font-size: 11.5px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: #3A4A60; }
#launch .ln-tag b { color: #D6A62E; font-size: 10px; letter-spacing: 0; animation: lnFade .4s ease both; }
#launch .ln-tag span { animation: lnRise .5s cubic-bezier(.16, 1, .3, 1) both; }
#launch .ln-tag > :nth-child(1) { animation-delay: 1.5s; } #launch .ln-tag > :nth-child(2) { animation-delay: 1.65s; }
#launch .ln-tag > :nth-child(3) { animation-delay: 1.75s; } #launch .ln-tag > :nth-child(4) { animation-delay: 1.9s; }
#launch .ln-tag > :nth-child(5) { animation-delay: 2s; }
/* "from AICTE" */
#launch .ln-from { position: absolute; left: 0; right: 0; bottom: calc(118px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; animation: lnRise .7s cubic-bezier(.16, 1, .3, 1) 2.1s both; }
#launch .ln-from-w { font-size: 16px; color: #546378; }
#launch .ln-from b { display: inline-flex; align-items: center; gap: 10px; font-size: 32px; line-height: 1; font-weight: 800; letter-spacing: .6px; color: #0B2F5B; }
#launch .ln-from b img { width: 36px; height: 36px; flex: none; }
#launch .ln-name { margin-top: 6px; font-size: 12.5px; font-weight: 700; color: #3A4A60; }
#launch .ln-min { font-size: 11px; color: #546378; }
@keyframes lnPop { 0% { opacity: 0; transform: scale(.55); } 100% { opacity: 1; transform: none; } }
@keyframes lnFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes lnSheen { from { background-position: 150% 0; } to { background-position: -50% 0; } }
@keyframes lnRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes lnFade { from { opacity: 0; } }
@keyframes lnDraw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes lnFromLeft { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
@keyframes lnFromRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@media (max-height: 640px) { #launch .ln-logo { width: 104px; height: 135px; } #launch .ln-title { font-size: 32px; } #launch .ln-from { bottom: calc(96px + env(safe-area-inset-bottom)); } #launch .ln-swoosh { height: 110px; } }
@media (prefers-reduced-motion: reduce) { #launch, #launch *, #launch *::after { transition: none !important; animation: none !important; } }

/* =====================================================================================
   FDR Vault design system — formal AICTE navy · white · light grey · gold (Public Sans).
   Layered last so it restyles every screen; screen-specific blocks use the fv- prefix.
   ===================================================================================== */
:root {
  /* AICTE palette: navy for headers and key controls, golden yellow for primary actions and selections,
     gold for borders and accents, white cards on light grey. */
  --navy: #0B2F5B; --navy-deep: #082449; --navy2: #0B2F5B; --gold-y: #F5B82E; --gold-y-h: #E9A814; --gold: #D6A62E;
  --gold-t: #7A5300; --gold-bg: #FEF6E2; --gold-line: #F0D48E;
  --blue: #0B2F5B; --blue2: #0B2F5B; --blue-soft: #E8EEF6;
  --bg: #F3F6FA; --soft: #F3F6FA; --slate-bg: #EEF2F7; --line: #DCE3EC; --line2: #C6D0DC;
  --text: #14243A; --text2: #3A4A60; --muted: #546378;
  --green: #17633A; --green-bg: #E8F3EC; --green-line: #BFDCC9;
  --amber: #7A4A00; --amber-bg: #FDF3DD; --amber-line: #EED29A;
  --red: #9F1F14; --red-bg: #FBEDEC; --red-line: #E9B4AE;
  --radius: 14px; --shadow: none;
}
body { font-family: 'Public Sans', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; color: var(--text); }
#app { background: var(--bg); }
.content { padding: 14px 16px 24px; }

/* App bars: navy with a gold rule */
.hdr, .hdr:not(.hdr-brand) {
  background: var(--navy); color: #fff; border-bottom: 4px solid var(--gold); min-height: 60px;
  -webkit-backdrop-filter: none; backdrop-filter: none; padding: calc(10px + var(--safe-t)) 10px 10px 14px;
}
.hdr h1, .hdr:not(.hdr-brand) h1 { color: #fff; font-size: 18px; }
.hdr .sub, .hdr:not(.hdr-brand) h1 .sub { color: #C9D4E5; -webkit-text-fill-color: #C9D4E5; font-size: 11.5px; }
.hdr .icon-btn { color: #fff; width: 44px; height: 44px; }
.hdr .icon-btn:active { background: rgba(255, 255, 255, .15); }
.hdr .link { color: #fff; }
.hdr .chip { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .3); }
.hdr-brand::after { content: none; }
.fv-brand-tile { width: 40px; height: 40px; border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.fv-brand-tile img { height: 34px; width: auto; }
.fv-brand-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.fv-brand-t b { font-size: 15px; font-weight: 800; letter-spacing: 1.2px; color: #fff; }
.fv-brand-t span { font-size: 11px; color: #C9D4E5; }
.dot-badge, .tabbar .tab-badge { background: var(--gold-y); color: var(--navy-deep); border: 0; font-weight: 800; }
.avatar { background: var(--gold-y); color: var(--navy-deep); border: 0; font-weight: 800; }
.hdr .gold-btn { height: 40px; padding: 0 14px; border-radius: 12px; border: 0; background: var(--gold-y); color: var(--navy-deep); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.hdr .ghost-btn { height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .4); background: transparent; color: #fff; font-weight: 600; font-size: 12.5px; }

/* Bottom tabs: gold marker on the active tab */
.tabbar { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; border-top: 1px solid var(--line); }
.tabbar button { color: var(--muted); min-height: 50px; }
.tabbar button.on { color: var(--navy); }
.tabbar button.on::before { width: 40%; height: 3px; background: var(--gold-y); border-radius: 0 0 3px 3px; }

/* Buttons, inputs, segmented controls, pills */
.btn { border-radius: 12px; min-height: 44px; }
.btn-primary, .btn-hero { background: var(--gold-y); color: var(--navy-deep); box-shadow: inset 0 -2px 0 var(--gold); border-color: transparent; }
.btn-primary .spin { border-color: rgba(8, 36, 73, .25); border-top-color: var(--navy-deep); }
.btn-outline { background: #fff; border-color: var(--line2); color: var(--navy); }
.btn-ghost { background: #EEF1F5; color: var(--navy); }
.btn-danger { background: #fff; color: #B42318; border-color: var(--red-line); }
.btn-block.btn-primary { min-height: 50px; }
.input { border-color: var(--line2); border-radius: 12px; min-height: 48px; }
.input:focus { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.check input { accent-color: var(--navy2); }
.seg button.on { background: var(--gold-y); color: var(--navy-deep); box-shadow: none; font-weight: 700; }
.seg button { font-size: 13.5px; }
.pills button { min-height: 34px; }
.pills button.on { background: var(--gold-y); border-color: var(--gold-y); color: var(--navy-deep); font-weight: 700; }
.toggle input:checked + span { background: var(--navy); }
.toggle input:checked + span::after { background: var(--gold-y); }
.link { color: var(--gold-t); }
.or { font-weight: 600; letter-spacing: 1px; font-size: 11px; color: var(--muted); }

/* Cards, lists, tiles */
.card, .list, .app-card, .type-card, .tile { border-color: var(--line); box-shadow: none; border-radius: 14px; }
.section-title .h2, .fv-h { font-size: 13px; font-weight: 700; letter-spacing: .5px; color: var(--text2); text-transform: uppercase; }
.fv-h { margin: 16px 2px 8px; }
.bar > i { background: var(--gold); }
.tone-blue, .tone-purple, .tone-cyan { background: var(--blue-soft); color: var(--navy2); }
.solid-blue, .solid-purple, .solid-cyan { background: var(--navy); }
.banner.info { background: var(--blue-soft); border-color: #C3D2E8; color: var(--navy); }
.banner.warn { background: var(--gold-bg); border-color: var(--gold-line); color: #4A3A10; }
.type-card.hl { background: var(--gold-bg); border-color: var(--gold-line); }
.type-card .t { color: var(--navy); }
.app-card .ty { color: var(--text2); }

/* Login / registration */
.fv-hero { background: var(--navy); border-bottom: 4px solid var(--gold); padding: calc(10px + var(--safe-t)) 14px 60px; display: flex; flex-direction: column; align-items: center; gap: 12px; color: #fff; }
.fv-hero-top { align-self: stretch; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.fv-hero-top > div { display: flex; align-items: center; gap: 6px; }
.fv-aicte { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; color: #E8D29A; }
.fv-aicte img { width: 30px; height: 30px; border-radius: 50%; background: #fff; padding: 2px; }
.fv-hero .icon-btn { color: #fff; width: 44px; height: 44px; }
.fv-pill-btn { height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid rgba(255, 255, 255, .35); background: transparent; color: #fff; font-weight: 600; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.fv-logo { width: 92px; height: 92px; border-radius: 22px; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 3px var(--gold-y); }
.fv-logo img { height: 80px; width: auto; }
.fv-hero h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: 2px; color: #fff; text-align: center; }
.fv-hero p { margin: 4px 0 0; font-size: 12.5px; color: #C9D4E5; text-align: center; }
.fv-sheet { margin: -40px 16px 0; background: #fff; border-radius: 20px; padding: 20px; border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(10, 35, 71, .12); position: relative; }
.fv-below { padding: 16px 16px 24px; }
.fv-row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fv-row2 .btn { width: 100%; padding-left: 8px; padding-right: 8px; }
.fv-group { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.fv-group-h { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13px; font-weight: 700; letter-spacing: .4px; color: var(--navy); text-transform: uppercase; }
.fv-group-h::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--gold); }
.fv-strength { display: flex; align-items: center; gap: 8px; margin: -6px 0 12px; }
.fv-strength > div { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.fv-strength i { height: 5px; border-radius: 3px; background: var(--line); }
.fv-strength i.on { background: #1E7A46; }
.fv-strength.weak i.on { background: #B42318; }
.fv-strength.fair i.on { background: #B7791F; }
.fv-strength span { font-size: 11.5px; font-weight: 600; color: var(--muted); min-width: 44px; text-align: right; }

/* Dashboard */
.fv-inst { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.fv-inst-h { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; border-bottom: 1px solid #EEF1F5; }
.fv-kicker { font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--gold-t); text-transform: uppercase; }
.fv-inst-h b { font-size: 16px; line-height: 1.3; }
.fv-inst-h span { font-size: 12px; color: var(--muted); }
.fv-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fv-stats > div { padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fv-stats > div + div { border-left: 1px solid #EEF1F5; }
.fv-stats b { font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.fv-stats span { font-size: 11px; color: var(--muted); }
.fv-status { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.fv-status button { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; align-items: center; gap: 10px; text-align: left; min-height: 60px; color: var(--navy); }
.fv-status .tile-ico { width: 36px; height: 36px; border-radius: 10px; }
.fv-status b { display: block; font-size: 18px; line-height: 1.1; }
.fv-status small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.25; }
.fv-qa { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fv-qa button { border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--navy); text-align: center; line-height: 1.25; }
.fv-qa .fv-qa-i { width: 52px; height: 52px; border-radius: 14px; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--navy2); }
.fv-qa button:first-child .fv-qa-i { background: var(--gold-y); border-color: var(--gold-y); color: var(--navy-deep); }
.fv-alert { width: 100%; background: var(--gold-bg); border: 1px solid var(--gold-line); border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; text-align: left; color: var(--navy); }
.fv-alert + .fv-alert { margin-top: 8px; }
.fv-alert > .ic { color: var(--gold-t); }
.fv-alert b { display: block; font-size: 13px; }
.fv-alert small { display: block; font-size: 11.5px; color: #5E4A14; }

/* Lists of applications, deposits and notifications */
.fv-card { width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; display: flex; flex-direction: column; gap: 6px; text-align: left; color: var(--navy); }
.fv-card + .fv-card { margin-top: 10px; }
.fv-card.alert { border-color: var(--red-line); }
.fv-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fv-card-top b { font-size: 14px; }
.fv-card .fv-sub { font-size: 12.5px; color: var(--text2); }
.fv-card .fv-meta { font-size: 11px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.fv-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin-top: 4px; }
.fv-steps i { height: 5px; border-radius: 3px; background: var(--line); }
.fv-steps i.done { background: var(--navy2); }
.fv-steps i.warn { background: #B42318; }
.fv-actions { display: flex; gap: 8px; margin-top: 4px; }
.fv-actions .btn { flex: 1; min-height: 40px; padding: 8px; font-size: 12.5px; }
.fv-progress { height: 6px; border-radius: 3px; background: var(--blue-soft); overflow: hidden; }
.fv-progress i { display: block; height: 6px; background: var(--gold); }
.fv-progress.due i { background: #B7791F; }
.fv-progress.done i { background: var(--navy2); }
.fv-corpus { padding: 4px 18px 16px; background: var(--navy); border-bottom: 4px solid var(--gold); color: #fff; display: flex; flex-direction: column; gap: 3px; flex-shrink: 0; }
.fv-corpus .fv-kicker { color: #E8D29A; }
.fv-corpus b { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.fv-corpus span { font-size: 12px; color: #C9D4E5; }
.hdr.fv-flat { border-bottom: 0; }
.fv-notes { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.fv-note { display: flex; gap: 12px; padding: 13px 14px; align-items: flex-start; }
.fv-note + .fv-note { border-top: 1px solid #EEF1F5; }
.fv-note .tile-ico { width: 38px; height: 38px; border-radius: 11px; }
.fv-note .fv-t { font-size: 13px; line-height: 1.35; font-weight: 600; }
.fv-note.unread .fv-t { font-weight: 800; }
.fv-note .fv-m { font-size: 12px; line-height: 1.45; color: var(--text2); margin-top: 3px; }
.fv-note .fv-d { font-size: 11px; color: var(--muted); margin-top: 3px; }
.fv-note .fv-links { display: flex; gap: 14px; margin-top: 6px; }
.fv-unread { width: 9px; height: 9px; border-radius: 50%; background: var(--navy2); flex-shrink: 0; margin-top: 5px; }

/* Profile */
.fv-profile { padding: calc(16px + var(--safe-t)) 18px 16px; background: var(--navy); border-bottom: 4px solid var(--gold); display: flex; align-items: center; gap: 14px; color: #fff; flex-shrink: 0; }
.fv-profile .avatar { width: 56px; height: 56px; font-size: 19px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }
.fv-profile b { display: block; font-size: 17px; }
.fv-profile .fv-role { display: block; font-size: 12px; color: #E8D29A; font-weight: 600; }
.fv-profile .fv-org { display: block; font-size: 11.5px; color: #C9D4E5; }
.fv-lang { display: flex; background: var(--bg); border-radius: 9px; padding: 3px; gap: 2px; }
.fv-lang button { height: 30px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--text2); font-weight: 600; font-size: 12px; }
.fv-lang button.on { background: var(--gold-y); color: var(--navy-deep); }
.fv-logout { width: 100%; margin-top: 12px; }

/* =====================================================================================
   Motion — short, GPU-friendly (opacity / transform only), never blocks a tap, off for reduced motion.
   ===================================================================================== */
.btn, .icon-btn, .gold-btn, .ghost-btn, .fv-pill-btn, .pills button, .seg button, .tabbar button, .link, .li,
.fv-card, .fv-status button, .fv-alert, .fv-qa .fv-qa-i, .type-card, .input, .fv-lang button {
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}
:focus-visible { outline: 3px solid var(--gold-y); outline-offset: 2px; }
.input:focus-visible { outline: 0; }
.btn-primary:hover, .hdr .gold-btn:hover { background: var(--gold-y-h); }
.btn:active, .icon-btn:active, .gold-btn:active, .fv-card:active, .fv-status button:active, .fv-alert:active, .li:active, .type-card:active,
.fv-qa button:active .fv-qa-i, .pills button:active, .seg button:active { transform: scale(.97); }
.tabbar button .ic { transition: transform .2s ease; }
.tabbar button.on .ic { transform: translateY(-2px); }
.tabbar button.on::before { animation: fvGrowX .3s cubic-bezier(.16, 1, .3, 1) both; }
@media (hover: hover) {
  .fv-card:hover, .fv-status button:hover, .type-card:hover, .fv-alert:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(11, 47, 91, .10); border-color: var(--gold); }
  .fv-qa button:hover .fv-qa-i { transform: translateY(-2px); border-color: var(--gold); }
  .btn-outline:hover { border-color: var(--gold); background: var(--gold-bg); }
  .li:hover { background: #F7F9FC; }
  .tabbar button:hover, .pills button:hover { color: var(--navy); }
  .fv-alert:hover > .ic:last-child, .li:hover .chev { transform: translateX(3px); }
}
.li .chev, .fv-alert > .ic:last-child { transition: transform .2s ease; }

/* Screens: the page fades and rises in; list cards follow in a short stagger */
#view.enter .content, #view.enter .fv-corpus, #view.enter .fv-profile { animation: fvRise .4s cubic-bezier(.16, 1, .3, 1) both; }
#view.enter .fv-card, #view.enter .fv-note, #view.enter .finding, #view.enter .fv-status button, #view.enter .fv-qa button { animation: fvRise .5s cubic-bezier(.16, 1, .3, 1) both; }
#view.enter .fv-card:nth-child(2), #view.enter .fv-note:nth-child(2), #view.enter .finding:nth-child(2), #view.enter .fv-status button:nth-child(2), #view.enter .fv-qa button:nth-child(2) { animation-delay: .05s; }
#view.enter .fv-card:nth-child(3), #view.enter .fv-note:nth-child(3), #view.enter .finding:nth-child(3), #view.enter .fv-status button:nth-child(3), #view.enter .fv-qa button:nth-child(3) { animation-delay: .1s; }
#view.enter .fv-card:nth-child(4), #view.enter .fv-note:nth-child(4), #view.enter .finding:nth-child(4), #view.enter .fv-status button:nth-child(4), #view.enter .fv-qa button:nth-child(4) { animation-delay: .15s; }
#view.enter .fv-card:nth-child(n+5), #view.enter .fv-note:nth-child(n+5), #view.enter .finding:nth-child(n+5) { animation-delay: .2s; }
/* Filters and tabs: the changed list or pane eases in place */
.fv-swap { animation: fvRise .3s cubic-bezier(.16, 1, .3, 1) both; }
/* Progress bars fill smoothly on arrival */
#view.enter .fv-progress i, #view.enter .bar > i { transform-origin: left center; animation: fvGrowX 1s cubic-bezier(.16, 1, .3, 1) .25s both; }
#view.enter .fv-steps i { animation: fvFade .35s ease both; }
#view.enter .fv-steps i:nth-child(2) { animation-delay: .08s; } #view.enter .fv-steps i:nth-child(3) { animation-delay: .16s; }
#view.enter .fv-steps i:nth-child(4) { animation-delay: .24s; } #view.enter .fv-steps i:nth-child(5) { animation-delay: .32s; }
.bar > i, .fv-progress i { transition: width .6s cubic-bezier(.16, 1, .3, 1); }

/* Refresh: the icon spins while data reloads */
.fv-refresh.spinning .ic { animation: spin .8s linear infinite; }
.fv-refresh[aria-busy="true"] { pointer-events: none; }
/* Uploads: an indeterminate gold bar runs under a file while it uploads */
.up[aria-busy="true"] { position: relative; overflow: hidden; }
.up[aria-busy="true"]::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 40%; background: var(--gold-y); animation: fvIndet 1.1s ease-in-out infinite; }
/* AI verification: typing dots while the server works; results ease in */
.fv-typing { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: middle; }
.fv-typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); animation: fvDot 1.2s ease-in-out infinite; }
.fv-typing i:nth-child(2) { animation-delay: .15s; } .fv-typing i:nth-child(3) { animation-delay: .3s; }
/* Feedback */
.toast { animation: fvToast .35s cubic-bezier(.16, 1, .3, 1) both; }
.banner.err, .ferr { animation: fvShake .35s ease; }
.success-ring { animation: fvPop .6s cubic-bezier(.34, 1.56, .64, 1) both; }

@keyframes fvRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fvFade { from { opacity: 0; } }
@keyframes fvGrowX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fvIndet { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@keyframes fvDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes fvPop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes fvToast { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fvShake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .fv-refresh.spinning .ic { animation: none !important; opacity: .5; }
}

/* ---------- Regulatory Assistant (assistant.js) ---------- */
.as-entry { width: 100%; text-align: left; gap: 12px; margin: 14px 0 0; border: 1px solid var(--blue2); }
.as-hero .h3 { margin: 0; }
.as-item { width: 100%; text-align: left; gap: 10px; margin-top: 10px; }
.as-top { padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.as-top .seg button { font-size: 12px; }
.as-top .seg button.as-done { color: var(--green); }
.as-thread { display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }
.as-msg { display: flex; gap: 8px; align-items: flex-start; max-width: 100%; }
.as-msg.me { justify-content: flex-end; }
.as-av { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #F5B82E; }
.as-b { padding: 10px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; max-width: 86%; overflow-wrap: anywhere; }
.as-msg.bot .as-b { background: var(--surface); border: 1px solid var(--line); border-top-left-radius: 4px; }
.as-msg.me .as-b { background: var(--navy); color: #fff; border-top-right-radius: 4px; }
.as-chips { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 36px; }
.as-chip { border: 1px solid var(--blue2); background: var(--surface); color: var(--blue2); border-radius: 999px; padding: 8px 12px; font-size: 12.5px; font-weight: 600; text-align: left; }
.as-chip.on { background: var(--blue2); color: #fff; }
.as-chip.as-wide { border-radius: 12px; width: 100%; display: flex; flex-direction: column; gap: 2px; }
.as-chip small { font-weight: 500; opacity: .8; }
.as-ul { margin: 6px 0 8px; padding-left: 18px; }
.as-ul li { margin: 3px 0; }
.as-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.as-bar i { display: block; height: 100%; background: var(--green); transition: width .3s; }
.as-doc { border-left: 4px solid var(--line); transition: box-shadow .15s; }
.as-doc.v-green { border-left-color: var(--green); }
.as-doc.v-amber { border-left-color: var(--amber); }
.as-doc.v-red { border-left-color: var(--red); }
.as-doc.as-drag { box-shadow: 0 0 0 3px rgba(11, 58, 112, .35); }
.as-off { opacity: .7; }
.as-src summary, .as-doc details summary { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.as-issue { margin-top: 6px; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; }
.as-issue.red { background: var(--red-bg); border: 1px solid var(--red-line); }
.as-issue.amber { background: var(--amber-bg); border: 1px solid var(--amber-line); }
.as-issue div { margin-top: 2px; }
.as-field.bad { border-color: var(--red-line); }
.as-field .field { margin: 6px 0 4px; }
.as-field .field label:empty { display: none; }
.as-val { margin: 6px 0 4px; font-weight: 600; overflow-wrap: anywhere; }
.as-quote { margin-top: 4px; padding-left: 8px; border-left: 3px solid var(--line); font-style: italic; color: var(--muted); }
.as-done-card { border: 1px solid var(--green-line); background: var(--green-bg); }
.footer-bar #asstAsk { flex: 1; min-width: 0; }
.footer-bar [data-act="asstAsk"] { flex: 0 0 52px; }
.as-top .seg button { display: inline-flex; align-items: center; justify-content: center; gap: 3px; white-space: nowrap; }
/* Google profile photo inside the round avatar */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
