/*
 * cf-ertrion / assets/theme.css
 * Shared defaults and fallback layouts for class-free editorial content.
 *
 * Colour: every text/background pair is written as literal hex in one rule so
 * the validator's contrast probe can measure it. Layout uses logical
 * properties only, so the page stays correct when dir="rtl".
 *
 * Cream and forest are the two grounds; controls follow the surrounding
 * surface for their focus ring, including those with a contrasting fill.
 */

/* 1. Tokens and page root ------------------------------------------------ */

.tpl-cf-ertrion-root {
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --space-6: 48px;
    --space-8: 64px;
    --space-12: 96px;
    --gutter: 16px;
    --section-pad: 32px;
    --grid-gap: 24px;
    --radius-control: 8px;
    --radius-card: 14px;
    --shadow-rest: 0 12px 32px -12px rgb(43 29 20 / 0.24);
    --shadow-lift: 0 20px 40px -16px rgb(43 29 20 / 0.34);
    --link-ink: #6B461B;
    --link-hover: #2B1D14;
    --focus-ink: #6B461B;
    --duration: 0.25s;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --font-heading: Georgia, "Times New Roman", Times, serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Code", "Liberation Mono", Menlo, Consolas, monospace;
    --measure: 44rem;

    margin: 0;
    min-block-size: 100vh;
    min-block-size: 100dvh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0;
    color: #2B1D14;
    background-color: #F3EEE4;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.tpl-cf-ertrion-root *,
.tpl-cf-ertrion-root *::before,
.tpl-cf-ertrion-root *::after {
    box-sizing: border-box;
}

.tpl-cf-ertrion-root ::selection {
    color: #2B1D14;
    background-color: #C9A86A;
}

.tpl-cf-ertrion-header,
.tpl-cf-ertrion-footer,
.tpl-cf-ertrion-slides,
.tpl-cf-ertrion-story-header,
.tpl-cf-ertrion-author-band {
    --link-ink: #F3EEE4;
    --link-hover: #C9A86A;
    --focus-ink: #C9A86A;
}

.tpl-cf-ertrion-mega {
    --link-ink: #6B461B;
    --link-hover: #2B1D14;
    --focus-ink: #6B461B;
}

/* Visited links keep the same palette so component and inline links agree. */
.tpl-cf-ertrion-root :where(a:link, a:visited) {
    color: var(--link-ink);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
    transition: color var(--duration) var(--ease), background-color var(--duration) var(--ease), border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.tpl-cf-ertrion-root :where(a:any-link:hover) {
    color: var(--link-hover);
    text-decoration-line: underline;
}

.tpl-cf-ertrion-root :where(a:any-link):active {
    text-decoration-line: underline;
    text-decoration-thickness: 2px;
}

.tpl-cf-ertrion-root :where(a:any-link, button, summary, input, select, textarea):focus-visible {
    outline: 2px solid var(--focus-ink);
    outline-offset: 3px;
    border-radius: 4px;
}

.tpl-cf-ertrion-root :where(button) {
    color: #F3EEE4;
    background-color: #1E2B24;
    transition: color var(--duration) var(--ease), background-color var(--duration) var(--ease);
}

.tpl-cf-ertrion-root :where(button:not(:disabled):is(:hover, :active)) {
    color: #2B1D14;
    background-color: #C9A86A;
}

.tpl-cf-ertrion-container {
    inline-size: 100%;
    max-inline-size: 1200px;
    margin-inline: auto;
}

/* 2. Skip link ----------------------------------------------------------- */

.tpl-cf-ertrion-skip-link {
    position: absolute;
    inset-block-start: var(--space-2);
    inset-inline-start: var(--space-2);
    z-index: 10;
    display: inline-flex;
    align-items: center;
    min-block-size: 44px;
    padding-inline: var(--space-2);
    font-weight: 700;
    text-decoration: none;
    color: #2B1D14;
    background-color: #C9A86A;
    border-radius: var(--radius-control);
    box-shadow: 0 12px 32px -12px rgb(16 26 21 / 0.7);
    transform: translateY(-200%);
    transition: transform var(--duration) var(--ease);
}

.tpl-cf-ertrion-skip-link:focus,
.tpl-cf-ertrion-skip-link:hover,
.tpl-cf-ertrion-skip-link:active {
    color: #2B1D14;
    background-color: #C9A86A;
    transform: translateY(0);
}

.tpl-cf-ertrion-skip-link:focus-visible {
    outline: 2px solid #6B461B;
    outline-offset: 3px;
    /* The skip link can sit over the forest masthead or a cream surface. */
    box-shadow: 0 0 0 7px #C9A86A;
}

/* Shared fixed and collection surface */

.tpl-cf-ertrion-main {
    position: relative;
    flex: 1 0 auto;
    padding-block: var(--section-pad);
    padding-inline: var(--gutter);
    color: #2B1D14;
    background-color: #F3EEE4;
}

.tpl-cf-ertrion-main:focus {
    outline: none;
}

.tpl-cf-ertrion-empty {
    padding-block: var(--space-8);
    padding-inline: var(--space-3);
    text-align: center;
    color: #2B1D14;
    background-color: #F3EEE4;
    border: 1px solid #C9A86A;
    border-radius: var(--radius-card);
}

.tpl-cf-ertrion-empty-title {
    margin: 0;
    font: 500 clamp(2rem, 1.4rem + 2.5vw, 3rem)/1.1 var(--font-heading);
    overflow-wrap: anywhere;
}

.tpl-cf-ertrion-empty-text {
    margin-block: var(--space-2) 0;
    color: #61584E;
}

.tpl-cf-ertrion-empty-label {
    margin-block: 0 var(--space-2);
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6B461B;
}

/* 8. Article page ---------------------------------------------------------
   One reading column (--measure) centred in a three-track grid. The outer
   tracks collapse to zero until the container is wider than the measure, so
   image paragraphs and code blocks break out only where there is room. */

.tpl-cf-ertrion-article {
    display: grid;
    grid-template-columns: [full-start] minmax(0, 1fr) [content-start] minmax(0, var(--measure)) [content-end] minmax(0, 1fr) [full-end];
    max-inline-size: 60rem;
    margin-inline: auto;
}

.tpl-cf-ertrion-article > * {
    grid-column: content;
    min-inline-size: 0;
}

/* 9. Article body (class-free Markdown HTML) ------------------------------ */

.tpl-cf-ertrion-prose {
    grid-column: full;
    display: grid;
    grid-template-columns: [full-start] minmax(0, 1fr) [content-start] minmax(0, var(--measure)) [content-end] minmax(0, 1fr) [full-end];
    font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
    line-height: 1.75;
    overflow-wrap: anywhere;
    color: #2B1D14;
}

.tpl-cf-ertrion-prose > * {
    grid-column: content;
    min-inline-size: 0;
    margin-block: 0;
}

.tpl-cf-ertrion-prose > * + * {
    margin-block-start: var(--space-3);
}

.tpl-cf-ertrion-prose > p:has(> img),
.tpl-cf-ertrion-prose > pre {
    grid-column: full;
}

.tpl-cf-ertrion-prose > :is(h2, h3, h4, h5, h6) + * {
    margin-block-start: var(--space-2);
}

.tpl-cf-ertrion-prose > h2 {
    position: relative;
    margin-block-start: var(--space-8);
    padding-block-start: var(--space-3);
    font-family: var(--font-heading);
    font-size: clamp(1.625rem, 1.35rem + 1.1vw, 2.125rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: #2B1D14;
}

/* Decorative accent bar above each section heading. */
.tpl-cf-ertrion-prose > h2::before {
    content: "";
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
    inline-size: 48px;
    block-size: 2px;
    border-radius: 2px;
    background-color: #C9A86A;
}

.tpl-cf-ertrion-prose > h3 {
    margin-block-start: var(--space-6);
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: #2B1D14;
}

.tpl-cf-ertrion-prose > :is(h4, h5, h6) {
    margin-block-start: var(--space-4);
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.01em;
    color: #2B1D14;
}

.tpl-cf-ertrion-prose strong {
    font-weight: 700;
    color: #2B1D14;
}

.tpl-cf-ertrion-prose a {
    text-decoration-line: underline;
    text-decoration-color: currentColor;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.22em;
    color: var(--link-ink);
}

.tpl-cf-ertrion-prose a:is(:hover, :active) {
    text-decoration-thickness: 2px;
    color: var(--link-hover);
}

/* Outbound marker on absolute links; the alternative text keeps it silent. */
.tpl-cf-ertrion-prose a[href^="http"]::after {
    content: "\2197" / "";
    display: inline-block;
    margin-inline-start: 0.15em;
}

.tpl-cf-ertrion-prose :is(ul, ol) {
    padding-inline-start: var(--space-3);
}

.tpl-cf-ertrion-prose li + li,
.tpl-cf-ertrion-prose li > :is(ul, ol, p + p) {
    margin-block-start: var(--space-1);
}

.tpl-cf-ertrion-prose li > p {
    margin-block: 0;
}

.tpl-cf-ertrion-prose li::marker {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #6B461B;
}

.tpl-cf-ertrion-prose img {
    display: block;
    max-inline-size: 100%;
    block-size: auto;
    margin-inline: auto;
    background-color: #D5DBBD;
    border: 1px solid #C9A86A;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-rest);
}

.tpl-cf-ertrion-prose > p:has(> img),
.tpl-cf-ertrion-prose > p:has(> img) + :not(h2, h3) {
    margin-block-start: var(--space-6);
}

.tpl-cf-ertrion-prose blockquote {
    position: relative;
    isolation: isolate;
    margin-inline: 0;
    padding-block: var(--space-3);
    padding-inline: var(--space-4) var(--space-3);
    font-family: var(--font-heading);
    font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
    font-style: italic;
    line-height: 1.55;
    color: #2B1D14;
    background-color: #F3EEE4;
    border-inline-start: 3px solid #C9A86A;
    border-start-end-radius: var(--radius-card);
    border-end-end-radius: var(--radius-card);
}

/* Decorative opening quotation mark, faded behind the quoted text. */
.tpl-cf-ertrion-prose blockquote::before {
    content: "\201C" / "";
    position: absolute;
    inset-block-start: -0.12em;
    inset-inline-end: var(--space-2);
    z-index: -1;
    font-family: var(--font-heading);
    font-size: 6rem;
    font-style: normal;
    line-height: 1;
    color: rgb(201 168 106 / 0.28);
    pointer-events: none;
}

.tpl-cf-ertrion-prose blockquote > * {
    margin-block: 0;
}

.tpl-cf-ertrion-prose blockquote > * + * {
    margin-block-start: var(--space-2);
}

.tpl-cf-ertrion-prose code {
    padding-block: 0.1em;
    padding-inline: 0.35em;
    font-family: var(--font-mono);
    font-size: max(1rem, 0.9em);
    color: #2B1D14;
    background-color: #E9DFCC;
    border: 1px solid #C9A86A;
    border-radius: 6px;
}

.tpl-cf-ertrion-prose pre {
    overflow-x: auto;
    padding: var(--space-3);
    font-size: 1rem;
    line-height: 1.6;
    tab-size: 4;
    color: #2B1D14;
    background-color: #E9DFCC;
    border: 1px solid #C9A86A;
    border-radius: var(--radius-card);
}

/* Scrollable code and tables can be native keyboard stops. */
.tpl-cf-ertrion-prose :is(pre, table):focus-visible {
    outline: 2px solid var(--focus-ink);
    outline-offset: 3px;
}

.tpl-cf-ertrion-prose pre code {
    padding: 0;
    font-size: inherit;
    background: none;
    border: 0;
    border-radius: 0;
}

.tpl-cf-ertrion-prose table {
    display: block;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 1rem;
}

.tpl-cf-ertrion-prose :is(th, td) {
    padding-block: var(--space-1);
    padding-inline: var(--space-2);
    text-align: start;
    border: 1px solid #C9A86A;
}

.tpl-cf-ertrion-prose th {
    color: #2B1D14;
    background-color: #E9DFCC;
}

/* Local backgrounds cover each edge cue at its scroll boundary. The native
   table remains the scroller, including inside a quote or list container. */
.tpl-cf-ertrion-prose table {
    inline-size: 100%;
    min-inline-size: 0;
    max-inline-size: 100%;
    direction: inherit;
    color: #2B1D14;
    background-color: #F3EEE4;
    background-image:
        linear-gradient(90deg, #F3EEE4 30%, transparent),
        linear-gradient(270deg, #F3EEE4 30%, transparent),
        linear-gradient(90deg, rgb(107 70 27 / 0.4), transparent),
        linear-gradient(270deg, rgb(107 70 27 / 0.4), transparent);
    background-position: 0 0, 100% 0, 0 0, 100% 0;
    background-size: 32px 100%, 32px 100%, 8px 100%, 8px 100%;
    background-repeat: no-repeat;
    background-attachment: local, local, scroll, scroll;
}

.tpl-cf-ertrion-prose :is(th, td),
.tpl-cf-ertrion-prose :is(th, td) * {
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.tpl-cf-ertrion-prose :is(th, td) a {
    display: inline-flex;
    align-items: center;
    min-inline-size: 44px;
    min-block-size: 44px;
}

.tpl-cf-ertrion-prose :is(th, td)[data-align="none"],
.tpl-cf-ertrion-prose :is(th, td)[data-align="start"] {
    text-align: start;
}

.tpl-cf-ertrion-prose :is(th, td)[data-align="end"] {
    text-align: end;
}

.tpl-cf-ertrion-prose :is(th, td)[data-align="center"] {
    text-align: center;
}

/* The renderer supplies the localized paragraph outside the table scroller. */
.tpl-cf-ertrion-prose p[data-role="table-overflow"] {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2);
    font-family: var(--font-body);
    font-size: 1rem;
    font-style: normal;
    line-height: 1.6;
    color: #61584E;
    background-color: #F3EEE4;
    border-inline-start: 2px solid #C9A86A;
    border-radius: var(--radius-control);
}

.tpl-cf-ertrion-prose p[data-role="table-overflow"]::before {
    content: "";
    flex: none;
    inline-size: 16px;
    block-size: 8px;
    background-color: #6B461B;
    clip-path: polygon(0 50%, 25% 0, 25% 38%, 75% 38%, 75% 0, 100% 50%, 75% 100%, 75% 62%, 25% 62%, 25% 100%);
}

.tpl-cf-ertrion-prose p[data-role="table-overflow"] + table {
    margin-block-start: var(--space-1);
}

.tpl-cf-ertrion-prose p[data-role="table-overflow"] + table:focus-visible {
    outline: 2px solid var(--focus-ink);
    outline-offset: 3px;
}

/* 10. Collection page (category, author and catalog) ---------------------- */

.tpl-cf-ertrion-collection-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    max-inline-size: 48rem;
    margin-block-end: var(--space-6);
}

.tpl-cf-ertrion-collection-kicker {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6B461B;
}

/* Gold diamond before the kicker. */
.tpl-cf-ertrion-collection-kicker::before {
    content: "";
    flex: none;
    inline-size: 8px;
    block-size: 8px;
    background-color: #C9A86A;
    transform: rotate(45deg);
}

.tpl-cf-ertrion-collection-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.tpl-cf-ertrion-collection-deck {
    margin: 0;
    max-inline-size: 60ch;
    font-size: 1.125rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
    color: #61584E;
}

.tpl-cf-ertrion-collection-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--grid-gap);
    margin: 0;
    padding: 0;
    list-style: none;
}

.tpl-cf-ertrion-collection-list:empty {
    display: none;
}

/* The fallback collection model wraps class-free cards in its own list item. */

.tpl-cf-ertrion-collection-item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    min-inline-size: 0;
    margin: 0;
    padding: var(--space-3);
    overflow-wrap: anywhere;
    color: #2B1D14;
    background-color: #F3EEE4;
    border: 1px solid #C9A86A;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-rest);
    transition: transform var(--duration) var(--ease), border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

/* Decorative accent line that widens when the card is hovered or focused. */
.tpl-cf-ertrion-collection-item::before {
    content: "";
    position: absolute;
    inset-block-start: -1px;
    inset-inline: var(--space-3);
    block-size: 2px;
    border-radius: 2px;
    background-color: #C9A86A;
    opacity: 0.75;
    transform: scaleX(0.2);
    transform-origin: 50% 50%;
    transition: transform var(--duration) var(--ease), opacity var(--duration) var(--ease);
    pointer-events: none;
}

.tpl-cf-ertrion-collection-item:hover,
.tpl-cf-ertrion-collection-item:focus-within {
    transform: translateY(-4px);
    border-color: #6B461B;
    box-shadow: var(--shadow-lift);
}

.tpl-cf-ertrion-collection-item:hover::before,
.tpl-cf-ertrion-collection-item:focus-within::before {
    opacity: 1;
    transform: scaleX(1);
}

.tpl-cf-ertrion-collection-item > :where(article, div, section) {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    gap: var(--space-2);
    min-inline-size: 0;
}

/* The last line of a card (date and byline) settles on the card's lower edge,
   so cards of one row keep their metadata aligned. */
.tpl-cf-ertrion-collection-item > :where(article, div, section) > :last-child:not(:first-child) {
    margin-block-start: auto;
}

.tpl-cf-ertrion-collection-item :where(h2, h3) {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

.tpl-cf-ertrion-collection-item :where(h2, h3) a {
    display: flex;
    align-items: center;
    min-block-size: 44px;
    text-decoration: none;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.18em;
    color: #2B1D14;
    border-radius: var(--radius-control);
}

.tpl-cf-ertrion-collection-item :where(h2, h3) a:is(:hover, :active) {
    text-decoration-line: underline;
    color: #6B461B;
}

.tpl-cf-ertrion-collection-item :where(p, ul, ol) {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #61584E;
}

.tpl-cf-ertrion-collection-item time {
    font-variant-numeric: tabular-nums;
    color: #61584E;
}

.tpl-cf-ertrion-collection-item img {
    order: -1;
    display: block;
    inline-size: 100%;
    block-size: auto;
    aspect-ratio: 1200 / 630;
    object-fit: cover;
    background-color: #D5DBBD;
    border-radius: var(--radius-control);
}

.tpl-cf-ertrion-collection-item :where(p, a):has(> img:only-child) {
    order: -1;
}

/* 12. Pagination (class-free fragment) ------------------------------------ */

.tpl-cf-ertrion-pagination {
    margin-block-start: var(--space-6);
    padding-block-start: var(--space-4);
    font-size: 1rem;
    color: #61584E;
    border-block-start: 1px solid #C9A86A;
}

.tpl-cf-ertrion-pagination:empty {
    display: none;
}

.tpl-cf-ertrion-pagination :where(nav, ul, ol, p) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.tpl-cf-ertrion-pagination a,
.tpl-cf-ertrion-pagination [aria-current] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    min-block-size: 44px;
    min-inline-size: 44px;
    padding-inline: var(--space-2);
    font-weight: 600;
    text-decoration: none;
    color: #2B1D14;
    background-color: #F3EEE4;
    border: 1px solid #C9A86A;
    border-radius: var(--radius-control);
    transition: color var(--duration) var(--ease), background-color var(--duration) var(--ease), border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.tpl-cf-ertrion-pagination a:is(:hover, :active) {
    color: #2B1D14;
    background-color: #C9A86A;
    border-color: #C9A86A;
}

/* The current page reads as a label with an accent underline, never as a
   bordered control, so it cannot be mistaken for a focused link. */
.tpl-cf-ertrion-pagination [aria-current] {
    color: #6B461B;
    background-color: #F3EEE4;
    border-color: #F3EEE4;
    box-shadow: inset 0 -2px 0 0 #6B461B;
    border-end-start-radius: 0;
    border-end-end-radius: 0;
}

/* Direction arrows; the alternative text keeps them silent. */
.tpl-cf-ertrion-pagination a[rel~="prev"]::before {
    content: "\2190" / "";
}

.tpl-cf-ertrion-pagination a[rel~="next"]::after {
    content: "\2192" / "";
}

.tpl-cf-ertrion-pagination:dir(rtl) a[rel~="prev"]::before {
    content: "\2192" / "";
}

.tpl-cf-ertrion-pagination:dir(rtl) a[rel~="next"]::after {
    content: "\2190" / "";
}

/* "Next" sits at the inline end whether or not a "previous" link precedes it. */
.tpl-cf-ertrion-pagination a[rel~="next"],
.tpl-cf-ertrion-pagination li:has(> a[rel~="next"]) {
    margin-inline-start: auto;
}

/* 13. Tablet: 640px to 1024px --------------------------------------------- */

@media (min-width: 640px) {
    .tpl-cf-ertrion-root {
        --gutter: 32px;
        --section-pad: 48px;
        --grid-gap: 32px;
    }

    .tpl-cf-ertrion-collection-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tpl-cf-ertrion-collection-item {
        padding: var(--space-4);
    }

    .tpl-cf-ertrion-collection-item::before {
        inset-inline: var(--space-4);
    }
}

/* 14. Desktop: above 1024px ----------------------------------------------- */

@media (min-width: 1025px) {
    .tpl-cf-ertrion-root {
        --gutter: 48px;
        --section-pad: 80px;
    }

    .tpl-cf-ertrion-collection-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tpl-cf-ertrion-collection-header {
        margin-block-end: var(--space-8);
    }

}

/* 15. Reduced motion: keep state changes, drop every translation --------- */

@media (prefers-reduced-motion: reduce) {
    .tpl-cf-ertrion-skip-link,
    .tpl-cf-ertrion-root :where(button) {
        transition: none;
    }

    .tpl-cf-ertrion-collection-item {
        transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
    }

    .tpl-cf-ertrion-collection-item:hover,
    .tpl-cf-ertrion-collection-item:focus-within {
        transform: none;
    }

    .tpl-cf-ertrion-collection-item::before,
    .tpl-cf-ertrion-collection-item:hover::before,
    .tpl-cf-ertrion-collection-item:focus-within::before {
        transform: none;
        transition: opacity var(--duration) var(--ease);
    }
}

/* Remove Latin tracking and italics when the reader uses RTL. */

.tpl-cf-ertrion-root:dir(rtl) :where(h1, h2, h3, h4, h5, h6, p, a, li, blockquote, span) {
    letter-spacing: 0;
}

.tpl-cf-ertrion-root:dir(rtl) .tpl-cf-ertrion-collection-kicker {
    unicode-bidi: plaintext;
}

.tpl-cf-ertrion-root:dir(rtl) .tpl-cf-ertrion-prose blockquote {
    font-style: normal;
}
