
/* Astrology Emporium article tables.
   Canonical copy of the global WordPress Custom CSS rules. */
body.ae-electional-course :where(.content-item-description, .course-description, .entry-content) table {
    display: table;
    width: 100%;
    max-width: 100%;
    margin: clamp(24px, 4vw, 40px) 0;
    overflow-x: auto;
    border: 1px solid rgba(212, 175, 55, 0.34);
    border-radius: 10px;
    border-collapse: separate;
    border-spacing: 0;
    background: linear-gradient(180deg, rgba(18, 16, 38, 0.88), rgba(10, 9, 21, 0.94));
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 246, 210, 0.05);
    color: rgba(230, 230, 250, 0.88);
    font-size: clamp(14px, 1.5vw, 16px);
    line-height: 1.55;
    -webkit-overflow-scrolling: touch;
}

/* Preserve one column grid across the header, body, and footer. */
body.ae-electional-course :where(.content-item-description, .course-description, .entry-content) table > thead {
    display: table-header-group;
}

body.ae-electional-course :where(.content-item-description, .course-description, .entry-content) table > tbody {
    display: table-row-group;
}

body.ae-electional-course :where(.content-item-description, .course-description, .entry-content) table > tfoot {
    display: table-footer-group;
}

body.ae-electional-course :where(.content-item-description, .course-description, .entry-content) table th,
body.ae-electional-course :where(.content-item-description, .course-description, .entry-content) table td {
    padding: 14px 16px;
    border: 0;
    border-right: 1px solid rgba(212, 175, 55, 0.14);
    border-bottom: 1px solid rgba(212, 175, 55, 0.16);
    color: inherit;
    text-align: left;
    vertical-align: top;
}

body.ae-electional-course :where(.content-item-description, .course-description, .entry-content) table th:last-child,
body.ae-electional-course :where(.content-item-description, .course-description, .entry-content) table td:last-child {
    border-right: 0;
}

body.ae-electional-course :where(.content-item-description, .course-description, .entry-content) table tbody tr:last-child td {
    border-bottom: 0;
}

body.ae-electional-course :where(.content-item-description, .course-description, .entry-content) table thead th {
    background: linear-gradient(180deg, rgba(68, 46, 102, 0.92), rgba(30, 23, 54, 0.96));
    color: #f3dc83 !important;
    font-family: var(--wp--preset--font-family--headings, Cinzel, serif);
    font-size: 0.9em;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

body.ae-electional-course :where(.content-item-description, .course-description, .entry-content) table tbody tr:nth-child(even) td {
    background: rgba(212, 175, 55, 0.045);
}

body.ae-electional-course :where(.content-item-description, .course-description, .entry-content) table tbody tr:hover td {
    background: rgba(212, 175, 55, 0.09);
}

body.ae-electional-course :where(.content-item-description, .course-description, .entry-content) table a {
    color: #f3dc83 !important;
    font-weight: 700;
    text-decoration-color: rgba(212, 175, 55, 0.5);
    text-underline-offset: 0.18em;
}

body.ae-electional-course :where(.content-item-description, .course-description, .entry-content) table a:hover {
    color: #fff8d9 !important;
    text-decoration-color: #d4af37;
}

@media (max-width: 640px) {
    /* A scrollable table retains native row groups sharing a single grid. */
    body.ae-electional-course :where(.content-item-description, .course-description, .entry-content) table {
        display: block;
        overflow-x: auto;
    }

    body.ae-electional-course :where(.content-item-description, .course-description, .entry-content) table th,
    body.ae-electional-course :where(.content-item-description, .course-description, .entry-content) table td {
        padding: 11px 12px;
    }
}

/* Course-specific reading helpers; retain the Academy's existing visual theme. */
body.ae-electional-course .content-item-description img { max-width:100%; height:auto; }
body.ae-electional-course .content-item-description h2 { scroll-margin-top:110px; }
body.ae-electional-course .ae-article-toc { margin:1.5rem 0; padding:1rem; border:1px solid rgba(212,175,55,.35); border-radius:12px; background:rgba(8,20,40,.6); }
body.ae-electional-course .ae-article-toc summary { cursor:pointer; color:#f3dc83; }
body.ae-electional-course .ae-hellenistic-overview li { margin-bottom:.7rem; }
body.ae-electional-course .ae-course-start { display:inline-block; border:1px solid #d4aa55; border-radius:8px; padding:.6rem 1rem; }
.course-img.ae-hellenistic-cover { height:auto; aspect-ratio:1; }
.course-img.ae-hellenistic-cover img.ae-square-course-cover { display:block; width:100%; height:auto; aspect-ratio:1; object-fit:contain; }


body.ae-electional-course .table-scroll{overflow-x:auto}body.ae-electional-course .source-passage{margin:22px 0;padding:8px 24px;border-left:3px solid #d4af37;background:rgba(30,23,54,.7)}body.ae-electional-course figure{margin:30px 0}body.ae-electional-course figcaption{font-size:.86em;color:#c8b88e;line-height:1.55}body.ae-electional-course .lesson-nav{margin-top:40px;border-top:1px solid #766335;padding-top:20px}
