:root {
    --navy: #082f49;
    --blue: #075985;
    --cyan: #0891b2;
    --sky: #e0f2fe;
    --green: #16a34a;
    --ink: #102a3a;
    --muted: #5f7180;
    --line: #dbe7ee;
    --surface: #f4f9fc;
    --white: #fff;
    --shadow: 0 24px 60px rgba(2, 42, 67, .15);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--white);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.7;
}
a { color: inherit; }
img { max-width: 100%; }
button, input { font: inherit; }
.container { width: min(1140px, calc(100% - 40px)); margin-inline: auto; }
.narrow { width: min(820px, calc(100% - 40px)); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(219,231,238,.9);
}
.nav-wrap { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: var(--white);
    background: linear-gradient(145deg, var(--cyan), var(--blue));
    border-radius: 13px;
    font-size: 22px;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(8,145,178,.25);
}
.brand strong, .brand small { display: block; line-height: 1.25; }
.brand strong { font-size: 16px; }
.brand small { color: var(--muted); font-size: 11px; letter-spacing: .02em; }
.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a { color: #3e5665; font-size: 14px; font-weight: 600; text-decoration: none; }
.main-nav a:hover { color: var(--cyan); }
.menu-toggle { display: none; padding: 8px; border: 0; background: transparent; cursor: pointer; }
.menu-toggle span { display: block; width: 24px; height: 2px; margin: 5px; background: var(--navy); }

.hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background:
        linear-gradient(118deg, rgba(3,37,60,.98), rgba(7,89,133,.93)),
        radial-gradient(circle at 10% 20%, #0891b2, transparent 50%);
    padding: 92px 0 96px;
}
.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 80px;
    background: linear-gradient(to right bottom, transparent 49%, var(--white) 50%);
}
.hero-glow { position: absolute; border-radius: 50%; filter: blur(4px); opacity: .16; }
.hero-glow-one { width: 380px; height: 380px; background: #67e8f9; right: -120px; top: -160px; }
.hero-glow-two { width: 260px; height: 260px; background: #38bdf8; left: 32%; bottom: -180px; }
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.06fr .94fr; align-items: center; gap: 70px; }
.eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    color: #a5f3fc;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.eyebrow.dark { color: var(--cyan); }
.hero h1 { max-width: 620px; margin: 0 0 20px; font-size: clamp(42px, 5vw, 68px); line-height: 1.06; letter-spacing: -.045em; }
.hero-copy > p { max-width: 610px; margin: 0 0 26px; color: #d8edf6; font-size: 18px; }
.hero-points { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; color: #d8edf6; }
.hero-points span { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; color: #083344; background: #67e8f9; border-radius: 50%; font-size: 12px; font-weight: 900; }

.bill-card {
    position: relative;
    padding: 36px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 24px;
    box-shadow: var(--shadow);
}
.card-icon { position: absolute; top: -24px; right: 28px; width: 55px; height: 55px; display: grid; place-items: center; background: #facc15; border: 6px solid var(--white); border-radius: 50%; font-size: 22px; }
.bill-card h2 { margin: 0 0 4px; font-size: 26px; line-height: 1.25; }
.card-intro { margin: 0 0 24px; color: var(--muted); font-family: "Noto Nastaliq Urdu", serif; }
.bill-card label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.input-wrap { position: relative; }
.input-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #7b909d; font-weight: 800; }
.input-wrap input {
    width: 100%;
    height: 56px;
    padding: 0 16px 0 42px;
    color: var(--ink);
    background: #f8fbfc;
    border: 1px solid #cbdde6;
    border-radius: 12px;
    outline: none;
    letter-spacing: .08em;
}
.input-wrap input:focus { background: var(--white); border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(8,145,178,.12); }
.input-wrap input.invalid { border-color: #dc2626; box-shadow: 0 0 0 4px rgba(220,38,38,.09); }
#refHelp { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; }
.form-error { min-height: 21px; margin: 5px 0 8px; color: #c81e1e; font-size: 12px; font-weight: 600; }
.primary-button, .light-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 54px;
    padding: 0 24px;
    color: var(--white);
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    border: 0;
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(7,89,133,.2);
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}
.bill-card .primary-button { width: 100%; }
.primary-button:hover, .light-button:hover { transform: translateY(-2px); box-shadow: 0 15px 28px rgba(7,89,133,.28); }
.primary-button:disabled { opacity: .7; cursor: wait; transform: none; }
.privacy-note { margin: 15px 0 0; color: #71818c; text-align: center; font-size: 11px; }

.trust-strip { position: relative; z-index: 3; margin-top: -4px; padding: 26px 0 28px; border-bottom: 1px solid var(--line); }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.trust-grid > div { padding: 4px 30px; text-align: center; border-right: 1px solid var(--line); }
.trust-grid > div:last-child { border: 0; }
.trust-grid strong, .trust-grid span { display: block; }
.trust-grid strong { color: var(--blue); font-size: 14px; }
.trust-grid span { color: var(--muted); font-size: 12px; }

.section { padding: 90px 0; }
.soft-section { background: var(--surface); }
.section-heading { max-width: 700px; margin: 0 auto 46px; text-align: center; }
.section-heading h2, .content-grid h2 { margin: 0 0 14px; font-size: clamp(30px, 4vw, 44px); line-height: 1.18; letter-spacing: -.035em; }
.section-heading p, .content-grid p { color: var(--muted); }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step-card {
    position: relative;
    min-height: 285px;
    padding: 32px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(2,42,67,.06);
}
.step-card:hover { border-color: #aadce9; transform: translateY(-4px); transition: .25s ease; }
.step-number { position: absolute; top: 25px; right: 26px; color: #d9e9ef; font-size: 42px; font-weight: 800; line-height: 1; }
.feature-icon { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 24px; color: var(--blue); background: var(--sky); border-radius: 14px; font-size: 24px; }
.step-card h3, .details-grid h3 { margin: 0 0 8px; font-size: 18px; }
.step-card p, .details-grid p { margin: 0; color: var(--muted); font-size: 14px; }

.content-grid { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 70px; }
.content-grid > div > p { margin: 0 0 16px; }
.info-panel { padding: 32px; background: var(--white); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 16px 44px rgba(2,42,67,.08); }
.info-panel h3 { margin-top: 0; }
.info-panel > p { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.sample-bill { position: relative; padding: 25px; overflow: hidden; background: #f8fafc; border: 1px dashed #8db8c8; border-radius: 12px; }
.sample-bill::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 19px, rgba(7,89,133,.035) 20px); }
.sample-bill span, .sample-bill strong { position: relative; z-index: 1; display: block; }
.sample-bill span { color: var(--muted); font-size: 10px; letter-spacing: .12em; }
.sample-bill strong { color: var(--blue); font-size: clamp(18px, 3vw, 24px); letter-spacing: .08em; }

.details-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.details-grid article { display: flex; gap: 18px; padding: 24px; border: 1px solid var(--line); border-radius: 15px; }
.details-grid article > span { font-size: 25px; }
.faq-section { background: #fbfdfe; }
.faq-list { display: grid; gap: 12px; }
.faq-list details { background: var(--white); border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 6px 18px rgba(2,42,67,.04); }
.faq-list summary { position: relative; padding: 20px 54px 20px 22px; font-weight: 700; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; top: 16px; right: 22px; color: var(--cyan); font-size: 26px; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { margin: 0; padding: 0 22px 22px; color: var(--muted); font-size: 14px; }

.cta-section { padding: 58px 0; color: var(--white); background: linear-gradient(120deg, var(--blue), var(--cyan)); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.cta-inner h2 { margin: 0; font-size: 32px; }
.cta-inner p { margin: 2px 0 0; color: #cffafe; }
.light-button { color: var(--blue); background: var(--white); box-shadow: none; }

.site-footer { padding: 62px 0 22px; color: #c2d3dc; background: #062538; }
.footer-grid { display: grid; grid-template-columns: 1.3fr .65fr 1fr; gap: 70px; }
.footer-brand { color: var(--white); }
.footer-brand small { color: #9bb3bf; }
.footer-grid > div:first-child > p { max-width: 390px; }
.footer-grid h3 { margin: 4px 0 17px; color: var(--white); font-size: 15px; }
.footer-grid p, .footer-grid a { display: block; color: #9fb5c0; font-size: 13px; text-decoration: none; }
.footer-grid a { margin: 8px 0; }
.footer-grid a:hover { color: #67e8f9; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 45px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: 11px; }

.result-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--surface); }
.result-main { flex: 1; display: grid; place-items: center; padding: 70px 20px; }
.result-card { width: min(600px, 100%); padding: 50px; text-align: center; background: var(--white); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.result-card h1 { margin: 0 0 12px; font-size: clamp(30px, 5vw, 42px); line-height: 1.15; }
.result-card p { color: var(--muted); }
.urdu-line { font-family: "Noto Nastaliq Urdu", serif; font-size: 18px; }
.status-icon { width: 72px; height: 72px; display: grid; place-items: center; margin: 0 auto 22px; border-radius: 50%; font-size: 34px; font-weight: 800; }
.loading-icon { position: relative; background: var(--sky); }
.loading-icon span { width: 34px; height: 34px; border: 4px solid #a5d7e7; border-top-color: var(--cyan); border-radius: 50%; animation: spin 1s linear infinite; }
.success-icon { color: var(--white); background: var(--green); box-shadow: 0 10px 26px rgba(22,163,74,.25); }
.error-icon { color: var(--white); background: #dc2626; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress-track { height: 8px; margin-top: 24px; overflow: hidden; background: #e9f0f3; border-radius: 20px; }
.progress-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--blue)); border-radius: inherit; transition: width 5s linear; }
.reference-display { margin: 22px 0; padding: 15px; background: var(--surface); border-radius: 10px; }
.reference-display strong { display: block; color: var(--blue); font-size: 20px; letter-spacing: .08em; }
.result-button { width: 100%; }
.text-link { display: inline-block; margin-top: 20px; color: var(--blue); font-size: 13px; font-weight: 700; text-decoration: none; }
.result-note { margin: 28px 0 0; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12px; }
.mini-footer { padding: 18px; color: var(--muted); text-align: center; font-size: 11px; }

.bill-view-page { min-height: 100vh; margin: 0; background: #eaf2f6; }
.bill-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 12px max(20px, calc((100% - 1140px) / 2));
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 5px 20px rgba(2,42,67,.08);
}
.bill-toolbar-actions { display: flex; gap: 10px; }
.toolbar-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    color: var(--white);
    background: var(--blue);
    border: 1px solid var(--blue);
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.toolbar-button.secondary { color: var(--blue); background: var(--white); }
.bill-view-main { padding: 22px; }
.bill-source-note { max-width: 1100px; margin: 0 auto 10px; color: var(--muted); font-size: 11px; text-align: center; }
.bill-frame {
    width: min(1100px, 100%);
    min-height: 1200px;
    display: block;
    margin: 0 auto;
    background: var(--white);
    border: 0;
    border-radius: 12px;
    box-shadow: 0 18px 45px rgba(2,42,67,.13);
}
.lookup-error {
    width: min(580px, 100%);
    margin: 60px auto;
    padding: 45px;
    text-align: center;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
}
.lookup-error h1 { margin-bottom: 8px; }
.lookup-error p { color: var(--muted); }

@media (max-width: 850px) {
    .menu-toggle { display: block; }
    .main-nav {
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;
        display: none;
        padding: 18px 20px 24px;
        background: var(--white);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 14px 24px rgba(2,42,67,.08);
    }
    .main-nav.open { display: grid; }
    .hero { padding-top: 65px; }
    .hero-grid, .content-grid { grid-template-columns: 1fr; gap: 46px; }
    .hero-copy { text-align: center; }
    .hero-copy > p { margin-inline: auto; }
    .hero-points { justify-content: center; text-align: left; }
    .steps-grid { grid-template-columns: 1fr; }
    .trust-grid { grid-template-columns: 1fr; gap: 16px; }
    .trust-grid > div { border-right: 0; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
    .footer-grid > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 590px) {
    .container, .narrow { width: min(100% - 28px, 1140px); }
    .hero { padding: 54px 0 86px; }
    .hero h1 { font-size: 40px; }
    .hero-copy > p { font-size: 16px; }
    .bill-card { padding: 28px 22px; }
    .section { padding: 68px 0; }
    .details-grid, .footer-grid { grid-template-columns: 1fr; }
    .footer-grid > div:first-child { grid-column: auto; }
    .cta-inner, .footer-bottom { align-items: flex-start; flex-direction: column; }
    .light-button { width: 100%; }
    .result-card { padding: 38px 22px; }
    .bill-toolbar { position: static; align-items: flex-start; flex-direction: column; }
    .bill-toolbar-actions { width: 100%; }
    .toolbar-button { flex: 1; padding-inline: 10px; }
    .bill-view-main { padding: 12px; }
    .lookup-error { margin: 25px auto; padding: 34px 22px; }
}

@media print {
    .bill-toolbar, .bill-source-note { display: none !important; }
    .bill-view-main { padding: 0; }
    .bill-frame { width: 100%; min-height: 1400px; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
