/* =========================================================================
   FinGuide — mobile-only design system
   One polished system for every page. Mobile-first; on desktop the same
   layout is centred at a max width of ~430px.
   ========================================================================= */

/* ----- Design tokens ----------------------------------------------------- */
:root {
    --shell-max: 430px;

    --c-bg:        #f4f6fb;
    --c-surface:   #ffffff;
    --c-surface-2: #f7f9fc;
    --c-text:      #182031;
    --c-muted:     #5b6576;
    --c-border:    #e5e9f2;
    --c-primary:   #1d4ed8;
    --c-primary-d: #1739a8;
    --c-accent:    #0f9d58;
    --c-header:    #0b1f4d;
    --c-header-2:  #14306e;
    --c-ring:      rgba(29, 78, 216, .35);

    --radius:    14px;
    --radius-sm: 10px;
    --radius-lg: 20px;

    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
    --shadow-md: 0 4px 12px rgba(16, 24, 40, .08), 0 2px 4px rgba(16, 24, 40, .05);
    --shadow-lg: 0 12px 32px rgba(16, 24, 40, .14);

    --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
    --sp-5: 20px; --sp-6: 24px; --sp-7: 32px; --sp-8: 40px;

    --bottom-nav-h: 60px;
    --header-h: 56px;

    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-head: "Sora", var(--font-sans);
}

@media (prefers-color-scheme: dark) {
    :root {
        --c-bg:        #0c1017;
        --c-surface:   #141a24;
        --c-surface-2: #1a2130;
        --c-text:      #e8ecf4;
        --c-muted:     #9aa4b4;
        --c-border:    #262f3f;
        --c-primary:   #5b8bff;
        --c-primary-d: #3f6fe0;
        --c-accent:    #34d17e;
        --c-header:    #0a1428;
        --c-header-2:  #10204a;
        --c-ring:      rgba(91, 139, 255, .4);
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
        --shadow-md: 0 4px 12px rgba(0, 0, 0, .45);
        --shadow-lg: 0 14px 34px rgba(0, 0, 0, .55);
    }
}

/* ----- Reset / base ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--c-text);
    background: #e7ebf3;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

@media (prefers-color-scheme: dark) {
    body { background: #05070b; }
}

img, svg { max-width: 100%; display: block; }
img { height: auto; }

a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
    font-family: var(--font-head);
    line-height: 1.25;
    margin: 0 0 var(--sp-3);
    color: var(--c-text);
    letter-spacing: -0.01em;
}

p { margin: 0 0 var(--sp-4); }
ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.25em; }
li { margin-bottom: var(--sp-2); }

:focus-visible {
    outline: 3px solid var(--c-ring);
    outline-offset: 2px;
    border-radius: 4px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

/* ----- App shell ----------------------------------------------------- */
.app-shell {
    max-width: var(--shell-max);
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--c-bg);
    position: relative;
    box-shadow: 0 0 40px rgba(16, 24, 40, .12);
    overflow-x: clip;
}

.app-main {
    padding: var(--sp-4) 0 calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + var(--sp-6));
}

.app-main > section,
.app-main > article,
.app-main > div {
    padding-left: var(--sp-4);
    padding-right: var(--sp-4);
}

/* full-bleed helper for horizontal scrollers */
.app-main > section > .hscroll {
    margin-left: calc(-1 * var(--sp-4));
    margin-right: calc(-1 * var(--sp-4));
}

/* ----- Header -------------------------------------------------------- */
.app-header {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-2);
    height: var(--header-h);
    padding: 0 var(--sp-3);
    background: linear-gradient(120deg, var(--c-header), var(--c-header-2));
    color: #fff;
    padding-top: env(safe-area-inset-top, 0px);
}

.hdr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border: 0;
    background: transparent;
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    flex: 0 0 auto;
}
.hdr-btn:hover { background: rgba(255, 255, 255, .12); text-decoration: none; }
.hdr-btn:active { background: rgba(255, 255, 255, .2); }

.hdr-brand {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.15rem;
}
.hdr-brand:hover { text-decoration: none; }

.hdr-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    border-radius: 8px;
    background: #fff;
    color: var(--c-header);
    font-weight: 800;
    font-size: .95rem;
}

/* ----- Nav drawer -------------------------------------------------- */
.drawer-scrim {
    position: fixed;
    inset: 0;
    background: rgba(6, 12, 28, .55);
    z-index: 50;
    opacity: 0;
    transition: opacity .22s ease;
}
.drawer-scrim.is-open { opacity: 1; }
.drawer-scrim[hidden] { display: none; }

.nav-drawer {
    position: fixed;
    top: 0; bottom: 0;
    left: 0;
    width: 84%;
    max-width: 340px;
    z-index: 60;
    background: var(--c-surface);
    display: flex;
    flex-direction: column;
    padding: env(safe-area-inset-top, 0px) 0 var(--sp-5);
    transform: translateX(-102%);
    transition: transform .26s cubic-bezier(.4, 0, .2, 1);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
}
.nav-drawer.is-open { transform: translateX(0); }

.nav-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-5);
    background: linear-gradient(120deg, var(--c-header), var(--c-header-2));
    color: #fff;
}
.nav-drawer-head .hdr-brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; }
.nav-drawer-head .hdr-btn { color: #fff; }

.nav-drawer-list {
    list-style: none;
    margin: var(--sp-2) 0;
    padding: 0;
    flex: 1 0 auto;
}
.nav-drawer-list a {
    display: block;
    padding: 14px var(--sp-5);
    color: var(--c-text);
    font-weight: 500;
    border-left: 3px solid transparent;
}
.nav-drawer-list a:hover { background: var(--c-surface-2); text-decoration: none; }
.nav-drawer-list a.is-active {
    color: var(--c-primary);
    border-left-color: var(--c-primary);
    background: color-mix(in srgb, var(--c-primary) 8%, transparent);
}

.nav-drawer-note {
    margin: 0;
    padding: var(--sp-4) var(--sp-5) 0;
    font-size: .8rem;
    color: var(--c-muted);
    border-top: 1px solid var(--c-border);
}

/* ----- Bottom navigation ---------------------------------------------- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--shell-max);
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: var(--c-surface);
    border-top: 1px solid var(--c-border);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -2px 12px rgba(16, 24, 40, .08);
}
.bn-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 2px;
    min-height: var(--bottom-nav-h);
    color: var(--c-muted);
    font-size: .68rem;
    font-weight: 500;
}
.bn-item:hover { text-decoration: none; color: var(--c-text); }
.bn-item svg { opacity: .9; }
.bn-item.is-active { color: var(--c-primary); }
.bn-item.is-active svg { opacity: 1; }

/* ----- Buttons ------------------------------------------------------- */
.btn-primary, .btn-ghost, .btn-read, .btn-block-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 600;
    font-size: .95rem;
    border-radius: 999px;
    padding: 11px 20px;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: transform .05s ease, background .15s ease;
    text-align: center;
}
.btn-primary:active, .btn-ghost:active { transform: translateY(1px); }

.btn-primary {
    background: var(--c-primary);
    color: #fff;
    border-color: var(--c-primary);
}
.btn-primary:hover { background: var(--c-primary-d); border-color: var(--c-primary-d); text-decoration: none; }

.btn-ghost {
    background: transparent;
    color: var(--c-primary);
    border-color: color-mix(in srgb, var(--c-primary) 40%, transparent);
}
.btn-ghost:hover { background: color-mix(in srgb, var(--c-primary) 8%, transparent); text-decoration: none; }

.btn-block { width: 100%; }

.btn-block-ghost {
    width: 100%;
    background: var(--c-surface);
    color: var(--c-primary);
    border: 1.5px solid var(--c-border);
    margin-top: var(--sp-2);
}
.btn-block-ghost:hover { background: var(--c-surface-2); text-decoration: none; }

.btn-read {
    padding: 0;
    background: none;
    border: 0;
    color: var(--c-primary);
    font-size: .9rem;
}
.btn-read:hover { text-decoration: underline; }

/* ----- Sections --------------------------------------------------- */
.sec { margin-top: var(--sp-7); }
.sec:first-child { margin-top: var(--sp-2); }

.sec-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--sp-3);
    margin-bottom: var(--sp-4);
}
.sec-title {
    font-size: 1.2rem;
    margin: 0;
}
.sec-link {
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
    flex: 0 0 auto;
}
.sec-intro, .page-intro {
    color: var(--c-muted);
    margin-top: calc(-1 * var(--sp-2));
    margin-bottom: var(--sp-4);
    font-size: .95rem;
}

/* ----- Hero ----------------------------------------------------- */
.hero {
    margin-top: var(--sp-3);
    background: linear-gradient(150deg, var(--c-header), var(--c-header-2));
    color: #fff;
    border-radius: var(--radius-lg);
    padding: var(--sp-6) var(--sp-5) var(--sp-5);
    overflow: hidden;
}
.hero-kicker {
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .7rem;
    font-weight: 700;
    color: #9fc0ff;
    margin: 0 0 var(--sp-2);
}
.hero h1 {
    color: #fff;
    font-size: 1.6rem;
    line-height: 1.2;
    margin: 0 0 var(--sp-3);
}
.hero-sub {
    color: rgba(255, 255, 255, .82);
    font-size: .95rem;
    margin: 0 0 var(--sp-5);
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
}
.hero-actions .btn-primary {
    background: #fff;
    color: var(--c-header);
    border-color: #fff;
}
.hero-actions .btn-primary:hover { background: #eef3ff; border-color: #eef3ff; }
.hero-actions .btn-ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, .5);
}
.hero-actions .btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.hero-art {
    margin: var(--sp-5) auto 0;
    max-width: 300px;
}
.hero-art svg { width: 100%; height: auto; border-radius: var(--radius); }

/* ----- Horizontal scrollers ---------------------------------------- */
.hscroll {
    display: flex;
    gap: var(--sp-3);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 2px var(--sp-4) var(--sp-3);
    scrollbar-width: none;
}
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: 0 0 auto; }

/* Category chips */
.cat-chip {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 116px;
    padding: var(--sp-4) var(--sp-3);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    color: var(--c-text);
}
.cat-chip:hover { text-decoration: none; box-shadow: var(--shadow-md); }
.cat-chip-icon {
    font-size: 1.5rem;
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    background: color-mix(in srgb, var(--cat, var(--c-primary)) 14%, transparent);
    margin-bottom: var(--sp-2);
}
.cat-chip-name { font-weight: 700; font-size: .92rem; font-family: var(--font-head); }
.cat-chip-label { font-size: .74rem; color: var(--c-muted); }

/* ----- Cards: featured ------------------------------------------- */
.fcard-stack { display: grid; gap: var(--sp-4); }

.fcard {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.fcard-media { display: block; }
.fcard-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.fcard-body { padding: var(--sp-4); }
.fcard-title {
    font-size: 1.08rem;
    margin: var(--sp-2) 0 var(--sp-2);
}
.fcard-title a { color: var(--c-text); }
.fcard-title a:hover { color: var(--c-primary); text-decoration: none; }
.fcard-excerpt {
    color: var(--c-muted);
    font-size: .9rem;
    margin: 0 0 var(--sp-3);
}

/* ----- Cards: horizontal guide ---------------------------------- */
.hcard {
    width: 232px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.hcard-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.hcard-body { padding: var(--sp-3); }
.hcard-title {
    font-size: .98rem;
    margin: var(--sp-2) 0 var(--sp-1);
}
.hcard-title a { color: var(--c-text); }
.hcard-title a:hover { color: var(--c-primary); text-decoration: none; }
.hcard-excerpt { font-size: .82rem; color: var(--c-muted); margin: 0; }

/* ----- List rows ---------------------------------------------- */
.llist { display: grid; gap: var(--sp-3); }

.lrow {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: var(--sp-3);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    padding: var(--sp-2);
    box-shadow: var(--shadow-sm);
}
.lrow-thumb { display: block; }
.lrow-img {
    width: 100%; height: 100%;
    min-height: 72px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
}
.lrow-body { min-width: 0; align-self: center; }
.lrow-title {
    font-size: .95rem;
    line-height: 1.35;
    margin: 0 0 4px;
}
.lrow-title a { color: var(--c-text); }
.lrow-title a:hover { color: var(--c-primary); text-decoration: none; }
.lrow-excerpt {
    font-size: .82rem;
    color: var(--c-muted);
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.lrow-meta {
    font-size: .74rem;
    color: var(--c-muted);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}
.lrow-cat { color: var(--cat, var(--c-primary)); font-weight: 600; }
.lrow-dot { opacity: .5; }

/* ----- Badges / meta ------------------------------------------ */
.cat-badge {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--cat, var(--c-primary));
    background: color-mix(in srgb, var(--cat, var(--c-primary)) 12%, transparent);
}
a.cat-badge--link:hover { text-decoration: none; filter: brightness(.95); }

.a-meta { font-size: .78rem; color: var(--c-muted); display: block; margin-bottom: var(--sp-3); }

/* Ads: handled by Google AdSense Auto ads (no manual slot markup / styles). */

/* ----- Breadcrumbs --------------------------------------- */
.crumbs { margin: 0 0 var(--sp-4); font-size: .78rem; }
.crumbs ol {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    color: var(--c-muted);
}
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 4px; opacity: .5; }
.crumbs li[aria-current] { color: var(--c-text); font-weight: 600; }

/* ----- Accordion (FAQ) --------------------------------- */
.faq-accordion .accordion-item {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm) !important;
    margin-bottom: var(--sp-2);
    overflow: hidden;
}
.faq-accordion .accordion-button {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .95rem;
    color: var(--c-text);
    background: var(--c-surface);
    padding: 14px var(--sp-4);
    box-shadow: none;
}
.faq-accordion .accordion-button:not(.collapsed) {
    color: var(--c-primary);
    background: color-mix(in srgb, var(--c-primary) 6%, var(--c-surface));
}
.faq-accordion .accordion-button:focus {
    box-shadow: 0 0 0 3px var(--c-ring);
    border-color: transparent;
}
.faq-accordion .accordion-body {
    padding: 0 var(--sp-4) var(--sp-4);
    font-size: .9rem;
    color: var(--c-muted);
}
/* JS-less / fallback details styling reuse */
details.faq-item {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    margin-bottom: var(--sp-2);
    padding: 12px var(--sp-4);
}
details.faq-item summary { font-weight: 600; cursor: pointer; }
details.faq-item[open] summary { color: var(--c-primary); margin-bottom: var(--sp-2); }

/* ----- Newsletter ------------------------------------- */
.newsletter {
    background: linear-gradient(150deg, var(--c-header), var(--c-header-2));
    color: #fff;
    border-radius: var(--radius-lg);
    padding: var(--sp-6) var(--sp-5);
    text-align: center;
}
.newsletter .sec-title { color: #fff; font-size: 1.15rem; }
.newsletter-sub { color: rgba(255, 255, 255, .82); font-size: .9rem; margin-bottom: var(--sp-4); }
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}
.newsletter-form input[type="email"] {
    width: 100%;
    padding: 12px var(--sp-4);
    border-radius: 999px;
    border: 1.5px solid transparent;
    font-size: .95rem;
    background: #fff;
    color: #182031;
}
.newsletter-form input[type="email"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .5);
}
.newsletter-form .btn-primary {
    background: #fff;
    color: var(--c-header);
    border-color: #fff;
}
.newsletter-msg {
    margin: 0;
    font-size: .85rem;
    min-height: 1.2em;
    color: #baf5d3;
}
.newsletter-msg.is-error { color: #ffd4d4; }
.newsletter-fine { font-size: .72rem; color: rgba(255, 255, 255, .6); margin: var(--sp-3) 0 0; }

/* ----- About block ---------------------------------- */
.about-block {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: var(--sp-5);
    font-size: .92rem;
}
.about-block p { color: var(--c-muted); }
.about-block strong { color: var(--c-text); }

/* ----- EMI widget ---------------------------------- */
.card-surface {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: var(--sp-5);
    box-shadow: var(--shadow-sm);
}
.emi-teaser .emi,
.emi-teaser .emi-results { }

.emi { display: grid; gap: var(--sp-4); }
.emi-field { display: grid; gap: var(--sp-2); }
.emi-field label { font-weight: 600; font-size: .88rem; }
.emi-field input[type="number"] {
    width: 100%;
    padding: 11px var(--sp-3);
    font-size: 1rem;
    border: 1.5px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--c-surface-2);
    color: var(--c-text);
}
.emi-field input[type="number"]:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px var(--c-ring);
}
.emi-field input[type="range"] {
    width: 100%;
    accent-color: var(--c-primary);
}
.emi-error {
    margin: 0;
    color: #c0392b;
    font-size: .85rem;
    font-weight: 600;
}

.emi-results {
    margin-top: var(--sp-5);
    display: grid;
    gap: var(--sp-3);
}
.emi-result {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
}
.emi-result--primary {
    background: color-mix(in srgb, var(--c-primary) 10%, var(--c-surface));
    border-color: color-mix(in srgb, var(--c-primary) 35%, transparent);
}
.emi-result-label { font-size: .85rem; color: var(--c-muted); font-weight: 600; }
.emi-result-value {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.15rem;
}
.emi-result--primary .emi-result-value { color: var(--c-primary); font-size: 1.4rem; }

.emi-bar {
    display: flex;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--c-border);
    margin-top: var(--sp-2);
}
.emi-bar-principal { background: var(--c-primary); }
.emi-bar-interest { background: var(--c-accent); }
.emi-bar-legend {
    display: flex;
    gap: var(--sp-4);
    font-size: .78rem;
    color: var(--c-muted);
    margin: var(--sp-2) 0 0;
}
.emi-bar-legend .dot {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 3px;
    margin-right: 5px;
}
.dot--p { background: var(--c-primary); }
.dot--i { background: var(--c-accent); }
.emi-note { font-size: .76rem; color: var(--c-muted); margin: var(--sp-3) 0 0; }

.formula {
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    padding: var(--sp-3);
    font-size: .85rem;
    overflow-x: auto;
}
.formula code { color: var(--c-text); }
.tick-list { list-style: none; padding: 0; }
.tick-list li { padding-left: 1.6em; position: relative; }
.tick-list li::before {
    content: "✓";
    position: absolute; left: 0;
    color: var(--c-accent);
    font-weight: 700;
}

/* ----- Page headings ------------------------------ */
.page-head { margin-bottom: var(--sp-4); }
.page-h1 { font-size: 1.5rem; margin-bottom: var(--sp-2); }

/* ----- Category page ----------------------------- */
.cat-hero {
    background: linear-gradient(150deg, var(--cat, var(--c-primary)), color-mix(in srgb, var(--cat, var(--c-primary)) 55%, #0b1f4d));
    color: #fff;
    border-radius: var(--radius-lg);
    padding: var(--sp-6) var(--sp-5);
    margin-bottom: var(--sp-5);
}
.cat-hero h1 { color: #fff; font-size: 1.5rem; margin: var(--sp-2) 0; }
.cat-hero p { color: rgba(255, 255, 255, .85); font-size: .9rem; margin: 0 0 var(--sp-3); }
.cat-hero-icon {
    font-size: 1.8rem;
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, .18);
}
.cat-hero-count {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
}
.empty-state {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: var(--sp-6);
    text-align: center;
    color: var(--c-muted);
}

/* ----- Pager ----------------------------------- */
.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-2);
    margin-top: var(--sp-5);
}
.pager-btn {
    font-size: .85rem;
    font-weight: 600;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1.5px solid var(--c-border);
    background: var(--c-surface);
    color: var(--c-primary);
}
.pager-btn:hover { text-decoration: none; background: var(--c-surface-2); }
.pager-btn.is-disabled { color: var(--c-muted); opacity: .5; pointer-events: none; }
.pager-status { font-size: .78rem; color: var(--c-muted); }

/* ----- Search ---------------------------------- */
.search-box {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    background: var(--c-surface);
    border: 1.5px solid var(--c-border);
    border-radius: 999px;
    padding: 4px 4px 4px var(--sp-4);
    margin-bottom: var(--sp-5);
}
.search-box:focus-within {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px var(--c-ring);
}
.search-box input {
    flex: 1;
    border: 0;
    background: transparent;
    font-size: 1rem;
    color: var(--c-text);
    padding: 10px 0;
    min-width: 0;
}
.search-box input:focus { outline: none; }
.search-box button {
    flex: 0 0 auto;
    width: 40px; height: 40px;
    border: 0;
    border-radius: 999px;
    background: var(--c-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.search-hint, .search-count { font-size: .9rem; color: var(--c-muted); }
.search-count { font-weight: 600; margin-bottom: var(--sp-3); }
.search-loading { font-size: .85rem; color: var(--c-muted); }

/* ----- Article page --------------------------- */
.art-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: var(--sp-3);
}
.art-head { margin-bottom: var(--sp-4); }
.art-title { font-size: 1.5rem; margin: var(--sp-3) 0; }
.art-lede {
    font-size: 1.02rem;
    color: var(--c-muted);
    margin-bottom: var(--sp-4);
}
.art-byline {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: .8rem;
    color: var(--c-muted);
    padding-top: var(--sp-3);
    border-top: 1px solid var(--c-border);
}
.art-author { font-weight: 700; color: var(--c-text); }

.art-figure {
    margin: 0 0 var(--sp-5);
    border-radius: var(--radius);
    overflow: hidden;
}
.art-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.art-toc {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-left: 3px solid var(--c-primary);
    border-radius: var(--radius-sm);
    padding: var(--sp-4);
    margin-bottom: var(--sp-5);
}
.art-toc h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--c-muted); margin-bottom: var(--sp-2); }
.art-toc ol { margin: 0; padding-left: 1.2em; }
.art-toc li { margin-bottom: 4px; font-size: .9rem; }

.art-body { font-size: 1.05rem; line-height: 1.7; }
.art-body h2 {
    font-size: 1.2rem;
    margin: var(--sp-6) 0 var(--sp-3);
    scroll-margin-top: calc(var(--header-h) + var(--sp-3));
}
.art-body h3 { font-size: 1.05rem; margin: var(--sp-5) 0 var(--sp-2); }
.art-body p { margin: 0 0 var(--sp-4); }
.art-body ul, .art-body ol { margin: 0 0 var(--sp-4); padding-left: 1.3em; }
.art-body li { margin-bottom: var(--sp-2); }
.art-body code {
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: 6px;
    padding: 2px 6px;
    font-size: .88em;
}
.art-body blockquote {
    margin: 0 0 var(--sp-4);
    padding: var(--sp-3) var(--sp-4);
    border-left: 3px solid var(--c-primary);
    background: var(--c-surface-2);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--c-muted);
}
.art-body a { text-decoration: underline; }

.art-keypoints {
    background: color-mix(in srgb, var(--c-accent) 8%, var(--c-surface));
    border: 1px solid color-mix(in srgb, var(--c-accent) 30%, transparent);
    border-radius: var(--radius);
    padding: var(--sp-4) var(--sp-5);
    margin: var(--sp-6) 0;
}
.art-keypoints h2 { font-size: 1.05rem; margin-bottom: var(--sp-3); }
.art-keypoints ul { margin: 0; padding-left: 1.2em; }
.art-keypoints li { font-size: .92rem; }

.art-faq, .art-related { margin: var(--sp-6) 0; }
.art-faq h2, .art-related h2 { font-size: 1.15rem; }

.art-disclaimer {
    margin: var(--sp-6) 0 0;
    padding: var(--sp-4);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--c-surface-2);
}
.art-disclaimer h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--c-muted); }
.art-disclaimer p { font-size: .82rem; color: var(--c-muted); margin: 0; }

/* ----- Generic prose (legal / about / contact) ----- */
.prose { font-size: 1rem; line-height: 1.7; }
.prose h2 { font-size: 1.15rem; margin: var(--sp-6) 0 var(--sp-2); }
.prose h3 { font-size: 1rem; margin: var(--sp-4) 0 var(--sp-2); }
.prose p, .prose li { color: var(--c-text); }
.prose ul { padding-left: 1.3em; }
.prose .muted, .doc-updated { color: var(--c-muted); font-size: .82rem; }

.info-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: var(--sp-5);
    margin-bottom: var(--sp-4);
    box-shadow: var(--shadow-sm);
}

/* Contact form */
.cform { display: grid; gap: var(--sp-4); }
.cform label { font-weight: 600; font-size: .88rem; display: block; margin-bottom: var(--sp-2); }
.cform input, .cform textarea {
    width: 100%;
    padding: 11px var(--sp-3);
    font-size: 1rem;
    border: 1.5px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--c-surface-2);
    color: var(--c-text);
    font-family: inherit;
}
.cform input:focus, .cform textarea:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px var(--c-ring);
}
.cform textarea { min-height: 120px; resize: vertical; }
.form-msg { font-size: .88rem; font-weight: 600; min-height: 1.2em; margin: 0; }
.form-msg.is-ok { color: var(--c-accent); }
.form-msg.is-error { color: #c0392b; }

/* ----- Categories index grid ---------------------- */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-3);
}
.cat-grid .cat-chip { width: auto; }

/* ----- Footer ----------------------------------- */
.app-footer {
    background: var(--c-surface);
    border-top: 1px solid var(--c-border);
    padding: var(--sp-6) var(--sp-4) var(--sp-6);
    margin-top: var(--sp-7);
}
.ftr-brand {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.1rem;
}
.ftr-brand .hdr-brand-mark { background: var(--c-primary); color: #fff; }
.ftr-tagline { color: var(--c-muted); font-size: .85rem; margin: var(--sp-2) 0 var(--sp-5); }
.ftr-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-4);
    margin-bottom: var(--sp-4);
}
.ftr-h {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--c-muted);
    margin-bottom: var(--sp-2);
}
.ftr-col ul { list-style: none; margin: 0; padding: 0; }
.ftr-col li { margin-bottom: var(--sp-2); }
.ftr-col a { color: var(--c-text); font-size: .88rem; }
.ftr-disclaimer { border-top: 1px solid var(--c-border); padding-top: var(--sp-4); }
.ftr-disclaimer p { font-size: .76rem; color: var(--c-muted); margin: 0; }
.ftr-copy {
    text-align: center;
    font-size: .78rem;
    color: var(--c-muted);
    margin: var(--sp-5) 0 0;
}

/* =====================================================================
   HOME PAGE — bold / eye-catching UI
   ===================================================================== */
.page-home .app-main > .hx,
.page-home .app-main > .qtiles { padding-left: var(--sp-4); padding-right: var(--sp-4); }

/* ---------- Hero ---------- */
.hx {
    position: relative;
    margin: var(--sp-3) 0 0;
    padding: var(--sp-7) var(--sp-5) 54px;
    border-radius: 26px;
    background: linear-gradient(160deg, #0a1b45 0%, #10256a 45%, #0b3aa0 100%);
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}
.hx-inner { position: relative; z-index: 2; }
.hx-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(28px);
    opacity: .8;
    z-index: 0;
    animation: hxFloat 14s ease-in-out infinite;
}
.hx-blob--a { width: 200px; height: 200px; top: -60px; right: -50px;
    background: radial-gradient(circle, #22d3ee, transparent 70%); }
.hx-blob--b { width: 220px; height: 220px; bottom: -90px; left: -70px;
    background: radial-gradient(circle, #34d399, transparent 70%); animation-delay: -4s; }
.hx-blob--c { width: 150px; height: 150px; top: 40%; right: -40px;
    background: radial-gradient(circle, #a855f7, transparent 70%); animation-delay: -8s; opacity: .55; }
@keyframes hxFloat {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50%      { transform: translate3d(0, -18px, 0) scale(1.08); }
}

.hx-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 var(--sp-4);
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #e0ecff;
}
.hx-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, .7);
    animation: hxPulse 2s infinite;
}
@keyframes hxPulse {
    0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); }
    70%  { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hx h1 {
    color: #fff;
    font-size: 2.15rem;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin: 0 0 var(--sp-4);
}
.hx-grad {
    background: linear-gradient(100deg, #5eead4, #38bdf8 60%, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hx-sub {
    color: rgba(255, 255, 255, .8);
    font-size: .98rem;
    line-height: 1.55;
    margin: 0 0 var(--sp-5);
    max-width: 42ch;
}

.hx-cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-6); }
.btn-xl {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 999px;
    font-weight: 700;
    font-size: .98rem;
    border: 2px solid transparent;
}
.btn-xl:hover { text-decoration: none; }
.btn-xl:active { transform: translateY(1px); }
.btn-xl--solid {
    background: #fff;
    color: #0b2a72;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .28);
}
.btn-xl--solid:hover { background: #eaf1ff; }
.btn-xl--wire { color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn-xl--wire:hover { background: rgba(255, 255, 255, .12); }

.hx-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-2);
    margin: 0;
    padding: var(--sp-3) 0 0;
    border-top: 1px solid rgba(255, 255, 255, .16);
}
.hx-stats div { text-align: center; }
.hx-stats dt {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.5rem;
    color: #fff;
    line-height: 1;
}
.hx-stats dd {
    margin: 4px 0 0;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255, 255, 255, .65);
}

/* ---------- Quick tiles (overlap hero) ---------- */
.qtiles {
    position: relative;
    z-index: 3;
    margin-top: -34px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-2);
}
.qt {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: var(--sp-4) 6px;
    border-radius: 18px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    box-shadow: var(--shadow-lg);
    color: var(--c-text);
    font-weight: 700;
}
.qt:hover { text-decoration: none; transform: translateY(-3px); transition: transform .14s ease; }
.qt-ic {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 13px;
    font-size: 1.3rem;
    background: linear-gradient(135deg, color-mix(in srgb, var(--c-primary) 16%, transparent), color-mix(in srgb, var(--c-accent) 16%, transparent));
}
.qt-t { font-family: var(--font-head); font-size: .74rem; line-height: 1.15; }

/* ---------- Apply band (animated shine) ---------- */
.applyband {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-4) var(--sp-4);
    border-radius: 20px;
    background: linear-gradient(120deg, #0f9d58, #1d4ed8 85%);
    color: #fff;
    box-shadow: 0 16px 34px color-mix(in srgb, var(--c-primary) 32%, transparent);
    border: 1px solid rgba(255, 255, 255, .2);
}
.applyband:hover { text-decoration: none; transform: translateY(-2px); transition: transform .14s ease; }
.applyband-shine {
    position: absolute;
    top: 0; left: -60%;
    width: 45%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
    transform: skewX(-18deg);
    animation: shine 3.6s ease-in-out infinite;
    z-index: 0;
}
@keyframes shine {
    0%, 60% { left: -60%; }
    100%    { left: 130%; }
}
.applyband-ic {
    position: relative; z-index: 1;
    width: 46px; height: 46px;
    flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center;
    border-radius: 13px;
    background: rgba(255, 255, 255, .18);
    font-size: 1.35rem;
}
.applyband-txt { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.applyband-txt strong { font-family: var(--font-head); font-size: 1.05rem; }
.applyband-txt small { font-size: .76rem; color: rgba(255, 255, 255, .85); }
.applyband-go {
    position: relative; z-index: 1;
    flex: 0 0 auto;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: #fff;
    color: #0b3d91;
    font-weight: 800;
}

/* ---------- Section headers: accent bar ---------- */
.page-home .sec-head .sec-title,
.page-home .about-block .sec-title,
.page-home .emi-panel .sec-title,
.page-home > .sec > .sec-title {
    position: relative;
    padding-left: 14px;
}
.page-home .sec-head .sec-title::before,
.page-home .about-block .sec-title::before,
.page-home .emi-panel .sec-title::before,
.page-home > .sec > .sec-title::before {
    content: "";
    position: absolute;
    left: 0; top: 2px; bottom: 2px;
    width: 5px;
    border-radius: 3px;
    background: linear-gradient(var(--c-primary), var(--c-accent));
}

/* ---------- Category tiles (vivid gradient) ---------- */
.cattiles-scroll { padding-top: var(--sp-1); }
.cattile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 138px;
    min-height: 150px;
    padding: var(--sp-4);
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(155deg, var(--cat), color-mix(in srgb, var(--cat) 45%, #0b1f4d));
    box-shadow: 0 10px 24px color-mix(in srgb, var(--cat) 35%, transparent);
    position: relative;
    overflow: hidden;
}
.cattile::after {
    content: "";
    position: absolute;
    right: -30px; top: -30px;
    width: 90px; height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
}
.cattile:hover { text-decoration: none; transform: translateY(-3px); transition: transform .14s ease; }
.cattile-ic {
    font-size: 1.7rem;
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 13px;
    background: rgba(255, 255, 255, .18);
    margin-bottom: auto;
    position: relative; z-index: 1;
}
.cattile-n { font-family: var(--font-head); font-weight: 700; font-size: .95rem; position: relative; z-index: 1; }
.cattile-s { font-size: .72rem; color: rgba(255, 255, 255, .82); position: relative; z-index: 1; }

/* ---------- Featured: hero post (title on image) ---------- */
.hero-post {
    position: relative;
    display: block;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--sp-4);
    color: #fff;
}
.hero-post:hover { text-decoration: none; }
.hero-post-img { width: 100%; height: 300px; object-fit: cover; display: block; }
.hero-post-scrim {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(6, 12, 30, .97) 0%, rgba(6, 12, 30, .82) 26%, rgba(6, 12, 30, .3) 60%, rgba(6, 12, 30, 0) 88%);
}
.hero-post-body {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: var(--sp-5) var(--sp-4);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.hero-post-badge {
    align-self: flex-start;
    padding: 4px 11px;
    border-radius: 999px;
    background: var(--c-primary);
    color: #fff;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.hero-post-title { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; line-height: 1.25; }
.hero-post-meta { font-size: .76rem; color: rgba(255, 255, 255, .75); }
.feat-mini { margin-top: var(--sp-2); }

/* ---------- EMI panel ---------- */
.emi-panel {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 20px;
    padding: var(--sp-5);
    box-shadow: var(--shadow-md);
}
.emi-panel-head { margin-bottom: var(--sp-4); }
.emi-panel-head .sec-title { margin-bottom: var(--sp-2); }
.emi-panel-head .sec-intro { margin-top: 0; margin-bottom: 0; }

/* ---------- About block (home) ---------- */
.page-home .about-block {
    background: linear-gradient(180deg, color-mix(in srgb, var(--c-primary) 6%, var(--c-surface)), var(--c-surface));
    border-radius: 20px;
}

/* ---------- Scroll reveal (only active once JS opts in) ---------- */
.reveal-on [data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .5s ease, transform .5s cubic-bezier(.2, .7, .2, 1);
    will-change: opacity, transform;
}
.reveal-on [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .hx-blob, .hx-dot, .applyband-shine { animation: none !important; }
    .reveal-on [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
}


/* ----- Demo loan application --------------------- */
.demo-tag {
    display: inline-block;
    vertical-align: middle;
    font-family: var(--font-sans);
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--c-accent) 18%, transparent);
    color: var(--c-accent);
    margin-left: var(--sp-2);
}

.demo-banner {
    background: color-mix(in srgb, #d97706 12%, var(--c-surface));
    border: 1px solid color-mix(in srgb, #d97706 45%, transparent);
    border-radius: var(--radius-sm);
    padding: var(--sp-3) var(--sp-4);
    font-size: .84rem;
    color: var(--c-text);
    margin-bottom: var(--sp-5);
}
.demo-banner strong { color: #b45309; }
@media (prefers-color-scheme: dark) { .demo-banner strong { color: #fbbf24; } }

.stepper {
    list-style: none;
    display: flex;
    gap: var(--sp-1);
    margin: 0 0 var(--sp-5);
    padding: 0;
    counter-reset: step;
}
.stepper li {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: .68rem;
    font-weight: 600;
    color: var(--c-muted);
    text-align: center;
    position: relative;
}
.stepper li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    border-radius: 999px;
    background: var(--c-surface-2);
    border: 1.5px solid var(--c-border);
    font-size: .8rem;
}
.stepper li::after {
    content: "";
    position: absolute;
    top: 13px;
    left: calc(50% + 18px);
    right: calc(-50% + 18px);
    height: 2px;
    background: var(--c-border);
}
.stepper li:last-child::after { display: none; }
.stepper li.is-active { color: var(--c-primary); }
.stepper li.is-active span { border-color: var(--c-primary); color: var(--c-primary); background: color-mix(in srgb, var(--c-primary) 10%, var(--c-surface)); }
.stepper li.is-done span { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.stepper li.is-done::after { background: var(--c-primary); }

.apply-step { display: none; border: 0; padding: 0; margin: 0; min-inline-size: 0; }
.apply-step.is-active { display: block; }

.apply-field { margin-bottom: var(--sp-4); }
.apply-field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: var(--sp-2); }
.apply-field input,
.apply-field select {
    width: 100%;
    padding: 11px var(--sp-3);
    font-size: 1rem;
    font-family: inherit;
    border: 1.5px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--c-surface-2);
    color: var(--c-text);
}
.apply-field input:focus,
.apply-field select:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px var(--c-ring);
}
.apply-field input[aria-invalid],
.apply-field select[aria-invalid] { border-color: #c0392b; }
.apply-field-error { margin: var(--sp-2) 0 0; font-size: .8rem; font-weight: 600; color: #c0392b; }

.apply-estimate {
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    padding: var(--sp-3) var(--sp-4);
    font-size: .88rem;
    margin: 0 0 var(--sp-4);
}
.apply-estimate strong { color: var(--c-primary); }
.apply-estimate-note { display: block; font-size: .74rem; color: var(--c-muted); margin-top: 4px; }

.apply-fine, .apply-ref-note, .apply-estimate-note { color: var(--c-muted); }
.apply-fine { font-size: .78rem; margin: 0 0 var(--sp-4); }

.apply-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    margin-top: var(--sp-5);
}
.apply-nav .btn-primary { flex: 1; }
.apply-nav .btn-block-ghost { flex: 1; margin: 0; }
.apply-nav > span { flex: 1; }

.apply-review-h { font-size: 1.05rem; }
.apply-review { margin: 0 0 var(--sp-4); }
.apply-review-row {
    display: flex;
    justify-content: space-between;
    gap: var(--sp-3);
    padding: 10px 0;
    border-bottom: 1px solid var(--c-border);
}
.apply-review-row dt { color: var(--c-muted); font-size: .85rem; }
.apply-review-row dd { margin: 0; font-weight: 600; font-size: .9rem; text-align: right; }

.apply-consent {
    display: flex;
    gap: var(--sp-3);
    align-items: flex-start;
    font-size: .82rem;
    color: var(--c-muted);
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    padding: var(--sp-3) var(--sp-4);
    margin-bottom: var(--sp-3);
}
.apply-consent input { margin-top: 3px; flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--c-primary); }

.apply-error { margin: 0 0 var(--sp-3); color: #c0392b; font-weight: 600; font-size: .85rem; }

.apply-result {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: var(--sp-6) var(--sp-5);
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.apply-result-icon {
    width: 52px; height: 52px;
    margin: 0 auto var(--sp-3);
    border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--c-accent) 16%, transparent);
    color: var(--c-accent);
    font-size: 1.6rem;
    font-weight: 800;
}
.apply-result h2 { font-size: 1.2rem; }
.apply-result p { font-size: .9rem; color: var(--c-muted); }
.apply-result p strong { color: var(--c-text); }
.apply-ref {
    font-family: var(--font-head);
    background: var(--c-surface-2);
    border: 1px dashed var(--c-border);
    border-radius: var(--radius-sm);
    padding: var(--sp-3);
    font-size: .9rem;
    word-break: break-all;
}
.apply-ref-note { display: block; font-size: .72rem; font-family: var(--font-sans); }
.apply-result-links { display: grid; gap: var(--sp-2); margin: var(--sp-4) 0; }
.apply-result-links .btn-block-ghost { margin: 0; }
.apply-result #applyRestart { width: 100%; }

/* ----- Motion preferences --------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ----- Wider phones / small tablets ----------- */
@media (min-width: 431px) {
    body { padding: 0; }
}
