@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

:root {
    --bg: #f7f4ec;
    --cl-canvas: #faf9f6;
    --cl-parchment: #f6f1e8;
    --cl-card: #ffffff;
    --cl-text-primary: #2e2a26;
    --cl-text-secondary: #5f5a54;
    --cl-text-muted: #8c867f;
    --cl-blue: #1e6fdb;
    --cl-blue-hover: #295cb5;
    --cl-blue-soft: #e6effc;
    --cl-border: #d8d2c8;
    --cl-ink: #cfc7bc;
    --border-light: rgba(70, 50, 30, 0.15);
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
}

html, body {
    /* update-id: swb-2025-11-17-1 */
    height: 100%;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Layout stabilized for pinned chat  collapsible research workspace */
body {
    font-family: "Open Sans", "Inter", "Segoe UI", Arial, sans-serif;
    background: #f7f4ec;
    color: #3a2f23;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
}
.landing-page,
body.tos-page {
    overflow-y: auto;
    overflow-x: hidden;
    display: block;
    height: auto;
    min-height: 100vh;
}
html:has(body.landing-page),
html:has(body.tos-page) {
    overflow: auto;
    height: auto;
}

.hidden {
    display: none !important;
}

body.landing-page {
    background: var(--cl-canvas);
    color: var(--cl-text-primary);
    font-family: "Open Sans", "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    margin: 0;
}

.landing-page h1,
.landing-page h2,
.landing-page h3,
.landing-page h4 {
    font-family: "Open Sans", "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-weight: 700;
    color: var(--cl-text-primary);
    line-height: 1.2;
}

.landing-page p,
.landing-page li {
    color: var(--cl-text-secondary);
    line-height: 1.6;
}

.landing-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 40px 20px 72px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    min-height: 100vh;
    box-sizing: border-box;
}

.landing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.landing-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.landing-brand h1 {
    margin: 0;
    font-size: 26px;
    white-space: nowrap;
    line-height: 1.1;
}

.landing-tagline {
    margin: 0;
    font-size: 14px;
    color: var(--cl-text-muted);
    line-height: 1.2;
    letter-spacing: 0.2px;
}

.landing-brand__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: calc(100vw - 150px);
}

.brand-mark {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    border: 1px solid var(--cl-border);
    background: var(--cl-parchment);
    color: var(--cl-text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.landing-nav {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.landing-nav a {
    color: var(--cl-text-secondary);
    text-decoration: none;
    font-size: 14px;
}

.landing-nav__link {
    text-decoration: underline;
    opacity: 0.8;
}

.landing-nav__cta {
    border: 1px solid var(--cl-border);
    border-radius: 999px;
    padding: 6px 16px;
    background: var(--cl-card);
    color: var(--cl-text-primary);
}

/* ── Locale toggle (app header + landing nav) ─────────────────────────── */
.locale-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.locale-btn {
    background: none;
    border: none;
    padding: 3px 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #8b7a68;
    cursor: pointer;
    border-radius: 4px;
    text-decoration: none;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
}

.locale-btn:hover {
    color: #3a2f23;
    background: rgba(70, 50, 30, 0.07);
}

.locale-btn--active {
    color: #3a2f23;
    background: rgba(70, 50, 30, 0.1);
}

.locale-sep {
    font-size: 11px;
    color: #c5b9a3;
    user-select: none;
}

.locale-toggle--landing .locale-btn {
    font-size: 13px;
}

.about-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.landing-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.landing-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 36px;
    background: var(--cl-parchment);
    border-radius: 28px;
    border: 1px solid var(--cl-border);
    padding: 40px;
    box-shadow: 0 25px 60px rgba(46, 42, 38, 0.08);
}

.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--cl-text-muted);
    font-size: 12px;
    margin: 0 0 6px;
}

.landing-hero__text {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.landing-hero__text h2 {
    font-size: 36px;
    margin: 0;
}

.landing-hero__text p {
    margin: 0;
}

.hero-points {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
    color: var(--cl-text-secondary);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hero-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 6px;
}

.hero-micro {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--cl-text-muted);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 11px 24px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn--primary {
    background: var(--cl-blue);
    color: #fff;
}

.btn--primary:hover {
    background: var(--cl-blue-hover);
}

.btn--ghost {
    border: 1px solid var(--cl-border);
    color: var(--cl-text-primary);
    background: var(--cl-card);
}

.btn--ghost:hover {
    border-color: var(--cl-blue);
    color: var(--cl-blue-hover);
}

.landing-hero__visual {
    border: 1px solid rgba(70, 50, 30, 0.25);
    border-radius: 20px;
    padding: 0;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at top, rgba(247,244,236,0.95), rgba(240,230,208,0.7));
    display: flex;
    align-items: stretch;
    min-height: 360px;
}

.landing-hero__visual::before,
.landing-hero__visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    opacity: 0.32;
    animation: grandManFade 16s ease-in-out infinite;
    z-index: 0;
    mix-blend-mode: multiply;
}

.landing-hero__visual::before {
    background-image: url('/pics/swedenbor_02.png');
    animation-delay: 0s;
}

.landing-hero__visual::after {
    background-image: url('/pics/swedenbor_03.png');
    animation-delay: 8s;
}

.correspondence-field {
    position: relative;
    width: 100%;
    min-height: 340px;
    height: 100%;
    overflow: hidden;
    border-radius: 20px;
    z-index: 1;
    flex: 1 1 auto;
}

.correspondence-field::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(247,244,236,0) 50%, rgba(247,244,236,0.35) 100%);
    z-index: 0;
}

.correspondence-field__overlay {
    position: absolute;
    inset: 0;
    padding: 24px;
    z-index: 1;
}

.correspondence-field__figure {
    width: 100%;
    height: auto;
    opacity: 0.75;
}

.correspondence-field__labels {
    position: absolute;
    inset: 0;
    pointer-events: none;
    font-size: 12px;
    color: rgba(58,47,35,0.65);
}

.correspondence-field__labels .label {
    position: absolute;
    background: rgba(255, 255, 255, 0.68);
    padding: 2px 7px;
    border-radius: 12px;
    border: 1px solid rgba(58,47,35,0.12);
    font-size: 12px;
    color: rgba(58,47,35,0.7);
}

.correspondence-field__watermark {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    letter-spacing: 2px;
    color: rgba(58,47,35,0.35);
    text-transform: uppercase;
    z-index: 2;
}

.landing-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.landing-highlights > header {
    grid-column: 1 / -1;
}

.landing-note {
    font-size: 13px;
    color: var(--cl-text-muted);
    margin-top: 6px;
}

@media (min-width: 960px) {
    .landing-highlights {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .landing-highlights > header {
        grid-column: 1 / -1;
    }
}

.feature-card {
    background: var(--cl-card);
    padding: 22px;
    border-radius: 20px;
    border: 1px solid var(--cl-border);
    box-shadow: 0 15px 25px rgba(46, 42, 38, 0.06);
}

.feature-card h4 {
    margin: 0 0 8px;
    font-size: 18px;
}

.feature-card p {
    margin: 0;
}

.landing-panel {
    background: var(--cl-card);
    border: 1px solid var(--cl-border);
    border-radius: 24px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 20px 40px rgba(46, 42, 38, 0.05);
}

.landing-panel--split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
}

.panel-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--cl-text-muted);
    font-size: 12px;
    margin: 0 0 8px;
}

.panel-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--cl-text-secondary);
}

.panel-list li {
    position: relative;
    padding-left: 18px;
}

.panel-list li::before {
    content: "";
    position: absolute;
    top: 9px;
    left: 6px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--cl-blue);
}

.landing-panel--sources .sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.swedenborg-context {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid var(--cl-border);
}

.swedenborg-context h2 {
    margin-top: 0;
    margin-bottom: 8px;
}

.landing-panel--sources h4 {
    margin: 0 0 6px;
}

.landing-panel--sources p {
    margin: 0;
}

.landing-panel--cta {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--cl-parchment);
}

.panel-cta-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.landing-ai-notice {
    border-radius: 22px;
    border: 1px solid var(--cl-border);
    background: var(--cl-card);
    padding: 24px;
    box-shadow: 0 12px 30px rgba(46, 42, 38, 0.05);
}

.landing-footer {
    text-align: center;
    font-size: 13px;
    color: var(--cl-text-muted);
    line-height: 1.5;
}

.landing-footer a {
    color: var(--cl-blue);
}

.cookie-banner {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    border: 1px solid rgba(70, 50, 30, 0.25);
    padding: 12px 18px;
    display: flex;
    gap: 12px;
    align-items: center;
    max-width: 420px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    font-size: 13px;
    color: #3a2f23;
}

.cookie-banner button {
    border: none;
    background: #2b63c2;
    color: #fff;
    border-radius: 999px;
    padding: 6px 16px;
    cursor: pointer;
    font-size: 13px;
}

.about-page {
    background: #f7f4ec;
    color: #3a2f23;
    font-family: "Open Sans", "Inter", "Segoe UI", Arial, sans-serif;
    margin: 0;
    min-height: 100vh;
    overflow-y: auto;
}

.about-shell {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px clamp(12px, 4vw, 24px) 48px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.about-hero {
    position: relative;
    min-height: 420px;
    padding: 40px 24px;
    background-color: #f8f1df;
    background-image: url('/pics/swedenborg_web.png');
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 50%;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(70, 50, 30, 0.1);
}

.about-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(247, 244, 236, 0.98) 0%, rgba(247, 244, 236, 0.6) 55%, rgba(247, 244, 236, 0.1) 90%);
    pointer-events: none;
    z-index: 1;
}

.about-hero__tag {
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #8b7a68;
    margin: 0;
}

.about-hero__text {
    position: relative;
    z-index: 2;
    max-width: 620px;
    width: min(100%, 620px);
    overflow: hidden;
    background: rgba(247, 244, 236, 0.85);
    border: 1px solid rgba(70, 50, 30, 0.25);
    border-radius: 18px;
    padding: 24px;
    box-sizing: border-box;
}

.about-hero__text h1 {
    margin: 12px 0;
    font-size: 32px;
}

.about-section {
    border-top: 1px solid rgba(70, 50, 30, 0.2);
    padding-top: 22px;
}

.about-section h2 {
    margin-top: 0;
    font-size: 22px;
}

.about-section ul {
    padding-left: 20px;
    line-height: 1.6;
}

.about-footer {
    text-align: left;
}

.about-footer a {
    color: #2b63c2;
    text-decoration: none;
}
.app-shell {
    width: 100%;
    min-width: 360px;
    height: 100%;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0;
    gap: 0;
    box-sizing: border-box;
}
.site-footer {
    margin: 8px 16px 16px;
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid rgba(70, 50, 30, 0.25);
    background: rgba(255, 255, 255, 0.35);
    color: #8b7a68;
    font-size: 12px;
    text-align: center;
    line-height: 1.5;
}
.site-header {
    flex: 0 0 auto;
    margin-bottom: 0;
}

.app-layout {
    display: grid;
    grid-template-columns: var(--research-col-width, 260px) 4px minmax(0, 1fr) var(--writer-col-width, 0px);
    flex: 1 1 auto;
    width: 100%;
    gap: 0;
    min-height: 0;
    height: calc(100vh - var(--header-height, 72px));
    align-items: start;
    overflow: hidden;
    transition: grid-template-columns 0.2s ease;
}

.layout {
    min-height: 0;
}

.left-panel,
.right-panel,
.chat-panel--main {
    margin-top: 0;
    min-height: 0;
    height: 100%;
    overflow-y: auto;
}

.chat-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    min-height: 0;
    gap: 0;
    padding: 0 24px;
    padding-bottom: 0;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

.active-session {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid rgba(70, 50, 30, 0.12);
    background: transparent;
    color: #8b7a68;
    font-size: 12px;
    flex: 0 0 auto;
}

.active-session strong {
    color: #2f261d;
}

.active-session__actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.writer-tray-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(70, 50, 30, 0.18);
    background: rgba(255, 255, 255, 0.36);
    color: #5a4632;
    border-radius: 999px;
    height: 34px;
    padding: 0 12px;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.writer-tray-toggle:hover {
    border-color: rgba(43, 99, 194, 0.35);
    background: rgba(43, 99, 194, 0.08);
    color: #2b63c2;
}

.writer-tray-toggle[aria-pressed="true"] {
    border-color: rgba(43, 99, 194, 0.45);
    background: rgba(43, 99, 194, 0.12);
    color: #2b63c2;
}

.writer-tray-toggle__icon,
.writer-tray-toggle__icon svg {
    width: 16px;
    height: 16px;
    display: inline-flex;
}

.writer-tray-toggle__label {
    font-size: 12px;
    font-weight: 600;
}

.writer-tray-toggle__count {
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    background: rgba(43, 99, 194, 0.14);
    color: #2b63c2;
    font-size: 11px;
    font-weight: 700;
}

.drag-handle {
    width: 4px;
    height: 100%;
    cursor: col-resize;
    background: transparent;
    flex-shrink: 0;
    align-self: stretch;
    z-index: 2;
    transition: background 0.15s;
}

.drag-handle:hover {
    background: var(--border-light, rgba(70, 50, 30, 0.15));
}

body.is-resizing {
    cursor: col-resize;
    user-select: none;
}

body.is-resizing .app-layout {
    transition: none;
}

.writer-panel.collapsed {
    width: 0;
    min-width: 0;
    overflow: hidden;
    opacity: 0;
    border-left: none;
}

.writer-panel {
    min-width: 0;
    justify-self: end;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    gap: 0;
    border-left: 1px solid rgba(70, 50, 30, 0.15);
    transition: opacity 0.2s ease;
}

.writer-panel .workspace-writer {
    flex: 1 1 auto;
    overflow-y: auto;
    background: transparent;
}

.workspace-column-empty {
    border: none;
    border-radius: 0;
    padding: 12px;
    background: transparent;
    color: #8b7a68;
    font-size: 12px;
}

.chat-disclaimer {
    font-size: 12px;
    color: #8b7a68;
    margin: 0 4px;
    line-height: 1.4;
}

.chat-messages {
    background-color: transparent;
    border-radius: 0;
    width: 100%;
    padding: 16px 32px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
    border: none;
    box-shadow: none;
    overflow-y: auto;
    gap: 10px;
}

#chatbox {
    flex: 1 1 auto;
    max-height: 100%;
    min-height: 0;
    padding: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: transparent;
    border-radius: 0;
    scroll-behavior: smooth;
    overscroll-behavior-y: contain;
}

.site-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    background: var(--bg);
    border: none;
    border-radius: 0;
    border-bottom: 1px solid rgba(70, 50, 30, 0.15);
    flex-wrap: wrap;
    box-shadow: none;
    margin-bottom: 0;
}

.session-new-chat {
    border: 1px solid rgba(70, 50, 30, 0.3);
    background: rgba(255, 255, 255, 0.6);
    color: #3a2f23;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
}

.brand {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
    flex: 1;
}

.brand-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #3a2f23;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    letter-spacing: 1px;
    border: 1px solid rgba(70, 50, 30, 0.25);
}

.brand-initials {
    pointer-events: none;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-text h1 {
    font-size: 18px;
    margin: 0;
    color: #3a2f23;
    letter-spacing: 0.5px;
}

.brand-text p {
    margin: 0;
    font-size: 12px;
    color: #8b7a68;
}

.session-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    border: 1px solid rgba(70, 50, 30, 0.25);
}

.session-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #c5b9a3;
    color: #3a2f23;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.session-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.session-details {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.session-name {
    font-size: 13px;
    color: #3a2f23;
    font-weight: 600;
}

.session-email {
    font-size: 11px;
    color: #5c5c5c;
}

.session-logout {
    border: none;
    background: #3a2f23;
    color: #fff;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
}

.session-logout:hover {
    background: #2b2016;
}

.toast {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translate(-50%, -20px);
    background: #3a2f23;
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(70, 50, 30, 0.25);
    box-shadow: none;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

.toast.toast--visible {
    opacity: 0.97;
    transform: translate(-50%, 0);
}

.research-panel {
    width: var(--research-col-width, 260px);
    max-width: var(--research-col-width, 260px);
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    align-self: flex-start;
    height: 100%;
    max-height: 100%;
    overflow-y: auto;
    background: #f7f4ec;
    border: none;
    border-radius: 0;
    border-right: 1px solid rgba(70, 50, 30, 0.15);
    padding: 0;
    position: relative;
    opacity: 1;
    transition: width 0.2s ease, min-width 0.2s ease, padding 0.2s ease;
}

.research-panel .workspace-card,
.research-panel .panel-section:not(.panel-section--header) {
    padding: 12px;
    background: transparent;
}

.research-collapse {
    position: static;
    border: none;
    background: transparent;
    color: #8b7a68;
    border-radius: 6px;
    width: 30px;
    height: 32px;
    padding: 0;
    cursor: pointer;
    z-index: 3;
    box-shadow: none;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.08em;
}

.research-collapse:hover {
    color: #2b63c2;
}

body.has-collapsed-research .research-panel {
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    padding: 8px 4px;
    overflow: hidden;
}

body.has-collapsed-research .app-layout {
    --research-col-width: 48px;
}

body.has-collapsed-research .research-panel .workspace-card,
body.has-collapsed-research .research-panel .panel-section:not(.panel-section--header),
body.has-collapsed-research .research-panel .workspace-column-empty {
    display: none;
}

body.has-collapsed-research .research-panel .research-collapse {
    margin: 0;
    align-self: auto;
}

.workspace-card {
    background: transparent;
    border-radius: 0;
    padding: 12px;
    border: none;
    border-bottom: 1px solid rgba(70, 50, 30, 0.13);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.workspace-citation {
    order: 2;
}

.workspace-notes {
    order: 3;
}

.workspace-history {
    order: 4;
}

.panel-section {
    padding: 6px 12px 10px;
    border-bottom: 1px solid rgba(70, 50, 30, 0.1);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.panel-section--header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #f7f4ec;
    border-bottom: 1px solid rgba(70, 50, 30, 0.1);
    box-shadow: 0 1px 0 rgba(70, 50, 30, 0.08);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
}

.panel-section__header-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.panel-section__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

body.has-collapsed-research .research-panel .panel-section--header {
    justify-content: center;
    padding: 8px 4px;
}

body.has-collapsed-research .research-panel .panel-section--header .panel-section__label,
body.has-collapsed-research .research-panel .panel-section--header .session-new-chat {
    display: none;
}

.panel-section--meta {
    opacity: 0.7;
}

.panel-section__label {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #8b7a68;
}

.workspace-profile {
    order: 1;
}

.workspace-history--muted {
    opacity: 0.9;
}

.workspace-profile--minimal {
    opacity: 1;
    padding: 10px 12px;
}

.workspace-profile--minimal .workspace-muted {
    display: none;
}

.workspace-card__actions {
    display: flex;
    gap: 6px;
}

.workspace-icon-btn {
    border: 1px solid rgba(70, 50, 30, 0.25);
    background: rgba(255, 255, 255, 0.6);
    color: #3a2f23;
    border-radius: 8px;
    width: 30px;
    height: 30px;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
}

.workspace-icon-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.workspace-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.workspace-tabpanel {
    display: block;
    margin-top: 10px;
}

.workspace-tabpanel--active {
    display: block;
}

.workspace-viewer-inline {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(70, 50, 30, 0.2);
}

.citation-viewer--inline {
    margin: 4px 10px 8px;
    border-color: transparent;
    background: transparent;
    max-height: none;
    overflow: visible;
}

.workspace-inline-title {
    margin: 0 0 10px;
    font-size: 14px;
    color: #3a2f23;
}

.workspace-card__header h2,
.workspace-card__header h3 {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8b7a68;
}

.workspace-desc {
    margin: 0;
    font-size: 14px;
    color: #8b7a68;
}

.workspace-muted {
    margin: 0;
    font-size: 13px;
    color: #8b7a68;
}

.workspace-pill {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(70, 50, 30, 0.1);
    color: #3a2f23;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.workspace-pill--muted {
    background: rgba(70, 50, 30, 0.05);
    color: rgba(70, 50, 30, 0.7);
}

.workspace-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: #4f4f4f;
}

.workspace-list--compact li {
    font-size: 12px;
}

.workspace-notes {
    gap: 12px;
}

.workspace-notes-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.workspace-notes-editor label {
    font-size: 12px;
    color: #8b7a68;
}

.workspace-notes-select {
    border-radius: 4px;
    border: 1px solid rgba(70, 50, 30, 0.2);
    padding: 5px 8px;
    background: transparent;
    color: #3a2f23;
    font-size: 13px;
}

.workspace-notes-editor textarea {
    border-radius: 4px;
    border: 1px solid rgba(70, 50, 30, 0.2);
    background: transparent;
    padding: 8px;
    font-size: 13px;
    color: #3a2f23;
    resize: vertical;
    min-height: 72px;
    box-sizing: border-box;
}

.workspace-notes-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.workspace-notes-actions button {
    border: none;
    background: #2b63c2;
    color: #fff;
    border-radius: 4px;
    padding: 5px 14px;
    cursor: pointer;
}

.workspace-notes-actions small {
    color: #8b7a68;
}

.workspace-notes-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.workspace-note-item {
    border: 1px solid rgba(70, 50, 30, 0.15);
    border-radius: 4px;
    padding: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.workspace-note-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #8b7a68;
}

.workspace-note-body {
    margin: 0;
    font-size: 13px;
    color: #3a2f23;
    line-height: 1.4;
}

.workspace-note-actions {
    display: flex;
    justify-content: flex-end;
}

.workspace-note-card {
    cursor: pointer;
}

.workspace-note-date {
    font-size: 11px;
    color: #8b7a68;
    padding: 0 12px 8px;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: #8c867f;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.icon-btn:hover,
.icon-btn:focus-visible {
    background: rgba(58, 47, 35, 0.06);
    border-color: rgba(70, 50, 30, 0.08);
    color: #3a2f23;
}

.icon-btn:active {
    transform: scale(0.96);
}

.icon-btn--active {
    color: #2b63c2;
    background: rgba(43, 99, 194, 0.1);
    border-color: rgba(43, 99, 194, 0.16);
}

.icon-btn--destructive {
    color: #8c867f;
    background: transparent;
    border-color: transparent;
}

.icon-btn--destructive:hover,
.icon-btn--destructive:focus-visible {
    background: rgba(198, 40, 40, 0.08);
    color: #c62828;
    border-color: rgba(198, 40, 40, 0.14);
}

.icon-btn__icon,
.icon-btn__icon svg {
    display: inline-flex;
    width: 16px;
    height: 16px;
}

.workspace-note-delete {
    margin-left: auto;
}

.is-removing {
    opacity: 0;
    transform: translateY(-2px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.workspace-passages-card.is-just-added {
    animation: bookmarkAddedPulse 0.45s ease;
}

@keyframes bookmarkAddedPulse {
    0% {
        background: rgba(43, 99, 194, 0.2);
        border-color: rgba(43, 99, 194, 0.7);
    }
    100% {
        background: transparent;
        border-color: rgba(70, 50, 30, 0.15);
    }
}

.empty-state {
    border: 1px dashed rgba(70, 50, 30, 0.25);
    border-radius: 12px;
    padding: 14px 12px;
    background: rgba(255, 255, 255, 0.28);
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.empty-icon {
    font-size: 13px;
    color: #8b7a68;
    line-height: 1;
}

.empty-title {
    font-size: 13px;
    font-weight: 600;
    color: #3a2f23;
}

.workspace-notes-editor textarea::placeholder,
.workspace-writer textarea::placeholder {
    color: #8b7a68;
}

.workspace-notes-editor textarea:focus::placeholder,
.workspace-writer textarea:focus::placeholder {
    color: rgba(139, 122, 104, 0.35);
}

.empty-action {
    font-size: 12px;
    color: #8b7a68;
}

.workspace-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
    color: #4f4f4f;
}

.workspace-notes-actions button:not(:disabled):hover {
    background: rgba(43, 99, 194, 0.2);
    border-color: rgba(43, 99, 194, 0.5);
}

.workspace-notes-actions button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: rgba(43, 99, 194, 0.06);
    border-color: rgba(43, 99, 194, 0.2);
    color: rgba(43, 99, 194, 0.55);
}

.workspace-notes-actions small {
    color: #8b7a68;
}

.workspace-passages-body {
    padding: 4px 12px 8px;
    font-size: 12px;
    color: #8b7a68;
    line-height: 1.35;
    display: block;
    position: relative;
    max-height: calc(1.5 * 1.35em);
    overflow: hidden;
    white-space: normal;
}

.workspace-passages-body::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 46%;
    height: 1.05em;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(247, 244, 236, 0), rgba(247, 244, 236, 0.95));
}

.workspace-passages-card.passage-expanded > .workspace-passages-body {
    display: none;
}

.workspace-passages-expanded {
    padding: 0 12px 10px;
}

.workspace-passages-expanded__text {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: #3a2f23;
    white-space: pre-wrap;
}

.workspace-passages-expanded__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.workspace-passages-expanded__links a {
    font-size: 12px;
    color: #2b63c2;
    text-decoration: none;
}

.workspace-passages-expanded__links a:hover {
    text-decoration: underline;
}

.workspace-note-card .workspace-passages-body {
    color: #3a2f23;
}

.note-viewer--inline {
    margin-top: 2px;
}

.workspace-writer__actions button {
    border: 1px solid rgba(43, 99, 194, 0.35);
    background: rgba(43, 99, 194, 0.1);
    color: #2b63c2;
    border-radius: 4px;
    padding: 5px 14px;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.workspace-writer__actions button:not(:disabled):hover {
    background: rgba(43, 99, 194, 0.2);
    border-color: rgba(43, 99, 194, 0.5);
}

.workspace-writer__actions button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: rgba(43, 99, 194, 0.06);
    border-color: rgba(43, 99, 194, 0.2);
    color: rgba(43, 99, 194, 0.55);
}

.workspace-history-item {
    border: 1px solid rgba(70, 50, 30, 0.13);
    border-radius: 4px;
    padding: 8px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    position: relative;
}

.workspace-history-item--active {
    border-color: rgba(43, 99, 194, 0.4);
    box-shadow: inset 0 0 0 1px rgba(43, 99, 194, 0.25);
    background: rgba(43, 99, 194, 0.06);
}

.workspace-history-item__badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 8px;
    background: rgba(43, 99, 194, 0.2);
    color: #2b63c2;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
}
.workspace-history-item__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.workspace-history-item__title {
    margin: 0;
    font-weight: 600;
    font-size: 13px;
}

.workspace-history-item__title-input {
    border: 1px solid rgba(70, 50, 30, 0.25);
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 13px;
    color: #3a2f23;
}

.workspace-history-item__meta {
    font-size: 11px;
    color: #8b7a68;
}

.workspace-history-item__delete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
}

.workspace-passages-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.workspace-passages-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.workspace-passages-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(70, 50, 30, 0.15);
    border-radius: 4px;
    background: transparent;
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
    cursor: pointer;
}

.workspace-passages-card:hover {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(43, 99, 194, 0.28);
    box-shadow: none;
}

.workspace-passages-card--active {
    border-color: rgba(43, 99, 194, 0.4);
    box-shadow: inset 0 0 0 1px rgba(43, 99, 194, 0.2);
}
.workspace-passages-card--selected {
    border-color: rgba(43, 99, 194, 0.5);
    background: rgba(43, 99, 194, 0.1);
}

.workspace-passages-card.is-selected {
    border-color: rgba(43, 99, 194, 0.58);
    background: rgba(43, 99, 194, 0.12);
    box-shadow: inset 0 0 0 1px rgba(43, 99, 194, 0.24);
}

.workspace-passages-card.is-selected::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: rgba(43, 99, 194, 0.9);
}

.workspace-passages-card.passage-expanded {
    animation: expandFade 0.22s ease;
}

@keyframes expandFade {
    from {
        opacity: 0.55;
        transform: translateY(-2px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.workspace-passages-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 8px 12px 0;
    box-sizing: border-box;
}

.workspace-passages-title {
    font-weight: 600;
    font-size: 13px;
    color: #3a2f23;
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.workspace-passages-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}

.workspace-passages-actions button {
    cursor: pointer;
}

.workspace-note-item--selected {
    border-color: rgba(43, 99, 194, 0.45);
    background: rgba(43, 99, 194, 0.08);
}

.workspace-passages-open {
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 12px;
    cursor: pointer;
    border: 1px solid rgba(43, 99, 194, 0.35);
    background: rgba(255, 255, 255, 0.7);
    color: #2b63c2;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.workspace-passages-open:hover {
    background: rgba(43, 99, 194, 0.12);
    border-color: rgba(43, 99, 194, 0.55);
    color: #1f4f9e;
}

.workspace-passages-delete {
    margin-left: 0;
}

.workspace-passages-bookmark {
    margin-left: 0;
}

.workspace-icon-btn:hover {
    background: rgba(43, 99, 194, 0.12);
    border-color: rgba(43, 99, 194, 0.45);
}

.session-new-chat:hover {
    background: rgba(43, 99, 194, 0.12);
    border-color: rgba(43, 99, 194, 0.45);
}


.workspace-button {
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
}

.workspace-button--ghost {
    background: rgba(70, 50, 30, 0.08);
    color: #3a2f23;
}

.workspace-button--active {
    background: rgba(43, 99, 194, 0.18);
    color: #2b63c2;
}

.workspace-button--ghost:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.workspace-collapse-toggle {
    position: absolute;
    top: -40px;
    right: 0;
    border: 1px solid rgba(70, 50, 30, 0.25);
    background: rgba(255, 255, 255, 0.4);
    color: #3a2f23;
    border-radius: 999px;
    padding: 6px 12px;
    cursor: pointer;
    box-shadow: none;
}

.workspace-link {
    display: inline-block;
    margin-top: 4px;
    font-size: 12px;
    color: #0066cc;
    text-decoration: none;
}

.workspace-history-btn {
    width: 100%;
    border: none;
    background: rgba(70, 50, 30, 0.08);
    border-radius: 8px;
    padding: 6px 8px;
    text-align: left;
    font-size: 12px;
    cursor: pointer;
}

.workspace-history-btn:hover {
    background: rgba(70, 50, 30, 0.15);
}

.workspace-note {
    background: rgba(70, 50, 30, 0.05);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 12px;
    color: #3a2f23;
}


.citation-viewer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid rgba(70, 50, 30, 0.18);
    border-radius: 4px;
    padding: 10px;
    background: transparent;
}

.citation-viewer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.citation-viewer__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #3a2f23;
}

.citation-viewer__tag {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8b7a68;
}

.citation-viewer__text {
    border: 1px solid rgba(70, 50, 30, 0.15);
    border-radius: 4px;
    padding: 8px 10px;
    background: rgba(70, 50, 30, 0.03);
    font-size: 13px;
    line-height: 1.5;
    color: #3a2f23;
}

.citation-viewer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.citation-viewer__links a {
    font-size: 12px;
    color: #2b63c2;
    text-decoration: none;
}

.citation-viewer__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.citation-viewer__actions--top {
    margin-bottom: 10px;
    justify-content: space-between;
}

.citation-viewer__actions--primary {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.citation-viewer__actions--nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.citation-viewer__btn {
    border: 1px solid rgba(70, 50, 30, 0.25);
    background: rgba(255, 255, 255, 0.6);
    color: #3a2f23;
    border-radius: 999px;
    font-size: 12px;
    padding: 3px 10px;
    cursor: pointer;
    line-height: 1.3;
}

.citation-viewer__icon-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 8px;
}

.citation-viewer__btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.citation-viewer__btn--active {
    background: rgba(43, 99, 194, 0.2);
    border-color: rgba(43, 99, 194, 0.4);
    color: #2b63c2;
}

.workspace-writer textarea {
    width: 100%;
    border-radius: 4px;
    border: 1px solid rgba(70, 50, 30, 0.2);
    background: transparent;
    padding: 8px;
    font-size: 13px;
    color: #3a2f23;
    resize: vertical;
    box-sizing: border-box;
    min-height: 72px;
}

.workspace-writer__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.workspace-writer__actions small {
    color: #8b7a68;
}

.writer-selected-citations {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.writer-selected-citations__title {
    margin: 0;
    font-size: 13px;
    color: #3a2f23;
}

.writer-citation-item {
    border: 1px solid rgba(70, 50, 30, 0.15);
    border-radius: 4px;
    background: transparent;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.writer-citation-item__meta {
    font-size: 12px;
    font-weight: 600;
    color: #3a2f23;
}

.writer-citation-item__preview {
    margin: 0;
    font-size: 12px;
    color: #8b7a68;
    line-height: 1.3;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: calc(2 * 1.3em);
}

.writer-citation-item__actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.writer-note-item__actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.writer-controls-row {
    display: grid;
    grid-template-columns: auto 1fr auto 1fr;
    gap: 8px;
    align-items: center;
}

.writer-controls-row label {
    font-size: 12px;
    color: #8b7a68;
}

.writer-notes,
.writer-output {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#writerOutput {
    min-height: 180px;
}

@media (min-width: 1024px) {
    .workspace-layout {
        flex-direction: row;
        align-items: flex-start;
        width: 100%;
    }

    .chat-panel {
        max-width: none;
    }

    .research-panel {
        max-width: var(--research-col-width, 260px);
        min-width: 0;
    }

    body {
        overflow-y: auto;
        padding: 16px;
    }
}
.about-nav {
        overflow: visible;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.landing-tagline {
    margin: 0;
    font-size: 14px;
    color: #8b7a68;
}

.about-hero {
    position: relative;
    min-height: 420px;
    padding: 40px 24px;
    background-color: #f8f1df;
    background-image: url('/pics/swedenborg_web.png');
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 50%;
    border-radius: 20px;
}

.about-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(247, 244, 236, 0.98) 0%, rgba(247, 244, 236, 0.6) 55%, rgba(247, 244, 236, 0.1) 90%);
    pointer-events: none;
    z-index: 1;
}
.about-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.avatar-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #fff;
    background: #8bbf72;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.avatar-dot.status-loading {
    border-top-color: transparent;
    background: #f0b45c;
    animation: spin 1s linear infinite;
    color: transparent;
}

.avatar-dot.status-error {
    background: #c7624a;
}

.avatar-dot.status-error::after {
    content: '!';
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes wave {
    0%, 100% {
        transform: translateY(4px);
        opacity: 0.55;
    }
    50% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.chat-suggestions-shell {
    position: relative;
    border-top: 1px solid var(--border-light);
    background: transparent;
}

.chat-suggestions-shell::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 40px;
    pointer-events: none;
    background: linear-gradient(to right, rgba(247, 244, 236, 0), rgba(247, 244, 236, 1));
}

.chat-suggestions-shell[hidden] {
    display: none;
}

.chat-suggestions {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    background: transparent;
    flex-wrap: nowrap;
    align-items: center;
    min-height: 48px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-gutter: stable;
    padding-right: 40px;
}

.chat-suggestions[hidden] {
    display: none;
}

.suggestion-pill {
    border-radius: 16px;
    border: 0;
    background: #5a4632;
    padding: 6px 12px;
    font-size: 13px;
    line-height: 1;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    white-space: nowrap;
    flex: 0 0 auto;
}

.suggestion-pill:hover {
    opacity: 0.85;
}

.suggestion-pill:active {
    transform: translateY(0);
}

.chat-suggestions--muted {
    opacity: 0.58;
}

.chat-suggestions--muted .suggestion-pill {
    background: rgba(90, 70, 50, 0.2);
    color: #5a4632;
}

.input-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(70, 50, 30, 0.25);
    box-shadow: none;
}

.control-button {
    border: 1px solid rgba(70, 50, 30, 0.25);
    background: rgba(255, 255, 255, 0.4);
    color: #8b7a68;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 6px 10px;
    min-width: 52px;
    height: 32px;
    border-radius: 8px;
    position: relative;
}

.control-button svg {
    width: 16px;
    height: 16px;
}

.control-button.control-button--active {
    color: #2b63c2;
    border-color: rgba(43, 99, 194, 0.5);
}

#voiceButton.control-button--active::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 12px;
    border: 2px solid rgba(43, 99, 194, 0.22);
    animation: voicePulse 1.35s ease-out infinite;
    pointer-events: none;
}

#voiceButton.control-button--active {
    background: rgba(43, 99, 194, 0.12);
    border-color: rgba(43, 99, 194, 0.5);
    color: #2b63c2;
}

@keyframes voicePulse {
    0% {
        transform: scale(0.92);
        opacity: 0.85;
    }
    70% {
        transform: scale(1.08);
        opacity: 0;
    }
    100% {
        transform: scale(1.08);
        opacity: 0;
    }
}

.control-button:disabled {
    opacity: 0.4;
    cursor: default;
}

.control-button:hover {
    color: #c8b59b;
}

.input-bar #sendButton {
    padding: 10px 22px;
    border-radius: 18px;
    background: rgba(43, 99, 194, 0.1);
    border: 1px solid rgba(43, 99, 194, 0.35);
    color: #2b63c2;
    font-weight: 600;
    box-shadow: none;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.input-bar #sendButton:not(:disabled):hover {
    background: rgba(43, 99, 194, 0.2);
    border-color: rgba(43, 99, 194, 0.5);
}

.input-bar #sendButton:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: rgba(43, 99, 194, 0.06);
    border-color: rgba(43, 99, 194, 0.2);
    color: rgba(43, 99, 194, 0.55);
}

.input-bar textarea {
    width: 100%;
    border: none;
    resize: none;
    font-size: 16px;
    line-height: 1.5;
    color: #3a2f23;
    min-height: 40px;
    background: transparent;
}

.input-bar textarea::placeholder {
    color: #8b7a68;
}

.input-bar textarea:focus::placeholder {
    color: rgba(139, 122, 104, 0.35);
}

.input-bar textarea:focus {
    outline: none;
}

.input-bar.disabled {
    opacity: 0.6;
}

button {
    border: none;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .app-layout {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .research-panel {
        width: 100%;
        max-width: none;
        position: static;
    }

    .writer-panel {
        width: 100%;
        max-width: none;
        min-width: 0;
        justify-self: stretch;
    }

    .chat-input {
        padding: 0 12px 18px;
    }

    #ttsButton {
        display: none;
    }

    .chat-suggestions {
        padding: 10px 12px;
        padding-bottom: max(10px, env(safe-area-inset-bottom, 10px));
    }
}

/* Chat bubbles */
.message {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 16px;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
}

.message-content {
    display: block;
}

.message-sources {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
}

.message-sources--bridge .sources-label--bridge {
    color: #7a6a54;
    font-style: italic;
}

.message-sources--bridge .message-source-chip__label {
    opacity: 0.78;
}

.message-source-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 4px 2px 7px;
    border-radius: 999px;
    background: rgba(58, 47, 35, 0.06);
    border: 1px solid rgba(70, 50, 30, 0.08);
}

.message-source-chip__label {
    font-size: 10px;
    color: #5f5a54;
    white-space: nowrap;
}

.message-source-chip__label-btn {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-source-chip__label-btn:hover {
    color: #2b63c2;
}

.message-source-chip__actions {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.message-source-chip__actions .icon-btn {
    width: 22px;
    height: 22px;
    border-radius: 999px;
}

.message-source-overflow {
    border: 1px solid rgba(70, 50, 30, 0.14);
    background: rgba(255, 255, 255, 0.45);
    color: #5f5a54;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 10px;
    cursor: pointer;
}

.message-source-overflow:hover {
    border-color: rgba(43, 99, 194, 0.3);
    color: #2b63c2;
}

.message-source-stack {
    border: 1px solid rgba(70, 50, 30, 0.08);
    background: rgba(58, 47, 35, 0.06);
    color: #5f5a54;
    border-radius: 999px;
    padding: 2px 5px 2px 7px;
    font-size: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 160px;
}

.message-source-stack:hover {
    border-color: rgba(43, 99, 194, 0.3);
    color: #2b63c2;
}

.message-source-stack__ghosts {
    display: inline-flex;
    align-items: center;
    min-width: 28px;
}

.message-source-stack__ghost {
    width: 12px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 999px;
    border: 1px solid rgba(70, 50, 30, 0.2);
    background: rgba(247, 244, 236, 0.96);
}

.message-source-stack__ghost + .message-source-stack__ghost {
    margin-left: -2px;
}

.message-source-stack__ghost:nth-child(1) { opacity: 0.5; }
.message-source-stack__ghost:nth-child(2) { opacity: 0.64; }
.message-source-stack__ghost:nth-child(3) { opacity: 0.78; }
.message-source-stack__ghost:nth-child(4) { opacity: 0.9; }

.message-source-stack__text {
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-tools-menu--sources {
    min-width: 260px;
    max-width: min(380px, calc(100vw - 20px));
}

@media (prefers-reduced-motion: reduce) {
    .message-source-stack,
    .message-source-chip__label-btn,
    .locale-btn {
        transition: none;
    }
}

.message-tools-source-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-radius: 8px;
    padding: 2px;
}

.message-tools-source-label {
    border: none;
    background: transparent;
    text-align: left;
    flex: 1 1 auto;
    min-width: 0;
    padding: 6px 8px;
    border-radius: 7px;
    font-size: 12px;
    color: #3a2f23;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-tools-source-label:hover,
.message-tools-source-label:focus-visible {
    background: rgba(43, 99, 194, 0.1);
    color: #1f4f9e;
}

.message-tools-source-bookmark {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 999px;
}

.bookmark-fly-token {
    position: fixed;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(43, 99, 194, 0.12);
    border: 1px solid rgba(43, 99, 194, 0.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 2600;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bookmark-fly-token__icon,
.bookmark-fly-token__icon svg {
    width: 14px;
    height: 14px;
    color: #2b63c2;
}

.source-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: 20px;
    z-index: 999;
}

.source-modal.hidden {
    display: none;
}

.source-modal__panel {
    width: min(640px, 100%);
    max-height: 80vh;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 18px 18px 0 0;
    border: 1px solid rgba(70, 50, 30, 0.25);
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.source-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    gap: 12px;
}

.source-modal__header h3 {
    margin: 0;
    font-size: 15px;
    flex: 1;
}

.source-modal__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.source-modal__action-btn {
    height: 32px;
    width: 32px;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.source-modal__action-btn svg {
    width: 16px;
    height: 16px;
}

.source-modal__action-btn--icon {
    width: 32px;
    padding: 0;
    justify-content: center;
}

.source-modal__translation {
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(70, 50, 30, 0.18);
    border-radius: 8px;
    padding: 10px 12px;
    white-space: pre-wrap;
}

.source-modal__translation-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #8b7a68;
    font-size: 12px;
}

.source-modal__translation-meta strong {
    font-weight: 500;
}

.source-modal__translation-link {
    border: none;
    padding: 0;
    background: transparent;
    color: #2b63c2;
    font: inherit;
    cursor: pointer;
}

.source-modal__translation-link:hover {
    text-decoration: underline;
}

.source-modal__translation-loading {
    padding: 18px 16px;
    border: 1px solid rgba(70, 50, 30, 0.14);
    border-radius: 10px;
    color: #8b7a68;
    background: rgba(255, 255, 255, 0.42);
}

.source-modal__translation--animated {
    animation: sourceTranslationSwapIn 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.source-modal__translation-loading--animated {
    animation: sourceTranslationSwapIn 260ms cubic-bezier(0.2, 0.8, 0.2, 1), sourceTranslationPulse 900ms ease-in-out infinite;
}

@keyframes sourceTranslationSwapIn {
    from {
        opacity: 0;
        transform: translateY(8px);
        filter: blur(1.5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes sourceTranslationPulse {
    0%, 100% {
        opacity: 0.72;
    }
    50% {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .source-modal__translation--animated,
    .source-modal__translation-loading--animated {
        animation: none;
    }
}

.source-modal__body {
    padding: 16px;
    font-size: 14px;
    line-height: 1.5;
    overflow-y: auto;
    white-space: pre-wrap;
}

.bible-context-block {
    background: #fefcf3;
    border-left: 4px solid #efd889;
    padding: 12px 14px;
    border-radius: 10px;
    margin: 10px 0;
    font-size: 15px;
    line-height: 1.5;
    color: #3a2f23;
}
.bible-context {
    display: inline;
    font-weight: 400;
    color: #8b7a68;
}
.bible-context.main {
    font-weight: 600;
    color: #3a2f23;
    padding: 0 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(70, 50, 30, 0.25);
}

.swedenborg-context-block {
    background: rgba(255, 255, 255, 0.4);
    border-left: 4px solid rgba(70, 50, 30, 0.25);
    padding: 14px 16px;
    border-radius: 10px;
    margin: 10px 0;
    font-size: 15px;
    line-height: 1.55;
    color: #3a2f23;
}
.swedenborg-context-block p {
    margin: 0 0 10px;
}
.swedenborg-context-block p:last-child {
    margin-bottom: 0;
}

.citation-link {
    border: none;
    background: rgba(43, 99, 194, 0.1);
    color: #2b63c2;
    border-radius: 999px;
    padding: 2px 8px;
    margin: 0 2px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
}

.citation {
    display: inline-flex;
    align-items: center;
    border: none;
    background: rgba(43, 99, 194, 0.1);
    color: #2b63c2;
    border-radius: 999px;
    padding: 1px 7px;
    margin: 0 2px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
}

.glossary-term {
    border-bottom: 1px dotted #8b7355;
    cursor: help;
}

.glossary-tooltip {
    position: absolute;
    background: #fffdf7;
    border: 1px solid #d8cfc0;
    padding: 10px;
    border-radius: 6px;
    max-width: 260px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 2200;
    font-size: 12.5px;
    line-height: 1.4;
    color: #3a2f23;
}

.message-actions {
    margin-top: 8px;
    display: flex;
    justify-content: flex-start;
}

.message-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.message-tools-menu {
    position: absolute;
    z-index: 2300;
    min-width: 180px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(70, 50, 30, 0.2);
    border-radius: 10px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.message-tools-menu__item {
    border: none;
    background: transparent;
    text-align: left;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    color: #3a2f23;
    cursor: pointer;
}

.message-tools-menu__item:hover,
.message-tools-menu__item:focus-visible {
    background: rgba(43, 99, 194, 0.1);
    color: #1f4f9e;
}

.deepen-btn {
    border: 1px solid rgba(70, 50, 30, 0.25);
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.75);
    color: #3a2f23;
    font-size: 12px;
    cursor: pointer;
}

.deepen-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.highlight {
    background: #fff3a0;
    transition: background 2s ease;
}
.user {
    align-self: flex-end;
    background-color: rgba(255, 255, 255, 0.5);
    border-bottom-right-radius: 4px;
}

.ai {
    align-self: flex-start;
    background-color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(70, 50, 30, 0.25);
    border-bottom-left-radius: 4px;
}

.message.system {
    align-self: center;
    background-color: #ffecec;
    border: 1px dashed #f28b82;
    color: #c62828;
}

@media (max-width: 768px) {
    html, body {
        overflow-y: auto;
        height: auto;
    }

    .app-shell {
        min-width: 0;
        flex: 1 1 auto;
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    .writer-panel {
        width: 100%;
        max-width: none;
        min-width: 0;
        flex: 1 1 auto;
        justify-self: stretch;
    }

    .research-collapse {
        position: static;
        transform: none;
        width: 100%;
        height: 32px;
        border-radius: 8px;
    }

    .app-layout {
        grid-template-columns: 1fr;
        min-height: 0;
        flex: 1 0 auto;
    }

    .drag-handle {
        display: none;
    }

    .chat-panel {
        min-height: calc(100vh - 220px);
    }

    .research-panel {
        width: auto;
        max-width: none;
        position: static;
        max-height: none;
        margin-top: 12px;
        align-self: stretch;
    }
}

@media (max-width: 960px) {
    .app-layout {
        grid-template-columns: 1fr;
        gap: 12px;
        height: auto;
        overflow: hidden;
    }

    .drag-handle {
        display: none;
    }

    .left-panel,
    .right-panel,
    .chat-panel--main,
    .chat-panel,
    .research-panel,
    .writer-panel {
        height: auto;
    }

    .chat-panel {
        order: 1;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        justify-self: stretch;
    }

    .research-panel {
        order: 2;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        max-height: none;
        position: static;
        align-self: stretch;
    }

    body.has-collapsed-research .research-panel {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        max-height: 56px;
    }

    body.has-collapsed-research .app-layout {
        grid-template-columns: 1fr;
    }

    .writer-panel {
        order: 3;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        justify-self: stretch;
    }
}
.control-row button {
    border: none;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
}
.chat-input {
    padding: 0;
    margin-top: 0;
    flex-shrink: 0;
}

.chat-input-wrapper {
    flex: 0 0 auto;
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: var(--bg);
    padding-bottom: clamp(10px, 2vh, 24px);
}

.input-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(70, 50, 30, 0.25);
    box-shadow: none;
}

.input-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 16px;
    margin-top: 2px;
}

.input-icons {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: auto;
}
.topic-bar {
    margin: 4px 0 0;
}
.tos-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.tos-modal {
    background: #fffef7;
    border-radius: 18px;
    padding: 24px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: center;
}

.tos-modal h2 {
    margin: 0;
    font-size: 20px;
    color: #3a2f23;
}

.tos-link {
    margin: 0;
    font-size: 13px;
}

.tos-link a {
    color: #2b63c2;
    text-decoration: underline;
}

.tos-consent {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #3a2f23;
}

.tos-modal button {
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    background: #2b63c2;
    color: #fff;
    cursor: pointer;
}

.tos-modal button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.about-hero__portrait-inline {
    display: none;
}

.about-hero__portrait-inline img {
    border: 1px solid rgba(70, 50, 30, 0.2);
    border-radius: 20px;
    width: 100%;
    object-fit: cover;
}

@media (max-width: 1099px) {
    .about-hero {
        background-size: 42%;
        background-position: calc(100% - 20px) center;
        padding-right: 200px;
    }
    .about-hero__text {
        max-width: 440px;
    }
}

@media (max-width: 699px) {
    .about-nav {
        flex-direction: column;
        align-items: flex-start;
    }
    .about-hero {
        background: none;
        padding: 24px 12px;
    }
    .about-hero__portrait-inline {
        display: block;
        margin-bottom: 16px;
    }
    .about-hero__portrait-inline img {
        border-radius: 20px;
    }
    .about-hero__text {
        max-width: none;
        width: 100%;
    }
}
.correspondence-field {
    min-height: 340px;
}

@media (max-width: 1099px) {
    .correspondence-field {
        min-height: 300px;
    }
    .correspondence-field__figure {
        opacity: 0.55;
    }
    .correspondence-field__labels .label--optional {
        display: none;
    }
.landing-hero__visual::before,
.landing-hero__visual::after {
        background-size: cover;
        background-position: center;
        opacity: 0.28;
    }
}

@media (max-width: 699px) {
    .landing-hero__visual {
        padding: 18px;
    }
.landing-hero__visual::before,
.landing-hero__visual::after {
        background-size: cover;
        background-position: center 15%;
        opacity: 0.22;
    }
    .correspondence-field {
        min-height: 220px;
    }
    .correspondence-field__figure {
        opacity: 0.45;
    }
    .correspondence-field__labels .label:not(.label--core) {
        display: none;
    }
    .correspondence-field__watermark {
        opacity: 0.55;
        font-size: 15px;
    }
}
.hero-link {
    font-size: 14px;
    color: var(--cl-blue);
    text-decoration: none;
}

.hero-link:hover {
    text-decoration: underline;
}
.signup-page {
    background: #f7f4ec;
    color: #3a2f23;
    font-family: Arial, sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 32px 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.signup-shell {
    max-width: 560px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
}

.signup-brand {
    justify-content: flex-start;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.signup-card {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(70, 50, 30, 0.25);
    border-radius: 20px;
    padding: 32px;
    text-align: left;
}

.signup-eyebrow {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8b7a68;
    margin: 0;
}

.signup-card h2 {
    margin: 6px 0 16px;
}

.signup-consent {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    margin: 16px 0;
    font-size: 14px;
}

.signup-card button {
    width: 100%;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #2b63c2, #295cb5);
    color: #fff;
    padding: 12px 18px;
    font-size: 15px;
}

.signup-card button:disabled {
    opacity: 0.6;
}

.signup-note {
    font-size: 12px;
    color: #8b7a68;
}

.signup-login a {
    color: #2b63c2;
}

.signup-footer {
    font-size: 12px;
    color: #8b7a68;
    text-align: center;
}
@keyframes grandManFade {
    0% { opacity: 0.85; }
    40% { opacity: 0.85; }
    50% { opacity: 0; }
    90% { opacity: 0; }
    100% { opacity: 0.85; }
}
