/* ═══════════════════════════════════════════════════
   LOCUS — /ask dashboard
   Reuses the variables + nav/footer from styles.css
   ═══════════════════════════════════════════════════ */

.ask-main {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 7rem 1.5rem 4rem;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(74, 200, 192, 0.05) 0%, transparent 55%),
        var(--bg);
}

.ask-console {
    width: 100%;
    max-width: 820px;
}

.ask-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text);
    margin-bottom: 1rem;
}

.ask-intro {
    color: var(--text-dim);
    font-size: 0.92rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    max-width: 70ch;
}

.ask-intro code {
    font-family: var(--font-display);
    font-size: 0.85em;
    color: var(--accent);
}

/* ── Inputs ─────────────────────────────────────── */

.ask-input,
.ask-textarea,
.ask-select {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 0.85rem 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ask-input:focus,
.ask-textarea:focus,
.ask-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(74, 200, 192, 0.12);
}

.ask-textarea {
    resize: vertical;
    min-height: 3.5rem;
    line-height: 1.6;
}

.ask-controls {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.85rem;
    align-items: stretch;
}

.ask-select {
    flex: 1;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%23888' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.4rem;
}

/* ── Button ─────────────────────────────────────── */

.ask-btn {
    background: var(--accent);
    color: var(--bg);
    border: 1px solid var(--accent);
    border-radius: 4px;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.85rem 1.8rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, opacity 0.2s;
    white-space: nowrap;
}

.ask-btn:hover:not(:disabled) {
    background: #5fd6ce;
    transform: translateY(-1px);
}

.ask-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Gate ───────────────────────────────────────── */

.ask-gate {
    border: 1px solid var(--border);
    background: var(--bg-subtle);
    border-radius: 6px;
    padding: 2rem;
    max-width: 460px;
}

.ask-gate-note {
    color: var(--text-dim);
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

#gate-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ask-turnstile {
    min-height: 0;
}

/* ── Status / errors ────────────────────────────── */

.ask-status {
    margin-top: 1.5rem;
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.ask-status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 1.1s ease-in-out infinite;
}

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

.ask-error {
    margin-top: 1rem;
    color: #ff6b5e;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* ── Answer ─────────────────────────────────────── */

#result { margin-top: 2rem; }

.ask-answer {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 2px solid var(--accent);
    border-radius: 4px;
    padding: 1.5rem 1.75rem;
    color: var(--text);
    font-size: 0.98rem;
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.ask-answer.muted {
    border-left-color: var(--text-muted);
    color: var(--text-dim);
}

.ask-answer .cite {
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 0.82em;
}

.ask-sources-head {
    font-family: var(--font-display);
    font-size: 0.62rem;
    letter-spacing: 0.3em;
    color: var(--accent);
    margin: 2rem 0 1rem;
}

.ask-sources {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.src-card {
    background: var(--bg-card);
    padding: 1rem 1.25rem;
    transition: background 0.2s;
}

.src-card:hover { background: var(--bg-elevated); }

.src-head {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}

.src-n {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent);
}

.src-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

a.src-title:hover { color: var(--accent); text-decoration: underline; }

.src-label {
    margin-left: auto;
    font-family: var(--font-display);
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.src-text {
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ── Responsive ─────────────────────────────────── */

@media (max-width: 600px) {
    .ask-controls { flex-direction: column; }
    .ask-gate { padding: 1.5rem; }
}
