/*
  THE PUBLIC LIBRARY — www.zorgspace.com/{ar,en,nl}/…

  Layers on /legal/_legal.css (tokens, base type) and /www/_www.css (the ad
  slot, the CTA button), so the library, the landing page and the legal pages
  stay one design system. The pages are generated by
  scripts/build-library.mjs; every class here is one that script writes.

  No script runs on these pages except Google's ad code and /www/ads.js. The
  answers to practice questions open with <details>, which works with
  scripting off, in a reader view, and for a crawler.
*/

/* The app's own faces, from the same immutable /fonts/ files. unicode-range
   means a page downloads only the scripts it actually prints: an English
   lesson fetches no Arabic, an Arabic one fetches Latin only for its Dutch. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('/fonts/inter-latin-400_800.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('/fonts/inter-latin-ext-400_800.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-weight: 400; font-display: swap;
  src: url('/fonts/plexar-arabic-400.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-weight: 600; font-display: swap;
  src: url('/fonts/plexar-arabic-600.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-weight: 700; font-display: swap;
  src: url('/fonts/plexar-arabic-700.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'IBM Plex Sans KR'; font-weight: 400; font-display: swap;
  src: url('/fonts/plexkr-korean-400.woff2') format('woff2');
  unicode-range: U+1100-11FF, U+3000-303F, U+3130-318F, U+A960-A97F, U+AC00-D7A3, U+D7B0-D7FF, U+FF01-FF60; }
@font-face { font-family: 'IBM Plex Sans KR'; font-weight: 700; font-display: swap;
  src: url('/fonts/plexkr-korean-700.woff2') format('woff2');
  unicode-range: U+1100-11FF, U+3000-303F, U+3130-318F, U+A960-A97F, U+AC00-D7A3, U+D7B0-D7FF, U+FF01-FF60; }

body.lx {
  --surface-2: #111d33;
  --line: rgba(255, 255, 255, .09);
  --blue: #1b6ef3;
  --good: #34d399;
  --bad: #f87171;
  --warn: #fbbf24;
  --de: #60a5fa;
  --het: #fb923c;
  padding: 0;
  font-family: 'Inter', 'IBM Plex Sans Arabic', 'IBM Plex Sans KR', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  background:
    radial-gradient(1100px 420px at 50% -120px, rgba(27, 110, 243, .16), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
}
body.lx[dir='rtl'], .lx [dir='rtl'] { line-height: 1.9; }
/* Arabic has no letter-case and no tracking; a spaced Arabic word falls apart. */
.lx:where([lang='ar']) * { letter-spacing: 0 !important; }

.lx-skip {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 5;
  padding: 10px 14px; border-radius: 10px; background: var(--blue); color: #fff; text-decoration: none;
}
.lx-skip:focus { top: 12px; }

.lx a:focus-visible, .lx summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

/* ── header ─────────────────────────────────────────────────────────── */
.lx-top {
  max-width: 64rem; margin: 0 auto; padding: 18px 16px 6px;
  border-bottom: 1px solid var(--line);
}
.lx-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lx-top .brand { font-size: 1.05rem; }
.lx-app {
  padding: 8px 14px; border-radius: 999px; font-size: .9rem; font-weight: 600;
  color: #fff; background: var(--blue); text-decoration: none; white-space: nowrap;
}
.lx-nav, .lx-langs {
  display: flex; gap: 6px; margin: 12px 0 6px; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.lx-nav::-webkit-scrollbar, .lx-langs::-webkit-scrollbar { display: none; }
.lx-nav a {
  flex: none; padding: 6px 12px; border-radius: 999px; border: 1px solid transparent;
  color: var(--text-sec); text-decoration: none; font-size: .92rem; white-space: nowrap;
}
.lx-nav a:hover { color: var(--text); }
.lx-nav a[aria-current='page'] { color: var(--text); border-color: var(--line); background: var(--surface); }
.lx-langs { align-items: center; margin-top: 2px; font-size: .85rem; }
.lx-langs-label { color: var(--text-sec); white-space: nowrap; }
.lx-lang { flex: none; padding: 3px 10px; border-radius: 999px; color: var(--teal); text-decoration: none; white-space: nowrap; }
.lx-lang[aria-current] { color: var(--text); background: var(--surface); }

/* ── page body ──────────────────────────────────────────────────────── */
.lx-main { max-width: 64rem; margin: 0 auto; padding: 8px 16px 24px; }
.lx-article { max-width: 46rem; margin: 0 auto; }
.lx-article-wide { max-width: 56rem; }

.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; margin: 14px 0 0; padding: 0; font-size: .85rem; color: var(--text-sec); }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before { content: '›'; margin: 0 8px; opacity: .6; }
[dir='rtl'] .crumbs li + li::before { content: '‹'; }
.crumbs a { color: var(--text-sec); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs li[aria-current] { color: var(--text); }

.lx-head { padding: 18px 0 6px; }
.lx-head h1 { font-size: clamp(1.75rem, 5vw, 2.45rem); line-height: 1.18; margin: 4px 0 8px; letter-spacing: -.01em; }
.lx-hero h1 { font-size: clamp(2rem, 6vw, 3rem); }
.lx-kicker { margin: 0; font-size: .88rem; font-weight: 600; }
.lx-kicker a { color: var(--teal); text-decoration: none; }
.lx-native { margin: -2px 0 10px; color: var(--text-sec); font-size: 1.05rem; font-style: italic; }
.lx-lede { font-size: clamp(1.02rem, 2.6vw, 1.16rem); color: #d7e2f5; max-width: 62ch; }
.lx-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 0; }
.lx-muted { color: var(--text-sec); }

.lx-pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700;
  line-height: 1.5; text-decoration: none; white-space: nowrap;
  color: #0b1220; background: #94a3b8;
}
.lx-pill-quiet { color: var(--text-sec); background: transparent; border: 1px solid var(--line); font-weight: 600; }
.lx-lv-a0 { background: #cbd5e1; }
.lx-lv-a1 { background: #6ee7b7; }
.lx-lv-a2 { background: #5eead4; }
.lx-lv-b1 { background: #93c5fd; }
.lx-lv-b2 { background: #a5b4fc; }
.lx-lv-c1 { background: #d8b4fe; }
.lx-lv-c2 { background: #f9a8d4; }
.lx-stat { font-size: .85rem; color: var(--text-sec); }
.lx-stat-v { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.lx-count { font-size: .85rem; color: var(--text-sec); font-weight: 500; font-variant-numeric: tabular-nums; }

.lx-block { margin: 30px 0; }
.lx-block > h2, .lx-level > h2, .lx-cta h2 {
  font-size: 1.22rem; line-height: 1.3; margin: 0 0 12px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.lx-level > h3 { font-size: .95rem; color: var(--text-sec); margin: 20px 0 8px; font-weight: 600; }

/* ── the rule ───────────────────────────────────────────────────────── */
.lx-rule {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px 8px;
}
.lx-rule p { font-size: 1.06rem; }
.term { color: #7dd3fc; font-weight: 700; }
.lx-pattern {
  margin: 14px 0 12px; padding: 12px 14px; border-radius: 12px;
  background: rgba(20, 184, 166, .08); border: 1px solid rgba(20, 184, 166, .28);
}
.lx-pattern-k { display: block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--teal); }
.lx-pattern p { margin: 4px 0 0; font-weight: 600; white-space: pre-wrap; }

/* ── examples ───────────────────────────────────────────────────────── */
.lx-examples, .lx-notes, .lx-mistakes, .lx-practice, .lx-cards, .lx-links, .lx-tiles-list { list-style: none; margin: 0; padding: 0; }
.lx-examples { counter-reset: ex; display: grid; gap: 10px; }
.lx-examples li {
  counter-increment: ex; position: relative;
  padding: 12px 16px; padding-inline-start: 50px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line);
}
.lx-examples li::before {
  content: counter(ex); position: absolute; inset-inline-start: 14px; top: 13px;
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: .78rem; font-weight: 700; color: var(--teal); background: rgba(20, 184, 166, .12);
}
[dir='rtl'] .lx-examples li::before { content: counter(ex, arabic-indic); }
.lx-ex-t { margin: 0; font-weight: 600; font-size: 1.05rem; color: #fff; }
.lx-ex-g { margin: 2px 0 0; color: var(--text-sec); }

/* ── mistakes and notes ─────────────────────────────────────────────── */
.lx-mistakes, .lx-notes { display: grid; gap: 10px; }
.lx-mistakes li, .lx-notes li { padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.lx-notes li { border-color: rgba(251, 191, 36, .3); background: rgba(251, 191, 36, .06); }
.lx-wrong, .lx-right { margin: 0; display: flex; gap: 10px; align-items: baseline; }
.lx-mark { flex: none; width: 1.2em; font-weight: 800; text-align: center; }
.lx-wrong .lx-mark { color: var(--bad); }
.lx-right .lx-mark { color: var(--good); }
.lx-strike { color: #fca5a5; text-decoration: line-through; text-decoration-color: rgba(248, 113, 113, .7); }
.lx-right span[lang] { color: #bbf7d0; font-weight: 600; }
.lx-note { margin: 6px 0 0; color: var(--text-sec); font-size: .96rem; }
.lx-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── practice ───────────────────────────────────────────────────────── */
.lx-practice { display: grid; gap: 14px; }
.lx-q { padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.lx-q-kind { margin: 0 0 6px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.lx-q-n {
  flex: none; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center;
  font-size: .82rem; color: #fff; background: var(--blue);
}
.lx-q-prompt { margin: 0 0 6px; color: #d7e2f5; }
.lx-q-stem { margin: 8px 0; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); font-weight: 600; font-size: 1.05rem; }
.lx-q-stem-wrong { color: #fca5a5; }
.lx-gap { display: inline-block; min-width: 3.2em; border-bottom: 2px solid var(--teal); color: transparent; line-height: 1.1; }
.lx-opts { list-style: none; margin: 8px 0 4px; padding: 0; display: grid; gap: 6px; }
.lx-opts li { display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); }
.lx-opt-k {
  flex: none; width: 24px; height: 24px; border-radius: 7px; display: inline-grid; place-items: center;
  font-size: .8rem; font-weight: 700; color: var(--text-sec); background: var(--surface-2);
}
.lx-opt-k-ok { color: #052e1f; background: var(--good); vertical-align: middle; }
.lx-tokens { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.lx-tokens span { padding: 5px 11px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 600; }
.lx-ans { margin-top: 10px; }
.lx-ans summary {
  cursor: pointer; display: inline-block; padding: 7px 14px; border-radius: 999px;
  color: var(--teal); border: 1px solid rgba(20, 184, 166, .45); font-weight: 600; font-size: .92rem; list-style: none;
}
.lx-ans summary::-webkit-details-marker { display: none; }
.lx-ans[open] summary { background: rgba(20, 184, 166, .12); }
.lx-ans-line { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; background: rgba(52, 211, 153, .08); border: 1px solid rgba(52, 211, 153, .3); }
.lx-ans-k { font-weight: 700; color: var(--good); }
.lx-ans-line b { color: #bbf7d0; }
.lx-ans-why { margin: 8px 0 0; color: #d7e2f5; }

/* ── calls to action, pager ─────────────────────────────────────────── */
.lx-cta {
  margin: 34px 0; padding: 22px 22px 18px; border-radius: 20px;
  background: linear-gradient(135deg, rgba(27, 110, 243, .28), rgba(20, 184, 166, .18));
  border: 1px solid rgba(96, 165, 250, .35);
}
.lx-cta p { color: #e2ebfa; max-width: 58ch; }
.lx-cta .cta { margin-top: 4px; }

.lx-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 28px 0; }
.lx-pager a {
  display: block; padding: 12px 14px; border-radius: 14px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
}
.lx-pager a:hover { border-color: rgba(96, 165, 250, .5); }
.lx-pager span { display: block; font-size: .8rem; color: var(--text-sec); }
.lx-pager b { display: block; font-size: .98rem; line-height: 1.35; margin-top: 2px; }
.lx-next { text-align: end; }

.lx-links { display: grid; gap: 6px; }
.lx-links li { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.lx-links a { text-decoration: none; }

/* ── hubs ───────────────────────────────────────────────────────────── */
.lx-head-hub { max-width: 46rem; }
.lx-jump { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.lx-level { margin: 34px 0; scroll-margin-top: 16px; }
.lx-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.lx-card-link, .lx-tile {
  display: flex; flex-direction: column; gap: 4px; height: 100%;
  padding: 14px 16px; border-radius: 14px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  transition: border-color .15s ease, transform .15s ease;
}
.lx-card-link:hover, .lx-tile:hover { border-color: rgba(96, 165, 250, .55); transform: translateY(-1px); }
.lx-card-link b, .lx-tile b { font-size: 1.02rem; line-height: 1.35; }
.lx-card-link span, .lx-tile span { color: var(--text-sec); font-size: .92rem; line-height: 1.5; }
.lx-tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin: 18px 0; }
.lx-tile { padding: 18px 20px; border-radius: 18px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.lx-tile b { font-size: 1.15rem; }
@media (prefers-reduced-motion: reduce) { .lx-card-link, .lx-tile { transition: none; } .lx-card-link:hover, .lx-tile:hover { transform: none; } }

.lx-levels { display: table; width: 100%; }
.lx-levels th { font-weight: 600; color: var(--text); white-space: nowrap; }
.lx-levels td a { text-decoration: none; }

/* ── vocabulary ─────────────────────────────────────────────────────── */
.lx-tip { padding: 12px 16px; border-radius: 14px; background: rgba(251, 191, 36, .06); border: 1px solid rgba(251, 191, 36, .28); color: #fde68a; }
.lx-tip a { color: var(--warn); font-weight: 600; }
table.lx-words { display: table; width: 100%; margin: 18px 0; font-size: .98rem; }
.lx-words th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.lx-words td { padding: 10px; }
.lx-w { white-space: nowrap; }
.lx-w b { font-weight: 700; color: #fff; }
.lx-x { color: var(--text-sec); }
.lx-art { display: inline-block; min-width: 2.2em; font-size: .78rem; font-weight: 800; text-align: center; border-radius: 6px; padding: 1px 5px; }
.lx-art-de { color: #0b1a33; background: var(--de); }
.lx-art-het { color: #2a1405; background: var(--het); }

@media (max-width: 640px) {
  /* A three-column table does not fit a phone; each word becomes a card. */
  table.lx-words, .lx-words tbody, .lx-words tr, .lx-words td { display: block; width: 100%; }
  .lx-words thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .lx-words tr { padding: 10px 2px; border-bottom: 1px solid var(--line); }
  .lx-words td { padding: 0; border: 0; }
  .lx-w { font-size: 1.08rem; }
  .lx-x { font-size: .9rem; }
  .lx-pager { grid-template-columns: 1fr; }
  .lx-next { text-align: start; }
  .lx-rule { padding: 16px 16px 6px; }
}

/* ── footer ─────────────────────────────────────────────────────────── */
.lx-foot { max-width: 64rem; margin: 30px auto 0; padding: 18px 16px 34px; }
.lx-foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.lx-foot nav a { margin: 0; }

/* ── the advertising slot, collapsed while it has nothing in it ──────
   _www.css reserves the slot's height so a fill does not shift the page.
   When Google answers "no ad" — every request, until the site is approved,
   and some requests after — the reserved space would stay as a labelled
   hole in the middle of a lesson. Google marks that answer on the <ins>;
   the slot folds away when it does. */
.lx .ad:has(ins.adsbygoogle[data-ad-status='unfilled']) { display: none; }
