/* Shared look for the three guides. Self-contained: system fonts only, so the
   files open from a USB stick on a machine with no internet. */
:root {
  --ink: #1f3a5f;
  --text: #1f2933;
  --muted: #5f6b7a;
  --line: #d7dee7;
  --bg: #f4f7fa;
  --surface: #fff;
  --warn-bg: #fdf3dc;
  --warn-line: #e3b341;
  --ok-bg: #e7f5ec;
  --ok-line: #34a05a;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.85 'Segoe UI', Tahoma, 'Noto Naskh Arabic', system-ui, sans-serif;
}

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px 60px; }

header.top {
  background: var(--ink);
  color: #fff;
  padding: 28px 0 24px;
  margin-bottom: 26px;
}
header.top .wrap { padding-bottom: 0; }
header.top .brand { display: flex; align-items: center; gap: 14px; }
header.top img { width: 46px; height: 46px; background: #fff; border-radius: 8px; padding: 4px; }
header.top h1 { margin: 0; font-size: 26px; }
header.top .sub { color: #b9c7d8; font-size: 14px; margin-top: 2px; }
header.top nav { margin-top: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
header.top nav a {
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  padding: 5px 12px;
  font-size: 13px;
}
header.top nav a:hover { background: rgba(255, 255, 255, 0.14); }

.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 22px;
  margin-bottom: 26px;
}
.toc h2 { margin: 0 0 8px; font-size: 16px; color: var(--ink); }
.toc ol { margin: 0; padding-inline-start: 22px; columns: 2; column-gap: 32px; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--ink); text-decoration: underline; }

section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 24px 22px;
  margin-bottom: 18px;
}
section > h2 {
  margin: 0 0 6px;
  font-size: 20px;
  color: var(--ink);
  border-bottom: 2px solid var(--line);
  padding-bottom: 8px;
}
section h3 { font-size: 16px; color: var(--ink); margin: 20px 0 4px; }
section p { margin: 8px 0; }
section ul, section ol { margin: 8px 0; padding-inline-start: 24px; }
section li { margin: 4px 0; }

.lead { color: var(--muted); font-size: 14.5px; }

table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
th, td { border: 1px solid var(--line); padding: 7px 10px; text-align: start; vertical-align: top; }
th { background: var(--ink); color: #fff; font-weight: 600; }
tbody tr:nth-child(even) td { background: #f7f9fc; }

.note, .warn, .ok {
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--ink);
  background: #f7f9fc;
  border-radius: 6px;
  padding: 10px 14px;
  margin: 12px 0;
  font-size: 14px;
}
.warn { border-inline-start-color: var(--warn-line); background: var(--warn-bg); }
.ok { border-inline-start-color: var(--ok-line); background: var(--ok-bg); }

kbd, code {
  font-family: ui-monospace, Consolas, 'Courier New', monospace;
  background: #eef2f7;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 13px;
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}
pre { background: #10233c; color: #e6edf5; padding: 12px 16px; border-radius: 6px; overflow: auto; direction: ltr; text-align: left; font-size: 13px; }
pre code { background: none; border: 0; color: inherit; padding: 0; }

.path { color: var(--ink); font-weight: 600; }
.steps { counter-reset: step; list-style: none; padding-inline-start: 0; }
.steps > li { counter-increment: step; position: relative; padding-inline-start: 34px; margin: 10px 0; }
.steps > li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

footer.credit {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 26px 0 10px;
  border-top: 1px solid var(--line);
  margin-top: 26px;
}
footer.credit a { color: var(--ink); }

@media print {
  body { background: #fff; }
  header.top { background: #fff; color: var(--ink); border-bottom: 3px solid var(--ink); }
  header.top .sub { color: var(--muted); }
  header.top nav, .toc { display: none; }
  section { break-inside: avoid; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding-inline: 0; }
  tr { break-inside: avoid; }
  @page { size: A4; margin: 14mm; }
}

/* Live screenshots from the running app. */
figure { margin: 16px 0; }
figure img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(16, 35, 60, 0.08);
}
figure.phone img { max-width: 330px; margin: 0 auto; }
figcaption { color: var(--muted); font-size: 13px; margin-top: 8px; text-align: center; }
@media print {
  figure img { box-shadow: none; }
  figure { break-inside: avoid; }
}

/* Footer credit: the author's name and the Calaix AI mark, as in the app. */
footer.credit .credit-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}
footer.credit .sep { color: var(--muted); opacity: 0.45; }
footer.credit .powered {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--muted);
}
footer.credit .powered img { height: 24px; width: auto; display: block; }
footer.credit .powered:hover { color: var(--ink); }
