/* Shared by the Hebrew (RTL) and English (LTR) pages. Everything directional
   uses logical properties so a single rule works in both. */

:root {
  color-scheme: light dark;

  --bg: #f2f6f7;
  --surface: #ffffff;
  --border: #dbe6e9;
  --ink: #0d2430;
  --muted: #5d757f;
  --accent: #0b7a66;
  --accent-soft: #e6f7f3;
  --brand-deep: #061c25;
  --brand-mid: #0b3540;
  --mark: #2fe3b8;
  --shadow: 0 1px 2px rgba(13, 36, 48, 0.06), 0 8px 24px rgba(13, 36, 48, 0.05);

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Hebrew",
    "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #071319;
    --surface: #0e222b;
    --border: #1d3a45;
    --ink: #e8f1f3;
    --muted: #93aab3;
    --accent: #47dfbe;
    --accent-soft: #102f31;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- header ---------- */

header {
  background: linear-gradient(135deg, var(--brand-deep), var(--brand-mid));
  color: #fff;
  padding: 22px 20px;
}

.header-inner,
main,
footer {
  width: min(720px, calc(100% - 36px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--mark);
  color: #06222b;
  font-size: 17px;
  font-weight: 900;
}

.lang {
  padding: 6px 13px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.lang:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.5);
}

/* ---------- document body ---------- */

main { padding: 44px 0 60px; }

h1 {
  margin: 0 0 8px;
  font-size: clamp(29px, 6.5vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

h2 {
  margin: 40px 0 10px;
  padding-top: 4px;
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

p { margin: 0 0 13px; }

main ul {
  margin: 12px 0 16px;
  padding-inline-start: 20px;
}

main li {
  margin-bottom: 8px;
  padding-inline-start: 4px;
}

strong { font-weight: 800; }

a {
  color: var(--accent);
  font-weight: 700;
  text-underline-offset: 3px;
}

.updated {
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 14.5px;
}

.notice {
  margin: 0 0 8px;
  padding: 15px 18px;
  border: 1px solid var(--border);
  border-inline-start: 4px solid var(--accent);
  border-radius: 10px;
  background: var(--accent-soft);
}

/* ---------- home page cards ---------- */

.links {
  display: grid;
  gap: 11px;
  margin-top: 26px;
}

.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 19px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: inherit;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.link-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.link-card span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
}

/* The chevron points along the reading direction in both languages. */
.link-card::after {
  content: "›";
  flex: none;
  color: var(--accent);
  font-size: 22px;
  line-height: 1;
}

[dir="rtl"] .link-card::after { content: "‹"; }

/* ---------- footer ---------- */

footer {
  padding: 22px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 480px) {
  header { padding: 18px 16px; }
  main { padding: 32px 0 48px; }
  h2 { margin-top: 32px; }
  .brand { font-size: 17px; }
}
