/* CHERT shell for Journals.
 *
 * No colour, font stack or spacing value is defined here — every value comes
 * from chert-tokens.css (I3). A build check fails this file if it contains a
 * raw hex code.
 *
 * RTL by CSS LOGICAL PROPERTIES ONLY (R4). No physical left/right box
 * properties, so mirroring happens when dir flips with no second stylesheet.
 */

body {
  background: var(--chert-cream);
  color: var(--chert-ink);
  font-family: var(--font-body, var(--font-en));
}

.pkp_structure_head,
.pkp_head_wrapper {
  background: var(--chert-ink);
  color: var(--chert-dark-text);
}
.pkp_structure_head a,
.pkp_head_wrapper a { color: var(--chert-dark-text); }

.pkp_site_name,
.pkp_site_name .is_img img { max-block-size: 44px; }

/* Primary actions: INK on orange — orange text on cream fails contrast at
 * every size (2.28:1), ink on orange passes at 7.29:1. */
.pkp_button,
.cmp_button,
button.pkp_button_primary,
.pkp_block .cmp_button {
  background: var(--chert-orange);
  color: var(--chert-ink);
  border-color: var(--chert-orange);
  border-radius: var(--radius-sm);
  font-weight: 700;
}
.pkp_button:hover,
.cmp_button:hover { background: var(--chert-orange-deep); color: var(--chert-ink); }

a { text-decoration-color: var(--chert-orange-deep); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--chert-orange-deep);
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}

.obj_article_summary,
.pkp_block,
.obj_issue_summary {
  background: var(--chert-surface);
  border: 1px solid var(--chert-border);
  border-radius: var(--radius-card);
}

.pkp_structure_footer_wrapper,
.pkp_footer_content {
  background: var(--chert-dark);
  color: var(--chert-dark-muted);
}
.pkp_structure_footer_wrapper a { color: var(--chert-dark-text); }

/* Arabic: +1px, looser leading, never italic, letter-spacing untouched —
 * adjusting it breaks Arabic letter joining. */
[lang="ar"], [dir="rtl"] {
  font-family: var(--font-ar);
  line-height: var(--lh-base);
  font-style: normal;
  letter-spacing: normal;
}

/* Latin runs inside Arabic prose (DOIs, emails, code) keep their direction. */
[dir="rtl"] .ltr,
[dir="rtl"] code,
[dir="rtl"] .doi { direction: ltr; unicode-bidi: isolate; }
