/* Shared by Joomla Guide article bodies and their excerpts. */
:root {
    --joi-guide-ink: #201f21;
    --joi-guide-text: #333236;
    --joi-guide-muted: #605d62;
    /* Homepage interaction accent and its existing accessible navigation text color. */
    --joi-guide-accent: #f31065;
    --joi-guide-accent-ink: #b00a49;
    --joi-guide-line: #dcdadc;
}

.joi-guide .com-content-article__body, .joi-guide-prose {
    color: var(--joi-guide-text);
    font-size: clamp(1rem, .95rem + .2vw, 1.075rem);
    line-height: 1.7;
    overflow-wrap: break-word;
}

.joi-guide .page-header :is(h1, h2),
.joi-guide-title, .joi-guide-section-heading, .joi-guide-heading, .joi-guide-subheading {
    color: var(--joi-guide-ink);
    text-transform: none;
    font-weight: 700;
}

.joi-guide-hero {
    padding-block: clamp(.75rem, 2vw, 1.5rem) .5rem;
}

.joi-guide-title {
    margin: .25em 0 .4em;
    font-size: clamp(1.55rem, 1.15rem + 1.6vw, 2.1rem);
    overflow-wrap: anywhere;
    line-height: 1.14;
    letter-spacing: -.025em;
}

.joi-guide-section { margin-block: clamp(2rem, 5vw, 3.25rem); }
.joi-guide-section-heading, h2.joi-guide-heading {
    margin: 1.55em 0 .55em;
    font-size: clamp(1.4rem, 2.25vw, 1.8rem);
    line-height: 1.28;
    letter-spacing: -.015em;
    text-wrap: pretty;
}
.joi-guide-section > :is(.joi-guide-section-heading, .joi-guide-heading):first-child { margin-top: 0; }
.joi-guide-subheading { margin: 1.35em 0 .45em; font-size: 1.18rem; line-height: 1.4; }
.joi-guide-paragraph { margin: 0 0 .9em; color: var(--joi-guide-text); line-height: 1.7; }
.joi-guide-hero :is(.joi-guide-title, .joi-guide-header-meta) + :is(.joi-guide-figure, .joi-guide-center) {
    max-width: min(100%, 31rem);
    margin: 1rem auto 1.25rem;
}
.joi-guide-hero .joi-guide-paragraph:not(.joi-guide-meta) { font-size: 1.08em; }
.joi-guide-hero .joi-guide-prose { color: var(--joi-guide-muted); font-size: .92rem; }

.joi-guide-meta, .joi-guide-caption { color: var(--joi-guide-muted); font-size: .9rem; line-height: 1.6; }
.joi-guide-caption { padding: .5em 0; text-align: left; }
.joi-guide-example-text { font-size: 1.08rem; line-height: 1.95; }
.joi-guide-emphasis { color: var(--joi-guide-ink); }
/* The learned expression and its equivalent translation share one emphasis. */
.joi-guide .joi-guide-learning-term {
    color: var(--joi-guide-accent-ink);
    font-weight: 800;
}
.joi-guide-particle { color: var(--joi-guide-accent-ink); }
.joi-guide-label { color: var(--joi-guide-ink); font-weight: 700; }
.joi-guide-furigana { font-size: .6em; }
.joi-guide-ruby { ruby-align: center; }
.joi-guide-underlined { text-decoration: underline; text-underline-offset: .14em; }
.joi-guide-address { font-style: normal; }
.joi-guide-quote {
    margin: 0;
    padding: .2em 1em;
    color: var(--joi-guide-text);
    border-inline-start: 2px solid var(--joi-guide-line);
}
.joi-guide-list { margin: .4em 0; padding-inline-start: 1.45em; line-height: 1.75; }
.joi-guide-list-item { margin-block: .35em; }
.joi-guide-alphabetical { list-style: upper-alpha; }
.joi-guide-sublist { list-style: circle; }
.joi-guide-unmarked { list-style: none; }

.joi-guide-link, .joi-guide .com-content-article__body a.joi-guide-link {
    color: var(--joi-guide-text);
    text-decoration: underline;
    text-underline-offset: .15em;
}
.joi-guide .com-content-article__body a.joi-guide-link:hover { color: var(--joi-guide-accent-ink); text-decoration-thickness: 2px; }
.joi-guide :is(a, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--joi-guide-accent);
    outline-offset: 2px;
}

/* Sections and examples share a single reading surface. */
.joi-guide-contents { margin-block: 1.5rem; }
.joi-guide-card, .joi-guide-panel { min-width: 0; }
.joi-guide-card-header { margin-block-end: .6rem; }
.joi-guide-card-header > :first-child, .joi-guide-panel > :first-child { margin-block-start: 0; }
.joi-guide-card + .joi-guide-card, .joi-guide-panel + .joi-guide-panel { margin-block-start: 1.25rem; }
:is(.joi-guide-grid, .joi-guide-stack, .joi-guide-row) > :is(.joi-guide-panel, .joi-guide-card) {
    margin-block-start: 0;
}
.joi-guide-panel:has(> .joi-guide-example-text) {
    padding-inline-start: 1em;
}
.joi-guide-divider { margin-block-start: .75em; }
.joi-guide-disclosure {
    margin: 0;
    border: 0;
}
.joi-guide-summary, .joi-guide-summary-padded {
    display: list-item;
    padding-block: .7em;
    color: var(--joi-guide-ink);
    font-weight: 650;
    cursor: pointer;
}
.joi-guide-disclosure > summary::marker { color: var(--joi-guide-accent-ink); }
.joi-guide-answer { padding-block: .25rem 1rem; }
.joi-guide-card-link { display: block; }
.joi-guide-action-panel { margin-block: 2.75rem; }
.joi-guide-badge, .joi-guide-badge-solid {
    color: var(--joi-guide-muted);
    font-size: .86rem;
    line-height: 1.5;
    font-weight: 650;
}
a.joi-guide-button, a.joi-guide-button-outline, a.joi-guide-card-link {
    color: var(--joi-guide-accent-ink);
    text-decoration: underline;
    text-underline-offset: .17em;
}
a.joi-guide-button, a.joi-guide-button-outline { font-weight: 650; }
a.joi-guide-button:hover, a.joi-guide-button-outline:hover, a.joi-guide-card-link:hover {
    text-decoration-thickness: 2px;
}
.joi-guide-hero :is(.joi-guide-button, .joi-guide-button-outline, .joi-guide-badge, .joi-guide-badge-solid) {
    color: var(--joi-guide-muted);
    font-size: .85rem;
    line-height: 1.5;
    font-weight: 650;
}

/* Layout for comparison grids, related lessons, and author profiles. */
.joi-guide-grid, .joi-guide-stack { display: grid; gap: 1.5rem 2rem; }
.joi-guide-grid {
    --joi-guide-card-width: 17rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--joi-guide-card-width)), 1fr));
}
.joi-guide-grid-small { --joi-guide-card-width: 14rem; }
.joi-guide-grid-wide { --joi-guide-card-width: 20rem; }
.joi-guide-stack { grid-template-columns: minmax(0, 1fr); }
.joi-guide-column { display: flex; flex-direction: column; }
.joi-guide-row { display: flex; flex-wrap: wrap; gap: 1rem; }
.joi-guide-justify-center { justify-content: center; }
.joi-guide-align-center { align-items: center; }
.joi-guide-flex-item { flex: 1 1 17rem; min-width: 0; }
.joi-guide-flex-item-small { flex: 1 1 42%; min-width: min(6rem, 100%); }
.joi-guide-flex-item-wide { flex: 1 1 26rem; min-width: 0; }
.joi-guide-flex-aside { flex: 0 1 16rem; max-width: 100%; margin-inline: auto; }
.joi-guide-aside-end { max-width: 100%; margin-inline-start: auto; }
.joi-guide-grow { flex: 1; }
.joi-guide-push-end { margin-top: auto; }
.joi-guide-figure { max-width: min(100%, 31rem); margin: 1.7em auto; text-align: center; }
.joi-guide-image, .joi-guide-thumbnail, .joi-guide-thumbnail-contain, .joi-guide-portrait {
    display: block;
    width: 100%;
}
.joi-guide-image { height: auto; }
.joi-guide-thumbnail { height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
img.joi-guide-thumbnail-contain { height: 145px; object-fit: contain; }
.joi-guide-fit-contain { object-fit: contain; }
.joi-guide-avatar-frame {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
}
img.joi-guide-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.joi-guide-aside-end:has(> .joi-guide-profile) { flex: 0 1 16rem; }
/* This recurring lazy-loaded illustration is stored with a width but no height. */
.joi-guide-image[src$="/sakura-japanese-teacher.webp"] { aspect-ratio: auto 2048 / 1592; }
.joi-guide-profile { width: min(100%, 16rem); margin: 0 auto; }
.joi-guide-portrait-frame {
    width: min(100%, 180px);
    aspect-ratio: 1;
    margin: 0 auto;
    border-radius: .65rem;
    overflow: hidden;
}
img.joi-guide-portrait { height: 100%; object-fit: cover; object-position: 50% 35%; }
.joi-guide-portrait-close .joi-guide-portrait { transform: scale(1.06); }
.joi-guide-portrait-inset .joi-guide-portrait { transform: scale(.96); }
img.joi-guide-portrait-centered { object-position: center; }
img.joi-guide-portrait-low { object-position: 50% 40%; }
.joi-guide-illustrated-aside { display: block; flex: 0 1 135px; max-width: 100%; border-radius: .65rem; }
.joi-guide-illustration { aspect-ratio: 3 / 2; }

/* Wide comparison tables scroll within the reading column. */
.joi-guide-table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; margin-block: 1em; }
.joi-guide-table { width: 100%; border-collapse: collapse; font-size: .94rem; line-height: 1.65; }
.joi-guide-table-medium { min-width: 36rem; }
.joi-guide-table-wide { min-width: 46rem; }
.joi-guide-table-fixed { table-layout: fixed; }
.joi-guide-cell { padding: .7em .65em; border: 0; border-block-end: 1px solid var(--joi-guide-line); vertical-align: top; }
th.joi-guide-cell { text-align: start; font-weight: 700; color: var(--joi-guide-ink); border-bottom-color: #a6a3a8; }

.joi-guide-center, th.joi-guide-center { text-align: center; }
.joi-guide-block { display: block; }
.joi-guide-nowrap { white-space: nowrap; }
.joi-guide-gap-before { margin-top: .75em; }
.joi-guide-break-before { margin-top: 1.65em; }
.joi-guide-gap-after { margin-bottom: .75em; }
.joi-guide-tight { margin-bottom: .35em; }
.joi-guide-flush { margin-bottom: 0; }

/* Preserve authored proportions in fixed-layout grammar and comparison tables. */
.joi-guide-column-15 { width: 15%; }
.joi-guide-column-17 { width: 17%; }
.joi-guide-column-18 { width: 18%; }
.joi-guide-column-20 { width: 20%; }
.joi-guide-column-22 { width: 22%; }
.joi-guide-column-23 { width: 23%; }
.joi-guide-column-24 { width: 24%; }
.joi-guide-column-25 { width: 25%; }
.joi-guide-column-26 { width: 26%; }
.joi-guide-column-27 { width: 27%; }
.joi-guide-column-28 { width: 28%; }
.joi-guide-column-30 { width: 30%; }
.joi-guide-column-33 { width: 33%; }
.joi-guide-column-34 { width: 34%; }
.joi-guide-column-36 { width: 36%; }
.joi-guide-column-38 { width: 38%; }
.joi-guide-column-40 { width: 40%; }
.joi-guide-column-42 { width: 42%; }
.joi-guide-column-50 { width: 50%; }
.joi-guide-column-min-160 { min-width: 160px; }
.joi-guide-column-min-280 { min-width: 280px; }
.joi-guide-column-min-60 { min-width: 60px; }

.joi-guide-header-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .3rem .65rem;
    color: var(--joi-guide-muted);
    font-size: .85rem;
    line-height: 1.5;
}
.joi-guide-hero .joi-guide-header-meta > * {
    max-width: 100%;
    margin: 0;
    font-size: inherit;
}

.joi-guide-meta-item {
    display: inline-flex;
    align-items: center;
    gap: .28em;
    margin-inline-end: .6em;
    color: var(--joi-guide-muted);
    font-size: .8125rem;
    line-height: 1.35;
    max-width: 100%;
    vertical-align: baseline;
}

/* Signed editorial notes and the shared invitation beneath them. */
.joi-guide .joi-guide-author {
    margin-block: 1.75rem 0;
    padding: clamp(1rem, 2.5vw, 1.55rem);
    border: 1px solid var(--joi-guide-line);
    border-radius: .5rem;
    background: #fff;
    text-align: start;
}
.joi-guide-author .joi-guide-row:has(> .joi-guide-avatar-frame) {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
}
.joi-guide .joi-guide-author a {
    color: var(--joi-guide-ink);
    text-decoration: underline;
    text-underline-offset: .16em;
}
.joi-guide .joi-guide-author a:hover { color: var(--joi-guide-accent-ink); }
.joi-guide-author .joi-guide-badge-solid { margin-inline-start: .4em; }
.joi-guide-author .joi-guide-row { gap: .75rem; }
.joi-guide-author .joi-guide-row + p { margin-top: .8rem; }
.joi-guide-author .joi-guide-paragraph:last-child { margin-bottom: 0; }
.joi-guide-institutional {
    color: var(--joi-guide-muted);
    font-size: .9rem;
    line-height: 1.65;
    margin: 1rem 0 0;
}
.joi-guide-author .joi-guide-institutional {
    padding-top: .85rem;
    border-top: 1px solid var(--joi-guide-line);
}
/* A shared invitation sits openly on the page, alongside the lesson animation. */
.joi-guide-trial {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: center;
    gap: clamp(1.5rem, 3vw, 3rem);
    margin: 3rem 0;
    padding: 2.5rem 0 1rem;
    text-align: start;
}
.joi-guide-trial h2 {
    margin: 0 0 1rem;
    color: var(--joi-guide-ink);
    font-size: clamp(1.65rem, 2.5vw, 2.3rem);
    line-height: 1.15;
    letter-spacing: -.025em;
    font-weight: 700;
}
.joi-guide-trial p { margin: 0 0 1.4rem; color: var(--joi-guide-muted); font-size: 1rem; line-height: 1.65; }
.joi-guide-trial .joi-guide-trial-eyebrow {
    margin-bottom: .8rem;
    color: var(--joi-guide-accent-ink);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.joi-guide-trial .btn-primary {
    padding: .8rem 1.15rem;
    border-color: transparent;
    color: #fff;
    font-weight: 650;
    line-height: 1.4;
    text-decoration: none;
    white-space: normal;
}
.joi-guide-trial-art { min-width: 0; }
.joi-guide-trial lottie-player { display: block; width: 100%; aspect-ratio: 3 / 2; }
.joi-content > .mod-custom:has(.joi-guide-trial) { max-width: 70rem; margin-inline: auto; }
@media (max-width: 575px) {
    .joi-guide-trial { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
    .joi-guide-trial-art { width: 100%; max-width: 26rem; margin-inline: auto; }
}
/* Editors choose the first articles. The remaining cards come from the same Guide series. */
.joi-guide-related-section { margin-block: 2.5rem; }
.joi-guide-related-heading { color: var(--joi-guide-ink); font-size: 1.45rem; }
.joi-guide-related-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 1rem 0;
    padding: 0;
    list-style: none;
}
.joi-guide-related-item {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--joi-guide-line);
    border-radius: .45rem;
    background: #fff;
}
:is(.joi-guide, .joi-teachers-blog) .joi-guide-related-link {
    display: block;
    color: var(--joi-guide-ink);
    font-weight: 650;
    line-height: 1.4;
    text-decoration: none;
}
:is(.joi-guide, .joi-teachers-blog) .joi-guide-related-link:is(:hover, :focus-visible) .joi-guide-related-label {
    color: var(--joi-guide-accent-ink);
    text-decoration: underline;
    text-underline-offset: .15em;
}
:is(.joi-guide, .joi-teachers-blog) .joi-guide-related-link:focus-visible { outline-offset: -3px; }
img.joi-guide-related-cover {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}
.joi-guide-related-label { display: block; padding: .85rem .85rem .45rem; }
.joi-guide-related-link:last-child .joi-guide-related-label { padding-bottom: .85rem; }
.joi-guide-related-meta {
    margin: -.15rem 0 0;
    padding: 0 .85rem .55rem;
    color: var(--joi-guide-muted);
    font-size: .8rem;
    line-height: 1.4;
}
.joi-guide-related-meta:last-child { padding-bottom: .85rem; }
.joi-guide-related-description {
    margin: 0;
    padding: 0 .85rem .9rem;
    color: var(--joi-guide-muted);
    font-size: .9rem;
    line-height: 1.5;
}
.joi-guide-related-list--compact { display: block; max-width: 68ch; }
.joi-guide-related-list--compact > li { margin: .5rem 0; overflow: visible; border: 0; background: transparent; }
.joi-guide-related-list--compact .joi-guide-related-label { padding: 0; text-decoration: underline; }
.joi-guide-related-list--compact .joi-guide-related-description { padding: .2rem 0; }
@media (max-width: 62rem) {
    .joi-guide-related-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 36rem) {
    .joi-guide-related-list { grid-template-columns: minmax(0, 1fr); }
}

/* Give desktop lessons more room while keeping a bounded reading column. */
@media (min-width: 1200px) {
    .joi-main > .container:has(.com-content-article.joi-guide) { max-width: 92rem; }
}
/* Responsive article navigation. */
.joi-content > .com-content-article.joi-guide,
.joi-article > .com-content-article.joi-guide {
    max-width: 90rem;
}

.joi-guide .joi-guide-layout--sidebar {
    display: grid;
    /* A flexible left gutter balances the right index around the reading column. */
    grid-template-columns: minmax(0, 1fr) clamp(54rem, 64.45vw, 58rem) 14rem;
    column-gap: 2rem;
    align-items: start;
}

.joi-guide .com-content-article__body {
    max-width: 58rem;
    margin-inline: auto;
}
.joi-guide .joi-guide-layout--sidebar > .com-content-article__body {
    width: 100%;
    grid-area: 1 / 2;
    min-width: 0;
}

/* Editors can reclaim the sidebar space for wide tables and paired examples. */
.joi-guide-layout[data-contents-layout="inline"] > .com-content-article__body {
    max-width: 70rem;
    width: 100%;
}

.joi-guide .joi-guide-nav {
    margin-block: 1.5rem;
    border-block: 1px solid var(--joi-guide-line);
    color: var(--joi-guide-ink);
    text-align: left;
    opacity: 1;
    transition: opacity 180ms ease, visibility 0s;
}

/* Inline indexes are compact disclosure boxes, sized to their links. */
.joi-guide .joi-guide-layout:not(.joi-guide-layout--sidebar) .joi-guide-nav {
    width: fit-content;
    min-width: min(100%, 24rem);
    max-width: min(100%, 38rem);
    padding: .25rem 1rem;
    border: 1px solid #e2e2e2;
    border-radius: .4rem;
    background: #f5f5f5;
}
.joi-guide .joi-guide-layout:not(.joi-guide-layout--sidebar) .joi-guide-nav summary {
    padding: .85rem .35rem;
    font-size: 1.2rem;
}
.joi-guide .joi-guide-layout:not(.joi-guide-layout--sidebar) .joi-guide-nav details[open] > summary {
    margin-bottom: .35rem;
    border-bottom: 1px solid #dedede;
}
.joi-guide .joi-guide-layout:not(.joi-guide-layout--sidebar) .joi-guide-nav ul {
    counter-reset: guide-contents;
    padding-bottom: .65rem;
}
.joi-guide .joi-guide-layout:not(.joi-guide-layout--sidebar) .joi-guide-nav li a {
    counter-increment: guide-contents;
    display: block;
    position: relative;
    padding: .5rem .35rem .5rem 2.3rem;
    font-size: 1.0625rem;
    line-height: 1.55;
}
.joi-guide .joi-guide-layout:not(.joi-guide-layout--sidebar) .joi-guide-nav li a::before {
    content: counter(guide-contents, decimal-leading-zero);
    position: absolute;
    inset-inline-start: .35rem;
    top: .5rem;
    width: 1.6rem;
    color: var(--joi-guide-muted);
    font-size: .82em;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    line-height: 1.9;
}
.joi-guide .joi-guide-layout:not(.joi-guide-layout--sidebar) .joi-guide-nav summary::after {
    border-color: var(--joi-guide-muted);
    flex-shrink: 0;
}

.joi-guide .joi-guide-nav[inert] {
    visibility: hidden;
    opacity: 0;
    transition-delay: 0s, 180ms;
}

@media (prefers-reduced-motion: reduce) {
    .joi-guide .joi-guide-nav,
    .joi-guide .joi-guide-nav[inert] {
        transition: none;
    }
}

.joi-guide .joi-guide-layout--sidebar > .joi-guide-nav {
    position: sticky;
    top: var(--joi-anchor-offset, 110px);
    grid-area: 1 / 3;
    margin: .75rem 0 0;
    border: 0;
    border-inline-start: 1px solid var(--joi-guide-line);
    padding-inline-start: 1rem;
}

.joi-guide .joi-guide-nav summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .8rem .2rem;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    list-style: none;
    cursor: pointer;
}

.joi-guide .joi-guide-nav summary::-webkit-details-marker {
    display: none;
}

.joi-guide .joi-guide-nav summary::after {
    content: '';
    width: 8px;
    height: 8px;
    border: solid var(--joi-guide-accent);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.joi-guide .joi-guide-nav details[open] > summary::after {
    transform: rotate(225deg);
}

.joi-guide .joi-guide-nav ul {
    margin: 0;
    padding: 0 0 .6rem;
    list-style: none;
}

.joi-guide .joi-guide-layout--sidebar > .joi-guide-nav ul {
    overflow-y: auto;
    max-height: calc(100vh - var(--joi-anchor-offset, 110px) - 85px);
}

.joi-guide .joi-guide-nav li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.joi-guide .joi-guide-layout .joi-guide-nav li a {
    display: block;
    padding: 0.42rem 0.65rem;
    border-inline-start: 3px solid transparent;
    color: var(--joi-guide-text);
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.45;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.joi-guide .joi-guide-layout .joi-guide-nav li a:hover {
    color: var(--joi-guide-ink);
    text-decoration: underline;
}

.joi-guide .joi-guide-layout .joi-guide-nav li a[aria-current="location"] {
    color: var(--joi-guide-ink);
    border-inline-start-color: var(--joi-guide-accent);
    font-weight: 700;
}

.joi-guide .joi-guide-nav :is(a, summary):focus-visible {
    outline: 2px solid var(--joi-guide-accent);
    outline-offset: -2px;
}

@media print {
    .joi-guide .joi-guide-layout--sidebar {
        display: block;
    }

    .joi-guide .joi-guide-nav {
        display: none;
    }
}

/* Article gallery. Topic and page selection share the homepage accent. */
.joi-content > .com-content-category-blog.joi-articles-hub { padding-block-start: 1.5rem; }
.joi-content .joi-articles-hub .joi-blog-gallery-title { color: var(--joi-guide-ink); }
.joi-content .joi-articles-hub .joi-articles-intro {
    max-width: 62ch;
    margin: .75rem 0 0;
    color: var(--joi-guide-text);
    font-size: 1.05rem;
    line-height: 1.65;
}
.joi-articles-hub .joi-category-bar { padding: 1.5rem 0 0; border-bottom: 1px solid var(--joi-guide-line); }
.joi-articles-hub .joi-category-pills, .joi-articles-hub .joi-guide-topics, .joi-hub-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .2rem 1.25rem;
}
.joi-articles-hub .joi-category-pill, .joi-content .joi-articles-hub .joi-guide-topics a,
.joi-content .joi-articles-hub .joi-hub-pagination a {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 44px;
    padding: .45rem .15rem;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--joi-guide-text);
    font-weight: 550;
    text-decoration: none;
}
.joi-articles-hub .joi-category-pill svg { width: 1.1rem; height: 1.1rem; }
.joi-content .joi-articles-hub :is(.joi-category-pills, .joi-guide-topics, .joi-hub-pagination) a:is([aria-current], :hover) {
    border-bottom-color: var(--joi-guide-accent);
    color: var(--joi-guide-accent-ink);
    background: transparent;
}
.joi-content .joi-articles-hub a:focus-visible { outline: 2px solid var(--joi-guide-accent-ink); outline-offset: 2px; }
.joi-articles-hub .joi-guide-topics { padding-top: .8rem; }
.joi-articles-hub .joi-guide-topics > span, .joi-articles-hub .joi-hub-pagination > span {
    color: var(--joi-guide-muted);
    font-size: .9rem;
}
.joi-articles-hub #articles { margin-top: 1.65rem; }
.joi-content .joi-articles-hub .joi-blog-gallery .blog-item,
.joi-content .joi-articles-hub .joi-blog-gallery .blog-item:is(:hover, :focus-within) {
    border-radius: 0;
    box-shadow: none;
    transform: none;
}
.joi-content .joi-articles-hub .joi-blog-gallery .blog-cover :is(img, a),
.joi-content .joi-articles-hub .joi-blog-gallery .blog-cover-empty { border-radius: 0; }
.joi-content .joi-articles-hub .joi-blog-gallery a.item-content {
    flex-direction: column;
    gap: .35rem;
    padding: .8rem 0 1rem;
}
.joi-content .joi-articles-hub .joi-blog-gallery .item-content .page-header h2 { color: var(--joi-guide-ink); }
.joi-content .joi-articles-hub .joi-blog-gallery .blog-item:is(:hover,:focus-within) h2 {
    text-decoration: underline;
    text-decoration-color: var(--joi-guide-accent);
    text-underline-offset: .18em;
}
.joi-articles-hub .joi-hub-card-category { color: var(--joi-guide-muted); font-size: .8rem; font-weight: 550; }
.joi-content .joi-articles-hub .joi-blog-gallery .joi-hub-cover-fallback { background: #f4f4f4; }
.joi-content .joi-articles-hub .joi-hub-cover-fallback a {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    align-items: center;
    justify-content: center;
    color: var(--joi-guide-muted);
    text-decoration: none;
}
.joi-hub-cover-fallback span:first-child { font-size: 3rem; line-height: 1.1; }
.joi-hub-cover-fallback span:last-child { font-size: .85rem; }
.joi-articles-hub .joi-hub-pagination {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--joi-guide-line);
    justify-content: center;
}
.joi-content .joi-articles-hub .joi-hub-pagination a { min-width: 44px; justify-content: center; }

.joi-articles-hub .joi-hub-card-date {
    display: block;
    color: var(--joi-guide-muted);
    font-size: .85rem;
    line-height: 1.5;
}

@media (min-width: 992px) {
    .joi-content .com-content-category-blog.joi-articles-hub .blog-items.joi-blog-gallery {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* The Guides and Articles gallery share the same fixed return control. */
.btn.joi-guide-back-top {
    position: fixed;
    --joi-back-top-inset: 32px;
    inset-inline-end: max(var(--joi-back-top-inset), env(safe-area-inset-right));
    bottom: max(calc(var(--joi-back-top-inset) + env(safe-area-inset-bottom)), calc(var(--joi-back-top-footer-lift, 0px) + var(--joi-back-top-inset)));
    z-index: 1000;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    padding: 0;
    border-radius: .6rem;
    box-shadow: 0 4px 14px rgb(32 31 33 / 18%);
    border-color: transparent;
    color: #fff;
}
.joi-guide-back-top::before {
    content: '';
    width: 16px;
    height: 16px;
    border: solid currentColor;
    border-width: 2px 2px 0 0;
    transform: translateY(3px) rotate(-45deg);
}
.joi-guide-back-top:focus-visible {
    outline: 2px solid var(--joi-guide-ink);
    outline-offset: 3px;
}
.btn.joi-guide-back-top[hidden] { display: none; }
@media (max-width: 575px) {
    .btn.joi-guide-back-top { --joi-back-top-inset: 24px; }
}
@media print {
    .btn.joi-guide-back-top { display: none; }
}

/* Quiz anchors occur on either the section or its heading. Each question
   contains its own expandable answer, including in particle practice sets. */
.joi-guide section:is([id*="quiz"], [id="practice"], :has(> h2[id$="quiz"])) > .joi-guide-panel:has(> details) {
    border: 1px solid var(--joi-guide-line);
    border-radius: .375rem;
    padding: .8rem 1rem;
    background-color: #fff;
}

/* Native FAQ disclosures use the same question row in every Guide series. */
.joi-guide-faq-list {
    margin-block: 1rem 2rem;
    border-block-start: 1px solid var(--joi-guide-line);
}
.joi-guide-faq-item {
    margin: 0;
    border-block-end: 1px solid var(--joi-guide-line);
}
.joi-guide-faq-question {
    position: relative;
    display: block;
    padding: 1rem 2.3rem 1rem .25rem;
    color: var(--joi-guide-ink);
    font-size: 1.05rem;
    font-weight: 650;
    line-height: 1.55;
    cursor: pointer;
    list-style: none;
}
.joi-guide-faq-question::-webkit-details-marker { display: none; }
.joi-guide-faq-question > h3 { margin: 0; color: inherit; font: inherit; }
.joi-guide-faq-question::after {
    position: absolute;
    top: 1.35rem;
    inset-inline-end: .55rem;
    width: .55rem;
    height: .55rem;
    border: solid var(--joi-guide-accent-ink);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    content: "";
}
.joi-guide-faq-item[open] > .joi-guide-faq-question::after {
    top: 1.58rem;
    transform: rotate(225deg);
}
.joi-guide-faq-question:hover { color: var(--joi-guide-accent-ink); }
.joi-guide-faq-question:focus-visible { outline-offset: -2px; }
.joi-guide-faq-answer { padding: 0 .25rem 1rem; color: var(--joi-guide-text); }
.joi-guide-faq-answer > :first-child { margin-top: 0; }
.joi-guide-faq-answer > :last-child { margin-bottom: 0; }

/* Teacher profiles retain each series' portrait crop and card spacing. */
.joi-guide .joi-guide-row:has(> article.photo-card) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 20px;
    margin: 0 0 2em;
    align-items: stretch;
}
.joi-guide .joi-guide-row.joi-guide-gap-before:has(> article.photo-card) {
    gap: 18px;
    margin: 1.2em 0 0;
}
.joi-guide article.photo-card {
    margin: 0;
    padding: 18px;
    border: 1px solid var(--joi-guide-line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 8px rgb(33 31 33 / 15%);
}
.joi-guide article.photo-card:has(.joi-guide-portrait-inset) {
    box-shadow: 0 2px 6px rgb(0 0 0 / 3%);
}
.joi-guide article.photo-card .joi-guide-figure {
    max-width: none;
    margin: 0 0 10px;
    text-align: center;
}
.joi-guide article.photo-card .joi-guide-portrait-frame {
    width: min(100%, 180px);
    aspect-ratio: 1;
    margin: 0 auto;
    border-radius: 10px;
    background: #f8f8f8;
}
.joi-guide article.photo-card .joi-guide-portrait-close { box-shadow: 0 1px 3px rgb(0 0 0 / 6%); }
.joi-guide article.photo-card .joi-guide-portrait-inset { box-shadow: 0 1px 3px rgb(0 0 0 / 4%); }
.joi-guide article.photo-card img.joi-guide-portrait { height: 100%; object-position: center; }
.joi-guide article.photo-card .joi-guide-portrait-close img { object-position: 50% 36%; }
.joi-guide article.photo-card .joi-guide-portrait-inset img { object-position: 50% 34%; }
.joi-guide article.photo-card .joi-guide-portrait-close img.joi-guide-portrait-low { object-position: 50% 40%; }
.joi-guide article.photo-card h3 {
    margin: .2em 0;
    color: var(--joi-guide-ink);
    font-size: 1.1em;
    font-weight: 700;
    text-align: start;
}
.joi-guide article.photo-card ul {
    margin: .4em 0;
    padding-inline-start: 1.2em;
    color: var(--joi-guide-text);
    font-size: .95em;
    line-height: 1.6;
    list-style: disc outside;
}
.joi-guide article.photo-card.joi-guide-column ul { margin-bottom: 10px; }
.joi-guide article.photo-card:has(> .joi-guide-teacher-card-link) {
    display: flex;
    padding: 0;
}
.joi-guide article.photo-card > .joi-guide-teacher-card-link {
    display: block;
    flex: 1;
    min-width: 0;
    padding: 18px;
    border-radius: inherit;
    color: inherit;
    text-decoration: none;
}
.joi-guide article.photo-card.joi-guide-column > .joi-guide-teacher-card-link {
    display: flex;
    flex-direction: column;
}
.joi-guide article.photo-card:has(> .joi-guide-teacher-card-link:hover) { border-color: var(--joi-guide-accent-ink); }
.joi-guide article.photo-card > .joi-guide-teacher-card-link:focus-visible {
    outline: 3px solid var(--joi-guide-accent-ink);
    outline-offset: 2px;
}

/* Keep excerpts brief without cutting through a line of text. */
.joi-guide-related-list:not(.joi-guide-related-list--compact) .joi-guide-related-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin: 0 .85rem .9rem;
    padding: 0;
}
/* Progressive enhancement replaces the native fallback with a centered action. */
.joi-guide-related-show-more,
.joi-guide-related-more > summary {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 1.25rem auto;
    padding: .65rem 1.15rem;
    border: 1px solid var(--joi-guide-line);
    border-radius: .3rem;
    background: #fff;
    color: var(--joi-guide-ink);
    font: inherit;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}
.joi-guide-related-show-more:hover,
.joi-guide-related-more > summary:hover { background: #f5f5f5; border-color: #aaa; }
.joi-guide-related-show-more:focus-visible,
.joi-guide-related-more > summary:focus-visible { outline: 2px solid var(--joi-guide-ink); outline-offset: 3px; }
.joi-guide-related-show-more[hidden], .joi-guide-related-item[hidden] { display: none; }
.joi-guide-related-more > summary .joi-guide-related-collapse,
.joi-guide-related-more[open] > summary .joi-guide-related-expand { display: none; }
.joi-guide-related-more[open] > summary .joi-guide-related-collapse { display: inline; }
