/* Scoped companion pages: keep the existing site chrome and Latin fonts. */
.cotl-site :focus-visible { outline: 3px solid #84312d; outline-offset: 4px; }
.cotl-skip { position: absolute; top: 8px; inset-inline-start: 8px; z-index: 10; padding: 12px 18px; background: #fffdf8; color: #243d27; transform: translateY(-180%); }
.cotl-skip:focus { transform: translateY(0); }
.cotl, .cotl * { min-width: 0; }
.cotl { overflow-wrap: anywhere; }
.cotl [lang="ar"] { font-family: 'Amiri', serif; letter-spacing: normal; line-height: 1.9; text-align: right; }
html[lang="ar"] .cotl { font-family: 'Amiri', serif; }
html[lang="ar"] .cotl h2, html[lang="ar"] .cotl h3 { font-family: 'Amiri', serif; letter-spacing: normal; line-height: 1.5; }
.cotl [lang="en"] { font-family: 'DM Sans', sans-serif; }
.cotl h1[lang="en"], .cotl h3 [lang="en"], .cotl [lang="en"] h3 { font-family: 'Playfair Display', Georgia, serif; }
.cotl h1[lang="en"] { text-align: start; }
.cotl .book-cover { padding: 20px; }
.cotl .cotl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cotl .cotl-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; min-height: 0; }
.cotl .cotl-card:hover { text-decoration: none; border-color: #84312d; }
.cotl .cotl-card h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0; font-size: 1.12rem; }
.cotl .cotl-card h3 span { color: var(--ink); font-size: inherit; }
.cotl .cotl-card h3 [lang="ar"] { font-size: 1.32rem; }
.cotl .cotl-card small { color: #665b54; font-size: .8rem; }
.cotl .cotl-number { align-self: flex-start; font-size: .75rem; }
.cotl-thumbnail { display: block; width: 100%; height: auto; background: #fff; }
.cotl .cotl-card-link { margin-top: auto; padding-top: 8px; font-size: .78rem; font-weight: 700; color: #84312d; }
.cotl-article { max-width: 1040px; }
.cotl-breadcrumb { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; letter-spacing: .06em; }
.cotl-title { padding: 14px 0 8px; }
.cotl-title h1 { font-size: clamp(2.4rem, 8vw, 5.8rem); }
.cotl .cotl-arabic-title { font-size: clamp(2.7rem, 8vw, 5rem); margin: 0; color: #84312d; text-align: start; }
.cotl .cotl-details { font-size: clamp(1rem, 2vw, 1.35rem); }
.cotl-section { margin-top: 42px; }
.cotl-section h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.cotl-video { position: relative; width: 100%; height: 0; padding-bottom: 56.25%; background: #20241e; }
.cotl-play, .cotl-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cotl-play { display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; background: #20241e; }
.cotl-play img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cotl-play-icon { display: grid; place-items: center; z-index: 1; width: 72px; height: 54px; border-radius: 12px; background: #84312d; color: #fff; font-size: 24px; line-height: 1; box-shadow: 0 2px 16px #0006; }
.cotl-play:hover .cotl-play-icon { background: #243d27; }
.cotl-video:focus-within { outline: 3px solid #84312d; outline-offset: 4px; }
.cotl-bilingual { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.cotl-book-text p, .cotl-verbatim { white-space: pre-line; }
.cotl-book-text p { margin-top: 0; }
.cotl-book-text[lang="ar"] { font-size: 1.35rem; }
html[lang="ar"] .cotl-book-text[lang="ar"] { font-size: 1.5rem; }
.cotl-note { font-size: .92rem; color: #554f46; }
.cotl .cotl-note[lang="ar"] { font-size: 1.2rem; }
.cotl-drawing { max-width: 600px; margin: 24px auto; background: white; border: 1px solid var(--line); }
.cotl-drawing img { display: block; width: 100%; height: auto; }
.cotl-steps { padding-inline-start: 1.6rem; }
.cotl-steps li { padding-inline-start: 8px; margin-bottom: 24px; }
.cotl-steps li::marker { color: #84312d; font-weight: 700; }
.cotl .cotl-steps h3 { font-size: 1.4rem; font-family: 'Playfair Display', Georgia, serif; }
.cotl-site .cotl [lang="en"] h3 { font-family: 'Playfair Display', Georgia, serif; letter-spacing: -.035em; line-height: 1.15; }
.cotl-steps p { margin-top: 8px; }
.cotl-palette { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 520px; list-style: none; padding: 0; }
.cotl-palette li { display: flex; flex-direction: column; gap: 8px; }
.cotl-swatch { display: block; width: 100%; height: 64px; border: 1px solid #827e70; }
.cotl-palette code { color: var(--ink); font-size: .78rem; }
.cotl-culture { max-width: 78ch; }
.cotl-reflection { border-block: 1px solid var(--line); padding: 28px 0; }
.cotl-reflection blockquote { margin: 24px 0; padding-inline-start: 22px; border-inline-start: 3px solid #84312d; }
.cotl-reflection blockquote p { font-family: 'Playfair Display', Georgia, serif; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.5; }
.cotl-pagination { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
.cotl-pagination a { padding: 12px 0; text-decoration: underline; text-underline-offset: 4px; }
.cotl-pagination span, .cotl-pagination strong { display: block; }
.cotl-pagination span { font-size: .85rem; }
.cotl-prev { grid-column: 1; grid-row: 1; }
.cotl-next { grid-column: 2; grid-row: 1; text-align: end; }
.cotl-back { grid-column: 1 / -1; grid-row: 2; text-align: center; }
@media (min-width: 640px) { .cotl .cotl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 800px) {
    .cotl .cotl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .cotl-bilingual { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; align-items: start; }
    .cotl-section { margin-top: 56px; }
    .cotl-pagination { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cotl-back { grid-column: 2; grid-row: 1; }
    .cotl-next { grid-column: 3; }
}
@media (min-width: 1100px) { .cotl .cotl-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 400px) {
    .cotl-site .header-inner { gap: 12px; }
    .cotl-site .languages { gap: 2px; }
    .cotl-site .languages a { padding-inline: 5px; }
}

.cotl-credits { margin-block: 24px; padding-block-start: 16px; border-block-start: 1px solid #b89580; }
.cotl-credits p { margin-block: 6px; }
.cotl-credit-label { font-size: .8rem; font-weight: 700; color: #554f46; }
.cotl-credit-names { font-size: 1rem; line-height: 1.7; }
.cotl-credit-names bdi { display: inline-block; }
.cotl-publication { font-size: .9rem; color: #554f46; }
