:root {
    --primary: #5a4f8a;
    --primary-hover: #4a636e;
    --secondary: #e6ecef;
    --bg-color: #f6f4fb;
    --card-bg: #ffffff;
    --text-main: #2d3748;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --success: #48bb78;
    --warning: #ed8936;
    --transition: all 0.3s ease;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --radius: 16px;
}

/* ── Base ────────────────────────────────────────────────────────────────────── */

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

/* Arabic default font */
body, button, textarea, input {
    font-family: 'Cairo', 'Segoe UI', Arial, sans-serif;
}

/* English mode: switch primary font */
html[lang="en"] body,
html[lang="en"] button,
html[lang="en"] textarea,
html[lang="en"] input {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.container {
    max-width: 800px;
    width: 100%;
    margin-bottom: 40px;
}

/* ── Language toggle ─────────────────────────────────────────────────────────── */

.lang-bar {
    display: flex;
    justify-content: flex-start; /* trailing side in RTL */
    margin-bottom: 14px;
}

html[lang="en"] .lang-bar {
    justify-content: flex-end; /* trailing side in LTR */
}

.lang-toggle {
    padding: 6px 16px;
    border-radius: 20px;
    border: 1.5px solid var(--border-color);
    background: var(--card-bg);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.3px;
}

.lang-toggle:hover {
    background: var(--secondary);
    border-color: var(--primary);
}

.lang-toggle:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* ── Resume banner ───────────────────────────────────────────────────────────── */

.resume-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: linear-gradient(135deg, #e9f4f7 0%, #d6eaf1 100%);
    border: 1.5px solid #a8ccd8;
    border-radius: var(--radius);
    padding: 12px 18px;
    margin-bottom: 18px;
    font-size: 0.92rem;
    animation: fadeIn 0.4s ease-out;
}

.resume-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.resume-btn {
    padding: 6px 18px;
    border-radius: 20px;
    border: 1.5px solid transparent;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.resume-btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

.resume-continue {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.resume-continue:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

.resume-fresh {
    background: transparent;
    color: var(--text-muted);
    border-color: #a8ccd8;
}

.resume-fresh:hover { background: rgba(0,0,0,0.05); color: var(--text-main); border-color: #7aafc4; }

/* ── Header ──────────────────────────────────────────────────────────────────── */

.header {
    text-align: center;
    margin-bottom: 24px;
}

.header h1 {
    color: var(--primary);
    font-size: 2rem;
    font-weight: 700;
}

/* ── Unified segmented progress ─────────────────────────────────────────────── */

.progress-container {
    background: var(--card-bg);
    padding: 18px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    position: sticky;
    top: 16px;
    z-index: 100;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.progress-header #progressPercent {
    color: var(--primary);
    font-weight: 700;
}

/* Segment bar */
.segment-bar {
    display: flex;
    gap: 5px;
}

.segment {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.segment-track {
    height: 7px;
    background: var(--secondary);
    border-radius: 4px;
    overflow: hidden;
}

.segment-fill {
    height: 100%;
    width: 0%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Completed: full fill */
.segment.completed .segment-fill { width: 100%; }

/* Active: pulsing partial fill */
.segment.active .segment-track {
    background: var(--secondary);
    outline: 2px solid var(--primary);
    outline-offset: 1px;
    border-radius: 4px;
}
.segment.active .segment-fill {
    width: 45%;
    animation: segPulse 1.8s ease-in-out infinite;
}

@keyframes segPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.segment-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease, font-weight 0.3s ease;
    line-height: 1.3;
}

.segment.completed .segment-label { color: var(--primary); }
.segment.active .segment-label    { color: var(--primary); font-weight: 700; }

/* ── Sections & animations ───────────────────────────────────────────────────── */

.section { display: none; }

.section.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

.section.active.slide-forward { animation: slideFromLeft 0.35s ease-out; }
.section.active.slide-back    { animation: slideFromRight 0.35s ease-out; }

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

@keyframes slideFromLeft {
    from { opacity: 0; transform: translateX(-24px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideFromRight {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Section title card ──────────────────────────────────────────────────────── */

.section-title {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border-inline-start: 4px solid var(--primary);
}

.section-title h2 { font-size: 1.5rem; color: var(--primary); }

.answer-counter {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
    direction: ltr;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

html[lang="en"] .answer-counter { direction: ltr; }

.ac-dots { display: flex; gap: 4px; align-items: center; }

.answer-counter-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--border-color);
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.answer-counter-dot.filled { background: var(--primary); }

/* ── Question cards ──────────────────────────────────────────────────────────── */

.question-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    border: 2px solid transparent;
}

.question-card:hover { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.08); }

.question-card.unanswered {
    border-color: var(--warning);
    box-shadow: 0 0 0 3px rgba(237,137,54,0.18);
}

.question-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 16px; }

/* ── Radio options ───────────────────────────────────────────────────────────── */

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.option-label { display: block; position: relative; cursor: pointer; }

.option-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 1px;
    height: 1px;
}

.option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: var(--transition);
    background: #fff;
    font-weight: 600;
    font-size: 0.95rem;
}

.option-label:hover .option-card            { border-color: var(--primary); background: #f5f9fa; }
.option-label input:checked ~ .option-card  { border-color: var(--primary); background: var(--secondary); transform: translateY(-2px); }
.option-label input:focus-visible ~ .option-card { outline: 3px solid var(--primary); outline-offset: 2px; }

/* ── Scale options ───────────────────────────────────────────────────────────── */

.scale-container { display: flex; flex-direction: column; gap: 10px; }

.scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
}

.scale-grid { display: flex; gap: 8px; }

.scale-label { flex: 1; cursor: pointer; position: relative; }

.scale-label input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.scale-number {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--transition);
    background: #fff;
    color: var(--text-main);
}

/* Gradient: cooler (1) → deeper (5) */
.scale-label[data-scale="1"] { --scale-color: #9db5be; }
.scale-label[data-scale="2"] { --scale-color: #7fa4af; }
.scale-label[data-scale="3"] { --scale-color: #5c7c89; }
.scale-label[data-scale="4"] { --scale-color: #4a636e; }
.scale-label[data-scale="5"] { --scale-color: #364f57; }

.scale-label:hover .scale-number                { border-color: var(--scale-color); background: #f0f7f9; }
.scale-label input:checked ~ .scale-number      { border-color: var(--scale-color); background: var(--scale-color); color: #fff; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.15); }
.scale-label input:focus-visible ~ .scale-number { outline: 3px solid var(--primary); outline-offset: 2px; }

/* ── Textarea ────────────────────────────────────────────────────────────────── */

textarea {
    width: 100%;
    min-height: 100px;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    resize: vertical;
    transition: var(--transition);
    font-family: inherit;
}

textarea:focus { outline: none; border-color: var(--primary); }

.char-counter {
    text-align: left;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 5px;
    direction: ltr;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

.char-counter.warn { color: #e53e3e; font-weight: 600; }

/* ── Navigation ──────────────────────────────────────────────────────────────── */

.navigation { display: flex; gap: 16px; margin-top: 30px; }

.btn {
    padding: 13px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
    font-family: inherit;
}

.btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

.btn-secondary { background: var(--card-bg); color: var(--text-main); border: 2px solid var(--border-color); }
.btn-secondary:hover { background: var(--secondary); }

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

.hidden { display: none !important; }

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

.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #2d3748;
    color: #fff;
    padding: 13px 22px;
    border-radius: 14px;
    z-index: 9999;
    text-align: center;
    box-shadow: 0 8px 28px rgba(0,0,0,0.25);
    width: max-content;
    max-width: min(440px, 92vw);
    font-size: 0.9rem;
    line-height: 1.5;
    animation: toastIn 0.3s ease-out;
}

.toast.toast-hide { animation: toastOut 0.3s ease-in forwards; }

@keyframes toastIn  { from { opacity:0; transform:translateX(-50%) translateY(16px); } to { opacity:1; transform:translateX(-50%) translateY(0); } }
@keyframes toastOut { to   { opacity:0; transform:translateX(-50%) translateY(16px); } }

/* ── Summary screen ──────────────────────────────────────────────────────────── */

.summary-card {
    background: var(--card-bg);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    border-top: 6px solid var(--primary);
}

.summary-hero { margin-bottom: 26px; }

.summary-check-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 1.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 4px 16px rgba(92,124,137,0.4);
}

.summary-hero h2 { font-size: 1.6rem; color: var(--primary); margin-bottom: 10px; }

.patterns-badge {
    display: inline-block;
    background: var(--secondary);
    color: var(--primary);
    padding: 5px 18px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 700;
    border: 1.5px solid #a8ccd8;
}

.patterns-badge.balanced { background: #e6f9ef; color: #276749; border-color: #9ae6b4; }

.pattern-list { list-style: none; margin: 20px 0; text-align: start; }

.pattern-item {
    background: var(--secondary);
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 8px;
    border-inline-start: 4px solid var(--primary);
}

.pattern-tag {
    display: inline-block;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 10px;
    margin-bottom: 7px;
}

.pattern-item .ar { font-weight: 700; font-size: 1.05rem; }
.pattern-item .en {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 0.88rem;
    color: var(--text-muted);
    direction: ltr;
    text-align: left;
    margin-top: 5px;
    line-height: 1.5;
}

/* In EN mode, swap which text is prominent */
html[lang="en"] .pattern-item .en {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    direction: ltr;
}
html[lang="en"] .pattern-item .ar {
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--text-muted);
    direction: rtl;
    text-align: right;
}

.disclaimer {
    margin-top: 28px;
    padding: 15px;
    background: #fff3cd;
    color: #856404;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: start;
    line-height: 1.6;
}

/* ── Optional section badge ──────────────────────────────────────────────────── */

.optional-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 12px;
    background: #f0f4ff;
    color: #5a72a0;
    border: 1px solid #c3d0e8;
    margin-inline-start: 10px;
    vertical-align: middle;
    letter-spacing: 0.02em;
}

/* ── Segment interactivity ───────────────────────────────────────────────────── */

.segment { cursor: pointer; }
.segment:hover .segment-label { color: var(--primary); }
.segment:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 3px; }

.patterns-badge.nodata { background: #edf2f7; color: #4a5568; border-color: #a0aec0; }

/* ── Meditation section ──────────────────────────────────────────────────────── */

.section-intro {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin-top: 10px;
    font-style: italic;
    text-align: start;
    padding: 12px 0 4px;
    border-bottom: 1px dashed var(--border-color);
}

.meditation-card {
    background: linear-gradient(135deg, #fdfcff 0%, #f9f7fe 100%);
}

.meditation-card .question-title {
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.9;
    font-style: italic;
    color: var(--text-main);
    margin-bottom: 14px;
}

.meditation-buttons {
    display: flex;
    gap: 10px;
}

.med-btn {
    padding: 9px 20px;
    border-radius: 22px;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 600;
    font-family: inherit;
    transition: var(--transition);
    flex: 1;
}

.med-btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

.med-feel              { background: #f0fdf4; border-color: #86efac; color: #166534; }
.med-feel:hover,
.med-feel.selected     { background: #22c55e; border-color: #22c55e; color: #fff; box-shadow: 0 2px 10px rgba(34,197,94,0.3); }

.med-nofeel            { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.med-nofeel:hover,
.med-nofeel.selected   { background: #ef4444; border-color: #ef4444; color: #fff; box-shadow: 0 2px 10px rgba(239,68,68,0.3); }

/* ── Tablet ──────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .header h1          { font-size: 1.6rem; }
    .question-card      { padding: 18px; }
    .scale-number       { height: 42px; font-size: 1rem; }
    .options-grid       { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
    .segment-label      { font-size: 0.62rem; }
}

/* ── Mobile ──────────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    body                { padding: 12px; }
    .options-grid       { grid-template-columns: 1fr; }
    .navigation         { flex-direction: column-reverse; }
    .progress-container { top: 10px; padding: 14px 16px; }
    .scale-grid         { gap: 5px; }
    .scale-number       { height: 40px; font-size: 1rem; border-radius: 8px; }
    .header h1          { font-size: 1.4rem; }
    .section-title h2   { font-size: 1.2rem; }
    .segment-label      { font-size: 0.58rem; }
    .summary-card       { padding: 20px; }
    .toast              { bottom: 68px; }
}

/* ── Deep analysis: 4-dimension cards ──────────────────────────────────────── */

.deep-analysis-section {
    margin-top: 28px;
    text-align: start;
}

.deep-analysis-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 14px;
    text-align: center;
    border-top: 1px dashed var(--border-color);
    padding-top: 20px;
}

.dimension-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.dimension-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 18px;
    border: 1.5px solid var(--border-color);
    border-top: 4px solid var(--dim-color);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dimension-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--dim-color);
    line-height: 1.35;
}

.dimension-subtitle {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    direction: ltr;
    margin-top: 2px;
    font-style: italic;
}

.dimension-score-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dimension-score-bar {
    flex: 1;
    height: 8px;
    background: var(--secondary);
    border-radius: 4px;
    overflow: hidden;
}

.dimension-score-fill {
    height: 100%;
    background: var(--dim-color);
    border-radius: 4px;
    transition: width 0.7s ease;
    min-width: 4px;
}

.dimension-level {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 10px;
    white-space: nowrap;
    border: 1.5px solid currentColor;
    flex-shrink: 0;
}

.dimension-level-high   { color: #c53030; background: #fff5f5; }
.dimension-level-medium { color: #b7791f; background: #fffaf0; }
.dimension-level-low    { color: #276749; background: #f0fff4; }

.dimension-desc {
    font-size: 0.84rem;
    line-height: 1.7;
    color: var(--text-main);
    flex: 1;
}

.dimension-action {
    font-size: 0.8rem;
    line-height: 1.65;
    color: var(--text-muted);
    background: #f7f8fa;
    padding: 10px 12px;
    border-radius: 8px;
    border-inline-start: 3px solid var(--dim-color);
}

.dimension-action strong {
    display: block;
    color: var(--dim-color);
    font-size: 0.75rem;
    margin-bottom: 3px;
    font-weight: 700;
}

@media (max-width: 600px) {
    .dimension-grid { grid-template-columns: 1fr; }
}

/* ── Pattern items: strength, action, compound ──────────────────────────────── */

.pattern-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.pattern-strength {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-inline-start: auto;
}

.strength-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--border-color);
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.strength-dot.filled {
    background: var(--pattern-color, var(--primary));
}

.compound-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 10px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.pattern-item.compound {
    border-inline-start-width: 6px;
    background: linear-gradient(135deg, #fefce8 0%, var(--secondary) 80%);
}

.compound-contributes {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-style: italic;
}

.pattern-action {
    font-size: 0.82rem;
    line-height: 1.65;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.75);
    padding: 9px 12px;
    border-radius: 8px;
    border-inline-start: 3px solid var(--pattern-color, var(--primary));
    margin-top: 10px;
}

.pattern-action-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--pattern-color, var(--primary));
    margin-bottom: 2px;
}

.pattern-item.positive {
    background: linear-gradient(135deg, #f0fff4 0%, var(--secondary) 80%);
}

.btn-print {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 11px 24px;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-print:hover { background: var(--secondary); }
.btn-print:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* ── Pattern group headers ─────────────────────────────────────────────────── */
.pattern-group-header {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 18px 0 6px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}

/* ── Facilitation entry point ──────────────────────────────────────────────── */
.facilitation-entry {
    background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
    border: 1.5px solid #f59e0b;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 18px;
}
.facilitation-entry-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 7px;
    letter-spacing: 0.03em;
}
.facilitation-entry p {
    font-size: 0.88rem;
    color: #78350f;
    line-height: 1.65;
    margin: 0;
    font-style: italic;
}

/* ── Session questions (collapsible) ───────────────────────────────────────── */
.session-questions {
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
}
.session-questions summary {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
    padding: 6px 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.85;
    transition: opacity 0.15s;
}
.session-questions summary::-webkit-details-marker { display: none; }
.session-questions summary::before {
    content: '▶';
    font-size: 0.6rem;
    transition: transform 0.2s;
    display: inline-block;
}
.session-questions[open] summary::before { transform: rotate(90deg); }
.session-questions summary:hover { opacity: 1; }
.session-questions ol {
    margin: 8px 0 4px 0;
    padding-inline-start: 20px;
}
.session-questions ol li {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 5px;
    font-style: italic;
}

/* ── Synthesis section ─────────────────────────────────────────────────────── */
.synthesis-section {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
    border: 1.5px solid #c7d7f8;
    border-radius: 14px;
    padding: 18px 20px;
    margin-top: 28px;
}
.synthesis-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #3730a3;
    margin-bottom: 12px;
    letter-spacing: 0.03em;
}
.synthesis-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.synthesis-tag {
    display: inline-block;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
}
.synthesis-plus {
    font-size: 1rem;
    font-weight: 700;
    color: #6366f1;
}
.synthesis-text {
    font-size: 0.88rem;
    color: #312e81;
    line-height: 1.75;
    margin: 0;
}

/* ── Somatic closing ───────────────────────────────────────────────────────── */
.somatic-closing {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1.5px solid #86efac;
    border-radius: 14px;
    padding: 18px 20px;
    margin-top: 20px;
    text-align: center;
}
.somatic-closing-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #166534;
    margin-bottom: 9px;
    letter-spacing: 0.03em;
}
.somatic-closing p {
    font-size: 0.88rem;
    color: #15803d;
    line-height: 1.8;
    margin: 0;
    font-style: italic;
}

/* ── About section ─────────────────────────────────────────────────────────── */
.about-section {
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 20px;
    overflow: hidden;
}
.about-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 18px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary);
    list-style: none;
    user-select: none;
    transition: background 0.15s;
}
.about-summary::-webkit-details-marker { display: none; }
.about-summary::before {
    content: '▶';
    font-size: 0.65rem;
    transition: transform 0.2s;
    display: inline-block;
    flex-shrink: 0;
}
.about-section[open] .about-summary::before { transform: rotate(90deg); }
.about-summary:hover { background: var(--border); }
.about-body {
    padding: 0 18px 16px;
    font-size: 0.88rem;
    line-height: 1.75;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}
.about-body p  { margin: 10px 0 6px; }
.about-body ol,
.about-body ul { padding-inline-start: 20px; margin: 4px 0 10px; }
.about-body li { margin-bottom: 4px; }
.about-body strong { color: var(--text); }
.about-body em { opacity: 0.75; }

/* bilingual visibility inside about section */
.about-section .ar { display: block; }
.about-section .en { display: none; }
html[lang="en"] .about-section .ar { display: none; }
html[lang="en"] .about-section .en { display: block; }

/* ── Update banner ─────────────────────────────────────────────────────────── */
.update-banner {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: var(--primary);
    color: #fff;
    font-size: 0.88rem;
    padding: 10px 20px;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.update-btn {
    background: #fff;
    color: var(--primary);
    border: none;
    border-radius: 6px;
    padding: 5px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s;
}
.update-btn:hover { opacity: 0.85; }

/* ── Meditation audio player ───────────────────────────────────────────────── */
.med-audio-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding: 10px 14px;
    background: rgba(90, 79, 138, 0.07);
    border-radius: 12px;
}
.med-play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}
.med-play-btn:hover { opacity: 0.85; }
.med-progress {
    flex: 1;
    height: 5px;
    background: #e2e8f0;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
}
.med-progress-fill {
    height: 100%;
    width: 0;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.2s linear;
}
.med-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
    flex-shrink: 0;
}
