/* The Scrimpr dictionary: a one-line entry, headword in serif, word type in
   italics, then the meaning. Markup from scrimpr_dictionary_line() in
   functions.php; js/dictionary.js picks a random entry on guide banners. */
.scrimpr-defline {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #43566b;
    text-align: left;
}

.scrimpr-defline__word {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
    color: #12365f;
}

.scrimpr-defline__pos {
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    color: #a72b3d;
}

.scrimpr-defline__ipa {
    color: #617083;
}

/* a rotating line stays hidden until js/dictionary.js has set its word, then
   fades in, so the starting word never flashes. Without the script it still
   appears after a second (the animation). */
.scrimpr-defline[data-scrimpr-def="rotate"] {
    opacity: 0;
    animation: scrimpr-defline-show 0.2s ease-out 1s forwards;
}

.scrimpr-defline[data-scrimpr-def="rotate"].is-set {
    animation: scrimpr-defline-show 0.2s ease-out forwards;
}

@keyframes scrimpr-defline-show {
    to {
        opacity: 1;
    }
}

/* homepage hero: one centred line under the subtitle */
.scrimpr-hero .scrimpr-defline {
    max-width: 680px;
    margin: 0 auto 16px;
    text-align: center;
}

/* guide banner: one line in the blue box, under the text */
.dz-banner .scrimpr-defline {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--ed-on-dark-soft);
}

.dz-banner .scrimpr-defline__word {
    color: var(--ed-on-dark);
}

.dz-banner .scrimpr-defline__ipa {
    color: var(--ed-on-dark-soft);
}

.dz-banner .scrimpr-defline__pos {
    color: #f5c4cb;
}

/* The entry card (404 page): a white card with a red bookmark rule, the
   headword in serif and the word type in red italics. */
.scrimpr-def {
    position: relative;
    max-width: 380px;
    margin: 0;
    padding: 16px 16px 16px 20px;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(18, 54, 95, 0.08), 0 8px 24px rgba(18, 54, 95, 0.16);
    color: #1b2d40;
    text-align: left;
}

/* thin red rule down the left, like a bookmark */
.scrimpr-def::before {
    content: "";
    position: absolute;
    top: 16px;
    bottom: 16px;
    left: 0;
    width: 3px;
    border-radius: 0 2px 2px 0;
    background: #a72b3d;
}

/* scoped to the card so page paragraph margins don't apply */
.scrimpr-def .scrimpr-def__label,
.scrimpr-def .scrimpr-def__head,
.scrimpr-def .scrimpr-def__sense,
.scrimpr-def .scrimpr-def__example {
    margin: 0;
}

.scrimpr-def .scrimpr-def__label {
    margin-bottom: 8px;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #a72b3d;
}

.scrimpr-def__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e3e9ef;
}

.scrimpr-def__word {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.625rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: #12365f;
}

.scrimpr-def__ipa {
    font-size: 0.9375rem;
    color: #617083;
}

.scrimpr-def__pos {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.9375rem;
    font-style: italic;
    color: #a72b3d;
}

.scrimpr-def .scrimpr-def__sense {
    padding-top: 8px;
    color: #1b2d40;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.error-404-content .scrimpr-def {
    margin: 16px auto 32px;
}

/* no fade for people who turn off animation */
@media (prefers-reduced-motion: reduce) {
    .scrimpr-defline[data-scrimpr-def="rotate"].is-set {
        animation-duration: 0s;
    }
}
