/* Font Face Declarations */
@font-face {
    font-family: 'Sui Generis';
    src: url('../../../assets/fonts/sui generis rg.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'XIROD';
    src: url('../../../assets/fonts/XIROD.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Extracted Typography Styles */
.text-style-1 {
    fill: #FFFFFF;
    font-family: 'XIROD', Xirod-Regular, Xirod, sans-serif;
    font-size: 30px;
    font-weight: normal;
    letter-spacing: 1.15384615;
}

.text-style-2 {
    fill: #FFFFFF;
    font-family: 'Sui Generis', Georgia, serif;
    font-weight: normal;
}

.text-style-3 {
    font-size: 26px;
    letter-spacing: 1;
}

.text-style-4 {
    font-size: 50px;
    letter-spacing: 1.92307692;
}

.text-style-5 {
    fill: #FFFFFF;
    font-family: 'Sui Generis', Georgia, serif;
    font-size: 26px;
    font-weight: normal;
    letter-spacing: 1;
}

.text-style-6 {
    fill: #000000;
    font-family: 'Sui Generis', Georgia, serif;
    font-size: 26px;
    font-weight: normal;
    letter-spacing: 1;
}

.text-style-7 {
    fill: #FFFFFF;
    font-family: 'Sui Generis', Georgia, serif;
    font-size: 34px;
    font-weight: normal;
    letter-spacing: 1.30769231;
}

.text-style-8 {
    fill: #FFFFFF;
    font-family: SegoeUI-Bold, Segoe UI;
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 1.07692308;
}

.text-style-9 {
    fill: #FFFFFF;
    font-family: 'Sui Generis', Georgia, serif;
    font-size: 44px;
    font-weight: normal;
    letter-spacing: 1.69230769;
}

.text-style-10 {
    font-family: AppleColorEmoji, Apple Color Emoji;
}

.text-style-11 {
    fill: #FFFFFF;
    font-family: 'XIROD', sans-serif;
    font-size: 20px;
    font-weight: normal;
    letter-spacing: 0.769230769;
}

.text-style-12 {
    fill: #FFFFFF;
    font-family: 'Sui Generis', Georgia, serif;
    font-size: 20px;
    font-weight: normal;
    letter-spacing: 0.769230769;
}

.text-style-13 {
    fill: #FFFFFF;
    font-family: 'Sui Generis', Georgia, serif;
    font-size: 16px;
    font-weight: normal;
    letter-spacing: 0.615384615;
}

.text-style-14 {
    fill: #FFFFFF;
    font-family: 'XIROD', sans-serif;
    font-size: 18px;
    font-weight: normal;
    letter-spacing: 0.692307692;
}

.text-style-15 {
    fill: #FFFFFF;
    font-family: 'XIROD', sans-serif;
    font-size: 22px;
    font-weight: normal;
    letter-spacing: 0.846153846;
}

.text-style-16 {
    fill: #FFFFFF;
    font-family: 'Sui Generis', Georgia, serif;
    font-size: 18px;
    font-weight: normal;
    letter-spacing: 0.692307692;
}

/* Specific override for Process Card text to match visual size of HTML text */
#VEXML-Process .text-style-5 {
    font-size: 34px;
}

.brand-name {
    font-family: 'XIROD', sans-serif;
    font-weight: normal;
    display: inline-block;
    /* Helps with rendering stability on some browsers */
}

/* Index Definitions Link Styling */
.index-link,
.accordion-content a {
    color: #EF405C;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.3s ease;
}

/* Force headers to keep their color even for links */
h1 .index-link,
h2 .index-link,
h3 .index-link,
h4 .index-link,
.accordion-title .index-link {
    color: inherit !important;
    text-decoration: none;
}

/* Superscript Animation (i/ext) */
.index-link sup,
.accordion-content a sup {
    color: #FD724C;
    font-weight: 600;
    padding-left: 0;
    display: inline-block;
    opacity: 0;
    max-width: 0;
    transform: scale(0);
    transform-origin: bottom left;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    vertical-align: super;
    text-decoration: none !important;
}

/* Parent Anchor Hover */
.index-link:hover,
.accordion-content a:hover {
    color: #FFFFFF !important;
    text-decoration: underline;
}

/* Superscript Reveal on Parent Hover */
.index-link:hover sup,
.accordion-content a:hover sup {
    opacity: 1;
    max-width: 30px;
    transform: scale(1);
    padding-left: 2px;
    color: #FFFFFF !important;
}

/* Index Grid Layout & Revert Button Logic */
.key-ideas-grid {
    display: grid;
    /* Term (sized to content) | Arrow Button (fixed width) | Definition (remaining space) */
    grid-template-columns: max-content 40px minmax(0, 1fr);
    gap: 15px 10px;
    /* Row Gap | Column Gap */
    align-items: baseline;
    font-size: 0.95rem;
    line-height: 1.6;
    padding: 20px 0;
}

.key-ideas-grid strong {
    color: #FD724C;
    font-weight: 600;
    white-space: nowrap;
    text-align: right;
    justify-self: end;
}

/* Compact dictionary-style layout specifically for the Index accordion */
#section-index .content-inner {
    /* Nudge grid slightly right while keeping extra space for column 3 */
    padding: 20px 20px 20px 14px;
}

#section-index .key-ideas-grid {
    /* Slightly wider term column; keep description column generous */
    grid-template-columns: max-content 26px minmax(0, 1fr);
    row-gap: 8px;
    /* a bit more vertical space between entries */
    column-gap: 14px;
    padding: 8px 0 18px;
    line-height: 1.45;
    align-items: flex-start;
}

#section-index .key-ideas-grid strong {
    padding-right: 8px;
    align-self: flex-start;
}

#section-index .revert-btn {
    align-self: flex-start;
}

/* Revert Button: dedicated grid column, but visually hidden until its term is active.
   We hide it using opacity so the column width stays stable in the grid. */
.revert-btn {
    text-decoration: none;
    color: #EF405C;
    font-size: 1.1rem;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, color 0.2s ease;
    text-align: center;
    justify-self: center;
}

/* When the term is targeted (via hash link), show and enable the revert */
strong:target+.revert-btn {
    opacity: 1;
    pointer-events: auto;
    color: #FD724C;
}

.revert-btn:hover {
    color: #FD724C;
}

.key-ideas-grid span {
    color: #cccccc;
}

.key-ideas-grid a {
    color: #fff;
    text-decoration: underline;
}

.key-ideas-grid a:hover {
    color: #FD724C;
}