/* ============================================================
   Aarohi · in partnership with AIF MANSI
   PRD palette  ·  saffron / pearl / teal
   Visual feel matches aif.org
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;600;700&family=Noto+Sans+Devanagari:wght@400;500;600;700&family=Noto+Sans+Tamil:wght@400;500;600;700&display=swap');

:root {
    /* Brand palette (PRD) */
    --saffron:   #E89A4F;
    --saffron-d: #C77A2E;
    --pearl:     #FDF9F3;
    --teal:      #1B8A7A;
    --teal-d:    #146A5C;

    /* Backwards-compatible aliases (existing pages reference these) */
    --primary:   #C77A2E;          /* deeper saffron — readable on pearl */
    --primary-d: #8E0038;
    --accent:    #1B8A7A;          /* teal accent */
    --bg:        #FDF9F3;          /* pearl */
    --card:      #ffffff;
    --text:      #2b2b2b;
    --muted:     #6b6b6b;
    --border:    #efe1cb;
    --error:     #c62828;
    --success:   #1B8A7A;          /* teal counts as success */
    --shadow:    0 8px 24px rgba(232, 154, 79, 0.18);
}

/* Per-language font binding — body[lang=hi]/[lang=ta] reroute to Noto. */
body            { font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body[lang="hi"] { font-family: 'Noto Sans Devanagari', 'Noto Sans', sans-serif; }
body[lang="ta"] { font-family: 'Noto Sans Tamil',     'Noto Sans', sans-serif; }

/* AIF MANSI co-brand bar — auto-injected at the top of every page by branding.js */
.aif-cobrand {
    background: linear-gradient(90deg, var(--saffron) 0%, var(--saffron-d) 60%, var(--teal) 100%);
    color: #fff;
    text-align: center;
    font-size: 13px;
    padding: 7px 14px;
    letter-spacing: 0.2px;
    font-weight: 500;
}
.aif-cobrand a { color: #fff; text-decoration: underline; }

/* Footer line — auto-injected by branding.js */
.aif-footer {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    padding: 16px 14px 24px;
    line-height: 1.5;
    border-top: 1px solid var(--border);
    margin-top: 32px;
    background: rgba(232, 154, 79, 0.04);
}
.aif-footer strong { color: var(--saffron-d); }

/* Language pill — top-right of header */
.lang-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(4px);
    border: 1.5px solid var(--border);
    border-radius: 999px;
    padding: 4px;
    font-size: 13px;
}
.lang-pill button {
    background: transparent;
    border: 0;
    padding: 5px 10px;
    border-radius: 999px;
    cursor: pointer;
    color: var(--muted);
    font-weight: 600;
    transition: background 0.12s, color 0.12s;
}
.lang-pill button.active {
    background: var(--saffron);
    color: #fff;
}
.lang-pill button:not(.active):hover { color: var(--saffron-d); }
.lang-pill button[data-lang="hi"] { font-family: 'Noto Sans Devanagari', sans-serif; }
.lang-pill button[data-lang="ta"] { font-family: 'Noto Sans Tamil',     sans-serif; }

/* Risk dots — used on ASHA caseload */
.risk-dot {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.04);
}
.risk-dot.green { background: #2e7d32; }
.risk-dot.amber { background: #f9a825; }
.risk-dot.red   { background: #c62828; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg) 0%, #fde7ef 100%);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 460px;
    margin: 0 auto;
    padding: 48px 20px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 32px 28px;
    box-shadow: var(--shadow);
}

.brand {
    text-align: center;
    margin-bottom: 28px;
}
.brand h1 {
    color: var(--primary);
    font-size: 32px;
    margin: 0 0 6px 0;
    letter-spacing: 0.5px;
}
.brand p {
    color: var(--muted);
    margin: 0;
    font-size: 14px;
}
.brand-mansi {
    margin-top: 10px !important;
    font-size: 13px !important;
    color: var(--muted);
    letter-spacing: 0.2px;
}
.brand-aif-logo {
    display: block;
    margin: 10px auto 0;
    height: 36px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #444;
}

.input {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.15s;
    background: #fff;
}
.input:focus { border-color: var(--primary); }

.input.otp {
    text-align: center;
    letter-spacing: 8px;
    font-size: 22px;
    font-weight: 600;
}

.btn {
    width: 100%;
    padding: 13px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: var(--primary);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, transform 0.05s;
    margin-top: 16px;
}
.btn:hover  { background: var(--primary-d); }
.btn:active { transform: translateY(1px); }
.btn:disabled {
    background: #d8a8b8;
    cursor: not-allowed;
}

.btn.secondary {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}
.btn.secondary:hover { background: #fff0f5; }

.msg          { margin-top: 14px; font-size: 14px; min-height: 18px; text-align: center; }
.msg.error    { color: var(--error); }
.msg.success  { color: var(--success); }
.msg.info     { color: var(--muted); }

.hidden { display: none; }

.foot-note {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    margin-top: 18px;
}
.foot-note p { margin: 0; }
.foot-note p + p { margin-top: 4px; }
.foot-meta {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    color: var(--muted);
}
.foot-meta a {
    color: var(--saffron-d);
    text-decoration: none;
}
.foot-meta a:hover { text-decoration: underline; }
.foot-sep { color: #c9bfae; }

/* Dev-mode OTP banner shown only when API returns devOtp */
.dev-otp {
    background: linear-gradient(135deg, #fff4d6 0%, #ffe9b0 100%);
    border: 1.5px dashed #d39800;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 18px;
    text-align: center;
}
.dev-otp-label {
    font-size: 11px;
    color: #8a6d00;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}
.dev-otp-code {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 6px;
    color: #5b4500;
    margin: 4px 0 4px;
}
.dev-otp-hint {
    font-size: 11px;
    color: #8a6d00;
}

/* ---------- Dashboard ------------------------------------------------ */
.dash-header {
    background: var(--primary);
    color: #fff;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}
.dash-header h1 { margin: 0; font-size: 22px; }
.dash-header button {
    background: transparent;
    color: #fff;
    border: 1.5px solid #fff;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}
.dash-header button:hover { background: rgba(255,255,255,0.15); }

.dash-main {
    max-width: 1024px;
    margin: 0 auto;
    padding: 28px 20px;
}
.welcome {
    background: var(--card);
    border-radius: 14px;
    padding: 22px;
    box-shadow: var(--shadow);
    margin-bottom: 22px;
}
.welcome h2  { margin: 0 0 4px 0; color: var(--primary); }
.welcome p   { margin: 0; color: var(--muted); }

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.module-card {
    background: var(--card);
    padding: 22px;
    border-radius: 14px;
    border: 1px solid var(--border);
    transition: transform 0.12s, box-shadow 0.12s;
    cursor: pointer;
}
.module-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.module-card h3 { margin: 0 0 8px 0; font-size: 17px; color: var(--text); }
.module-card p  { margin: 6px 0 12px; font-size: 13px; color: var(--muted); line-height: 1.4; }
.module-card a  { text-decoration: none; color: inherit; display: block; }
.module-card .status {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: #e6f4ea;
    color: #2e7d32;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.module-card .status.coming-soon { background: #fff0f3; color: var(--primary); }
.module-card .status.missing     { background: #fdecea; color: var(--error); }

/* ---------- Feature pages (used by epds.html, anc.html, etc.) -------- */
.feature-shell {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 18px;
}
.feature-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.feature-header h2 { margin: 0; color: var(--primary); font-size: 22px; }
.feature-header a  { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.feature-header a:hover { color: var(--primary); }

.panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 22px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}
.panel h3 { margin: 0 0 12px; color: var(--text); font-size: 16px; }

.row { display: flex; gap: 12px; }
.row > * { flex: 1; }

.list-row {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
    background: #fff;
    font-size: 14px;
}
.list-row .meta { font-size: 12px; color: var(--muted); margin-top: 4px; }

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tag.normal { background: #e6f4ea; color: #2e7d32; }
.tag.mam    { background: #fff4d6; color: #8a6d00; }
.tag.sam    { background: #fdecea; color: var(--error); }
.tag.high   { background: #fdecea; color: var(--error); }
.tag.mild   { background: #fff4d6; color: #8a6d00; }
.tag.minimal{ background: #e6f4ea; color: #2e7d32; }
.tag.moderate{ background: #fff4d6; color: #8a6d00; }
.tag.severe { background: #fdecea; color: var(--error); }

.epds-q { padding: 14px 0; border-top: 1px solid var(--border); }
.epds-q:first-child { border-top: 0; }
.epds-q label { font-weight: 500; color: var(--text); }
.epds-q .options { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.epds-q .options label {
    flex: 1; min-width: 120px;
    padding: 8px 10px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    text-align: center;
    background: #fff;
}
.epds-q .options input { display: none; }
.epds-q .options input:checked + span {
    display: block;
    margin: -8px -10px;
    padding: 8px 10px;
    background: var(--primary);
    color: #fff;
    border-radius: 6px;
}

.crisis-card {
    background: linear-gradient(135deg, #fdecea 0%, #fbd8d4 100%);
    border: 1.5px solid var(--error);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 16px;
}
.crisis-card h3 { color: var(--error); margin: 0 0 10px; }
.crisis-card a {
    display: inline-block;
    margin-top: 8px;
    padding: 10px 14px;
    background: var(--error);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    margin-right: 6px;
}

/* ---------- Voice-primary UX ----------------------------------------- */
.voice-cta {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 22px; border-radius: 999px; border: 0;
    background: var(--primary); color: #fff;
    font-weight: 600; font-size: 16px; cursor: pointer;
    box-shadow: 0 4px 16px rgba(194, 24, 91, 0.18);
}
.voice-cta:hover  { background: var(--primary-d); }
.voice-cta[disabled] { opacity: 0.7; cursor: progress; }
.voice-cta.listening { background: var(--error); animation: voicePulse 1.2s infinite; }
@keyframes voicePulse {
    0%, 100% { transform: scale(1);   box-shadow: 0 0 0 0   rgba(192, 57, 43, 0.55); }
    50%      { transform: scale(1.04); box-shadow: 0 0 0 16px rgba(192, 57, 43, 0);   }
}

/* ----------------------------------------------------------------------
   Voice-only modules — hide every text/edit-box form fallback and the
   "Type instead" toggle. The form fields still exist in the DOM (the
   voice flow needs them as value buckets before auto-submit), but the
   user only ever sees the conversation: TTS prompt → checkbox → speak →
   uncheck → next prompt. This is the workflow requested for all module
   pages (anc, epds, growth, immunisation, ifa, nutrition, danger,
   weekly, asha-*, aww-*).
   ---------------------------------------------------------------------- */
.text-fallback,
.text-fallback.show,
.text-toggle {
    display: none !important;
}

/* ============== Voice — Device Picker (combo box) ====================== */
/* Shown only when more than one mic OR speaker is detected. */
.vx-devices {
    background: #fff7e6;
    border: 1px dashed #d39800;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.vx-dev-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.vx-dev-row:last-of-type { margin-bottom: 0; }
.vx-dev-row label {
    flex: 0 0 130px;
    font-size: 13px;
    font-weight: 600;
    color: #5b4500;
    margin-bottom: 0;
}
.vx-dev-row select {
    flex: 1;
    padding: 8px 10px;
    font-size: 14px;
}
.vx-dev-hint {
    font-size: 11px;
    color: #8a6d00;
    margin-top: 6px;
}

/* ============== Voice — Push-to-hold checkbox ========================== */
.vx-cb-wrap {
    background: #f7faff;
    border: 1.5px solid #c9d8f0;
    border-radius: 14px;
    padding: 18px 18px;
    margin-top: 10px;
    transition: background 0.2s, border-color 0.2s;
}
.vx-cb-wrap:has(.vx-cb-input:checked) {
    background: #fdecea;
    border-color: #c62828;
    box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.14);
}
.vx-cb {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    user-select: none;
}
.vx-cb-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.vx-cb-fake {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    border: 2px solid #c9d8f0;
    background: #fff;
    position: relative;
    transition: background 0.15s, border-color 0.15s;
}
.vx-cb-input:checked + .vx-cb-fake {
    background: #c62828;
    border-color: #c62828;
}
.vx-cb-input:checked + .vx-cb-fake::after {
    content: '';
    position: absolute;
    left: 7px; top: 3px;
    width: 8px; height: 14px;
    border: solid #fff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}
.vx-cb-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}
.vx-cb-hint {
    margin-top: 6px;
    margin-left: 40px;
    font-size: 12px;
    color: var(--muted);
}

/* Tap-anywhere hint shown when Chrome blocks autoplay. */
.vx-tap-hint {
    position: fixed;
    inset: 0;
    background: rgba(40, 0, 20, 0.55);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: pointer;
    animation: vx-tap-fade 0.18s ease-out;
}
@keyframes vx-tap-fade { from { opacity: 0; } to { opacity: 1; } }
.vx-tap-hint-card {
    background: #fff;
    border-radius: 18px;
    padding: 28px 32px;
    text-align: center;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
    max-width: 320px;
}
.vx-tap-hint-icon { font-size: 44px; margin-bottom: 8px; animation: vx-bounce 1.2s infinite; }
@keyframes vx-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}
.vx-tap-hint-text { font-size: 18px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.vx-tap-hint-sub  { font-size: 12px; color: var(--muted); }

/* Running transcript log shown inside conversation pages. */
.vx-transcript-log {
    margin-top: 14px;
    max-height: 260px;
    overflow-y: auto;
    background: #fafafa;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.5;
}
.vx-line {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #eee;
}
.vx-line:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }

/* ============================================================
   Tips / Solutions card — shown after a module's Q&A flow
   completes. Rendered by AarohiVoice.tips() / showTips().
   ============================================================ */
.aarohi-tips-card {
    background: linear-gradient(135deg, #ffffff 0%, #fff8ef 100%);
    border: 1.5px solid var(--saffron);
    border-left: 6px solid var(--saffron);
    border-radius: 14px;
    padding: 18px 20px;
    margin-top: 16px;
    box-shadow: 0 6px 18px rgba(232, 154, 79, 0.16);
}
.aarohi-tips-title {
    margin: 0 0 12px;
    font-size: 17px;
    color: var(--saffron-d);
    letter-spacing: 0.2px;
}
.aarohi-tips-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.aarohi-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    line-height: 1.5;
    color: var(--text);
    font-size: 14.5px;
}
.aarohi-tip:last-child { margin-bottom: 0; }
.aarohi-tip-icon { font-size: 18px; line-height: 1.4; flex: 0 0 auto; }
.aarohi-tip-text { flex: 1; }
.aarohi-tip-warn { border-color: #f1b48f; background: #fff4e8; }
.aarohi-tip-good { border-color: #b8e0d9; background: #ecfaf5; }
.aarohi-tip-info { border-color: #d8d8d8; background: #fafafa; }
.aarohi-tips-speak {
    margin-top: 12px;
    background: var(--teal);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 9px 18px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}
.aarohi-tips-speak:hover { background: var(--teal-d); }
.aarohi-tips-speak:disabled { opacity: 0.6; cursor: not-allowed; }

/* ============================================================
   Friendly voice-error toast — shown when Sarvam TTS fails so
   the user understands what happened and what to try.  Renders
   fixed at the top of the viewport above the AIF cobrand bar.
   ============================================================ */
.aarohi-voice-error {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translate(-50%, -24px);
    z-index: 1000;
    width: min(560px, calc(100vw - 24px));
    opacity: 0;
    pointer-events: none;
    transition: transform 240ms ease, opacity 240ms ease;
}
.aarohi-voice-error.show {
    transform: translate(-50%, 0);
    opacity: 1;
    pointer-events: auto;
}
.aarohi-voice-error-card {
    background: #fff;
    border: 1px solid var(--border);
    border-left: 4px solid var(--saffron);
    border-radius: 12px;
    padding: 14px 16px;
}
.aarohi-voice-error-body { min-width: 0; }
.aarohi-voice-error-title {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
    margin-bottom: 4px;
}
.aarohi-voice-error-text {
    color: var(--text);
    font-size: 13.5px;
    line-height: 1.45;
    margin-bottom: 10px;
}
.aarohi-voice-error-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.aarohi-voice-error-actions button {
    border: 0;
    border-radius: 999px;
    padding: 6px 14px;
    font-weight: 600;
    font-size: 12.5px;
    cursor: pointer;
}
.aarohi-voice-error-refresh {
    background: var(--saffron);
    color: #fff;
}
.aarohi-voice-error-refresh:hover { background: var(--saffron-d); }
.aarohi-voice-error-close {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border) !important;
}
.aarohi-voice-error-close:hover {
    color: var(--text);
    background: rgba(0, 0, 0, 0.04);
}
.aarohi-voice-error-hint {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}
@media (max-width: 480px) {
    .aarohi-voice-error { top: 8px; }
    .aarohi-voice-error-card { padding: 12px 14px; gap: 10px; }
    .aarohi-voice-error-title { font-size: 13.5px; }
    .aarohi-voice-error-text  { font-size: 13px; }
}

/* ============================================================
   Mode switcher (header on dashboard.html and chat.html)
   Plain rectangle, single border, no animation.
   ============================================================ */
.dash-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.dash-mode-label {
    font-size: 12px;
    color: #ffffff;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    font-weight: 600;
}
.chat-mode-label {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.dash-mode-select, .chat-mode-select {
    appearance: none;
    -webkit-appearance: none;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 32px 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    min-width: 150px;
    background-image: linear-gradient(45deg, transparent 50%, var(--text) 50%),
                      linear-gradient(135deg, var(--text) 50%, transparent 50%);
    background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}
.dash-mode-select:focus, .chat-mode-select:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}
.chat-mode-select:focus {
    outline-color: var(--saffron);
}
@media (max-width: 600px) {
    .dash-header { flex-direction: column; align-items: flex-start; gap: 12px; padding: 14px 18px; }
    .dash-header-actions { width: 100%; justify-content: flex-start; }
    .dash-mode-select, .chat-mode-select { min-width: 130px; }
}

/* ============================================================
   "Talk to Aarohi" card on the dashboard. Plain panel, no
   gradient, no shadow — only a soft border and hover state.
   ============================================================ */
.talk-card {
    display: block;
    position: relative;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 22px 18px 20px;
    margin: 0 0 22px;
    text-decoration: none;
    color: var(--text);
}
.talk-card:hover { border-color: var(--saffron); }
.talk-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text);
}
.talk-card-text {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.5;
    max-width: 640px;
}
.talk-card-arrow {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    font-size: 26px;
    color: var(--saffron);
    line-height: 1;
}

/* ============================================================
   Chat page — /chat.html
   Two-column-ish layout with a fixed header, scrolling stream,
   and a sticky input bar.  Plain rectangles, no avatars.
   ============================================================ */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 5;
}
.chat-header-left  { display: flex; align-items: baseline; gap: 14px; }
.chat-header-right { display: flex; align-items: center;   gap: 10px; }
.chat-back {
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
}
.chat-back:hover { color: var(--text); }
.chat-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.2px;
}

.chat-main {
    max-width: 760px;
    margin: 0 auto;
    padding: 16px 18px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: calc(100vh - 120px);
}

.chat-status {
    font-size: 12.5px;
    color: var(--muted);
    min-height: 16px;
}
.chat-status-ok    { color: var(--teal); }
.chat-status-error { color: var(--error); }

.chat-stream {
    flex: 1;
    overflow-y: auto;
    background: var(--pearl);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 14px 4px;
    min-height: 320px;
}

.chat-bubble-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 14px;
    max-width: 86%;
}
.chat-bubble-row-user   { align-self: flex-end;   margin-left: auto;  align-items: flex-end; }
.chat-bubble-row-aarohi { align-self: flex-start; margin-right: auto; align-items: flex-start; }

.chat-bubble {
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 14.5px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.chat-bubble-user {
    background: rgba(232, 154, 79, 0.12);
    border: 1px solid rgba(199, 122, 46, 0.25);
    color: var(--text);
}
.chat-bubble-aarohi {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
}
.chat-stamp {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
    padding: 0 4px;
}

.chat-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    position: sticky;
    bottom: 8px;
}
.chat-input {
    flex: 1;
    border: 0;
    outline: none;
    padding: 9px 10px;
    font-size: 14.5px;
    background: transparent;
    color: var(--text);
}
.chat-input::placeholder { color: #b0a48f; }

.chat-btn {
    border: 0;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.chat-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.chat-btn-primary {
    background: var(--saffron);
    color: #fff;
}
.chat-btn-primary:hover:not(:disabled)   { background: var(--saffron-d); }
.chat-btn-secondary {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
}
.chat-btn-secondary:hover:not(:disabled) { border-color: var(--saffron); color: var(--saffron-d); }
.chat-btn-listening {
    background: #fdecec;
    border-color: var(--error);
    color: var(--error);
}

.chat-foot {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    margin: 8px 4px 0;
}

@media (max-width: 480px) {
    .chat-header { padding: 10px 14px; }
    .chat-main   { padding: 12px 12px 18px; gap: 10px; }
    .chat-input-row { flex-wrap: wrap; }
    .chat-input { order: -1; flex-basis: 100%; }
}

/* ============================================================
   "Read this page" button — auto-injected at the bottom of every
   page by voice.js.  Plain rectangle, single border, no animation.
   ============================================================ */
.aarohi-page-guide {
    max-width: 760px;
    margin: 28px auto 24px;
    padding: 0 18px;
    text-align: center;
}
.aarohi-page-guide-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    min-width: 200px;
}
.aarohi-page-guide-btn:hover {
    border-color: var(--saffron);
    color: var(--saffron-d);
}
.aarohi-page-guide-btn:focus {
    outline: 2px solid var(--saffron);
    outline-offset: 2px;
}
.aarohi-page-guide-btn-stop {
    background: var(--saffron);
    color: #fff;
    border-color: var(--saffron);
}
.aarohi-page-guide-btn-stop:hover {
    background: var(--saffron-d);
    border-color: var(--saffron-d);
    color: #fff;
}
.aarohi-page-guide-hint {
    font-size: 12px;
    color: var(--muted);
    margin: 8px 0 0;
    line-height: 1.4;
}

/* ============================================================
   Sign-in wizard (login.html) — 6 plain rectangular steps.
   No emojis. No animation beyond a quick fade between steps.
   ============================================================ */
.wizard-card {
    max-width: 480px;
}
.wizard-progress {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0 0 18px;
}
.wizard-dot {
    width: 28px;
    height: 4px;
    border-radius: 2px;
    background: #e6dac3;
}
.wizard-dot.done   { background: var(--teal); }
.wizard-dot.active { background: var(--saffron); }

.wizard-step {
    animation: wizard-fade 200ms ease;
}
@keyframes wizard-fade {
    from { opacity: 0.0; transform: translateY(2px); }
    to   { opacity: 1.0; transform: translateY(0); }
}
.wizard-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 4px;
}
.wizard-sub {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.4px;
    text-transform: uppercase;
    margin: 0 0 14px;
}
.wizard-help {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.5;
    margin: 0 0 14px;
}
.wizard-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
}
.wizard-actions .btn { min-width: 120px; }
.wizard-actions-three { justify-content: space-between; }

/* Choice grid — language and role buttons. Plain rectangles. */
.wizard-choice-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 6px;
}
.wizard-choice {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    text-align: left;
    cursor: pointer;
    font: inherit;
}
.wizard-choice:hover  { border-color: var(--saffron); }
.wizard-choice:focus  { outline: 2px solid var(--saffron); outline-offset: 1px; }
.wizard-choice.selected {
    border-color: var(--saffron);
    background: rgba(232, 154, 79, 0.08);
}
.wizard-choice-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}
.wizard-choice-sub {
    font-size: 12.5px;
    color: var(--muted);
}
.wizard-choice[lang="hi"] .wizard-choice-title,
.wizard-choice .wizard-choice-title[lang="hi"] {
    font-family: 'Noto Sans Devanagari', 'Noto Sans', sans-serif;
}
.wizard-choice[lang="ta"] .wizard-choice-title,
.wizard-choice .wizard-choice-title[lang="ta"] {
    font-family: 'Noto Sans Tamil', 'Noto Sans', sans-serif;
}

/* Confirm step */
.wizard-confirm-card {
    background: var(--pearl);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 8px;
}
.wizard-confirm-card p { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.wizard-confirm-email {
    font-weight: 700;
    font-size: 17px;
    color: var(--saffron-d);
    word-break: break-all;
    margin: 6px 0 12px !important;
}
.wizard-confirm-hint  { color: var(--muted); font-size: 12.5px; }
.wizard-email-strong  { font-weight: 600; color: var(--text); }

/* Ghost button — used for "Resend code" */
.btn.ghost {
    background: transparent;
    color: var(--saffron-d);
    border: 1px solid var(--border);
}
.btn.ghost:hover:not(:disabled) {
    border-color: var(--saffron);
    background: rgba(232, 154, 79, 0.06);
}
.btn.ghost:disabled { opacity: 0.55; cursor: not-allowed; }

@media (max-width: 480px) {
    .wizard-actions { flex-wrap: wrap; }
    .wizard-actions .btn { flex: 1; min-width: 0; }
    .wizard-actions-three { flex-wrap: wrap; }
    .wizard-actions-three .btn { flex-basis: calc(50% - 4px); }
}

/* ============================================================
   LMP date row — three plain selects/inputs side by side. Used
   in the sign-in wizard and in the mode-switch registration page.
   Universal compatibility (no native date picker quirks).
   ============================================================ */
.lmp-row {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr;
    gap: 8px;
    margin-top: 4px;
}
.lmp-row .input {
    width: 100%;
    padding: 12px 12px;
    font-size: 15px;
    background: #fff;
    box-sizing: border-box;
}
.lmp-row select.input {
    appearance: none;
    -webkit-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--text) 50%),
                      linear-gradient(135deg, var(--text) 50%, transparent 50%);
    background-position: calc(100% - 14px) 55%, calc(100% - 9px) 55%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 28px;
}
@media (max-width: 420px) {
    .lmp-row { grid-template-columns: 1fr 1fr; }
    .lmp-row .lmp-year { grid-column: 1 / -1; }
}
