/* Angel Numbers: hub and sequence pages */

.an-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 100px 20px 60px;
}

.an-article {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    line-height: 1.75;
}

/* Header */

.an-head h1 {
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 14px;
    background: linear-gradient(135deg, #A78BFA 0%, #818CF8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.an-byline {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 26px;
}

.an-lead p {
    font-size: 1.15rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
}

/* Sections */

.an-section {
    margin-top: 44px;
}

.an-section--sub {
    margin-top: 34px;
}

.an-section h2 {
    font-size: clamp(1.4rem, 2.6vw, 1.85rem);
    font-weight: 650;
    line-height: 1.3;
    margin: 0 0 16px;
    color: #E9E4FF;
}

.an-section h3 {
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    font-weight: 600;
    margin: 0 0 14px;
    color: #D9D2FB;
}

.an-article p {
    margin: 0 0 18px;
}

.an-article strong {
    color: #FFFFFF;
    font-weight: 650;
}

.an-article em {
    color: #C4B5FD;
    font-style: italic;
}

.an-article a {
    color: #A78BFA;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.an-article a:hover {
    color: #C4B5FD;
}

/* Lists */

/* reset.css strips list markers site-wide; article prose needs them back */
.an-article ul {
    list-style: disc outside;
    margin: 0 0 20px;
    padding-left: 1.35em;
}

.an-article ol {
    list-style: decimal outside;
    margin: 0 0 20px;
    padding-left: 1.5em;
}

.an-article li {
    margin-bottom: 10px;
}

.an-article li::marker {
    color: rgba(167, 139, 250, 0.8);
}

/* Tables: must scroll inside their own container, never the page body */

.an-table-wrap {
    overflow-x: auto;
    margin: 0 0 24px;
    border: 1px solid rgba(167, 139, 250, 0.18);
    border-radius: 10px;
}

.an-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    min-width: 460px;
}

.an-table th,
.an-table td {
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: top;
}

.an-table th {
    background: rgba(147, 51, 234, 0.14);
    color: #E9E4FF;
    font-weight: 600;
    white-space: nowrap;
}

.an-table tr:last-child td {
    border-bottom: none;
}

/* FAQ */

.an-faq dl {
    margin: 0;
}

.an-faq-item {
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.an-faq-item:last-child {
    border-bottom: none;
}

.an-faq dt {
    font-weight: 650;
    color: #FFFFFF;
    margin-bottom: 8px;
}

.an-faq dd {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
}

/* Sequence index on the hub */

.an-index {
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.an-index h2 {
    font-size: 1.3rem;
    margin: 0 0 16px;
    color: #E9E4FF;
}

.an-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 12px;
}

.an-index-grid a {
    display: block;
    padding: 12px 14px;
    border: 1px solid rgba(167, 139, 250, 0.25);
    border-radius: 10px;
    background: rgba(147, 51, 234, 0.08);
    text-decoration: none;
    color: #E9E4FF;
    font-weight: 600;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.an-index-grid a:hover {
    border-color: rgba(167, 139, 250, 0.55);
    background: rgba(147, 51, 234, 0.16);
}

.an-index-grid span {
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 3px;
}

@media (max-width: 640px) {
    .an-wrap {
        padding: 88px 16px 48px;
    }

    .an-article {
        font-size: 1rem;
    }

    .an-section {
        margin-top: 36px;
    }
}

/* ── Figures ──────────────────────────────────────────────────────────────── */

.an-fig,
.an-grid-fig,
.an-flow-fig {
    margin: 0 0 26px;
}

/* Digit breakdown */

.an-fig {
    padding: 20px;
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 12px;
    background: rgba(147, 51, 234, 0.07);
}

.an-fig-digits {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
    padding: 0;
}

.an-fig-digits li {
    position: relative;
    flex: 1 1 130px;
    margin: 0;
    padding: 14px 12px;
    border-radius: 10px;
    background: rgba(10, 6, 30, 0.5);
    text-align: center;
}

.an-fig-num {
    display: block;
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1;
    color: #C4B5FD;
}

.an-fig-label {
    display: block;
    margin-top: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #FFFFFF;
}

.an-fig-cap {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.6);
}

.an-fig-plus {
    position: absolute;
    top: 50%;
    right: -11px;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: rgba(167, 139, 250, 0.75);
    z-index: 1;
}

.an-fig-math p {
    margin: 0 0 6px;
}

.an-fig-math code {
    font-family: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, monospace;
    font-size: 0.95rem;
    color: #E9E4FF;
    background: rgba(10, 6, 30, 0.5);
    padding: 4px 9px;
    border-radius: 6px;
}

.an-fig-root code {
    color: #FFFFFF;
    background: rgba(147, 51, 234, 0.28);
}

.an-fig-note {
    margin-top: 12px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Sequence grid: 5 across, 2 across on mobile */

.an-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin: 0;
    padding: 0;
}

.an-grid li {
    margin: 0;
}

.an-grid a,
.an-grid div {
    position: relative;
    display: block;
    height: 100%;
    padding: 14px 10px;
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 10px;
    background: rgba(10, 6, 30, 0.45);
    text-align: center;
    text-decoration: none;
}

.an-grid a:hover {
    border-color: rgba(167, 139, 250, 0.6);
    background: rgba(147, 51, 234, 0.16);
}

.an-grid-root {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 0.72rem;
    color: rgba(167, 139, 250, 0.85);
}

.an-grid-seq {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: #E9E4FF;
    line-height: 1.15;
}

.an-grid a .an-grid-seq {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.an-grid-theme {
    display: block;
    margin-top: 5px;
    font-size: 0.78rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.65);
}

/* Flow: horizontal on desktop, vertical on mobile, no loop back */

.an-flow {
    list-style: none;
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0;
}

.an-flow li {
    display: flex;
    align-items: center;
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
}

.an-flow-node {
    flex: 1 1 auto;
    min-width: 0;
    padding: 12px 10px;
    border: 1px solid rgba(167, 139, 250, 0.22);
    border-radius: 10px;
    background: rgba(10, 6, 30, 0.45);
    text-align: center;
}

.an-flow-title {
    display: block;
    font-size: 0.92rem;
    font-weight: 650;
    color: #E9E4FF;
}

.an-flow-cap {
    display: block;
    margin-top: 5px;
    font-size: 0.76rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.6);
}

.an-flow-arrow {
    flex: 0 0 18px;
    height: 1px;
    margin: 0 3px;
    background: rgba(167, 139, 250, 0.5);
    position: relative;
}

.an-flow-arrow::after {
    content: "";
    position: absolute;
    right: -1px;
    top: -3px;
    border-left: 6px solid rgba(167, 139, 250, 0.75);
    border-top: 3.5px solid transparent;
    border-bottom: 3.5px solid transparent;
}

@media (max-width: 860px) {
    .an-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .an-flow {
        flex-direction: column;
    }

    .an-flow li {
        flex-direction: column;
        align-items: stretch;
    }

    .an-flow-arrow {
        width: 1px;
        height: 16px;
        margin: 5px auto;
        flex: 0 0 16px;
    }

    .an-flow-arrow::after {
        right: -3.5px;
        top: auto;
        bottom: -1px;
        border-left: 3.5px solid transparent;
        border-right: 3.5px solid transparent;
        border-top: 6px solid rgba(167, 139, 250, 0.75);
        border-bottom: none;
    }
}

@media (max-width: 640px) {
    .an-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .an-fig {
        padding: 16px;
    }

    .an-fig-digits li {
        flex-basis: 100%;
    }

    .an-fig-plus {
        top: auto;
        right: 50%;
        bottom: -11px;
        transform: translateX(50%);
    }
}

/* Hero image */

.an-hero {
    margin: 26px 0 0;
}

.an-hero img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(167, 139, 250, 0.18);
}
