/* The theme control in the header (Kalima). Colors come from brand roles; both palettes live in brand/dist/tokens.css. */
.nav__theme {
  inline-size: 2.25rem; block-size: 2.25rem; display: inline-grid; place-items: center;
  border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface);
  color: var(--color-text); font-size: 1rem; line-height: 1; cursor: pointer;
  transition: border-color var(--duration-quick) var(--ease-move);
}
.nav__theme:hover { border-color: var(--color-border-strong); }
.nav__theme:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .nav__theme { transition: none; } }

/* A section's head (21st.dev rebuild, 5 Nov): a small label with a line, a bold title, a lead. Home, course and lesson. */
.section-head { display: grid; gap: 0.8rem; max-inline-size: 42rem; margin-block-end: clamp(2rem, 4vw, 3rem); }
.section-head__label { margin: 0; color: var(--color-text-brand);
  font: 600 12px / 1.3 var(--type-label-family); letter-spacing: 0.14em; text-transform: uppercase; }
:lang(ar) .section-head__label { letter-spacing: 0; font-size: 14px; }
.section-head__title { margin: 0; color: var(--color-text); text-wrap: balance;
  font: 700 clamp(28px, 3.7vw, 46px) / 1.08 var(--type-display-family); letter-spacing: -0.025em; }
:lang(ar) .section-head__title { letter-spacing: 0; line-height: 1.3; }
.section-head__lead { margin: 0; max-inline-size: 38rem; color: var(--color-text-muted); font: 400 18px / 1.6 var(--type-body-family); }

/* The 404 page (Sky, 5 Nov): a big outlined code over a soft blue light, what happened, and two ways on. */
body[data-page="notfound"] #main { max-width: 74rem; padding-inline: clamp(1rem, 3vw, 1.5rem); }
.lost { position: relative; isolation: isolate; overflow: hidden; display: grid; justify-items: center; gap: 1rem; margin-block: 0.75rem clamp(3rem, 6vw, 5rem);
  padding: clamp(3.5rem, 9vw, 7rem) clamp(1.25rem, 4vw, 3rem); text-align: center; border: 1px solid var(--color-border); border-radius: 28px; background: var(--color-surface); }
.lost::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(34rem 20rem at 50% 0%, color-mix(in srgb, var(--color-accent) 16%, transparent), transparent 70%); }
.lost__code { margin: 0; font: 800 clamp(96px, 18vw, 200px) / 0.9 var(--type-display-family); letter-spacing: -0.06em;
  color: transparent; -webkit-text-stroke: 2px color-mix(in srgb, var(--color-accent) 55%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--color-accent) 18%, transparent), transparent 85%); -webkit-background-clip: text; background-clip: text; }
.lost__title { margin: 0; color: var(--color-text); font: 700 clamp(28px, 3.6vw, 44px) / 1.1 var(--type-display-family); letter-spacing: -0.025em; text-wrap: balance; }
:lang(ar) .lost__title { letter-spacing: 0; line-height: 1.35; }
.lost__lead { margin: 0; max-inline-size: 34rem; color: var(--color-text-muted); font: 400 17px / 1.6 var(--type-body-family); }
.lost__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.65rem; margin-block-start: 0.5rem; }

/* No one-word last lines in running text (Chrome, Safari; others ignore it). */
p, dd, li { text-wrap: pretty; }

/* Facts as small chips with an icon (a course's lessons and minutes): shared by the home's track card and the course. */
.course-facts { list-style: none; margin: 0.25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.course-facts__item { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.8rem; border-radius: 10px;
  border: 1px solid var(--color-border); background: color-mix(in srgb, var(--color-surface) 80%, transparent);
  color: var(--color-text-muted); font: 500 13.5px / 1.2 var(--type-label-family); }
.course-facts__item svg { inline-size: 16px; block-size: 16px; flex: none; color: var(--color-text-brand); }
.course-facts__item .count { color: var(--color-text); font-weight: 700; }

/* Orism's accounts in the footer's brand column (ravikatiyar162's Social Tooltip). */
.foot-socials { margin-block-start: 1.25rem; padding-block-end: 1rem; }
:lang(ar) .section-head__label { text-transform: none; letter-spacing: 0; } /* uppercase only turned the Latin words into capitals (June, 7 Nov) */
