@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700&display=swap');

:root {
    --forest: #175a83;
    --forest-2: #0796a5;
    --mint: #d9f0f2;
    --mint-soft: #edf8fa;
    --cream: #f3f7f9;
    --paper: #fbfdfe;
    --ink: #576b7a;
    --muted: #617782;
    --line: #d9e6eb;
    --shadow: 0 18px 50px rgba(13, 73, 102, .10);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
html { font-size: 80%; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--cream);
    font-family: "DM Sans", system-ui, sans-serif;
    font-size: 1.15rem;
}
button, textarea, select { font: inherit; }
button { color: inherit; }
.sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
.language-switcher {
    position: static;
    height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 6px;
    border: 1px solid rgba(20,98,119,.22);
    border-radius: 9px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 4px 16px rgba(13,73,102,.08);
}
.language-switcher img { width: 23px; height: 17px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.10); }
.language-switcher select { width: 92px; min-width: 0; padding: 2px 18px 2px 2px; border: 0; outline: 0; color: #174b63; background: transparent; font-size: .9rem; cursor: pointer; }
.app-shell { width: 100%; max-width: 1000px; min-height: 100vh; margin: 0 auto; background: var(--paper); box-shadow: 0 0 0 1px rgba(217,230,235,.65); }
.is-framed .app-shell { max-width: none; box-shadow: none; }
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 28px 22px 22px;
    overflow: hidden;
    color: #173e52;
    background: #fff;
}
.sidebar::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 232px;
    right: 0;
    bottom: 0;
    left: 0;
    background:
        radial-gradient(circle at 8% 90%, rgba(55, 198, 204, .17), transparent 40%),
        linear-gradient(180deg, #effbfc 0%, #ddf5f6 48%, #c7ecef 100%);
}
.sidebar > * {
    position: relative;
    z-index: 1;
}
.brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}
.brand-image {
    display: block;
    width: auto;
    height: 58px;
    max-width: 210px;
    object-fit: contain;
    filter: drop-shadow(0 8px 14px rgba(13, 77, 104, .10));
}
.brand-title { display: none; }
.brand-mark, .clara-avatar, .avatar-small {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    font: 700 1.7rem "Manrope", sans-serif;
    color: var(--forest);
    background: linear-gradient(145deg, #f9feff, #ccecf0);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
}
.brand-mark { width: 44px; height: 44px; }
.brand strong, .brand small { display: block; }
.brand strong { color: #123c5a; font: 700 1.7rem "Manrope", sans-serif; }
.brand small { margin-top: 2px; color: #52798a; font-size: .95rem; }
.new-chat {
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 8px 11px;
    border: 1px solid rgba(20, 98, 119, .23);
    border-radius: 10px;
    color: #174b63;
    background: rgba(255,255,195,.8);
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    font-size: 1.2rem;
    line-height: 1.15;
    margin-right: 0;
}
.new-chat:hover { border-color: rgba(8, 127, 140, .42); background: rgba(255,255,255,.9); }
.new-chat span { display: inline-block; margin-right: 5px; font-size: 1.1rem; line-height: 1; }
.topics { min-height: 0; overflow-y: auto; }
.topics p { margin: 0 10px 9px; color: #598494; font-size: .85rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.topics button {
    display: block;
    width: 100%;
    padding: 10px;
    border: 0;
    border-radius: 9px;
    color: #214e61;
    background: transparent;
    text-align: left;
    cursor: pointer;
}
.topics button:hover { background: rgba(255,255,255,.68); color: #087582; }
.status-card {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: auto;
    padding: 13px;
    border: 1px solid rgba(22, 112, 130, .18);
    border-radius: 12px;
    background: rgba(255,255,255,.5);
}
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #d9a94b; box-shadow: 0 0 0 4px rgba(217,169,75,.12); }
.status-dot.online { background: #75d5a4; box-shadow: 0 0 0 4px rgba(117,213,164,.12); }
.status-dot.offline { background: #e47d6e; }
.status-card strong, .status-card small { display: block; }
.status-card strong { font-size: .95rem; }
.status-card small { margin-top: 2px; color: #668895; font-size: .8rem; }
.materials-link {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 9px 12px;
    border-radius: 9px;
    color: #285b6d;
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
}
.materials-link:hover { color: #087582; background: rgba(255,255,255,.65); }
.chat { min-width: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); }
.topbar {
    min-height: 54px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 18px;
    padding: 8px 22px;
    border-bottom: 1px solid var(--line);
    background: rgba(255,254,250,.94);
    backdrop-filter: blur(12px);
}
.topbar strong, .topbar span { display: block; }
.topbar strong { font: 700 1.15rem "Manrope", sans-serif; }
.topbar div span { margin-top: 2px; color: var(--muted); font-size: .95rem; }
.privacy { padding: 7px 11px; border-radius: 999px; color: var(--forest); background: var(--mint-soft); font-size: .85rem; font-weight: 600; }
.conversation { width: 100%; max-width: 920px; flex: 0 1 auto; margin: 0 auto; padding: 16px 34px 0; }
.conversation-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 10px 0; }
.welcome { max-width: 760px; margin: 0 auto; text-align: center; }
.clara-avatar {
    width: 200px;
    height: auto;
    margin: 0 auto 14px;
    border: 0;
    border-radius: 0;
    object-fit: contain;
    background: transparent;
    box-shadow: none;
}
.kicker { margin: 0 0 6px; color: var(--forest-2); font-size: 1rem; font-weight: 700; }
.welcome h1 { margin: 0; font: 700 2rem "Manrope", sans-serif; letter-spacing: -.035em; color:#777;}
.welcome > p:last-of-type { margin: 15px auto; color: var(--muted); line-height: 1.65; }
.suggestions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom:2rem;}
.suggestions button {
    min-height: 74px;
    padding: 12px;
    font-size: 1.15rem;
    line-height: 1.25;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
    box-shadow: 0 4px 18px rgba(23,63,58,.04);
    text-align: left;
    cursor: pointer;
}
.suggestions button:hover { border-color: #91cbd2; transform: translateY(-1px); box-shadow: var(--shadow); }
.suggestions span { display: block; margin-bottom: 5px; color: var(--forest-2); font-size: .75rem; font-weight: 700; text-transform: uppercase; }
.message { display: flex; gap: 12px; margin-bottom: 28px; }
.message-label { margin-bottom: 7px; color: var(--muted); font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.message-label span { margin-left: 7px; font-weight: 400; }
.user-message { justify-content: flex-end; }
.user-message .message-label { text-align: right; float:right; display:none;}
.user-message .bubble { max-width: max('80px', 72%); padding: 13px 17px; border-radius: 18px 18px 4px 18px; color: white; background: var(--forest-2); line-height: 1.5; }
.avatar-small {
    width: 38px;
    height: 38px;
    margin-top: 20px;
    border: 2px solid white;
    object-fit: cover;
    box-shadow: 0 3px 12px rgba(13,73,102,.13);
}
.message-body { min-width: 0; max-width: calc(100% - 48px); }
.clara-message .bubble { padding: 20px 23px; border: 1px solid var(--line); border-radius: 4px 18px 18px 18px; background: white; box-shadow: 0 7px 30px rgba(13,73,102,.06); }
.response-time { display: block; margin: 8px 4px; color: #9aa5a1; }
.answer-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 32px;
}
.rating { display: inline-flex; gap: 1px; margin-left: auto; }
.rating-star {
    padding: 2px;
    border: 0;
    color: #c8d4d8;
    background: transparent;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
}
.rating:hover .rating-star,
.rating-star.active { color: #efa92e; }
.rating .rating-star:hover ~ .rating-star { color: #c8d4d8; }
.rating-star:focus-visible { outline: 2px solid var(--forest-2); border-radius: 3px; }
.copy-answer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #71838a;
    background: transparent;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
}
.copy-answer:hover {
    border-color: var(--line);
    color: var(--forest-2);
    background: var(--mint-soft);
}
.copy-answer.copied { color: #087582; }
.copy-answer svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.improve-form { margin-top: 8px; }
.improve-check { display: inline-flex; align-items: center; gap: 7px; color: #71838a; font-size: 1.05rem; cursor: pointer; }
.improve-check input { accent-color: var(--forest-2); }
.improve-box { margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--mint-soft); }
.improve-box textarea { min-height: 74px; padding: 9px 10px; border: 1px solid #c8dce3; border-radius: 10px; background: #fff; }
.improve-box button { margin-top: 8px; padding: 8px 12px; border: 0; border-radius: 9px; color: #fff; background: var(--forest); cursor: pointer; }
.improve-box button:disabled { opacity: .55; cursor: default; }
.improve-status { display: block; margin-top: 7px; color: #53757f; }
.improve-form.sent .improve-check { color: #087582; }
.answer-content { line-height: 1.65; overflow-wrap: anywhere; }
.answer-content section + section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.answer-content h2 { margin: 0 0 10px; font: 700 1.4rem "Manrope", sans-serif; }
.answer-content h3 { margin: 18px 0 8px; font: 700 1.15rem "Manrope", sans-serif; }
.answer-content h4 { margin: 14px 0 7px; font: 700 1rem "Manrope", sans-serif; }
.answer-content p { margin: 8px 0; }
.answer-content ul, .answer-content ol { padding-left: 22px; }
.answer-content li { margin: 5px 0; }
.answer-content .program-trigger { text-decoration: underline dotted #4e97a8; text-underline-offset: 3px; cursor: pointer; }
.answer-content .program-trigger:hover,
.answer-content .program-trigger:focus-visible { color: #087582; text-decoration-style: solid; outline: none; }
.answer-content .program-lookup { margin: 8px 0 12px; padding: 9px 11px; border-left: 3px solid #66b8c3; border-radius: 6px; color: #365b68; background: #f2fafb; font-size: .92rem; }
.answer-content .program-lookup table { margin: 0; background: white; }
.answer-content table { width: 100%; margin: 14px 0; border-collapse: collapse; font-size: 1rem; }
.answer-content th, .answer-content td { padding: 9px; border: 1px solid var(--line); text-align: left; vertical-align: top; word-break: normal; overflow-wrap: normal; }
.answer-content th { background: var(--mint-soft); white-space: nowrap; }
.answer-content aside, .answer-content footer { margin-top: 16px; padding: 13px 15px; border-radius: 10px; color: #53635f; background: var(--mint-soft); font-size: 1rem; }
.answer-content .sources {
    margin-top: 22px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: #667980;
    background: #f7fbfc;
    font-size: .95rem;
    line-height: 1.45;
    overflow: hidden;
}
.answer-content .sources summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.answer-content .sources summary::-webkit-details-marker { display: none; }
.answer-content .sources summary::after {
    content: "▾";
    flex: 0 0 auto;
    color: #6f858c;
    font-size: 2rem;
    line-height: 1;
    transition: transform .15s ease;
}
.answer-content .sources[open] summary::after { transform: rotate(180deg); }
.answer-content .sources summary span { font-weight: 700; color: #174b63; }
.answer-content .sources h2 { margin: 0 0 7px; font-size: .95rem; }
.answer-content .sources p,
.answer-content .sources ul,
.answer-content .sources ol { padding-right: 14px; padding-left: 32px; }
.answer-content .sources p,
.answer-content .sources ul,
.answer-content .sources ol,
.answer-content .sources li { margin-top: 4px; margin-bottom: 4px; font-size: .95rem; }
.answer-content .sources ul,
.answer-content .sources ol { padding-left: 18px; }
.answer-content a { color: var(--forest-2); }
.answer-content .product-thumb {
    height: 65px;
    max-height: 65px;
    width: 80px;
    max-width: 80px;
    object-fit: cover;
    flex: 0 0 80px;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 5px;
    vertical-align: middle;
    background: #fff;
}
.answer-content .product-thumb-empty {
    display: block;
}
.answer-content .product-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: #667980;
    background: transparent;
    font-size: .95rem;
    line-height: 1.45;
}
.answer-content .product-links h2 { flex: 0 0 100%; margin: 0 0 2px; color: #174b63; font-size: .95rem; }
.answer-content .product-links p { display: contents; margin: 0; }
.answer-content .product-links ul,
.answer-content .product-links ol { display: contents; margin: 0; padding: 0; list-style: none; }
.answer-content .product-links li { display: contents; margin: 0; }
.product-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.answer-content a.product-card,
.answer-content a.product-link {
    display: flex;
    align-items: center;
    gap: 8px;
    width: calc((100% - 20px) / 3);
    min-width: 0;
    min-height: 82px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: #174b63;
    background: #f7fbfc;
    box-shadow: 0 4px 18px rgba(13,73,102,.04);
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.18;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.answer-content .product-title {
    display: -webkit-box;
    min-width: 0;
    max-height: 65px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
}
.answer-content a.product-card:hover,
.answer-content a.product-link:hover { border-color: #8fcbd2; color: #087582; background: var(--mint-soft); }
.composer-wrap {
    position: static;
    z-index: 3;
    padding: 4px 34px 17px;
    background: linear-gradient(transparent, var(--paper) 25%);
}
.identity-form { width:100%; max-width:850px; display:grid; grid-template-columns:1fr 18em 22em auto; gap:10px; align-items:end; margin:0 auto; padding:14px; border:1px solid #c8dce3; border-radius:16px; background:#fff; box-shadow:0 12px 40px rgba(13,73,102,.13); }
.identity-form div span { display:block; margin-top:3px; color:var(--muted); font-size:.85rem; }.identity-form input { min-width:0; padding:10px 12px; border:1px solid #c8dce3; border-radius:10px; }.identity-form button { padding:10px 15px; border:0; border-radius:10px; color:#fff; background:var(--forest); font-weight:700; cursor:pointer; }
.identity-form div strong { line-height:35px; }
@media(max-width:850px) { .identity-form { grid-template-columns:1fr 1fr; }.identity-form div { grid-column:1/-1; } 
.new-chat {
    margin-right:0px;
}


}
@media(max-width:520px) { .identity-form { grid-template-columns:1fr; }.identity-form div { grid-column:auto; } }
.answer-settings {
    width: 100%;
    max-width: 850px;
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 auto 8px;
    color: var(--muted);
    font-size: .95rem;
}
.answer-settings select {
    width: 120px;
    min-width: 0;
    max-width: 120px;
    padding: 6px 28px 6px 9px;
    border: 1px solid #c8dce3;
    border-radius: 9px;
    color: var(--ink);
    background: white;
}
.repeat-question {
    padding: 6px 10px;
    border: 1px solid #8fcbd2;
    border-radius: 9px;
    color: #087582;
    background: #f4fcfd;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
}
.repeat-question:hover { background: #e6f7f9; border-color: #50b4bd; }
.source-setting {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    font-size: 1.05rem;
    cursor: pointer;
}
.source-setting input,.meal-plan-setting input { accent-color: var(--forest-2); }
.meal-plan-setting { display:inline-flex; align-items:center; gap:6px; font-size:1.05rem; cursor:pointer; }
.composer {
    width: 100%;
    max-width: 850px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin: 0 auto;
    padding: 9px 9px 9px 18px;
    border: 1px solid #c8dce3;
    border-radius: 18px;
    background: white;
    box-shadow: 0 12px 40px rgba(13,73,102,.13);
}
.composer:focus-within { border-color: #38aeb8; box-shadow: 0 12px 40px rgba(13,73,102,.15), 0 0 0 3px rgba(35,174,184,.14); }
textarea { width: 100%; max-height: 180px; resize: none; border: 0; outline: 0; padding: 10px 0; color: var(--ink); background: transparent; line-height: 1.45; }
textarea::placeholder { color: #98a39f; }
.send { width: 43px; height: 43px; flex: 0 0 auto; border: 0; border-radius: 13px; color: white; background: var(--forest); font-size: 1.55rem; cursor: pointer; }
.send:hover { background: var(--forest-2); }
.send:disabled { opacity: .55; cursor: wait; }
.disclaimer { margin: 9px auto 0; color: #899490; font-size: .8rem; text-align: center; }
.error-banner { max-width: 850px; margin: 0 auto 9px; padding: 10px 14px; border: 1px solid #e3aaa1; border-radius: 10px; color: #8d3126; background: #fff1ef; font-size: 1rem; }
.typing { display: inline-flex; gap: 5px; padding: 17px 20px !important; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #60aab3; animation: pulse 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

@media (max-width: 760px) {
    .app-shell { max-width: none; box-shadow: none; }
    .brand-image { height: 46px; max-width: 150px; }
    .new-chat { padding: 7px 9px; font-size: 72%; }
    .topbar { min-height: 48px; padding: 7px 12px; }
    .conversation { padding: 16px 16px 0; }
    .conversation-actions { margin-bottom: 20px; }
    .welcome { margin-top: 3vh; }
    .suggestions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .suggestions button { min-height: 72px; }
    .composer-wrap { right: 0; left: 0; padding: 4px 14px 12px; }
    .answer-settings { flex-wrap: wrap; }
    .answer-settings select { width: 120px; min-width: 0; max-width: 120px; }
    .user-message .bubble { max-width: 88%; }
    .clara-message .bubble { padding: 17px; }
    .answer-content a.product-card,
    .answer-content a.product-link { width: calc((100% - 10px) / 2); min-height: 82px; }
    .answer-content .product-thumb { width: 80px; height: 60px; max-width: 80px; max-height: 60px; flex-basis: 80px; }
    .answer-content .product-title { max-height: 60px; }
}

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