:root {
  color-scheme: light;
  --ink: #202124;
  --muted: #5f6368;
  --accent: #16555d;
  --accent-dark: #16404d;
  --line: #d9e1e3;
  --paper: #fff;
  --page: #f5f7f8;
  --link: #0563c1;
  font-family: Arial, "Noto Sans Hebrew", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  direction: rtl;
  text-align: right;
  line-height: 1.65;
  font-size: 18px;
}

.skip-link {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
  padding: 10px 14px;
  background: #fff;
  color: var(--link);
  border: 2px solid var(--accent);
  border-radius: 4px;
  font-weight: 700;
  transform: translateY(-140%);
  transition: transform 120ms ease;
}

.skip-link:focus { transform: translateY(0); }

a { color: var(--link); text-decoration: underline; overflow-wrap: anywhere; }
a:focus-visible, button:focus-visible, .form-control:focus-visible, .logo-region:focus-visible, .home-link:focus-visible, .topic-nav-link:focus-visible, .item:focus-visible, .topic-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.logo-wrap { display: block; width: min(529px, 100%); margin: 0 auto 24px; }
.logo-mark { position: relative; display: block; }
.logo-placeholder {
  aspect-ratio: 529 / 89;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f6f8f8;
}
.site-logo { display: block; width: 100%; height: auto; margin: 0 auto; }
.logo-region { position: absolute; inset-inline: 0; display: block; text-decoration: none; }
.logo-region-top { top: 0; height: 72%; }
.logo-region-bottom { bottom: 0; height: 28%; }
.site-construction-notice {
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid #d69e2e;
  border-radius: 6px;
  background: #fff4d7;
  color: #573a00;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}
.home-link { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; color: var(--link); font-weight: 700; text-decoration: none; }
.home-link:hover { text-decoration: underline; }
.home-icon { width: 19px; height: 19px; flex: 0 0 auto; }

.home-main, .topic-main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 56px;
}

.paper-main, .simple-main {
  width: min(920px, calc(100% - 32px));
  margin: 32px auto;
  padding: 48px 56px;
  background: var(--paper);
  border: 1px solid var(--line);
}

header { padding: 18px 0 28px; border-bottom: 1px solid var(--line); }
h1, h2, p, li, .meta-row { direction: rtl; text-align: right; }
h1 { margin: 0; color: var(--accent-dark); font-size: 42px; line-height: 1.2; font-weight: 700; }
.paper-main h1, .simple-main h1 { margin: 0 0 4px; font-size: 34px; }
.topic-main h1 { font-size: 38px; }
h2 { margin: 0 0 8px; color: var(--accent); font-size: 22px; line-height: 1.35; }
p { margin: 0; }
ul { margin: 0 0 12px; padding: 0 22px 0 0; }
li { margin: 0 0 6px; }

.intro { max-width: 820px; margin: 12px 0 0; color: var(--muted); font-size: 20px; }
.search-panel { margin-top: 24px; max-width: 720px; --pagefind-ui-scale: .92; --pagefind-ui-primary: var(--accent); --pagefind-ui-text: var(--ink); --pagefind-ui-background: var(--paper); --pagefind-ui-border: var(--line); --pagefind-ui-border-width: 1px; --pagefind-ui-border-radius: 8px; --pagefind-ui-image-border-radius: 6px; --pagefind-ui-font: Arial, "Noto Sans Hebrew", "Segoe UI", sans-serif; }
.search-panel .pagefind-ui { direction: rtl; text-align: right; }
.search-panel .pagefind-ui__form { margin: 0; }
.search-panel .pagefind-ui__search-input { text-align: right; }

.section { margin-top: 34px; }
.section-heading { margin: 0 0 8px; color: var(--accent-dark); font-size: 28px; line-height: 1.25; }
.section .grid, .topic-grid { margin-top: 18px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.topic-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.topic-card, .item { display: flex; flex-direction: column; min-height: 100%; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; color: inherit; text-decoration: none; transition: border-color 160ms ease, transform 160ms ease; }
.topic-card:hover, .topic-card:focus-visible, .item:hover, .item:focus-visible { border-color: var(--accent); transform: translateY(-2px); outline: none; }
.topic-preview { display: block; width: 96px; height: 96px; max-width: calc(100% - 30px); margin: 18px auto 0; object-fit: contain; border-radius: 20px; background: #f7fbfb; }
.preview { display: block; width: 100%; height: auto; max-width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top center; border-bottom: 1px solid var(--line); background: #eef3f4; }
.topic-content, .content { display: flex; flex-direction: column; flex: 1; padding: 18px; }
.topic-content { padding: 15px; }
.topic-content h2 { font-size: 19px; }
.topic-content p, .summary { color: var(--muted); font-size: 15px; line-height: 1.5; }
.topic-count { margin-top: auto; padding-top: 12px; color: var(--link); font-size: 14px; font-weight: 700; }
.authors { margin-bottom: 8px; color: var(--accent-dark); font-size: 15px; font-weight: 700; }
.badge-row { display: flex; flex-wrap: wrap; align-self: flex-start; gap: 6px 10px; margin-bottom: 8px; }
.new-badge { color: #b3261e; font-size: 15px; font-weight: 700; line-height: 1; }
.recent-paper-badge { color: #0b5d2a; }
.open { margin-top: auto; padding-top: 16px; color: var(--link); font-weight: 700; }

.page-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 0 0 20px; }
.page-nav .home-link { margin: 0; }
.topic-nav-label { color: var(--muted); font-size: 15px; font-weight: 700; }
.topic-nav-link { display: inline-flex; align-items: center; min-height: 30px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 6px; background: #f7fbfb; color: var(--accent-dark); font-size: 15px; font-weight: 700; line-height: 1.3; text-decoration: none; }
.topic-nav-link:hover { border-color: var(--accent); text-decoration: underline; }
.subtitle { margin: 0 0 24px; color: var(--muted); font-size: 19px; font-weight: 700; }
.metadata { margin: 0 0 24px; }
.meta-row { margin: 2px 0; }
.meta-label { font-weight: 700; }
.meta-value { unicode-bidi: plaintext; }
.topic-links { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin: -8px 0 28px; color: var(--muted); font-size: 16px; }
.topic-label { font-weight: 700; color: var(--accent-dark); }
.latin { direction: ltr; unicode-bidi: embed; display: inline-block; max-width: 100%; text-align: left; vertical-align: top; }
.paper-hero-image { margin: 0 0 26px; }
.paper-hero-image img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; background: #eef3f4; }
.one-liner { margin: 28px 0; color: var(--accent); font-size: 20px; line-height: 1.5; font-weight: 700; }
.paper-main section, .simple-main section { margin: 22px 0 0; }
.paper-main section h2, .simple-main section h2 { margin: 0 0 8px; font-size: 25px; }
.paper-main section p, .simple-main section p { margin: 0 0 9px; }
.note { margin-top: 28px; color: #707070; font-size: 16px; }
.last-updated, .updated { margin: 10px 0 0; color: #707070; font-size: 15px; font-weight: 700; }
.notice { margin: 22px 0; padding: 16px 18px; background: #eef3f4; border-right: 4px solid var(--accent); }

.suggest-main, .suggest-main h1, .suggest-main h2, .suggest-main p, .suggest-main li {
  direction: ltr;
  text-align: left;
}
.suggest-main .logo-wrap { margin-bottom: 22px; }
.suggest-main .home-link { direction: ltr; }
.suggest-intro { max-width: 690px; margin: 10px 0 0; color: var(--muted); font-size: 19px; }
.feedback-intro { max-width: 690px; margin: 10px 0 0; color: var(--muted); font-size: 19px; }
.feedback-source { max-width: 720px; margin: 18px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: #eef3f4; color: var(--accent-dark); font-size: 16px; font-weight: 700; }
.feedback-source-link { unicode-bidi: plaintext; }
.suggestion-form, .feedback-form { display: grid; gap: 18px; max-width: 680px; margin: 26px 0 0; }
.privacy-notice {
  max-width: 720px;
  margin: 22px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-right: 4px solid var(--accent);
  border-radius: 6px;
  background: #f7faf9;
}
.suggest-main .privacy-notice { border-right-width: 1px; border-left: 4px solid var(--accent); }
.simple-main .privacy-notice h2 { margin: 0 0 6px; font-size: 20px; line-height: 1.25; }
.simple-main .privacy-notice p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.form-field { display: grid; gap: 7px; }
.form-label { color: var(--accent-dark); font-size: 16px; font-weight: 700; line-height: 1.3; }
.optional-label { color: var(--muted); font-weight: 400; }
.form-control {
  width: 100%;
  min-height: 46px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  line-height: 1.35;
}
.form-control:focus { border-color: var(--accent); }
.feedback-textarea { min-height: 170px; resize: vertical; }
.feedback-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-note { color: var(--muted); font-size: 15px; line-height: 1.5; }
.feedback-photo-status { margin-top: 4px; }
.form-actions { display: flex; align-items: center; gap: 12px; }
.editor-auth-actions { margin-top: 4px; }
.button-primary {
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--accent-dark);
  border-radius: 6px;
  background: var(--accent-dark);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.button-primary:hover { background: var(--accent); }
.button-primary:disabled { border-color: #9aa0a6; background: #9aa0a6; cursor: not-allowed; }
.button-secondary {
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: #fff;
  color: var(--accent-dark);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.button-secondary:hover { background: #eef3f4; }
.form-status {
  max-width: 680px;
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eef3f4;
  color: var(--accent-dark);
  font-weight: 700;
}
.form-status[data-type="error"] {
  border-color: #d9aaa6;
  background: #fff4f2;
  color: #8f1d16;
}
.editor-auth-status { margin-top: 4px; }
.page-summary-editor {
  max-width: 920px;
  margin: 30px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.page-summary-editor h2 { margin-bottom: 8px; }
.summary-editor-fields {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}
.summary-editor-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbfb;
}
.summary-editor-section h3 {
  margin: 0;
  color: var(--accent-dark);
  font-size: 18px;
}
.summary-editor-textarea { min-height: 118px; resize: vertical; }
.summary-editor-paragraphs { min-height: 160px; }
.summary-editor-actions { margin-top: 18px; }
.thank-you-message {
  max-width: 680px;
  margin: 26px 0 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef3f4;
}

.feedback-editor-main { max-width: 1100px; }
.feedback-editor-panel { margin-top: 22px; }
.feedback-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  max-width: 920px;
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbfb;
}
.feedback-editor-next { margin: 0; color: var(--accent-dark); font-weight: 700; }
.feedback-editor-counts { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.feedback-editor-count {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  direction: ltr;
}
.feedback-editor-filter { max-width: 280px; margin: 16px 0; }
.feedback-editor-history-note { margin: 2px 0 0; }
.feedback-editor-list { display: grid; gap: 16px; margin-top: 18px; }
.feedback-editor-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-right: 5px solid var(--muted);
  border-radius: 8px;
  background: #fff;
}
.feedback-editor-card.status-approved_for_update { border-right-color: #1b6b43; }
.feedback-editor-card.status-pending { border-right-color: #b68a2e; }
.feedback-editor-card.status-rejected { border-right-color: #9b332b; }
.feedback-editor-card.status-applied { border-right-color: var(--accent); }
.feedback-editor-card.source-history { background: #fbfbf9; }
.feedback-editor-card-header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
}
.feedback-editor-card h2 { margin: 0; font-size: 22px; }
.feedback-editor-status-badge {
  padding: 3px 9px;
  border-radius: 999px;
  background: #eef3f4;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 800;
  direction: ltr;
}
.feedback-editor-page-link {
  direction: ltr;
  unicode-bidi: plaintext;
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 700;
}
.feedback-editor-field { margin: 0; color: var(--muted); font-size: 15px; }
.feedback-editor-comment {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7fbfb;
  white-space: pre-wrap;
}
.feedback-editor-photo {
  display: grid;
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7fbfb;
}
.feedback-editor-photo h3 { margin: 0; color: var(--accent-dark); font-size: 18px; }
.feedback-editor-photo-preview {
  display: block;
  width: min(420px, 100%);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.feedback-editor-controls {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.feedback-editor-notes { min-height: 78px; resize: vertical; }
.feedback-editor-empty {
  max-width: 680px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbfb;
  color: var(--muted);
  font-weight: 700;
}

.author-mailer-card { gap: 12px; }
.author-mailer-papers {
  display: grid;
  gap: 8px;
  margin: 4px 0;
}
.author-mailer-paper {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7fbfb;
  cursor: pointer;
}
.author-mailer-paper input { margin-top: 5px; }
.author-mailer-preview {
  max-width: 100%;
  max-height: 260px;
  margin: 0;
  padding: 12px 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfbf9;
  color: var(--ink);
  direction: rtl;
  white-space: pre-wrap;
  font: 15px/1.55 Arial, "Noto Sans Hebrew", "Segoe UI", sans-serif;
}

.topic-hero { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 22px; align-items: center; margin: 26px 0 0; }
.topic-icon { display: block; width: 128px; height: 128px; justify-self: end; object-fit: contain; border-radius: 24px; background: #f7fbfb; }
.topic-note { color: var(--muted); font-size: 17px; }

.footer-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.footer-links a { color: var(--link); font-weight: 700; }

@media (max-width: 1100px) { .topic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 980px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .topic-hero { grid-template-columns: 1fr; } .topic-icon { justify-self: start; width: 112px; height: 112px; } }
@media (max-width: 700px) { .grid, .topic-grid { grid-template-columns: 1fr; } h1 { font-size: 34px; } .intro { font-size: 18px; } }
@media (max-width: 760px) { .feedback-editor-controls { grid-template-columns: 1fr; } }
@media (max-width: 640px) { body { font-size: 16px; } .paper-main, .simple-main { width: 100%; margin: 0; padding: 28px 20px; border-width: 0; } .paper-main h1, .simple-main h1 { font-size: 28px; } .paper-main section h2, .simple-main section h2 { font-size: 22px; } .one-liner { font-size: 18px; } }
@media (max-width: 520px) { .home-main, .topic-main { width: min(100% - 24px, 1120px); padding-top: 26px; } h1 { font-size: 29px; } .content { padding: 16px; } }
@media print { body { background: #fff; } .paper-main, .simple-main { width: auto; margin: 0; padding: 0; border: 0; } }
