:root {
    --paper: #f7f4ee; --paper-2: #efeae0; --ink: #17150f; --ink-2: #4a463c; --muted: #7b7568;
    --line: #ddd6c8; --accent: #5b34d6; --accent-ink: #ffffff; --accent-soft: #e9e3fa; --radius: 10px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'Heebo', system-ui, sans-serif; font-size: 18px; line-height: 1.85; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: 'Frank Ruhl Libre', 'Heebo', serif; font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 20px; }
.btn { display: inline-flex; align-items: center; justify-content: center; border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; padding: 13px 24px; border-radius: 999px; transition: background .15s, color .15s; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #000; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: #4524b8; }

header.top { position: sticky; top: 0; z-index: 30; background: var(--paper); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.mark { font-weight: 900; font-size: 21px; letter-spacing: .02em; text-decoration: none; display: inline-flex; align-items: baseline; gap: 3px; }
.mark i { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; display: inline-block; }
nav.links { display: none; gap: 28px; font-size: 15px; font-weight: 500; color: var(--ink-2); }
nav.links a { text-decoration: none; }
nav.links a:hover { color: var(--ink); }
.bar-actions { display: flex; align-items: center; gap: 18px; }
.bar-actions .login { font-size: 15px; font-weight: 500; text-decoration: none; color: var(--ink-2); }
.bar-actions .btn { padding: 9px 18px; font-size: 15px; }
@media (min-width: 860px) { nav.links { display: flex; } }

.article { max-width: 720px; margin-inline: auto; padding: 56px 20px 24px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.article h1 { font-size: clamp(34px, 6vw, 54px); font-weight: 900; }
.article .meta { margin-top: 16px; font-size: 14px; color: var(--muted); }
.article .lede { margin-top: 24px; font-size: 21px; line-height: 1.7; color: var(--ink-2); }
.article h2 { font-size: clamp(26px, 4vw, 34px); margin-top: 52px; }
.article h3 { font-family: 'Heebo', sans-serif; font-size: 20px; font-weight: 700; margin-top: 30px; }
.article p { margin-top: 16px; color: var(--ink-2); }
.article ul, .article ol { margin: 16px 0 0; padding-inline-start: 24px; color: var(--ink-2); }
.article li { margin-top: 8px; padding-inline-start: 4px; }
.article li strong, .article p strong { color: var(--ink); }
.article .note { margin-top: 24px; padding: 16px 20px; border-inline-start: 3px solid var(--accent); background: var(--paper-2); color: var(--ink-2); font-size: 16.5px; border-radius: 0 8px 8px 0; }
.article table { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 16px; }
.article th, .article td { border: 1px solid var(--line); padding: 10px 12px; text-align: right; color: var(--ink-2); }
.article th { background: var(--paper-2); color: var(--ink); font-weight: 700; }
.article .formula { margin-top: 20px; padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: 8px; font-family: 'Heebo', sans-serif; direction: ltr; text-align: center; font-size: 20px; color: var(--ink); overflow-x: auto; }
.cta-box { max-width: 720px; margin: 56px auto 0; padding: 32px 28px; border: 1px solid var(--ink); border-radius: var(--radius); background: var(--paper); }
.cta-box h2 { font-size: 28px; }
.cta-box p { margin-top: 10px; color: var(--ink-2); font-size: 17px; }
.cta-box .btn { margin-top: 20px; }
.more-guides { max-width: 720px; margin: 48px auto 0; padding: 0 20px; }
.more-guides h2 { font-size: 24px; }
.more-guides ul { list-style: none; margin: 14px 0 0; padding: 0; }
.more-guides li { border-top: 1px solid var(--line); }
.more-guides li:last-child { border-bottom: 1px solid var(--line); }
.more-guides a { display: block; padding: 14px 0; text-decoration: none; font-weight: 700; }
.more-guides a:hover { color: var(--accent); }

.index-list { max-width: 720px; margin: 36px auto 0; padding: 0 20px; list-style: none; }
.index-list li { border-top: 1px solid var(--line); padding: 26px 0; }
.index-list li:last-child { border-bottom: 1px solid var(--line); }
.index-list a { text-decoration: none; }
.index-list h2 { font-size: 28px; }
.index-list a:hover h2 { color: var(--accent); }
.index-list p { margin-top: 8px; color: var(--ink-2); font-size: 17px; }

footer.bottom { margin-top: 80px; border-top: 1px solid var(--line); padding: 36px 0 44px; font-size: 14.5px; color: var(--muted); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
/* touch targets: at least 44px (HIG) */
.foot a, .bar-actions .login, .mark { display: inline-flex; align-items: center; min-height: 44px; }
.foot a:not(.mark), .bar-actions .login { padding: 0 4px; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; }

/* ביטויים מספריים (למשל -3.75 / -1.25 × 180) נשארים משמאל לימין בתוך טקסט בעברית */
.m { direction: ltr; unicode-bidi: isolate; display: inline-block; }
