/* Guide pages: same palette and type as the app, set for reading. */
:root {
  color-scheme: light;
  --accent: #1b6970; --accent-soft: #cde7eb; --accent-ink: #e9fdff;
  --ink: #2a3435; --muted: #566162; --line: #dae4e6;
  --bg: #f6fafa; --card: #fff; --bar: #e7eff0;
  --danger: #c43030; --danger-soft: #f6d4d4; --ok: #12734f;
  --g-paper: #fff; --g-line: #d3dcde; --g-forb: #e3e9eb; --g-ink: #2a3435;
  --font: "Google Sans Flex", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --accent: #7fd0d9; --accent-soft: #1f3e42; --accent-ink: #0f1718;
    --ink: #dde7e9; --muted: #93a2a4; --line: #2b3637;
    --bg: #121a1b; --card: #1c2526; --bar: #172021;
    --danger: #ff8a80; --danger-soft: #4a2626; --ok: #6fd3a6;
    --g-paper: #1c2526; --g-line: #33403f; --g-forb: #263132; --g-ink: #dde7e9;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --accent: #7fd0d9; --accent-soft: #1f3e42; --accent-ink: #0f1718;
  --ink: #dde7e9; --muted: #93a2a4; --line: #2b3637;
  --bg: #121a1b; --card: #1c2526; --bar: #172021;
  --danger: #ff8a80; --danger-soft: #4a2626; --ok: #6fd3a6;
  --g-paper: #1c2526; --g-line: #33403f; --g-forb: #263132; --g-ink: #dde7e9;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 var(--font); }
a { color: var(--accent); text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }

/* Top bar */
.site { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: color-mix(in srgb, var(--bar) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.home { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; margin-right: auto; }
.home svg { width: 26px; height: 26px; color: var(--accent); }
.home span { font-weight: 700; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; }
.home b { color: var(--accent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 20px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 650; font-size: 15px; text-decoration: none; transition: filter .15s, transform .15s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.97); }
.site .btn { min-height: 40px; padding: 0 16px; font-size: 14px; }

/* Article */
main { max-width: 720px; margin: 0 auto; padding: 36px 16px 72px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 0 0 14px; font-size: clamp(30px, 6vw, 42px); line-height: 1.12; letter-spacing: -.01em; }
.lede { margin: 0 0 14px; font-size: 19.5px; line-height: 1.55; }
.byline { margin: 0 0 32px; color: var(--muted); font-size: 14px; }
h2 { margin: 44px 0 10px; font-size: 24px; line-height: 1.25; }
h3 { margin: 28px 0 6px; font-size: 18.5px; line-height: 1.3; }
p, li { margin: 0 0 14px; }
ul, ol { padding-left: 22px; margin: 0 0 16px; }
li { margin-bottom: 8px; }
sup a { text-decoration: none; font-size: 12px; font-weight: 700; padding: 0 1px; }
[lang="ar"] { unicode-bidi: isolate; direction: rtl; font-family: "Noto Naskh Arabic", "Geeza Pro", "Arial", serif; font-size: 1.12em; }
.note { margin: 20px 0; padding: 14px 18px; border-radius: 14px; background: var(--accent-soft); }
.note p:last-child { margin: 0; }

/* Steps */
.steps { list-style: none; padding: 0; counter-reset: step; }
.steps > li { position: relative; padding-left: 48px; margin-bottom: 22px; counter-increment: step; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 15px; }
.steps h3 { margin: 0 0 4px; }

/* Grid figures */
figure { margin: 24px 0; }
figcaption { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.kgrid { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: clamp(12px, 3vw, 20px); }
.kgrid svg { margin: 0 auto; width: 100%; height: auto; }
.kgrid.wide svg { max-width: 360px; }
.photo { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: clamp(16px, 5vw, 36px); }
.photo img { width: 100%; max-width: 380px; height: auto; margin: 0 auto; }
.kgrid.word svg { max-width: 320px; max-height: 260px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 28px; }
.pair figure { margin: 0; }
.pair .kgrid svg { max-width: 180px; }
.pair figcaption { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.pair figcaption::before { flex: none; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; font-size: 12px; font-weight: 800; color: #fff; }
.pair figure:not(.no, .yes) figcaption::before { display: none; }
.pair .no figcaption { color: var(--danger); }
.pair .no figcaption::before { content: "✕"; background: var(--danger); color: var(--card); }
.pair .yes figcaption { color: var(--ok); }
.pair .yes figcaption::before { content: "✓"; background: var(--ok); color: var(--card); }
.kg-paper { fill: var(--g-paper); }
.kg-line { stroke: var(--g-line); stroke-width: 1px; vector-effect: non-scaling-stroke; fill: none; }
.kg-forb { fill: var(--g-forb); }
.kg-ink { fill: var(--g-ink); }
.kg-acc { fill: var(--accent); }
.kg-err { fill: var(--danger); }
.kg-soft { fill: var(--danger-soft); }

/* Try it, sources, more guides */
.try { margin: 40px 0; padding: 24px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.try p { margin: 0; flex: 1 1 260px; }
.try b { display: block; font-size: 18px; margin-bottom: 2px; }
.sources { font-size: 14.5px; color: var(--muted); }
.sources li { margin-bottom: 6px; overflow-wrap: anywhere; }
.more { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.more a { display: block; padding: 16px 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.more a:hover { border-color: var(--accent); transform: translateY(-2px); }
.more b { display: block; color: var(--accent); margin-bottom: 2px; }
.more span { color: var(--muted); font-size: 14.5px; line-height: 1.45; }
footer { max-width: 720px; margin: 0 auto; padding: 24px 16px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer a { color: var(--muted); }

@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .lede { font-size: 18px; }
  .site .home span { display: none; }
  .more { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
