/* The user guide (guide.html, guide-<lang>.html; built by scripts/build-guide.mjs).
   Self-contained like legal.css: no fonts CDN, no app stylesheet, no script. Light and
   dark follow the system. Logical properties throughout, so Arabic mirrors itself. */
:root {
  --bg: #fcfbf8;
  --card: #ffffff;
  --text: #24221d;
  --text-light: #5f5a4f;
  --border: #e6e1d6;
  --accent: #4b4bd6;
  --accent-soft: #ecebfd;
  --note: #f6f3ec;
  --shadow: 0 1px 2px rgba(30, 25, 15, 0.06), 0 8px 24px rgba(30, 25, 15, 0.08);
  --plan-free: #5b6170;
  --plan-plus: #0b7cb4;
  --plan-business: #4b4bd6;
  --plan-enterprise: #6d35d6;
  --yes: #1f7a4d;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17161b;
    --card: #201f26;
    --text: #ece9e2;
    --text-light: #b4afa4;
    --border: #34323c;
    --accent: #a5a3ff;
    --accent-soft: #2a2950;
    --note: #23222a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
    --plan-free: #b3b8c4;
    --plan-plus: #6cc6f2;
    --plan-business: #a5a3ff;
    --plan-enterprise: #c3a3ff;
    --yes: #6fd39f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #17161b;
  --card: #201f26;
  --text: #ece9e2;
  --text-light: #b4afa4;
  --border: #34323c;
  --accent: #a5a3ff;
  --accent-soft: #2a2950;
  --note: #23222a;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  --plan-free: #b3b8c4;
  --plan-plus: #6cc6f2;
  --plan-business: #a5a3ff;
  --plan-enterprise: #c3a3ff;
  --yes: #6fd39f;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", "Noto Sans", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible, .gd-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- top bar ---- */
.gd-bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px;
  padding: 12px max(16px, calc((100vw - 1180px) / 2));
  background: var(--bg);
  border-block-end: 1px solid var(--border);
}
.gd-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 17px; }
/* the brand mark, as on the landing page (css/landing.css .lp-logo) */
.gd-logo {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(150deg, #7c78ff 0%, #5b5bef 52%, #4a44cf 100%);
  box-shadow: 0 2px 10px rgba(75, 73, 221, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.gd-logo svg { width: 62%; height: 62%; display: block; }
.gd-logo .ring { fill: none; stroke: #fff; stroke-opacity: 0.92; stroke-width: 1.5; }
.gd-logo .core, .gd-logo .sat { fill: #fff; }
.gd-langs { margin-inline-start: auto; }
.gd-langs ul { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; margin: 0; padding: 0; font-size: 14px; }
.gd-langs a { color: var(--text-light); text-decoration: none; }
.gd-langs a:hover { color: var(--text); text-decoration: underline; }
.gd-langs a[aria-current="page"] { color: var(--text); font-weight: 600; }
.gd-open {
  flex: none; padding: 8px 14px; border-radius: 9px;
  background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; font-size: 14px;
}
:root[data-theme="dark"] .gd-open { color: #17161b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gd-open { color: #17161b; } }

/* ---- hero ---- */
.gd-hero { max-width: 1180px; margin: 0 auto; padding: 56px 16px 24px; }
.gd-hero h1 { margin: 0 0 12px; font-size: clamp(32px, 5vw, 46px); line-height: 1.12; letter-spacing: -0.01em; }
.gd-lead { margin: 0; max-width: 720px; font-size: 19px; color: var(--text-light); }
.gd-meta { margin: 16px 0 0; font-size: 14px; color: var(--text-light); }

/* ---- layout: contents beside the text on wide screens ---- */
.gd-layout { max-width: 1180px; margin: 0 auto; padding: 8px 16px 48px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; }
.gd-toc { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 96px); overflow: auto; padding-block: 8px; }
.gd-toc-title { margin: 0 0 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-light); }
.gd-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.gd-toc li { counter-increment: toc; }
.gd-toc a {
  display: block; padding: 5px 10px; border-radius: 7px;
  color: var(--text-light); text-decoration: none; font-size: 14px; line-height: 1.4;
}
.gd-toc a::before { content: counter(toc) "."; display: inline-block; min-width: 1.6em; color: var(--text-light); opacity: 0.7; }
.gd-toc a:hover { background: var(--accent-soft); color: var(--text); }
.gd-toc .ui { font-weight: inherit; }
.gd-main { min-width: 0; max-width: 780px; }

/* ---- sections ---- */
.gd-sect { padding-block: 28px; border-block-start: 1px solid var(--border); }
.gd-sect:first-child { border-block-start: 0; padding-block-start: 8px; }
.gd-sect h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px; font-size: 27px; line-height: 1.25; }
.gd-sect h3 { margin: 26px 0 8px; font-size: 19px; }
.gd-sect p { margin: 0 0 14px; }
.gd-plan {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; line-height: 1.5; letter-spacing: 0.01em;
  color: var(--plan-c); border: 1px solid currentColor; background: transparent;
}
.gd-plan-free { --plan-c: var(--plan-free); }
.gd-plan-plus { --plan-c: var(--plan-plus); }
.gd-plan-business { --plan-c: var(--plan-business); }
.gd-plan-enterprise { --plan-c: var(--plan-enterprise); }

.ui { font-weight: 600; }
kbd {
  display: inline-block; min-width: 1.6em; padding: 1px 6px;
  font: 600 0.84em/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace;
  text-align: center; color: var(--text);
  background: var(--card); border: 1px solid var(--border); border-block-end-width: 2px; border-radius: 5px;
  unicode-bidi: isolate; direction: ltr;
}

.gd-steps, .gd-list { margin: 0 0 16px; padding-inline-start: 1.5em; }
.gd-steps li, .gd-list li { margin: 0 0 8px; padding-inline-start: 4px; }
.gd-steps li::marker { color: var(--accent); font-weight: 700; }
.gd-note {
  padding: 12px 16px; border-radius: 10px;
  background: var(--note); border-inline-start: 3px solid var(--accent);
}

/* ---- pictures ---- */
.gd-fig { margin: 20px 0 24px; }
.gd-fig img {
  display: block; width: 100%;
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); background: var(--card);
}
.gd-fig figcaption { margin-top: 10px; font-size: 14px; color: var(--text-light); text-align: center; }

/* ---- tables ---- */
.gd-table-wrap { position: relative; overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.gd-table-wrap table { width: 100%; border-collapse: collapse; font-size: 15px; }
.gd-table-wrap th, .gd-table-wrap td { padding: 10px 14px; text-align: start; border-block-end: 1px solid var(--border); vertical-align: top; }
.gd-table-wrap tbody tr:last-child > * { border-block-end: 0; }
.gd-table-wrap thead th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-light); background: var(--note); }
.gd-compare thead th:not(:first-child), .gd-compare td { text-align: center; white-space: nowrap; }
.gd-compare tbody th { font-weight: 500; min-width: 11em; }
.gd-yes { color: var(--yes); font-weight: 700; font-size: 17px; }
.gd-no { color: var(--text-light); opacity: 0.6; }
.gd-keys td:first-child { white-space: nowrap; width: 1%; }

/* ---- footer ---- */
.gd-foot {
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: center;
  padding: 28px 16px 40px; border-block-start: 1px solid var(--border); font-size: 14px;
}

/* ---- narrow screens: the contents go above the text ---- */
@media (max-width: 900px) {
  .gd-layout { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .gd-toc { position: static; max-height: none; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
  .gd-toc ol { columns: 2; column-gap: 16px; }
  .gd-hero { padding-top: 36px; }
}
@media (max-width: 560px) {
  html { scroll-padding-top: 112px; }
  .gd-bar { flex-wrap: wrap; gap: 8px 10px; padding-block: 10px 8px; }
  /* the six languages on one line that scrolls sideways, never over the text */
  .gd-langs { order: 3; width: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; }
  .gd-langs::-webkit-scrollbar { display: none; }
  .gd-langs ul { flex-wrap: nowrap; white-space: nowrap; gap: 16px; }
  .gd-table-wrap table { font-size: 14px; }
  .gd-table-wrap thead th { font-size: 11px; letter-spacing: 0; }
  /* all four plans fit a phone's width: a narrower feature column, tighter plan columns */
  .gd-compare tbody th { min-width: 8.5em; }
  .gd-compare th:not(:first-child), .gd-compare td { padding-inline: 5px; }
  .gd-open { margin-inline-start: auto; }
  .gd-toc ol { columns: 1; }
  .gd-sect h2 { font-size: 23px; }
  .gd-lead { font-size: 17px; }
  .gd-table-wrap th, .gd-table-wrap td { padding: 8px 10px; }
}
@media print {
  .gd-bar, .gd-toc, .gd-foot { display: none; }
  .gd-layout { display: block; }
  .gd-fig img { box-shadow: none; }
}
