:root {
  color-scheme: light dark;
  --fg: #142c36; --muted: #475c65; --bg: #f3f5f2; --card: #fff;
  --line: #ced9d6; --subtle: #eaf0ed; --accent: #086354; --on-accent: #fff;
  --amber-bg: #fff1ce; --amber-fg: #784209;
  --radius: 12px; --touch: 44px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e5eee9; --muted: #afc3bb; --bg: #101b1a; --card: #172824;
    --line: #41554f; --subtle: #233b34; --accent: #80dfc2; --on-accent: #10251e;
    --amber-bg: #4a3515; --amber-fg: #ffdfa0;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 16px/1.6 "Segoe UI", "Noto Sans Arabic", Tahoma, sans-serif; color: var(--fg); background: var(--bg); }
main { max-width: 1160px; margin: 0 auto; padding: 32px 24px 64px; }
header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
a { color: var(--accent); text-underline-offset: 3px; }
header a { display: inline-flex; align-items: center; min-height: var(--touch); text-decoration: none; }
.brand { font-weight: 800; letter-spacing: -.04em; font-size: 1.4rem; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 30px 0 8px; font-weight: 700; letter-spacing: .04em; }
.badge-beta { border: 1px solid var(--accent); color: var(--accent); padding: 1px 8px; border-radius: 5px; font-size: .75rem; letter-spacing: 0; }
h1 { font: 700 clamp(2rem, 5vw, 3.2rem)/1.2 Georgia, "Noto Naskh Arabic", serif; letter-spacing: -.03em; margin: 0 0 14px; }
html[dir="rtl"] h1 { letter-spacing: 0; }
h2 { font-size: 1.25rem; margin: 0 0 6px; }
.lead { color: var(--muted); max-width: 850px; margin: 0 0 20px; }
.note { border-inline-start: 3px solid var(--accent); padding: 10px 14px; background: var(--card); border-radius: 6px; margin: 20px 0; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--subtle); margin-top: 10px; }
.tab { min-height: var(--touch); padding: 8px 28px; border: 0; border-radius: 6px; background: transparent; color: var(--fg); font: inherit; font-weight: 700; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.edition { margin: 24px 0 36px; }
.edition > p { color: var(--muted); margin: 4px 0 16px; }
.table-scroll { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
table { border-collapse: collapse; width: 100%; table-layout: fixed; }
caption { text-align: start; padding: 12px 18px; color: var(--muted); font-size: .85rem; border-bottom: 1px solid var(--line); }
th, td { padding: 18px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { background: var(--subtle); font-size: .9rem; }
th:first-child { width: 25%; }
tbody th { font-weight: 650; font-size: .95rem; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
td { border-inline-start: 1px solid var(--line); }
.btn { display: block; width: fit-content; max-width: 100%; min-height: var(--touch); padding: 11px 14px; margin: 6px 0; border-radius: 7px; background: var(--accent); color: var(--on-accent); text-decoration: none; font-size: .9rem; font-weight: 700; }
.btn:hover, .tab:hover { filter: brightness(.93); }
.link-secondary { display: inline-flex; align-items: center; min-height: var(--touch); font-size: .85rem; }
.package + .package { margin-top: 6px; }
.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: .8rem; }
.hash { font-family: Consolas, "Liberation Mono", monospace; cursor: help; }
.hash-full { overflow-wrap: anywhere; min-width: 0; }
.copy-hash { min-height: var(--touch); min-width: var(--touch); padding: 5px 8px; background: var(--subtle); color: var(--fg); border: 1px solid var(--line); border-radius: 5px; font: inherit; cursor: pointer; }
.copy-hash:hover { border-color: var(--accent); }
.package-note, .rosetta-note { color: var(--muted); font-size: .85rem; margin: 6px 0 0; }
.badge-fallback { display: inline-block; margin-bottom: 6px; padding: 3px 9px; border-radius: 5px; background: var(--amber-bg); color: var(--amber-fg); font-size: .75rem; font-weight: 700; }
.unavailable { background: var(--subtle); color: var(--muted); vertical-align: middle; }
.coming-soon { display: block; text-align: center; font-size: .9rem; }
.recommendation { display: block; font-size: .75rem; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.recommended { box-shadow: inset 0 3px 0 var(--accent); }
.mobile-arch { display: none; }
.copy-status { color: var(--accent); }
.copy-status:empty { display: none; }
.manual-hash { padding: 12px; border: 1px solid var(--line); background: var(--card); border-radius: 6px; overflow-wrap: anywhere; user-select: all; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; overflow-wrap: anywhere; }
.card h3 { margin: 0 0 8px; }
.watch-included { margin-top: 24px; }
.watch-included p { margin: 8px 0 0; color: var(--muted); }
.card ul { padding-inline-start: 18px; margin: 8px 0; }
.card li + li { margin-top: 10px; }
.notes-heading { margin-top: 40px; }
footer { margin-top: 40px; color: var(--muted); font-size: .85rem; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
bdi { direction: ltr; unicode-bidi: isolate; }
@media (max-width: 719px) {
  main { padding: 20px 14px 40px; }
  .grid { grid-template-columns: 1fr; }
  .tabs { display: flex; }
  .tab { flex: 1; padding-inline: 12px; }
  table, tbody, tr, th, td { display: block; width: 100%; }
  caption { display: block; width: 100%; }
  thead { display: none; }
  th:first-child { width: 100%; }
  tbody th { background: var(--subtle); padding: 12px 16px; }
  td { border-inline-start: 0; padding: 14px 16px; }
  tbody tr:last-child th, tbody tr:last-child td { border-bottom: 1px solid var(--line); }
  tbody tr:last-child td:last-child { border-bottom: 0; }
  .mobile-arch { display: block; font-weight: 700; font-size: .85rem; margin-bottom: 8px; color: var(--muted); }
  .coming-soon { text-align: start; }
  .btn { width: 100%; text-align: center; }
}

.version-history article { margin-block: 1.5rem; }
.version-history ul { padding-inline-start: 1.5rem; }
.version-history li { margin-block: .65rem; overflow-wrap: anywhere; }
.version-history .hash { display: inline-block; max-width: 100%; }
.history-status { font-size: .85rem; }
