/*
 * Astrology design system.
 *
 * Built out of the purple the app already used (#6f42c1 / #3a2a6d) into a full
 * token set. Everything downstream — Bootstrap overrides, the chart SVG, the
 * segment tabs — reads these variables, so re-skinning means editing this block
 * and nothing else.
 */

:root {
    color-scheme: light;

    /* Brand ramp */
    --astro-50: #f6f3fd;
    --astro-100: #ece5fa;
    --astro-200: #d9ccf5;
    --astro-300: #bda6ec;
    --astro-400: #9b78e0;
    --astro-500: #7f52d1;
    --astro-600: #6f42c1;
    --astro-700: #5b34a0;
    --astro-800: #452a76;
    --astro-900: #3a2a6d;
    --astro-950: #241a45;

    /* Warm counterweight, used for the centre of the chart and for "unlock" moments */
    --astro-gold-300: #ffd76a;
    --astro-gold-500: #e8a819;
    --astro-gold-700: #a97407;

    /* Confirmation green — the tick that answers copy / download / send. */
    --astro-success: #0f8a6a;

    /* Per-segment accents. Chosen to stay distinguishable in both themes and for
       the common forms of colour blindness — they differ in lightness, not only hue. */
    --astro-seg-personality: #6f42c1;
    --astro-seg-business: #0f8a6a;
    --astro-seg-love: #cf3a6b;
    --astro-seg-ancestry: #b07408;

    --astro-seg-personality-soft: #ece5fa;
    --astro-seg-business-soft: #dcf3ec;
    --astro-seg-love-soft: #fbe4ec;
    --astro-seg-ancestry-soft: #f9eed6;

    /* Surfaces */
    --astro-bg: #f4f2fb;
    --astro-bg-alt: #ebe7f7;
    --astro-surface: #ffffff;
    --astro-surface-2: #faf8ff;
    --astro-border: #e2dcf2;
    --astro-border-strong: #c9bce6;

    /* Text */
    --astro-ink: #241a45;
    --astro-ink-soft: #5b5378;
    --astro-ink-faint: #8d82ab;
    --astro-on-brand: #ffffff;

    /* Chart ink — the octagram keeps a near-black stroke so the geometry stays crisp.
       The plate stays light in both themes: the age ring carries 56 labels at 4.6px
       and they stop being legible the moment the background goes dark. */
    --astro-chart-plate: #fbfaff;
    --astro-chart-bg-inner: #ffffff;
    --astro-chart-bg-outer: #f7f4fd;
    --astro-chart-line: #2f2545;
    --astro-chart-line-soft: #c9bce6;
    --astro-chart-node: #ffffff;
    --astro-chart-node-stroke: #4b3869;
    --astro-chart-text: #241a45;
    --astro-chart-text-soft: #6d6390;

    --astro-radius: 1rem;
    --astro-radius-sm: .6rem;
    --astro-shadow: 0 10px 30px rgba(36, 26, 69, .08);
    --astro-shadow-lg: 0 18px 50px rgba(36, 26, 69, .16);
    --astro-focus: 0 0 0 3px rgba(111, 66, 193, .35);
}

:root[data-theme='dark'] {
    color-scheme: dark;

    --astro-success: #46c8a2;

    --astro-seg-personality: #b295ec;
    --astro-seg-business: #40c4a0;
    --astro-seg-love: #f2789f;
    --astro-seg-ancestry: #e0b23f;

    --astro-seg-personality-soft: #2c2350;
    --astro-seg-business-soft: #12332c;
    --astro-seg-love-soft: #3a1c29;
    --astro-seg-ancestry-soft: #35290f;

    --astro-bg: #14102a;
    --astro-bg-alt: #1b1638;
    --astro-surface: #1e1940;
    --astro-surface-2: #241e4c;
    --astro-border: #2f2860;
    --astro-border-strong: #453c80;

    --astro-ink: #f0edfb;
    --astro-ink-soft: #bcb4dc;
    --astro-ink-faint: #8d85b3;

    --astro-shadow: 0 10px 30px rgba(0, 0, 0, .4);
    --astro-shadow-lg: 0 18px 50px rgba(0, 0, 0, .55);
    --astro-focus: 0 0 0 3px rgba(178, 149, 236, .45);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme='light']) {
        color-scheme: dark;

        --astro-success: #46c8a2;

        --astro-seg-personality: #b295ec;
        --astro-seg-business: #40c4a0;
        --astro-seg-love: #f2789f;
        --astro-seg-ancestry: #e0b23f;

        --astro-seg-personality-soft: #2c2350;
        --astro-seg-business-soft: #12332c;
        --astro-seg-love-soft: #3a1c29;
        --astro-seg-ancestry-soft: #35290f;

        --astro-bg: #14102a;
        --astro-bg-alt: #1b1638;
        --astro-surface: #1e1940;
        --astro-surface-2: #241e4c;
        --astro-border: #2f2860;
        --astro-border-strong: #453c80;

        --astro-ink: #f0edfb;
        --astro-ink-soft: #bcb4dc;
        --astro-ink-faint: #8d85b3;

        --astro-shadow: 0 10px 30px rgba(0, 0, 0, .4);
        --astro-shadow-lg: 0 18px 50px rgba(0, 0, 0, .55);
        --astro-focus: 0 0 0 3px rgba(178, 149, 236, .45);
    }
}

/* ---------------------------------------------------------------- base ---- */

body {
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--astro-bg);
    color: var(--astro-ink);
    min-height: 100vh;
}

a {
    color: var(--astro-600);
}

:root[data-theme='dark'] a {
    color: var(--astro-300);
}

.text-muted {
    color: var(--astro-ink-soft) !important;
}

.astro-eyebrow {
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--astro-ink-faint);
}

/* -------------------------------------------------------------- chrome ---- */

.astro-nav {
    background: linear-gradient(135deg, var(--astro-900) 0%, var(--astro-600) 100%);
}

.astro-nav .navbar-brand,
.astro-nav .nav-link {
    color: #fff !important;
    font-weight: 600;
    letter-spacing: .4px;

    /* These are links, and they need to read as pressable. The `!important` above
       beats Bootstrap's own hover colour, which left the brand with a pointer
       cursor and no feedback whatsoever — hover, focus and press all did nothing.
       The negative margin cancels the new padding so the brand still lines up
       with the content below it. */
    padding: .3rem .7rem;
    margin-left: -.7rem;
    border-radius: 999px;
    transition: background-color .15s ease;
}

.astro-nav .nav-link {
    margin-left: 0;
}

.astro-nav .navbar-brand:hover,
.astro-nav .nav-link:hover {
    background: rgba(255, 255, 255, .16);
}

.astro-nav .navbar-brand:active,
.astro-nav .nav-link:active {
    background: rgba(255, 255, 255, .26);
}

/* Bootstrap suppresses the outline on these, so keyboard users were left with no
   focus indicator at all. Put an explicit one back. */
.astro-nav .navbar-brand:focus-visible,
.astro-nav .nav-link:focus-visible,
.astro-theme-toggle:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.astro-theme-toggle {
    border: 1px solid rgba(255, 255, 255, .35);
    background: transparent;
    color: #fff;
    border-radius: 999px;
    width: 2.25rem;
    height: 2.25rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.astro-theme-toggle:hover {
    background: rgba(255, 255, 255, .15);
}

/* --------------------------------------------------------------- cards ---- */

.card {
    border: 1px solid var(--astro-border);
    border-radius: var(--astro-radius);
    box-shadow: var(--astro-shadow);
    background: var(--astro-surface);
    color: var(--astro-ink);
}

.astro-panel {
    background: var(--astro-surface);
    border: 1px solid var(--astro-border);
    border-radius: var(--astro-radius);
    box-shadow: var(--astro-shadow);
}

.astro-hero {
    background: linear-gradient(140deg, var(--astro-900) 0%, var(--astro-600) 55%, var(--astro-500) 100%);
    color: #fff;
    border-radius: var(--astro-radius);
    box-shadow: var(--astro-shadow-lg);
}

.astro-hero .astro-eyebrow {
    color: rgba(255, 255, 255, .7);
}

/* ------------------------------------------------------------- buttons ---- */

.btn-astro {
    background: var(--astro-600);
    border: 1px solid var(--astro-600);
    color: var(--astro-on-brand);
    font-weight: 600;
    border-radius: 999px;
    padding: .55rem 1.5rem;
}

.btn-astro:hover,
.btn-astro:focus {
    background: var(--astro-700);
    border-color: var(--astro-700);
    color: #fff;
}

.btn-astro:focus-visible {
    box-shadow: var(--astro-focus);
    outline: none;
}

.btn-astro-outline {
    background: transparent;
    border: 1px solid var(--astro-border-strong);
    color: var(--astro-ink);
    font-weight: 600;
    border-radius: 999px;
    padding: .55rem 1.35rem;
}

.btn-astro-outline:hover {
    border-color: var(--astro-600);
    color: var(--astro-600);
}

.btn-astro-gold {
    background: linear-gradient(135deg, var(--astro-gold-300), var(--astro-gold-500));
    border: none;
    color: #3a2a00;
    font-weight: 700;
    border-radius: 999px;
    padding: .6rem 1.6rem;
}

.btn-astro-gold:hover {
    filter: brightness(1.06);
    color: #3a2a00;
}

/* -------------------------------------------------------------- inputs ---- */

.form-control,
.form-select {
    background: var(--astro-surface-2);
    border: 1px solid var(--astro-border);
    color: var(--astro-ink);
    border-radius: var(--astro-radius-sm);
    padding: .6rem .85rem;
}

.form-control:focus,
.form-select:focus {
    background: var(--astro-surface);
    border-color: var(--astro-400);
    box-shadow: var(--astro-focus);
    color: var(--astro-ink);
}

.form-control::placeholder {
    color: var(--astro-ink-faint);
}

.form-label {
    font-weight: 600;
    font-size: .875rem;
    color: var(--astro-ink-soft);
}

/* ---------------------------------------------------------------- tabs ---- */

.astro-tabs {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--astro-border);
    padding-bottom: .75rem;
    margin-bottom: 1.5rem;
}

.astro-tab {
    --tab-accent: var(--astro-600);
    display: flex;
    align-items: center;
    gap: .5rem;
    border: 1px solid var(--astro-border);
    background: var(--astro-surface);
    color: var(--astro-ink-soft);
    border-radius: 999px;
    padding: .5rem 1.1rem;
    font-weight: 600;
    font-size: .92rem;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}

.astro-tab[data-segment='personality'] { --tab-accent: var(--astro-seg-personality); }
.astro-tab[data-segment='business']    { --tab-accent: var(--astro-seg-business); }
.astro-tab[data-segment='love']        { --tab-accent: var(--astro-seg-love); }
.astro-tab[data-segment='ancestry']    { --tab-accent: var(--astro-seg-ancestry); }

.astro-tab:hover {
    border-color: var(--tab-accent);
    color: var(--tab-accent);
}

.astro-tab.is-active {
    background: var(--tab-accent);
    border-color: var(--tab-accent);
    color: #fff;
}

.astro-tab:focus-visible {
    outline: none;
    box-shadow: var(--astro-focus);
}

.astro-tab .astro-tab-lock {
    font-size: .8rem;
    opacity: .75;
}

/* ------------------------------------------------------------- reading ---- */

.astro-block + .astro-block {
    margin-top: 2rem;
}

.astro-block-title {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--astro-ink);
    margin-bottom: .25rem;
}

.astro-block-title::before {
    content: '';
    width: .4rem;
    height: 1.15rem;
    border-radius: 999px;
    background: var(--segment-accent, var(--astro-600));
}

.astro-block-note {
    color: var(--astro-ink-soft);
    font-size: .88rem;
    margin-bottom: .9rem;
}

.astro-item {
    display: flex;
    gap: .9rem;
    padding: .85rem 0;
    border-top: 1px solid var(--astro-border);
    cursor: pointer;
}

.astro-item:hover,
.astro-item.is-linked {
    background: var(--astro-surface-2);
}

.astro-item-value {
    flex: 0 0 auto;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    background: var(--segment-soft, var(--astro-100));
    color: var(--segment-accent, var(--astro-700));
    border: 1px solid var(--segment-accent, var(--astro-300));
}

.astro-item-label {
    font-weight: 600;
    color: var(--astro-ink);
}

.astro-item-arcana {
    font-size: .82rem;
    color: var(--segment-accent, var(--astro-600));
    font-weight: 600;
}

.astro-item-text {
    font-size: .9rem;
    color: var(--astro-ink-soft);
    margin-top: .2rem;
}

.astro-chip {
    display: inline-grid;
    place-items: center;
    min-width: 1.9rem;
    height: 1.9rem;
    padding: 0 .4rem;
    border-radius: 999px;
    background: var(--segment-soft, var(--astro-100));
    color: var(--segment-accent, var(--astro-700));
    border: 1px solid var(--astro-border);
    font-weight: 700;
    font-size: .82rem;
}

/* ---------------------------------------------------------- locked tab ---- */

.astro-locked {
    position: relative;
    border-radius: var(--astro-radius);
    overflow: hidden;
}

.astro-locked-preview {
    filter: blur(6px);
    opacity: .5;
    pointer-events: none;
    user-select: none;
    max-height: 340px;
    overflow: hidden;
}

.astro-locked-cta {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 2rem 1.25rem;
    background: linear-gradient(180deg, transparent, var(--astro-surface) 55%);
}

.astro-locked-cta-inner {
    max-width: 30rem;
}

/* ------------------------------------------------------------- tooltip ---- */

.astro-chart-wrap {
    position: relative;
}

.astro-chart {
    background: var(--astro-chart-plate);
    border-radius: var(--astro-radius);
    padding: .5rem;
    display: block;
    max-width: 880px;
    margin: 0 auto;
}

.astro-chart svg {
    display: block;
    width: 100%;
    height: auto;
    max-width: 880px;
}

/* Every interactive chart element gets this, so hover and keyboard focus behave
   the same way and the hit area is comfortable on touch. */
.astro-node {
    cursor: pointer;
    transition: opacity .12s;
}

.astro-node:focus {
    outline: none;
}

.astro-node:hover .astro-node-ring,
.astro-node:focus-visible .astro-node-ring {
    stroke: var(--astro-600);
    stroke-width: 4;
}

/*
 * The age-ring marks carry no ring of their own to thicken, so they answer with
 * a halo instead — the only feedback a finger gets that the tap landed.
 */
.astro-tick-halo {
    fill: var(--astro-500);
    opacity: 0;
    transition: opacity .12s;
    pointer-events: none;
}

.astro-node:hover .astro-tick-halo,
.astro-node:focus-visible .astro-tick-halo,
.astro-node:active .astro-tick-halo,
.astro-node.is-highlighted .astro-tick-halo {
    opacity: .18;
}

.astro-node.is-dimmed {
    opacity: .28;
}

.astro-node.is-highlighted .astro-node-ring {
    stroke: var(--astro-gold-500);
    stroke-width: 4.5;
}

.astro-tooltip {
    position: fixed;
    z-index: 1080;
    max-width: 19rem;
    background: var(--astro-surface);
    color: var(--astro-ink);
    border: 1px solid var(--astro-border-strong);
    border-left: 4px solid var(--tip-accent, var(--astro-600));
    border-radius: var(--astro-radius-sm);
    box-shadow: var(--astro-shadow-lg);
    padding: .8rem .95rem;
    font-size: .86rem;
    line-height: 1.45;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .12s, transform .12s;
}

.astro-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.astro-tooltip-head {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    font-weight: 700;
    margin-bottom: .2rem;
}

.astro-tooltip-value {
    background: var(--tip-accent, var(--astro-600));
    color: #fff;
    border-radius: 999px;
    padding: 0 .5rem;
    font-size: .78rem;
}

.astro-tooltip-arcana {
    color: var(--tip-accent, var(--astro-600));
    font-weight: 600;
    font-size: .8rem;
}

.astro-tooltip-text {
    color: var(--astro-ink-soft);
    margin-top: .3rem;
}

.astro-tooltip-links {
    margin-top: .45rem;
    padding-top: .45rem;
    border-top: 1px solid var(--astro-border);
    font-size: .78rem;
    color: var(--astro-ink-faint);
}

.astro-tooltip-cta {
    display: block;
    margin-top: .3rem;
    font-weight: 700;
    color: var(--tip-accent, var(--astro-600));
}

/* --------------------------------------------------------------- misc ----- */

.astro-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .9rem;
    justify-content: center;
    font-size: .82rem;
    color: var(--astro-ink-soft);
}

.astro-legend-swatch {
    display: inline-block;
    width: .7rem;
    height: .7rem;
    border-radius: 2px;
    margin-right: .3rem;
    vertical-align: baseline;
}

.astro-share-box {
    background: var(--astro-surface-2);
    border: 1px dashed var(--astro-border-strong);
    border-radius: var(--astro-radius-sm);
    padding: .75rem .9rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .82rem;
    word-break: break-all;
    color: var(--astro-ink-soft);
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--astro-ink);
    --bs-table-border-color: var(--astro-border);
}

/* --------------------------------------------------------- admin skin ---- */

/*
 * The marketing read-out at /reports. It is a different job from the customer
 * facing pages and should not be mistaken for them, so it keeps its own dark,
 * neutral skin whatever the visitor's theme says: graphite surfaces, a steel
 * ramp in place of the brand purple, and one cold accent carrying the numbers.
 *
 * Everything downstream reads the same tokens, so redefining them on the body
 * re-skins the nav, the cards, the tables and the buttons at once.
 */
body.astro-admin {
    color-scheme: dark;

    --astro-50: #eef1f6;
    --astro-100: #dbe1ea;
    --astro-200: #b9c3d2;
    --astro-300: #8f9db2;
    --astro-400: #6b7a91;
    --astro-500: #4c5a70;
    --astro-600: #3c4859;
    --astro-700: #2c3543;
    --astro-800: #1f2630;
    --astro-900: #161b23;
    --astro-950: #0e1218;

    /* The one colour in the room. Numbers, active states and links use it, so
       the eye goes to the data rather than to the chrome. */
    --astro-accent: #3fb8a4;
    --astro-accent-soft: #14312d;

    --astro-bg: #0e1218;
    --astro-bg-alt: #121821;
    --astro-surface: #171d26;
    --astro-surface-2: #1d242f;
    --astro-border: #2a323e;
    --astro-border-strong: #3a4553;

    --astro-ink: #e7ecf3;
    --astro-ink-soft: #9fabbc;
    --astro-ink-faint: #74839a;
    --astro-on-brand: #ffffff;

    --astro-shadow: 0 8px 24px rgba(0, 0, 0, .45);
    --astro-shadow-lg: 0 16px 44px rgba(0, 0, 0, .6);
    --astro-focus: 0 0 0 3px rgba(63, 184, 164, .35);

    background: var(--astro-bg);
    color: var(--astro-ink);
}

/* A flat bar, not the gradient the public site wears — the two are meant to be
   told apart at a glance. */
body.astro-admin .astro-nav {
    background: var(--astro-900);
    border-bottom: 1px solid var(--astro-border);
}

body.astro-admin a {
    color: var(--astro-accent);
}

body.astro-admin .astro-eyebrow {
    color: var(--astro-ink-faint);
}

/* The metric tiles are the point of the screen, so the accent lands on them. */
body.astro-admin .astro-panel {
    background: linear-gradient(180deg, var(--astro-surface-2), var(--astro-surface));
    border-color: var(--astro-border);
}

body.astro-admin .astro-panel .h4 {
    color: var(--astro-accent);
    font-variant-numeric: tabular-nums;
}

body.astro-admin .btn-astro {
    background: var(--astro-accent);
    border-color: var(--astro-accent);
    color: #06211c;
}

body.astro-admin .btn-astro:hover,
body.astro-admin .btn-astro:focus {
    background: #55cdb8;
    border-color: #55cdb8;
    color: #06211c;
}

body.astro-admin .btn-astro-outline:hover {
    border-color: var(--astro-accent);
    color: var(--astro-accent);
}

body.astro-admin .table {
    --bs-table-color: var(--astro-ink);
    --bs-table-border-color: var(--astro-border);
    --bs-table-striped-color: var(--astro-ink);
    --bs-table-hover-color: var(--astro-ink);
    --bs-table-hover-bg: var(--astro-surface-2);
}

body.astro-admin .table thead th {
    border-bottom-color: var(--astro-border-strong);
}

body.astro-admin .page-link {
    background: var(--astro-surface);
    border-color: var(--astro-border);
    color: var(--astro-ink-soft);
}

body.astro-admin .page-item.active .page-link {
    background: var(--astro-accent);
    border-color: var(--astro-accent);
    color: #06211c;
}

/* ----------------------------------------------------------- chart zoom ---- */

/* The overview fits the screen everywhere; the button only earns its place
   where the marks are too small to hit, which is a phone. */
.astro-chart-zoom {
    display: none;
    margin-bottom: .6rem;
}

@media (max-width: 767.98px) {
    .astro-chart-zoom {
        display: inline-block;
    }

    .astro-chart.is-zoomed {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        /* A hairline of the plate stays visible past the edge, so it reads as
           something to scroll rather than something cut off. */
        scroll-padding: .5rem;
    }

    .astro-chart.is-zoomed svg {
        width: 620px;
        max-width: none;
    }
}

/* -------------------------------------------------------------- chakras ---- */

/*
 * The seven chakras, in the part of the card the chart does not use. It is a
 * reference read alongside the octagram, so it stays dense — but each row is
 * given the colour that chakra is traditionally drawn in, which is what makes
 * it scannable rather than a wall of figures.
 */
.astro-chakras {
    background: var(--astro-surface-2);
    border: 1px solid var(--astro-border);
    border-radius: var(--astro-radius);
    padding: 1.1rem 1.15rem 1rem;
    text-align: left;
    height: 100%;
}

.astro-chakras-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: .85rem;
}

.astro-chakras-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--astro-ink);
    margin: .1rem 0 0;
}

.astro-chakras-hint {
    font-size: .7rem;
    color: var(--astro-ink-faint);
    white-space: nowrap;
}

.astro-chakra-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .84rem;
}

.astro-chakra-table thead th {
    color: var(--astro-ink-faint);
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-align: center;
    padding: 0 .3rem .45rem;
    border-bottom: 1px solid var(--astro-border-strong);
}

.astro-chakra-table thead th:first-child {
    text-align: left;
}

.astro-chakra-table thead abbr {
    text-decoration: none;
    border-bottom: 1px dotted var(--astro-border-strong);
    cursor: help;
}

.astro-chakra-table tbody tr {
    border-bottom: 1px solid var(--astro-border);
    transition: background-color .12s;
}

.astro-chakra-table tbody tr:hover {
    background: color-mix(in srgb, var(--chakra, var(--astro-500)) 8%, transparent);
}

.astro-chakra-table th[scope='row'] {
    font-weight: 400;
    padding: .5rem .5rem .5rem .75rem;
    position: relative;
}

/* The bar down the left edge is the chakra's own colour, crown at the top. */
.astro-chakra-table tbody th[scope='row']::before {
    content: '';
    position: absolute;
    left: 0;
    top: .55rem;
    bottom: .55rem;
    width: 3px;
    border-radius: 3px;
    background: var(--chakra, var(--astro-500));
}

.astro-chakra-table tbody tr:nth-child(1) { --chakra: #8b5cf6; }
.astro-chakra-table tbody tr:nth-child(2) { --chakra: #4f6bed; }
.astro-chakra-table tbody tr:nth-child(3) { --chakra: #2aa5c9; }
.astro-chakra-table tbody tr:nth-child(4) { --chakra: #2fa36b; }
.astro-chakra-table tbody tr:nth-child(5) { --chakra: #d9a226; }
.astro-chakra-table tbody tr:nth-child(6) { --chakra: #e2823c; }
.astro-chakra-table tbody tr:nth-child(7) { --chakra: #d1495b; }

.astro-chakra-name {
    display: block;
    font-weight: 600;
    color: var(--astro-ink);
    line-height: 1.25;
}

.astro-chakra-note {
    display: block;
    color: var(--astro-ink-faint);
    font-size: .7rem;
    line-height: 1.3;
    margin-top: .1rem;
}

.astro-chakra-table td {
    text-align: center;
    padding: .5rem .3rem;
    font-weight: 600;
    color: var(--astro-ink);
    font-variant-numeric: tabular-nums;
    vertical-align: middle;
    width: 2.9rem;
}

.astro-chakra-table tfoot th,
.astro-chakra-table tfoot td {
    border-top: 2px solid var(--astro-border-strong);
    padding-top: .6rem;
    font-weight: 700;
}

.astro-chakra-table tfoot th[scope='row'] {
    padding-left: .75rem;
}

@media (max-width: 991.98px) {
    .astro-chakras {
        height: auto;
    }
}

/* --------------------------------------------------------------- print ---- */

@media print {
    .astro-no-print,
    .astro-nav,
    .astro-tabs,
    .astro-locked-cta {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    .card,
    .astro-panel {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }

    .astro-block {
        break-inside: avoid;
    }

    .astro-print-page {
        break-after: page;
    }
}

@media (max-width: 575.98px) {
    .astro-tab {
        padding: .45rem .8rem;
        font-size: .85rem;
    }

    .astro-tooltip {
        max-width: calc(100vw - 2rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .astro-tooltip,
    .astro-node,
    .astro-tab,
    .astro-nav .navbar-brand,
    .astro-nav .nav-link {
        transition: none;
    }
}

/* Generation lines in the legend read as "4 + 14 = 18", matching the reference chart. */
.astro-legend-line {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.astro-legend-sum {
    color: var(--astro-ink);
    font-variant-numeric: tabular-nums;
}

.astro-legend-total {
    color: var(--astro-600);
}

:root[data-theme='dark'] .astro-legend-total {
    color: var(--astro-300);
}

/* ------------------------------------------------------- calc overlay ---- */

/*
 * Shown while a chart is being built. The work itself is fast; the overlay is
 * there so the wait reads as "something is being calculated for me" rather than
 * as a frozen button. Injected by matrix.js, so the print sheet never sees it.
 */
.astro-overlay {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: color-mix(in srgb, var(--astro-bg) 82%, transparent);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity .28s ease;
}

.astro-overlay.is-open {
    opacity: 1;
}

.astro-overlay-card {
    width: min(26rem, 100%);
    text-align: center;
    background: var(--astro-surface);
    border: 1px solid var(--astro-border);
    border-radius: var(--astro-radius);
    box-shadow: var(--astro-shadow-lg);
    padding: 2.25rem 1.75rem 1.9rem;
    transform: translateY(14px) scale(.97);
    transition: transform .32s cubic-bezier(.22, 1, .36, 1);
}

.astro-overlay.is-open .astro-overlay-card {
    transform: none;
}

.astro-ring {
    position: relative;
    width: 108px;
    height: 108px;
    margin: 0 auto 1.4rem;
}

.astro-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.astro-ring-track {
    fill: none;
    stroke: var(--astro-border);
    stroke-width: 6;
}

.astro-ring-bar {
    fill: none;
    stroke: url(#astro-ring-gradient);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 302;
    stroke-dashoffset: 302;
    /* Eases in and out over about a second, then rests until the next step:
       the arc should look like it is working its way round, not sliding. */
    transition: stroke-dashoffset 1.1s cubic-bezier(.65, 0, .35, 1);
}

/* The glyph in the middle keeps turning the whole time, so the card never looks
   stalled between two progress steps. */
.astro-ring-glyph {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.astro-ring-glyph svg {
    width: 44px;
    height: 44px;
    overflow: visible;
}

/* The eight-pointed star is the chart's own geometry, not a stock sparkle. The
   two bodies turn against each other; a single point orbits outside them. */
.astro-ring-star path {
    fill: var(--astro-600);
    transform-origin: 20px 20px;
    animation: astro-spin 9s linear infinite;
}

.astro-ring-star .astro-ring-star-thin {
    fill: var(--astro-gold-500);
    animation: astro-spin 6s linear infinite reverse;
}

.astro-ring-orbit {
    fill: var(--astro-gold-500);
    transform-origin: 20px 20px;
    animation: astro-spin 2.6s linear infinite;
}

.astro-ring-percent {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: .55rem;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--astro-ink-faint);
    font-variant-numeric: tabular-nums;
}

@keyframes astro-spin {
    to { transform: rotate(360deg); }
}

.astro-overlay-step {
    min-height: 1.6rem;
    font-weight: 600;
    color: var(--astro-ink);
    animation: astro-step-in .4s ease both;
}

@keyframes astro-step-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

.astro-overlay-note {
    margin: .5rem 0 0;
    font-size: .8rem;
    color: var(--astro-ink-faint);
}

.astro-overlay-dots {
    display: flex;
    justify-content: center;
    gap: .35rem;
    margin-top: 1.1rem;
}

.astro-overlay-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--astro-border-strong);
    transition: background .3s ease, transform .3s ease;
}

.astro-overlay-dots span.is-done {
    background: var(--astro-500);
}

.astro-overlay-dots span.is-current {
    background: var(--astro-600);
    transform: scale(1.5);
}

/* ---------------------------------------------------------- success ✓ ---- */

.astro-tick {
    display: inline-flex;
    vertical-align: -.15em;
    margin-right: .35rem;
}

.astro-tick svg {
    width: 1em;
    height: 1em;
    overflow: visible;
}

.astro-tick circle {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    opacity: .35;
    transform-origin: center;
    animation: astro-tick-pop .45s cubic-bezier(.22, 1, .36, 1) both;
}

.astro-tick path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 22;
    stroke-dashoffset: 22;
    animation: astro-tick-draw .4s .12s cubic-bezier(.65, 0, .35, 1) forwards;
}

@keyframes astro-tick-pop {
    from { transform: scale(.2); opacity: 0; }
    to { transform: scale(1); opacity: .35; }
}

@keyframes astro-tick-draw {
    to { stroke-dashoffset: 0; }
}

.btn.is-astro-success {
    color: var(--astro-success);
    border-color: var(--astro-success);
    background: color-mix(in srgb, var(--astro-success) 12%, transparent);
    animation: astro-success-nudge .4s ease;
}

@keyframes astro-success-nudge {
    40% { transform: translateY(-2px); }
    to { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .astro-overlay,
    .astro-overlay-card,
    .astro-ring-bar,
    .astro-overlay-step,
    .astro-ring-star path,
    .astro-ring-orbit,
    .astro-tick circle,
    .astro-tick path,
    .btn.is-astro-success {
        animation: none;
        transition: none;
    }

    .astro-tick path {
        stroke-dashoffset: 0;
    }
}

/* Inside a chart the brand names the person, so it has to survive a long name on
   a narrow screen: let it shrink and clip rather than push the controls off. */
.astro-nav .navbar-brand {
    display: inline-flex;
    align-items: baseline;
    gap: .4rem;
    min-width: 0;
}

.astro-nav .navbar-brand .astro-brand-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Bootstrap's navbar wraps by default, so a long name pushed the controls onto
   a second row instead of clipping. Keep one row and make the brand the part
   that gives way. */
.astro-nav > .container {
    flex-wrap: nowrap;
    gap: .75rem;
}

.astro-nav .navbar-brand {
    flex: 0 1 auto;
}

.astro-nav > .container > .d-flex {
    flex: 0 0 auto;
}
