:root {
  --ink: #182d37;
  --text: #33454d;
  --muted: #596970;
  --line: #d9dfdf;
  --paper: #fff;
  --soft: #f9eef1;
  --orange: #800020;
  --orange-dark: #5c0017;
  --burgundy: #800020;
  --max: 1180px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font: 1.0625rem/1.75 Tahoma, Arial, sans-serif; direction: rtl; text-align: right;
}
a { color: var(--orange-dark); }
a:hover { color: var(--orange); }
img { max-width: 100%; height: auto; }
.wrap { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.skip { position: absolute; right: -9999px; }
.skip:focus { right: 16px; top: 16px; background: #fff; padding: 8px 12px; z-index: 99; }
:focus-visible { outline: 3px solid #a3123a; outline-offset: 2px; }

/* header */
.site-header { background: #fff; color: var(--ink); position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(24,45,55,.08); }
.header-inner { display: flex; align-items: center; gap: 16px; padding: 10px 0; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.15rem; margin-inline-end: auto; }
.brand img { width: 48px; height: 48px; border-radius: 50%; background: #fff; object-fit: contain; }
.brand:hover { color: var(--burgundy); }
.header-search input { width: 220px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: #f7f8f8; font: inherit; font-size: .95rem; }
.header-search input:focus { border-color: var(--burgundy); outline: none; background: #fff; }
.menu-btn { display: none; background: var(--orange); color: #fff; border: 0; border-radius: 8px; padding: 8px 14px; font: inherit; cursor: pointer; }

.main-nav { background: var(--burgundy); }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul { display: flex; flex-wrap: wrap; }
.main-nav li { position: relative; }
.main-nav a, .main-nav .nav-toggle-sub {
  display: block; color: #fff; text-decoration: none; padding: 12px 14px; font: inherit; font-size: .95rem;
  background: none; border: 0; cursor: pointer; text-align: right; width: 100%;
}
.main-nav a:hover, .main-nav .nav-toggle-sub:hover { background: rgba(0,0,0,.18); color: #fff; }
.main-nav .sub-arrow { display: none; }
.main-nav li ul {
  display: none; position: absolute; right: 0; top: 100%; min-width: 240px; background: #fff;
  box-shadow: 0 12px 30px rgba(0,0,0,.18); border-radius: 0 0 10px 10px; padding: 6px 0; z-index: 60;
}
.main-nav li ul a, .main-nav li ul .nav-toggle-sub { color: var(--ink); padding: 8px 16px; }
.main-nav li ul a:hover, .main-nav li ul .nav-toggle-sub:hover { background: var(--soft); color: var(--orange-dark); }
.main-nav li ul ul { top: 0; right: 100%; border-radius: 10px; }
@media (hover: hover) and (min-width: 961px) {
  .main-nav li:hover > ul, .main-nav li:focus-within > ul { display: block; }
}
@media (max-width: 960px) {
  .menu-btn { display: block; }
  .header-inner { flex-wrap: wrap; gap: 8px 12px; padding: 8px 0; }
  .brand { flex: 1; min-width: 0; font-size: 1rem; gap: 8px; }
  .brand img { width: 38px; height: 38px; }
  .menu-btn { order: 2; }
  .header-search { order: 3; flex-basis: 100%; }
  .header-search input { width: 100%; }
  .main-nav { display: none; max-height: calc(100vh - 70px); overflow: auto; }
  .main-nav.open { display: block; }
  .main-nav > ul { display: block; }
  .main-nav li ul { position: static; box-shadow: none; background: rgba(255,255,255,.06); border-radius: 0; padding: 0; }
  .main-nav li ul a, .main-nav li ul .nav-toggle-sub { color: #fff; padding-inline-start: 28px; }
  .main-nav li ul ul a { padding-inline-start: 44px; }
  .main-nav li.open > ul { display: block; }
  .main-nav li.has-sub { display: flex; flex-wrap: wrap; }
  .main-nav li.has-sub > a { flex: 1; width: auto; }
  .main-nav li.has-sub > ul { flex-basis: 100%; }
  .main-nav .sub-arrow { display: block; width: 48px; background: none; border: 0; color: #fff; cursor: pointer; }
  .main-nav .sub-arrow::before { content: "▾"; }
  .main-nav li.open > .sub-arrow::before { content: "▴"; }
}

/* common */
main { padding: 28px 0 48px; }
.kicker { color: var(--orange-dark); font-weight: 700; margin: 0 0 4px; }
.btn {
  display: inline-block; background: var(--orange); color: #fff; text-decoration: none; border: 0;
  border-radius: 999px; padding: 12px 24px; font: inherit; font-weight: 700; cursor: pointer;
}
.btn:hover { background: var(--orange-dark); color: #fff; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { background: var(--soft); color: var(--orange-dark); border-radius: 999px; padding: 3px 12px; font-size: .88rem; text-decoration: none; }
.chip:hover { background: var(--orange); color: #fff; }

/* article */
.article-wrap { max-width: 860px; }
.article-head h1 { color: var(--ink); font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.25; margin: 0 0 8px; }
.meta { color: var(--muted); margin: 0; font-size: .95rem; }
.article-head { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 26px; }
.entry h2, .entry h3, .entry h4 { color: var(--ink); line-height: 1.35; margin: 1.6em 0 .5em; }
.entry h2 { font-size: 1.6rem; } .entry h3 { font-size: 1.3rem; }
.entry p { margin: 0 0 1.1em; }
.entry ul, .entry ol { padding-inline-start: 1.4em; }
.entry blockquote { margin: 1.4em 0; padding: 12px 18px; border-inline-start: 4px solid var(--orange); background: var(--soft); }
.entry table { border-collapse: collapse; width: 100%; margin: 1em 0; display: block; overflow-x: auto; }
.entry td, .entry th { border: 1px solid var(--line); padding: 8px; }
.entry figure { margin: 1.4em 0; }
.entry figcaption { font-size: .9rem; color: var(--muted); text-align: center; }
.entry img { display: block; margin-inline: auto; border-radius: 8px; }
.entry .alignleft { float: left; margin: 0 1em 1em 0; } .entry .alignright { float: right; margin: 0 0 1em 1em; }
.entry .aligncenter { margin-inline: auto; }
.entry iframe { max-width: 100%; border: 0; }
.entry .nb-block-embed__wrapper, .entry .embed-youtube { position: relative; }
.entry iframe[src*="youtube"] { width: 100%; height: auto; aspect-ratio: 16/9; }
.entry .nb-block-columns { display: flex; flex-wrap: wrap; gap: 1.5em; }
.entry .nb-block-column { flex: 1 1 260px; min-width: 0; }
.entry .nb-block-gallery, .entry .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.entry .nb-block-gallery figure, .entry .gallery figure { margin: 0; }
.entry .nb-block-button__link, .entry .nb-element-button {
  display: inline-block; background: var(--orange); color: #fff; border-radius: 999px; padding: 10px 22px; text-decoration: none;
}
.entry .nb-block-separator, .entry hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.entry::after { content: ""; display: block; clear: both; }

/* cards */
.archive-head { margin-bottom: 26px; }
.archive-head h1 { color: var(--ink); font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 6px; line-height: 1.25; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; color: var(--text); text-decoration: none; transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(24,45,55,.12); color: var(--text); }
.card img, .card .noimg { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--soft); display: block; }
.card .noimg { background: linear-gradient(135deg, var(--ink), #2f5566); }
.card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; flex: 1; }
.card h3 { color: var(--ink); font-size: 1.12rem; line-height: 1.35; margin: 0 0 6px; }
.card p { margin: 0 0 10px; font-size: .93rem; color: var(--muted); flex: 1; }
.card .more { color: var(--orange-dark); font-weight: 700; font-size: .92rem; }
.related { margin-top: 48px; border-top: 1px solid var(--line); padding-top: 26px; }
.related h2 { color: var(--ink); margin: 0 0 18px; }
.article-wrap .cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.big-search { display: flex; gap: 10px; margin: 16px 0 6px; max-width: 640px; }
.big-search input { flex: 1; padding: 12px 16px; border: 2px solid var(--line); border-radius: 999px; font: inherit; }
.big-search input:focus { border-color: var(--orange); outline: none; }

/* footer */
.cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  background: var(--soft); border-radius: 18px; padding: 26px 30px; margin-bottom: 40px;
}
.cta h2 { color: var(--ink); margin: 0 0 4px; }
.cta p { margin: 0; }
.site-footer { background: var(--ink); color: #cfd8dc; padding: 26px 0; font-size: .93rem; }
.site-footer a { color: #fff; }
.site-footer p { margin: 4px 0; }
.site-footer .small { font-size: .82rem; opacity: .8; }
@media (max-width: 700px) {
  .entry .alignleft, .entry .alignright { float: none; margin: 1em auto; }
  .entry [style*="width"] { max-width: 100% !important; }
  .cta { padding: 20px; }
}

/* search box inside header: magnifier */
.header-search { position: relative; }
.header-search input { padding-inline-end: 36px; }
.header-search button { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer; color: var(--ink); padding: 4px; line-height: 0; }

/* accessibility toolbar */
.a11y-btn {
  position: fixed; left: 16px; bottom: 16px; z-index: 90; width: 54px; height: 54px; border-radius: 50%;
  background: #1450a0; color: #fff; border: 3px solid #fff; box-shadow: 0 6px 18px rgba(0,0,0,.25); cursor: pointer;
  display: grid; place-items: center;
}
.a11y-btn:hover { background: #0d3a78; }
.a11y-panel {
  position: fixed; left: 16px; bottom: 82px; z-index: 91; width: min(320px, calc(100vw - 32px)); background: #fff; color: #182d37;
  border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.3); padding: 14px; font-size: 16px; line-height: 1.4;
}
.a11y-panel[hidden] { display: none; }
.a11y-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 18px; }
.a11y-close { background: none; border: 0; font-size: 20px; cursor: pointer; color: #182d37; }
.a11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.a11y-grid button, .a11y-reset {
  font: inherit; font-size: 15px; padding: 10px 6px; border-radius: 10px; border: 2px solid #d9dfdf; background: #f7f9f9; color: #182d37; cursor: pointer;
}
.a11y-grid button[aria-pressed="true"] { background: #1450a0; border-color: #1450a0; color: #fff; }
.a11y-reset { width: 100%; margin-top: 8px; background: #f9eef1; border-color: #e8b4c1; }
.a11y-statement { display: block; text-align: center; margin-top: 10px; color: #1450a0; }

html.a11y-contrast body { background: #000 !important; color: #fff !important; }
html.a11y-contrast body *:not(img):not(video):not(iframe):not(svg):not(path):not(circle) { background-color: #000 !important; color: #fff !important; border-color: #fff !important; }
html.a11y-contrast a, html.a11y-contrast a * { color: #ffeb3b !important; }
html.a11y-contrast .a11y-panel, html.a11y-contrast .a11y-panel * { background: #000 !important; color: #fff !important; }
html.a11y-gray body > *:not(.a11y-panel):not(.a11y-btn) { filter: grayscale(1); }
html.a11y-links a { text-decoration: underline !important; text-decoration-thickness: 2px !important; outline: 2px solid #ffb300; outline-offset: 1px; }
html.a11y-readable body, html.a11y-readable body * { font-family: Arial, "Segoe UI", sans-serif !important; letter-spacing: .02em; }
html.a11y-spacing .entry p, html.a11y-spacing .entry li, html.a11y-spacing p { line-height: 2.2 !important; word-spacing: .12em; }
html.a11y-motion *, html.a11y-motion *::before, html.a11y-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }

/* cookie notice */
.cookie-bar {
  position: fixed; right: 16px; bottom: 16px; z-index: 89; max-width: min(520px, calc(100vw - 100px)); background: #182d37; color: #fff;
  border-radius: 14px; padding: 14px 16px; display: flex; gap: 14px; align-items: center; box-shadow: 0 12px 30px rgba(0,0,0,.25); font-size: 15px; line-height: 1.5;
}
.cookie-bar[hidden] { display: none; }
.cookie-bar p { margin: 0; }
.cookie-bar a { color: #f2c6d1; }
.cookie-bar .btn { padding: 8px 18px; white-space: nowrap; }
@media (max-width: 600px) { .cookie-bar { right: 8px; left: 78px; max-width: none; flex-direction: column; align-items: stretch; } }
@media print { .a11y-btn, .a11y-panel, .cookie-bar, .site-header, .main-nav, .cta, .site-footer { display: none !important; } }

.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn-ghost { background: transparent; border: 2px solid #f2c6d1; color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
@media (max-width: 600px) { .cookie-actions { justify-content: stretch; } .cookie-actions .btn { flex: 1; } }
