/* The help centre: the download page's palette and type, set for reading. Source of truth; scripts/help.mjs copies it. */
:root {
  --ink: #16201b;
  --muted: #5f6b64;
  --ground: #eef2ee;
  --paper: #ffffff;
  --olive: #2f5d3a;
  --olive-soft: #e3ece5;
  --line: #d5ddd7;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #e6ece7; --muted: #a3b0a7; --ground: #121a15; --paper: #18221c; --olive: #8fc79c; --olive-soft: #22362a; --line: #2c3a31; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 17px/1.8 "IBM Plex Sans Arabic", system-ui, sans-serif; }
a { color: var(--olive); }
:focus-visible { outline: 3px solid var(--olive); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; height: auto; display: block; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }

.top { background: var(--paper); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 24px/1 "Reem Kufi", sans-serif; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.crumb { color: var(--muted); text-decoration: none; font-size: 16px; padding-inline-start: 18px; border-inline-start: 1px solid var(--line); }
.crumb:hover { color: var(--ink); }
.dl { margin-inline-start: auto; background: var(--olive); color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 18px; border-radius: 10px; }
@media (prefers-color-scheme: dark) { .dl { color: #102015; } }

.layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; padding-block: 40px 64px; align-items: start; }
.toc { position: sticky; top: 24px; }
.toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a { display: block; padding: 7px 14px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 15px; border-inline-start: 3px solid transparent; }
.toc a:hover { background: var(--paper); }
.toc a[aria-current] { background: var(--paper); border-inline-start-color: var(--olive); font-weight: 600; }

main { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 40px clamp(20px, 5vw, 56px) 32px; min-width: 0; }
main > * { max-width: 72ch; }
main > figure, main > .cards, main > .pager { max-width: none; }
h1, h2 { font-family: "Reem Kufi", "IBM Plex Sans Arabic", sans-serif; font-weight: 700; line-height: 1.25; margin: 0; }
h1 { font-size: clamp(30px, 4vw, 40px); margin-bottom: 10px; }
h2 { font-size: 24px; margin: 40px 0 14px; }
p { margin: 0 0 14px; }
.lead { font-size: 19px; color: var(--muted); margin-bottom: 8px; }
.ui { font-weight: 600; background: var(--olive-soft); padding: 1px 7px; border-radius: 6px; white-space: nowrap; }
kbd { font: 600 13px/1 "IBM Plex Sans Arabic", sans-serif; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 3px 6px; background: var(--ground); }

/* a numbered list only where the order matters: steps */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 12px; }
.steps li { counter-increment: s; position: relative; padding-inline-start: 44px; min-height: 30px; }
.steps li::before { content: counter(s); position: absolute; inset-inline-start: 0; top: 1px; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--olive); color: var(--olive); font: 700 15px/26px "Reem Kufi", sans-serif; text-align: center; }
.plain { padding-inline-start: 20px; margin: 0 0 18px; display: grid; gap: 8px; }
.note { background: var(--ground); border-inline-start: 4px solid var(--olive); padding: 12px 16px; border-radius: 0 10px 10px 0; font-size: 16px; margin-top: 18px; }
[dir="rtl"] .note { border-radius: 10px 0 0 10px; }
.device { background: var(--olive-soft); border: 1px solid var(--line); padding: 12px 16px; border-radius: 10px; margin: 18px 0; }
.device.desktop { background: var(--paper); }
/* the home page points phone visitors at the phone page (shown, never a redirect) */
.phone-visit { display: none; }
@media (max-width: 760px), (pointer: coarse) and (max-width: 1100px) { .phone-visit { display: block; } }

figure { margin: 22px 0 26px; }
figure img { border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(22, 32, 27, .08); }
figcaption { font-size: 15px; color: var(--muted); margin-top: 8px; }
figure.video a { position: relative; display: block; }
figure.video img { aspect-ratio: 16 / 9; width: 100%; height: auto; object-fit: cover; }
figure.video a::after { content: ""; position: absolute; top: 50%; left: 50%; width: 72px; height: 50px; transform: translate(-50%, -50%); border-radius: 14px; transition: background-color .15s;
  background: rgba(22, 32, 27, .78) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 28px no-repeat; }
figure.video a:hover::after, figure.video a:focus-visible::after { background-color: var(--olive); }

.cards { list-style: none; padding: 0; margin: 28px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.cards a { display: block; height: 100%; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; transition: border-color .15s, background .15s; }
.cards a:hover { border-color: var(--olive); background: var(--ground); }
.cards b { display: block; font: 700 20px/1.3 "Reem Kufi", sans-serif; margin-bottom: 4px; }
.cards span { color: var(--muted); font-size: 15px; }

.faq dt { font-weight: 600; margin-top: 18px; }
.faq dd { margin: 4px 0 0; color: var(--muted); }

.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); }
.pager a { display: grid; text-decoration: none; padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font-weight: 600; }
.pager a:hover { border-color: var(--olive); }
.pager small { color: var(--muted); font-weight: 400; font-size: 13px; }
.pager .next { text-align: end; }

footer { padding: 0 0 40px; font-size: 14px; color: var(--muted); }
footer .yt { display: inline-flex; vertical-align: middle; color: var(--muted); }
footer .yt:hover { color: var(--olive); }

/* search: a box in the header of every page, a big one on the front page, results drop under it */
.search { position: relative; flex: 1; max-width: 440px; }
.search input { width: 100%; font: inherit; font-size: 15px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--ground); color: var(--ink); }
.search input:focus { border-color: var(--olive); outline: none; box-shadow: 0 0 0 3px var(--olive-soft); }
.search ul { position: absolute; inset-inline: 0; top: calc(100% + 6px); z-index: 10; list-style: none; margin: 0; padding: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(22, 32, 27, .16); max-height: 70vh; overflow: auto; }
.search li a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
.search li a:hover, .search li a:focus { background: var(--ground); }
.search li small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }
.search .none { padding: 10px 12px; color: var(--muted); font-size: 14px; }
.search.big { max-width: none; margin: 22px 0 6px; }
.search.big input { font-size: 18px; padding: 15px 18px; border-radius: 12px; background: var(--paper); }
/* a section's page: its articles, each a page of its own, with the opening of each */
.arts { list-style: none; padding: 0; margin: 22px 0 0; border-top: 1px solid var(--line); }
.arts a { display: block; padding: 14px 6px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.arts a:hover { background: var(--ground); }
.arts b { display: block; font-size: 18px; margin-bottom: 2px; }
.arts span { display: block; color: var(--muted); font-size: 15px; line-height: 1.6; }
/* an article's way back to its section, above its heading */
.up { font-size: 15px; margin-bottom: 6px; }
.up a { color: var(--muted); text-decoration: none; }
.up a:hover { color: var(--ink); }
section { scroll-margin-top: 16px; }
section:target h2 { color: var(--olive); }

@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 20px; }
  .toc { position: static; min-width: 0; }
  .ui { white-space: normal; }
  .toc ul { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none; }
  .toc a { white-space: nowrap; border: 1px solid var(--line); border-inline-start-width: 1px; background: var(--paper); }
  .toc a[aria-current] { border-color: var(--olive); }
  .crumb { display: none; }
  .top .wrap { flex-wrap: wrap; padding-block: 10px; }
  .top .search { order: 3; flex-basis: 100%; max-width: none; }
  main { padding-top: 28px; }
}
