/* Design tokens — exact values from the Stitch reference (Tailwind config),
   not approximations. Keep this block in sync if the reference changes. */
:root {
    --cd-surface: #fdf9f1;
    --cd-surface-dim: #dddad2;
    --cd-surface-container-lowest: #ffffff;
    --cd-surface-container-low: #f7f3eb;
    --cd-surface-container: #f1ede5;
    --cd-surface-container-high: #ece8e0;
    --cd-surface-container-highest: #e6e2da;
    --cd-surface-cream-alt: #f5f1e9;
    --cd-canvas-cream: #fbf9f5;
    --cd-gold-luminous: #fcf4d2;

    --cd-ink: #101b33;
    --cd-muted: #534436;
    --cd-outline: #867464;
    --cd-outline-variant: #d9c3b0;

    --cd-primary: #d48218;
    --cd-primary-dark: #a35f10;
    --cd-primary-soft: rgba(212, 130, 24, .12);
    --cd-primary-muted: #8a5100;
    --cd-secondary: #1a284a;
    --cd-secondary-dark: #101b33;
    --cd-tertiary: #bd5226;
    --cd-border: rgba(27, 42, 74, .08);
    --cd-border-gold: var(--cd-outline-variant);

    --cd-radius: .25rem;
    --cd-radius-lg: .5rem;
    --cd-radius-xl: .75rem;
    --cd-radius-full: 9999px;

    --cd-gutter: 1.5rem;
    --cd-gutter-mobile: 1rem;
    --cd-margin: 3rem;
    --cd-margin-mobile: 1.25rem;
    --cd-space-xs: .25rem;
    --cd-space-sm: .5rem;
    --cd-space-md: 1rem;
    --cd-space-lg: 1.75rem;
    --cd-space-xl: 3rem;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 24px;
    background: var(--cd-surface);
    color: var(--cd-ink);
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'EB Garamond', 'Plus Jakarta Sans', serif;
    font-weight: 500;
    color: var(--cd-ink);
}

/* Material Symbols Outlined icon font */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
    font-size: 1.1em;
    line-height: 1;
    vertical-align: -.15em;
    user-select: none;
}

/* Top utility bar + nav — light, blurred, floating over content.
   (Navy is reserved for the special quote/prophecy banners below, not
   the persistent site chrome.) */
.cd-topbar {
    background: rgba(253, 249, 241, .92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: .6rem 0;
}

.cd-topbar-brand,
.cd-login-brand {
    display: inline-flex;
    align-items: center; /* emblem and the one-line title share a centre line */
    gap: .6rem;
    text-decoration: none;
}

/* Brand: YSS emblem + "oprondo" script, as on the legacy center.ysskendra.org portal. */
@font-face {
    font-family: 'oprondo';
    src: url('../fonts/oprdb.ttf') format('truetype');
    font-display: swap;
}

.cd-emblem {
    flex-shrink: 0;
    width: 36px;
    height: auto;
}

.cd-logo-text {
    font-family: 'oprondo', 'EB Garamond', serif;
    font-weight: 400;
    font-size: 22px;
    line-height: 1.1;
    color: #564f92;
    text-align: left;
    white-space: nowrap;
    margin: 0;
    padding-top: 2px;
}

@media (max-width: 575.98px) {
    .cd-topbar-brand .cd-logo-text { font-size: 15px; }
    .cd-topbar-brand .cd-emblem { width: 30px; }
}

.cd-login-wrap {
    text-align: center;
    margin-bottom: 1.25rem;
    /* The title is sized from the login card's width (cqi), not the window's. */
    container-type: inline-size;
}

.cd-login-brand .cd-emblem {
    width: 40px;
}

/* Same box as Bootstrap's .form-control (24px line + .375rem padding + same border),
   so the button matches the inputs' height at any zoom level. */
.cd-login-btn {
    font-size: 14px;
    line-height: 1.5rem;
    padding-top: .375rem;
    padding-bottom: .375rem;
}

/* One-line title that always fits the card: the oprondo text is ~15.7px wide per 1px of
   font size, and shares the row with the 40px emblem and the .6rem gap (~50px). */
.cd-login-brand .cd-logo-text {
    font-size: clamp(12px, calc((100cqi - 52px) / 16), 22px);
}

.navbar.cd-navbar {
    background: rgba(253, 249, 241, .92) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 8px rgba(27, 42, 74, .06);
}

.cd-navbar .navbar-brand {
    font-weight: 600;
    color: var(--cd-ink) !important;
}

/* The navbar never carries a navbar-light/navbar-dark variant, so without
   this the default toggler icon can end up low-contrast against the light
   header background below the lg breakpoint — spell it out explicitly. */
.cd-navbar .navbar-toggler {
    border-color: var(--cd-border-gold);
    padding: .35rem .55rem;
}

.cd-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 .2rem var(--cd-primary-soft);
}

.cd-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(16, 27, 51, 0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.cd-navbar .nav-link {
    color: var(--cd-ink) !important;
    font-size: 14.5px;
    line-height: 20px;
    letter-spacing: .01em;
    font-weight: 600;
    padding: .6rem .8rem !important;
    border-radius: var(--cd-radius-lg);
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}

/* The navbar uses Bootstrap's navbar-expand-lg: an inline row with dropdowns at
   >=992px, collapsing behind the hamburger toggler below that, where submenus
   are laid out as a plain static-position accordion (see the media query). */
/* Wraps rather than scrolls: an overflow-x:auto row clips the absolutely
   positioned dropdowns (Bootstrap skips Popper inside a navbar), which made
   every submenu invisible. */
.cd-navbar .cd-nav-scroll {
    flex-wrap: wrap;
}

.cd-navbar .cd-nav-scroll::-webkit-scrollbar {
    display: none;
}

.cd-navbar .cd-nav-scroll .nav-item {
    flex-shrink: 0;
}

/* Desktop dropdowns: wide enough for long article titles, and scrollable
   when a section (e.g. Guidelines, 20 items) is taller than the viewport. */
@media (min-width: 992px) {
    .cd-navbar .dropdown-menu {
        min-width: 300px;
        max-width: 380px;
        max-height: calc(100vh - 130px);
        overflow-y: auto;
    }
}

@media (max-width: 991.98px) {
    .cd-navbar .navbar-collapse {
        max-height: calc(100vh - 64px);
        overflow-y: auto;
    }

    .cd-navbar .nav-link {
        white-space: normal;
    }

    .cd-navbar .dropdown-menu {
        position: static;
        float: none;
        width: 100%;
        background: var(--cd-surface-container-low);
        border: none;
        box-shadow: none;
        margin-left: .5rem;
    }

    .cd-navbar .dropdown-menu .dropdown-item {
        color: var(--cd-muted);
    }

    .cd-navbar .dropdown-menu .dropdown-item:hover {
        background: var(--cd-gold-luminous);
        color: var(--cd-ink);
    }
}

.cd-user-chip {
    background: var(--cd-surface-container);
    color: var(--cd-ink) !important;
    border-radius: var(--cd-radius-full);
    padding: .3rem .8rem;
    font-size: 12px;
    font-weight: 600;
}

.cd-navbar .nav-link:hover,
.cd-navbar .nav-link:focus {
    background: var(--cd-gold-luminous);
    color: var(--cd-primary-dark) !important;
}

.cd-navbar .dropdown-menu {
    border: none;
    box-shadow: 0 10px 25px rgba(16, 27, 51, .14);
    border-radius: var(--cd-radius-lg);
    padding: .4rem;
}

.cd-navbar .dropdown-item {
    color: var(--cd-ink);
    font-size: 14px;
    line-height: 19px;
    letter-spacing: .01em;
    font-weight: 600;
    border-radius: var(--cd-radius);
    padding: .5rem .75rem;
    white-space: normal;
}

.cd-navbar .dropdown-item:hover {
    background: var(--cd-primary-soft);
    color: var(--cd-primary-dark);
}

/* Page shell */
.cd-page {
    min-height: calc(100vh - 140px);
}

/* Hero / banner */
.cd-hero {
    border-radius: var(--cd-radius-xl);
    overflow: hidden;
    border: 1px solid var(--cd-border-gold);
    box-shadow: 0 10px 30px -4px rgba(16, 27, 51, .12);
}

.cd-hero .carousel-item img {
    height: 360px;
    object-fit: cover;
}

/* Home feature row: banner slider sits at the top of the About card (left column). */
.cd-about-card .cd-hero {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.cd-about-card .cd-hero .carousel-item img {
    height: 380px;
    object-position: center 30%;
}

@media (max-width: 575.98px) {
    .cd-about-card .cd-hero .carousel-item img { height: 230px; }
}

.cd-hero-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2rem 1.5rem 1rem;
    background: linear-gradient(0deg, rgba(16, 27, 51, .85) 0%, rgba(16, 27, 51, 0) 100%);
    color: #fff;
    font-weight: 600;
}

/* Navy banner treatment — matches the reference's "Sacred Prophecy Banner" /
   quote-band components. Used only for these special moments, not for the
   persistent header/nav (see .cd-topbar / .cd-navbar above). */
.cd-welcome {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #a8461f 0%, #bb4f27 50%, #a8461f 100%); /* YSS terracotta */
    color: var(--cd-surface);
    border-radius: var(--cd-radius-xl);
    padding: 1.75rem 2.5rem 1.5rem;
    margin-bottom: 1.75rem;
}

/* Large soft lotus on the right of the welcome card. */
.cd-welcome::after {
    content: 'spa';
    font-family: 'Material Symbols Outlined';
    position: absolute;
    right: 3%;
    top: 50%;
    transform: translateY(-50%);
    font-size: 260px;
    line-height: 1;
    color: #ffd14e;
    opacity: .08;
    pointer-events: none;
}

.cd-welcome > * {
    position: relative;
    z-index: 1;
}

.cd-welcome-eyebrow {
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: 10px;
    line-height: 14px;
    font-weight: 700;
    color: #ffe4c6;
    margin-bottom: .6rem;
}

.cd-welcome h1 {
    color: #fff;
    margin-bottom: .5rem;
    font-family: 'EB Garamond', serif;
    font-size: 34px;
    line-height: 42px;
    letter-spacing: -0.01em;
    font-weight: 600;
}

.cd-welcome p {
    color: var(--cd-gold-luminous);
    margin-bottom: 0;
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: 20px;
    line-height: 32px;
}

/* Deep link targets on other pages (e.g. documents #forms) land below the sticky menu. */
.cd-section-title[id] {
    scroll-margin-top: 90px;
}

.cd-welcome-quick {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem 1rem;
    margin-top: 1.4rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(255, 255, 255, .22);
}

.cd-welcome-quick-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #ffe4c6;
}

.cd-welcome-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.cd-welcome-quick-links a {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .38rem .85rem .38rem .6rem;
    border-radius: var(--cd-radius-full);
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .3);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.cd-welcome-quick-links a .material-symbols-outlined {
    font-size: 18px;
    color: #ffd14e;
}

.cd-welcome-quick-links a:hover {
    background: rgba(255, 228, 198, .22);
    border-color: rgba(255, 228, 198, .7);
    transform: translateY(-1px);
}

@media (max-width: 575.98px) {
    .cd-welcome { padding: 1.5rem 1.25rem 1.25rem; }
    .cd-welcome::after { font-size: 170px; right: -30px; }
}

@media (max-width: 991.98px) {
    .cd-welcome::after { right: 2%; }
}

.cd-about-card .card-body {
    padding: 1.5rem 1.75rem;
    font-size: 15px;
    line-height: 1.65;
}

.cd-about-title {
    font-family: 'EB Garamond', serif;
    font-size: 26px;
    font-weight: 600;
    color: var(--cd-secondary-dark);
    margin: .35rem 0 1rem;
}

.cd-about-subtitle {
    font-family: 'EB Garamond', serif;
    font-size: 19px;
    font-weight: 600;
    color: var(--cd-secondary-dark);
    margin: 1.5rem 0 .75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--cd-border-gold);
}

.cd-about-list {
    padding-left: 1.3rem;
    margin-bottom: 1.25rem;
}

.cd-about-list li {
    margin-bottom: .45rem;
}

.cd-about-list li::marker {
    color: var(--cd-primary);
}

.cd-about-contact {
    padding-top: 1rem;
    border-top: 1px solid var(--cd-border-gold);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .25rem;
}

.cd-about-contact .material-symbols-outlined {
    color: var(--cd-primary);
    font-size: 20px;
}

.cd-eyebrow {
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: 10px;
    line-height: 14px;
    font-weight: 700;
    color: var(--cd-tertiary);
    margin-bottom: .6rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.cd-eyebrow .material-symbols-outlined {
    font-size: .5rem;
    color: var(--cd-primary);
}

/* Section headings */
.cd-section-title {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    margin: 2rem 0 1.1rem;
}

.cd-section-title h3 {
    margin: 0;
    font-size: 24px;
    line-height: 32px;
    font-weight: 500;
}

.cd-section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--cd-surface-container-highest);
    align-self: center;
}

.cd-section-title a {
    color: var(--cd-primary);
    font-weight: 600;
    font-size: 13px;
}

.cd-section-title a:hover {
    color: var(--cd-tertiary);
    text-decoration: underline !important;
}

/* Cards */
.cd-card {
    background: var(--cd-surface-container-lowest);
    border: 1px solid var(--cd-border-gold);
    border-radius: var(--cd-radius-xl);
    box-shadow: 0 2px 8px -2px rgba(16, 27, 51, .05);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    position: relative;
    overflow: hidden;
}

.cd-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--cd-primary);
}

.cd-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 30px -6px rgba(16, 27, 51, .12);
    border-color: rgba(212, 130, 24, .35);
}

.cd-card .card-body {
    padding: 1.25rem;
}

.cd-article-thumb {
    height: 110px;
    background: var(--cd-gold-luminous);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cd-primary);
    font-size: 1.75rem;
}

.cd-card .card-title {
    font-family: 'EB Garamond', serif;
    font-size: 20px;
    line-height: 28px;
    font-weight: 600;
    color: var(--cd-ink);
}

.cd-card .card-text {
    color: var(--cd-muted);
    font-size: 13px;
    line-height: 20px;
}

/* List rows (articles index, documents) */
.cd-list-row {
    background: var(--cd-surface-container-lowest);
    border: 1px solid var(--cd-border-gold);
    border-radius: var(--cd-radius-lg);
    padding: 1rem 1.1rem;
    margin-bottom: .6rem;
    display: flex;
    align-items: center;
    gap: .9rem;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.cd-list-row:hover {
    border-color: var(--cd-primary);
    box-shadow: 0 8px 20px -4px rgba(16, 27, 51, .08);
    color: inherit;
}

.cd-list-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--cd-radius-lg);
    background: var(--cd-primary-soft);
    color: var(--cd-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.cd-list-row .cd-list-title {
    font-weight: 600;
    margin-bottom: .1rem;
}

.cd-list-row .cd-list-sub {
    color: var(--cd-muted);
    font-size: 13px;
}

/* Article detail */
.cd-article-body {
    background: var(--cd-surface-container-lowest);
    border: 1px solid var(--cd-border-gold);
    border-radius: var(--cd-radius-xl);
    padding: 2rem;
    font-size: 15px;
    line-height: 24px;
}

.cd-article-body img {
    max-width: 100%;
    border-radius: var(--cd-radius-lg);
}

.cd-article-body h2, .cd-article-body h3, .cd-article-body h4 {
    margin-top: 1.75rem;
    font-family: 'EB Garamond', serif;
    font-weight: 500;
}

.cd-article-body blockquote {
    background: var(--cd-gold-luminous);
    border-left: 3px solid var(--cd-primary);
    border-radius: 0 var(--cd-radius-xl) var(--cd-radius-xl) 0;
    padding: 1.1rem 1.5rem;
    margin: 1.5rem 0;
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: 20px;
    line-height: 32px;
    color: var(--cd-tertiary);
}

.cd-article-body a {
    color: var(--cd-primary-dark);
}

/* Legacy article HTML (see tidy_article_html()): section titles, spacing, videos. */
.cd-article-body > :first-child {
    margin-top: 0;
}

.cd-article-body p {
    margin-bottom: .75rem;
}

.cd-article-body h2 {
    font-size: 24px;
    line-height: 1.3;
    color: var(--cd-secondary-dark, #1a284a);
    margin: 2.25rem 0 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--cd-border-gold);
}

.cd-article-body h2 u,
.cd-article-body h3 u {
    text-decoration: none;
}

.cd-article-body h2 a,
.cd-article-body h3 a {
    color: inherit;
    text-decoration: none;
}

.cd-article-body ul,
.cd-article-body ol {
    padding-left: 1.4rem;
    margin-bottom: 1rem;
}

.cd-article-body li {
    margin-bottom: .3rem;
}

.cd-article-body .cd-embed {
    max-width: 560px;
    aspect-ratio: 16 / 9;
    margin: .25rem 0 1.5rem;
    border-radius: var(--cd-radius-lg);
    overflow: hidden;
    background: #111;
    box-shadow: 0 2px 10px rgba(27, 42, 74, .12);
}

.cd-article-body .cd-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    margin: .5rem 0 1.75rem;
}

.cd-article-body .cd-video-card {
    margin: 0;
    background: var(--cd-surface, #fdf9f1);
    border: 1px solid var(--cd-border-gold);
    border-radius: var(--cd-radius-lg);
    overflow: hidden;
}

.cd-article-body .cd-video-card .cd-embed {
    max-width: none;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}

.cd-article-body .cd-video-card figcaption {
    padding: .6rem .85rem;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.cd-article-body .cd-subhead {
    font-family: 'EB Garamond', serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--cd-secondary-dark, #1a284a);
    margin: 1.75rem 0 .75rem;
}

.cd-article-body .cd-subhead u {
    text-decoration: none;
}

.cd-article-body .cd-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.cd-article-body table {
    width: 100%;
    max-width: 100%;
    margin-bottom: 1rem;
}

@media (max-width: 575.98px) {
    .cd-article-body {
        padding: 1.25rem;
    }
}

.cd-article-lede {
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: 18px;
    line-height: 28px;
    color: var(--cd-muted);
    margin-bottom: 1.25rem;
}

.cd-sidebar-card {
    background: var(--cd-surface-container-lowest);
    border: 1px solid var(--cd-border-gold);
    border-radius: var(--cd-radius-xl);
    padding: 1.25rem;
}

.cd-sidebar-card h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: .05em;
    font-weight: 700;
    color: var(--cd-muted);
    margin-bottom: .9rem;
}

.cd-sidebar-card a {
    color: var(--cd-ink);
    text-decoration: none;
}

.cd-sidebar-card a:hover {
    color: var(--cd-primary-dark);
}

.cd-toc-card {
    position: sticky;
    top: 7.5rem;
}

.cd-toc-list {
    list-style: none;
    counter-reset: toc;
    margin: 0;
    padding: 0;
}

.cd-toc-list li {
    counter-increment: toc;
    margin-bottom: .1rem;
}

.cd-toc-list li a {
    display: flex;
    gap: .6rem;
    align-items: center;
    padding: .4rem .5rem;
    border-radius: var(--cd-radius);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--cd-muted);
    transition: background .15s ease, color .15s ease;
}

.cd-toc-list li a::before {
    content: counter(toc) ".";
    flex-shrink: 0;
    font-weight: 700;
    color: var(--cd-primary);
}

.cd-toc-list li a:hover {
    background: var(--cd-surface-container);
    color: var(--cd-ink);
}

.cd-toc-list li a.active {
    background: rgba(252, 244, 210, .6);
    color: var(--cd-primary);
    font-weight: 600;
}

/* Buttons */
.btn {
    border-radius: var(--cd-radius) !important;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
}

.btn-primary {
    background: var(--cd-primary);
    border-color: var(--cd-primary);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--cd-tertiary);
    border-color: var(--cd-tertiary);
    color: #fff;
}

.btn-outline-primary {
    color: var(--cd-primary-dark);
    border-color: var(--cd-primary);
}

.btn-outline-primary:hover {
    background: var(--cd-primary);
    border-color: var(--cd-primary);
    color: #fff;
}

.btn-outline-light:hover {
    color: var(--cd-secondary-dark);
}

/* Page intro (list pages) */
.cd-page-intro {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    margin-bottom: 1.5rem;
}

.cd-page-intro-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: var(--cd-radius-xl);
    background: linear-gradient(135deg, var(--cd-primary) 0%, var(--cd-tertiary) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 8px 20px rgba(212, 130, 24, .25);
}

.cd-page-intro h1 {
    margin-bottom: .15rem;
    font-size: 26px;
    line-height: 34px;
}

.cd-page-intro p {
    color: var(--cd-muted);
    margin-bottom: 0;
}

/* Article cards (index grid) */
.cd-article-card {
    overflow: hidden;
}

.cd-article-card:hover .cd-article-thumb {
    color: var(--cd-tertiary);
}

.cd-article-card .card-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: .75rem;
}

.cd-badge-date {
    display: inline-flex;
    align-items: center;
    background: var(--cd-primary-soft);
    color: var(--cd-primary-dark);
    border-radius: var(--cd-radius-full);
    padding: .2rem .65rem;
    font-size: 10px;
    letter-spacing: .04em;
    font-weight: 700;
    margin-bottom: .6rem;
}

.cd-card-cta {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--cd-primary-dark);
    font-weight: 600;
    font-size: 13px;
}

.cd-card-cta .material-symbols-outlined {
    transition: transform .15s ease;
    font-size: 1rem;
}

.cd-article-card:hover .cd-card-cta .material-symbols-outlined {
    transform: translateX(3px);
}

/* Article detail header */
.cd-article-header {
    margin-bottom: 1.25rem;
}

.cd-article-header h1 {
    font-family: 'EB Garamond', serif;
    font-size: 34px;
    line-height: 42px;
    letter-spacing: -0.01em;
    font-weight: 600;
    margin-bottom: .5rem;
}

@media (min-width: 768px) {
    .cd-article-header h1 {
        font-size: 48px;
        line-height: 56px;
    }
}

.cd-breadcrumb .breadcrumb {
    background: none;
    padding: 0;
    font-size: 12px;
    font-weight: 600;
}

.cd-breadcrumb .breadcrumb-item.active {
    color: var(--cd-tertiary);
}

.cd-breadcrumb .breadcrumb a {
    color: var(--cd-muted);
    text-decoration: none;
}

.cd-breadcrumb .breadcrumb a:hover {
    color: var(--cd-primary);
}

/* Document cards */
.cd-doc-card {
    display: flex;
    align-items: center;
    gap: .9rem;
    background: var(--cd-surface-container-lowest);
    border: 1px solid var(--cd-border-gold);
    border-radius: var(--cd-radius-lg);
    padding: .9rem 1.1rem;
    height: 100%;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.cd-doc-card:hover {
    border-color: var(--cd-primary);
    box-shadow: 0 10px 24px -4px rgba(16, 27, 51, .1);
    transform: translateY(-2px);
    color: inherit;
}

.cd-doc-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--cd-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
    color: #fff;
}

.cd-doc-icon--pdf  { background: var(--cd-tertiary); }
.cd-doc-icon--doc  { background: var(--cd-secondary); }
.cd-doc-icon--xls  { background: #5f7a4a; }
.cd-doc-icon--ppt  { background: var(--cd-primary); }
.cd-doc-icon--zip  { background: #6b5a7a; }
.cd-doc-icon--img  { background: #3a7a78; }
.cd-doc-icon--file { background: var(--cd-muted); }

.cd-doc-name {
    font-weight: 600;
    flex: 1;
    min-width: 0;
}

.cd-doc-download {
    color: var(--cd-muted);
    flex-shrink: 0;
}

.cd-doc-card:hover .cd-doc-download {
    color: var(--cd-primary-dark);
}

/* Empty states */
.cd-empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--cd-surface-cream-alt);
    border: 1px dashed var(--cd-border-gold);
    border-radius: var(--cd-radius-xl);
    color: var(--cd-muted);
}

.cd-empty-state .material-symbols-outlined {
    font-size: 2rem;
    margin-bottom: .6rem;
    display: block;
    color: var(--cd-primary);
}

.cd-empty-state p {
    margin: 0;
}

/* Alerts */
.alert {
    border-radius: var(--cd-radius-lg);
    border: none;
}


/* Deep links into article sections (e.g. #cosmic-chants) land below the sticky menu. */
.cd-article-body [id] {
    scroll-margin-top: 90px;
}

/* Home: "Submit a query" pop-up form. */
.cd-ticket-modal .modal-content {
    border: 0;
    border-top: 3px solid var(--cd-primary);
    border-radius: var(--cd-radius-xl);
}

.cd-ticket-modal .modal-header {
    align-items: flex-start;
    border-bottom-color: var(--cd-border-gold);
}

.cd-ticket-modal .modal-title {
    display: flex;
    align-items: center;
    font-family: 'EB Garamond', serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--cd-secondary-dark);
}

.cd-ticket-modal .modal-title .material-symbols-outlined {
    color: var(--cd-primary);
}

.cd-ticket-intro {
    font-size: 13px;
    color: var(--cd-muted);
}

.cd-ticket-modal .form-label {
    font-size: 13px;
    font-weight: 600;
}

.cd-ticket-captcha {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1rem;
    padding: .8rem 1rem;
    background: var(--cd-gold-luminous);
    border-radius: var(--cd-radius-lg);
}

.cd-ticket-captcha .form-control {
    width: 90px;
}

.cd-ticket-captcha .invalid-feedback {
    flex-basis: 100%;
    margin-top: 0;
}

.cd-ticket-modal .modal-footer {
    border-top-color: var(--cd-border-gold);
}

.cd-ticket-modal .modal-footer .btn {
    display: inline-flex;
    align-items: center;
}


/* ==========================================================================
   Home page boxes + footer (2026-11-27), accents borrowed from yssofindia.org:
   terracotta #bb4f27 (headings, buttons), peach #ffe4c6 (title strips, footer)
   and brown #75420a (footer links). Header, menu and welcome card keep the
   portal's own navy/saffron so the portal stays distinct from the main site.
   Boxes are flat: thin warm border, small radius, no shadow.
   ========================================================================== */

:root {
    --yss-terracotta: #bb4f27;
    --yss-terracotta-dark: #9a3f1d;
    --yss-peach: #ffe4c6;
    --yss-peach-soft: #fff4e6;
    --yss-brown: #75420a;
    --yss-line: #ead3b4;
}

/* Section heading between box rows, as on yssofindia.org ("IMAGE GALLERY"). */
.cd-section-head {
    font-family: 'EB Garamond', serif;
    font-size: 28px;
    font-weight: 500;
    color: var(--yss-terracotta);
    margin: 2.75rem 0 1.1rem;
}

/* The box. */
.cd-box {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--yss-line);
    border-radius: 10px;
    overflow: hidden;
}

.cd-box-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
    padding: .75rem 1.15rem;
    background: var(--yss-peach-soft);
    border-bottom: 1px solid var(--yss-line);
    font-family: 'EB Garamond', serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--yss-terracotta);
}

.cd-box-head .material-symbols-outlined {
    font-size: 20px;
    color: var(--yss-terracotta);
}

.cd-box-body {
    flex: 1;
    padding: .55rem 1.15rem .75rem;
}

.cd-box-foot {
    display: block;
    padding: .65rem 1.15rem;
    border-top: 1px solid var(--yss-line);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--yss-terracotta);
    text-decoration: none;
}

.cd-box-foot:hover {
    background: var(--yss-peach-soft);
    color: var(--yss-terracotta-dark);
}

/* The About box (left, with the slider) uses the same flat treatment. */
.cd-about-card {
    border: 1px solid var(--yss-line);
    border-radius: 10px;
    box-shadow: none;
}

.cd-about-card:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--yss-line);
}

.cd-about-card::before {
    display: none;
}

/* Gurudeva box: peach top with the portrait, white bottom with the quote. */
.cd-guru {
    height: auto;
}

.cd-guru-top {
    padding: 1.4rem 1.25rem 1.2rem;
    background: linear-gradient(180deg, var(--yss-peach) 0%, var(--yss-peach-soft) 100%);
    border-bottom: 1px solid var(--yss-line);
    text-align: center;
}

.cd-guru-photo {
    display: block;
    width: 100%;
    max-width: 200px;
    height: auto;
    margin: 0 auto .9rem;
    /* The portrait sits on an off-white square: fade its corners so only the oval frame shows. */
    -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 90%, transparent 100%);
    mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 90%, transparent 100%);
}

.cd-guru-name {
    font-family: 'EB Garamond', serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--yss-terracotta);
    margin: 0 0 .3rem;
}

.cd-guru-sub {
    font-size: 13px;
    line-height: 1.5;
    color: var(--yss-brown);
    margin: 0;
}

.cd-guru-sub em {
    font-family: 'EB Garamond', serif;
    font-size: 15px;
}

.cd-pullquote {
    position: relative;
    margin: 0;
    padding: 1.2rem 1.25rem 1.1rem 2.6rem;
}

.cd-pullquote::before {
    content: '\201C';
    position: absolute;
    left: .9rem;
    top: .55rem;
    font-family: 'EB Garamond', serif;
    font-size: 52px;
    line-height: 1;
    color: var(--yss-terracotta);
    opacity: .85;
}

.cd-pullquote blockquote {
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: 18px;
    line-height: 1.5;
    color: var(--cd-ink);
    margin: 0 0 .7rem;
}

.cd-pullquote figcaption {
    font-size: 13px;
}

.cd-pullquote figcaption a {
    color: var(--yss-terracotta);
    font-weight: 600;
    text-decoration: none;
}

.cd-pullquote figcaption a:hover {
    text-decoration: underline;
}

/* Center Desk box. */
.cd-contact {
    height: auto;
    margin-top: 1.5rem;
    scroll-margin-top: 90px;
}

.cd-contact .cd-box-body {
    padding-top: 1rem;
    padding-bottom: 1.15rem;
}

.cd-contact-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 1.15rem 1rem; /* rows: room between email, phone and address */
    margin: 0 0 1.25rem;
    font-size: 14px;
    line-height: 1.5;
}

.cd-contact-list dt {
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: 15px;
    font-weight: 400;
    color: var(--yss-brown);
}

.cd-contact-list dd {
    margin: 0;
    color: var(--cd-ink);
}

.cd-contact-list dd span {
    color: var(--cd-muted);
    font-size: 13px;
}

.cd-contact-list a {
    color: var(--yss-terracotta);
    font-weight: 600;
    text-decoration: none;
}

.cd-contact-list a:hover {
    text-decoration: underline;
}

.cd-btn-terracotta {
    background: var(--yss-terracotta);
    border: 1px solid var(--yss-terracotta);
    color: #fff;
    font-size: 14px;
    padding: .55rem 1rem;
}

.cd-btn-terracotta:hover,
.cd-btn-terracotta:focus {
    background: var(--yss-terracotta-dark);
    border-color: var(--yss-terracotta-dark);
    color: #fff;
}

/* Index list inside a box: entry on the left, its count on the right. */
.cd-index {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cd-index li + li {
    border-top: 1px dashed var(--yss-line);
}

.cd-index a {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: .6rem 0;
    font-size: 14.5px;
    line-height: 1.4;
    color: var(--cd-ink);
    text-decoration: none;
}

.cd-index a:hover span {
    color: var(--yss-terracotta);
}

.cd-index em {
    flex-shrink: 0;
    min-width: 2rem;
    padding: .05rem .45rem;
    border-radius: 999px;
    background: var(--yss-peach-soft);
    border: 1px solid var(--yss-line);
    font-style: normal;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    color: var(--yss-brown);
}

/* Reading lists — contents-style lines with dotted leaders. */
.cd-reading {
    margin-top: .5rem;
}

.cd-media + .cd-reading {
    margin-top: 1.5rem;
}

.cd-toc {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: cd-toc;
}

.cd-toc li {
    display: flex;
    align-items: baseline;
    padding: .55rem 0;
    font-size: 15px;
    line-height: 1.4;
}

.cd-toc li + li {
    border-top: 1px dashed var(--yss-line);
}

.cd-toc li a {
    order: 1;
    color: var(--cd-ink);
    text-decoration: none;
}

.cd-toc li a:hover {
    color: var(--yss-terracotta);
}

.cd-toc li::after { /* dotted leader between title and the right-hand note */
    content: '';
    order: 2;
    flex: 1;
    min-width: 1.5rem;
    margin: 0 .6rem;
    border-bottom: 1px dotted var(--yss-brown);
    opacity: .3;
    transform: translateY(-.3em);
}

.cd-toc-aside {
    order: 3;
    flex-shrink: 0;
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: 15px;
    color: var(--yss-brown);
}

.cd-toc--ranked li {
    counter-increment: cd-toc;
}

.cd-toc--ranked li::before {
    content: counter(cd-toc);
    order: 0;
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    margin-right: .7rem;
    border-radius: 50%;
    background: var(--yss-peach);
    color: var(--yss-terracotta);
    font-family: 'EB Garamond', serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.75rem;
    text-align: center;
    align-self: center;
}

/* Footer — two-tone, after yssofindia.org: peach band, terracotta strip. */
.cd-footer {
    margin-top: 3.5rem;
    font-size: 14px;
}

.cd-footer-main {
    padding: 2.25rem 0 1.75rem;
    background: var(--yss-peach);
    border-top: 3px solid #ffd14e;
    color: var(--yss-brown);
}

.cd-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
}

.cd-footer .cd-logo-text {
    color: var(--yss-terracotta);
    font-size: 22px;
}

.cd-footer-about {
    max-width: 380px;
    margin: .8rem 0 0;
    line-height: 1.55;
}

.cd-footer h6 {
    font-family: 'EB Garamond', serif;
    font-size: 19px;
    font-weight: 600;
    color: var(--yss-terracotta);
    margin: 0 0 .6rem;
}

.cd-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cd-footer li {
    margin-bottom: .35rem;
}

.cd-footer-main a:not(.cd-footer-brand) {
    color: var(--yss-brown);
    text-decoration: none;
}

.cd-footer-main a:not(.cd-footer-brand):hover {
    color: var(--yss-terracotta);
    text-decoration: underline;
}

.cd-footer-bottom {
    padding: .8rem 0;
    background: var(--yss-terracotta);
    color: var(--yss-peach);
    font-size: 12.5px;
}
