/* Spec Assistant page - extends p-series-landing.css (load that first). */

/* Hero: illustrative cited-answer chat */
.sa-chat {
    position: relative;
    margin: 0;
    overflow: hidden;
    border: 1px solid #d3e0f6;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 30px 70px rgba(16, 40, 92, .16);
}
.sa-chat-head {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 16px 20px;
    color: #fff;
    background: linear-gradient(120deg, var(--ps-navy), #0a327f);
}
.sa-chat-head strong { font-size: .98rem; }
.sa-chat-head em { margin-left: auto; color: #9fc3ff; font-size: .74rem; font-style: normal; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.sa-dot { width: 9px; height: 9px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 4px rgba(61, 220, 132, .2); }
.sa-chat-body { display: grid; gap: 14px; padding: 22px 20px 24px; background: var(--ps-pale); }
.sa-msg { margin: 0; padding: 14px 16px; border-radius: 16px; font-size: .95rem; line-height: 1.55; }
.sa-msg p { margin: 0; color: var(--ps-ink); }
.sa-msg-user { justify-self: end; max-width: 82%; border-bottom-right-radius: 5px; color: #fff !important; background: var(--ps-blue); }
.sa-msg-bot { max-width: 94%; border: 1px solid var(--ps-line); border-bottom-left-radius: 5px; background: #fff; }
.sa-sources { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--ps-line); }
.sa-sources-label { display: block; margin-bottom: 8px; color: var(--ps-blue); font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.sa-source { display: grid; gap: 4px; padding: 10px 12px; border-left: 3px solid var(--ps-blue); border-radius: 8px; background: var(--ps-pale); text-decoration: none; }
.sa-source strong { color: var(--ps-navy); font-size: .85rem; }
.sa-source span { color: var(--ps-muted); font-size: .84rem; font-style: italic; }
.sa-feedback { display: flex; gap: 8px; align-items: center; margin-top: 12px; color: var(--ps-muted); font-size: .8rem; }
.sa-feedback b { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--ps-line); border-radius: 8px; font-weight: 400; }

/* Version lifecycle */
.sa-versions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; }
.sa-versions li { padding: 14px 12px; border: 1px solid var(--ps-line); border-radius: 12px; background: #fff; text-align: center; }
.sa-versions b { display: block; color: var(--ps-navy); }
.sa-versions span { display: block; margin-top: 4px; color: var(--ps-muted); font-size: .8rem; line-height: 1.4; }
.sa-versions .sa-active { border-color: var(--ps-blue); background: var(--ps-pale); box-shadow: 0 0 0 3px rgba(18, 87, 242, .12); }
.sa-versions .sa-active b { color: var(--ps-blue); }

/* Deployment options */
.sa-deploy { background: #fff; }
.sa-deploy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.sa-deploy-card { border: 1px solid var(--ps-line); border-radius: 20px; box-shadow: 0 16px 40px rgba(19, 45, 95, .07); }
.sa-deploy-card h3 { margin: 0 0 10px; font-size: 1.45rem; }
.sa-deploy-card > p { margin: 0; line-height: 1.65; }

@media (max-width: 980px) {
    .sa-chat { max-width: 560px; }
}

@media (max-width: 720px) {
    .sa-deploy-grid { grid-template-columns: 1fr; }
    .sa-versions { grid-template-columns: 1fr; }
    .sa-chat-head { flex-wrap: wrap; }
    .sa-chat-head em { flex-basis: 100%; margin-left: 19px; }
    .sa-msg-user, .sa-msg-bot { max-width: 100%; }
}
