/* IBM Plex Sans Arabic 1.005, the unmodified WOFF2 files of IBM's @ibm/plex-sans-arabic 1.1.0
   (SIL OFL 1.1, Reserved Font Name "Plex"; fonts/OFL.txt). */
@font-face { font-family: "Plex Arabic"; src: url("fonts/IBMPlexSansArabic-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url("fonts/IBMPlexSansArabic-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --bg: #ffffff; --surface: #f5f5f7; --card: #ffffff; --ink: #0b0b0d; --muted: #5f5f6b; --line: #e4e3ec;
  --accent: #4f46e5; --accent-ink: #ffffff; --accent-wash: #efeeff;
  --sub: #fdf0d5; --sub-line: #b26a00; --del: #ffe1e6; --del-line: #c9324c; --ins: #dcecff; --ins-line: #1d5fbf;
  --ok: #087a63; --focus: #6366f1; --bar: #4f46e5; --bar-hover: #3f37c9; --whisker: #2d2d36; --grid: #e4e3ec; --ref: #8a8a96;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: "Plex Arabic", system-ui, -apple-system, "Segoe UI", "Noto Sans Arabic", "Geeza Pro", Tahoma, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0e12; --surface: #15151b; --card: #1a1a21; --ink: #ececf1; --muted: #a3a3b2; --line: #2c2c37;
    --accent: #8b85ff; --accent-ink: #0e0e12; --accent-wash: #24224a;
    --sub: #4a3a12; --sub-line: #f0b24a; --del: #4d1d27; --del-line: #ff7b93; --ins: #15304f; --ins-line: #7ab4ff;
    --ok: #4fd1ae; --focus: #8b85ff; --bar: #7c74f5; --bar-hover: #9a94ff; --whisker: #d6d6df; --grid: #2c2c37; --ref: #8a8a96;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e0e12; --surface: #15151b; --card: #1a1a21; --ink: #ececf1; --muted: #a3a3b2; --line: #2c2c37;
  --accent: #8b85ff; --accent-ink: #0e0e12; --accent-wash: #24224a;
  --sub: #4a3a12; --sub-line: #f0b24a; --del: #4d1d27; --del-line: #ff7b93; --ins: #15304f; --ins-line: #7ab4ff;
  --ok: #4fd1ae; --focus: #8b85ff; --bar: #7c74f5; --bar-hover: #9a94ff; --whisker: #d6d6df; --grid: #2c2c37; --ref: #8a8a96;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface); color: var(--ink); font: 400 16px/1.6 var(--sans); overflow-x: hidden; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; font-weight: 600; }
h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
h2 { font-size: 1.15rem; }
h3 { font-size: .95rem; color: var(--muted); }
p { margin: .4rem 0; }
a { color: var(--accent); }
code, pre { font-family: var(--mono); }
code { unicode-bidi: isolate; font-size: .85em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; inset-inline-start: 1rem; top: -3rem; background: var(--card); padding: .5rem 1rem; border-radius: 8px; z-index: 10; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; font-weight: 600; }
.mark { width: 28px; height: 28px; }
.mark-ink { fill: var(--ink); }
.mark-accent { fill: var(--accent); }
.lang { font: inherit; font-size: .9rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: .25rem .9rem; cursor: pointer; }
.intro { padding: 1.6rem 0 1rem; max-width: 780px; }
.lede { font-size: 1.05rem; }
.note { color: var(--muted); font-size: .88rem; }
.lbl { color: var(--muted); font-size: .9rem; }
.links { margin-top: .6rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .75rem .9rem; }
.tile .v { font-size: 1.45rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tile .k { color: var(--muted); font-size: .85rem; line-height: 1.35; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem; margin-bottom: 1rem; }
.filters { display: flex; align-items: center; gap: .6rem; margin: .7rem 0; flex-wrap: wrap; }
select { font: inherit; font-size: .92rem; padding: .3rem .5rem; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); max-width: 100%; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: .45rem .55rem; border-bottom: 1px solid var(--line); text-align: start; }
th { font-weight: 600; }
td.num, th.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.sep td { border-top: 2px solid var(--line); }
.examples { display: grid; gap: .7rem; }
.ex { border: 1px solid var(--line); border-radius: 10px; padding: .75rem .9rem; background: var(--surface); }
.ex .cite { overflow-wrap: anywhere; unicode-bidi: plaintext; text-align: start; margin: .35rem 0; }
.badges { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.badge { font-size: .78rem; padding: .08rem .55rem; border-radius: 999px; background: var(--accent-wash); color: var(--ink); }
.badge.v-verified { background: color-mix(in srgb, var(--ok) 20%, transparent); }
.badge.v-mismatched { background: var(--sub); }
.badge.v-not_found { background: var(--del); }
.meta { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
pre { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .7rem; font-size: .82rem; text-align: left; }
.foot { color: var(--muted); font-size: .85rem; padding-bottom: 2rem; }
.skip:focus { top: .5rem; }

bdi { white-space: nowrap; }
