.pal-screen{display:flex;flex-direction:column;height:100dvh;overflow:hidden}.pal-screen>header{flex:none}.pal-page{display:flex;flex:1;flex-direction:column;min-height:0;width:100%;max-width:1120px;margin:0 auto;padding:clamp(12px,4dvh,44px) 24px 12px;color:#102b54}.pal-intro{flex:none;text-align:center;margin-bottom:clamp(12px,3dvh,38px)}.pal-intro h1{margin:14px 0 12px;font-size:clamp(36px,5.3vw,64px);font-weight:750;line-height:1.12;letter-spacing:-.045em}.pal-intro h1>span{color:#a07816;font-size:1.08em}.pal-chat{display:flex;flex:1;min-height:0;flex-direction:column;overflow:hidden;border:1px solid #dce3ec;border-radius:24px;background:#fff;box-shadow:0 18px 64px -26px #102b5428,0 3px 12px #102b5404}.pal-avatar{position:relative;display:inline-grid;place-items:center;flex:none;width:48px;height:48px;padding:4px;border-radius:12px;background:#102b54}.pal-avatar img{width:100%;height:auto}.pal-avatar-small{width:30px;height:30px;padding:2px;border-radius:8px;margin-top:0}.pal-conversation-wrap{position:relative;flex:1;min-height:0}.pal-conversation{height:100%;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#d6deea transparent;padding:22px 26px 30px;background:linear-gradient(180deg,#f8fafd,#f5f7fb)}.pal-message{display:flex;align-items:flex-start;gap:9px;margin-top:19px}.pal-message-content{min-width:0;max-width:82%}.pal-speaker{display:block;margin:0 0 6px 2px;color:#5c6d86;font-size:11px;font-weight:500}.pal-bubble{padding:14px 17px;border:1px solid #e5eaf2;border-radius:15px 15px 15px 4px;background:#fff;color:#465874;font-size:14px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;box-shadow:0 2px 3px #102b5402}.pal-message-student{justify-content:flex-end}.pal-message-student .pal-speaker{text-align:right;margin-right:2px}.pal-message-student .pal-bubble{border-color:#17365f;border-radius:15px 15px 4px 15px;background:#17365f;color:#fff}.pal-sources{margin:10px 2px 0;color:#5c6d86;font-size:12px;line-height:1.6}.pal-sources summary{cursor:pointer;font-weight:600}.pal-source{margin-top:10px;padding:12px 14px;border:1px solid #dce3ec;border-radius:10px;background:#fff}.pal-source-title{font-weight:600;color:#102b54}.pal-source-title a{text-decoration:underline;text-underline-offset:3px}.pal-source-meta{margin-top:3px;font-size:11px}.pal-source-excerpt{margin-top:8px;white-space:pre-wrap;overflow-wrap:anywhere}.pal-source-notes{margin-top:10px;padding-left:18px;list-style:disc}.pal-source-notes li+li{margin-top:4px}.pal-lookup-error{margin-bottom:12px;padding:10px 12px;border:1px solid #e5cc91;border-radius:10px;background:#fffaf0;color:#735415;font-size:12px;line-height:1.6}.pal-lookup-error a,.pal-lookup-error button{display:inline-block;margin-top:5px;text-decoration:underline;text-underline-offset:3px;font-weight:600}.pal-typing{display:flex;align-items:center;gap:4px;width:59px;height:40px;padding:0 17px;border:1px solid #e5eaf2;border-radius:13px 13px 13px 4px;background:#fff}.pal-typing>span[aria-hidden]{width:5px;height:5px;border-radius:50%;background:#9caac0;animation:pal-dot 1.1s ease-in-out infinite}.pal-typing>span[aria-hidden]:nth-of-type(3){animation-delay:.15s}.pal-typing>span[aria-hidden]:nth-of-type(4){animation-delay:.3s}@keyframes pal-dot{0%,65%,to{transform:translateY(0);opacity:.45}30%{transform:translateY(-3px);opacity:1}}.pal-jump{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);border:1px solid #dbe3ee;border-radius:20px;padding:7px 12px;background:#fff;box-shadow:0 4px 14px #102b5412;color:#102b54;font-size:11px;white-space:nowrap}.pal-jump span{margin-left:5px}.pal-compose-area{flex:none;border-top:1px solid #e9edf3;padding:18px 25px 14px}.pal-suggestions>p{margin-bottom:9px;color:#5c6d86;font-size:11px;font-weight:600}.pal-prompt-list{display:flex;flex-wrap:nowrap;gap:7px;overflow-x:auto;padding-bottom:5px;scrollbar-width:thin}.pal-prompt-list button{display:flex;flex:none;white-space:nowrap;align-items:center;gap:9px;border:1px solid #e0e6ef;border-radius:8px;background:#fafbfd;color:#5c6d86;padding:7px 9px;font-size:12px;line-height:1.4;transition:border-color .15s,background .15s}.pal-prompt-list button:hover:not(:disabled){border-color:#d6bc72;background:#fffaf0;color:#765715}.pal-prompt-list button>span{color:#a5afbd;font-size:12px}.pal-prompt-list button:disabled{opacity:.5;cursor:wait}.pal-composer{display:flex;align-items:flex-end;gap:10px;margin-top:17px;padding:11px 11px 11px 15px;border:1px solid #d7e0ed;border-radius:13px;background:#fff;box-shadow:0 2px 5px #102b5403;transition:border-color .15s,box-shadow .15s}.pal-composer:focus-within{border-color:#a6b8d0;box-shadow:0 0 0 3px #edf2f8}.pal-composer textarea{display:block;flex:1;min-width:0;min-height:0;height:clamp(56px,12dvh,104px);resize:none;overflow-y:auto;border:0;padding:1px 0;background:transparent;color:#273f61;font-size:14px;line-height:1.6}.pal-composer textarea::placeholder{color:#5c6d86}.pal-composer textarea:focus-visible{outline:none}.pal-send{display:grid;place-items:center;flex:none;width:35px;height:35px;border:1px solid #2563eb;border-radius:10px;background:#2563eb;color:#fff;transition:background .15s,transform .15s}.pal-send svg{width:19px;height:19px}.pal-send:hover:not(:disabled){background:#1d4ed8;transform:translateY(-1px)}.pal-send:disabled{background:#2563eb;border-color:#2563eb;color:#fff;opacity:.55;cursor:default}.pal-page-bottom{position:relative;flex:none;display:flex;align-items:flex-start;justify-content:flex-end;gap:20px;margin-top:10px;padding-inline:4px}.pal-about{max-width:460px;color:#5c6d86;font-size:12px;line-height:1.6}.pal-about summary{cursor:pointer;text-align:right}.pal-privacy-panel{position:absolute;z-index:5;right:0;bottom:calc(100% + 10px);width:min(460px,100%);max-height:min(50dvh,280px);overflow-y:auto;overscroll-behavior:contain;margin:0;padding:16px;border:1px solid #dce3ec;border-radius:12px;background:#fff;box-shadow:0 8px 28px #102b5420;text-align:left;color:#5c6d86}@media (max-width:640px){.pal-page{padding:16px 14px 10px}.pal-intro{margin-bottom:16px}.pal-intro h1{font-size:clamp(36px,8.5vw,42px)}.pal-chat{border-radius:18px}.pal-conversation{padding:18px 13px 24px}.pal-message{gap:7px}.pal-message-content{max-width:85%}.pal-bubble{padding:12px 13px;font-size:14px;line-height:1.65}.pal-compose-area{padding:14px 13px 12px}.pal-prompt-list{flex-wrap:nowrap;overflow-x:auto;padding-bottom:5px;scrollbar-width:thin}.pal-prompt-list button{flex:none;min-height:36px;font-size:12px}.pal-composer{margin-top:10px}.pal-composer textarea{font-size:16px}.pal-page-bottom{flex-direction:column;align-items:center;gap:12px}.pal-about{max-width:100%}.pal-about,.pal-about summary{text-align:center}}@media (max-height:650px){.pal-screen>header>div{padding-block:8px;gap:8px}.pal-screen>header>div>span{display:none}.pal-screen>header nav{font-size:12px}.pal-screen>header nav a{padding:6px 8px}.pal-page{padding-block:8px}.pal-intro{margin-bottom:8px}.pal-intro h1{margin-block:0;font-size:clamp(22px,5dvh,34px)}.pal-compose-area{padding-block:10px}.pal-composer{margin-top:8px}}@media (prefers-reduced-motion:reduce){.pal-typing>span[aria-hidden]{animation:none;opacity:.65}.pal-chat button{transition:none}}.pal-gate{width:min(100%,44rem);margin:1rem auto;padding:clamp(1.25rem,4vw,2rem);background:#fff;border:1px solid #dbe2eb;border-radius:1.5rem;display:grid;gap:1rem;line-height:1.6}.pal-gate h2{color:#102b54;font-size:1.25rem;font-weight:800}.pal-gate label{display:flex;align-items:flex-start;gap:.6rem}.pal-gate input{margin-top:.35rem;flex-shrink:0}.pal-gate button,.pal-gate>a{border-radius:.7rem;padding:.7rem 1rem;font-weight:700;background:#102b54;color:white;text-align:center}.pal-gate button:disabled{opacity:.5}.pal-context{display:flex;flex-wrap:wrap;gap:.5rem 1rem;padding:.8rem 1.25rem;border-bottom:1px solid #dbe2eb;font-size:.75rem;color:#475569}.pal-context a{text-decoration:underline}.pal-controls,.pal-records-notice{margin-top:.75rem;font-size:.75rem;color:#475569;line-height:1.5}.pal-controls button{display:inline-block;margin:.5rem .75rem .25rem 0;text-decoration:underline;font-weight:600}.pal-controls summary{cursor:pointer}.pal-gate{min-height:0;overflow-y:auto;overscroll-behavior:contain}.pal-compose-area{max-height:55dvh;overflow-y:auto}@media (max-height:600px){.pal-intro{margin-bottom:8px}.pal-intro h1{font-size:26px;margin-block:4px}.pal-context{padding-block:.4rem}.pal-compose-area{padding-block:8px}.pal-records-notice{display:none}}.pal-expand-reply{display:block;margin-top:.65rem;padding:0;color:#345b8e;font-size:.75rem;font-weight:600;text-decoration:underline;text-underline-offset:3px}.pal-page{padding-top:14px}.pal-intro{margin-bottom:14px}.pal-intro h1{margin:4px 0 8px;font-size:clamp(32px,4.8vw,56px)}.pal-compose-area{padding:8px 18px;max-height:35dvh}.pal-suggestions summary{width:fit-content;cursor:pointer;color:#5c6d86;font-size:12px}.pal-composer,.pal-suggestions[open] .pal-prompt-list{margin-top:8px}.pal-composer{padding:3px 7px 3px 12px;align-items:center}.pal-composer textarea{height:30px;line-height:1.5;padding-block:4px}.pal-controls{margin-top:6px}@media (max-width:640px){.pal-page{padding-top:10px}.pal-intro{margin-bottom:10px}.pal-intro h1{font-size:32px}.pal-compose-area{padding:8px 12px}}.pal-privacy-panel p+p{margin-top:.7rem}.pal-privacy-actions{display:grid;gap:.65rem;margin-top:.9rem}.pal-privacy-actions button{text-align:left;font-weight:600;text-decoration:underline;text-underline-offset:3px}.pal-privacy-actions button:disabled{opacity:.5}.pal-context span+span:before{content:"·";margin-right:1rem;color:#94a3b8}.pal-compose-area{flex:0 0 auto;height:auto}.pal-prompt-list button{padding:5px 8px}.pal-chat{overflow:clip}.pal-context{flex:0 0 auto}.pal-conversation-wrap{overflow:clip}.pal-context{align-items:center;gap:.5rem 0}.pal-context span+span:before{content:"";display:inline-block;width:2px;height:12px;margin:0 14px;background:#d6a725;vertical-align:-1px}.pal-suggestions{display:flex;align-items:center;gap:10px;min-width:0}.pal-start-label{flex:none;color:#5c6d86;font-size:12px;font-weight:600}.pal-prompt-list{flex:1;min-width:0}.pal-clear-chat{margin-left:auto;padding-left:14px;color:#5c6d86;font-size:11px;font-weight:600;text-decoration:underline;text-underline-offset:3px}.pal-clear-chat:disabled{opacity:.45;cursor:default}.pal-prompt-list{display:grid;grid-template-columns:1fr 1.1fr 1.45fr;overflow:visible;padding-bottom:0}.pal-prompt-list button{min-width:0;white-space:normal;justify-content:space-between;gap:4px}@media (max-width:640px){.pal-suggestions{flex-direction:column;align-items:stretch;gap:6px}.pal-prompt-list{width:100%;grid-template-columns:1fr 1fr 1fr}.pal-prompt-list button{font-size:11px;padding:5px}}