:root {
    --bg: #d1e2f9;
    --panel: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --soft: #eef6ff;
    --brand1: #164e63;
    --brand2: #22c7b8;
    --brand3: #7c3aed;
    --user: #e9f2ff;
    --shadow: 0 18px 45px rgba(15, 23, 42, .09);
    --blue: #007bff;
    --green: #28a745;
    --yellow: #ffc107;
    --red: #dc3545;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    font-family: "Segoe UI", Arial, sans-serif;
    background: radial-gradient(circle at top left, rgba(34, 199, 184, .12), transparent 34%), radial-gradient(circle at top right, rgba(124, 58, 237, .10), transparent 30%), var(--bg);
    color: var(--text);
}

form {
    min-height: 100vh;
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid rgba(229, 231, 235, .75);
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    letter-spacing: .1px;
}

.logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    box-shadow: 0 10px 22px rgba(34, 199, 184, .20);
    animation: floatIn .55s ease both;
}

.brand-title {
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #690C0C;
}

.login-area {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #374151;
    font-size: 14px;
}

.login-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: white;
    font-weight: 700;
    background: linear-gradient(135deg, var(--brand1), var(--brand3));
    box-shadow: 0 10px 24px rgba(22, 78, 99, .20);
}

.main {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 28px 16px 140px;
    flex: 1;
}

.hero {
    text-align: center;
    padding-top: 8vh;
        animation: rise .55s ease both;
}

.hero-tplogo {
    height: 90px;
    margin: 0 auto 20px;
    filter: drop-shadow(0 20px 26px rgba(34, 199, 184, .22));
    display: grid;
    place-items: center;
    animation: floatOrb 3s ease-in-out infinite;
}

.hero-logo {
    width: 82px;
    height: 82px;
    margin: 0 auto 20px;
    filter: drop-shadow(0 20px 26px rgba(34, 199, 184, .22));
}

.hero h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.05;
    font-weight: 760;
    letter-spacing: -1.8px;
    background: linear-gradient(90deg, #164e63, #22c7b8, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    margin: 16px auto 0;
    max-width: 650px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
}

.chip {
    border: 1px solid var(--border);
    background: rgba(255,255,255,.84);
    color: #334155;
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 14px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, .05);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

    .chip:hover {
        transform: translateY(-2px);
        border-color: rgba(34, 199, 184, .55);
        box-shadow: 0 16px 32px rgba(15, 23, 42, .08);
    }

.chat-stream {
    width: 100%;
    padding-top: 12px;
}

.message-row {
    display: flex;
    margin: 4px 0;
    animation: none;
}

    .message-row.animate-in {
        animation: messageIn .18s ease both;
    }

    /* Animate only new messages, not the whole stream on every UpdatePanel refresh */
    .message-row.new-message {
        animation: messageIn .28s ease both;
    }

.assistant-row {
    justify-content: flex-start;
}

.user-row {
    justify-content: flex-end;
}

.message-inner {
    display: flex;
    gap: 6px;
    max-width: min(900px, 100%);
}

.user-row .message-inner {
    flex-direction: row-reverse;
}

.avatar {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    font-size: 9px;
    font-weight: 800;
    margin-top: 0;
}


.assistant-avatar {
    background: linear-gradient(135deg, var(--brand1), var(--brand2));
    color: white;
    box-shadow: 0 10px 24px rgba(34, 199, 184, .18);
}

.user-avatar {
    background: linear-gradient(135deg, #334155, #64748b);
    color: white;
}

.bubble {
    position: relative;
    border-radius: 12px;
    padding: 6px 14px;
    border: 1px solid #edf2f7;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .03);
    line-height: 1.5;
    font-size: 16px;
}

    .bubble ul {
        margin: 5px 0 3px 18px;
        padding: 0;
    }

    .bubble li {
        margin: 2px 0;
    }

    .bubble p {
        margin: 4px 0;
    }

    .bubble b,
    .bubble strong {
        font-weight: 700;
    }

.assistant-bubble {
    background: rgba(255,255,255,.97);
}

.user-bubble {
    background: #edf6ff;
    border-color: #dbeafe;
}

.sender {
    font-size: 12px;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 1px;
}



.copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    border: 1px solid var(--border);
    text-decoration: none;
    background: #fff;
    color: #475569;
}

    .copy-btn:hover {
        transform: translateY(-1px);
        background: #f8fafc;
        border-color: rgba(34, 199, 184, .55);
    }

.copy-glyph {
    width: 17px;
    height: 19px;
    display: inline-block;
    position: relative;
}

    .copy-glyph:before,
    .copy-glyph:after {
        content: "";
        position: absolute;
        border: 1.8px solid currentColor;
        border-radius: 3px;
        width: 10px;
        height: 10px;
        background: transparent;
    }

    .copy-glyph:before {
        left: 4px;
        top: 1px;
        opacity: .65;
    }

    .copy-glyph:after {
        left: 0;
        top: 5px;
        background: #fff;
    }

.copy-wrap {
    margin-top: 3px;
}

.thinking-box {
    min-width: 180px;
}

.thinking-line {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #334155;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.2;
}

.pulse-orb {
    width: 7px;
    height: 7px;
}

.dots {
    display: inline-flex;
    gap: 3px;
    margin-left: 1px;
}

    .dots span {
        width: 4px;
        height: 4px;
    }

        .dots span:nth-child(2) {
            animation-delay: .14s;
        }

        .dots span:nth-child(3) {
            animation-delay: .28s;
        }

.stage-processing {
    color: #164e63;
}

.stage-analyzing {
    color: #6d28d9;
}

.stage-working {
    color: #047857;
}

.stage-finalizing {
    color: #b45309;
}

.composer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 50px;
    z-index: 30;
    display: flex;
    justify-content: center;
    padding: 0 16px;
    pointer-events: none;
}

.composer-card {
    pointer-events: auto;
    width: min(900px, 100%);
    background: #eef7ff;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 12px;
    backdrop-filter: blur(18px);
}

.input-wrap {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: end;
}

.question-box {
    width: 100%;
    min-height: 46px;
    max-height: 120px;
    border: 1px solid rgba(150, 180, 221, .95);
    outline: none;
    resize: none;
    padding: 12px 14px;
    border-radius: 18px;
    background: #f8fafc;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    line-height: 1.5;
}

    .question-box:disabled {
        opacity: .65;
    }

.composer-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.send-btn,
.reset-btn {
    border: 0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border-radius: 16px;
    font-weight: 750;
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
    padding-bottom: 2px;
}

.send-btn {
    width: 48px;
    color: white;
    background: linear-gradient(135deg, var(--brand1), var(--brand2));
    box-shadow: 0 12px 24px rgba(34, 199, 184, .25);
    font-size: 19px;
}

.reset-btn {
    padding: 0 14px;
    color: #475569;
    background: #e6e6e6;
}

    .send-btn:hover,
    .reset-btn:hover {
        transform: translateY(-1px);
    }

.send-btn.disabled {
    opacity: .55;
    pointer-events: none;
}

.notice {
    display: flex;
    margin-top: 8px;
    padding-left: 6px;
    color: var(--muted);
    font-size: 12px;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 112px;
    transform: translateX(-50%) translateY(16px);
    background: #0f172a;
    color: white;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 100;
}

    .toast.show {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatOrb {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: scale(.92) rotate(-4deg);
    }

    to {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

@keyframes messageIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.99);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulseOrb {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 199, 184, .40);
    }

    80% {
        box-shadow: 0 0 0 12px rgba(34, 199, 184, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34, 199, 184, 0);
    }
}

@keyframes dotBounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: .45;
    }

    40% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

@media (max-width: 640px) {
    .topbar {
        padding: 0 14px;
    }

    .brand-title {
        font-size: 22px;
        display: flex;
        align-items: center;
        gap: 7px;
        color: #690C0C;
    }

    /* .login-area span {
                display: none;
            }*/

    .main {
        padding-left: 12px;
        padding-right: 12px;
    }

    .bubble {
        max-width: calc(100vw - 88px);
    }

    .chat-stream {
        width: 100%;
        padding-top: 12px;
        margin-bottom: 74px;
    }

    .input-wrap {
        grid-template-columns: 1fr;
    }

    .composer-actions {
        justify-content: space-between;
    }

    .reset-btn {
        flex: 1;
    }

    .send-btn {
        flex: 0 0 54px;
    }
}

.stream-cursor {
    display: inline-block;
    width: 6px;
    height: 13px;
    margin-left: 2px;
    background: #164e63;
    vertical-align: -2px;
    animation: cursorBlink .85s infinite;
}

@keyframes cursorBlink {
    0%, 45% {
        opacity: 1;
    }

    46%, 100% {
        opacity: 0;
    }
}

/*taxpub-access-box*/
.taxpub-access-box {
    max-width: 760px;
    margin: 10px auto;
    padding: 20px 20px;
    border-radius: 18px;
    /* background: linear-gradient(135deg, #f8fbff 0%, #eef5ff 100%);*/
    /* border: 1px solid #dbeafe;*/
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    font-family: Arial, sans-serif;
    color: #1e293b;
    line-height: 1.6;
}

    .taxpub-access-box p {
        margin: 0 0 14px;
        font-size: 15px;
    }

    .taxpub-access-box .taxpub-logfail-title {
        font-size: 20px;
        font-weight: 700;
        color: #0f172a;
        margin-bottom: 10px;
    }

    .taxpub-access-box a {
        text-decoration: none !important;
        font-weight: 600;
        color: #2B7FFF;
    }

        .taxpub-access-box a:hover {
            color: #1d4ed8;
        }

.taxpub-actions {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

    .taxpub-actions a {
        display: inline-block;
        padding: 9px 14px;
        border-radius: 30px;
        background: #ffffff;
        border: 1px solid #bfdbfe;
        color: #1d4ed8;
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
        text-decoration: none;
    }

        .taxpub-actions a.buy {
            background: #2563eb;
            color: #ffffff;
            border-color: #2563eb;
        }

.taxpub-demo-note {
    margin-top: 16px !important;
    padding-top: 14px;
    border-top: 1px dashed #bfdbfe;
    color: #475569;
    font-size: 14px !important;
}
/* Domain toggle switch buttons */
.domain-toggle-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
}

.domain-toggle {
    position: relative;
    display: inline-block;
}

    /* Hide actual radio button */
    .domain-toggle input[type="radio"] {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    /* Main pill button */
    .domain-toggle label {
        position: relative;
        min-width: 165px;
        height: 42px;
        padding: 0 42px 4px 42px;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        user-select: none;
        text-decoration: none;
        font-size: 16px;
        font-weight: 700;
        color: #334155;
        border: 1px solid rgba(148, 163, 184, .35);
        box-shadow: 0 10px 25px rgba(15, 23, 42, .06);
        transition: background-color .22s ease, transform .18s ease, box-shadow .18s ease, border-color .18s ease, color .18s ease;
    }

        /* Toggle knob */
        .domain-toggle label::before {
            content: "";
            position: absolute;
            left: 8px;
            top: 50%;
            width: 26px;
            height: 26px;
            border-radius: 50%;
            background: #ffffff;
            transform: translateY(-50%);
            box-shadow: 0 4px 12px rgba(15, 23, 42, .18);
            transition: left .24s cubic-bezier(.4, 0, .2, 1), box-shadow .18s ease, transform .18s ease;
        }

        /* Hover animation */
        .domain-toggle label:hover {
            transform: translateY(-2px);
            box-shadow: 0 16px 32px rgba(15, 23, 42, .10);
        }

    /* Focus style */
    .domain-toggle input[type="radio"]:focus + label {
        outline: 3px solid rgba(59, 130, 246, .22);
        outline-offset: 2px;
    }

    /* Move knob when ON */
    .domain-toggle input[type="radio"]:checked + label::before {
        left: calc(100% - 34px);
        box-shadow: 0 5px 14px rgba(15, 23, 42, .25);
        background: #ff8080;
    }

    /* Slight press animation when checked */
    .domain-toggle input[type="radio"]:checked + label {
        transform: translateY(-1px);
    }

/* OFF background colors - very light */
.domain-blue label {
    background: #eef7ff;
    border-color: #cfe8ff;
}

.domain-green label {
    background: #effcf5;
    border-color: #c9f3dc;
}

.domain-yellow label {
    background: #fffbe8;
    border-color: #f8e7a3;
}

.domain-orange label {
    background: #fff3e8;
    border-color: #ffd7b5;
}

/* ON background colors - little darker */
.domain-blue input[type="radio"]:checked + label {
    background: #007ae6;
    border-color: #8ec8ff;
    color: #ffffff;
}

.domain-green input[type="radio"]:checked + label {
    background: #1d9655;
    border-color: #85d9a8;
    color: #ffffff;
}

.domain-yellow input[type="radio"]:checked + label {
    background: #ccaa00;
    border-color: #e9c84f;
    color: #ffffff;
}

.domain-orange input[type="radio"]:checked + label {
    background: #e66f00;
    border-color: #f6a762;
    color: #ffffff;
}

/* Mobile */
@media (max-width: 640px) {
    .domain-toggle-group {
        gap: 8px;
    }

    .domain-toggle label {
        min-width: 145px;
        height: 46px;
        font-size: 13px;
        padding: 0 38px;
    }
}

.imagelaws {
    display: inline-flex;
    float: right;
    border-radius: 5px;
    margin-right: 12px;
}

.fixedbottomright {
    position: fixed;
    bottom: 7px;
    right: 7px;
    z-index: 1000;
}

.brand-orb {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: conic-gradient( from 180deg, var(--blue), var(--green), var(--yellow), var(--red), var(--blue) );
    position: relative;
    animation: slowSpin 7s linear infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .brand-orb:after {
        content: "";
        position: absolute;
        inset: 4px;
        background: white;
        border-radius: 50%;
        z-index: 101;
    }

    .brand-orb span {
        z-index: 102;
        font-size: 12px;
        line-height: 1;
        color: var(--blue);
        animation: reverseSpin 7s linear infinite;
    }

@keyframes slowSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes reverseSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(-360deg);
    }
}


.footer-top-right-corner-btn {
    position: absolute;
    top: 8px; /* Padding distance from the top edge of the footer */
    right: 16px; /* Padding distance from the right edge of the footer */
    width: 22px; /* Small, clean size constraint */
    height: 22px; /* Small, clean size constraint */
    cursor: pointer;
    z-index: 30; /* Ensures it sits above any cards or inputs inside the footer */
    opacity: 0.75;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

    /* Interactive hover feedback */
    .footer-top-right-corner-btn:hover {
        opacity: 1;
        transform: scale(1.1);
    }

@media (max-height: 1440px) {
    .composer {
        bottom: 50px;
    }

    .hero {
        padding-top: 60px;
    }
}

@media (max-height: 1080px) {
    .composer {
        bottom: 30px;
    }
    .hero {
        padding-top: 30px;
    }
}

@media (max-height: 768px) {
    .main {
              padding: 16px 16px 140px;
           }

    .composer {
        bottom: 6px;
    }

    .hero{
        padding-top: 5px;
    }
}