.concept-help {
    min-width: 0;
}

.concept-help-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 100%;
    min-height: 44px;
    padding: 9px 14px;
    border: 1px solid rgba(212, 175, 55, 0.52);
    border-radius: 999px;
    background: rgba(13, 12, 38, 0.62);
    color: #f3e9c8;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    line-height: 1.35;
    text-align: left;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.concept-help-trigger:hover,
.concept-help-trigger:focus-visible {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.14);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
    outline: none;
}

.concept-help-trigger-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-family: Georgia, serif;
    font-size: 16px;
    font-weight: 700;
}

.concept-term-guide {
    min-width: 0;
    margin: 18px 0 26px;
    padding: 16px 18px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    background:
        radial-gradient(circle at 95% 0%, rgba(138, 43, 226, 0.16), transparent 44%),
        rgba(13, 12, 38, 0.48);
}

.concept-term-guide-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-bottom: 12px;
}

.concept-term-guide-heading p {
    margin: 0;
    color: #f3e9c8;
    font-family: 'Cinzel', serif;
    font-size: 16px;
    line-height: 1.4;
}

.concept-term-guide-heading a {
    color: #e4c451;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 16px;
    text-underline-offset: 3px;
}

.concept-term-list {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    gap: 8px;
}

.concept-help--term {
    display: inline-flex;
}

.concept-help--term .concept-help-trigger {
    min-height: 44px;
    padding: 8px 12px;
    border-color: rgba(212, 175, 55, 0.38);
    background: rgba(75, 0, 130, 0.2);
    color: #efe5f7;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 16px;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(212, 175, 55, 0.55);
    text-decoration-style: dotted;
    text-underline-offset: 4px;
}

.concept-help--term .concept-help-trigger-icon {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
    font-size: 14px;
    text-decoration: none;
}

.concept-help--glossary .concept-help-trigger {
    width: 100%;
    justify-content: space-between;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 10px;
    color: #f3e9c8;
    font-size: 16px;
}

.concept-help-inline {
    display: inline;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0 0.08em;
    border: 0;
    border-radius: 0.2em;
    appearance: none;
    background: transparent;
    color: #dfc8f4;
    font: inherit;
    font-weight: 600;
    line-height: inherit;
    text-align: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(212, 175, 55, 0.82);
    text-decoration-style: dotted;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.2em;
    cursor: help;
}

.concept-help-inline:hover {
    color: #f3e9c8;
    background: rgba(138, 43, 226, 0.2);
    text-decoration-color: #d4af37;
}

.concept-help-inline:focus-visible {
    color: #fff7dc;
    background: rgba(138, 43, 226, 0.26);
    outline: 2px solid #d4af37;
    outline-offset: 2px;
}

.concept-help-dialog {
    width: min(36rem, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.58);
    border-radius: 18px;
    background: #15132f;
    color: #ece4f6;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.62);
}

.concept-help-dialog::backdrop {
    background: rgba(4, 5, 18, 0.82);
    backdrop-filter: blur(4px);
}

.concept-help-dialog-inner {
    position: relative;
    min-width: 0;
    max-height: calc(100vh - 26px);
    max-height: calc(100dvh - 26px);
    padding: 28px;
    overflow-x: hidden;
    overflow-y: auto;
    overflow-wrap: anywhere;
    font-family: 'Cormorant Garamond', Georgia, serif;
}

.concept-help-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.24);
    color: #f3e9c8;
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
}

.concept-help-close:hover,
.concept-help-close:focus-visible {
    border-color: #d4af37;
    outline: 3px solid rgba(212, 175, 55, 0.2);
    outline-offset: 2px;
}

.concept-help-eyebrow {
    margin: 0 52px 5px 0;
    color: #d4af37;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.concept-help-dialog h2 {
    margin: 0 52px 20px 0;
    color: #f3e9c8;
    font-family: 'Cinzel Decorative', serif;
    font-size: clamp(22px, 5vw, 28px);
    line-height: 1.2;
    text-align: left;
}

.concept-help-dialog section + section {
    margin-top: 18px;
}

.concept-help-dialog h3 {
    margin: 0 0 5px;
    color: #d4af37;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    line-height: 1.35;
}

.concept-help-dialog p {
    margin: 0;
    color: #ece4f6;
    font-size: 18px;
    line-height: 1.55;
}

.concept-help-context,
.concept-help-depth {
    min-width: 0;
    margin-top: 22px;
    padding: 13px 15px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.18);
}

.concept-help-context summary,
.concept-help-depth summary {
    color: #f3e9c8;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
}

.concept-help-context summary:focus-visible,
.concept-help-depth summary:focus-visible {
    outline: 3px solid rgba(212, 175, 55, 0.25);
    outline-offset: 3px;
}

.concept-help-context section {
    margin-top: 14px;
}

.concept-help-context p,
.concept-help-depth p {
    margin-top: 10px;
    color: #d3c8df;
    font-size: 16px;
}

html.concept-help-open {
    overflow: hidden;
}

@media (max-width: 420px) {
    .concept-help-dialog-inner {
        padding: 22px 18px;
    }

    .concept-help-close {
        top: 8px;
        right: 8px;
    }

    .concept-help-dialog p {
        font-size: 17px;
    }
}
