:root {
    --site-bg: #f5faf8;
    --site-surface: #fff;
    --site-ink: #162e31;
    --site-muted: #506568;
    --site-accent: #147567;
    --site-accent-dark: #0b554c;
    --site-tint: #e7f5ee;
    --site-border: #d7e7e2;
    --site-shadow: 0 10px 28px rgba(23, 65, 57, .075);
    --site-gradient: linear-gradient(125deg, #e2f5ed, #f2faf5 62%, #fff4e1);
    --bs-body-color: var(--site-ink);
    --bs-secondary-color: var(--site-muted);
    --bs-link-color-rgb: 20, 117, 103;
    --bs-link-hover-color-rgb: 11, 85, 76;
    --bs-secondary-rgb: 80, 101, 104;
    --bs-primary-rgb: 20, 117, 103;
}

body {
    background: var(--site-bg);
    color: var(--site-ink);
}

.site-nav {
    --bs-navbar-color: var(--site-muted);
    --bs-navbar-hover-color: var(--site-accent-dark);
    --bs-navbar-active-color: var(--site-accent-dark);
    --bs-navbar-brand-color: var(--site-ink);
    --bs-navbar-brand-hover-color: var(--site-accent-dark);
    background: var(--site-surface);
    border-bottom: 1px solid var(--site-border);
    padding-block: .75rem;
}

.site-nav .navbar-brand { display: inline-flex; align-items: center; font-size: 1.4rem; font-weight: 750; }
.site-nav .navbar-brand i { color: var(--site-accent); font-size: 2rem; line-height: 1; }
@media (max-width: 575.98px) {
    .site-nav .navbar-brand { font-size: 1.5rem; }
    .site-nav .navbar-brand i { font-size: 2.5rem; }
}
@media (max-width: 359.98px) {
    .site-nav .navbar-brand { font-size: 1.3rem; margin-inline-end: 0; }
}
.site-nav .nav-link.active { font-weight: 650; }

.site-footer {
    background: var(--site-tint);
    color: var(--site-muted);
    border-top: 1px solid var(--site-border);
}

.btn-primary {
    --bs-btn-bg: var(--site-accent);
    --bs-btn-border-color: var(--site-accent);
    --bs-btn-hover-bg: var(--site-accent-dark);
    --bs-btn-hover-border-color: var(--site-accent-dark);
    --bs-btn-active-bg: var(--site-accent-dark);
    --bs-btn-active-border-color: var(--site-accent-dark);
    --bs-btn-disabled-bg: var(--site-accent);
    --bs-btn-disabled-border-color: var(--site-accent);
    --bs-btn-focus-shadow-rgb: 20, 117, 103;
}

.btn-outline-secondary {
    --bs-btn-color: var(--site-accent-dark);
    --bs-btn-border-color: #91b5a9;
    --bs-btn-hover-color: var(--site-accent-dark);
    --bs-btn-hover-bg: var(--site-tint);
    --bs-btn-hover-border-color: var(--site-accent);
    --bs-btn-active-color: var(--site-accent-dark);
    --bs-btn-active-bg: var(--site-tint);
    --bs-btn-active-border-color: var(--site-accent);
    --bs-btn-focus-shadow-rgb: 20, 117, 103;
}

.hexagram-figure {
    --line-gap: .25rem;
    --line-width: 2.75rem;
    --line-height: .27rem;
    display: inline-grid;
    gap: var(--line-gap);
    width: var(--line-width);
    flex: none;
    vertical-align: middle;
    color: var(--site-accent-dark);
}

.hexagram-figure--large {
    --line-width: 6rem;
    --line-height: .51rem;
    --line-gap: .42rem;
}

.hexagram-figure--small {
    --line-width: 1.35rem;
    --line-height: .145rem;
    --line-gap: .145rem;
}

.hexagram-line {
    display: flex;
    align-items: stretch;
    gap: 18%;
    height: var(--line-height);
    position: relative;
}

.hexagram-line::before, .hexagram-line.is-yin::after {
    content: '';
    flex: 1;
    background: currentColor;
    border-radius: 2px;
}

.hexagram-line:nth-last-child(3):not(:first-child) { margin-top: var(--line-gap); }

.hexagram-line.is-moving {
    color: #a04426;
}

.hexagram-line.is-moving span {
    position: absolute;
    inset-inline-start: calc(100% + .4rem);
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    line-height: 1;
}

/* Small local decorative icons; adjacent text supplies accessible names. */
.bi { display: inline-block; width: 1em; height: 1em; line-height: 1; vertical-align: -.125em; font-style: normal; }
.bi::before { display: block; width: 100%; height: 100%; content: ""; background-color: currentColor; mask: var(--icon) center / contain no-repeat; }
.bi-book { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 4q5-2 10 1 5-3 10-1v15q-5-2-10 1-5-3-10-1z M12 5v15'/%3E%3C/svg%3E"); }
.bi-search { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 17l5 5 M19 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0z'/%3E%3C/svg%3E"); }
.bi-compass { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12a10 10 0 1 1-20 0 10 10 0 1 1 20 0z M16 8l-3 6-5 2 3-6z'/%3E%3C/svg%3E"); }
.bi-diagram-3 { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 2h6v5H9z M12 7v5 M4 16v-4h16v4 M2 16h5v5H2z M17 16h5v5h-5z'/%3E%3C/svg%3E"); }
.bi-toggles2 { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 6h6m6 0h8 M2 17h12m6 0h2 M14 6a3 3 0 1 1-6 0 3 3 0 1 1 6 0z M20 17a3 3 0 1 1-6 0 3 3 0 1 1 6 0z'/%3E%3C/svg%3E"); }
.bi-stars { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3l2 6 6 2-6 2-2 6-2-6-5-2 5-2z M19 1l1 3 3 1-3 1-1 3-1-3-3-1 3-1z'/%3E%3C/svg%3E"); }
.bi-hourglass-split { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 2h14M5 22h14M6 3c0 5 3 6 6 9-3 3-6 4-6 9m12-18c0 5-3 6-6 9 3 3 6 4 6 9'/%3E%3C/svg%3E"); }
.bi-pin-angle { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 3l9 8-4-1-3 4-6-5 4-3z M9 12l-7 9'/%3E%3C/svg%3E"); }
.bi-coin { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12a10 10 0 1 1-20 0 10 10 0 1 1 20 0z M9 9h6v6H9z'/%3E%3C/svg%3E"); }
.bi-dice-3 { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3h18v18H3z M7 7h.5 M12 12h.5 M17 17h.5'/%3E%3C/svg%3E"); }
.bi-shield-check { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2l9 4v6q0 6-9 10-9-4-9-10V6z M8 12l3 3 5-6'/%3E%3C/svg%3E"); }
.bi-journal-text { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 2h16v20H4z M8 7h8 M8 11h8 M8 15h5'/%3E%3C/svg%3E"); }
.bi-arrow-up-right-circle { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12a10 10 0 1 1-20 0 10 10 0 1 1 20 0z M8 16l8-8 M9 8h7v7'/%3E%3C/svg%3E"); }
.bi-link-45deg { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 16l-2 2a4 4 0 0 1-6-6l5-5a4 4 0 0 1 6 0 M14 8l2-2a4 4 0 0 1 6 6l-5 5a4 4 0 0 1-6 0 M8 16l8-8'/%3E%3C/svg%3E"); }
.bi-body-text { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h18 M3 9h13 M3 14h18 M3 19h10'/%3E%3C/svg%3E"); }
.bi-image { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h20v18H2z M3 18l6-6 3 3 4-6 5 8 M8 8h.5'/%3E%3C/svg%3E"); }
.bi-magic { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21l13-13 3 3L6 24z M11 13l3 3 M17 1v4 M20 6h3 M8 2l1 3'/%3E%3C/svg%3E"); }
.bi-share { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 12l9-6 M8 12l9 6 M8 12a3 3 0 1 1-6 0 3 3 0 1 1 6 0z M22 5a3 3 0 1 1-6 0 3 3 0 1 1 6 0z M22 19a3 3 0 1 1-6 0 3 3 0 1 1 6 0z'/%3E%3C/svg%3E"); }
.bi-chevron-right { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3l9 9-9 9'/%3E%3C/svg%3E"); }
.bi-layers { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 7l10-5 10 5-10 5z M2 12l10 5 10-5 M2 17l10 5 10-5'/%3E%3C/svg%3E"); }
.bi-chat-quote { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3h18v14H9l-6 5z M8 7l-1 4h2 M14 7l-1 4h2'/%3E%3C/svg%3E"); }
.bi-briefcase { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 7h20v14H2z M8 7V3h8v4 M2 11q10 8 20 0'/%3E%3C/svg%3E"); }
.bi-lightbulb { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18c0-3-4-4-4-9a7 7 0 1 1 14 0c0 5-4 6-4 9z M9 21h6'/%3E%3C/svg%3E"); }
.bi-heart { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21L4 13C-2 6 6-2 12 6c6-8 14 0 8 7z'/%3E%3C/svg%3E"); }
.bi-signpost-split { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 1v22 M2 4h16l4 3-4 3H2z M22 13H6l-4 3 4 3h16z'/%3E%3C/svg%3E"); }
.bi-check-circle { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12a10 10 0 1 1-20 0 10 10 0 1 1 20 0z M6 12l4 4 8-9'/%3E%3C/svg%3E"); }
.bi-x-circle { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12a10 10 0 1 1-20 0 10 10 0 1 1 20 0z M8 8l8 8m0-8l-8 8'/%3E%3C/svg%3E"); }
.bi-yin-yang::before, .bi-star-fill::before, .bi-1-circle::before, .bi-2-circle::before, .bi-3-circle::before { background: none; mask: none; font-family: system-ui, sans-serif; }
.bi-yin-yang::before { content: "☯︎"; }
.bi-star-fill::before { content: "★"; }
.bi-1-circle::before { content: "①"; }
.bi-2-circle::before { content: "②"; }
.bi-3-circle::before { content: "③"; }

.site-nav .navbar-toggler { min-width: 44px; min-height: 44px; }
.interpretation-poem {
    padding-inline: 1.25rem;
    border-inline-start: 3px solid #91aaa7;
    background: #f5f8f7;
    font-size: .875em;
}
.interpretation-poem p { font-size: inherit; }
:focus-visible { outline: 3px solid var(--site-accent-dark); outline-offset: 2px; }
