/* Shared styles for every page of the site. */
:root {
  --bg: #f7f7f5; --surface: #ffffff; --panel: rgba(255,255,255,0.96); --text: #1d1d1f;
  --muted: #5f6368; --border: #d9d9d9; --accent: #2456a6; --accent-text: #ffffff;
  --flag: #9a5b00; --focus: #f2a900; --header-h: 48px; --map-bg: #e6e6e3;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161618; --surface: #1f1f22; --panel: rgba(31,31,34,0.96); --text: #f2f2f2;
    --muted: #a8a8ad; --border: #3a3a3c; --accent: #8db8ff; --accent-text: #0b1a33;
    --flag: #f0b45a; --map-bg: #2a2a2d;
  }
}
:root[data-theme="dark"] {
  --bg: #161618; --surface: #1f1f22; --panel: rgba(31,31,34,0.96); --text: #f2f2f2;
  --muted: #a8a8ad; --border: #3a3a3c; --accent: #8db8ff; --accent-text: #0b1a33;
  --flag: #f0b45a; --map-bg: #2a2a2d;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--surface);
  color: var(--text); padding: 8px 12px; border-radius: 6px; border: 1px solid var(--border); }
.skip:focus { top: 8px; }

/* header */
.site-header { height: var(--header-h); display: flex; align-items: center; gap: 16px;
  padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { font-weight: 650; color: var(--text); text-decoration: none; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.site-header nav { margin-left: auto; display: flex; gap: 4px; }
.site-header nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 6px;
  white-space: nowrap; }
.site-header nav a:hover { color: var(--text); background: var(--bg); }
.site-header nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.short { display: none; }
@media (max-width: 720px) {
  .site-header { gap: 8px; padding: 0 8px; }
  .site-header nav { gap: 0; }
  .site-header nav a { padding: 6px 7px; }
  .long { display: none; }
  .short { display: inline; }
}

/* text pages */
.page { max-width: 720px; margin: 0 auto; padding: 24px 16px 48px; }
.page h1 { font-size: 28px; line-height: 1.2; margin: 8px 0 12px; }
.page h2 { font-size: 20px; margin: 32px 0 8px; }
.page p, .page li { max-width: 68ch; }
.page .lede { font-size: 17px; color: var(--muted); }
.page table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 8px 0; }
.page th, .page td { text-align: left; border-bottom: 1px solid var(--border); padding: 6px 8px 6px 0;
  vertical-align: top; }
.page td.n, .page th.n { text-align: right; font-variant-numeric: tabular-nums; }
.page .note { border-left: 3px solid var(--border); padding: 4px 12px; color: var(--muted); }
.site-footer { max-width: 720px; margin: 0 auto; padding: 16px; color: var(--muted); font-size: 13px;
  border-top: 1px solid var(--border); }
kbd { font: 12px/1 ui-monospace, Consolas, monospace; border: 1px solid var(--border);
  border-bottom-width: 2px; border-radius: 4px; padding: 2px 5px; background: var(--surface); }

/* small on/off switches in the side panel */
.check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin: 2px 0 6px; cursor: pointer; width: fit-content; }
.check input { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); cursor: pointer; }

/* Hebrew pages run right to left */
html[dir="rtl"] .site-header nav { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .skip { left: auto; right: 8px; }
