/* ================================================================
   NeuroEvidence.ai — Stylesheet
   ================================================================ */

:root {
    --bg:         #f8f9fc;
    --white:      #ffffff;
    --navy:       #0a1628;
    --navy-light: #1b2d4a;
    --teal:       #00a896;
    --teal-dark:  #008f7f;
    --teal-bg:    #e6f7f5;
    --amber-bg:   #fef9ec;
    --amber-border: #e5b94e;
    --gray-100:   #f1f3f6;
    --gray-200:   #e8ecf0;
    --gray-400:   #a0aab4;
    --gray-500:   #6b7a8d;
    --gray-600:   #4a5568;
    --shadow-sm:  0 1px 3px rgba(10,22,40,0.06);
    --shadow-md:  0 4px 16px rgba(10,22,40,0.07);
    --shadow-lg:  0 8px 32px rgba(10,22,40,0.08);
    --radius:     12px;
    --radius-sm:  8px;
    --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: "DM Sans", system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--navy);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* ── Nav ──────────────────────────────────────────────────── */

.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--gray-200);
}

.nav-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: "DM Sans", sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--navy);
    text-decoration: none;
    letter-spacing: -0.3px;
}

.nav-logo span { color: var(--teal); }

.nav-tagline {
    font-size: 0.82rem;
    color: var(--gray-500);
    display: none;
}

@media (min-width: 640px) {
    .nav-tagline { display: block; }
}

/* ── Hero ─────────────────────────────────────────────────── */

.hero {
    max-width: 720px;
    margin: 0 auto;
    padding: 4.5rem 1.5rem 2rem;
    text-align: center;
}

.hero-title {
    font-family: "DM Serif Display", serif;
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 400;
    color: var(--navy);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.hero-sub {
    margin-top: 0.75rem;
    font-size: 1.08rem;
    color: var(--gray-500);
    font-weight: 400;
}

/* ── Search ───────────────────────────────────────────────── */

.search-form {
    margin-top: 2.25rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 60px;
    padding: 0.35rem 0.4rem 0.35rem 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.search-box:focus-within {
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(0,168,150,0.10);
}

.search-icon {
    width: 20px;
    height: 20px;
    color: var(--gray-400);
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 1rem;
    color: var(--navy);
    padding: 0.65rem 0.75rem;
    background: transparent;
}

.search-box input::placeholder {
    color: var(--gray-400);
}

#submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1.4rem;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--white);
    background: var(--teal);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition), transform 0.15s;
}

#submit-btn svg {
    width: 16px;
    height: 16px;
}

#submit-btn:hover { background: var(--teal-dark); }
#submit-btn:active { transform: scale(0.97); }
#submit-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ── Chips ────────────────────────────────────────────────── */

.chips {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.chip {
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 50px;
    padding: 0.45rem 1rem;
    cursor: pointer;
    transition: all var(--transition);
}

.chip:hover {
    border-color: var(--teal);
    color: var(--teal);
    background: var(--teal-bg);
}

.powered {
    margin-top: 1.75rem;
    font-size: 0.78rem;
    color: var(--gray-400);
}

.powered strong {
    font-weight: 600;
    color: var(--gray-500);
}

/* ── Feature Cards ────────────────────────────────────────── */

.features {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem 1.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.feature-card {
    position: relative;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 1.75rem 1.25rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--teal), #34d399);
    opacity: 0;
    transition: opacity var(--transition);
}

.feature-card:hover {
    border-color: rgba(0,168,150,0.3);
    box-shadow: 0 8px 30px rgba(0,168,150,0.1);
    transform: translateY(-3px);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--teal-bg), rgba(0,168,150,0.15));
    border-radius: 14px;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: var(--teal);
}

.feature-card h3 {
    font-family: "DM Sans", sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.45rem;
    letter-spacing: -0.2px;
}

.feature-card p {
    font-size: 0.78rem;
    color: var(--gray-500);
    line-height: 1.55;
}

/* ── Testimonials (scrolling marquee) ─────────────────────── */

.testimonials {
    width: 100%;
    overflow: hidden;
    padding: 0 0 2.5rem;
    position: relative;
    mask-image: linear-gradient(90deg, transparent 0%, black 15%, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 15%, black 85%, transparent 100%);
}

.scroll-track {
    overflow: hidden;
}

.scroll-inner {
    display: flex;
    gap: 1rem;
    animation: scroll-marquee 45s linear infinite;
    width: max-content;
}

.scroll-inner:hover {
    animation-play-state: paused;
}

@keyframes scroll-marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.scroll-item {
    flex-shrink: 0;
    width: 300px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    box-shadow: var(--shadow-sm);
}

.scroll-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--white);
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.author-name {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.2;
}

.author-role {
    display: block;
    font-size: 0.65rem;
    color: var(--gray-400);
}

.scroll-stars {
    margin-left: auto;
    color: var(--teal);
    font-size: 0.78rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.scroll-stars svg {
    width: 14px;
    height: 14px;
}

.scroll-item p {
    font-size: 0.78rem;
    color: var(--gray-600);
    line-height: 1.5;
    font-style: italic;
    margin: 0;
}

@media (max-width: 640px) {
    .scroll-item { width: 260px; }
    .scroll-inner { animation-duration: 35s; }
}

@media (max-width: 640px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .feature-card { padding: 1.25rem 1rem; }
}

/* ── Loading ──────────────────────────────────────────────── */

.loading {
    text-align: center;
    padding: 3rem 1.5rem 4rem;
}

.spinner-ring {
    width: 44px;
    height: 44px;
    margin: 0 auto 1.25rem;
    position: relative;
}

.spinner-ring div {
    width: 44px;
    height: 44px;
    border: 3.5px solid var(--gray-200);
    border-top-color: var(--teal);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

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

.loading-text {
    font-size: 0.95rem;
    color: var(--gray-500);
    animation: pulse-text 2s ease-in-out infinite;
}

@keyframes pulse-text {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}

/* ── Results ──────────────────────────────────────────────── */

.results {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
    animation: fadeUp 0.5s ease-out both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.results-inner {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-100);
}

.results-meta {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gray-500);
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--gray-500);
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    padding: 0.35rem 0.7rem;
    cursor: pointer;
    transition: all var(--transition);
}

.copy-btn svg { width: 14px; height: 14px; }
.copy-btn:hover { border-color: var(--teal); color: var(--teal); }

/* ── Answer Card Sections ─────────────────────────────────── */

.answer-card {
    padding: 1.5rem;
    font-size: 0.93rem;
    line-height: 1.75;
    color: var(--navy-light);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Section containers generated by JS */
.answer-section {
    margin-bottom: 1.5rem;
}

.answer-section:last-child { margin-bottom: 0; }

/* Bottom Line */
.section-bottom-line {
    border-left: 4px solid var(--teal);
    background: var(--teal-bg);
    padding: 1rem 1.25rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.section-bottom-line .section-heading {
    color: var(--teal-dark);
}

.section-bottom-line p {
    font-weight: 500;
    color: var(--navy);
}

/* Clinical Caveats */
.section-clinical-caveats {
    border-left: 4px solid var(--amber-border);
    background: var(--amber-bg);
    padding: 1rem 1.25rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.section-clinical-caveats .section-heading {
    color: #92700c;
}

/* Supporting Evidence */
.section-supporting-evidence ul {
    margin: 0.25rem 0 0 1.1rem;
}

.section-supporting-evidence li {
    margin-bottom: 0.45rem;
}

/* Section headings */
.section-heading {
    font-family: "DM Sans", sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

/* Generic answer (fallback) */
.answer-card p {
    margin-bottom: 0.5rem;
}

.answer-card ul, .answer-card ol {
    margin: 0.35rem 0 0.6rem 1.25rem;
}

.answer-card li {
    margin-bottom: 0.35rem;
}

.answer-card strong, .answer-card b {
    font-weight: 600;
    color: var(--navy);
}

/* ── Trials Bar ───────────────────────────────────────────── */

.trials-bar {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-100);
}

.trials-bar h4 {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--gray-500);
    margin-bottom: 0.6rem;
}

.trial-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.trial-pill {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--teal-dark);
    background: var(--teal-bg);
    border: 1px solid rgba(0,168,150,0.2);
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    text-decoration: none;
    transition: all var(--transition);
}

.trial-pill-link:hover {
    background: var(--teal);
    color: var(--white);
    border-color: var(--teal);
}

/* ── Feedback Buttons ─────────────────────────────────────── */

.results-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.feedback-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition);
    padding: 0;
}

.feedback-btn svg { width: 16px; height: 16px; color: var(--gray-400); }
.feedback-btn:hover { border-color: var(--teal); }
.feedback-btn:hover svg { color: var(--teal); }
.feedback-btn.active { background: var(--teal-bg); border-color: var(--teal); }
.feedback-btn.active svg { color: var(--teal); }

.feedback-down.active { background: #fef2f2; border-color: #f87171; }
.feedback-down.active svg { color: #ef4444; }

/* ── Correction Box ──────────────────────────────────────── */

.correction-box {
    padding: 0.75rem 1.5rem 1rem;
    border-top: 1px solid var(--gray-200);
    background: #fef9ec;
}

.correction-box textarea {
    width: 100%;
    padding: 0.6rem;
    font-family: inherit;
    font-size: 0.85rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    resize: vertical;
    outline: none;
}

.correction-box textarea:focus { border-color: var(--teal); }

.correction-submit {
    margin-top: 0.5rem;
    padding: 0.45rem 1rem;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--white);
    background: var(--teal);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background var(--transition);
}

.correction-submit:hover { background: var(--teal-dark); }

/* ── Follow-up Questions ─────────────────────────────────── */

.followups {
    padding: 0.85rem 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.followups h4 {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.followup-chips {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.followup-chip {
    display: block;
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--teal-dark);
    background: var(--teal-bg);
    border: 1px solid rgba(0,168,150,0.15);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.85rem;
    cursor: pointer;
    transition: all var(--transition);
}

.followup-chip:hover {
    background: var(--teal);
    color: var(--white);
    border-color: var(--teal);
}

/* ── Nav Settings Badge ──────────────────────────────────── */

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-badge {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 0.3rem 0.7rem;
    border-radius: 50px;
    display: none;
}

@media (min-width: 640px) {
    .settings-badge { display: inline-block; }
}

.settings-gear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition);
    padding: 0;
}

.settings-gear svg { width: 16px; height: 16px; color: var(--gray-400); }
.settings-gear:hover { border-color: var(--teal); }
.settings-gear:hover svg { color: var(--teal); }

/* ── Scenario Banner ──────────────────────────────────────── */

.scenario-banner {
    padding: 0.55rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--teal) !important;
}

.scenario-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--white);
}

/* ── Chat History ─────────────────────────────────────────── */

.chat-history {
    padding: 0;
    border-bottom: 1px solid var(--gray-200);
}

.chat-msg {
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
}

.chat-msg:last-child { border-bottom: none; }

.chat-msg-user {
    background: var(--gray-100);
}

.chat-msg-user .chat-msg-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.chat-msg-assistant .chat-msg-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--teal);
    margin-bottom: 0.25rem;
}

.chat-msg-content {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--navy-light);
}

.chat-msg-content strong { color: var(--navy); }
.chat-msg-content ul, .chat-msg-content ol { margin: 0.3rem 0 0.5rem 1.25rem; }
.chat-msg-content li { margin-bottom: 0.25rem; }
.chat-msg-content p { margin-bottom: 0.4rem; }

/* ── Chat Input Bar ───────────────────────────────────────── */

.chat-input-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-top: 2px solid var(--teal);
    background: var(--teal-bg);
}

.chat-input {
    flex: 1;
    padding: 0.6rem 0.85rem;
    font-family: inherit;
    font-size: 0.9rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    outline: none;
    background: var(--white);
}

.chat-input:focus { border-color: var(--teal); }

.chat-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--teal);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition);
    padding: 0;
    flex-shrink: 0;
}

.chat-send svg { width: 18px; height: 18px; color: var(--white); }
.chat-send:hover { background: var(--teal-dark); }

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

.again-btn {
    display: block;
    width: 100%;
    padding: 0.9rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--teal);
    background: transparent;
    border: none;
    border-top: 1px solid var(--gray-200);
    cursor: pointer;
    transition: background var(--transition);
}

.again-btn:hover {
    background: var(--teal-bg);
}

/* ── Error Toast ──────────────────────────────────────────── */

.error-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #fff0f0;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 0.85rem 1.4rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 200;
    animation: fadeUp 0.35s ease-out;
}

.error-toast svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ── Footer ───────────────────────────────────────────────── */

.footer {
    margin-top: auto;
    text-align: center;
    padding: 1.5rem;
}

.footer p {
    font-size: 0.76rem;
    color: var(--gray-400);
}

/* ── Settings Panel ───────────────────────────────────────── */

.settings-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,22,40,0.4);
    backdrop-filter: blur(4px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.settings-panel {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 420px;
    overflow: hidden;
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-100);
}

.settings-header h3 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
}

.settings-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--gray-400);
    cursor: pointer;
    line-height: 1;
    padding: 0 0.25rem;
}

.settings-close:hover { color: var(--navy); }

.settings-body {
    padding: 1.25rem;
}

.setting-group {
    margin-bottom: 1.25rem;
}

.setting-group:last-child { margin-bottom: 0; }

.setting-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.4rem;
}

.setting-select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--navy);
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    outline: none;
    cursor: pointer;
    transition: border-color var(--transition);
    appearance: auto;
}

.setting-select:focus { border-color: var(--teal); }

.setting-hint {
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: var(--gray-400);
    line-height: 1.4;
}

.setting-divider {
    border-top: 1px solid var(--gray-200);
    margin: 0.25rem 0 1.25rem;
}

/* ── Slider ──────────────────────────────── */

.slider-wrap {
    padding: 0.25rem 0;
}

.setting-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.setting-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--teal);
    border-radius: 50%;
    border: 2px solid var(--white);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: transform 0.15s;
}

.setting-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.setting-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--teal);
    border-radius: 50%;
    border: 2px solid var(--white);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    cursor: pointer;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.3rem;
    font-size: 0.72rem;
    color: var(--gray-400);
    font-weight: 500;
}

/* ── Utility ──────────────────────────────────────────────── */

.hidden { display: none !important; }

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

@media (max-width: 640px) {
    .hero {
        padding: 2.5rem 1rem 1.5rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-sub {
        font-size: 0.95rem;
    }

    .search-box {
        border-radius: var(--radius);
        flex-wrap: wrap;
        padding: 0.5rem;
    }

    .search-icon {
        display: none;
    }

    .search-box input {
        width: 100%;
        padding: 0.6rem 0.5rem;
    }

    #submit-btn {
        width: 100%;
        justify-content: center;
        border-radius: var(--radius-sm);
        padding: 0.75rem;
    }

    .chip {
        font-size: 0.78rem;
        padding: 0.4rem 0.8rem;
    }

    .results {
        padding: 0 0.75rem 2rem;
    }

    .answer-card {
        padding: 1.25rem 1rem;
    }

    .results-header {
        padding: 0.85rem 1rem;
    }

    .trials-bar {
        padding: 0.85rem 1rem;
    }
}
