/* =====================================================================
   s0sta.com — study pages (/summary/ /commands/ /labs/)
   A night band on top (title, search), then a sheet of paper for reading.
   Commands live in deep-night terminal blocks: $ (cyan) = normal user,
   # (sun) = root. Every command word links to its own page.
   ===================================================================== */

:root {
  --term: #110e2c;
  --term-2: #1a1640;
  --term-text: #ece9ff;
  --term-dim: #a49ed2;
  --term-line: rgba(196, 181, 253, .14);
  --paper-2: #ebe8fb;
  --paper-3: #fbfaff;
  --violet-ink: #5b21b6;
  --cyan-ink: #0e7490;
  --sun-ink: #8a5a00;
  --ok-ink: #047857;
  --down-ink: #be123c;
  --tint-idea: #efeafe;
  --tint-remember: #fdf4d6;
  --tint-exam: #def5fb;
  --tint-work: #ddf6ec;
  --tint-watch: #ffe6ea;
  --lp-read: 72ch;
  --lp-head: 104px;
}

/* ---------- Frame ---------- */
.lp { background: var(--night); }
.lp main { display: block; }
.lp .site-header { z-index: 60; }
.lp-header .nav-links { margin-inline-start: 18px; margin-inline-end: auto; }
.lp-header .nav-links a[aria-current="true"] { background: var(--ink); color: #fff; }
.lp-header .nav-links a[aria-current="true"]:hover { background: #2a2269; }
.lp-search-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding-inline: 12px 6px;
  border: 1px solid var(--line-l); border-radius: 11px; background: #fff; color: var(--muted-l);
  font: 500 14px/1 var(--body); cursor: pointer; transition: border-color .2s, color .2s;
}
.lp-search-btn:hover { border-color: rgba(22, 18, 58, .35); color: var(--ink); }
.lp-search-btn .ic { width: 17px; height: 17px; }
.lp-search-btn kbd { font: 500 12px/1 var(--mono); padding: 4px 7px; border-radius: 6px; background: var(--paper-2); color: var(--ink); }
.mobile-menu nav a[aria-current="true"] { background: rgba(22, 18, 58, .08); }
@media (max-width: 1180px) { .lp-search-btn-t { display: none; } }
@media (max-width: 1020px) { .lp-search-btn kbd { display: none; } .lp-search-btn { padding-inline: 10px; } }
@media (max-width: 460px) { .lp-header .lang-switch a { padding-inline: 6px; } }

/* ---------- Night band (hero) ---------- */
.lp-hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding-block: calc(var(--lp-head) + 34px) 72px;
}
.lp-hero::before {
  content: ""; position: absolute; z-index: -1; inset-block-start: -30%; inset-inline-start: -12%;
  width: min(70vw, 820px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(109, 40, 217, .55) 0%, transparent 64%); filter: blur(70px); opacity: .55; pointer-events: none;
}
.lp-hero::after {
  content: ""; position: absolute; z-index: -1; inset-block-end: -60%; inset-inline-end: -16%;
  width: min(60vw, 700px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(8, 145, 178, .5) 0%, transparent 64%); filter: blur(70px); opacity: .45; pointer-events: none;
}
.lp-hero-in { position: relative; display: grid; gap: 18px; }
.lp-hero-in > * { min-width: 0; }
.lp-h1 {
  font: 300 clamp(36px, 4.7vw, 64px)/1.04 var(--display); letter-spacing: -.035em; text-wrap: balance; max-width: 22ch; color: #fff;
}
:lang(ar) .lp-h1 { letter-spacing: 0; line-height: 1.3; font-size: clamp(32px, 4.2vw, 56px); }
.lp-lead { font-size: clamp(17px, 1.45vw, 19.5px); color: var(--muted-d); max-width: 62ch; line-height: 1.6; }
.lp-lead code, .lp-intro code { font: 500 .92em/1 var(--mono); color: var(--text-d); background: rgba(255, 255, 255, .08); padding: 2px 6px; border-radius: 6px; }
.lp-intro p + p { margin-top: 10px; }
.lp-intro a { color: var(--text-d); }
.lp-kicker { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; font: 500 14.5px/1.4 var(--body); color: var(--lilac); }
.lp-kicker > span:first-child { font: 500 13.5px/1 var(--mono); letter-spacing: .02em; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line-d2); color: var(--text-d); }
.lp-kicker-b { color: var(--muted-d); }
.lp-kicker-b i { font-style: normal; color: var(--text-d); }

.lp-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: 14px; color: var(--muted-d); }
.lp-crumbs li { display: inline-flex; align-items: center; gap: 4px; }
.lp-crumbs li + li::before { content: "/"; opacity: .45; margin-inline-end: 4px; font-family: var(--mono); }
.lp-crumbs a { color: var(--muted-d); text-decoration: none; }
.lp-crumbs a:hover { color: var(--text-d); text-decoration: underline; text-underline-offset: 3px; }
.lp-crumbs [aria-current] { color: var(--text-d); }

.lp-stats { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 34px; color: var(--muted-d); font-size: 14.5px; }
.lp-stats li { display: inline-flex; align-items: baseline; gap: 8px; }
.lp-stats b { font: 300 30px/1 var(--display); color: #fff; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

.lp-facts { display: flex; flex-wrap: wrap; gap: 12px 30px; margin: 4px 0 0; }
.lp-facts > div { display: grid; gap: 4px; }
.lp-facts dt { font-size: 12.5px; color: var(--muted-d); display: inline-flex; align-items: center; gap: 6px; }
.lp-facts dt .ic { width: 15px; height: 15px; }
.lp-facts dd { margin: 0; font-size: 15px; color: var(--text-d); }
.lp-facts dd a { color: var(--text-d); }
.lp-facts code { font: 500 14px/1 var(--mono); }
.lp-own { font-size: 14px; color: var(--muted-d); max-width: 70ch; border-inline-start: 2px solid var(--line-d2); padding-inline-start: 12px; }

/* the man page header line: NMCLI(1)  NetworkManager  NMCLI(1) */
.lp-manline {
  display: flex; justify-content: space-between; gap: 12px; max-width: 780px; margin-top: 8px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line-d);
  font: 400 12.5px/1 var(--mono); letter-spacing: .12em; color: rgba(196, 181, 253, .7);
}
.lp-manline span:nth-child(2) { letter-spacing: .04em; color: var(--muted-d); }
@media (max-width: 560px) { .lp-manline span:last-child { display: none; } }
.lp-cmdname { font: 400 clamp(46px, 7vw, 92px)/1 var(--mono); letter-spacing: -.045em; max-width: none; word-break: break-word; }
.lp-cmdname code { font: inherit; }

/* ---------- Badges ---------- */
.lp-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; font: 600 12px/1 var(--body); white-space: nowrap; }
.lp-badge-rhcsa { background: #dc2626; color: #fff; }
.lp-hero .lp-badge-rhcsa { background: #ef4444; }
.lp-badge-core { background: rgba(124, 58, 237, .14); color: var(--violet-ink); }
.lp-hero .lp-badge-core { background: rgba(196, 181, 253, .18); color: var(--text-d); }
.lp-badge-more { background: rgba(22, 18, 58, .08); color: var(--muted-l); }
.lp-badge-root { background: rgba(242, 193, 78, .22); color: var(--sun-ink); }
.lp-badge-root b { font-family: var(--mono); }

/* ---------- Paper sheet ---------- */
.lp-body {
  position: relative; z-index: 1; margin-top: -26px; border-radius: 28px 28px 0 0;
  background: var(--paper); color: var(--ink); color-scheme: light;
  padding-block: clamp(36px, 5vw, 64px) clamp(64px, 8vw, 110px);
}
.lp-body :focus-visible { outline-color: var(--violet-2); }
.lp-sheet { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.lp-sheet > * { min-width: 0; }
.lp-h2 { font: 400 clamp(26px, 2.6vw, 34px)/1.15 var(--display); letter-spacing: -.025em; text-wrap: balance; display: flex; align-items: center; gap: 10px; }
.lp-h2 .ic { width: 26px; height: 26px; color: var(--violet-2); }
.lp-h2-c { font: 400 15px/1 var(--mono); color: var(--muted-l); padding: 5px 9px; border-radius: 8px; background: var(--paper-2); letter-spacing: 0; }
.lp-h3 { font: 500 19px/1.3 var(--display); letter-spacing: -.01em; }
:lang(ar) :is(.lp-h2, .lp-h3, .lesson-t, .lp-cat-h, .lp-part-t) { letter-spacing: 0; line-height: 1.45; }
.lp-sub { color: var(--muted-l); font-size: 15.5px; }

/* ---------- Reading layout: side menu + article ---------- */
.lp-doc { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.lp-doc-end { padding-top: 0; }
.lp-toc { position: sticky; top: calc(var(--lp-head) + 4px); max-height: calc(100vh - var(--lp-head) - 20px); overflow: auto; overscroll-behavior: contain; }
.lp-toc-in { padding-block: 4px 16px; }
.lp-toc-h { font: 600 13px/1.4 var(--body); color: var(--muted-l); margin-bottom: 10px; }
.lp-toc-h code { font: 600 15px/1 var(--mono); color: var(--ink); }
.lp-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.lp-toc a {
  display: flex; gap: 10px; align-items: baseline;
  padding: 7px 10px; border-radius: 9px; font-size: 14.5px; line-height: 1.35; color: var(--muted-l); text-decoration: none;
  border-inline-start: 2px solid transparent; transition: background-color .15s, color .15s;
}
.lp-toc a > span { min-width: 0; }
.lp-toc a:hover { background: rgba(22, 18, 58, .05); color: var(--ink); }
.lp-toc a[aria-current="true"] { color: var(--ink); background: #fff; border-inline-start-color: var(--violet); box-shadow: 0 1px 2px rgba(22, 18, 58, .08); }
.lp-toc-n { flex: none; font: 500 12.5px/1 var(--mono); color: var(--violet-2); min-width: 3.4ch; }
.lp-toc-c { flex: none; margin-inline-start: auto; font: 500 12px/1 var(--mono); color: var(--muted-l); }
.lp-toc .ic { flex: none; width: 16px; height: 16px; color: var(--violet-2); align-self: center; }
.lp-article { min-width: 0; max-width: 800px; }
.lp-article > * + * { margin-top: 0; }
@media (max-width: 1080px) {
  .lp-doc { grid-template-columns: minmax(0, 1fr); }
  .lp-doc-end > div:first-child { display: none; }
  .lp-toc { position: static; max-height: none; overflow: visible; }
  .lp-toc-in { padding: 0; }
  .lp-toc-h { display: none; }
  .lp-toc ol { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 8px; scroll-snap-type: x proximity; }
  .lp-toc li { flex: none; scroll-snap-align: start; }
  .lp-toc a { display: inline-flex; gap: 8px; background: #fff; border: 1px solid var(--line-l); border-radius: 999px; padding: 7px 12px; white-space: nowrap; max-width: 76vw; }
  .lp-toc a > span:not(.lp-toc-n):not(.lp-toc-c) { overflow: hidden; text-overflow: ellipsis; }
  .lp-toc a[aria-current="true"] { border-color: var(--violet); box-shadow: none; }
}

/* ---------- Prose ---------- */
.prose { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; font-size: 17px; line-height: 1.68; color: #241f4d; }
.prose > * { min-width: 0; margin: 0; }
.prose li { min-width: 0; }
.prose p, .prose li { max-width: var(--lp-read); }
.prose a { color: var(--violet-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--violet-2); }
.prose strong { font-weight: 600; color: var(--ink); }
.prose code, .lp-kv dd code, .lp-opts dd code, .ex-note code, .lesson-idea code, .co code, .lp-sub code {
  font: 500 .88em/1.4 var(--mono); background: var(--paper-2); color: var(--ink); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere;
}
.prose a.cl, .co a.cl, .lesson-idea a.cl, .ex-note a.cl, .lp-opts a.cl { text-decoration: none; }
.prose a.cl code, .co a.cl code, .lesson-idea a.cl code, .ex-note a.cl code, .lp-opts a.cl code {
  color: var(--violet-ink); background: rgba(124, 58, 237, .1); box-shadow: inset 0 -1px 0 rgba(124, 58, 237, .45);
}
.prose a.cl:hover code, .co a.cl:hover code { background: rgba(124, 58, 237, .18); }
.prose ul, .prose ol { padding-inline-start: 1.25em; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.prose ul li::marker { color: var(--violet); }
.prose h3 { font: 500 19px/1.35 var(--display); margin-top: 8px; }
.prose h4 { font: 600 16px/1.4 var(--body); }
.prose ol.steps { list-style: none; padding: 0; counter-reset: step; gap: 16px; }
.prose ol.steps[start] { counter-reset: step var(--start, 0); }
.prose ol.steps > li { counter-increment: step; position: relative; padding-inline-start: 44px; }
.prose ol.steps > li > :is(.term, .co, p, ul) { margin-top: 10px; }
.prose ol.steps > li::before {
  content: counter(step); position: absolute; inset-inline-start: 0; top: 1px;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font: 600 13.5px/1 var(--mono); color: var(--violet-ink); background: #fff; border: 1.5px solid rgba(124, 58, 237, .45);
}
.prose ol.steps > li > ul { margin: 0; }
.tbl { overflow-x: auto; border: 1px solid var(--line-l); border-radius: 14px; background: #fff; }
.tbl table { border-collapse: collapse; width: 100%; font-size: 15px; }
.tbl th, .tbl td { text-align: start; padding: 10px 14px; border-bottom: 1px solid var(--line-l); vertical-align: top; }
.tbl th { font: 600 13.5px/1.3 var(--body); color: var(--muted-l); background: var(--paper-3); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td code { white-space: nowrap; }

/* ---------- Terminal blocks ---------- */
.term {
  position: relative; background: var(--term); color: var(--term-text); border-radius: 14px;
  border: 1px solid rgba(22, 18, 58, .9); box-shadow: 0 10px 26px -18px rgba(15, 12, 38, .8);
  text-align: left; direction: ltr; min-width: 0;
}
.term pre { margin: 0; overflow-x: auto; padding: 15px 18px; scrollbar-width: thin; scrollbar-color: rgba(196, 181, 253, .3) transparent; }
.term code { font: 400 14.5px/1.7 var(--mono); font-variant-ligatures: none; white-space: pre; display: block; min-width: max-content; }
.term pre code, .prose .term code, .co .term code { background: transparent; padding: 0; border-radius: 0; box-shadow: none; color: inherit; overflow-wrap: normal; }
.term .pr { user-select: none; -webkit-user-select: none; display: inline-block; width: 2ch; font-weight: 600; color: var(--cyan); }
.term .pr-r { color: var(--sun); }
.term .ln-k .cm { padding-inline-start: 2ch; display: inline-block; }
.term .cm-h { color: #d9d4ff; }
.term .ln-o { color: var(--term-dim); }
.term a.cw { color: #fff; text-decoration: underline; text-decoration-style: dotted; text-decoration-color: rgba(34, 195, 230, .7); text-underline-offset: 4px; }
.term a.cw:hover { color: var(--cyan); text-decoration-style: solid; }
.term .cw-x, .term .cw-self { color: #fff; }
.term .cw-self { font-weight: 600; }
.term .op { color: var(--lilac); }
.term .sp { color: var(--cyan); }
.term .cmt { color: #8e88bf; font-style: italic; }
.term .va { color: #f6d68a; }
.term .kw { color: #f0abfc; }
.term-h { display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-bottom: 1px solid var(--term-line); font: 500 12.5px/1 var(--mono); color: var(--term-dim); }
.term-file { background: #18143a; }
.term-file pre { padding-block: 13px; }
.term-out code { color: var(--term-dim); }
.copy {
  position: absolute; top: 8px; inset-inline-end: 8px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px;
  border: 1px solid var(--term-line); background: rgba(26, 22, 64, .92); color: var(--term-dim);
  font: 500 12.5px/1 var(--body); cursor: pointer; opacity: 0; transition: opacity .15s, color .15s, border-color .15s;
}
.term:hover .copy, .copy:focus-visible, .copy.is-done { opacity: 1; }
.copy:hover { color: #fff; border-color: rgba(196, 181, 253, .5); }
.copy.is-done { color: var(--ok); border-color: rgba(52, 211, 153, .5); }
@media (hover: none) { .copy { opacity: 1; } }
.term-h + .copy { top: 44px; }
.term-file .copy, .term-syn .copy { display: none; }
/* more commands in one block: a bar with "Copy all" and a copy button on every command (learn.js) */
.term-bar { justify-content: flex-start; }
.term-dots { display: inline-flex; gap: 5px; margin-inline-end: 4px; }
.term-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(196, 181, 253, .22); }
.term-dots i:first-child { background: #f87171; } .term-dots i:nth-child(2) { background: #fbbf24; } .term-dots i:nth-child(3) { background: #34d399; }
.copy-all { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 8px; border: 1px solid rgba(196, 181, 253, .32); background: rgba(124, 58, 237, .18); color: #e9e4ff; font: 600 12.5px/1 var(--body); cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.copy-all:hover { background: rgba(124, 58, 237, .34); border-color: rgba(196, 181, 253, .6); color: #fff; }
.copy-all svg, .ln-copy svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.copy-all svg + svg, .ln-copy svg + svg { display: none; }
.copy-all.is-done, .ln-copy.is-done { color: var(--ok); border-color: rgba(52, 211, 153, .55); }
.copy-all.is-done svg:first-child, .ln-copy.is-done svg:first-child { display: none; }
.copy-all.is-done svg + svg, .ln-copy.is-done svg + svg { display: inline; }
.term-lines code { min-width: 100%; width: max-content; }
.term-lines .ln { display: flex; align-items: center; margin-inline: -8px; padding-inline: 8px 4px; border-radius: 6px; }
.term-lines .ln > .cm { flex: none; }
.term-lines .ln-cmd:hover, .term-lines .ln-cmd:focus-within { background: rgba(196, 181, 253, .07); }
.ln-copy { position: sticky; right: 0; margin-left: auto; flex: none; width: 30px; height: 22px; margin-inline-start: auto; box-shadow: -12px 0 10px -6px var(--term); display: grid; place-items: center; padding: 0; border-radius: 7px; border: 1px solid transparent; background: var(--term); color: var(--term-dim); cursor: pointer; opacity: 0; transition: opacity .15s, color .15s, background .15s; }
.term-lines .ln-cmd:hover .ln-copy, .ln-copy:focus-visible, .ln-copy.is-done { opacity: 1; }
.ln-copy:hover { color: #fff; background: #2a2366; border-color: rgba(196, 181, 253, .3); }
.ln-copy:focus-visible, .copy-all:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; }
@media (hover: none) { .ln-copy { opacity: .7; } }
.lp-copy-ta { position: fixed; top: 0; left: 0; opacity: 0; pointer-events: none; }
.lp-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--muted-l); }
.lp-legend span { display: inline-flex; align-items: center; gap: 8px; }
.lp-legend b { display: inline-grid; place-items: center; width: 26px; height: 24px; border-radius: 7px; background: var(--term); font: 600 14px/1 var(--mono); }
.lp-legend-u b { color: var(--cyan); }
.lp-legend-r b { color: var(--sun); }
/* syntax: like the SYNOPSIS of a man page, on paper */
.term-syn { background: var(--paper-3); color: var(--ink); border: 1px solid var(--line-l); box-shadow: none; }
.term-syn code { color: #2b2560; }
.term-syn .sy-c { font-weight: 700; color: var(--violet-ink); }
.term-syn var { font-style: italic; color: var(--cyan-ink); }

/* ---------- Callouts ---------- */
.co { border-radius: 14px; padding: 14px 16px 15px; border: 1px solid transparent; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; font-size: 16px; line-height: 1.6; }
.co > * { margin: 0; min-width: 0; }
.co-h { display: inline-flex; align-items: center; gap: 8px; font: 600 13.5px/1.2 var(--body); }
.co-h::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.co ul { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 4px; }
.co-idea { background: var(--tint-idea); border-color: rgba(124, 58, 237, .2); }
.co-idea .co-h { color: var(--violet-ink); }
.co-remember { background: var(--tint-remember); border-color: rgba(242, 193, 78, .55); }
.co-remember .co-h { color: var(--sun-ink); }
.co-remember p:not(.co-h) { font-weight: 500; color: var(--ink); }
.co-exam { background: var(--tint-exam); border-color: rgba(34, 195, 230, .4); }
.co-exam .co-h { color: var(--cyan-ink); }
.co-work { background: var(--tint-work); border-color: rgba(52, 211, 153, .45); }
.co-work .co-h { color: var(--ok-ink); }
.co-watch { background: var(--tint-watch); border-color: rgba(251, 113, 133, .45); }
.co-watch .co-h { color: var(--down-ink); }
.co-check { background: #fff; border-color: rgba(34, 195, 230, .55); }
.co-check .co-h { color: var(--cyan-ink); }
.co-note, .co-why { background: var(--paper-3); border-color: var(--line-l); }
.co-note .co-h, .co-why .co-h { color: var(--muted-l); }
.co-in { margin-top: 4px; }

/* ---------- Chapter: lessons ---------- */
.lp-p-chapter .lp-article { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.lp-objbox { margin-top: 22px; padding: 16px 18px; border-radius: 16px; background: #fff; border: 1px solid var(--line-l); }
.lp-objbox-h { font: 600 14px/1.3 var(--body); color: var(--muted-l); margin-bottom: 8px; }
.lp-objbox ul { margin: 0; padding-inline-start: 1.1em; display: grid; gap: 4px; font-size: 15.5px; }
.lp-objbox li::marker { color: #dc2626; }
.lesson { padding-block: 44px 8px; scroll-margin-top: calc(var(--lp-head) + 8px); }
.lesson + .lesson { border-top: 1px solid var(--line-l); margin-top: 32px; }
.lesson-h { display: grid; gap: 6px; margin-bottom: 14px; }
.lesson-n a { font: 500 13.5px/1 var(--mono); color: var(--violet-2); text-decoration: none; letter-spacing: .02em; }
.lesson-n a:hover { text-decoration: underline; }
.lesson-t { font: 400 clamp(25px, 2.5vw, 33px)/1.16 var(--display); letter-spacing: -.025em; text-wrap: balance; color: var(--ink); }
.lesson-idea {
  font: 400 clamp(18px, 1.5vw, 20px)/1.55 var(--display); color: var(--ink); max-width: 64ch;
  border-inline-start: 3px solid var(--violet); padding-inline-start: 16px; margin-bottom: 20px;
}
:lang(ar) .lesson-idea { line-height: 1.85; font-family: var(--body); font-weight: 500; }
.lesson-f { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-top: 16px; border-top: 1px dashed var(--line-l); }
.lesson-f-h { font: 600 13.5px/1.3 var(--body); color: var(--muted-l); }
.lp-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lp-chip {
  display: inline-flex; align-items: center; padding: 6px 11px; border-radius: 9px; background: #fff; border: 1px solid var(--line-l);
  text-decoration: none; color: var(--violet-ink); transition: border-color .15s, background-color .15s, transform .15s;
}
.lp-chip code { font: 500 14px/1 var(--mono); }
.lp-chip:hover { border-color: var(--violet); background: var(--tint-idea); }
.lp-chips-lg .lp-chip { padding: 9px 14px; }
.lp-chips-lg .lp-chip code { font-size: 15.5px; }
.lp-allcmds { margin-top: 48px; display: grid; gap: 14px; }
.lp-practice { margin-top: 56px; display: grid; gap: 18px; scroll-margin-top: calc(var(--lp-head) + 8px); }
.lp-pn { margin-top: 56px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.lp-pn a { display: grid; gap: 6px; padding: 18px 20px; border-radius: 18px; background: #fff; border: 1px solid var(--line-l); text-decoration: none; color: var(--ink); transition: border-color .2s; }
.lp-pn a:hover { border-color: var(--violet); }
.lp-pn span { font-size: 13.5px; color: var(--muted-l); }
.lp-pn b { font: 400 18px/1.3 var(--display); }
.lp-pn b span { font: 500 14px/1 var(--mono); color: var(--violet-2); margin-inline-end: 6px; }
.lp-pn-next { grid-column: 2; text-align: end; }
@media (max-width: 640px) { .lp-pn { grid-template-columns: minmax(0, 1fr); } .lp-pn-next { grid-column: 1; } }
.lp-untr { padding: 10px 14px; border-radius: 12px; background: var(--tint-remember); border: 1px solid rgba(242, 193, 78, .55); font-size: 14.5px; color: var(--sun-ink); margin-bottom: 14px; }

/* ---------- Summaries home and book ---------- */
.lp-books { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px; }
.lp-book { display: grid; gap: 18px; align-content: start; padding: clamp(22px, 2.6vw, 32px); border-radius: 24px; background: #fff; border: 1px solid var(--line-l); }
.lp-book-soon { background: transparent; border-style: dashed; }
.lp-book-h { display: grid; gap: 8px; }
.lp-book-by { font-size: 14px; color: var(--muted-l); }
.lp-book-t { font: 400 clamp(24px, 2.4vw, 30px)/1.15 var(--display); letter-spacing: -.02em; }
.lp-book-t a { color: inherit; text-decoration: none; }
.lp-book-t a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.lp-book-about { color: var(--muted-l); font-size: 16px; }
.lp-book-chs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 2px 18px; }
.lp-book-chs a { display: grid; grid-template-columns: 3ch minmax(0, 1fr); gap: 10px; padding: 6px 0; font-size: 15px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-l); }
.lp-book-chs a:hover span:last-child { color: var(--violet-ink); }
.lp-chn { font: 500 13px/1.6 var(--mono); color: var(--violet-2); text-align: end; }
.lp-soon { font: 500 15px/1 var(--body); color: var(--muted-l); }
.lp-book-go { margin-top: 4px; }
.lp-book-go .ic { width: 16px; height: 16px; }
.lp-part { display: grid; gap: 14px; }
.lp-part + .lp-part { margin-top: 18px; }
.lp-part-h { display: grid; gap: 4px; }
.lp-part-n { font: 500 13px/1 var(--mono); color: var(--violet-2); }
.lp-part-t { font: 400 24px/1.2 var(--display); letter-spacing: -.02em; }
.lp-part-b { font-size: 13.5px; color: var(--muted-l); }
.lp-chlist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-l); }
.lp-chrow { border-bottom: 1px solid var(--line-l); }
.lp-chrow-a { display: grid; grid-template-columns: 4ch minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 16px 4px 10px; text-decoration: none; color: var(--ink); }
.lp-chrow-a .lp-chn { font-size: 15px; }
.lp-chrow-t { display: grid; gap: 3px; }
.lp-chrow-t b { font: 400 19px/1.3 var(--display); }
.lp-chrow-a:hover b { color: var(--violet-ink); }
.lp-chrow-b { font-size: 13.5px; color: var(--muted-l); }
.lp-chrow-m { font-size: 13.5px; color: var(--muted-l); white-space: nowrap; }
.lp-chrow-ls { padding: 0 4px 14px calc(4ch + 20px); }
[dir="rtl"] .lp-chrow-ls { padding: 0 calc(4ch + 20px) 14px 4px; }
.lp-chrow-ls summary { cursor: pointer; font-size: 14px; color: var(--violet-ink); width: max-content; }
.lp-chrow-ls ol { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 15px; }
.lp-chrow-ls a { color: var(--ink); text-decoration: none; }
.lp-chrow-ls a:hover { color: var(--violet-ink); text-decoration: underline; }
.lp-chrow-ls a span { font: 500 13px/1 var(--mono); color: var(--violet-2); margin-inline-end: 6px; }
.lp-obj { display: grid; gap: 12px; margin-top: 36px; }
.lp-obj-g { font: 500 18px/1.3 var(--display); margin-top: 16px; }
.lp-obj-l { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-l); }
.lp-obj-l li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 24px; padding: 11px 0; border-bottom: 1px solid var(--line-l); font-size: 15px; }
.lp-obj-w a { color: var(--violet-ink); text-decoration: none; }
.lp-obj-w a:hover { text-decoration: underline; }
.lp-obj-w span[dir] { font: 500 13px/1 var(--mono); margin-inline-end: 4px; color: var(--violet-2); }
.lp-soon-s { color: var(--muted-l); }
@media (max-width: 700px) { .lp-obj-l li { grid-template-columns: minmax(0, 1fr); } .lp-chrow-a { grid-template-columns: 3ch minmax(0, 1fr); } .lp-chrow-m { display: none; } }

/* ---------- Commands home ---------- */
.lp-catnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lp-catnav a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 999px; background: #fff; border: 1px solid var(--line-l); font-size: 14.5px; color: var(--ink); text-decoration: none; }
.lp-catnav a:hover { border-color: var(--violet); }
.lp-catnav a span { font: 500 12px/1 var(--mono); color: var(--muted-l); }
.lp-cat { display: grid; gap: 6px; scroll-margin-top: calc(var(--lp-head) + 8px); }
.lp-cat-h { font: 400 clamp(24px, 2.3vw, 30px)/1.2 var(--display); letter-spacing: -.02em; padding-bottom: 10px; }
.lp-cmdlist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-l); }
.lp-cmdrow { display: grid; grid-template-columns: minmax(130px, 220px) minmax(0, 1fr) auto; gap: 6px 24px; align-items: baseline; padding: 14px 4px; border-bottom: 1px solid var(--line-l); }
.lp-cmdrow-n { text-decoration: none; }
.lp-cmdrow-n code { font: 500 18px/1.3 var(--mono); color: var(--violet-ink); word-break: break-word; }
.lp-cmdrow-n:hover code { text-decoration: underline; text-underline-offset: 4px; }
.lp-cmdrow-s { font-size: 16px; color: #2b2560; }
.lp-cmdrow-m { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px 10px; }
.lp-cmdrow-c { font-size: 13px; color: var(--muted-l); white-space: nowrap; }
@media (max-width: 860px) {
  .lp-cmdrow { grid-template-columns: minmax(0, 1fr); }
  .lp-cmdrow-m { justify-content: flex-start; }
}

/* ---------- Command page ---------- */
.lp-cmd .lp-sec, .lp-lab .lp-sec, .lp-doc-end .lp-sec { padding-block: 34px 6px; scroll-margin-top: calc(var(--lp-head) + 8px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.lp-cmd .lp-sec:first-child { padding-top: 0; }
.lp-sec-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.lp-ftools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lp-filter { position: relative; display: inline-flex; align-items: center; }
.lp-filter .ic { position: absolute; inset-inline-start: 11px; width: 16px; height: 16px; color: var(--muted-l); pointer-events: none; }
.lp-filter input {
  width: min(260px, 70vw); height: 38px; padding-inline: 34px 12px; border-radius: 10px; border: 1px solid var(--line-l);
  background: #fff; color: var(--ink); font: 400 14.5px/1 var(--body);
}
.lp-filter input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(124, 58, 237, .18); }
.lp-toggle { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding-inline: 12px; border-radius: 10px; border: 1px solid var(--line-l); background: #fff; color: var(--ink); font: 500 14px/1 var(--body); cursor: pointer; }
.lp-toggle[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.lp-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 2px rgba(242, 193, 78, .3); flex: none; }
.lp-topnote { font-size: 13.5px; color: var(--muted-l); display: inline-flex; align-items: center; gap: 8px; }
.lp-grp { font: 500 17px/1.35 var(--display); margin-top: 10px; color: var(--ink); }
.lp-optgrp { display: grid; gap: 4px; }
.lp-opts, .lp-kv { margin: 0; border-top: 1px solid var(--line-l); }
.lp-opts > div, .lp-kv > div { display: grid; grid-template-columns: minmax(150px, 36%) minmax(0, 1fr); gap: 4px 22px; padding: 11px 4px; border-bottom: 1px solid var(--line-l); scroll-margin-top: calc(var(--lp-head) + 12px); }
.lp-opts dt, .lp-kv dt { position: relative; font: 400 14.5px/1.55 var(--mono); color: var(--ink); text-align: left; min-width: 0; overflow-wrap: anywhere; }
[dir="rtl"] .lp-opts dt, [dir="rtl"] .lp-kv dt { text-align: right; }
.lp-opts dt code, .lp-kv dt code { font: inherit; font-weight: 600; color: var(--violet-ink); }
.lp-opts dt var, .lp-kv dt var { font-style: italic; color: var(--cyan-ink); }
.lp-opts dt var.var-set, .lp-kv dt var.var-set { font-style: normal; color: var(--muted-l); }
.lp-opts dd, .lp-kv dd { margin: 0; font-size: 15.5px; line-height: 1.6; color: #2b2560; min-width: 0; }
.opt-top dt::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 2px rgba(242, 193, 78, .3); margin-inline-start: 8px; vertical-align: 2px; }
.opt:target, .ex:target { background: rgba(242, 193, 78, .18); border-radius: 10px; }
.lp-anchor { position: absolute; inset-inline-start: -24px; top: 2px; opacity: 0; color: var(--muted-l); }
.lp-anchor .ic { width: 14px; height: 14px; }
.opt:hover .lp-anchor, .lp-anchor:focus-visible { opacity: 1; }
.lp-kv-files dt { font-size: 14px; }
@media (max-width: 680px) {
  .lp-opts > div, .lp-kv > div { grid-template-columns: minmax(0, 1fr); }
}
.lp-only-top .opt:not(.opt-top) { display: none; }
.lp-exs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.ex { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 20px 4px 22px; border-top: 1px solid var(--line-l); scroll-margin-top: calc(var(--lp-head) + 12px); }
.ex-t { display: flex; align-items: baseline; gap: 12px; font: 500 18px/1.35 var(--display); color: var(--ink); }
.ex-n { flex: none; display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding-inline: 6px; border-radius: 8px; background: var(--paper-2); font: 500 12.5px/1 var(--mono); color: var(--muted-l); text-decoration: none; }
.ex-n:hover { color: var(--violet-ink); }
.ex-top .ex-t > span::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 2px rgba(242, 193, 78, .3); margin-inline-start: 10px; vertical-align: 3px; }
.ex-note { font-size: 15.5px; line-height: 1.6; color: var(--muted-l); max-width: var(--lp-read); }
.lp-sec-watch .prose ul li::marker { color: var(--down); }
.lp-sec-tips .prose { background: var(--tint-remember); border: 1px solid rgba(242, 193, 78, .5); border-radius: 16px; padding: 16px 20px; }
.lp-man { margin-top: 18px; padding: 22px !important; border-radius: 20px; background: var(--ink); color: var(--text-d); }
.lp-man .lp-h2 { color: #fff; }
.lp-man p { color: var(--muted-d); max-width: 64ch; }
.lp-man-term code { font: 500 15px/1 var(--mono); color: #fff; background: rgba(255, 255, 255, .08); padding: 6px 10px; border-radius: 8px; }
.lp-man-links { display: flex; flex-wrap: wrap; gap: 10px; }
.lp-man .btn-ink { background: var(--paper); color: var(--ink); }
.lp-man .btn-ink:hover { background: #fff; }
.lp-btn-line { border: 1px solid rgba(239, 236, 255, .3); color: var(--text-d); background: transparent; }
.lp-btn-line:hover { border-color: rgba(239, 236, 255, .65); }
.lp-man .ic, .lp-book-go .ic { width: 15px; height: 15px; }
.lp-later code { font: 500 14px/1 var(--mono); color: var(--muted-l); margin-inline-end: 8px; }
.lp-uses { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-l); }
.lp-uses a { display: grid; grid-template-columns: 5ch minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 10px 4px; border-bottom: 1px solid var(--line-l); text-decoration: none; color: var(--ink); font-size: 15.5px; }
.lp-uses a:hover span:nth-child(2) { color: var(--violet-ink); text-decoration: underline; text-underline-offset: 3px; }
.lp-uses-n { font: 500 13px/1 var(--mono); color: var(--violet-2); }
.lp-uses-c { font-size: 13px; color: var(--muted-l); }
@media (max-width: 600px) { .lp-uses a { grid-template-columns: 5ch minmax(0, 1fr); } .lp-uses-c { display: none; } }
.lp-nomatch { color: var(--muted-l); font-size: 15px; padding: 12px 4px; }

/* ---------- Labs ---------- */
.lp-labfilter { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-labfilter button, .lp-s-scopes button {
  height: 36px; padding-inline: 14px; border-radius: 999px; border: 1px solid var(--line-l); background: #fff; color: var(--ink);
  font: 500 14px/1 var(--body); cursor: pointer;
}
.lp-labfilter button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.lp-labbook { display: grid; gap: 14px; }
.lp-labch { font: 400 19px/1.3 var(--display); margin-top: 10px; }
.lp-labch span { font: 500 13px/1 var(--mono); color: var(--violet-2); margin-inline-end: 6px; }
.lp-labcards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.lp-labcard {
  display: grid; gap: 8px; align-content: start; height: 100%; padding: 18px 20px; border-radius: 18px; background: #fff; border: 1px solid var(--line-l);
  text-decoration: none; color: var(--ink); transition: border-color .2s;
}
.lp-labcard:hover { border-color: var(--violet); }
.lp-labcard-n { font: 500 13px/1 var(--mono); color: var(--violet-2); }
.lp-labcard b { font: 400 18px/1.35 var(--display); }
.lp-labcard-m { font-size: 13.5px; color: var(--muted-l); }
.lp-labcard .lp-status { justify-self: start; }
.lp-labcard-note { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--violet-ink); }
.lp-labcard-note .ic { width: 15px; height: 15px; }
.lp-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font: 600 12.5px/1 var(--body); }
.lp-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.lp-status-todo { background: rgba(22, 18, 58, .07); color: var(--muted-l); }
.lp-status-doing { background: rgba(242, 193, 78, .25); color: var(--sun-ink); }
.lp-status-done { background: rgba(52, 211, 153, .2); color: var(--ok-ink); }
.lp-hero .lp-status-todo { background: rgba(255, 255, 255, .1); color: var(--text-d); }
.lp-hero .lp-status-doing { background: rgba(242, 193, 78, .22); color: var(--sun); }
.lp-hero .lp-status-done { background: rgba(52, 211, 153, .2); color: var(--ok); }
.lp-done-on { font-size: 13px; color: var(--muted-d); }
.lp-tasks ol.steps > li { padding-inline-start: 48px; }
.lp-tasks ol.steps > li.is-done { color: var(--muted-l); }
.lp-tasks ol.steps > li.is-done > *:not(.lp-tick) { opacity: .7; }
.lp-tick { position: absolute; inset-inline-start: 0; top: 0; width: 30px; height: 30px; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.lp-tasks ol.steps > li:has(.lp-tick:checked)::before { content: "✓"; background: var(--ok); border-color: var(--ok); color: #fff; }
.lp-tasks ol.steps > li:has(.lp-tick:focus-visible)::before { outline: 2px solid var(--violet-2); outline-offset: 2px; }
.lp-progress { font: 500 13.5px/1 var(--mono); color: var(--ok-ink); background: rgba(52, 211, 153, .16); padding: 6px 10px; border-radius: 8px; }
.lp-reveal { border: 1px solid var(--line-l); border-radius: 16px; background: #fff; }
.lp-reveal > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 18px; font: 500 15.5px/1.2 var(--body); color: var(--violet-ink); }
.lp-reveal > summary::-webkit-details-marker { display: none; }
.lp-reveal > summary::before { content: "+"; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--tint-idea); font: 600 16px/1 var(--mono); }
.lp-reveal[open] > summary::before { content: "−"; }
.lp-reveal > .prose { padding: 4px 18px 18px; }
.lp-notes { margin-top: 26px; padding: 22px !important; border-radius: 20px; border: 1.5px dashed rgba(124, 58, 237, .4); background: var(--paper-3); }
.lp-notes .lp-h2 .ic { width: 24px; height: 24px; }
.lp-goal { font-size: 18px; }

/* ---------- Search ---------- */
.lp-s { position: relative; display: grid; gap: 12px; }
.lp-s-form { position: relative; display: flex; align-items: center; }
.lp-s-ic { position: absolute; inset-inline-start: 18px; width: 22px; height: 22px; color: var(--muted-d); pointer-events: none; }
.lp-s-in {
  width: 100%; height: 60px; padding-inline: 54px 54px; border-radius: 16px; border: 1px solid var(--line-d2);
  background: rgba(255, 255, 255, .06); color: #fff; font: 400 18px/1 var(--body); caret-color: var(--cyan);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
  -webkit-appearance: none; appearance: none;
}
.lp-s-in::placeholder { color: rgba(174, 168, 216, .85); }
.lp-s-in:focus { outline: none; border-color: var(--lilac); background: rgba(255, 255, 255, .09); box-shadow: 0 0 0 4px rgba(124, 58, 237, .35); }
.lp-s-in::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.lp-s-clear, .lp-s-esc { position: absolute; inset-inline-end: 10px; display: inline-grid; place-items: center; height: 38px; min-width: 38px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .08); color: var(--text-d); cursor: pointer; }
.lp-s-clear .ic { width: 16px; height: 16px; }
.lp-s-esc kbd { font: 500 12px/1 var(--mono); padding-inline: 6px; }
.lp-s-dialog .lp-s-clear { inset-inline-end: 62px; }
.lp-s-hero { max-width: 860px; margin-top: 10px; }
.lp-s-hero .lp-s-in { height: 66px; font-size: 19px; border-radius: 18px; }
.lp-s-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.lp-s-scopes { display: flex; flex-wrap: wrap; gap: 6px; }
.lp-s-scopes button { height: 32px; padding-inline: 12px; font-size: 13.5px; background: rgba(255, 255, 255, .05); color: var(--muted-d); border-color: var(--line-d); }
.lp-s-scopes button[aria-pressed="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.lp-s-help { font-size: 14px; color: var(--muted-d); }
.lp-s-help summary { cursor: pointer; width: max-content; margin-inline-start: auto; }
.lp-s-help ul { margin: 10px 0 0; padding-inline-start: 1.1em; display: grid; gap: 4px; max-width: 70ch; }
.lp-s-keys { list-style: none; margin-inline-start: -1.1em; font-family: var(--mono); font-size: 12.5px; opacity: .85; }
.lp-s-sug {
  position: absolute; z-index: 30; inset-inline: 0; top: 66px; margin: 0; padding: 6px; list-style: none;
  background: #1c1745; border: 1px solid var(--line-d2); border-radius: 14px; box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .7);
  max-height: min(380px, 60vh); overflow: auto;
}
.lp-s-hero .lp-s-sug { top: 72px; }
.lp-s-sug li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 9px 12px; border-radius: 10px; cursor: pointer; color: var(--text-d); font-size: 14.5px; }
.lp-s-sug li[aria-selected="true"] { background: rgba(124, 58, 237, .4); }
.lp-s-sug .k { font: 500 14px/1.2 var(--mono); color: #fff; }
.lp-s-sug .d { color: var(--muted-d); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-s-sug .t { font-size: 12px; color: var(--muted-d); }
.lp-s-out:empty { display: none; }
.lp-s-dialog .lp-s-out { margin-top: 4px; }
.lp-results { display: grid; gap: 10px; }
.lp-results[hidden] { display: none; }
.lp-r-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 14.5px; color: var(--muted-l); }
.lp-s-dialog .lp-r-head { color: var(--muted-d); }
.lp-rlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lp-r a { display: grid; gap: 6px; padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line-l); text-decoration: none; color: var(--ink); }
.lp-r a:hover, .lp-r a:focus-visible { border-color: var(--violet); }
.lp-r-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.lp-r-type { font: 600 11.5px/1 var(--body); padding: 4px 8px; border-radius: 6px; background: var(--paper-2); color: var(--muted-l); }
.lp-r-type-c { background: rgba(124, 58, 237, .12); color: var(--violet-ink); }
.lp-r-type-l { background: rgba(34, 195, 230, .16); color: var(--cyan-ink); }
.lp-r-type-b { background: rgba(52, 211, 153, .18); color: var(--ok-ink); }
.lp-r-t { font: 500 17px/1.3 var(--display); }
.lp-r-t code { font: 500 17px/1.2 var(--mono); color: var(--violet-ink); }
.lp-r-w { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-inline-start: auto; }
.lp-r-w span { font-size: 11.5px; padding: 3px 7px; border-radius: 6px; border: 1px solid var(--line-l); color: var(--muted-l); }
.lp-r-s { font-size: 14.5px; color: #3a3468; line-height: 1.5; }
.lp-r-x { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.lp-r-x li { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 10px; font-size: 14px; color: #3a3468; align-items: baseline; }
.lp-r-x code { font: 500 13.5px/1.5 var(--mono); color: var(--ink); background: var(--paper-2); padding: 1px 6px; border-radius: 5px; overflow-wrap: anywhere; }
.lp-r-x .lp-r-cmd code { background: var(--term); color: var(--term-text); }
.lp-r mark, .lp-s-sug mark { background: rgba(242, 193, 78, .55); color: inherit; border-radius: 3px; padding: 0 1px; }
.lp-r-more { justify-self: start; }
.lp-r-empty { padding: 18px; border-radius: 14px; background: #fff; border: 1px dashed var(--line-l); color: var(--muted-l); }
.lp-s-dialog .lp-r-empty { background: transparent; color: var(--muted-d); border-color: var(--line-d2); }
/* the search dialog */
.lp-sd { position: fixed; inset: 0; z-index: 90; display: grid; justify-items: center; align-items: start; padding: max(16px, 8vh) max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); }
.lp-sd-scrim { position: absolute; inset: 0; background: rgba(8, 6, 26, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lp-sd-box { position: relative; width: min(820px, 100%); max-height: 84vh; overflow: auto; padding: 16px; border-radius: 22px; background: var(--night-2); border: 1px solid var(--line-d2); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8); color-scheme: dark; }
.lp-sd-box .lp-results, .lp-sd-box .lp-s-out { color: var(--text-d); }
.lp-sd-box .lp-r a { background: rgba(255, 255, 255, .04); border-color: var(--line-d); color: var(--text-d); }
.lp-sd-box .lp-r a:hover, .lp-sd-box .lp-r a:focus-visible { border-color: var(--lilac); background: rgba(255, 255, 255, .07); }
.lp-sd-box .lp-r-t code { color: var(--lilac); }
.lp-sd-box .lp-r-s, .lp-sd-box .lp-r-x li { color: var(--muted-d); }
.lp-sd-box .lp-r-x code { background: rgba(255, 255, 255, .08); color: var(--text-d); }
.lp-sd-box .lp-r-type { background: rgba(255, 255, 255, .08); color: var(--text-d); }
.lp-sd-box .lp-r-w span { border-color: var(--line-d); color: var(--muted-d); }
.lp-sd-box .btn-ink { background: var(--paper); color: var(--ink); }
body.lp-sd-open { overflow: hidden; }

/* ---------- 404 ---------- */
.lp-404-links { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.lp-p-404 .lp-hero { min-height: 70vh; }

/* ---------- Footer ---------- */
.lp-footer, .lp-body .site-footer, body .site-footer { position: relative; z-index: 1; }

/* ---------- Arabic ---------- */
:lang(ar) .prose, :lang(ar) .co, :lang(ar) .ex-note, :lang(ar) .lp-opts dd { line-height: 1.9; }
:lang(ar) .prose code, :lang(ar) .co code, :lang(ar) .lp-opts dd code, :lang(ar) .ex-note code, :lang(ar) .lesson-idea code { direction: ltr; unicode-bidi: isolate; display: inline-block; line-height: 1.5; }
:lang(ar) .lp-chip code, :lang(ar) .lp-cmdrow-n code { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .lp-cmdrow-m { justify-content: flex-start; }
[dir="rtl"] .lp-r-x li { direction: rtl; }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  :root { --lp-head: 92px; }
  .lp-hero { padding-block: calc(var(--lp-head) + 22px) 58px; }
  .lp-body { border-radius: 22px 22px 0 0; }
  .prose { font-size: 16.5px; }
  .term code { font-size: 13.5px; }
  .term pre { padding: 13px 14px; }
  .lp-s-in, .lp-s-hero .lp-s-in { height: 56px; font-size: 16.5px; padding-inline: 48px 48px; }
  .lp-s-ic { inset-inline-start: 15px; }
  .lp-s-sug, .lp-s-hero .lp-s-sug { top: 62px; }
  .lp-s-sug li { grid-template-columns: auto minmax(0, 1fr); }
  .lp-s-sug .t { display: none; }
  .lp-stats b { font-size: 25px; }
  .lp-man, .lp-notes { padding: 18px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .lp *, .lp *::before, .lp *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .lp-toc, .lp-footer, .site-footer, .lp-sd, .copy, .copy-all, .ln-copy, .lp-ftools, .lp-s, .lp-pn { display: none !important; }
  .lp, .lp-hero { background: #fff !important; color: #000; }
  .lp-hero::before, .lp-hero::after { display: none; }
  .lp-hero { padding: 0 0 12px; }
  .lp-h1, .lp-lead, .lp-crumbs, .lp-kicker { color: #000 !important; }
  .lp-body { margin: 0; border-radius: 0; padding: 0; }
  .lp-doc { grid-template-columns: 1fr; }
  .term { break-inside: avoid; }
  details > *:not(summary) { display: block !important; }
}
[dir="rtl"] .lp-cmdname { text-align: right; }

/* ---------- Search band on every study page (same search as the notes app, over everything) ---------- */
.lp-band { margin-bottom: 10px; }
.lp-s-band { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 10px; align-items: start; }
.lp-s-band .lp-s-form { grid-column: 1; }
.lp-s-band .lp-s-in { height: 54px; font-size: 16.5px; border-radius: 14px; padding-inline: 50px 84px; }
.lp-s-band .lp-s-ic { inset-inline-start: 16px; }
.lp-s-band .lp-s-clear { inset-inline-end: 44px; height: 32px; min-width: 32px; }
.lp-s-kbd { position: absolute; inset-inline-end: 12px; font: 500 12px/1 var(--mono); color: var(--muted-d); border: 1px solid var(--line-d2); border-radius: 7px; padding: 5px 8px; pointer-events: none; }
.lp-s-band .lp-s-in:focus ~ .lp-s-kbd { opacity: 0; }
.lp-s-app { grid-column: 2; grid-row: 1; display: inline-flex; align-items: center; gap: 8px; height: 54px; padding-inline: 18px; border-radius: 14px;
  border: 1px solid var(--line-d2); background: rgba(255, 255, 255, .06); color: var(--text-d); font: 600 15px/1 var(--body); text-decoration: none; white-space: nowrap; }
.lp-s-app:hover, .lp-s-app:focus-visible { border-color: var(--lilac); background: rgba(255, 255, 255, .1); }
.lp-s-app .ic { width: 18px; height: 18px; }
.lp-s-band .lp-s-sug { top: 60px; inset-inline-end: 0; }
.lp-s-band .lp-s-bar, .lp-s-band .lp-s-out { grid-column: 1 / -1; }
.lp-s-band .lp-s-out { max-height: min(70vh, 720px); overflow: auto; padding: 4px; border-radius: 16px; }
.lp-s-band .lp-r-head { color: var(--muted-d); margin-bottom: 8px; }
.lp-r-app { display: inline-flex; margin-bottom: 10px; color: var(--cyan); font-weight: 600; text-decoration: none; }
.lp-r-app:hover { text-decoration: underline; }
.lp-r-type-n { background: rgba(34, 195, 230, .14); color: #0e7490; }
@media (max-width: 640px) {
  .lp-s-band { grid-template-columns: minmax(0, 1fr) auto; }
  .lp-s-band .lp-s-in { height: 50px; padding-inline: 44px 44px; }
  .lp-s-kbd { display: none; }
  .lp-s-band .lp-s-clear { inset-inline-end: 8px; }
  .lp-s-app { height: 50px; padding-inline: 13px; }
  .lp-s-app span { display: none; }
}
@media print { .lp-band { display: none !important; } }

/* ---------- Review questions (Q: / A:) — the answer opens on click ---------- */
details.qa { border: 1px solid var(--line-l); border-radius: 14px; background: #fff; margin: 10px 0; }
details.qa summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 14px 16px; font-weight: 500; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: "Show answer"; font: 500 12px/1 var(--mono); color: var(--violet-ink, #5b21b6); white-space: nowrap; }
:lang(nl) details.qa summary::after { content: "Toon antwoord"; }
:lang(ar) details.qa summary::after { content: "أظهر الإجابة"; font-family: "Plex Arabic", system-ui, sans-serif; }
details.qa[open] summary::after { content: "Hide"; }
:lang(nl) details.qa[open] summary::after { content: "Verberg"; }
:lang(ar) details.qa[open] summary::after { content: "إخفاء"; }
.qa-n { display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 8px; background: var(--paper, #f4f2ff); font: 600 12.5px/1 var(--mono); color: var(--ink); }
.qa-a { padding: 0 16px 14px 54px; color: var(--muted-l); }
:lang(ar) .qa-a { padding: 0 54px 14px 16px; }
.qa-a p { margin: 0; }
details.qa[open] { border-color: var(--violet); }
@media print { details.qa .qa-a { display: block; } }
