:root {
    --bg: #f8f9fa;
    --surface: #ffffff;
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --text: #202124;
    --text-secondary: #5f6368;
    --border: #e0e0e0;
    --success: #0d904f;
    --warning: #f9ab00;
    --error: #d93025;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --radius: 12px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh;
}

.shell { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.d-none { display: none !important; }

/* ============ HEADER ============ */
.topbar {
    background: rgba(255,255,255,0.92); backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--border);
    height: 64px; display: flex; align-items: center; position: sticky; top: 0; z-index: 100;
    box-shadow: var(--shadow-sm);
}
.topbar .shell { max-width: none; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 28px; }

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: var(--text); }
.brand-logo { height: 34px; width: 154px; aspect-ratio: 1330 / 294; object-fit: contain; display: block; flex-shrink: 0; }
.brand-product {
    font-size: 11.5px; font-weight: 600; color: var(--primary); background: #e8f0fe;
    padding: 3px 9px; border-radius: 20px; white-space: nowrap; letter-spacing: 0.01em;
}

.topbar-nav { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.link-btn {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 13px; font-weight: 600; color: var(--primary); text-decoration: none;
    padding: 9px 16px; border-radius: 8px; border: 1px solid var(--border);
    background: var(--surface); transition: all var(--transition); white-space: nowrap;
}
.link-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.link-btn:hover { background: #f8fbff; border-color: var(--primary); box-shadow: 0 1px 4px rgba(26,115,232,0.15); }
.link-btn:active { transform: translateY(1px); }

/* keyboard accessibility across all interactive elements */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, .link-btn:focus-visible {
    outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px;
}

@media (max-width: 480px) {
    .topbar { height: 58px; }
    .brand-logo { height: 27px; width: 122px; }
    .link-btn span.link-btn-text { display: none; }
    .link-btn { padding: 9px 11px; }
}

/* ============ HERO / UPLOAD ============ */
.hero { padding: 40px 0 12px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--primary); margin-bottom: 10px; }
.hero h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; letter-spacing: -0.5px; margin-bottom: 10px; }
.hero h1 em { color: var(--primary); font-style: normal; }
.lede { color: var(--text-secondary); font-size: 15px; max-width: 620px; margin-bottom: 28px; }

.passbook { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-md); border: 1px solid var(--border); overflow: hidden; margin-bottom: 24px; }
.passbook-head { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.passbook-head .label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--primary); background: #e8f0fe; padding: 5px 10px; border-radius: 20px; }
.passbook-head h2 { font-size: 16px; font-weight: 600; margin-top: 6px; }
.passbook-body { padding: 24px; }

.dropzone {
    display: block; border: 2px dashed #c4c7c5; border-radius: var(--radius);
    padding: 44px 24px; text-align: center; transition: all var(--transition);
    cursor: pointer; background: #fafafa;
}
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: #f8fbff; }
.dropzone .icon { width: 44px; height: 44px; color: var(--primary); margin-bottom: 14px; opacity: 0.85; }
.dropzone .primary { font-size: 15px; font-weight: 500; margin-bottom: 4px; }
.dropzone .secondary { font-size: 13px; color: var(--text-secondary); }
#form16File { display: none; }

.file-chip { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #f0f4ff; border: 1px solid #c2d7ff; border-radius: 8px; margin-top: 16px; font-size: 14px; }
.file-chip span { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip button { background: none; border: none; cursor: pointer; font-size: 12px; color: var(--text-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.file-chip button:hover { color: var(--error); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: all var(--transition); font-family: inherit; text-decoration: none; width: 100%; margin-top: 16px; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-outline { background: white; color: var(--primary); border: 1px solid var(--border); }
.btn-outline:hover:not(:disabled) { background: #f8fbff; border-color: var(--primary); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover:not(:disabled) { opacity: 0.92; }
.btn-gold { background: var(--primary); color: white; }
.btn-gold:hover:not(:disabled) { background: var(--primary-dark); box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3); }
.btn-gold:disabled { opacity: 0.45; cursor: not-allowed; }

.loader-line { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 13px; color: var(--primary); font-weight: 500; }
.loader-line .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); animation: pulse 1s ease-in-out infinite; flex-shrink: 0; }
@keyframes pulse { 0%,100% { opacity: 0.35; transform: scale(0.85); } 50% { opacity: 1; transform: scale(1); } }

.alert { padding: 13px 16px; border-radius: 8px; font-size: 13px; margin-top: 16px; }
.alert-danger { background: #fce8e6; color: #c5221f; border: 1px solid #f5c6c2; }

/* ============ CONTENT / RESULTS ============ */
.content { padding: 8px 0 40px; }
.fade-in { animation: slideUp 0.35s ease; }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.section-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-md); border: 1px solid var(--border); overflow: hidden; margin-bottom: 20px; }
.section-card .sc-head { padding: 16px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; background: #fafafa; }
.section-card .sc-head h3 { font-size: 15px; font-weight: 600; }
.section-card .sc-body { padding: 0; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table tr { border-bottom: 1px solid #f1f3f4; }
.data-table tr:last-child { border-bottom: none; }
.data-table td { padding: 13px 24px; font-size: 14px; }
.data-table .label-cell { color: var(--text-secondary); font-weight: 500; width: 45%; font-size: 13px; }
.data-table .value-cell { color: var(--text); font-weight: 600; font-size: 14px; font-family: var(--font-mono); }
.data-table .value-cell.empty { color: #c4c7c5; font-weight: 400; font-style: italic; font-family: inherit; }

.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.figure-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); transition: all var(--transition); }
.figure-card .k { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 8px; }
.figure-card .v { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; color: var(--text); }
.figure-card.win { border-color: var(--primary); background: linear-gradient(135deg, #f0f6ff, #ffffff); box-shadow: 0 0 0 2px rgba(26,115,232,0.15); }
.figure-card.win .v { color: var(--primary); }
.figure-card.win .k::after { content: " ✓ Recommended"; color: var(--success); text-transform: none; font-weight: 700; }

.verdict-panel { background: linear-gradient(135deg, #1a73e8, #1557b0); color: white; border-radius: 14px; padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.verdict-copy .eyebrow { color: rgba(255,255,255,0.85) !important; }
.verdict-copy p { font-size: 15px; line-height: 1.5; max-width: 480px; }
.verdict-copy .amount { font-weight: 800; }
.stamp { width: 84px; height: 84px; flex-shrink: 0; opacity: 0; transform: scale(0.8) rotate(-6deg); transition: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
.stamp.show { opacity: 1; transform: scale(1) rotate(-6deg); }
.stamp circle, .stamp text, .stamp textPath { stroke: white !important; fill: white !important; }

.ledger { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-md); border: 1px solid var(--border); padding: 20px 24px; }
.ledger h3 { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.ledger .sub { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; color: var(--text-secondary); text-transform: uppercase; margin-bottom: 14px; }
.ledger-table { width: 100%; border-collapse: collapse; }
.ledger-table tr { border-bottom: 1px solid #f1f3f4; }
.ledger-table tr:last-child { border-bottom: none; }
.ledger-table td { padding: 11px 4px; font-size: 13.5px; }
.ledger-table td.amt { font-family: var(--font-mono); font-weight: 600; text-align: right; }
.ledger-table td.act { text-align: right; width: 76px; }
.copy-btn { background: #f1f3f4; border: none; padding: 6px 12px; border-radius: 6px; font-size: 11px; font-weight: 600; color: var(--text-secondary); cursor: pointer; transition: all var(--transition); }
.copy-btn:hover { background: #e8f0fe; color: var(--primary); }
.copy-btn.copied { background: #e6f4ea; color: var(--success); }

.start-over { text-align: center; margin-top: 24px; }
.start-over .btn { width: auto; padding: 12px 28px; }

/* ---------- Unused Tax-Saving Opportunities ---------- */
.opportunities-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-md); border: 1px solid var(--border); padding: 20px 24px; }
.opp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.opp-head h3 { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.opp-head .sub { font-size: 11px; font-weight: 600; letter-spacing: 0.03em; color: var(--text-secondary); }
.opp-total { background: var(--success); color: white; font-size: 12.5px; font-weight: 700; padding: 7px 14px; border-radius: 20px; white-space: nowrap; }
.opp-empty { text-align: center; padding: 24px 16px; color: var(--success); font-weight: 600; font-size: 14px; background: #e6f4ea; border-radius: 10px; }

.opp-item { border: 1px solid #f1f3f4; border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; background: #fafafa; }
.opp-item:last-child { margin-bottom: 0; }
.opp-item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.opp-section-tag { background: #e8f0fe; color: var(--primary); font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; flex-shrink: 0; }
.opp-title { font-size: 13.5px; font-weight: 600; color: var(--text); flex: 1; min-width: 160px; }
.opp-save { font-size: 13px; font-weight: 700; color: var(--success); white-space: nowrap; }
.opp-progress { height: 6px; background: #e0e0e0; border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.opp-progress-fill { height: 100%; background: var(--primary); border-radius: 4px; transition: width 0.4s ease; }
.opp-detail { font-size: 12px; color: var(--text-secondary); }
.opp-item-info { background: #fff8e1; border-color: #fde9b0; }
.opp-note { font-size: 12.5px; color: #7a5b00; font-weight: 500; }

@media (max-width: 600px) {
    .opp-total { font-size: 11.5px; padding: 6px 12px; }
    .opp-title { min-width: 100%; order: 3; }
}

/* ============ MODAL ============ */
.modal-backdrop { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; backdrop-filter: blur(4px); padding: 16px; }
.modal-backdrop.open { display: flex; }
.modal-card { background: white; border-radius: 20px; width: 100%; max-width: 620px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 30px 60px rgba(0,0,0,0.3); animation: modalIn 0.3s ease; position: relative; }
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-head { padding: 24px 28px 0; flex-shrink: 0; }
.modal-head .label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--primary); background: #e8f0fe; padding: 5px 10px; border-radius: 20px; display: inline-block; margin-bottom: 10px; }
.modal-head h3 { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.modal-head p { font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; }
.modal-close { position: absolute; top: 20px; right: 20px; width: 36px; height: 36px; border-radius: 50%; border: none; background: #f1f3f4; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); z-index: 2; }
.modal-close:hover { background: #e8eaed; color: var(--text); }

.modal-card-wide { max-width: 720px; }

.senior-toggle { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 14px; background: #fff8e1; border: 1px solid #fde9b0; border-radius: 10px; font-size: 12.5px; font-weight: 600; color: #7a5b00; cursor: pointer; }
.senior-toggle input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }
.senior-toggle .cap-hint { font-weight: 400; }

.tab-nav { display: flex; gap: 0; border-bottom: 2px solid #e0e0e0; padding: 16px 28px 0; flex-shrink: 0; background: #fafafa; margin-top: 18px; overflow-x: auto; scrollbar-width: thin; }
.tab-btn { padding: 12px 16px; border: none; background: none; font-size: 12.5px; font-weight: 500; color: var(--text-secondary); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; font-family: inherit; white-space: nowrap; flex-shrink: 0; }
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab-content { display: none; }
.tab-content.active { display: block; animation: slideUp 0.25s ease; }

.field-select { flex-shrink: 0; width: 220px; padding: 10px 12px; border: 1.5px solid #e0e0e0; border-radius: 8px; font-size: 13px; font-family: inherit; background: white; color: var(--text); cursor: pointer; }
.field-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,232,0.08); }
.chk-label { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; cursor: pointer; width: 100%; }
.chk-label input { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }

.modal-body { padding: 18px 28px; overflow-y: auto; flex: 1; }
.info-banner { background: #e8f0fe; border: 1px solid #c2d7ff; border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-size: 12.5px; color: var(--primary); display: flex; align-items: flex-start; gap: 10px; }
.info-banner > span:first-child { font-size: 15px; line-height: 1.4; flex-shrink: 0; }

/* Bootstrap Icons — align inline icons with surrounding text baseline */
.bi { vertical-align: -0.125em; }

.field { background: #fafafa; border: 1px solid #e8eaed; border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; display: flex; align-items: center; gap: 12px; transition: all 0.2s; }
.field:hover { border-color: #c2d7ff; background: #f8fbff; }
.field label { flex: 1; font-size: 13px; font-weight: 600; min-width: 0; }
.field .cap-hint { display: block; font-size: 11px; color: var(--text-secondary); font-weight: 400; margin-top: 1px; }
.field .auto-badge { display: inline-block; margin-top: 4px; font-size: 10.5px; font-weight: 700; color: var(--success); background: #e6f4ea; padding: 2px 8px; border-radius: 20px; letter-spacing: 0.01em; }
.input-wrap { display: flex; align-items: center; border: 1.5px solid #e0e0e0; border-radius: 8px; background: white; overflow: hidden; flex-shrink: 0; width: 140px; }
.input-wrap:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,232,0.08); }
.input-wrap .rupee { padding: 0 0 0 10px; color: var(--text-secondary); font-size: 13px; }
.input-wrap input { border: none; padding: 10px 10px 10px 4px; font-size: 14px; font-family: inherit; width: 100%; text-align: right; background: transparent; }
.input-wrap input:focus { outline: none; }

.subtotal-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: #e8f0fe; border-radius: 10px; margin-top: 8px; font-weight: 600; font-size: 14px; }
.subtotal-row .subtotal-amount { color: var(--primary); font-size: 17px; font-family: var(--font-mono); }
.cap-note { font-size: 11px; color: var(--text-secondary); margin-top: 6px; }

.total-summary { background: linear-gradient(135deg, #1a73e8, #1557b0); color: white; border-radius: 14px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; margin: 4px 28px 0; }
.total-summary .total-label { font-size: 13px; opacity: 0.9; }
.total-summary .total-amount { font-size: 22px; font-weight: 800; font-family: var(--font-mono); }

.modal-foot { padding: 18px 28px; border-top: 1px solid #e8eaed; flex-shrink: 0; }

/* Result modal specifics */
.modal-head-band { border-radius: 20px 20px 0 0; padding: 24px 28px; color: white; position: relative; flex-shrink: 0; }
.modal-head-band .subtitle { font-size: 12.5px; opacity: 0.9; margin-top: 4px; }
.modal-head-band .modal-close { background: rgba(255,255,255,0.2); color: white; }
.modal-head-band .modal-close:hover { background: rgba(255,255,255,0.32); }
.result-amount-large { font-size: 46px; font-weight: 800; letter-spacing: -2px; line-height: 1; }
.result-summary-row { display: flex; justify-content: space-between; margin-bottom: 10px; padding: 0 4px; font-size: 14px; }
.result-detail-box { padding: 12px; border-radius: 10px; text-align: left; font-size: 12px; line-height: 1.6; }
.result-note { font-size: 13px; color: var(--text-secondary); padding: 12px; background: #fef7e0; border-radius: 10px; }

.footer { text-align: center; padding: 32px 24px; color: var(--text-secondary); font-size: 12px; border-top: 1px solid var(--border); margin-top: 20px; }

/* ============ SETTINGS PAGE ============ */
.settings-page { padding: 40px 0 60px; }
.settings-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-md); border: 1px solid var(--border); padding: 28px; max-width: 520px; margin: 0 auto; }
.status-row { background: #fafafa; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 22px; font-size: 13px; }
.status-row .meta { color: var(--text-secondary); font-size: 12px; margin-top: 4px; }
.dot-live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; }
.dot-live.custom { background: var(--success); }
.dot-live.default { background: var(--warning); }
.field-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.text-input { width: 100%; padding: 11px 14px; border: 1.5px solid #e0e0e0; border-radius: 8px; font-size: 14px; font-family: var(--font-mono); margin-bottom: 4px; }
.text-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,232,0.08); }
.field-hint { font-size: 11.5px; color: var(--text-secondary); margin-bottom: 18px; }
.settings-actions { display: flex; gap: 12px; margin-top: 6px; }
.settings-actions .btn { margin-top: 0; width: auto; flex: 1; }
.settings-note { max-width: 520px; margin: 18px auto 0; font-size: 12px; color: var(--text-secondary); text-align: center; }
.settings-note code { background: #f1f3f4; padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono); }

.radio-pill { display: flex; align-items: center; gap: 8px; flex: 1; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 12.5px; font-weight: 600; color: var(--text-secondary); cursor: pointer; transition: all var(--transition); }
.radio-pill input { margin: 0; accent-color: var(--primary); }
.radio-pill:has(input:checked) { border-color: var(--primary); background: #eef4ff; color: var(--primary); }

@media (max-width: 768px) {
    .shell { padding: 0 16px; }
    .hero { padding: 28px 0 8px; }
    .passbook-body { padding: 18px; }
    .dropzone { padding: 32px 16px; }
    .result-grid { grid-template-columns: 1fr; }
    .verdict-panel { flex-direction: column; text-align: center; }
    .field { flex-wrap: wrap; }
    .input-wrap { width: 100%; }
    .field-select { width: 100%; }
    .tab-btn { font-size: 11.5px; padding: 12px 10px; }
    .modal-card-wide { max-width: 100%; }
    .senior-toggle { font-size: 11.5px; }
    .modal-card { max-height: 94vh; border-radius: 16px; }
    .modal-body, .modal-head, .tab-nav, .modal-foot { padding-left: 18px; padding-right: 18px; }
    .total-summary { margin-left: 18px; margin-right: 18px; flex-direction: column; text-align: center; gap: 8px; }
    .result-amount-large { font-size: 34px; }
    .data-table td { padding: 11px 16px; }
    .settings-card { padding: 20px; }
    .settings-actions { flex-direction: column; }
}

/* ============ PUBLIC NAV EXTRAS ============ */
.link-btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.link-btn-primary:hover { background: var(--primary-dark); color: white; }
.link-btn-active { background: #e8f0fe; border-color: #c2d7ff; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }

/* ============ HOMEPAGE SECTIONS ============ */
.home-section { padding: 52px 0; }
.section-heading { text-align: center; max-width: 600px; margin: 0 auto 32px; }
.section-heading h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; letter-spacing: -0.4px; margin-top: 6px; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); transition: all var(--transition); }
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-icon { font-size: 28px; margin-bottom: 12px; }
.feature-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.feature-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.55; }

.home-cta { background: linear-gradient(135deg, #1a73e8, #1557b0); color: white; padding: 56px 0; text-align: center; margin-top: 20px; }
.home-cta h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; margin-bottom: 8px; }
.home-cta p { opacity: 0.9; margin-bottom: 22px; font-size: 14.5px; }
.home-cta .btn-primary { background: white; color: var(--primary); }
.home-cta .btn-primary:hover { background: #f0f6ff; }

/* ============ BLOG ============ */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.blog-grid-listing { margin-top: 8px; }
.blog-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); box-shadow: var(--shadow-sm); transition: all var(--transition); display: flex; flex-direction: column; }
.blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.blog-card-image { height: 150px; background-size: cover; background-position: center; background-color: #e8f0fe; }
.blog-card-image-placeholder { display: flex; align-items: center; justify-content: center; font-size: 36px; }
.blog-card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.blog-card-body h3 { font-size: 15.5px; font-weight: 700; margin-bottom: 8px; line-height: 1.35; }
.blog-card-body p { font-size: 13px; color: var(--text-secondary); line-height: 1.55; flex: 1; margin-bottom: 10px; }
.blog-card-meta { font-size: 11.5px; color: var(--text-secondary); font-weight: 500; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-secondary); }
.empty-icon { font-size: 40px; margin-bottom: 14px; }
.empty-state h3 { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }

/* ============ ARTICLE PAGE ============ */
.shell-narrow { max-width: 760px; }
.article-page { padding: 40px 0 60px; }
.article-breadcrumb { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 18px; }
.article-breadcrumb a { color: var(--primary); text-decoration: none; }
.article-title { font-size: clamp(24px, 4vw, 34px); font-weight: 800; letter-spacing: -0.5px; line-height: 1.25; margin-bottom: 10px; }
.article-meta { font-size: 13px; color: var(--text-secondary); margin-bottom: 24px; }
.article-featured-image { width: 100%; border-radius: var(--radius); margin-bottom: 28px; display: block; }
.article-body { font-size: 16px; line-height: 1.8; color: var(--text); }
.article-body h2 { font-size: 22px; font-weight: 700; margin: 32px 0 12px; letter-spacing: -0.3px; }
.article-body h3 { font-size: 18px; font-weight: 700; margin: 26px 0 10px; }
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol { margin: 0 0 16px 22px; }
.article-body li { margin-bottom: 6px; }
.article-body a { color: var(--primary); }
.article-body blockquote { border-left: 3px solid var(--primary); padding-left: 16px; color: var(--text-secondary); font-style: italic; margin: 16px 0; }
.article-body img { max-width: 100%; border-radius: 10px; margin: 16px 0; }
.article-body code { background: #f1f3f4; padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.9em; }
.article-footer-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); flex-wrap: wrap; }

/* ============ LOGIN PAGE ============ */
.login-page { padding: 80px 0; }
.login-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-md); border: 1px solid var(--border); padding: 40px 32px; max-width: 420px; margin: 0 auto; text-align: center; }
.login-icon { width: 56px; height: 56px; background: #e8f0fe; color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.login-icon svg { width: 26px; height: 26px; }
.login-card h1 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.login-note { font-size: 11.5px; color: var(--text-secondary); margin-top: 16px; }

/* ============ DASHBOARD SHELL ============ */
.dash-body { background: var(--bg); }
.dash-wrapper { display: flex; min-height: 100vh; }
.dash-sidebar {
    width: 240px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border);
    padding: 20px 16px; display: flex; flex-direction: column; gap: 4px;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.dash-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); padding: 6px 8px 20px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.dash-nav { display: flex; flex-direction: column; gap: 2px; }
.dash-nav-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--text-secondary); text-decoration: none; font-size: 13.5px; font-weight: 500; transition: all var(--transition); }
.dash-nav-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.dash-nav-link:hover { background: #f8fbff; color: var(--primary); }
.dash-nav-link.active { background: #e8f0fe; color: var(--primary); font-weight: 700; }
.dash-nav-divider { height: 1px; background: var(--border); margin: 14px 4px; }
.dash-nav-logout:hover { background: #fce8e6; color: var(--error); }
.dash-mobile-toggle { display: none; position: fixed; top: 14px; left: 14px; z-index: 200; width: 40px; height: 40px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); align-items: center; justify-content: center; color: var(--text); cursor: pointer; }
.dash-mobile-toggle svg { width: 20px; height: 20px; }

.dash-main { flex: 1; min-width: 0; padding: 28px 32px 50px; max-width: 1180px; }
.dash-hero { padding-top: 0; }
.dash-page-head { margin-bottom: 24px; }
.dash-page-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.4px; margin-bottom: 4px; }
.dash-page-head p { color: var(--text-secondary); font-size: 13.5px; }
.dash-page-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.dash-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.dash-stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.dash-stat-icon { font-size: 22px; margin-bottom: 8px; }
.dash-stat-value { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; }
.dash-stat-label { font-size: 12.5px; color: var(--text-secondary); font-weight: 500; margin-top: 2px; }

.dash-action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dash-action-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; text-decoration: none; color: var(--text); box-shadow: var(--shadow-sm); transition: all var(--transition); display: block; }
.dash-action-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary); transform: translateY(-2px); }
.dash-action-icon { font-size: 26px; margin-bottom: 10px; }
.dash-action-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.dash-action-card p { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.5; }
.dash-action-link { font-size: 12.5px; font-weight: 700; color: var(--primary); }

/* status badges */
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.status-published { background: #e6f4ea; color: var(--success); }
.status-draft { background: #fef7e0; color: #8a6d00; }

.dash-articles-table { table-layout: fixed; }
.dash-articles-table td { vertical-align: middle; }
.dash-articles-table thead .label-cell { width: auto; }
.dash-articles-table thead .label-cell:nth-child(1) { width: 48%; }
.dash-articles-table thead .label-cell:nth-child(2) { width: 14%; }
.dash-articles-table thead .label-cell:nth-child(3) { width: 20%; }
.dash-articles-table thead .label-cell:nth-child(4) { width: 18%; }
.dash-articles-table td:first-child { overflow-wrap: break-word; }
.dash-table-actions { text-align: right; white-space: nowrap; }
@media (max-width: 700px) {
    .dash-articles-table { table-layout: auto; }
    .dash-articles-table thead .label-cell:nth-child(1),
    .dash-articles-table thead .label-cell:nth-child(2),
    .dash-articles-table thead .label-cell:nth-child(3),
    .dash-articles-table thead .label-cell:nth-child(4) { width: auto; }
}
.table-action-btn { display: inline-block; background: #f1f3f4; border: none; padding: 6px 12px; border-radius: 6px; font-size: 11.5px; font-weight: 600; color: var(--text-secondary); cursor: pointer; text-decoration: none; margin-left: 6px; font-family: inherit; }
.table-action-btn:hover { background: #e8f0fe; color: var(--primary); }
.table-action-danger:hover { background: #fce8e6; color: var(--error); }

.alert-success { background: #e6f4ea; color: var(--success); border: 1px solid #b7e1c4; padding: 12px 16px; border-radius: 8px; font-size: 13px; }

/* ============ ARTICLE EDITOR ============ */
.ai-gen-row { display: grid; grid-template-columns: 1fr 180px 200px; gap: 14px; align-items: start; }
.btn-spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: btnSpin 0.7s linear infinite; vertical-align: -2px; margin-right: 4px; }
@keyframes btnSpin { to { transform: rotate(360deg); } }
@media (max-width: 720px) {
  .ai-gen-row { grid-template-columns: 1fr; }
}
.editor-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.editor-sidebar { display: flex; flex-direction: column; gap: 16px; }
.form-group { margin-bottom: 18px; }
.form-group:last-child { margin-bottom: 0; }
.field-optional { font-weight: 400; color: var(--text-secondary); text-transform: none; letter-spacing: 0; }
.content-editor { min-height: 420px; font-family: var(--font-mono); font-size: 13.5px; resize: vertical; line-height: 1.6; }
.editor-sidebar .btn { width: 100%; }

@media (max-width: 1024px) {
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
    .editor-layout { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .dash-mobile-toggle { display: flex; }
    .dash-sidebar { position: fixed; left: -260px; top: 0; z-index: 150; box-shadow: var(--shadow-lg); transition: left 0.25s ease; }
    .dash-sidebar.open { left: 0; }
    .dash-main { padding: 70px 18px 40px; }
    .dash-stats-grid, .dash-action-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .feature-grid, .blog-grid { grid-template-columns: 1fr; }
    .dash-page-head-row { flex-direction: column; }
}

/* ============ HERO — TWO COLUMN + VISUAL ============ */
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; padding: 20px 0 12px; }
.hero-copy .lede { margin-bottom: 22px; }
.hero-trust { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.hero-trust-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.hero-trust-item svg { width: 16px; height: 16px; color: var(--success); flex-shrink: 0; }

.hero-visual { position: relative; min-height: 380px; display: flex; align-items: center; justify-content: center; }
.hero-blob { position: absolute; border-radius: 50%; filter: blur(40px); opacity: 0.35; z-index: 0; }
.hero-blob-1 { width: 260px; height: 260px; background: #1a73e8; top: -30px; right: -20px; }
.hero-blob-2 { width: 220px; height: 220px; background: #0d904f; bottom: -30px; left: -10px; opacity: 0.2; }

.mockup-card { position: relative; z-index: 1; width: 100%; max-width: 380px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); overflow: hidden; transform: rotate(-1.5deg); }
.mockup-topbar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; background: #f1f3f4; border-bottom: 1px solid var(--border); }
.mockup-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.mockup-topbar-title { margin-left: 8px; font-size: 11px; color: var(--text-secondary); font-weight: 600; }
.mockup-body { padding: 20px; }
.mockup-label { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--primary); margin-bottom: 12px; }
.mockup-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 8px 0; border-bottom: 1px dashed var(--border); color: var(--text-secondary); }
.mockup-row strong { color: var(--text); font-family: var(--font-mono); font-weight: 700; }
.mockup-verdict { margin-top: 16px; background: linear-gradient(135deg, #1a73e8, #1557b0); border-radius: 12px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; color: white; }
.mockup-verdict-label { font-size: 11.5px; opacity: 0.85; }
.mockup-verdict-amount { font-size: 20px; font-weight: 800; font-family: var(--font-mono); margin-top: 2px; }
.mockup-verdict-check { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }

.hero-float-badge { position: absolute; z-index: 2; bottom: -14px; left: -18px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; animation: floatY 3.2s ease-in-out infinite; }
.hero-float-badge-icon { width: 34px; height: 34px; border-radius: 50%; background: #e6f4ea; color: var(--success); font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hero-float-badge-title { font-size: 10.5px; color: var(--text-secondary); font-weight: 600; }
.hero-float-badge-amount { font-size: 15px; font-weight: 800; color: var(--success); font-family: var(--font-mono); }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ============ HOW IT WORKS ============ */
.how-it-works { padding: 48px 0 20px; }
.steps-grid { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 8px; align-items: start; }
.step-card { text-align: center; padding: 4px 8px; }
.step-number { width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: white; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.step-icon { width: 56px; height: 56px; border-radius: 16px; background: #e8f0fe; color: var(--primary); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.step-icon svg { width: 26px; height: 26px; }
.step-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.step-card p { font-size: 12.5px; color: var(--text-secondary); line-height: 1.55; max-width: 220px; margin: 0 auto; }
.step-connector { height: 2px; background: repeating-linear-gradient(90deg, var(--border) 0, var(--border) 6px, transparent 6px, transparent 12px); margin-top: 27px; }

/* ============ FEATURE ICON BADGE (replaces emoji) ============ */
.feature-icon-badge { width: 46px; height: 46px; border-radius: 12px; background: #e8f0fe; color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.feature-icon-badge svg { width: 22px; height: 22px; }

.blog-card-image-placeholder svg { width: 34px; height: 34px; color: var(--primary); opacity: 0.55; }

@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { min-height: 320px; margin-top: 12px; }
    .steps-grid { grid-template-columns: 1fr; }
    .step-connector { display: none; }
}

@media (max-width: 480px) {
    .mockup-card { max-width: 100%; transform: none; }
    .hero-float-badge { left: 8px; bottom: -12px; }
    .hero-blob { display: none; }
}
