/* ══════════════════════════════════════════════════════════════
   CARD — Articles Engagement Redesign (shared styles)
   ══════════════════════════════════════════════════════════════ */

/* ── Layout ────────────────────────────────────────────────── */
.article-layout {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
    padding: 0 1rem;
}
.article-main { flex: 1; min-width: 0; }
.article-sidebar {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: 1rem;
    align-self: flex-start;
}
@media (max-width: 768px) {
    .article-layout { flex-direction: column; }
    .article-sidebar { width: 100%; position: static; }
}

/* ── Section titles ────────────────────────────────────────── */
.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 1.5rem 0 0.5rem;
}

/* ── Section heading label (above citation cards) ─────────── */
.section-heading-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 1.25rem 0 0.3rem;
    padding-left: 0.1rem;
}

/* ── Citation cards ────────────────────────────────────────── */
.citation-card {
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.2s;
    border-left: 3px solid var(--border);
}
.citation-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.08); }

/* Color-coded left borders by content type */
.citation-card--quran  { border-left-color: #10b981; }
.citation-card--hadith { border-left-color: #f59e0b; }
.citation-card--book   { border-left-color: #3b82f6; }
.citation-card--video  { border-left-color: #ef4444; }

.citation-card .book-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}
.citation-card .book-badge {
    background: var(--ref-place-bg);
    color: var(--ref-place-text);
    padding: 0.15rem 0.5rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}
.citation-card .video-badge {
    background: #ff4444;
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}
.citation-card .chapter-name {
    color: var(--text-muted);
    font-size: 0.8rem;
}
.citation-card .time-badge {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Quoted text */
.citation-card .quoted {
    border-left: 3px solid var(--secondary);
    padding: 0.4rem 0.8rem;
    margin: 0.5rem 0;
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
    background: rgba(0,0,0,0.015);
    border-radius: 0 4px 4px 0;
}
[data-theme="dark"] .citation-card .quoted { background: rgba(255,255,255,0.02); }

/* Paragraph text */
.citation-card .para-text {
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0.5rem 0;
    color: var(--text);
}

/* Expandable paragraph text */
.para-text--expandable {
    position: relative;
    max-height: 6.5em;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
.para-text--expandable.expanded {
    max-height: 9999px;
}
.para-text--expandable:not(.expanded)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2.5em;
    background: linear-gradient(transparent, var(--background-card));
    pointer-events: none;
}
.read-more-btn {
    display: inline-block;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.2rem 0;
    margin-top: 0.2rem;
}
.read-more-btn:hover { text-decoration: underline; }

/* Highlighted quoted text within expanded paragraphs */
.citation-card .para-text mark {
    background: rgba(201, 162, 39, 0.2);
    border-radius: 2px;
    padding: 0.05em 0.15em;
}
[data-theme="dark"] .citation-card .para-text mark {
    background: rgba(212, 175, 55, 0.25);
    color: var(--text);
}

/* Ref tags */
.citation-card .ref-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.5rem;
}
.ref-tag {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    text-decoration: none;
}
.ref-tag.quran  { background: var(--ref-quran-bg);  color: var(--ref-quran-text); }
.ref-tag.hadith { background: var(--ref-hadith-bg); color: var(--ref-hadith-text); }
.ref-tag.entity { background: var(--ref-people-bg); color: var(--ref-people-text); }

/* Card footer */
.citation-card .card-footer {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.6rem;
}
.citation-card .card-footer a {
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
.citation-card .card-footer a:hover { text-decoration: underline; }

/* ── Reasoning box ─────────────────────────────────────────── */
.reasoning-box {
    background: rgba(0,0,0,0.02);
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 0.5rem;
    font-size: 0.82rem;
}
[data-theme="dark"] .reasoning-box { background: rgba(255,255,255,0.03); }
.reasoning-box .step { margin-bottom: 0.3rem; }
.reasoning-box .step-label {
    font-weight: 600;
    color: var(--primary);
    text-transform: capitalize;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar-section {
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.sidebar-section h3 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.sidebar-link {
    display: block;
    padding: 0.2rem 0;
    font-size: 0.82rem;
    color: var(--primary);
    text-decoration: none;
}
.sidebar-link:hover { text-decoration: underline; }
.sidebar-tag {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    background: var(--ref-islamic-bg);
    color: var(--ref-islamic-text);
    border-radius: 6px;
    font-size: 0.72rem;
    margin: 0.15rem 0.1rem;
    text-decoration: none;
}
.sidebar-tag:hover { opacity: 0.8; }

.rel-item {
    font-size: 0.8rem;
    padding: 0.2rem 0;
    color: var(--text-muted);
}
.rel-item strong { color: var(--text); }

/* ── Verse header ──────────────────────────────────────────── */
.verse-header {
    text-align: center;
    padding: 2rem 0 1rem;
}
.verse-header h1 { font-size: 1.8rem; margin-bottom: 0.3rem; }
.verse-header .verse-ref {
    display: inline-block;
    background: var(--ref-quran-bg);
    color: var(--ref-quran-text);
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
}
.verse-header .stats {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* ── Verse spotlight (replaces old .verse-text) ────────────── */
.verse-spotlight {
    max-width: 700px;
    margin: 0.75rem auto 1.25rem;
    padding: 1rem 1.25rem;
    border-left: 4px solid #10b981;
    background: linear-gradient(135deg, rgba(16,185,129,0.06), rgba(16,185,129,0.02));
    border-radius: 0 8px 8px 0;
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text);
}
[data-theme="dark"] .verse-spotlight {
    background: linear-gradient(135deg, rgba(16,185,129,0.1), rgba(16,185,129,0.03));
}

/* ── Topic header ──────────────────────────────────────────── */
.topic-header {
    text-align: center;
    padding: 2rem 0 1rem;
}
.topic-header h1 { font-size: 1.8rem; margin-bottom: 0.3rem; }
.topic-header .category-badge {
    display: inline-block;
    background: var(--ref-islamic-bg);
    color: var(--ref-islamic-text);
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}
.topic-header .stats {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}
.topic-description {
    text-align: center;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0.5rem auto 1rem;
    font-size: 0.92rem;
    line-height: 1.6;
}

/* ── Hadith header ─────────────────────────────────────────── */
.hadith-header {
    text-align: center;
    padding: 2rem 0 1rem;
}
.hadith-header h1 { font-size: 1.8rem; margin-bottom: 0.3rem; }
.hadith-header .hadith-ref {
    display: inline-block;
    background: var(--ref-hadith-bg);
    color: var(--ref-hadith-text);
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
}
.hadith-header .stats {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}
.hadith-arabic {
    max-width: 700px;
    margin: 1rem auto 0;
    padding: 1.2rem 1.5rem;
    background: var(--background-card);
    border: 1px solid var(--border);
    border-right: 4px solid var(--primary);
    border-radius: 8px 0 0 8px;
    font-family: 'Scheherazade New', 'Traditional Arabic', 'Noto Naskh Arabic', serif;
    font-size: 1.3rem;
    line-height: 2.2;
    color: var(--text);
    text-align: right;
    direction: rtl;
}
.hadith-text {
    max-width: 700px;
    margin: 1rem auto;
    padding: 1rem;
    background: var(--background-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--secondary);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.92rem;
}
.sunnah-link {
    display: block;
    text-align: center;
    margin: 0.5rem auto 1rem;
    font-size: 0.82rem;
    color: var(--primary);
}

/* ── Infobox (Wikipedia-style sidebar card) ────────────────── */
.article-infobox {
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    font-size: 0.82rem;
}
.article-infobox h3 {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--secondary);
}
.article-infobox .infobox-row {
    display: flex;
    justify-content: space-between;
    padding: 0.2rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
[data-theme="dark"] .article-infobox .infobox-row {
    border-bottom-color: rgba(255,255,255,0.04);
}
.article-infobox .infobox-label {
    color: var(--text-muted);
    font-weight: 500;
}
.article-infobox .infobox-value {
    color: var(--text);
    font-weight: 600;
    text-align: right;
}

/* ── Reading progress bar ──────────────────────────────────── */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--secondary);
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ── Video panel overlay ───────────────────────────────────── */
.cite-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
}
.cite-overlay.active { display: block; }
.cite-panel {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: min(500px, 90vw);
    height: 100vh;
    background: var(--background-card);
    border-left: 1px solid var(--border);
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    z-index: 1000;
    overflow-y: auto;
    padding: 1.25rem;
    transform: translateX(100%);
    transition: transform 0.25s ease;
}
.cite-panel.active { display: block; transform: translateX(0); }
.cite-panel .close-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}
.cite-panel .video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
}
.cite-panel .video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}
.cite-panel .ctx-seg {
    padding: 0.5rem 0.75rem;
    margin: 0.25rem 0;
    font-size: 0.85rem;
    line-height: 1.5;
    border-radius: 6px;
    color: var(--text);
}
.cite-panel .ctx-seg.current {
    background: rgba(59,130,246,0.08);
    border-left: 3px solid var(--primary);
}
.cite-panel .ctx-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ── See Also section ──────────────────────────────────────── */
.see-also-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.see-also-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}
.see-also-card {
    display: block;
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text);
    transition: box-shadow 0.15s, transform 0.1s;
}
.see-also-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}
.see-also-card .type-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    margin-bottom: 0.3rem;
}
.see-also-card .type-badge--verse  { background: var(--ref-quran-bg);  color: var(--ref-quran-text); }
.see-also-card .type-badge--hadith { background: var(--ref-hadith-bg); color: var(--ref-hadith-text); }
.see-also-card .type-badge--topic  { background: var(--ref-islamic-bg); color: var(--ref-islamic-text); }
.see-also-card .sa-title {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.3;
}

/* ── Hub page ──────────────────────────────────────────────── */
.articles-header {
    text-align: center;
    padding: 2rem 1rem 1rem;
}
.articles-header h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.articles-header .subtitle { color: var(--text-muted); font-size: 0.95rem; }

/* Daily wisdom card */
.daily-wisdom {
    max-width: 900px;
    margin: 0 auto 1.5rem;
    padding: 1.5rem 1.75rem;
    background: var(--background-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--secondary);
    border-radius: 0 10px 10px 0;
    text-decoration: none;
    display: block;
    color: var(--text);
    transition: box-shadow 0.2s;
}
.daily-wisdom:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.daily-wisdom .dw-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}
.daily-wisdom .dw-verse {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}
.daily-wisdom .dw-ref {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}
.daily-wisdom .dw-snippet {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Streak counter */
.streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: var(--secondary);
    font-weight: 600;
}

.cards-grid {
    max-width: 900px;
    margin: 2rem auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    padding: 0 1rem;
}
.article-card {
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text);
    transition: box-shadow 0.2s, transform 0.15s;
}
.article-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.article-card .card-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.article-card h2 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.article-card .card-stats { color: var(--text-muted); font-size: 0.85rem; }

.manifest-info {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ── Index pages ───────────────────────────────────────────── */
.page-header {
    text-align: center;
    padding: 2rem 1rem 1rem;
}
.page-header h1 { font-size: 1.8rem; margin-bottom: 0.3rem; }
.page-header .stats { color: var(--text-muted); font-size: 0.85rem; }

.search-bar {
    max-width: 500px;
    margin: 1rem auto;
    padding: 0 1rem;
}
.search-bar input {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--background-card);
    color: var(--text);
    font-size: 0.9rem;
}

/* Explored counter */
.explored-counter {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Grid/list toggle */
.view-toggle {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    margin: 0.5rem auto;
}
.view-toggle-btn {
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
    font-size: 0.78rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.15s;
}
.view-toggle-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: transparent;
}

/* Visited chip indicator */
.verse-chip, .topic-chip, .hadith-chip {
    position: relative;
}
.verse-chip.visited::after,
.topic-chip.visited::after,
.hadith-chip.visited::after {
    content: '\2713';
    position: absolute;
    top: -4px;
    right: -4px;
    width: 14px;
    height: 14px;
    background: #10b981;
    color: #fff;
    border-radius: 50%;
    font-size: 0.55rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Verse index */
.surah-group {
    max-width: 900px;
    margin: 1.5rem auto 0;
    padding: 0 1rem;
}
.surah-group h2 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--border);
}
.verse-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}
.verse-chip {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: var(--ref-quran-bg);
    color: var(--ref-quran-text);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s;
}
.verse-chip:hover { opacity: 0.8; }
.verse-chip .count { font-weight: 400; opacity: 0.7; margin-left: 0.2rem; }

/* List mode for verse index */
.verse-list.list-mode {
    flex-direction: column;
    gap: 0.2rem;
}
.verse-list.list-mode .verse-chip {
    display: flex;
    width: 100%;
    justify-content: space-between;
    border-radius: 4px;
}

/* Topic index */
.category-group {
    max-width: 900px;
    margin: 1.5rem auto 0;
    padding: 0 1rem;
}
.category-group h2 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--border);
}
.topic-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.topic-chip {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    background: var(--ref-islamic-bg);
    color: var(--ref-islamic-text);
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.15s;
}
.topic-chip:hover { opacity: 0.8; }
.topic-chip .count { font-weight: 400; opacity: 0.7; margin-left: 0.2rem; }

.topic-list.list-mode {
    flex-direction: column;
    gap: 0.2rem;
}
.topic-list.list-mode .topic-chip {
    display: flex;
    width: 100%;
    justify-content: space-between;
    border-radius: 4px;
}

/* Hadith index */
.collection-group {
    max-width: 900px;
    margin: 1.5rem auto 0;
    padding: 0 1rem;
}
.collection-group h2 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--border);
    text-transform: capitalize;
}
.hadith-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}
.hadith-chip {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: var(--ref-hadith-bg);
    color: var(--ref-hadith-text);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s;
}
.hadith-chip:hover { opacity: 0.8; }
.hadith-chip .count { font-weight: 400; opacity: 0.7; margin-left: 0.2rem; }

.hadith-list.list-mode {
    flex-direction: column;
    gap: 0.2rem;
}
.hadith-list.list-mode .hadith-chip {
    display: flex;
    width: 100%;
    justify-content: space-between;
    border-radius: 4px;
}

/* ── Highlight-and-share tooltip ───────────────────────────── */
.share-tooltip {
    position: absolute;
    display: none;
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    padding: 0.35rem;
    gap: 0.2rem;
    z-index: 500;
}
.share-tooltip.visible { display: flex; }
.share-tooltip button {
    background: none;
    border: none;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.78rem;
    color: var(--text);
    white-space: nowrap;
}
.share-tooltip button:hover {
    background: rgba(0,0,0,0.06);
}
[data-theme="dark"] .share-tooltip button:hover {
    background: rgba(255,255,255,0.08);
}

/* ── Bookmark star ─────────────────────────────────────────── */
.bookmark-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-muted);
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
}
.bookmark-btn:hover { color: var(--secondary); }
.bookmark-btn.bookmarked { color: var(--secondary); }

/* ── Mini connection graph ─────────────────────────────────── */
#connectionGraph {
    width: 100%;
    min-height: 200px;
    border-radius: 8px;
    overflow: hidden;
}
#connectionGraph svg { width: 100%; height: 100%; }
.graph-node { cursor: pointer; }
.graph-node circle { stroke: var(--background-card); stroke-width: 2; }
.graph-node text { font-size: 9px; fill: var(--text); pointer-events: none; }
.graph-link { stroke: var(--border); stroke-opacity: 0.6; }

/* ── Journeys ──────────────────────────────────────────────── */
.journey-card {
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    text-decoration: none;
    color: var(--text);
    display: block;
    transition: box-shadow 0.2s;
}
.journey-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.journey-card .j-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.3rem; }
.journey-card .j-meta { font-size: 0.82rem; color: var(--text-muted); }
.journey-card .j-progress {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-top: 0.75rem;
    overflow: hidden;
}
.journey-card .j-progress-fill {
    height: 100%;
    background: var(--secondary);
    border-radius: 2px;
    transition: width 0.3s;
}

.journey-day {
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.journey-day.completed {
    border-left: 3px solid #10b981;
}
.journey-day .day-num {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}
.journey-day h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.journey-day .reflection {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-top: 0.5rem;
    padding-left: 0.75rem;
    border-left: 2px solid var(--secondary);
}

/* ── My Saved section ──────────────────────────────────────── */
.saved-section {
    max-width: 900px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}
.saved-section h2 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}
.saved-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.75rem;
}
.saved-item {
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.saved-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

/* ── Reasoning accordion ─────────────────────────────────── */
.reasoning-accordion {
    margin-top: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}
.reasoning-toggle {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-muted);
    cursor: pointer;
    background: var(--background);
    list-style: none;
}
.reasoning-toggle::-webkit-details-marker { display: none; }
.reasoning-toggle::before {
    content: '\25B6';
    font-size: 0.6rem;
    margin-right: 0.4rem;
    display: inline-block;
    transition: transform 0.2s;
}
details[open] .reasoning-toggle::before {
    transform: rotate(90deg);
}
.reasoning-takeaway {
    margin-top: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: rgba(45, 106, 79, 0.06);
    border-radius: 4px;
    font-size: 0.82rem;
    color: var(--accent, #2d6a4f);
}

/* ── Creation plan badge ─────────────────────────────────── */
.creation-plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.4rem;
    padding: 0.25rem 0.6rem;
    background: rgba(201, 162, 39, 0.08);
    border: 1px solid rgba(201, 162, 39, 0.2);
    border-radius: 12px;
    font-size: 0.75rem;
    font-family: 'Inter', sans-serif;
    color: var(--secondary);
}

/* ── Application callout ─────────────────────────────────── */
.application-callout {
    margin-top: 0.5rem;
    padding: 0.5rem 0.8rem;
    background: rgba(45, 106, 79, 0.06);
    border-left: 3px solid var(--accent, #2d6a4f);
    border-radius: 0 6px 6px 0;
    font-size: 0.82rem;
    color: var(--text);
    line-height: 1.5;
}

/* ── Read in book link ───────────────────────────────────── */
.read-in-book-link {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
}
.read-in-book-link:hover {
    text-decoration: underline;
}
