:root {
    --bg: #f3e8ce;
    --paper: #fdf9ee;
    --text: #38290f;
    --accent: #a4631f;
    --accent-dark: #7a4813;
    --gold: #b4890f;
    --maroon: #7c3223;
    --highlight: #f5dd9a;
    --highlight-border: #c1860f;
    --border: #ddc998;

    --font-hebrew: "Frank Ruhl Libre", Georgia, serif;
    --font-display: "Frank Ruhl Libre", Georgia, serif;
    --font-body: "PT Serif", Georgia, serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    font-size: 18px;
    line-height: 1.5;
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse at 15% 20%, rgba(180, 137, 15, 0.07), transparent 45%),
        radial-gradient(ellipse at 85% 15%, rgba(124, 50, 35, 0.05), transparent 40%),
        radial-gradient(ellipse at 50% 100%, rgba(124, 50, 35, 0.05), transparent 55%);
    background-attachment: fixed;
}

.site-header {
    position: relative;
    padding: 1.1rem 1.5rem 1.3rem;
    background: linear-gradient(180deg, #fffdf5, var(--paper));
    border-bottom: 3px double var(--gold);
    box-shadow: 0 2px 10px rgba(56, 41, 15, 0.1);
    text-align: center;
}
.site-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -5px;
    height: 2px;
    background: repeating-linear-gradient(135deg, var(--gold) 0 5px, transparent 5px 10px);
    opacity: .55;
}

.site-title {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--maroon);
    text-decoration: none;
}
.site-emblem {
    width: 1.8rem;
    height: 1.8rem;
    color: var(--gold);
}

.install-section {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
}
.install-section-icon {
    flex-shrink: 0;
    width: 4rem;
    height: 4rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(56, 41, 15, 0.15);
}
.install-section-body { flex: 1 1 auto; }

.install-app-btn {
    display: none;
    align-items: center;
    gap: .4rem;
    margin-top: .6rem;
    padding: .55rem 1.1rem;
    background: var(--accent-dark);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: .95rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(56, 41, 15, 0.15);
    transition: background-color .12s ease, transform .12s ease;
}
.install-app-btn.is-visible { display: inline-flex; }
.install-app-btn:hover { background: var(--maroon); transform: translateY(-1px); }
.install-app-icon { width: 1.1rem; height: 1.1rem; flex-shrink: 0; }
.install-app-hint {
    display: none;
    margin-top: .6rem;
    max-width: 26rem;
    padding: .7rem .9rem;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: .9rem;
    line-height: 1.5;
    color: var(--text);
}
.install-app-hint.is-visible { display: block; }
.install-app-hint strong { color: var(--accent-dark); }

@media (max-width: 640px) {
    .install-section { gap: .8rem; }
    .install-section-icon { width: 3rem; height: 3rem; }
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2.5rem 4rem;
}

h1 { font-family: var(--font-display); color: var(--maroon); }

.today-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .7rem;
    margin: 0 0 1.6rem 0;
    padding: .55rem 1rem;
    background: var(--paper);
    border: 1px solid var(--border);
    border-top: 2px solid var(--gold);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(56, 41, 15, 0.06);
    font-size: .95rem;
}
.today-bar-icon { width: 1.1rem; height: 1.1rem; color: var(--gold); flex-shrink: 0; }
.today-bar-date strong { font-family: var(--font-display); color: var(--maroon); }
.today-bar-greg { color: #8a7a55; }
.today-bar-sep { color: var(--gold); font-size: .8rem; }
.today-bar-parasha { color: #4a3d24; }
.today-bar-parasha a, .today-bar-parasha strong {
    font-family: var(--font-display);
    color: var(--accent-dark);
    font-weight: 700;
}
.today-bar-parasha a { text-decoration: none; }
.today-bar-parasha a:hover { color: var(--maroon); text-decoration: underline; }
.today-bar-parasha strong { color: var(--maroon); }
.today-bar-calendar {
    margin-left: auto;
    color: var(--accent-dark);
    font-size: .85rem;
    text-decoration: none;
    white-space: nowrap;
}
.today-bar-calendar:hover { color: var(--maroon); text-decoration: underline; }

@media (max-width: 640px) {
    .today-bar-calendar { margin-left: 0; }
}

@media (max-width: 640px) {
    .today-card { padding: 1.3rem 1.1rem 1.1rem; }
    .today-card-hebrew { font-size: 1.25rem; }
    .today-card-parasha-link, .today-card-parasha-name { font-size: 1.15rem; }
}

.date-convert-form { margin-top: .8rem; }
.date-convert-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .8rem;
}
.date-convert-row select,
.date-convert-row input {
    padding: .45rem .5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text);
}
.date-convert-row input[type="number"] { width: 8rem; }
.date-convert-form button {
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
}
.date-convert-result {
    margin-top: 1rem;
    padding: .8rem 1rem;
    background: var(--highlight);
    border: 1px solid var(--highlight-border);
    border-radius: 4px;
    line-height: 1.6;
}
.date-convert-error {
    margin-top: 1rem;
    padding: .8rem 1rem;
    background: #fbe9e5;
    border: 1px solid #d99b8a;
    border-radius: 4px;
    color: #7c3223;
}

.promo-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-bottom: 2.5rem;
}
.promo-card {
    padding: 1.2rem 1.4rem;
    background: var(--paper);
    border: 1px solid var(--border);
    border-top: 3px solid var(--gold);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(56, 41, 15, 0.08);
    transition: transform .12s ease, box-shadow .12s ease;
}
.promo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(56, 41, 15, 0.12);
}
.promo-card h2 {
    margin: 0 0 .5rem 0;
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--maroon);
    border: none;
    padding: 0;
}
.promo-card p { margin: 0 0 .8rem 0; font-size: 1.15rem; color: #4a3d24; }
.channel-links { display: flex; gap: .7rem; flex-wrap: wrap; }
.channel-link, .zoom-link {
    display: inline-block;
    padding: .55rem 1.1rem;
    background: var(--accent-dark);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color .12s ease, transform .12s ease;
}
.channel-link:hover, .zoom-link:hover { background: var(--maroon); transform: translateY(-1px); }

@media (max-width: 640px) {
    .promo-section { grid-template-columns: 1fr; }
    main { padding: 1rem 1rem 3rem; }
    body { font-size: 16px; }
    .site-header { padding: .9rem 1rem 1.1rem; }
    .site-title { font-size: 1.15rem; gap: .4rem; }
    .site-emblem { width: 1.4rem; height: 1.4rem; }
    h1 { font-size: 1.4rem; }
    .verses { padding: .3rem .8rem; border-radius: 4px; }
}

.about-section {
    margin-bottom: 2.5rem;
    padding: 1.2rem 1.4rem;
    background: var(--paper);
    border: 1px solid var(--border);
    border-left: 3px solid var(--gold);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(56, 41, 15, 0.08);
}
.about-section h2 {
    margin: 0 0 .6rem 0;
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--maroon);
}
.about-section p { margin: 0; font-size: 1.05rem; line-height: 1.7; color: #4a3d24; }

.nav-section { margin-bottom: 2rem; font-size: 1.15rem; }
.nav-section h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--maroon);
    border-bottom: 1px solid var(--border);
    padding-bottom: .3rem;
}
.parasha-list { list-style: none; padding: 0; }
.parasha-list li { padding: .4rem 0; }
.range { color: #7a6a4a; font-size: .9rem; margin-left: .5rem; font-weight: normal; }

.category-block { margin-bottom: 1rem; }
.category-summary {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--maroon);
    cursor: pointer;
    padding: .35rem 0;
}
.subcategory-block { margin: .3rem 0 .3rem 1rem; padding-left: .8rem; border-left: 2px solid var(--border); }
.subcategory-summary {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-dark);
    cursor: pointer;
    padding: .3rem 0;
}
.he-label { color: #8a7a55; font-weight: normal; font-size: .9rem; font-family: var(--font-hebrew); }
.empty-note { color: #8a7a55; font-size: .85rem; margin: .2rem 0 .2rem 1rem; font-style: italic; }

.book-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin: .3rem 0 .8rem 0;
}
.book-card {
    display: block;
    padding: 1rem 1.2rem 1rem 0;
    border-top: 1px solid var(--border);
    color: inherit;
    text-decoration: none;
}
.book-grid .book-card:nth-child(2n) { padding-left: 1.2rem; padding-right: 0; }
.book-grid .book-card:nth-of-type(1), .book-grid .book-card:nth-of-type(2) { border-top: none; }
.book-card h3 {
    margin: 0 0 .4rem 0;
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--accent-dark);
}
.book-card:hover h3 { color: var(--maroon); }
.book-card p { margin: 0; font-size: .95rem; color: #6a5a3a; line-height: 1.5; }

@media (max-width: 640px) {
    .book-grid { grid-template-columns: 1fr; }
    .book-grid .book-card,
    .book-grid .book-card:nth-child(2n) { padding: 1rem 0; border-top: 1px solid var(--border); }
    .book-grid .book-card:first-child { border-top: none; }
}

.book-category-label {
    margin: 0 0 .2rem 0;
    font-size: .85rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #8a7a55;
}
.book-description { margin: .3rem 0 1.2rem 0; font-size: 1.1rem; color: #4a3d24; }
.book-start-reading { display: inline-block; margin-bottom: 1.8rem; }
.book-section-heading {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--maroon);
    border-bottom: 1px solid var(--border);
    padding-bottom: .3rem;
    margin: 2rem 0 .8rem 0;
}
.book-parasha-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; }
@media (max-width: 640px) {
    .book-parasha-grid { grid-template-columns: 1fr; }
}

summary { list-style-position: outside; }
summary::marker { color: var(--gold); }

.breadcrumbs { margin-bottom: 1rem; }
.breadcrumbs a { color: var(--accent); text-decoration: none; }

.chapter-marker {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2.5rem 0 1.2rem 0;
    color: var(--maroon);
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
}
.chapter-marker:first-child { margin-top: 0; }
.chapter-marker::before,
.chapter-marker::after {
    content: "";
    flex: 1;
    height: 0;
    border-top: 2px dotted var(--gold);
}

.topics-intro { color: #6a5a3a; font-size: 1.05rem; margin-bottom: 1.5rem; }
.sage-bio {
    margin: -.5rem 0 1.2rem 0;
    padding: .8rem 1rem;
    background: var(--paper);
    border-left: 3px solid var(--gold);
    border-radius: 4px;
    font-size: .95rem;
    line-height: 1.6;
    color: #4a3d24;
}
.book-marker { font-size: 1.6rem; }
.topics-chapter-marker {
    margin: 1.8rem 0 .6rem 0;
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--accent-dark);
}
.topics-chapter-marker a { color: inherit; text-decoration: none; }
.topics-chapter-marker a:hover { text-decoration: underline; }
.topics-flow {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    margin: 0 0 1.2rem 0;
}
.topic-entry {
    display: flex;
    align-items: baseline;
    gap: .4rem;
    cursor: pointer;
    padding: .5rem .8rem;
    background: var(--paper);
    border: 1px solid var(--highlight-border);
    border-radius: 4px;
    font-family: inherit;
    font-size: .95rem;
    color: var(--text);
    text-align: left;
    box-shadow: 0 1px 3px rgba(56, 41, 15, 0.06);
    transition: background-color .12s ease, transform .12s ease;
}
.topic-entry:hover { background: var(--highlight); transform: translateY(-1px); }
.topic-entry-title { flex: 1 1 auto; }
.topic-entry-meta {
    flex-shrink: 0;
    display: flex;
    align-items: baseline;
    gap: .4rem;
}
.topic-entry-verse {
    flex-shrink: 0;
    color: var(--accent-dark);
    font-size: .8rem;
    font-weight: bold;
    white-space: nowrap;
}
.topic-entry-sage {
    flex-shrink: 0;
    color: #8a7a55;
    font-size: .78rem;
    font-style: italic;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .topic-entry { flex-direction: column; align-items: flex-start; gap: .3rem; }
    .topic-entry-meta { flex-wrap: wrap; }
}
.topics-panel { margin: -.3rem 0 1rem 0; }
.topics-panel-ref { margin-bottom: .8rem; font-size: .85rem; }
.topics-panel-ref a { color: var(--accent-dark); }

.parasha-marker {
    display: block;
    margin: 1.5rem 0;
    padding: .6rem 1rem;
    background: var(--maroon);
    color: #fff;
    text-decoration: none;
    text-align: center;
    border-radius: 4px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .02em;
}
.parasha-marker:hover { background: var(--accent-dark); }

.quick-nav {
    margin-bottom: 1rem;
    padding: .9rem 1.1rem;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(56, 41, 15, 0.08);
}

.quick-nav-hint { margin: 0 0 .8rem 0; font-size: .95rem; color: #6a5a3a; font-style: italic; }

.nav-select {
    display: none;
    width: 100%;
    margin: 0 0 .8rem 0;
    padding: .6rem .7rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text);
}

.filter-toggle {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .9rem;
    padding-top: .8rem;
    border-top: 1px dashed var(--border);
    font-size: .95rem;
    color: var(--text);
    cursor: pointer;
}
.filter-toggle input { width: 1.1rem; height: 1.1rem; accent-color: var(--maroon); cursor: pointer; }
.filter-star { color: var(--gold); }
.nav-row-label {
    font-size: .75rem;
    color: #8a7a55;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin: .5rem 0 .3rem 0;
}
.nav-row-label:first-child { margin-top: 0; }
.nav-row {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
}

/* На мобильном сетка медальонов из 30-50 кнопок занимает слишком много места -
   переключаемся на нативный select, он же удобнее тапать. Идёт после базового
   .nav-row специально - иначе тот перебивает display:none той же специфичностью. */
@media (max-width: 640px) {
    .nav-row-label, .nav-row { display: none; }
    .nav-select { display: block; }
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: #fff;
    color: var(--text);
    font-family: var(--font-body);
    font-size: .85rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform .1s ease, box-shadow .1s ease, background-color .1s ease;
}
.nav-btn:hover { background: #f2e6c4; transform: translateY(-1px); box-shadow: 0 2px 4px rgba(56, 41, 15, 0.15); }
.nav-btn.active {
    background: var(--highlight);
    border: 2px solid var(--maroon);
    color: var(--text);
    font-weight: bold;
}
.nav-btn.has-materials {
    background: var(--highlight);
    border-color: var(--highlight-border);
    font-weight: bold;
}
.nav-btn.has-materials:hover { filter: brightness(0.95); }
.nav-btn.active.has-materials {
    background: var(--highlight);
    border: 2px solid var(--maroon);
    color: var(--text);
}

.chapter-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-family: var(--font-display);
    font-weight: 700;
}
.chapter-nav a { color: var(--accent-dark); text-decoration: none; }

.verses {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .5rem 2rem;
    box-shadow: 0 2px 10px rgba(56, 41, 15, 0.08);
}

.translation-toggle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .3rem 1rem;
    padding: .7rem .5rem;
    margin: 0 -.5rem .3rem;
    border-bottom: 1px dashed var(--border);
    font-size: .95rem;
}
.translation-toggle-label { color: #8a7a55; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.translation-toggle-desktop { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; }
.translation-toggle-desktop label { display: inline-flex; align-items: center; gap: .3rem; cursor: pointer; }
.translation-toggle input[type="radio"] { accent-color: var(--maroon); cursor: pointer; }
.translation-toggle-mobile {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: .3rem;
    width: 100%;
}
.translation-toggle-mobile select {
    width: 100%;
    padding: .6rem .7rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text);
}
@media (max-width: 640px) {
    .translation-toggle-desktop { display: none; }
    .translation-toggle-mobile { display: flex; }
}
.translation-attribution {
    flex-basis: 100%;
    margin: .3rem 0 0 0;
    font-size: .8rem;
    color: #8a7a55;
    font-style: italic;
}
.translation-attribution a { color: var(--accent-dark); }

.verse-row {
    display: grid;
    grid-template-columns: 3.5rem 1fr 1fr;
    gap: 1.5rem;
    padding: .8rem .5rem;
    margin: 0 -.5rem;
    border-bottom: 1px solid var(--border);
    border-radius: 3px;
    align-items: start;
    transition: background-color .12s ease;
}
.verse-row:last-child { border-bottom: none; }
.verse-row:not(.has-materials):hover { background: rgba(180, 137, 15, 0.06); }

.verse-num {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .4rem;
    color: #a3936a;
    font-size: .85rem;
    padding-top: .3rem;
}
.has-materials .verse-num::after {
    content: "✦";
    display: block;
    margin-top: .3rem;
    color: var(--gold);
    font-size: .8rem;
}

.verse-he {
    font-family: var(--font-hebrew);
    font-size: 1.5rem;
    line-height: 1.6;
    text-align: right;
}

.verse-ru {
    font-family: var(--font-body);
    font-size: 1.2rem;
    line-height: 1.6;
}

.verse-ru-wrap { display: flex; flex-direction: column; align-items: flex-start; }
.verse-ru-current-label {
    margin-bottom: .2rem;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #a3936a;
}
.translation-alt-toggle {
    margin-top: .4rem;
    padding: .3rem .6rem;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: none;
    color: #8a7a55;
    font-family: var(--font-body);
    font-size: .78rem;
    cursor: pointer;
}
.translation-alt-toggle:hover { background: #f2ede0; color: var(--text); }
.verse-ru-alt {
    margin-top: .5rem;
    padding: .6rem .8rem;
    background: #faf6ea;
    border-left: 3px solid var(--highlight-border);
    border-radius: 3px;
    font-size: 1.05rem;
}

@media (max-width: 640px) {
    .verse-row {
        grid-template-columns: 1fr;
        gap: .3rem;
        padding: .8rem .6rem;
    }
    .verse-num { flex-direction: row; align-items: center; padding-top: 0; }
    .has-materials .verse-num::after { display: inline-block; margin: 0 0 0 .4rem; }
    .verse-he { font-size: 1.35rem; }
    .verse-ru { font-size: 1.05rem; padding-top: .2rem; border-top: 1px dashed var(--border); margin-top: .3rem; }
}

.has-materials {
    cursor: pointer;
    background: var(--highlight);
    border-left: 3px solid var(--highlight-border);
    border-radius: 3px;
    margin-bottom: .5rem;
}

.has-materials:hover {
    filter: brightness(0.97);
}

.materials-panel {
    margin: .2rem 0 .8rem 0;
    padding: 1.2rem 1.4rem;
    background: var(--paper);
    border: 1px solid var(--highlight-border);
    border-left: 3px solid var(--highlight-border);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(56, 41, 15, 0.08);
}

.rashi-toggle {
    font-family: var(--font-hebrew);
    font-size: .72rem;
    line-height: 1.3;
    color: #8a7a55;
    background: none;
    border: 1px solid var(--border);
    border-radius: 3px;
    /* Визуально скромная кнопка, но с увеличенной кликабельной областью -
       исходные .1rem .4rem давали всего ~20px высоты, заметно меньше
       рекомендованного минимума тач-таргета (44px iOS / 48px Material). */
    padding: .45rem .5rem;
    min-height: 2rem;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    white-space: nowrap;
}
.rashi-toggle:hover { background: #f2ede0; color: var(--text); }
.rashi-panel {
    margin: 0 0 .8rem 0;
    padding: .9rem 1.1rem;
    background: #faf6ea;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: var(--font-hebrew);
    font-size: 1.05rem;
    line-height: 1.8;
    text-align: right;
    color: #4a3d24;
}

@media (max-width: 640px) {
    .materials-panel { padding: 1rem; }
    .material a.platform-link { width: 100%; justify-content: center; }
    .nav-btn { width: 2.5rem; height: 2.5rem; font-size: .9rem; }
}

[x-cloak] { display: none !important; }

.material { margin-bottom: 1rem; }
.material:last-child { margin-bottom: 0; }
.material h3 { margin: 0 0 .4rem 0; font-family: var(--font-display); font-size: 1.05rem; color: var(--maroon); }
.material-sages { margin: 0 0 .5rem 0; font-size: .82rem; color: #8a7a55; }
.material-sages a { color: var(--accent-dark); }
.material a { color: var(--accent-dark); }
.video-embed { position: relative; padding-bottom: 56.25%; height: 0; max-width: 480px; }
.video-embed iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 2px;
}
.material-body { color: #4a3d24; font-size: .95rem; line-height: 1.6; margin: 0 0 .8rem 0; }

.material-links { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; margin-top: .4rem; }
.material a.platform-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .9rem;
    background: var(--accent-dark);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: .95rem;
    font-weight: bold;
    transition: background-color .12s ease, transform .12s ease;
}
.material a.platform-link:hover { background: var(--maroon); transform: translateY(-1px); }
.platform-icon { width: 1.3rem; height: 1.3rem; flex-shrink: 0; }
.platform-youtube .platform-icon rect { fill: #d3312b; }
.platform-rutube .platform-icon rect { fill: #1c1c1e; }

.topics-search-live {
    position: relative;
    max-width: 32rem;
    margin: 0 0 1.5rem 0;
}
.topics-search-form {
    display: flex;
    gap: .5rem;
}
.topics-search-form input[type="search"] {
    flex: 1 1 auto;
    padding: .6rem .8rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--paper);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
}
.topics-search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--gold);
}
.topics-search-form button {
    padding: .6rem 1.1rem;
    border: none;
    border-radius: 4px;
    background: var(--accent-dark);
    color: #fff;
    font-family: inherit;
    font-size: .95rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color .12s ease;
}
.topics-search-form button:hover { background: var(--maroon); }
.topics-search-live-home {
    max-width: none;
    margin-bottom: 2rem;
}
.topics-search-live-home input[type="search"] {
    padding: .8rem 1rem;
    font-size: 1.1rem;
}
.topics-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: .3rem;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: 0 4px 14px rgba(56, 41, 15, 0.15);
    max-height: 320px;
    overflow-y: auto;
    z-index: 20;
}
.topics-search-result {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .6rem;
    padding: .55rem .8rem;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    font-size: .95rem;
}
.topics-search-result:last-child { border-bottom: none; }
.topics-search-result:hover { background: var(--highlight); }
.topics-search-result-meta {
    flex-shrink: 0;
    display: flex;
    align-items: baseline;
    gap: .4rem;
}
.topics-search-result-verse {
    flex-shrink: 0;
    color: var(--accent-dark);
    font-size: .8rem;
    font-weight: bold;
    white-space: nowrap;
}
.topics-search-result-sage {
    flex-shrink: 0;
    color: #8a7a55;
    font-size: .78rem;
    font-style: italic;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .topics-search-result { flex-direction: column; align-items: flex-start; gap: .2rem; }
    .topics-search-result-meta { flex-wrap: wrap; }
}

.question-card {
    display: block;
    padding: .8rem 1rem;
    background: var(--paper);
    border: 1px solid var(--highlight-border);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 1px 3px rgba(56, 41, 15, 0.06);
    transition: background-color .12s ease, transform .12s ease;
}
.question-card:hover { background: var(--highlight); transform: translateY(-1px); }
.question-card-text { margin: 0 0 .3rem 0; font-size: 1.05rem; }
.question-card-date { color: var(--accent-dark); font-size: .8rem; font-weight: bold; }

.question-full { padding: .5rem 0; }
.question-full-text { margin-bottom: .3rem; }
.question-full-date { color: var(--accent-dark); font-size: .85rem; font-weight: bold; margin: 0 0 1rem 0; }
.question-full-body {
    padding: .9rem 1.1rem;
    margin-bottom: 1rem;
    background: var(--highlight);
    border: 1px solid var(--highlight-border);
    border-radius: 4px;
    font-size: 1.05rem;
    line-height: 1.6;
}
.question-full-answer {
    padding: 1rem 1.2rem;
    background: var(--paper);
    border-left: 3px solid var(--gold);
    border-radius: 4px;
    font-size: 1.1rem;
    line-height: 1.7;
}

.question-ask-form { display: flex; flex-direction: column; gap: .3rem; max-width: 36rem; }
.question-ask-form label { font-weight: bold; margin-top: .8rem; color: var(--accent-dark); }
.question-ask-form input[type="text"],
.question-ask-form input[type="email"],
.question-ask-form textarea {
    padding: .6rem .8rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--paper);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
}
.question-ask-form textarea { resize: vertical; }
.question-ask-error { color: var(--maroon); font-size: .85rem; margin: 0; }
.question-ask-honeypot { position: absolute; left: -9999px; top: -9999px; }
.question-ask-captcha { display: flex; gap: 1rem; }
.question-ask-captcha-option {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-weight: normal;
    color: var(--text);
    cursor: pointer;
}
.question-ask-submit {
    align-self: flex-start;
    margin-top: 1.2rem;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
}

.qa-widget { margin-bottom: 2.5rem; }
.qa-widget h2 {
    margin: 0 0 .8rem 0;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--gold);
    font-family: var(--font-display);
    font-size: 1.3rem;
}
.qa-widget h2 a { color: var(--maroon); text-decoration: none; }
.qa-widget h2 a:hover .qa-widget-item-title,
.qa-widget h2 a:hover { text-decoration: underline; }
.qa-widget-arrow { color: var(--gold); font-weight: normal; }
.qa-widget-list { display: flex; flex-direction: column; }
.qa-widget-item {
    display: block;
    padding: .9rem 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
}
.qa-widget-list .qa-widget-item:last-child { border-bottom: none; }
.qa-widget-item-title {
    margin: 0 0 .2rem 0;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}
.qa-widget-item:hover .qa-widget-item-title { color: var(--maroon); text-decoration: underline; }
.qa-widget-item-meta { margin: 0 0 .3rem 0; font-size: .82rem; color: #8a7a55; }
.qa-widget-item-excerpt { margin: 0; font-size: .95rem; color: #4a3d24; line-height: 1.5; }
.qa-widget-empty { color: #4a3d24; }

.site-messages { list-style: none; padding: 0; margin: 0 0 1.2rem 0; }
.site-message {
    padding: .7rem 1rem;
    border-radius: 4px;
    margin-bottom: .5rem;
    font-size: .95rem;
}
.site-message-success { background: var(--highlight); border: 1px solid var(--highlight-border); color: var(--text); }
.site-message-error { background: #fbe9e5; border: 1px solid #d99b8a; color: #7c3223; }

.report-error-widget {
    margin: 2rem 0 0 0;
    padding: .8rem 1rem;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 4px;
}
.report-error-widget summary {
    cursor: pointer;
    color: var(--accent-dark);
    font-size: .9rem;
}
.report-error-form { display: flex; flex-direction: column; gap: .5rem; margin-top: .8rem; max-width: 32rem; }
.report-error-form textarea {
    padding: .6rem .8rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #fff;
    font-family: inherit;
    font-size: .95rem;
    color: var(--text);
    resize: vertical;
}
.report-error-submit {
    align-self: flex-start;
    border: none;
    font-family: inherit;
    font-size: .9rem;
    cursor: pointer;
    padding: .5rem 1rem;
}
