@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Literata:opsz,wght@7..72,400;7..72,500;7..72,600&display=swap');

:root {
    font-family: 'DM Sans', sans-serif;
    color: #f2f7fc;
    background: #071b33;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    --paper: #071b33;
    --surface: #102b49;
    --ink: #f2f7fc;
    --muted: #b4c3d4;
    --line: #294666;
    --green: #70d5ff;
    --green-soft: #173957;
    --gold: #70d5ff;
    --topbar: #36577e;
    --shadow: 0 12px 36px #0003
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink)
}

html {
    overflow-x: clip
}

button,
input,
select {
    font: inherit
}

button {
    cursor: pointer;
    color: inherit
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column
}

.topbar {
    height: 76px;
    padding: 0 max(28px, calc((100vw - 1180px)/2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #ffffff1c;
    background: var(--topbar);
    position: sticky;
    top: 0;
    z-index: 5
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit
}

.brand-copy {
    display: grid;
    gap: 2px
}

.brand-copy strong {
    font: 700 20px/1.1 'DM Sans', sans-serif;
    letter-spacing: .025em;
    white-space: nowrap
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 12px
}

.font-controls {
    display: none;
    align-items: center;
    gap: 5px
}

.reader-active .font-controls {
    display: flex
}

.font-controls button {
    min-width: 38px;
    height: 38px;
    padding: 0 7px;
    border: 1px solid #ffffff30;
    border-radius: 8px;
    background: #ffffff14;
    color: #f2f7fc;
    font-size: 14px;
    font-weight: 600
}

.font-controls button:hover {
    background: #ffffff26
}

.icon-button {
    height: 40px;
    background: #ffffff14;
    border: 1px solid #ffffff30;
    border-radius: 9px;
    color: #f2f7fc
}

.icon-button {
    width: 40px;
    font-size: 18px
}

.mobile-menu-toggle {
    display: none
}

main {
    flex: 1
}

.footer {
    width: 100%;
    margin: 0;
    padding: 24px 20px 22px;
    background: #2b4368;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center
}

.footer-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(20px, 3.2vw, 42px)
}

.footer-social a {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    transition: background .2s ease, transform .2s ease
}

.footer-social a:hover {
    background: #ffffff1a;
    transform: translateY(-2px)
}

.footer-social a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px
}

.footer-social svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 1px 1px #14243b55)
}

.footer-social .whatsapp-icon {
    width: 36px;
    height: 36px;
    fill: currentColor;
    stroke: none
}

.footer-social .social-dot,
.footer-social .social-play,
.footer-social .youtube-frame {
    fill: currentColor;
    stroke: none
}

.footer-social .social-play {
    fill: #2b4368
}

.footer-social .social-solid {
    fill: currentColor;
    stroke: none
}

.footer-social .facebook-disc {
    fill: currentColor;
    stroke: none
}

.footer-social .facebook-letter {
    fill: #2b4368;
    stroke: none
}

.footer-copy {
    width: 100%;
    padding-top: 14px;
    border-top: 1px solid #ffffff30;
    font-size: 12px;
    line-height: 1.5
}

.home {
    max-width: 1180px;
    width: calc(100% - 56px);
    margin: 0 auto
}

.hero {
    padding: 76px 0 58px;
    display: grid;
    grid-template-columns: 1fr 300px;
    align-items: center;
    gap: 48px;
    border-bottom: 1px solid var(--line)
}

.eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: var(--green);
    font-weight: 700
}

.hero h1 {
    font: 500 clamp(40px, 5.5vw, 68px)/1.07 'Literata', serif;
    letter-spacing: -.045em;
    margin: 17px 0
}

.hero p {
    max-width: 760px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.8;
    margin: 0
}

.hero-search {
    width: min(100%, 760px);
    min-height: 68px;
    margin-top: 26px;
    padding: 7px 8px 7px 27px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #ffffffb8;
    border-radius: 999px;
    background: #e4f0ff;
    box-shadow: 0 10px 28px #00162d45;
    transition: border-color .2s ease, box-shadow .25s ease, transform .25s ease
}

.hero-search:focus-within {
    border-color: #40b8ff;
    box-shadow: 0 0 0 4px #1595f52e, 0 14px 36px #00162d55;
    transform: translateY(-2px)
}

.hero-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: #26496c;
    font-size: 17px
}

.hero-search input::placeholder {
    color: #516c89;
    opacity: 1
}

.hero-search button {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(145deg, #08a8f4, #0967ef);
    color: white;
    box-shadow: 0 4px 10px #0876dc55;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease
}

.hero-search button:hover {
    filter: brightness(1.08);
    transform: scale(1.05);
    box-shadow: 0 6px 15px #0876dc70
}

.hero-search button:active {
    transform: scale(.96)
}

.hero-search svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round
}

.hero-card {
    border: 1px solid var(--line);
    background: var(--surface);
    padding: 25px;
    border-radius: 14px;
    box-shadow: var(--shadow)
}

.hero-card span {
    color: var(--gold);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 700
}

.hero-card h2 {
    font: 500 22px/1.35 'Literata', serif;
    margin: 13px 0 8px
}

.hero-card p {
    font-size: 13px;
    line-height: 1.6
}

.continue-link {
    display: block;
    margin-top: 18px;
    color: var(--green);
    font-weight: 700;
    font-size: 13px;
    text-decoration: none
}

.daily-verses {
    padding: 38px 0 42px;
    border-bottom: 1px solid var(--line)
}

.daily-heading {
    margin: 0 0 18px
}

.daily-heading span {
    color: var(--muted);
    font-size: 12px
}

.daily-verse-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px
}

.daily-verse-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 22px;
    padding: 25px 27px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease
}

.daily-verse-card:target {
    border-color: var(--green);
    box-shadow: 0 0 0 4px var(--green-soft), var(--shadow)
}

.daily-verse-card blockquote {
    margin: 0;
    font: 400 clamp(19px, 2.3vw, 26px)/1.55 'Literata', serif;
    color: var(--ink)
}

.daily-verse-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 15px;
    border-top: 1px solid var(--line)
}

.daily-verse-footer strong {
    color: var(--green);
    font-size: 13px
}

.share-verse {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    font-size: 12px;
    transition: background .2s ease, border-color .2s ease, transform .2s ease
}

.share-verse:hover {
    background: var(--green-soft);
    border-color: var(--green);
    transform: translateY(-1px)
}

.share-verse svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin: 42px 0 18px
}

.section-heading h2 {
    font: 500 28px 'Literata', serif;
    margin: 0
}

.section-heading p {
    color: var(--muted);
    font-size: 13px;
    margin: 6px 0 0
}

.volume-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px
}

#volumes {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 10px max(28px, calc((100vw - 1180px)/2)) 62px;
    border-radius: 26px 26px 0 0;
    background: #E1F3FE;
    color: #17324f
}

#volumes .section-heading {
    margin-top: 37px
}

#volumes .section-heading p,
#volumes .section-heading > span {
    color: #687b91
}

#volumes .volume-card {
    background: #f1f3f5;
    border-color: #e1e8f0;
    color: #17324f;
    box-shadow: 0 2px 8px #102b4910
}

#volumes .volume-card:hover {
    border-color: #74b9ed;
    box-shadow: 0 12px 28px #102b4918
}

#volumes .volume-number,
#volumes .card-open {
    color: #087fca
}

#volumes .volume-count,
#volumes .volume-card p {
    color: #687b91
}

.volume-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: transform .2s, border-color .2s, box-shadow .2s
}

.volume-card:hover {
    transform: translateY(-3px);
    border-color: #b7ccbd;
    box-shadow: var(--shadow)
}

.volume-top {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.volume-number {
    color: var(--green);
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: .1em
}

.volume-count {
    font-size: 11px;
    color: var(--muted)
}

.volume-card h3 {
    font: 500 20px 'Literata', serif;
    margin: 15px 0 7px
}

.volume-card p {
    font-size: 12px;
    line-height: 1.65;
    color: var(--muted);
    margin: 0;
    min-height: 39px
}

.card-open {
    display: block;
    margin-top: 15px;
    color: var(--green);
    font-weight: 700;
    font-size: 12px
}

.reader {
    max-width: 1180px;
    width: calc(100% - 56px);
    margin: 28px auto 0
}

.breadcrumbs {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 22px
}

.breadcrumbs button {
    border: 0;
    background: none;
    color: var(--green);
    padding: 0
}

.reader-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 760px);
    gap: 54px;
    justify-content: center
}

.chapter-nav {
    align-self: start;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 122px);
    overflow: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px
}

.nav-volume {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--paper);
    color: var(--ink)
}

.chapter-filter {
    width: 100%;
    margin: 10px 0;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--ink);
    font-size: 12px
}

.chapter-list {
    display: grid;
    gap: 3px
}

.chapter-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: 6px;
    padding: 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35
}

.chapter-item:hover,
.chapter-item.active {
    background: var(--green-soft);
    color: var(--green)
}

.chapter-item b {
    flex: 0 0 24px
}

.article {
    min-width: 0
}

.article-kicker {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--green);
    font-weight: 700
}

.article h1 {
    font: 500 clamp(32px, 4.2vw, 48px)/1.15 'Literata', serif;
    letter-spacing: -.03em;
    margin: 12px 0 32px
}

.article-body {
    font: 400 18px/1.95 'Literata', serif;
    color: var(--ink)
}

.article-body p {
    margin: 0 0 1.2em
}

.article-body h2,
.article-body h3 {
    font-weight: 500;
    line-height: 1.3;
    margin: 2em 0 .8em
}

.article-body h2 {
    font-size: 27px
}

.article-body h3 {
    font-size: 22px
}

.article-body blockquote {
    margin: 1.4em 0;
    padding: 4px 0 4px 20px;
    border-left: 2px solid var(--gold);
    color: var(--muted)
}

.article-body ul,
.article-body ol {
    padding-left: 1.5em
}

.article-body strong {
    font-weight: 600
}

.reader-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--line);
    margin-top: 44px;
    padding-top: 20px
}

.reader-controls button,
.back-button {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px
}

.reader-controls button:disabled {
    opacity: .4;
    cursor: not-allowed
}

.reader-tools {
    display: flex;
    gap: 8px;
    margin-left: auto
}

.reader-tools button {
    padding: 7px 10px
}

.empty {
    padding: 55px 0;
    text-align: center;
    color: var(--muted)
}

.search-layer {
    position: fixed;
    inset: 0;
    background: #17211db5;
    z-index: 20;
    padding: 12vh 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start
}

.search-dialog {
    width: min(650px, 100%);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 13px;
    overflow: hidden;
    box-shadow: 0 24px 80px #0003
}

.search-field-wrap {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    color: var(--muted)
}

.search-field-wrap input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font-size: 16px
}

.search-field-wrap button {
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--paper);
    padding: 4px 7px;
    color: var(--muted);
    font-size: 10px
}

.search-results {
    max-height: 55vh;
    overflow: auto;
    padding: 8px
}

.search-hint {
    padding: 12px;
    color: var(--muted);
    font-size: 13px
}

.search-result {
    display: block;
    padding: 13px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit
}

.search-result:hover {
    background: var(--green-soft)
}

.search-result strong {
    display: block;
    font: 500 16px 'Literata', serif
}

.search-result small {
    color: var(--green);
    font-size: 10px
}

.search-result p {
    font-size: 12px;
    line-height: 1.55;
    color: var(--muted);
    margin: 6px 0 0
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translate(-50%, 20px);
    opacity: 0;
    pointer-events: none;
    padding: 11px 16px;
    border-radius: 8px;
    background: var(--ink);
    color: white;
    font-size: 12px;
    transition: .2s;
    z-index: 30
}

.toast.show {
    transform: translate(-50%, 0);
    opacity: 1
}

[hidden] {
    display: none !important
}

body.dark {
    --paper: #031326;
    --surface: #0b223c;
    --ink: #eef6ff;
    --muted: #a6bbd0;
    --line: #203c5a;
    --green: #62cfff;
    --green-soft: #102f4c;
    --gold: #62cfff;
    --topbar: #28496e;
    --shadow: 0 12px 36px #0005
}

@media(max-width:760px) {
    .topbar {
        height: 66px;
        padding: 0 18px
    }

    .top-actions {
        gap: 6px
    }

    .font-controls {
        gap: 3px
    }

    .font-controls button {
        min-width: 32px;
        height: 34px;
        padding: 0 5px;
        font-size: 12px
    }

    .brand-copy strong {
        font-size: clamp(11px, 3.3vw, 15px);
        letter-spacing: 0
    }

    .home,
    .reader {
        width: calc(100% - 36px)
    }

    .hero {
        padding: 48px 0 36px;
        grid-template-columns: 1fr;
        gap: 24px
    }

    .hero-search {
        min-height: 62px;
        margin-top: 22px;
        padding-left: 20px
    }

    .hero-search input {
        font-size: 15px
    }

    .hero-search button {
        width: 48px;
        height: 48px;
        flex-basis: 48px
    }

    .hero-card {
        max-width: none
    }

    #volumes {
        padding: 8px 18px 42px
    }

    .daily-verse-grid {
        grid-template-columns: 1fr
    }

    .daily-verse-card {
        padding: 22px 21px 16px
    }

    .volume-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .reader {
        margin-top: 20px
    }

    .reader-layout {
        display: block
    }

    .chapter-nav {
        display: none;
        position: fixed;
        z-index: 10;
        top: 66px;
        left: 0;
        bottom: 0;
        width: min(320px, 88vw);
        max-height: none;
        border-radius: 0 12px 12px 0
    }

    .chapter-nav.open {
        display: block
    }

    .mobile-menu-toggle {
        display: block
    }

    .article h1 {
        margin-bottom: 24px
    }

    .article-body {
        font-size: 17px
    }

    .footer {
        width: 100%;
        gap: 14px;
        padding: 22px 16px 20px
    }

    .footer-social {
        gap: clamp(16px, 5vw, 24px)
    }

    .footer-social a {
        width: 38px;
        height: 38px
    }

    .footer-social svg {
        width: 25px;
        height: 25px
    }

    .footer-social .whatsapp-icon {
        width: 32px;
        height: 32px
    }

    .section-heading h2 {
        font-size: 25px
    }
}

@media(max-width:440px) {
    .volume-grid {
        grid-template-columns: 1fr
    }

    .hero h1 {
        font-size: 43px
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
        gap: 8px
    }

    .reader-controls {
        gap: 7px
    }

    .reader-controls button {
        padding: 9px;
        font-size: 11px
    }
}
