/* TarotAstrolabe theory knowledge page */

body.page-theory-knowledge {
    min-height: 100dvh;
    overflow-y: auto;
    color: rgba(238, 232, 219, .92);
    background:
        radial-gradient(circle at 14% 10%, rgba(217, 184, 107, .12), transparent 22rem),
        radial-gradient(circle at 86% 14%, rgba(72, 128, 170, .14), transparent 24rem),
        linear-gradient(180deg, #03050c, #070913 56%, #03050c);
    user-select: text;
}

.theory-page-shell {
    width: min(1240px, calc(100% - 28px));
    margin: 0 auto;
    padding: clamp(86px, 9vw, 116px) 0 52px;
}

.theory-hero {
    position: relative;
    overflow: hidden;
    min-height: 430px;
    display: grid;
    align-items: end;
    border: 1px solid rgba(218, 191, 138, .2);
    border-radius: 14px;
    padding: clamp(28px, 5vw, 58px);
    background:
        linear-gradient(118deg, rgba(5, 7, 17, .94), rgba(5, 7, 17, .72) 55%, rgba(5, 7, 17, .52)),
        url("images/ui/theory-reflection-flow-v1.webp") right top / min(650px, 58vw) auto no-repeat,
        radial-gradient(circle at 68% 20%, rgba(217, 184, 107, .14), transparent 18rem),
        #050711;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .05);
}

.theory-kicker {
    margin: 0 0 .78rem;
    color: rgba(244, 213, 139, .9);
    font: 700 .74rem Lato, sans-serif;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.theory-hero h1 {
    max-width: 60rem;
    margin: 0;
    color: rgba(247, 232, 202, .98);
    font-family: Cormorant Garamond, "Noto Serif TC", serif;
    font-size: clamp(2.45rem, 6.4vw, 5.65rem);
    line-height: .98;
    letter-spacing: 0;
    text-shadow: 0 24px 56px rgba(0, 0, 0, .55);
}

.theory-hero p,
.theory-section-head p,
.theory-panel p,
.theory-flow-card p,
.theory-copy-block p,
.theory-method-card p,
.theory-boundary-card p,
.theory-faq p,
.theory-related-panel p {
    color: rgba(230, 226, 214, .76);
    line-height: 1.78;
}

.theory-hero p {
    max-width: 50rem;
    margin: 1.1rem 0 0;
    font-size: clamp(1rem, 1.62vw, 1.22rem);
}

.theory-hero-actions,
.theory-section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-top: 1.45rem;
}

.theory-button,
.theory-button-secondary {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0 1.15rem;
    text-decoration: none;
    font-weight: 700;
}

.theory-button {
    border: 1px solid rgba(244, 213, 139, .42);
    color: #160f05;
    background: linear-gradient(180deg, #ffe7aa, #d8aa4b);
}

.theory-button-secondary {
    border: 1px solid rgba(218, 191, 138, .24);
    color: rgba(247, 232, 202, .92);
    background: rgba(255, 255, 255, .04);
}

.theory-section {
    margin-top: clamp(28px, 5vw, 48px);
}

.theory-section-head {
    max-width: 58rem;
    margin-bottom: 1.1rem;
}

.theory-section-head h2 {
    margin: 0;
    color: rgba(247, 232, 202, .96);
    font-family: Cormorant Garamond, "Noto Serif TC", serif;
    font-size: clamp(1.8rem, 3.4vw, 2.95rem);
    line-height: 1.08;
}

.theory-section-head p {
    margin: .72rem 0 0;
}

.theory-summary-grid,
.theory-method-grid,
.theory-boundary-grid {
    display: grid;
    gap: 14px;
}

.theory-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.theory-method-grid,
.theory-boundary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.theory-panel,
.theory-flow-card,
.theory-method-card,
.theory-boundary-card,
.theory-main-card,
.theory-side-card,
.theory-faq details,
.theory-related-panel {
    border: 1px solid rgba(218, 191, 138, .16);
    border-radius: 12px;
    background: rgba(5, 7, 17, .62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.theory-panel,
.theory-method-card,
.theory-boundary-card,
.theory-flow-card {
    padding: 1.1rem;
}

.theory-panel span,
.theory-method-card span,
.theory-boundary-card span,
.theory-flow-card span,
.theory-side-card span {
    display: block;
    margin-bottom: .5rem;
    color: rgba(244, 213, 139, .84);
    font: 700 .72rem Lato, sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.theory-panel h3,
.theory-method-card h3,
.theory-boundary-card h3,
.theory-flow-card h3,
.theory-copy-block h3,
.theory-side-card h3 {
    margin: 0 0 .62rem;
    color: rgba(247, 232, 202, .98);
    font-family: Cormorant Garamond, "Noto Serif TC", serif;
    font-size: 1.42rem;
    line-height: 1.2;
}

.theory-panel p,
.theory-method-card p,
.theory-boundary-card p,
.theory-flow-card p {
    margin: 0;
    font-size: .98rem;
}

.theory-flow-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.theory-flow-card {
    position: relative;
    overflow: hidden;
}

.theory-flow-card::after {
    content: "";
    position: absolute;
    inset: auto 1rem 1rem auto;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(244, 213, 139, .24);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(244, 213, 139, .12), transparent 70%);
}

.theory-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
}

.theory-main-card,
.theory-side-card {
    padding: clamp(20px, 3vw, 32px);
}

.theory-copy-block + .theory-copy-block {
    margin-top: 1.8rem;
    padding-top: 1.7rem;
    border-top: 1px solid rgba(218, 191, 138, .12);
}

.theory-copy-block p {
    margin: 0;
    font-size: 1rem;
}

.theory-copy-block p + p {
    margin-top: .86rem;
}

.theory-list {
    display: grid;
    gap: .68rem;
    margin: .85rem 0 0;
    padding: 0;
    list-style: none;
}

.theory-list li {
    position: relative;
    border: 1px solid rgba(218, 191, 138, .11);
    border-radius: 10px;
    padding: .78rem .88rem .78rem 1.55rem;
    color: rgba(230, 226, 214, .78);
    background: rgba(255, 255, 255, .028);
    line-height: 1.7;
}

.theory-list li::before {
    content: "";
    position: absolute;
    left: .82rem;
    top: 1.45rem;
    width: .34rem;
    height: .34rem;
    border-radius: 999px;
    background: rgba(244, 213, 139, .82);
}

.theory-side-stack {
    display: grid;
    align-content: start;
    gap: 14px;
}

.theory-side-card {
    padding: 1rem;
}

.theory-side-card a {
    color: rgba(244, 213, 139, .92);
    text-decoration: none;
}

.theory-side-card a:hover {
    text-decoration: underline;
}

.theory-faq {
    display: grid;
    gap: .78rem;
}

.theory-faq details {
    padding: 1rem;
}

.theory-faq summary {
    cursor: pointer;
    color: rgba(247, 232, 202, .96);
    font-weight: 700;
}

.theory-faq p {
    margin: .72rem 0 0;
}

.theory-related-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: clamp(20px, 3vw, 32px);
}

.theory-related-panel p {
    max-width: 48rem;
    margin: 0;
}

@media (max-width: 1080px) {
    .theory-summary-grid,
    .theory-flow-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .theory-method-grid,
    .theory-boundary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .theory-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .theory-page-shell {
        width: min(100%, calc(100% - 20px));
        padding-top: 82px;
    }

    .theory-hero {
        min-height: 360px;
        padding: 24px;
        background:
            linear-gradient(180deg, rgba(5, 7, 17, .72), rgba(5, 7, 17, .96)),
            url("images/ui/theory-reflection-flow-v1.webp") right top / auto 260px no-repeat,
            #050711;
    }

    .theory-summary-grid,
    .theory-flow-grid,
    .theory-method-grid,
    .theory-boundary-grid {
        grid-template-columns: 1fr;
    }

    .theory-main-card,
    .theory-side-card {
        padding: 18px;
    }

    .theory-related-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .theory-button,
    .theory-button-secondary {
        width: 100%;
    }
}
