/* ParasMoney design system. Original CSS; brand colours from the owner's logo (navy and gold).
   Fonts: Inter (SIL OFL 1.1, self-hosted) with system fallbacks that include Indian scripts. */

@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20B9, U+2122, U+2191, U+2193, U+2212, U+2215;
}

:root {
  --navy: #0b2a6f; --navy-2: #12398f; --navy-deep: #071a45;
  --gold: #c9971c; --gold-2: #f2c14e; --gold-ink: #7a5600;
  --bg: #f4f6fb; --bg-glow-1: rgba(18, 57, 143, .10); --bg-glow-2: rgba(242, 193, 78, .14);
  --surface: rgba(255, 255, 255, .86); --surface-solid: #ffffff; --surface-2: #eef2fa;
  --text: #121a2e; --muted: #56607a; --line: #dbe1ee; --line-strong: #c3cce0;
  --accent: var(--navy); --accent-text: #fff; --link: #1b45a8; --focus: #f2c14e;
  --ok-bg: #e8f6ee; --ok: #176b3c; --ok-line: #9fd3b4;
  --info-bg: #e9f0ff; --info: #1f4aa8; --info-line: #b5c8f2;
  --warn-bg: #fff5dc; --warn: #8a5a00; --warn-line: #f0d28b;
  --err-bg: #fdecec; --err: #a3242a; --err-line: #f1b3b3;
  --pending: #b9c1d3;
  --radius: 16px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(11, 42, 111, .06), 0 8px 24px rgba(11, 42, 111, .08);
  --shadow-lift: 0 2px 4px rgba(11, 42, 111, .08), 0 14px 32px rgba(11, 42, 111, .14);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", "Nirmala UI", "Noto Sans", "Noto Sans Devanagari", "Noto Sans Bengali", "Noto Sans Tamil", "Noto Sans Telugu", "Noto Sans Gujarati", "Noto Sans Kannada", "Noto Sans Malayalam", "Noto Sans Gurmukhi", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070d1f; --bg-glow-1: rgba(60, 100, 220, .16); --bg-glow-2: rgba(242, 193, 78, .07);
    --surface: rgba(17, 27, 55, .78); --surface-solid: #111b37; --surface-2: #17244a;
    --text: #e8ecf6; --muted: #a2adc6; --line: #26345e; --line-strong: #34457a;
    --accent: #f2c14e; --accent-text: #1a1300; --link: #9db8ff;
    --ok-bg: #0f2e1d; --ok: #8fe0ad; --ok-line: #285f3d; --info-bg: #13244d; --info: #a9c1ff; --info-line: #2e4785;
    --warn-bg: #33270a; --warn: #f5cf72; --warn-line: #6a5317; --err-bg: #3a1416; --err: #ffb0b0; --err-line: #7a2d31;
    --pending: #4a5677; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .35); --shadow-lift: 0 14px 36px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #070d1f; --bg-glow-1: rgba(60, 100, 220, .16); --bg-glow-2: rgba(242, 193, 78, .07);
  --surface: rgba(17, 27, 55, .78); --surface-solid: #111b37; --surface-2: #17244a;
  --text: #e8ecf6; --muted: #a2adc6; --line: #26345e; --line-strong: #34457a;
  --accent: #f2c14e; --accent-text: #1a1300; --link: #9db8ff;
  --ok-bg: #0f2e1d; --ok: #8fe0ad; --ok-line: #285f3d; --info-bg: #13244d; --info: #a9c1ff; --info-line: #2e4785;
  --warn-bg: #33270a; --warn: #f5cf72; --warn-line: #6a5317; --err-bg: #3a1416; --err: #ffb0b0; --err-line: #7a2d31;
  --pending: #4a5677; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .35); --shadow-lift: 0 14px 36px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  font: 16px/1.6 var(--font); color: var(--text); background: var(--bg);
  background-image: radial-gradient(1100px 520px at 8% -10%, var(--bg-glow-1), transparent 60%), radial-gradient(900px 480px at 100% 0%, var(--bg-glow-2), transparent 55%);
  background-attachment: fixed;
}
a { color: var(--link); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); margin: .4rem 0 .8rem; font-weight: 750; }
h2 { font-size: 1.2rem; margin: 1.8rem 0 .7rem; font-weight: 700; }
h3 { font-size: 1.05rem; margin: 1.2rem 0 .5rem; }
p { margin: .4rem 0; }
img { max-width: 100%; height: auto; }
main.page { max-width: 1040px; margin: 0 auto; padding: 20px 16px 48px; outline: none; }
.muted, label small { color: var(--muted); font-weight: 400; }
.small { font-size: .85rem; }
.center { text-align: center; }
.wrap { overflow-wrap: anywhere; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 62ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--gold-ink); margin: 0; }
:root[data-theme="dark"] .eyebrow { color: var(--gold-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .eyebrow { color: var(--gold-2); } }
.en-alt { display: block; font-size: .72em; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.nav .en-alt, .tile-title .en-alt { display: inline; margin-left: .3em; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 10px; transition: top .15s; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
code { font-size: .82rem; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap;
  padding: 10px 16px; background: color-mix(in srgb, var(--surface-solid) 78%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; }
.logo-word { font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }
.logo-word.big { font-size: 1.9rem; margin: .3rem 0 0; }
.logo-a { color: var(--navy); }
.logo-b { background: linear-gradient(90deg, var(--gold), var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="dark"] .logo-a { color: #dfe7ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-a { color: #dfe7ff; } }
.logo-mark { flex: none; filter: drop-shadow(0 2px 6px rgba(11, 42, 111, .25)); }
.nav { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; margin-right: auto; }
.nav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 550; font-size: .95rem; transition: background .18s var(--ease), color .18s; }
.nav a:hover { background: var(--surface-2); }
.nav a.active { background: var(--navy); color: #fff; }
:root[data-theme="dark"] .nav a.active { background: var(--gold-2); color: #1a1300; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav a.active { background: var(--gold-2); color: #1a1300; } }
.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.signed-in .top-actions { margin-left: 0; }
.lang-form { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-solid); }
.lang-form select { border: 0; background: transparent; color: var(--text); font: inherit; font-size: .9rem; min-height: 36px; max-width: 12.5rem; padding: 0 4px; }
.lang-icon { display: inline-flex; color: var(--muted); }
.menu { position: relative; }
.menu > summary { list-style: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-solid); cursor: pointer; color: var(--text); }
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; padding: 10px; border-radius: var(--radius); background: var(--surface-solid); border: 1px solid var(--line); box-shadow: var(--shadow-lift); display: grid; gap: 2px; animation: pop .16s var(--ease); z-index: 40; }
.menu-panel a, .menu-panel button.link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; min-height: 44px; width: 100%; text-align: left; font-size: .95rem; }
.menu-panel a:hover, .menu-panel button.link:hover { background: var(--surface-2); }
.menu-panel p { margin: 4px 12px 8px; overflow-wrap: anywhere; }

/* ---------- buttons ---------- */
button, .button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border: 1px solid transparent; border-radius: 12px; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; text-align: center;
  background: linear-gradient(180deg, var(--navy-2), var(--navy)); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .15) inset, 0 4px 14px rgba(11, 42, 111, .22);
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s, filter .2s;
}
:root[data-theme="dark"] :is(button, .button, .btn):not(.secondary):not(.btn-ghost):not(.link):not(.icon-btn) { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1a1300; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(button, .button, .btn):not(.secondary):not(.btn-ghost):not(.link):not(.icon-btn) { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1a1300; } }
button:hover, .button:hover, .btn:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255, 255, 255, .15) inset, 0 8px 22px rgba(11, 42, 111, .28); filter: brightness(1.05); }
button:active, .button:active, .btn:active { transform: translateY(0) scale(.98); }
button.secondary, .button.secondary, .btn-ghost { background: var(--surface-solid); color: var(--accent); border-color: var(--line-strong); box-shadow: none; }
:root[data-theme="dark"] :is(button.secondary, .button.secondary, .btn-ghost) { color: var(--gold-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(button.secondary, .button.secondary, .btn-ghost) { color: var(--gold-2); } }
.btn-primary { background: linear-gradient(180deg, var(--navy-2), var(--navy)); }
.btn-sm { min-height: 44px; padding: 6px 14px; font-size: .9rem; border-radius: 999px; }
.btn-lg { min-height: 52px; padding: 12px 26px; font-size: 1.05rem; }
.cta { background: linear-gradient(135deg, var(--gold-2), var(--gold)) !important; color: #1a1300 !important; }
button.link { background: none; border: 0; color: var(--link); padding: 0 4px; min-height: 0; font-weight: 500; text-decoration: underline; box-shadow: none; }
button.link:hover { transform: none; box-shadow: none; filter: none; }
.icon-btn { background: transparent; color: var(--muted); border: 0; box-shadow: none; width: 40px; min-height: 40px; padding: 0; border-radius: 999px; }
.icon-btn:hover { background: var(--surface-2); box-shadow: none; transform: none; }
button:disabled { opacity: .5; cursor: not-allowed; transform: none; filter: none; }
form.inline { display: inline; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.actions.center { justify-content: center; }

/* ---------- forms ---------- */
.stack { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; font-weight: 600; min-width: 0; }
input, select, textarea { font: inherit; }
input:not([type=hidden]):not([type=file]):not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-solid); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.lang-form select { width: auto; min-height: 36px; border: 0; padding: 0 4px; }
input:focus, select:focus, textarea:focus { border-color: var(--navy-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 35%, transparent); outline: none; }
input[type=file] { padding: 10px 0; max-width: 100%; }
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; accent-color: var(--navy); flex: none; }
.choice { display: flex; align-items: center; gap: 12px; font-weight: 500; min-height: 44px; padding: 4px 0; cursor: pointer; }
label.tick { display: flex; gap: 10px; align-items: center; font-weight: 600; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0; min-width: 0; display: grid; gap: 10px; }
legend { font-weight: 700; padding: 0 6px; display: inline-flex; align-items: center; gap: 6px; }
.drop { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 18px; background: var(--surface-2); transition: border-color .2s, background .2s; }
.drop:hover, .drop:focus-within { border-color: var(--navy-2); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 14px; }
.filters label { min-width: 160px; flex: 1; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > label { font-weight: 600; }
.field.check input, .line.check input { border-color: var(--warn-line); background: var(--warn-bg); }

/* ---------- cards and surfaces ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 14px;
  box-shadow: var(--shadow); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.card.warn { border-color: var(--warn-line); background: var(--warn-bg); }
.list { list-style: none; padding: 0; margin: 0; }
.list > li.card { transition: transform .18s var(--ease), box-shadow .2s; }
.list > li.card:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.head h1, .head h2 { margin-right: auto; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0 0 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.split { display: grid; gap: 18px; }
@media (min-width: 820px) { .split { grid-template-columns: 1fr 1fr; } }
.preview { max-width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.big { font-size: 1.4rem; font-family: ui-monospace, monospace; overflow-wrap: anywhere; }
pre.mail { white-space: pre-wrap; overflow-wrap: anywhere; font: .9rem/1.45 ui-monospace, monospace; }
details summary { cursor: pointer; margin: 12px 0; font-weight: 600; }
.empty-state { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty-state .ic { color: var(--gold); }
.empty { text-align: center; }

/* ---------- messages: success, info, warning, error (colour + icon, never colour alone) ---------- */
.flash, .errors { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; border: 1px solid; margin: 0 0 16px; }
.flash p, .errors ul { margin: 0; }
.errors ul { padding-left: 1.1rem; }
.flash .ic, .errors .ic { flex: none; margin-top: 2px; }
.flash.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.flash.error, .errors { background: var(--err-bg); color: var(--err); border-color: var(--err-line); }
.flash.info { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.why { margin: 0; padding: 10px 12px 10px 30px; background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); border-radius: 10px; font-size: .92rem; }
.why.block { background: var(--err-bg); color: var(--err); border-color: var(--err-line); }
.missing { color: var(--warn); font-style: italic; }
.lang-note { display: flex; gap: 8px; align-items: center; margin-top: 28px; padding: 10px 14px; border-radius: 10px; background: var(--info-bg); color: var(--info); font-size: .88rem; }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--surface-2); color: var(--text); margin-left: 6px; border: 1px solid var(--line); }
.badge.active { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.badge.expired { background: var(--err-bg); color: var(--err); border-color: var(--err-line); }
.badge.upcoming, .badge.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.count { color: var(--muted); font-weight: 500; }

/* ---------- welcome / auth ---------- */
.hero { text-align: center; padding: 26px 0 8px; display: grid; justify-items: center; gap: 6px; }
.hero h1 { max-width: 22ch; }
.hero-logo, .about-logo { width: min(100%, 760px); border-radius: 22px; box-shadow: var(--shadow-lift); background: #fff; }
.hero-mark { display: grid; justify-items: center; }
.tagline { color: var(--gold-ink); font-weight: 650; letter-spacing: .02em; }
:root[data-theme="dark"] .tagline { color: var(--gold-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tagline { color: var(--gold-2); } }
.auth { max-width: 460px; margin: 18px auto; padding: 26px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lift); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.auth-brand { display: grid; justify-items: center; text-align: center; margin-bottom: 6px; }
.auth h1 { text-align: center; }
.auth > p.muted { text-align: center; }
.promise { margin-top: 26px; }
.ticks { list-style: none; padding: 0; display: grid; gap: 8px; }
.ticks li { padding-left: 28px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 4px; color: var(--ok); font-weight: 800; }
.steps-row { list-style: none; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.step-card { position: relative; display: grid; gap: 6px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.step-card .ic { color: var(--navy-2); }
.step-no { position: absolute; right: 14px; top: 12px; font-weight: 800; font-size: 1.6rem; color: var(--muted); }

/* ---------- dashboard ---------- */
.welcome-band { padding: 8px 0 4px; }
.thought { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; margin: 10px 0 18px; border-radius: var(--radius); border: 1px solid var(--warn-line);
  background: linear-gradient(135deg, color-mix(in srgb, var(--gold-2) 18%, var(--surface-solid)), var(--surface-solid)); box-shadow: var(--shadow); }
.thought-icon { color: var(--gold); display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: color-mix(in srgb, var(--gold-2) 22%, transparent); flex: none; }
.thought > div { flex: 1; min-width: 0; }
.thought-title { margin: 0; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.thought-text { margin: 2px 0; font-size: 1.12rem; font-weight: 600; }
.thought-second { margin: 0; }
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); margin: 6px 0 10px; }
.tile { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--radius); text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; min-height: 96px; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--line-strong); }
.tile-icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; flex: none; color: #fff; background: linear-gradient(135deg, var(--navy-2), var(--navy)); box-shadow: 0 6px 16px rgba(11, 42, 111, .25); }
.tile:first-child .tile-icon { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #1a1300; }
.tile-body { display: grid; gap: 2px; min-width: 0; }
.tile-title { font-weight: 700; font-size: 1.05rem; }
.tile-text { color: var(--muted); font-size: .93rem; }
.tile-badge { position: absolute; top: 12px; right: 12px; padding: 2px 10px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); font-size: .78rem; font-weight: 700; }

/* ---------- Home dashboard: Sehat Saathi first and largest, then equal cards in a responsive grid ---------- */
.home-tiles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.home-tiles .tile-badge { position: static; justify-self: start; margin-top: 6px; }
.home-tiles .tile:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.home-tiles .tile:active { transform: translateY(-1px) scale(.99); }
.tile-primary .tile-icon { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #1a1300; }
/* The paid rejected-claim service closes the grid as one full-width band, so the last row is never a lone card. */
.tile-assist { grid-column: 1 / -1; min-height: 0; align-items: center; border-left: 4px solid var(--gold); }
.tile-assist .tile-icon { background: linear-gradient(135deg, #1b45a8, var(--navy-deep)); }
.care-hero {
  grid-column: 1 / -1; align-items: center; gap: 18px; padding: 20px 22px; min-height: 0;
  background: linear-gradient(135deg, #e6f0ff 0%, #f5f9ff 55%, var(--surface-solid) 100%); border: 1px solid #b9d3f7; border-left: 5px solid #1f6fe5;
  animation: rise .5s var(--ease) both;
}
.care-hero-art { flex: none; display: grid; place-items: center; width: 96px; height: 104px; border-radius: 22px; background: radial-gradient(circle at 50% 38%, #ffffff 0%, #d8e8ff 100%); box-shadow: inset 0 0 0 1px #c9dcf8; }
.care-hero .tile-title { font-size: 1.3rem; color: var(--navy); }
.care-hero-sub { font-weight: 650; color: #1a5bc4; }
.care-hero .tile-text { margin-top: 2px; }
.care-hero-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; }
.care-hero-foot .tile-badge { margin-top: 0; }
.care-hero-cta { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 16px; border-radius: 999px; background: linear-gradient(180deg, #2b7bef, #1f6fe5); color: #fff; font-weight: 700; box-shadow: 0 4px 12px rgba(31, 111, 229, .28); transition: filter .2s, transform .2s var(--ease); }
.care-hero:hover .care-hero-cta, .care-hero:focus-visible .care-hero-cta { filter: brightness(1.06); transform: translateX(2px); }
/* MINU floats gently and blinks; her antenna light does not pulse here, so nothing on Home keeps flashing. */
.care-hero .minu-light { animation: none; }
:root[data-theme="dark"] .care-hero { background: linear-gradient(135deg, #10244d 0%, var(--surface-solid) 70%); border-color: #2e4785; border-left-color: #6fa8ff; }
:root[data-theme="dark"] .care-hero .tile-title { color: #e6edff; }
:root[data-theme="dark"] .care-hero-sub { color: #9dc0ff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .care-hero { background: linear-gradient(135deg, #10244d 0%, var(--surface-solid) 70%); border-color: #2e4785; border-left-color: #6fa8ff; }
  :root:not([data-theme="light"]) .care-hero .tile-title { color: #e6edff; }
  :root:not([data-theme="light"]) .care-hero-sub { color: #9dc0ff; }
}
@media (max-width: 480px) {
  .care-hero { gap: 12px; padding: 16px 14px; align-items: flex-start; }
  .care-hero-art { width: 70px; height: 78px; border-radius: 18px; }
  .care-hero-art .minu-svg { width: 58px; height: auto; }
  .care-hero .tile-title { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  .care-hero, .care-hero .minu-float, .care-hero .minu-eyes, .care-hero .minu-wave { animation: none !important; }
  .home-tiles .tile:focus-visible, .home-tiles .tile:active, .care-hero:hover .care-hero-cta, .care-hero:focus-visible .care-hero-cta { transform: none; }
}
.setup { margin-top: 18px; }
.progress { width: 100%; height: 10px; border: 0; border-radius: 999px; overflow: hidden; background: var(--surface-2); -webkit-appearance: none; appearance: none; }
.progress::-webkit-progress-bar { background: var(--surface-2); border-radius: 999px; }
.progress::-webkit-progress-value { background: linear-gradient(90deg, var(--navy-2), var(--gold-2)); border-radius: 999px; transition: width .6s var(--ease); }
.progress::-moz-progress-bar { background: linear-gradient(90deg, var(--navy-2), var(--gold-2)); border-radius: 999px; }
.checklist-steps { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.checklist-steps li { display: flex; gap: 12px; align-items: flex-start; }
.checklist-steps li > span:last-child { display: grid; }
.cs-dot { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; flex: none; font-weight: 700; font-size: .85rem; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.checklist-steps li.done .cs-dot { background: var(--ok); color: #fff; border-color: var(--ok); animation: pop .35s var(--ease) both; }
.checklist-steps li.done a { color: var(--muted); }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { display: grid; gap: 2px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--muted); box-shadow: var(--shadow); transition: transform .18s var(--ease); }
.stat:hover { transform: translateY(-2px); }
.stat-n { font-size: 1.9rem; font-weight: 800; color: var(--text); line-height: 1.1; }

/* ---------- help / about / settings / menu ---------- */
.faq { padding: 4px 18px; }
.faq summary { padding: 12px 0; min-height: 44px; }
.glossary { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); margin: 0; }
.glossary dt { font-weight: 700; }
.glossary dd { margin: 4px 0 0; color: var(--muted); }
.about-hero { display: grid; justify-items: center; text-align: center; gap: 8px; }
.founder { display: grid; gap: 18px; align-items: center; }
@media (min-width: 720px) { .founder { grid-template-columns: 220px 1fr; } }
.founder-photo { width: 220px; max-width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 20px; border: 3px solid var(--gold-2); box-shadow: var(--shadow-lift); margin: 0 auto; }
.founder-photo.placeholder { display: grid; place-content: center; text-align: center; gap: 6px; background: linear-gradient(135deg, var(--navy-2), var(--navy)); color: #fff; }
.founder-photo.placeholder span { font-size: 3rem; font-weight: 800; color: var(--gold-2); }
.founder-photo.placeholder small { color: #dfe7ff; }
.menu-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.menu-list a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-height: 56px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); font-weight: 600; box-shadow: var(--shadow); }

/* ---------- inbox, timeline, review, claims (existing pages) ---------- */
.now { font-size: .92rem; margin-top: 4px; }
.timeline { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; position: relative; }
.timeline .step { display: grid; grid-template-columns: 16px 1fr auto; gap: 2px 12px; align-items: center; }
.timeline .step small { grid-column: 2 / 4; color: var(--muted); }
.timeline .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--pending); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pending) 25%, transparent); }
.timeline .done .dot { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); animation: pop .4s var(--ease) both; }
.timeline .running .dot, .timeline .queued .dot { background: var(--gold); animation: pulse 1.6s ease-in-out infinite; }
.timeline .failed .dot { background: var(--err); }
.timeline .state { color: var(--muted); font-size: .85rem; }
.timeline.compact { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .8rem; color: var(--muted); }
.timeline.compact .step { display: inline-flex; gap: 5px; align-items: center; }
.timeline.compact .dot { width: 9px; height: 9px; box-shadow: none; }
.why + .why { margin-top: 8px; }
.missing-item > span { color: var(--warn); }
.lines { display: grid; gap: 6px; }
.line { display: grid; grid-template-columns: minmax(0, 1fr) 4.5em 7.5em; gap: 6px; }
.line.head { font-size: .8rem; color: var(--muted); }
.line input { min-width: 0; }
.original { min-width: 0; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; background: var(--surface-solid); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.table thead th { background: var(--surface-2); font-size: .85rem; color: var(--muted); }
.table .num { text-align: right; white-space: nowrap; }
.table tfoot th { border-bottom: 0; }
.claim-line { display: grid; gap: 8px; }
.claim-line .amounts { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: end; }
.claim-line .amounts label { min-width: 9em; }
.checklist li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.checklist li > span { display: inline-block; width: 1.3em; font-weight: 800; }
.checklist .met > span { color: var(--ok); }
.checklist .missing-item > span { color: var(--warn); }
.history li { padding: 6px 0 6px 18px; border-left: 2px solid var(--line); position: relative; }
.history li::before { content: ""; position: absolute; left: -6px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: var(--navy-2); }

/* step indicators (bill journey, claim journey, start-a-claim wizard) */
.stepper { list-style: none; padding: 0; margin: 4px 0 18px; display: flex; flex-wrap: wrap; gap: 6px 4px; counter-reset: none; }
.stepper li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .88rem; font-weight: 600; position: relative; }
.stepper li + li::before { content: ""; width: 14px; height: 2px; background: var(--line-strong); position: absolute; left: -10px; top: 50%; }
.stepper .st-dot { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: var(--surface-solid); border: 1px solid var(--line-strong); font-size: .78rem; }
.stepper li.done { color: var(--ok); }
.stepper li.done .st-dot { background: var(--ok); color: #fff; border-color: var(--ok); animation: pop .35s var(--ease) both; }
.stepper li.current { background: var(--navy); color: #fff; box-shadow: var(--shadow); }
.stepper li.current .st-dot { background: var(--gold-2); color: #1a1300; border-color: var(--gold-2); animation: pulse 1.8s ease-in-out infinite; }
:root[data-theme="dark"] .stepper li.current { background: var(--gold-2); color: #1a1300; }
:root[data-theme="dark"] .stepper li.current .st-dot { background: var(--navy); color: #fff; border-color: var(--navy); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .stepper li.current { background: var(--gold-2); color: #1a1300; }
  :root:not([data-theme="light"]) .stepper li.current .st-dot { background: var(--navy); color: #fff; border-color: var(--navy); }
}

/* skeleton while something is being read */
.skeleton { display: grid; gap: 10px; }
.skeleton span { display: block; height: 14px; border-radius: 8px; background: linear-gradient(90deg, var(--surface-2) 0%, color-mix(in srgb, var(--surface-2) 40%, var(--surface-solid)) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skeleton span:nth-child(2) { width: 80%; }
.skeleton span:nth-child(3) { width: 60%; }

/* upload progress (only with the optional script) */
.upload-progress { width: 100%; height: 12px; }
.upload-progress[hidden] { display: none; }
form.is-uploading button { opacity: .7; pointer-events: none; }

/* ---------- footer and phone tab bar ---------- */
.foot { max-width: 1040px; margin: 10px auto 0; padding: 22px 16px 28px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.foot-brand { display: flex; gap: 10px; align-items: center; }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; }
.copyright { margin-top: 4px; }
.tabbar { display: none; }

/* ---------- Help Centre, videos, support, paid assistance ---------- */
.flash.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.badge.info { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.button.disabled, .button[aria-disabled="true"] { opacity: .62; cursor: not-allowed; box-shadow: none; filter: grayscale(.4); }
.hub-hero, .assist-hero { padding: 22px; border-radius: var(--radius); background: linear-gradient(135deg, color-mix(in srgb, var(--navy) 9%, var(--surface-solid)), var(--surface-solid)); border: 1px solid var(--line); margin-bottom: 18px; }
.hub-hero h1, .assist-hero h1 { margin: 6px 0 8px; }
ul.tiles { list-style: none; padding: 0; }
.topic-grid { list-style: none; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.topic-grid li { display: grid; gap: 6px; align-content: start; }
.topic-grid .ic { color: var(--gold); }
.how-steps { padding-left: 1.4em; display: grid; gap: 6px; }
.how-steps.big { gap: 10px; font-size: 1.02rem; }
.how-list, .video-list, .reason-list { list-style: none; padding: 0; display: grid; gap: 14px; }
.how-list h2, .video-list h2 { font-size: 1.1rem; margin: 0; }
.video-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.video-head h2 { flex: 1 1 200px; }
.video-no { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; flex: none; }
.reason-list li { display: grid; gap: 4px; }
.social-row, .contact-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 8px 0; }
.assist-band { display: flex; align-items: center; gap: 14px; margin: 4px 0 16px; text-decoration: none; color: var(--text); border-left: 4px solid var(--gold); min-height: 64px; }
.assist-band > span:nth-child(2) { display: grid; gap: 2px; flex: 1; }
.assist-band .ic { color: var(--gold); flex: none; }
.assist-band:hover { transform: translateY(-2px); }
.terms h2 { font-size: 1.05rem; margin-top: 18px; }
.terms p { max-width: 75ch; }
.ticks.warn li::before { content: "!"; color: var(--warn); }
.stepper li.done .cs-dot .ic { display: block; }
@media (prefers-reduced-motion: reduce) { .assist-band:hover { transform: none; } }

/* ---------- Policies, renewals and reminders ---------- */
.policy-grid { list-style: none; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.policy-card { display: grid; gap: 10px; align-content: start; }
.policy-head { display: flex; align-items: flex-start; gap: 12px; }
.policy-head > div { flex: 1; min-width: 0; }
.policy-head h1, .policy-head h2 { margin: 0; font-size: 1.15rem; overflow-wrap: anywhere; }
.policy-head h1 { font-size: 1.6rem; }
.cat-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: color-mix(in srgb, var(--navy) 12%, var(--surface-solid)); color: var(--navy); flex: none; }
:root[data-theme="dark"] .cat-icon { color: var(--gold-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cat-icon { color: var(--gold-2); } }
.due-big { font-size: 1.5rem; font-weight: 800; margin: 0; color: var(--text); }
.due-big.today { color: var(--warn); }
.due-big.overdue { color: var(--err); }
.needs { color: var(--warn); font-weight: 600; }
.muted-card { opacity: .75; }
.reminder { border-left: 5px solid var(--info); display: grid; gap: 8px; margin-bottom: 12px; }
.reminder.today { border-left-color: var(--warn); }
.reminder.overdue { border-left-color: var(--err); }
.reminder h3 { margin: 0; font-size: 1.12rem; display: flex; gap: 8px; align-items: flex-start; }
.wrap-actions { flex-wrap: wrap; gap: 8px; }
.due-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; }
.due-row .actions { flex-wrap: wrap; gap: 8px; }
.due-row select { min-height: 44px; }
.range-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.range-tabs a { padding: 10px 14px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--line-strong); text-decoration: none; color: var(--text); font-weight: 600; }
.range-tabs a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.bell { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; color: var(--muted); text-decoration: none; }
.bell:hover { background: var(--surface-2); }
.bell.has-new { color: var(--text); }
.bell-count { position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--err); color: #fff; font-size: .72rem; font-weight: 800; display: grid; place-items: center; }
.choice.disabled { opacity: .7; cursor: not-allowed; }
.policy-form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 10px; }
.choice.confirm { background: var(--info-bg); border-radius: 10px; padding: 8px 12px; }

/* ---------- Sehat Saathi ---------- */
.emergency { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; margin: 0 0 14px; border-radius: var(--radius); background: var(--err-bg); color: var(--err); border: 2px solid var(--err-line); }
.emergency p { flex: 1 1 240px; margin: 0; }
/* Emergency Help (Sehat Saathi dashboard): 112 first and separate, then the family's own hospital, SOS and doctors. */
.emergency-help { margin: 0 0 16px; padding: 14px; border-radius: var(--radius); background: var(--surface-solid); border: 2px solid var(--err-line); box-shadow: var(--shadow); }
.emergency-help h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--err); font-size: 1.15rem; }
.eh-112 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px; border-radius: var(--radius-sm); background: var(--err-bg); color: var(--err); border: 1px solid var(--err-line); }
.eh-112 > div { flex: 1 1 220px; min-width: 0; }
.eh-112 p { margin: 0; }
.eh-112-title { font-size: 1rem; }
.eh-112-title strong { font-size: 1.25rem; letter-spacing: .02em; }
.sos-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.sos-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.sos-who { display: grid; gap: 1px; min-width: 0; flex: 1 1 180px; overflow-wrap: anywhere; }
.sos-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sos-num { font-variant-numeric: tabular-nums; font-weight: 600; }
.sos-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.sos-empty { padding: 10px 12px; border-radius: var(--radius-sm); border: 1px dashed var(--line-strong); color: var(--muted); }
.eh-address { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 10px; }
.eh-address p { flex: 1 1 100%; margin: 0; overflow-wrap: anywhere; }
.eh-others { margin-top: 10px; }
.eh-others summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.eh-manage { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 0; }
.hospital-card .head h2 { margin: 0; font-size: 1.1rem; }
.hospital-card .sos-list { margin-bottom: 10px; }
.remove-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.sos-form { display: grid; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.sos-form select { max-width: 100%; }
.badge.danger-soft { background: var(--err-bg); color: var(--err); border-color: var(--err-line); }
.button.danger, button.danger { background: var(--err); color: #fff; border-color: var(--err); font-weight: 800; }
.care-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 10px; margin-bottom: 10px; scrollbar-width: thin; }
.care-tabs a { flex: none; padding: 10px 14px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--line-strong); text-decoration: none; color: var(--text); font-weight: 600; }
.care-tabs a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.task-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.task { display: grid; gap: 8px; border-left: 5px solid var(--info); }
.task.due { border-left-color: var(--warn); }
.task.closed { opacity: .85; border-left-color: var(--line-strong); }
.task-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.task-time { font-weight: 800; font-size: 1.1rem; min-width: 5.5em; }
.task .actions button, .task .actions .button { min-height: 44px; }
.task select { min-height: 44px; }
.day-picks { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.chart { margin: 8px 0 16px; }
.chart svg { width: 100%; height: auto; max-height: 240px; background: var(--surface-solid); border: 1px solid var(--line); border-radius: var(--radius); }
.chart-line { fill: none; stroke: var(--navy); stroke-width: 2.5; }
.chart-dot { fill: var(--gold); stroke: var(--navy); stroke-width: 1.5; }
.chart-axis { stroke: var(--line-strong); }
.chart-band { fill: var(--ok-bg); stroke: var(--ok-line); stroke-dasharray: 4 3; }
.chart-label { fill: var(--muted); font-size: 12px; }
:root[data-theme="dark"] .chart-line { stroke: var(--gold-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chart-line { stroke: var(--gold-2); } }
.report-text { white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: .95rem; max-height: 480px; overflow: auto; margin: 0; }
textarea[data-share-text] { width: 100%; font-family: inherit; }

@media (max-width: 860px) {
  .nav, .cta { display: none; }
  .top { padding: 8px 12px; gap: 8px; }
  .top-actions { margin-left: auto; }
  .logo-word { font-size: 1.05rem; }
  .lang-form select { max-width: 8.5rem; }
  .lang-form .btn { padding: 4px 10px; }
  .signed-in main.page { padding-bottom: 96px; }
  .signed-in .foot { padding-bottom: 104px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; min-height: 52px; color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600; border-radius: 12px; }
  .tabbar a.active { color: var(--navy); background: var(--surface-2); }
  :root[data-theme="dark"] .tabbar a.active { color: var(--gold-2); }
  .tabbar .tab-main { color: #1a1300; background: linear-gradient(135deg, var(--gold-2), var(--gold)); margin-top: -14px; border-radius: 16px; box-shadow: var(--shadow-lift); }
}
@media (max-width: 860px) and (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabbar a.active { color: var(--gold-2); } }
@media (max-width: 480px) {
  .row { grid-template-columns: 1fr; }
  .lang-form { padding-left: 8px; }
  .lang-form select { max-width: 6.2rem; }
  .brand .logo-word { display: none; }
  /* Small phones (including 9:16, 360 x 640): the header stays on one line. The language menu keeps working; only its
     globe icon is hidden and the menu is narrower. */
  .top { flex-wrap: nowrap; gap: 6px; }
  .top-actions { flex-wrap: nowrap; gap: 6px; min-width: 0; }
  .lang-form { min-width: 0; padding-left: 6px; }
  .lang-icon { display: none; }
  .lang-form select { max-width: 5.6rem; min-width: 0; text-overflow: ellipsis; }
  /* Signed-out pages have more header buttons (Log in, Sign up, and Dev outbox in development): they may wrap to a
     second row, but labels stay on one line and the language name stays readable. */
  .signed-out .top { flex-wrap: wrap; position: static; } /* two rows here: let it scroll away instead of covering the page */
  .signed-out .top-actions { flex: 1 1 0; min-width: 0; flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; }
  .signed-out .top-actions .btn { white-space: nowrap; }
  .signed-out .lang-form select { min-width: 5.8rem; max-width: 7.5rem; }
  .timeline.compact .label { display: none; }
  .line { grid-template-columns: 1fr 1fr; }
  .line > input:first-child { grid-column: 1 / -1; }
  .line.head { display: none; }
  .line:not(.head) { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .original .preview { max-height: 45vh; width: 100%; object-fit: contain; }
  .thought { padding: 14px; }
  .tile { padding: 14px; }
}

/* ---------- motion: purposeful, fast, and off for people who ask for less ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 50%, transparent); } 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--gold) 0%, transparent); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
main.page { animation: fade .25s var(--ease) both; }
.reveal { animation: rise .45s var(--ease) both; }
.tiles > .reveal:nth-child(2), .stats > .reveal:nth-child(2), .steps-row > .reveal:nth-child(2), .glossary > .reveal:nth-child(2), .menu-list > .reveal:nth-child(2) { animation-delay: .05s; }
.tiles > .reveal:nth-child(3), .stats > .reveal:nth-child(3), .steps-row > .reveal:nth-child(3), .glossary > .reveal:nth-child(3), .menu-list > .reveal:nth-child(3) { animation-delay: .1s; }
.tiles > .reveal:nth-child(4), .stats > .reveal:nth-child(4), .steps-row > .reveal:nth-child(4), .glossary > .reveal:nth-child(4), .menu-list > .reveal:nth-child(4) { animation-delay: .15s; }
.tiles > .reveal:nth-child(5), .glossary > .reveal:nth-child(5), .menu-list > .reveal:nth-child(5) { animation-delay: .2s; }
.tiles > .reveal:nth-child(n+6), .glossary > .reveal:nth-child(n+6), .menu-list > .reveal:nth-child(n+6) { animation-delay: .25s; }
.flash.ok .ic { animation: pop .45s var(--ease) both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
  .tile:hover, .stat:hover, button:hover, .button:hover, .btn:hover, .list > li.card:hover { transform: none; }
}
@media print {
  .top, .tabbar, .foot, .thought, .lang-note { display: none !important; }
  body { background: #fff; }
}

/* ---------- MINU assistant: launcher, welcome card, chat panel (never covers the whole page) ---------- */
.minu-svg { display: block; flex: none; }
.minu-launcher {
  position: fixed; right: 16px; bottom: 18px; z-index: 35; width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center; background: linear-gradient(160deg, #e9f2ff, #ffffff); border: 2px solid var(--gold-2);
  box-shadow: var(--shadow-lift); text-decoration: none; transition: transform .18s var(--ease);
}
.minu-launcher:hover { transform: translateY(-2px); }
.minu-launcher:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.minu-open .minu-launcher { display: none; }
.minu-welcome {
  position: fixed; right: 16px; bottom: 90px; z-index: 36; width: min(380px, calc(100vw - 32px));
  display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 16px 16px 14px; border-radius: var(--radius);
  background: var(--surface-solid); border: 1px solid var(--line); border-top: 4px solid var(--gold-2); box-shadow: var(--shadow-lift);
  animation: rise .35s var(--ease) both;
}
.minu-welcome h2 { margin: 0 28px .3rem 0; font-size: 1.1rem; }
.minu-welcome p { font-size: .92rem; }
.minu-welcome .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.minu-welcome .minu-x { position: absolute; top: 6px; right: 6px; margin: 0; }
.minu-panel {
  position: fixed; right: 16px; bottom: 18px; z-index: 36; width: min(400px, calc(100vw - 32px)); max-height: min(640px, calc(100vh - 110px));
  display: flex; flex-direction: column; border-radius: var(--radius); background: var(--surface-solid); border: 1px solid var(--line);
  box-shadow: var(--shadow-lift); overflow: hidden; animation: rise .25s var(--ease) both;
}
.minu-panel[hidden], .minu-panel [hidden] { display: none !important; }
.minu-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; }
.minu-head h2 { margin: 0; font-size: 1.05rem; color: #fff; }
.minu-head .muted { color: #c9d6f0; margin: 0; line-height: 1.3; }
.minu-head > div { flex: 1; min-width: 0; }
.minu-head .icon-btn { color: #fff; }
.minu-head .icon-btn:hover { background: rgba(255, 255, 255, .15); }
/* The chat body is the only scrolling part of the panel: vertical only. Messages and suggestions never widen it. */
.minu-body { flex: 1 1 auto; min-height: 120px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.minu-log { padding: 12px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-content: start; }
.minu-log.static { padding: 0; margin: 16px 0; overflow: visible; }
.minu-msg { max-width: 92%; padding: 9px 12px; border-radius: 14px; overflow-wrap: anywhere; }
.minu-msg p { margin: .2rem 0; }
.minu-msg.bot { background: var(--surface-2); border-bottom-left-radius: 4px; justify-self: start; }
.minu-msg.you { background: var(--info-bg); color: var(--text); border-bottom-right-radius: 4px; justify-self: end; margin-left: auto; }
.minu-msg.emergency-msg { background: var(--err-bg); border: 1px solid var(--err-line); }
.minu-msg.minu-note { background: var(--warn-bg); border: 1px solid var(--warn-line); }
.minu-msg .button.danger { margin-top: 6px; }
.minu-tag { font-size: .75rem; font-weight: 700; color: var(--ok); display: flex; align-items: center; gap: 4px; }
.minu-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.minu-starters { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.minu-page .minu-starters { padding: 0; margin-top: 12px; }
.minu-starters .btn-sm { font-size: .8rem; }
/* In the panel the suggestions are a compact list: one full-width option per row, text wraps, no sideways scrolling. */
.minu-panel .minu-starters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 0 12px 12px; }
.minu-panel .minu-starters .btn-sm {
  width: 100%; min-width: 0; min-height: 40px; padding: 7px 12px; border-radius: 12px; justify-content: flex-start;
  text-align: left; white-space: normal; overflow-wrap: anywhere; line-height: 1.3;
}
.minu-welcome-body p { margin: .15rem 0; }
.minu-form { display: flex; gap: 6px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line); }
.minu-page .minu-form { padding: 8px 0; border: 0; }
.minu-form input { flex: 1; min-width: 0; }
.minu-form > button { flex: none; }
.minu-mic.is-listening { color: var(--err); background: var(--err-bg); animation: pulse 1.4s infinite; }
.minu-voice { margin: 0 12px 8px; padding: 10px; border-radius: var(--radius-sm); background: var(--info-bg); border: 1px solid var(--info-line); }
.minu-voice .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.minu-tools { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 12px 10px; }
.minu-tools:not(:has(:not([hidden]))) { display: none; }
.minu-intro { display: flex; gap: 16px; align-items: center; }
.minu-intro h1 { margin-top: 0; }
@media (max-width: 860px) {
  .signed-in .minu-launcher { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .signed-in .minu-welcome { bottom: calc(156px + env(safe-area-inset-bottom)); }
  .signed-in .minu-panel { bottom: calc(76px + env(safe-area-inset-bottom)); max-height: calc(100vh - 150px); }
}
@media (max-width: 480px) {
  /* Smaller and nearer the edge, so it does not cover buttons inside cards on small phones. */
  .minu-launcher { right: 8px; width: 48px; height: 48px; }
  .minu-launcher .minu-svg { width: 32px; height: auto; }
  .minu-welcome, .minu-panel { right: 12px; left: 12px; width: auto; }
  .minu-welcome { grid-template-columns: 1fr; }
  .minu-welcome-art { display: none; }
  .minu-intro { flex-direction: column; text-align: center; }
}
/* MINU's character animations: blink, wave, gentle float and the antenna light. */
@keyframes minu-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes minu-wave { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-16deg); } 80% { transform: rotate(10deg); } 90% { transform: rotate(-10deg); } }
@keyframes minu-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes minu-light { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.minu-eyes { transform-box: fill-box; transform-origin: center; animation: minu-blink 5s infinite; }
.minu-wave { transform-box: fill-box; transform-origin: 0% 100%; animation: minu-wave 3.5s 2 .6s; }
.minu-welcome .minu-wave, .minu-intro .minu-wave { animation-iteration-count: 3; }
.minu-float { animation: minu-float 4s ease-in-out infinite; }
.minu-light { animation: minu-light 2.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .minu-eyes, .minu-wave, .minu-float, .minu-light, .minu-mic.is-listening { animation: none !important; }
}
@media print { .minu-launcher, .minu-welcome, .minu-panel { display: none !important; } }

/* ---------- Sehat Saathi health report: a medical-record summary on screen and on A4 paper ---------- */
.report-toolbar { display: grid; gap: 8px; padding: 12px; margin: 0 0 14px; border-radius: var(--radius); background: var(--surface-solid); border: 1px solid var(--line); }
.report-toolbar .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.report-toolbar button[disabled] { opacity: .5; cursor: not-allowed; }
.report-patient-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.report-patient-row .facts { flex: 1 1 220px; margin: 0; }
.med-report { background: #fff; color: #111827; border: 1px solid #d6dbe6; border-radius: 6px; padding: 22px; max-width: 860px; margin: 0 auto; font-size: .95rem; line-height: 1.45; overflow-wrap: break-word; }
.med-report h1, .med-report h2, .med-report h3 { color: #0b2a6f; letter-spacing: 0; }
.mr-head { display: flex; gap: 18px; align-items: flex-start; padding-bottom: 14px; border-bottom: 3px solid #0b2a6f; }
.mr-photo { flex: none; }
.mr-photo img, .mr-nophoto { display: block; width: 120px; height: 150px; object-fit: cover; border: 1px solid #c3cce0; border-radius: 4px; background: #f3f5fa; }
.report-patient .mr-photo img, .report-patient .mr-nophoto { width: 96px; height: 120px; }
.mr-nophoto { display: grid; place-items: center; text-align: center; color: #56607a; font-size: .8rem; padding: 6px; }
.mr-id { flex: 1; min-width: 0; }
.mr-brand { margin: 0; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #7a5600; }
.mr-id h1 { margin: .2rem 0 .5rem; font-size: 1.5rem; }
.mr-facts { display: grid; grid-template-columns: max-content 1fr; gap: 3px 14px; margin: 0; font-size: .9rem; }
.mr-facts dt { font-weight: 700; color: #374151; }
.mr-facts dd { margin: 0; }
.mr-section { margin-top: 16px; }
.mr-section h2 { font-size: 1.1rem; margin: 0 0 6px; padding-bottom: 4px; border-bottom: 1px solid #d6dbe6; }
.mr-section h3 { font-size: 1rem; margin: 12px 0 4px; }
.mr-section .mr-section { margin-top: 8px; }
.mr-note { margin: 2px 0 6px; font-size: .82rem; color: #4b5563; }
.mr-table { width: 100%; border-collapse: collapse; font-size: .86rem; table-layout: auto; }
/* break-word (not anywhere): columns keep room for whole words, so headings never split mid-word. */
.mr-table th, .mr-table td { border: 1px solid #d6dbe6; padding: 5px 7px; text-align: left; vertical-align: top; overflow-wrap: break-word; hyphens: manual; }
.mr-table thead th { background: #eef2fa; color: #0b2a6f; }
.mr-table tbody th { background: #f8fafd; font-weight: 700; width: 24%; }
.mr-table .num { text-align: right; white-space: nowrap; }
.mr-missing { color: #6b7280; font-style: italic; }
.mr-sub { color: #4b5563; font-size: .8rem; }
.mr-flag { display: inline-block; padding: 0 6px; border: 1px solid #f0d28b; border-radius: 999px; background: #fff5dc; color: #8a5a00; font-size: .72rem; }
.mr-foot { margin-top: 20px; padding-top: 10px; border-top: 1px solid #d6dbe6; }
.mr-disclaimer { font-size: .8rem; color: #4b5563; margin: 0 0 10px; }
.mr-motto { margin: 0; padding: 10px 12px; border-left: 4px solid #c9971c; background: #fffaf0; color: #0b2a6f; font-weight: 600; text-align: center; }
@media (max-width: 600px) {
  .med-report { padding: 12px; font-size: .9rem; }
  .mr-head { flex-direction: column; }
  .mr-photo img, .mr-nophoto { width: 96px; height: 120px; }
  .mr-facts { grid-template-columns: 1fr; }
  .mr-facts dt { margin-top: 4px; }
  /* Wide tables become stacked rows on a phone: no sideways scrolling. */
  .mr-table, .mr-table thead, .mr-table tbody, .mr-table tr, .mr-table th, .mr-table td { display: block; width: 100%; }
  .mr-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mr-table tr { border: 1px solid #d6dbe6; border-radius: 6px; margin-bottom: 6px; }
  .mr-table th, .mr-table td { border: 0; border-bottom: 1px solid #eef2fa; }
  .mr-table tbody th { width: 100%; }
  .mr-table .num { text-align: left; }
  .mr-table td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: #4b5563; }
}
@media print {
  @page { size: A4; margin: 14mm 12mm 16mm; @bottom-right { content: counter(page) " / " counter(pages); font-size: 9pt; color: #555; } }
  .report-page .top, .report-page .tabbar, .report-page .foot, .report-page .report-toolbar, .report-page .skip, .report-page .flash,
  .report-page .minu-launcher, .report-page .minu-welcome, .report-page .minu-panel, .report-page .lang-note { display: none !important; }
  .report-page, .report-page main.page { background: #fff !important; color: #000; padding: 0 !important; margin: 0 !important; max-width: none !important; animation: none !important; }
  .report-page .med-report { border: 0; border-radius: 0; padding: 0; max-width: none; font-size: 10pt; box-shadow: none; }
  .report-page .mr-table { font-size: 9pt; }
  .report-page .mr-table, .report-page .mr-table thead, .report-page .mr-table tbody, .report-page .mr-table tr, .report-page .mr-table th, .report-page .mr-table td { display: revert; width: revert; }
  .report-page .mr-table thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; display: table-header-group; }
  .report-page .mr-table tr, .report-page .mr-head, .report-page .mr-foot, .report-page .mr-motto { break-inside: avoid; page-break-inside: avoid; }
  .report-page .mr-section h2, .report-page .mr-section h3, .report-page .mr-note { break-after: avoid; page-break-after: avoid; }
  .report-page .mr-head { flex-direction: row; }
  .report-page .mr-facts { grid-template-columns: max-content 1fr; }
  .report-page * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- ParasMoney Health login: navy, royal blue, white and gold; built from components, not a picture ---------- */
body.login-page {
  --lp-navy: #071a45; --lp-royal: #1f6fe5; --lp-gold: #f2c14e; --lp-ink: #e8eefc;
  background-color: var(--lp-navy);
  background-image: radial-gradient(1100px 560px at 15% -5%, rgba(31, 111, 229, .38), transparent 62%), radial-gradient(900px 520px at 95% 5%, rgba(242, 193, 78, .16), transparent 60%),
    radial-gradient(800px 600px at 50% 110%, rgba(31, 111, 229, .30), transparent 60%), linear-gradient(180deg, #06153a 0%, #0b2a6f 55%, #06153a 100%);
  color: var(--lp-ink);
}
.login-page .top { background: linear-gradient(90deg, rgba(6, 21, 58, .94), rgba(11, 42, 111, .92) 55%, rgba(18, 57, 143, .92)); border-bottom: 1px solid rgba(242, 193, 78, .55); }
.login-page .top .logo-a { color: #fff; }
.login-page .top a:not(.btn):not(.button) { color: #fff; }
/* Reference header buttons: Sign up in gold, Log in in navy with a light edge. */
.login-page .top-actions a.btn-primary[href="/signup"] { background: linear-gradient(180deg, #f6cf6a, #d9a51f); color: #1a1300; border-color: transparent; box-shadow: 0 4px 14px rgba(242, 193, 78, .35); }
.login-page .top-actions a.btn-ghost[href="/login"] { background: #0b2a6f; color: #fff; border: 1px solid rgba(255, 255, 255, .55); }
.login-page main.page { max-width: 1440px; animation: none; }
.login-page .foot { border-top-color: rgba(242, 193, 78, .35); color: #c9d6f0; }
.login-page .foot a { color: #fff; }
.login-page .foot .muted { color: #b8c6e6; }
.login-page .flash { position: relative; z-index: 2; }
.lp { position: relative; isolation: isolate; }
.lp > *:not(.lp-trails) { position: relative; z-index: 1; }

/* icon tones (shared by ticker chips and bubbles) */
.lp-tone-rose { --tone-a: #ff6b8a; --tone-b: #d6335b; }
.lp-tone-blue { --tone-a: #4f8ff7; --tone-b: #1b4fc4; }
.lp-tone-teal { --tone-a: #2fc4a8; --tone-b: #128a76; }
.lp-tone-gold { --tone-a: #f7cf5c; --tone-b: #cf9612; }
.lp-tone-sky { --tone-a: #5fc8ff; --tone-b: #1c86d1; }
.lp-tone-violet { --tone-a: #9d8cff; --tone-b: #5b45d6; }

/* moving service ticker (pauses on hover; keyboard focus returns it to the start so each link is fully visible) */
.lp-ticker { overflow: hidden; border: 1px solid rgba(242, 193, 78, .5); border-radius: 999px; padding: 5px;
  background: linear-gradient(90deg, rgba(7, 26, 69, .95), rgba(31, 111, 229, .55) 50%, rgba(7, 26, 69, .95)); box-shadow: 0 0 18px rgba(31, 111, 229, .45), inset 0 0 12px rgba(111, 168, 255, .25);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.lp-ticker-track { display: flex; gap: 6px; width: max-content; animation: lp-marquee 70s linear infinite; }
.lp-ticker-dup { display: flex; gap: 6px; }
.lp-ticker:hover .lp-ticker-track { animation-play-state: paused; }
.lp-ticker:focus-within .lp-ticker-track { animation: none; }
.lp-ticker:focus-within { -webkit-mask-image: none; mask-image: none; }
.lp-tick { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 14px 4px 5px; border-radius: 999px; color: #fff; text-decoration: none; white-space: nowrap; font-weight: 600; font-size: .9rem;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); }
.lp-tick-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; background: linear-gradient(145deg, var(--tone-a), var(--tone-b)); box-shadow: 0 0 10px color-mix(in srgb, var(--tone-a) 60%, transparent); }
.lp-tick:hover, .lp-tick:focus-visible { background: rgba(255, 255, 255, .18); }
.lp-tick:focus-visible { outline: 3px solid var(--lp-gold); outline-offset: -3px; }
@keyframes lp-marquee { to { transform: translateX(calc(-50% - 3px)); } }

/* stage: MINU on the left, two arcs of round bubbles around the card (as in the reference) */
.lp-stage { display: grid; gap: 18px; align-items: center; margin-top: 12px;
  grid-template-columns: minmax(200px, 250px) 190px minmax(380px, 470px) 190px; grid-template-areas: "minu left center right"; justify-content: center; }
.lp-minu { grid-area: minu; } .lp-orbit-left { grid-area: left; } .lp-center { grid-area: center; } .lp-orbit-right { grid-area: right; }
.lp-minu { display: grid; justify-items: center; gap: 8px; text-align: center; align-self: start; padding-top: 40px; }
.lp-minu-bubble { position: relative; padding: 14px 16px; border-radius: 22px; background: rgba(9, 32, 86, .9); border: 2px solid #6fa8ff; color: #fff;
  box-shadow: 0 0 22px rgba(111, 168, 255, .55); font-size: .95rem; line-height: 1.45; text-align: left; }
.lp-minu-bubble p { margin: 0; }
.lp-minu-bubble::after { content: ""; position: absolute; left: 50%; bottom: -12px; width: 20px; height: 20px; transform: translateX(-50%) rotate(45deg); background: rgba(9, 32, 86, .95); border-right: 2px solid #6fa8ff; border-bottom: 2px solid #6fa8ff; }
.lp-minu-bot { margin-top: 8px; filter: drop-shadow(0 0 22px rgba(111, 168, 255, .6)); }
.lp-minu-note { margin: 0; font-size: .78rem; color: #b8c6e6; }
.lp-orbit { display: grid; gap: 8px; align-content: center; justify-items: center; }
/* The arc: middle bubbles sit further from the card than the top and bottom ones. */
.lp-orbit-left .lp-bubble:nth-child(1), .lp-orbit-left .lp-bubble:nth-child(5) { translate: 26px 0; }
.lp-orbit-left .lp-bubble:nth-child(2), .lp-orbit-left .lp-bubble:nth-child(4) { translate: -6px 0; }
.lp-orbit-left .lp-bubble:nth-child(3) { translate: -22px 0; }
.lp-orbit-right .lp-bubble:nth-child(1), .lp-orbit-right .lp-bubble:nth-child(5) { translate: -26px 0; }
.lp-orbit-right .lp-bubble:nth-child(2), .lp-orbit-right .lp-bubble:nth-child(4) { translate: 6px 0; }
.lp-orbit-right .lp-bubble:nth-child(3) { translate: 22px 0; }
.lp-bubble { display: grid; place-content: center; justify-items: center; gap: 3px; width: 142px; aspect-ratio: 1; padding: 12px; border-radius: 50%; text-align: center; text-decoration: none; color: #0b2a6f;
  background: radial-gradient(circle at 32% 22%, #ffffff 0%, #eef4ff 60%, #d3e3ff 100%); border: 2px solid rgba(242, 193, 78, .8);
  box-shadow: 0 0 0 5px rgba(31, 111, 229, .2), 0 12px 28px rgba(3, 12, 40, .5), 0 0 28px rgba(111, 168, 255, .45);
  animation: lp-float 7s ease-in-out infinite; transition: box-shadow .2s; }
.lp-b1 { animation-delay: -1.2s; } .lp-b2 { animation-delay: -2.4s; } .lp-b3 { animation-delay: -3.6s; } .lp-b4 { animation-delay: -4.8s; } .lp-b5 { animation-delay: -6s; }
.lp-bubble:hover, .lp-bubble:focus-visible { box-shadow: 0 0 0 5px rgba(242, 193, 78, .55), 0 14px 32px rgba(3, 12, 40, .55), 0 0 36px rgba(242, 193, 78, .5); }
.lp-bubble:focus-visible { outline: 3px solid var(--lp-gold); outline-offset: 3px; }
.lp-bubble-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; color: #fff; background: linear-gradient(145deg, var(--tone-a), var(--tone-b));
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 0 14px color-mix(in srgb, var(--tone-a) 70%, transparent); }
.lp-bubble-title { font-weight: 800; font-size: .9rem; line-height: 1.15; max-width: 116px; }
/* Text stays inside the circle: it wraps rather than touching the edge. */
.lp-bubble-sub { font-size: .72rem; line-height: 1.2; color: #3b4a6b; max-width: 104px; }
@keyframes lp-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* center: one glass card with a glowing border; the official banner (whole, undistorted) is its header */
.lp-center { display: grid; }
.lp-card { padding: 14px 14px 6px; border-radius: 26px; background: rgba(255, 255, 255, .95); border: 1px solid rgba(255, 255, 255, .85); color: var(--text);
  box-shadow: 0 0 0 2px rgba(111, 168, 255, .65), 0 0 34px rgba(31, 111, 229, .55), 0 0 64px rgba(242, 193, 78, .22); animation: lp-glow 5s ease-in-out infinite alternate; }
.lp-banner { border-radius: 16px; overflow: hidden; background: #fff; }
.lp-banner img { display: block; width: 100%; height: auto; }
.lp-card .auth { margin: 0; max-width: none; padding: 8px 12px 10px; background: transparent; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.lp-banner + .auth .auth-brand { display: none; }
.lp-card .auth h1 { margin: .4rem 0 .1rem; font-size: 1.7rem; color: #0b2a6f; }
.lp-card .auth > p.muted { margin-top: 0; }
.lp-wordmark { text-align: center; color: #0b2a6f; }
.lp-wm-main { margin: 0; font-size: 2rem; font-weight: 900; letter-spacing: .06em; }
.lp-wm-health { display: inline-block; margin: 4px 0; padding: 2px 18px; border-radius: 999px; background: #0b2a6f; color: #fff; border: 2px solid var(--lp-gold); font-weight: 800; letter-spacing: .3em; }
.lp-wm-sub { margin: 0; font-weight: 700; letter-spacing: .18em; }
@keyframes lp-glow { from { box-shadow: 0 0 0 2px rgba(111, 168, 255, .55), 0 0 26px rgba(31, 111, 229, .45), 0 0 50px rgba(242, 193, 78, .16); }
  to { box-shadow: 0 0 0 2px rgba(242, 193, 78, .7), 0 0 38px rgba(31, 111, 229, .6), 0 0 70px rgba(242, 193, 78, .3); } }
:root[data-theme="dark"] .lp-card { background: rgba(17, 27, 55, .95); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lp-card { background: rgba(17, 27, 55, .95); } }
/* the form: icons inside the fields, show-password button, "Forgot" on the right */
.lp-form .lp-input { position: relative; display: block; margin-top: 4px; }
.lp-form .lp-input > .ic { position: absolute; left: 12px; top: 50%; translate: 0 -50%; color: #56607a; pointer-events: none; }
/* Same input types as the site-wide field rule, so this one is more specific and the text clears the icon. */
.lp-form .lp-input input:not([type=hidden]):not([type=file]):not([type=checkbox]):not([type=radio]) { padding-left: 42px; }
.lp-form .lp-input input#login-password:not([type=hidden]):not([type=file]):not([type=checkbox]):not([type=radio]) { padding-right: 50px; }
.lp-eye { position: absolute; right: 4px; top: 50%; translate: 0 -50%; width: 40px; min-height: 40px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #56607a; box-shadow: none; }
.lp-eye:hover { background: var(--surface-2); transform: none; }
.lp-eye[aria-pressed="true"] { color: #1f6fe5; }
.lp-forgot { margin: -4px 0 0; text-align: right; font-size: .9rem; }

/* light trails behind everything (decorative) */
.lp-trails { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.lp-trails span { position: absolute; left: 0; width: 55%; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, rgba(242, 193, 78, .85), transparent);
  filter: drop-shadow(0 0 6px rgba(242, 193, 78, .7)); animation: lp-trail 11s linear infinite; translate: -100% 0; }
.lp-trails span:nth-child(1) { top: 34%; }
.lp-trails span:nth-child(2) { top: 62%; animation-delay: -4s; background: linear-gradient(90deg, transparent, rgba(111, 168, 255, .9), transparent); filter: drop-shadow(0 0 6px rgba(111, 168, 255, .8)); }
.lp-trails span:nth-child(3) { top: 88%; animation-delay: -7.5s; }
@keyframes lp-trail { from { translate: -100% 0; } to { translate: 220% 0; } }

/* footer strip */
.lp-foot { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 18px 0 0; padding: 16px; border-radius: 22px;
  background: rgba(6, 21, 58, .72); border: 1px solid rgba(242, 193, 78, .35); }
.lp-foot a { display: flex; gap: 10px; align-items: center; color: #fff; text-decoration: none; min-height: 44px; border-radius: 14px; padding: 4px; }
.lp-foot a:focus-visible { outline: 3px solid var(--lp-gold); outline-offset: 2px; }
.lp-foot-icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--lp-gold); color: var(--lp-gold); background: rgba(31, 111, 229, .25); }
.lp-foot strong { display: block; font-size: .95rem; }
.lp-foot a span span { display: block; font-size: .78rem; color: #c9d6f0; line-height: 1.3; }

/* small laptop: MINU moves under the card row; bubbles stay round */
/* login header: the official P emblem, shown as a crop of the official banner at one uniform scale (nothing redrawn
   or stretched; 450 x 238 px of the 1200 x 675 banner at 0.2), with the tagline. The redundant "Log in" button is hidden. */
.brand-tag { display: none; }
.login-page .top .brand-text { display: grid; line-height: 1.15; }
.login-page .top .brand-tag { display: block; font-size: .74rem; font-weight: 500; color: #c9d6f2; letter-spacing: .01em; }
.login-page .top .logo-word { font-size: 1.45rem; }
.login-page.has-banner .top .brand .logo-mark { display: none; }
.login-page.has-banner .top .brand::before { content: ""; flex: none; width: 90px; height: 47px; border-radius: 12px;
  background: #fff url(/brand/about-banner.jpg) no-repeat; background-size: 240px auto; background-position: -98.4px -13.2px;
  box-shadow: 0 0 0 1px rgba(242, 193, 78, .7), 0 0 18px rgba(111, 168, 255, .45); }
.login-page .top-actions a[href="/login"] { display: none; }

/* light: dotted orbit arcs around the card and a glowing horizon wave near the footer */
.lp::before { content: ""; position: absolute; left: 0; right: 0; bottom: 70px; height: 240px; pointer-events: none; z-index: 0;
  background: radial-gradient(55% 60% at 50% 100%, rgba(242, 193, 78, .22), transparent 70%), radial-gradient(35% 70% at 15% 90%, rgba(111, 168, 255, .25), transparent 70%), radial-gradient(35% 70% at 85% 90%, rgba(111, 168, 255, .22), transparent 70%); }
.lp::after { content: ""; position: absolute; left: 0; right: 0; bottom: 96px; height: 200px; border-radius: 50% 50% 0 0 / 100% 100% 0 0; pointer-events: none; z-index: 0;
  border-top: 2px solid rgba(242, 193, 78, .55); box-shadow: 0 -8px 26px -10px rgba(242, 193, 78, .7), inset 0 10px 30px -18px rgba(111, 168, 255, .8); }
.lp-center { position: relative; }
.lp-center::before, .lp-center::after { content: ""; position: absolute; left: 50%; top: 50%; translate: -50% -50%; border-radius: 50%; pointer-events: none; z-index: -1; }
.lp-center::before { width: 760px; height: 770px; border: 2px dashed rgba(242, 193, 78, .38); }
.lp-center::after { width: 690px; height: 700px; border: 1px dotted rgba(111, 168, 255, .55); box-shadow: 0 0 40px rgba(31, 111, 229, .25), inset 0 0 60px rgba(31, 111, 229, .18); }

@media (max-width: 1240px) {
  .lp-center::before, .lp-center::after { display: none; }
  .lp-stage { grid-template-columns: 170px minmax(340px, 460px) 170px; grid-template-areas: "left center right" "minu minu minu"; }
  .lp-bubble { width: 138px; }
  .lp-minu { grid-template-columns: auto minmax(0, 440px); align-items: center; justify-content: center; text-align: left; padding-top: 0; }
  .lp-minu-bubble { grid-column: 2; grid-row: 1; }
  .lp-minu-bubble::after { left: -12px; bottom: auto; top: 50%; transform: translateY(-50%) rotate(135deg); }
  .lp-minu-bot { grid-column: 1; grid-row: 1 / span 2; margin: 0; }
  .lp-minu-bot svg { width: 130px; height: auto; }
  .lp-minu-note { grid-column: 2; }
  .lp-foot { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* tablets and phones: card first, then MINU, then the bubbles as a grid of rounded tiles below */
@media (max-width: 860px) {
  .lp::before, .lp::after { display: none; }
  .login-page .top .brand-tag { display: none; }
  .login-page.has-banner .top .brand::before { width: 72px; height: 38px; background-size: 192px auto; background-position: -78.7px -10.6px; }
  .lp-stage { grid-template-columns: minmax(0, 1fr); grid-template-areas: "center" "minu" "left" "right"; gap: 16px; margin-top: 14px; }
  /* MINU is already on this page (and a bubble link): the small floating button would cover the card's links here. */
  .login-page .minu-launcher { display: none; }
  .lp-center { max-width: 520px; width: 100%; margin: 0 auto; }
  .lp-orbit { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; justify-items: stretch; }
  .lp-orbit .lp-bubble { translate: none !important; width: auto; aspect-ratio: auto; min-height: 132px; border-radius: 26px; padding: 14px 10px; animation: none; }
  .lp-bubble-title, .lp-bubble-sub { max-width: none; }
  .lp-orbit-left .lp-bubble:last-child:nth-child(odd), .lp-orbit-right .lp-bubble:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .lp-minu { grid-template-columns: auto minmax(0, 1fr); }
  .lp-minu-bot svg { width: 92px; }
  .lp-foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .lp-tick { font-size: .82rem; min-height: 36px; }
  .lp-tick-icon { width: 26px; height: 26px; }
  .lp-card { padding: 10px 8px 4px; border-radius: 22px; }
  .lp-card .auth { padding: 6px 6px 8px; }
  .lp-card .auth h1 { font-size: 1.45rem; }
  .lp-minu-bubble { font-size: .88rem; padding: 12px; }
  .lp-minu-bot svg { width: 68px; }
  .lp-bubble-icon { width: 40px; height: 40px; }
  .lp-foot { grid-template-columns: minmax(0, 1fr); }
}
/* less motion: the ticker becomes a scrollable row, nothing floats, glows or travels */
@media (prefers-reduced-motion: reduce) {
  .lp-ticker-track, .lp-bubble, .lp-card, .lp-trails span { animation: none !important; }
  .lp-ticker { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .lp-ticker-dup, .lp-trails { display: none; }
}

/* ---------- installable app: install button, install help, offline page ---------- */
.foot-install { margin: 4px 0 0; }
.install-help ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 6px; }
.offline-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.offline-page .page { width: 100%; max-width: 520px; padding: 0; }
.offline-card { display: grid; gap: 10px; text-align: center; justify-items: center; }
.offline-card h1 { margin: 4px 0 0; }
.offline-brand { display: grid; justify-items: center; gap: 4px; }
.offline-brand .logo-word { margin: 0; }
.offline-sos { margin: 4px 0 0; font-weight: 700; }
.offline-sos a { font-size: 1.2rem; }

/* ---------- welcome page (signed out): the login page's futuristic frame with a welcome card ---------- */
.login-page.landing-page .top-actions a[href="/login"] { display: inline-flex; }
.lp-welcome { text-align: center; }
.lp-card .lp-welcome h1 { font-size: 1.85rem; line-height: 1.15; margin-top: .6rem; }
.lp-welcome .tagline { margin: .2rem 0 .7rem; color: #9a6b00; font-weight: 700; font-size: .92rem; }
.lp-welcome .hero-mark { display: grid; justify-items: center; gap: 4px; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 6px 0 8px; }
.lp-cta .btn { flex: 1 1 170px; justify-content: center; }
.lp-extra { max-width: 1180px; margin: 30px auto 0; display: grid; gap: 22px; }
.lp-extra-h { margin: 0 0 14px; text-align: center; color: #fff; font-size: 1.5rem; text-shadow: 0 0 18px rgba(111, 168, 255, .6); }
.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.lp-step { position: relative; display: grid; align-content: start; justify-items: start; gap: 6px; padding: 18px 16px 16px; border-radius: 22px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .97), rgba(229, 238, 255, .93)); border: 1px solid rgba(242, 193, 78, .6);
  box-shadow: 0 0 22px rgba(31, 111, 229, .35), inset 0 0 14px rgba(111, 168, 255, .18); color: #43506b; }
.lp-step strong { color: #0b2a6f; font-size: 1.05rem; }
.lp-step-no { position: absolute; top: 10px; right: 14px; font-size: 1.6rem; font-weight: 800; color: rgba(11, 42, 111, .28); }
.lp-step-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #fff;
  background: linear-gradient(145deg, #4f8ff7, #1b4fc4); box-shadow: 0 0 14px rgba(79, 143, 247, .6); }
.lp-promise { padding: 18px 22px; border-radius: 22px; background: rgba(9, 32, 86, .88); border: 1px solid rgba(242, 193, 78, .55);
  box-shadow: 0 0 22px rgba(31, 111, 229, .3); color: #e3ebff; }
.lp-promise h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: #f2c14e; font-size: 1.2rem; }
.lp-promise ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lp-promise li { display: flex; gap: 10px; align-items: baseline; }
.lp-promise li::before { content: "✓"; color: #f2c14e; font-weight: 800; }
:root[data-theme="dark"] .lp-step { background: rgba(17, 27, 55, .95); color: #c3cde6; }
:root[data-theme="dark"] .lp-step strong { color: #fff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lp-step { background: rgba(17, 27, 55, .95); color: #c3cde6; }
  :root:not([data-theme="light"]) .lp-step strong { color: #fff; }
}
@media (max-width: 860px) {
  .lp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .lp-extra { margin-top: 22px; gap: 18px; }
}
@media (max-width: 480px) {
  .lp-card .lp-welcome h1 { font-size: 1.5rem; }
  .lp-steps { grid-template-columns: minmax(0, 1fr); }
  .lp-cta .btn { flex-basis: 100%; }
}
.lp-cta .btn { white-space: nowrap; font-size: 1rem; padding-inline: 14px; }
