/* Shared chrome has its own tokens and dimensions; page styles cannot resize it. */
html{scrollbar-gutter:stable;--rv-shell-content-width:1200px;--rv-shell-content-gutter:40px}
@media(max-width:600px){html{--rv-shell-content-gutter:28px}}
#topbar,#rv-site-search{--shell-bg:var(--rv-light-surface,#f8faf5);--shell-raised:var(--rv-light-raised,#e3e9dc);--shell-text:var(--rv-light-text,#253025);--shell-muted:var(--rv-light-muted,#596653);--shell-line:var(--rv-light-border,#c1cdb6);--shell-gold:var(--rv-light-accent,#e9c34a);font-family:Vazirmatn,Tahoma,sans-serif;font-size:14px;line-height:1.8;direction:rtl;color:var(--shell-text)}
html[data-theme=dark] :is(#topbar,#rv-site-search){--shell-bg:var(--rv-dark-bg,#141611);--shell-raised:var(--rv-dark-raised,#252b20);--shell-text:var(--rv-dark-text,#f1f1e9);--shell-muted:var(--rv-dark-muted,#a8ae9d);--shell-line:var(--rv-dark-border,#353d2d);--shell-gold:var(--rv-dark-accent,#e9c34a)}
body #topbar{position:sticky;inset:0 0 auto;z-index:1100;display:block;width:100%;height:auto;margin:0;padding:0;border:0;border-bottom:1px solid var(--shell-line)!important;border-radius:0;background:var(--shell-bg)!important;color:var(--shell-text)!important;box-shadow:none;transform:none;transition:none;--brand-rad:var(--shell-text);--brand-base:var(--shell-bg);--brand-line:var(--shell-line);--surface-2:var(--shell-raised);--muted:var(--shell-muted);--text:var(--shell-text);--surface:var(--shell-bg);--border:var(--shell-line);--accent:var(--shell-gold)}
#topbar *,#rv-site-search *{box-sizing:border-box}
body #topbar>.topbar__in{display:flex;align-items:center;justify-content:flex-start;flex-wrap:nowrap;gap:18px;width:min(var(--rv-shell-content-width),calc(100% - var(--rv-shell-content-gutter)));max-width:var(--rv-shell-content-width);min-width:0;height:80px;min-height:80px;margin:0 auto;padding:0;direction:rtl}
#topbar .brand{position:static;display:flex!important;flex:0 0 auto;align-items:center;gap:10px!important;margin:0;padding:0!important;width:auto;min-width:0;height:auto;border:0;background:none;transform:none;letter-spacing:0}
#topbar .rv-brandmark{display:grid;width:42px;height:42px;flex:0 0 42px;padding:0;border:0;border-radius:12px;background:#f5c518}
#topbar .rv-brandmark img{width:36px!important;height:36px!important;padding:0;margin:0;border:0}
#topbar .rv-word{font:800 25px/1.1 Vazirmatn,Tahoma,sans-serif!important;letter-spacing:0!important}
#topbar .rv-word small{margin:6px 0 0!important;letter-spacing:3px!important;font:8px/normal 'Azeret Mono',monospace!important}
#topbar .rv-rad{color:var(--shell-text)!important}
#topbar .topnav{display:flex;align-items:center;justify-content:flex-start;gap:4px;flex:0 0 auto;margin:0;padding:0;border:0;background:none;white-space:nowrap}
#topbar .nav-entry>button,#topbar .topnav>a{position:relative;display:flex;align-items:center;gap:6px;margin:0;padding:10px 8px;width:auto;min-width:0;height:auto;min-height:0;border:0;border-radius:8px;background:transparent;color:var(--shell-text);font:600 12px/1.8 Vazirmatn,Tahoma,sans-serif;letter-spacing:0;opacity:1;text-decoration:none;box-shadow:none;transform:none}
#topbar .nav-entry>button:hover,#topbar .topnav>a:hover,#topbar .nav-entry.is-open>button{background:var(--shell-raised)}
#topbar .nav-entry>button>svg,#topbar .topnav>a>svg{display:block;width:17px;height:17px;flex:0 0 17px;margin:0;padding:0}
#topbar .topbar__actions{position:static;display:flex;align-items:center;justify-content:flex-start;flex:0 0 auto;gap:8px;margin:0;margin-inline-start:auto;padding:0;direction:rtl}
#topbar .icon-btn{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;min-width:40px;min-height:40px;margin:0;padding:0;border:1px solid var(--shell-line)!important;border-radius:50%;background:var(--shell-bg)!important;color:var(--shell-text)!important;box-shadow:none;transform:none;transition:none}
#topbar .icon-btn:hover{background:var(--shell-raised)!important}
#topbar #searchBtn>svg{display:block;width:19px;height:19px;min-width:19px;max-width:19px;padding:0;margin:0}
#topbar #themeToggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;flex:0 0 58px;width:58px;min-width:58px;height:40px;min-height:40px;margin:0;padding:0;border:0;border-radius:0;background:none;color:var(--shell-text);font:700 12px/1.8 Vazirmatn,Tahoma,sans-serif;box-shadow:none;transform:none;opacity:1;cursor:pointer}
#topbar .switch__track{position:relative;display:block;flex:0 0 58px;width:58px;height:32px;min-width:58px;margin:0;padding:0;border:1px solid var(--shell-line)!important;border-radius:999px;background:var(--shell-raised)!important}
#topbar .switch__thumb{position:absolute;display:grid;place-items:center;inset:auto;top:3px;right:3px;width:24px;height:24px;margin:0;padding:0;border:0;border-radius:50%;background:var(--shell-gold);color:#252d24;transform:translateX(0)}
html[data-theme=dark] #topbar .switch__thumb{transform:translateX(-26px)}
#topbar .switch__thumb svg{width:14px!important;height:14px!important;min-width:14px;max-width:14px;min-height:14px;max-height:14px;margin:0;padding:0;fill:none;stroke:currentColor;flex:none}
#topbar .i-moon{display:block}#topbar .i-sun{display:none}
html[data-theme=dark] #topbar .i-moon{display:none}html[data-theme=dark] #topbar .i-sun{display:block}
#topbar #themeLabel{display:none}
#topbar [data-user-link]{display:inline-flex;align-items:center;justify-content:center;flex:0 0 108px;width:108px;height:40px;min-height:40px;margin:0;padding:8px 12px;border:1px solid var(--shell-gold)!important;border-radius:999px!important;background:var(--shell-gold)!important;color:#252d24!important;font:700 12px/1.8 Vazirmatn,Tahoma,sans-serif;white-space:nowrap;box-shadow:none!important;transform:none;transition:none}
#topbar [data-user-link] .rv-user-name{display:block;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#topbar #burger{display:none}
#topbar #burger svg{width:20px;height:20px}
#topbar :focus-visible,#rv-site-search :focus-visible{outline:2px solid var(--shell-gold);outline-offset:4px}
#topbar #mobileNav[hidden]{display:none!important}
#topbar .mobilenav{background:var(--shell-bg);color:var(--shell-text);border-color:var(--shell-line)}
#topbar #mobileNav[hidden]{display:none!important}
#topbar #mobileNav{max-height:calc(100dvh - 80px);overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin}
#topbar #mobileNav>a,#topbar #mobileNav details>a{display:flex;align-items:center;gap:10px;min-height:44px;width:100%;min-width:0;font-size:13px;line-height:1.8}
#topbar #mobileNav svg{display:block;width:18px;height:18px;min-width:18px;max-width:18px;max-height:18px;flex:0 0 18px}
#topbar #mobileNav img{width:30px;height:30px;max-width:30px;max-height:30px;flex:0 0 30px;object-fit:contain}
#topbar #mobileNav summary{min-height:44px;padding:10px 0;cursor:pointer}
#topbar #mobileNav summary:focus-visible,#topbar #mobileNav a:focus-visible{outline:2px solid var(--shell-gold);outline-offset:-2px;border-radius:6px}
@media(max-width:1180px){#topbar .topnav{display:none!important}#topbar #burger{display:grid!important}body #topbar>.topbar__in{gap:12px}}
@media(max-width:600px){body #topbar>.topbar__in{width:calc(100% - var(--rv-shell-content-gutter));height:72px;min-height:72px;gap:8px}#topbar .rv-brandmark{width:38px;height:38px;flex-basis:38px}#topbar .rv-word{font-size:23px!important}#topbar .brand{gap:8px!important}#topbar [data-user-link]{display:none}#topbar .topbar__actions{gap:6px}}
@media(max-width:350px){#topbar .rv-word{font-size:20px!important}#topbar .brand{gap:6px!important}#topbar .topbar__actions{gap:4px}}

/* Native modal: one search for the whole site, independent of page-local filters. */
#rv-site-search{position:fixed;inset:0;width:min(650px,calc(100% - 32px));max-width:none;max-height:min(720px,calc(100dvh - 48px));margin:auto;padding:0;border:1px solid var(--shell-line);border-radius:22px;background:var(--shell-bg);box-shadow:0 28px 100px #0005;overflow:hidden;text-align:right;overscroll-behavior:contain}
#rv-site-search:not([open]){display:none!important}
#rv-site-search::backdrop{background:#101610b3;backdrop-filter:blur(6px)}
#rv-site-search .rv-search-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px 24px 14px}
#rv-site-search h2{margin:0;font:750 20px/1.8 Vazirmatn,Tahoma,sans-serif;color:var(--shell-text);letter-spacing:0}
#rv-site-search .rv-search-close{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;min-height:0;padding:0;border:1px solid var(--shell-line);border-radius:11px;background:var(--shell-raised);color:var(--shell-text);cursor:pointer}
#rv-site-search svg{display:block;width:20px;height:20px;flex:0 0 20px;fill:none;stroke:currentColor;stroke-width:1.8}
#rv-site-search .rv-search-field{display:flex;align-items:center;gap:12px;margin:0 24px 14px;padding:12px 15px;border:1px solid var(--shell-line);border-radius:13px;background:var(--shell-raised);color:var(--shell-muted)}
#rv-site-search .rv-search-field:focus-within{border-color:var(--shell-gold);box-shadow:0 0 0 3px color-mix(in srgb,var(--shell-gold) 14%,transparent)}
#rv-site-search #rv-site-query{display:block;flex:1;min-width:0;width:100%;height:30px;padding:0;margin:0;border:0;border-radius:0;outline:none;box-shadow:none;background:transparent;color:var(--shell-text);font:14px/1.8 Vazirmatn,Tahoma,sans-serif}
#rv-site-search input::placeholder{color:var(--shell-muted);opacity:1}
#rv-site-search .rv-search-meta{display:flex;justify-content:space-between;gap:10px;padding:0 24px 12px;color:var(--shell-muted);font-size:11px}
#rv-site-search #rv-search-results{display:grid;align-content:start;gap:6px;overflow:auto;max-height:min(460px,calc(100dvh - 255px));padding:0 16px 16px;scrollbar-width:thin;overscroll-behavior:contain}
#rv-site-search .rv-search-result{display:flex;align-items:center;gap:12px;min-height:66px;margin:0;padding:12px;border:1px solid transparent;border-radius:13px;background:transparent;color:var(--shell-text);text-decoration:none;font:13px/1.8 Vazirmatn,Tahoma,sans-serif;transition:background .15s,border-color .15s;transform:none}
#rv-site-search .rv-search-result:hover,#rv-site-search .rv-search-result:focus-visible{background:var(--shell-raised);border-color:var(--shell-line)}
#rv-site-search .rv-search-icon{display:grid;place-items:center;width:38px;height:38px;flex:0 0 38px;border:1px solid var(--shell-line);border-radius:11px;color:var(--shell-muted);background:var(--shell-raised)}
#rv-site-search .rv-search-copy{min-width:0;flex:1}#rv-site-search .rv-search-copy b{display:block;font-weight:650}#rv-site-search .rv-search-copy small{display:block;color:var(--shell-muted);font-size:11px;margin-top:3px;line-height:1.7}
#rv-site-search .rv-search-result>svg{width:16px;height:16px;flex-basis:16px;color:var(--shell-muted)}
#rv-site-search .rv-search-empty{margin:8px;padding:30px 16px;text-align:center;border:1px dashed var(--shell-line);border-radius:14px;color:var(--shell-muted);font-size:13px;line-height:2}
#rv-site-search .rv-search-foot{padding:12px 24px;border-top:1px solid var(--shell-line);color:var(--shell-muted);font-size:10px}
@media(max-width:600px){#rv-site-search{border-radius:18px;max-height:calc(100dvh - 24px)}#rv-site-search .rv-search-head{padding:17px 18px 12px}#rv-site-search h2{font-size:18px}#rv-site-search .rv-search-field{margin-inline:18px}#rv-site-search .rv-search-meta{padding-inline:18px}#rv-site-search .rv-search-foot{padding-inline:18px}}
@media(prefers-reduced-motion:reduce){#topbar,#topbar *,#rv-site-search *{transition:none!important}}
