/* The printable cards for home (site/cards/, written by `AssetGenerator cards`). Loaded after site.css: same colors, fonts, header
   and footer; a track's color comes from .t-ll / .t-ex / .t-rd. A unit page prints as one sheet: the header, footer and
   navigation are hidden on paper. No scripts. */
.t-ll { --c: var(--ll); --c-text: var(--ll-text); --c-soft: var(--ll-soft); }
.t-ex { --c: var(--ex); --c-text: var(--ex-text); --c-soft: var(--ex-soft); }
.t-rd { --c: var(--rd); --c-text: var(--rd-text); --c-soft: var(--rd-soft); }

/* the title band of the index pages */
.page-hero { background: linear-gradient(135deg, #EEE4FB 0%, #E4E9FB 45%, #D8EFFB 100%); border-bottom: 1px solid var(--line); }
.page-hero-in { max-width: var(--wrap); margin-inline: auto; padding: 48px 24px 44px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 32px; }
.page-hero h1 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -.01em; }
.page-hero .ar-title { margin-top: 4px; color: var(--muted); font-size: 1.35rem; font-weight: 700; }
.page-hero .kicker { display: inline-block; color: var(--purple); font-weight: 700; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 10px; }
.page-hero .kicker [lang=ar] { letter-spacing: 0; }
.page-hero .intro { margin-top: 18px; max-width: 40em; color: var(--muted); }
.page-hero .intro + .intro { margin-top: 8px; }
.page-hero img { width: 170px; filter: drop-shadow(0 14px 20px rgba(36, 22, 63, .2)); }
.facts { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { background: rgba(255, 255, 255, .85); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .88rem; font-weight: 500; }
.facts li span { color: var(--muted); }

.cards { max-width: var(--wrap); margin-inline: auto; padding: 8px 24px 0; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 26px 0 0; font-size: .92rem; color: var(--muted); }
.crumbs a { font-weight: 500; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* a track on the index: its mascot, names, ages and its units */
.track-block { margin-top: 48px; scroll-margin-top: 84px; }
.track-head { display: flex; align-items: center; gap: 18px; background: #fff; border: 1px solid var(--line); border-top: 6px solid var(--c); border-radius: var(--radius); padding: 16px 24px; box-shadow: var(--shadow); }
.track-head img { width: 76px; height: 76px; object-fit: contain; background: var(--c-soft); border-radius: 20px; padding: 6px; flex: none; }
.track-head h2 { font-size: 1.5rem; }
.track-head h2 a { color: inherit; text-decoration: none; }
.track-head h2 a:hover { color: var(--c-text); }
.track-head p { color: var(--muted); font-size: .95rem; }
.track-head .count { margin-inline-start: auto; background: var(--c-soft); color: var(--c-text); font-weight: 700; font-size: .88rem; padding: 6px 14px; border-radius: 999px; white-space: nowrap; }
.units { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.units a { position: relative; display: flex; flex-direction: column; gap: 2px; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; padding-inline-start: 62px; text-decoration: none; color: var(--ink); transition: box-shadow .2s, border-color .2s, transform .2s; }
.units a:hover { border-color: var(--c); box-shadow: var(--shadow); transform: translateY(-2px); }
.units .n { position: absolute; inset-inline-start: 16px; top: 16px; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--c-soft); color: var(--c-text); font-weight: 700; font-size: .95rem; }
.units b { font-size: 1.04rem; line-height: 1.3; }
.units [lang=ar] { color: var(--muted); font-size: .95rem; }
.units [lang=ar], .sheet-title p[lang=ar], .page-hero .ar-title { text-align: left; }
.units small { color: var(--muted); font-size: .8rem; margin-top: 4px; }

/* a unit: one sheet to print */
.sheet { position: relative; margin-top: 18px; background: #fff; border: 1px solid var(--line); border-top: 8px solid var(--c); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 36px 32px; overflow: hidden; }
.sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.mark img { width: 34px; height: 34px; border-radius: 10px; }
.mark span { color: var(--muted); font-weight: 500; }
.chip { display: inline-block; background: var(--c-soft); color: var(--c-text); font-weight: 700; font-size: .85rem; padding: 4px 12px; border-radius: 999px; }
.sheet-title { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px; margin-top: 20px; padding-bottom: 20px; border-bottom: 1px dashed var(--line); }
.sheet-title h1 { font-size: clamp(30px, 4.4vw, 46px); letter-spacing: -.01em; }
.sheet-title p { margin-top: 4px; font-size: 1.4rem; font-weight: 700; color: var(--c-text); }
.sheet-title img { width: 120px; filter: drop-shadow(0 10px 14px rgba(36, 22, 63, .16)); }
.sheet h2 { font-size: 1.1rem; margin: 22px 0 12px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.sheet h2 [lang=ar] { color: var(--muted); font-weight: 500; }
.words { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.words li { background: var(--c-soft); color: var(--ink); border: 2px solid transparent; border-radius: 14px; padding: 5px 14px; font-weight: 700; font-size: 1.12rem; line-height: 1.4; }
.texts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.texts li { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; font-weight: 500; font-size: .95rem; }
.texts li small { display: block; color: var(--muted); font-size: .78rem; text-transform: capitalize; }
.tips { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 24px; }
.tips section { background: var(--bg); border-radius: 20px; padding: 6px 22px 18px; scroll-margin-top: 84px; }
.tips section h2 { margin-top: 16px; color: var(--purple); }
.tips ol { list-style: none; padding: 0; margin: 0; counter-reset: tip; display: grid; gap: 12px; }
.tips li { position: relative; padding-inline-start: 42px; counter-increment: tip; min-height: 30px; }
.tips li::before { content: counter(tip); position: absolute; inset-inline-start: 0; top: 0; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 700; font-size: .9rem; line-height: 1; }
.tips section[lang=ar] li::before { content: counter(tip, arabic-indic); }
.sheet-foot { margin-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; color: var(--muted); font-size: .85rem; }

.print-hint { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: .92rem; }
.print-hint span { display: inline-flex; align-items: center; gap: 8px; }
.print-hint svg { width: 18px; height: 18px; color: var(--purple); flex: none; }
.pager { margin-top: 26px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; }
.pager a { display: flex; flex-direction: column; justify-content: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 12px 18px; text-decoration: none; color: var(--ink); font-weight: 700; line-height: 1.35; }
.pager a:hover { border-color: var(--plum); box-shadow: var(--shadow); }
.pager a small { color: var(--muted); font-weight: 500; font-size: .8rem; }
.pager .next { text-align: end; grid-column: 3; }
.pager .all { grid-column: 2; align-items: center; background: var(--soft); border-color: transparent; color: var(--purple); }
.cards + .foot { margin-top: 72px; }

@media (max-width: 720px) {
    .page-hero-in { padding: 34px 16px 30px; grid-template-columns: 1fr; }
    .page-hero img { display: none; }
    .cards { padding-inline: 16px; }
    .track-head { flex-wrap: wrap; padding: 14px 16px; gap: 12px; }
    .track-head img { width: 60px; height: 60px; }
    .track-head .count { margin-inline-start: 0; }
    .sheet { padding: 20px 18px 24px; border-radius: 20px; }
    .sheet-title img { width: 78px; }
    .tips { grid-template-columns: 1fr; }
    .tips section { padding: 4px 16px 16px; }
    .pager { grid-template-columns: 1fr 1fr; }
    .pager .all { grid-column: 1 / -1; grid-row: 1; }
    .pager .prev { grid-column: 1; }
    .pager .next { grid-column: 2; }
}

/* paper: the sheet alone, in ink-friendly colors */
@media print {
    @page { margin: 12mm; }
    body { background: #fff; font-size: 13pt; }
    .bar, .foot, .noprint, .crumbs, .pager, .print-hint, .page-hero img { display: none !important; }
    .cards { max-width: none; padding: 0; }
    .sheet { margin: 0; box-shadow: none; border: 1px solid #bbb; border-top: 6px solid var(--c); border-radius: 16px; padding: 18px 22px; break-inside: avoid; }
    .sheet-title img { width: 90px; }
    .tips { grid-template-columns: 1fr 1fr; gap: 12px; }
    .tips section { background: #fff; border: 1px solid #ddd; break-inside: avoid; }
    .words li { border-color: var(--c); background: #fff; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
