/* MansNU-JEAS – design tokens
   Navy and gold are sampled from the MansNU-JEAS logo and cover (overridable from admin via inline CSS vars).
   Plex Sans / Plex Serif / Plex Sans Arabic: one bilingual superfamily so EN and AR pages feel identical. */
:root {
  --navy: #0C315F;
  --navy-deep: #0D1830;
  --gold: #BF8B20;
  --gold-soft: #F7EFDC;
  --gold-ink: #8A6216;          /* gold dark enough for text on white (AA) */
  --ink: #1B2233;
  --ink-2: #4A5368;
  --ink-3: #6E768A;
  --line: #DDE2EA;
  --line-2: #EDF0F5;
  --surface: #F4F6FA;           /* cool drafting-paper grey */
  --white: #FFFFFF;
  --ok: #1D6B4F; --ok-bg: #E3F2EB;
  --warn: #8A5A00; --warn-bg: #FCF1D9;
  --bad: #A12A2A; --bad-bg: #FBE7E7;
  --info: #1F4F8F; --info-bg: #E5EEFA;
  --muted: #5B6375; --muted-bg: #EEF0F4;

  --sans: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --serif: "IBM Plex Serif", "IBM Plex Sans Arabic", Georgia, serif;
  --r-sm: 6px;
  --r-md: 10px;
  --wrap: 1180px;
  --shadow: 0 1px 2px rgba(12, 32, 63, .06), 0 6px 18px -8px rgba(12, 32, 63, .18);
}
html[dir="rtl"] { --sans: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif;
                  --serif: "IBM Plex Sans Arabic", "IBM Plex Serif", serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.6 var(--sans); color: var(--ink); background: var(--surface);
       text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; }
a { color: var(--navy); text-decoration-color: color-mix(in srgb, var(--gold) 70%, transparent);
    text-underline-offset: 3px; }
a:hover { color: var(--navy-deep); text-decoration-color: var(--gold); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3, h4 { color: var(--navy-deep); line-height: 1.25; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); letter-spacing: -.01em; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
small, .small { font-size: .875rem; }
.muted { color: var(--ink-3); }
.serif { font-family: var(--serif); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--white); padding: 8px 12px; z-index: 50; }
.skip:focus { top: 8px; }

/* ---------- Masthead: navy band with the gear-tooth edge from the logo ---------- */
.masthead { background: var(--navy-deep); color: #fff; position: relative; z-index: 5; }
.masthead::after {               /* gear teeth */
  content: ""; position: absolute; inset-inline: 0; bottom: -7px; height: 7px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 14px, transparent 14px 22px);
}
.masthead .top { display: flex; align-items: center; gap: 16px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; min-width: 0; }
.brand img { width: 58px; height: 58px; border-radius: 50%; background: #fff; padding: 2px; flex: none; }
.brand .name { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; line-height: 1.15; letter-spacing: .01em; }
.brand .pub { font-size: .8rem; color: #C6CEDE; }
.brand:hover { color: #fff; }
.masthead .tools { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
                   justify-content: flex-end; }
.masthead .tools a, .lang-btn { color: #DDE3EE; font-size: .9rem; text-decoration: none; background: none;
                                border: 0; cursor: pointer; font-family: inherit; padding: 6px 8px; }
.masthead .tools a:hover, .lang-btn:hover { color: #fff; }
.masthead .tools a.btn-gold { background: var(--gold); color: var(--navy-deep); padding: 8px 14px; font-weight: 500; }
.masthead .tools a.btn-gold:hover { background: #A97A1B; color: var(--navy-deep); }
.masthead .tools form { margin: 0; }
.nav { border-top: 1px solid rgba(255,255,255,.1); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; flex-wrap: wrap; }
.nav a { display: block; color: #E4E9F2; text-decoration: none; padding: 11px 14px; font-size: .95rem;
         border-bottom: 3px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--gold); }
.nav .dd { position: relative; }
.nav .dd > ul { display: none; position: absolute; inset-inline-start: 0; top: 100%; min-width: 240px; z-index: 30;
                background: var(--white); border: 1px solid var(--line); border-radius: var(--r-sm);
                box-shadow: var(--shadow); padding: 6px; flex-direction: column; }
.nav .dd:hover > ul, .nav .dd:focus-within > ul { display: flex; }
.nav .dd > ul a { color: var(--ink); padding: 8px 10px; border: 0; border-radius: 4px; }
.nav .dd > ul a:hover { background: var(--surface); color: var(--navy-deep); }
.nav-toggle { display: none; }

/* ---------- Buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 500 .95rem/1 var(--sans);
       padding: 11px 18px; border-radius: var(--r-sm); border: 1px solid var(--navy); background: var(--navy);
       color: #fff; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--navy-deep); color: #fff; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--navy-deep); }
.btn-gold:hover { background: #A97A1B; color: var(--navy-deep); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { background: var(--white); color: var(--navy-deep); border-color: var(--navy); }
.btn-danger { background: var(--bad); border-color: var(--bad); }
.btn-sm { padding: 7px 12px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.linkish { background: none; border: 0; padding: 0; color: var(--navy); text-decoration: underline;
           cursor: pointer; font: inherit; }

.field { margin-bottom: 18px; }
.field > label, .label { display: block; font-weight: 500; margin-bottom: 6px; color: var(--ink); }
.field .help { font-size: .84rem; color: var(--ink-3); margin-top: 5px; }
.field .errorlist, .errorlist { list-style: none; padding: 0; margin: 6px 0 0; color: var(--bad); font-size: .88rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url],
input[type=search], select, textarea {
  width: 100%; font: 400 1rem/1.45 var(--sans); color: var(--ink); background: var(--white);
  border: 1px solid #C9D0DC; border-radius: var(--r-sm); padding: 10px 12px; }
textarea { resize: vertical; }
/* English or Arabic text typed into a field keeps its own direction */
textarea, input[type=text], input[type=search] { unicode-bidi: plaintext; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy);
                                            box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 40%, transparent); }
input[type=checkbox], input[type=radio] { accent-color: var(--navy); width: 18px; height: 18px; margin: 0; flex: none; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.check label { font-weight: 400; margin: 0; }
.radio-row ul, .choices ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.choices li label { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line);
                    background: var(--white); border-radius: var(--r-sm); padding: 9px 12px; cursor: pointer; }
.choices li label:has(input:checked) { border-color: var(--navy); background: var(--info-bg); }
.scores ul { gap: 6px; }
.scores li label { padding: 6px 12px; min-width: 42px; justify-content: center; }
/* Django 4+ renders RadioSelect as nested <div>s, not <ul> */
.choices > div[id] { display: flex; flex-wrap: wrap; gap: 8px; }
.choices > div[id] > div > label { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line);
  background: var(--white); border-radius: var(--r-sm); padding: 9px 12px; cursor: pointer; font-weight: 400; margin: 0; }
.choices > div[id] > div > label:has(input:checked) { border-color: var(--navy); background: var(--info-bg); }
.scores .choices > div[id] { gap: 6px; }
.scores .choices > div[id] > div > label { padding: 6px 12px; min-width: 44px; justify-content: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }

/* ---------- Layout blocks ---------- */
main { padding: 34px 0 60px; min-height: 60vh; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px 24px; }
.panel + .panel { margin-top: 18px; }
.panel h2 { font-size: 1.15rem; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-head h2 { margin: 0; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.layout-left { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.sticky { position: sticky; top: 16px; }
.page-head { margin-bottom: 26px; }
.page-head p { color: var(--ink-2); max-width: 70ch; }
.crumbs { font-size: .88rem; color: var(--ink-3); margin-bottom: 10px; }
.crumbs a { color: var(--ink-2); }
.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.6em; }
.prose ul { padding-inline-start: 1.2em; }
.prose li { margin-bottom: .35em; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }

/* ---------- Badges, alerts ---------- */
.badge { display: inline-block; font-size: .78rem; font-weight: 500; padding: 3px 9px; border-radius: 999px;
         white-space: nowrap; background: var(--muted-bg); color: var(--muted); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.tag { display: inline-block; font-size: .8rem; color: var(--gold-ink); font-weight: 500; text-decoration: none; }
.chip { display: inline-block; font-size: .82rem; padding: 3px 10px; border-radius: 999px; background: var(--surface);
        border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; margin: 0 4px 6px 0; }
a.chip:hover { border-color: var(--navy); color: var(--navy); }
.alerts { margin-bottom: 18px; }
.alert { border-radius: var(--r-sm); padding: 12px 16px; margin-bottom: 8px; border-inline-start: 4px solid;
         background: var(--white); }
.alert.success { border-color: var(--ok); background: var(--ok-bg); }
.alert.error { border-color: var(--bad); background: var(--bad-bg); }
.alert.info, .alert.warning { border-color: var(--gold); background: var(--gold-soft); }
.callout { background: var(--gold-soft); border: 1px solid #EBD9AF; border-radius: var(--r-md); padding: 16px 18px; }
.callout h3 { font-size: 1rem; }

/* ---------- Home ---------- */
.hero { background: var(--navy); color: #fff; padding: 54px 0 46px; position: relative; overflow: hidden; }
.hero::before {  /* faint circuit traces, echoing the logo */
  content: ""; position: absolute; inset: 0; opacity: .09; pointer-events: none;
  background-image:
    linear-gradient(90deg, #fff 1px, transparent 1px), linear-gradient(#fff 1px, transparent 1px);
  background-size: 46px 46px; mask-image: linear-gradient(100deg, transparent 30%, #000 85%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 56px;
              align-items: center; }
.hero-mark { font-family: var(--serif); font-weight: 600; font-size: clamp(1.4rem, 1rem + 1.4vw, 2rem);
             color: var(--gold); letter-spacing: .02em; margin: 0 0 4px; }
.hero-cover { margin: 0; }
.hero-cover img { display: block; width: 100%; height: auto; border-radius: 6px;
                  box-shadow: 0 24px 48px -20px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08); }
.hero-cover a:hover img { transform: translateY(-2px); }
@media (prefers-reduced-motion: no-preference) { .hero-cover img { transition: transform .25s ease; } }
.hero-cover figcaption { margin-top: 14px; display: flex; flex-direction: column; gap: 2px; font-size: .95rem; }
.hero-cover figcaption a { color: #fff; font-weight: 500; text-decoration-color: var(--gold); }
.muted-light { color: #AEB8CC; font-size: .85rem; }
.hero h1 { color: #fff; font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, 1.2rem + 2.6vw, 3.1rem);
           line-height: 1.12; margin-bottom: 14px; }
.hero .lead { font-size: 1.12rem; color: #D5DCE8; max-width: 52ch; }
.hero .facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 18px 0 26px; padding: 0; list-style: none;
               color: #C9D2E2; font-size: .92rem; }
.hero .facts li::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
                          background: var(--gold); margin-inline-end: 8px; vertical-align: middle; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.08); color: #fff; border-color: #fff; }
.issue-card { background: var(--white); color: var(--ink); border-radius: var(--r-md); padding: 22px;
              border-top: 5px solid var(--gold); box-shadow: 0 20px 40px -18px rgba(0,0,0,.45); }
.issue-card .vol { font-family: var(--serif); font-size: 1.4rem; color: var(--navy-deep); }
.issue-card ol { padding-inline-start: 1.1em; margin: 12px 0 16px; }
.issue-card li { margin-bottom: 8px; font-size: .94rem; line-height: 1.4; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 34px; margin-top: 40px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
                 border-bottom: 2px solid var(--navy); padding-bottom: 8px; margin-bottom: 4px; }
.section-title h2 { margin: 0; font-size: 1.3rem; }

/* Article list rows (not cards – a journal reads as a list) */
.alist { list-style: none; padding: 0; margin: 0; }
.aitem { padding: 20px 0; border-bottom: 1px solid var(--line); }
.aitem .meta-top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: .82rem; color: var(--ink-3); }
.aitem h3 { font-family: var(--serif); font-weight: 500; font-size: 1.2rem; margin: 6px 0 6px; line-height: 1.35; }
.aitem h3 a { color: var(--navy-deep); text-decoration: none; }
.aitem h3 a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.aitem .authors { color: var(--ink-2); font-size: .93rem; margin-bottom: 6px; }
.aitem .snippet { color: var(--ink-2); font-size: .93rem; display: -webkit-box; -webkit-line-clamp: 2;
                  -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 8px; }
.aitem .links { display: flex; gap: 16px; font-size: .88rem; flex-wrap: wrap; }
.ribbon-oa { display: inline-flex; align-items: center; gap: 5px; color: var(--gold-ink); font-weight: 500; }
.ribbon-oa svg { width: 12px; height: 15px; }

.side-block { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px;
              margin-bottom: 18px; }
.side-block h3 { font-size: 1rem; margin-bottom: 12px; }
.side-list { list-style: none; padding: 0; margin: 0; }
.side-list li { padding: 8px 0; border-top: 1px solid var(--line-2); font-size: .93rem; }
.side-list li:first-child { border-top: 0; padding-top: 0; }
.metric-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-2);
              font-size: .93rem; }
.metric-row:first-of-type { border-top: 0; }
.metric-row strong { color: var(--navy-deep); font-variant-numeric: tabular-nums; }
.sections-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.section-link { display: flex; gap: 12px; align-items: center; background: var(--white); border: 1px solid var(--line);
                border-radius: var(--r-sm); padding: 12px 14px; text-decoration: none; color: var(--ink); }
.section-link:hover { border-color: var(--navy); }
.section-link .ab { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--gold-soft);
                    color: var(--gold-ink); display: grid; place-items: center; font-weight: 600; font-size: .8rem; }

/* ---------- Article page ---------- */
.article-head { background: var(--white); border-bottom: 1px solid var(--line); padding: 30px 0 26px; }
.article-head h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.3rem);
                   max-width: 30em; line-height: 1.22; }
.author-line { font-size: 1rem; margin: 10px 0 4px; }
.author-line .au { white-space: nowrap; }
.author-line sup { color: var(--gold-ink); font-weight: 600; }
.orcid { display: inline-block; width: 15px; height: 15px; vertical-align: -2px; margin-inline-start: 3px; }
.affils { font-size: .87rem; color: var(--ink-3); margin: 8px 0 0; padding: 0; list-style: none; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .88rem; color: var(--ink-2); margin-top: 14px; }
.article-body h2 { font-size: 1.2rem; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.article-body h2:first-child { margin-top: 0; padding-top: 0; border: 0; }
.article-body .abstract { font-family: var(--serif); font-size: 1.06rem; line-height: 1.75; max-width: 70ch; }
.refs { padding-inline-start: 1.6em; font-size: .9rem; color: var(--ink-2); }
.refs li { margin-bottom: 6px; }
.dates-table { width: 100%; font-size: .9rem; border-collapse: collapse; }
.dates-table td { padding: 6px 0; border-top: 1px solid var(--line-2); }
.dates-table td:last-child { text-align: end; color: var(--ink); font-variant-numeric: tabular-nums; }
.cite-box { background: var(--surface); border-radius: var(--r-sm); padding: 12px; font-size: .86rem; line-height: 1.5;
            border: 1px solid var(--line); }
.notice-retract { background: var(--bad-bg); border: 1px solid #E8B4B4; color: var(--bad); padding: 14px 16px;
                  border-radius: var(--r-sm); margin-bottom: 18px; }
.review-history details { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 16px; margin-bottom: 10px;
                          background: var(--white); }
.review-history summary { cursor: pointer; font-weight: 500; }
.assessment { border-inline-start: 4px solid var(--gold); background: var(--gold-soft); padding: 14px 18px;
              border-radius: 0 var(--r-sm) var(--r-sm) 0; margin-bottom: 18px; }
html[dir="rtl"] .assessment { border-radius: var(--r-sm) 0 0 var(--r-sm); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th { text-align: start; font-weight: 500; color: var(--ink-3); font-size: .83rem; padding: 8px 10px;
                border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 11px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.data tr:hover td { background: #FAFBFD; }
table.data .title-cell a { color: var(--navy-deep); font-weight: 500; text-decoration: none; }
table.data .title-cell a:hover { text-decoration: underline; }
.overdue { color: var(--bad); font-weight: 500; }

/* ---------- Dashboard ---------- */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap;
             margin-bottom: 22px; }
.counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.counter { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; }
.counter b { display: block; font-size: 1.6rem; color: var(--navy-deep); font-weight: 600; line-height: 1.1;
             font-variant-numeric: tabular-nums; }
.counter span { font-size: .85rem; color: var(--ink-3); }
.counter.alert-c { border-color: #E8B4B4; background: var(--bad-bg); }
.queue-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.queue-tabs a { text-decoration: none; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line);
                font-size: .88rem; color: var(--ink-2); background: var(--white); }
.queue-tabs a b { color: var(--navy-deep); margin-inline-start: 4px; }
.empty { text-align: center; padding: 26px 10px; color: var(--ink-3); }

/* ---------- Submission detail ---------- */
.progress { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 16px 0 6px; padding: 0;
            list-style: none; counter-reset: s; }
.progress li { font-size: .78rem; color: var(--ink-3); text-align: center; position: relative; padding-top: 16px; }
.progress li::before { content: ""; position: absolute; top: 0; inset-inline: 0; height: 6px; border-radius: 3px;
                       background: var(--line); }
.progress li.done::before { background: var(--navy); }
.progress li.current::before { background: var(--gold); }
.progress li.current { color: var(--navy-deep); font-weight: 600; }
.sub-head { background: var(--white); border-bottom: 1px solid var(--line); padding: 24px 0 18px; }
.sub-head h1 { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; max-width: 40em; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; font-size: .93rem; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
.files { list-style: none; padding: 0; margin: 0; }
.files li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-2);
            font-size: .93rem; }
.files li:first-child { border-top: 0; }
.files .ficon { flex: none; width: 34px; height: 40px; border-radius: 4px; background: var(--surface);
                border: 1px solid var(--line); display: grid; place-items: center; font-size: .65rem; font-weight: 600;
                color: var(--ink-2); }
.files .fmeta { font-size: .8rem; color: var(--ink-3); }
.files .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.action-panel { border: 2px solid var(--gold); background: var(--white); border-radius: var(--r-md); padding: 20px 22px;
                margin-bottom: 18px; }
.action-panel h2 { font-size: 1.1rem; }
.review-card { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; margin-bottom: 12px; }
.review-card .text { white-space: pre-wrap; font-size: .94rem; }
.letter { white-space: pre-wrap; font-family: var(--serif); background: var(--surface); padding: 16px 18px;
          border-radius: var(--r-sm); font-size: .95rem; border: 1px solid var(--line); }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { padding: 0 0 14px; padding-inline-start: 20px; position: relative; font-size: .9rem; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 4px; top: 7px; width: 8px; height: 8px;
                       border-radius: 50%; background: var(--gold); }
.timeline li::after { content: ""; position: absolute; inset-inline-start: 7.5px; top: 18px; bottom: 0; width: 1px;
                      background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline time { display: block; font-size: .78rem; color: var(--ink-3); }
.msg { padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface); margin-bottom: 10px; }
.msg.internal { background: var(--gold-soft); }
.msg .who { font-size: .82rem; color: var(--ink-3); margin-bottom: 4px; }
.msg .body { white-space: pre-wrap; font-size: .94rem; }

/* ---------- Wizard ---------- */
.steps { display: flex; gap: 0; margin: 0 0 24px; padding: 0; list-style: none; border: 1px solid var(--line);
         border-radius: var(--r-md); overflow: hidden; background: var(--white); }
.steps li { flex: 1; }
.steps li > a, .steps li > span { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-size: .9rem;
                        text-decoration: none; color: var(--ink-3); height: 100%; }
.steps .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem;
            border: 1px solid var(--line); flex: none; }
.steps .done a { color: var(--ink-2); }
.steps .done .n { background: var(--navy); color: #fff; border-color: var(--navy); }
.steps .current { background: var(--gold-soft); }
.steps .current > a, .steps .current > span { color: var(--navy-deep); font-weight: 600; }
.steps .current .n { background: var(--gold); border-color: var(--gold); color: var(--navy-deep); }
.contrib { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 16px 16px 4px; margin-bottom: 12px;
           background: #FCFDFE; }
.contrib-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.wordcount { font-size: .82rem; color: var(--ink-3); text-align: end; margin-top: 4px; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 6px 0; padding-inline-start: 26px; position: relative; }
.checklist li::before { content: "✕"; position: absolute; inset-inline-start: 0; color: var(--bad); font-weight: 700; }
.checklist.ok li::before { content: "✓"; color: var(--ok); }
.dropzone { border: 2px dashed #C9D0DC; border-radius: var(--r-md); padding: 18px; background: #FCFDFE; }

/* ---------- Auth ---------- */
.auth { max-width: 460px; margin: 0 auto; }
.auth.wide { max-width: 760px; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-deep); color: #C6CEDE; padding: 40px 0 24px; font-size: .9rem; margin-top: 40px;
          border-top: 6px solid var(--gold); }
.footer a { color: #fff; }
.footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.footer h4 { color: #fff; font-size: .95rem; margin-bottom: 10px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 6px; }
.footer .uni { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.footer .uni img { width: 64px; height: 64px; border-radius: 50%; background: #fff; padding: 2px; }
.footer .base { border-top: 1px solid rgba(255,255,255,.12); margin-top: 26px; padding-top: 16px;
                display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .82rem; }

/* Mixed-language content (English text inside Arabic pages and vice versa) */
.letter, .review-card .text, .msg .body, .kv dd, .kv dd > p, .prose, .prose p, .aitem h3, .aitem .snippet, .timeline li { unicode-bidi: plaintext; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .layout, .layout-left, .home-grid, .hero .wrap { grid-template-columns: 1fr; }
  .hero-cover { max-width: 260px; }
  .footer .cols { grid-template-columns: 1fr 1fr; }
  .sticky { position: static; }
}
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .nav ul { display: none; flex-direction: column; }
  .nav.open ul { display: flex; }
  .nav .dd > ul { position: static; display: flex; box-shadow: none; border: 0; background: transparent; }
  .nav .dd > ul a { color: #C6CEDE; padding-inline-start: 26px; }
  .masthead .tools .hide-sm { display: none; }
  .brand .name { font-size: .98rem; }
  .brand .pub { display: none; }
  .brand img { width: 46px; height: 46px; }
  .masthead .top { flex-wrap: wrap; gap: 8px; }
  .masthead .tools { margin-inline-start: 0; width: 100%; justify-content: space-between; flex-wrap: nowrap; gap: 4px; }
  .masthead .tools a, .masthead .tools .lang-btn { font-size: .86rem; padding: 6px 6px; }
  .masthead .tools a.btn-gold { padding: 7px 10px; }
  .hero { padding: 36px 0 34px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .steps .lbl { display: none; }
  .progress li { font-size: 0; }
  .footer .cols { grid-template-columns: 1fr; }
  .panel { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print {
  .masthead, .footer, .nav, .no-print { display: none !important; }
  body { background: #fff; }
}
