@font-face {
  font-family: 'Alexandria';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/Alexandria-500-arabic.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'Alexandria';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/Alexandria-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Alexandria';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/Alexandria-700-arabic.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'Alexandria';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/Alexandria-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Alexandria';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(fonts/Alexandria-800-arabic.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'Alexandria';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(fonts/Alexandria-800-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/IBMPlexSansArabic-400-arabic.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/IBMPlexSansArabic-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/IBMPlexSansArabic-500-arabic.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/IBMPlexSansArabic-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/IBMPlexSansArabic-600-arabic.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/IBMPlexSansArabic-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Taibah Publish: cinematic night-library theme. RTL-first, one accent (lamp gold).
   Shape rule: panels and cards 14px, fields 10px, buttons and chips full pill. */
:root {
  color-scheme: dark;
  --bg: #07110e;
  --bg-2: #0a1714;
  --surface: #0e1d19;
  --surface-2: #122520;
  --field: #091512;
  --line: rgba(206, 226, 214, 0.11);
  --line-strong: rgba(206, 226, 214, 0.2);
  --ink: #e9efe9;
  --ink-soft: #c5d3cb;
  --muted: #93a99e;
  --accent: #d6b05a;
  --accent-ink: #0b1310;
  --accent-wash: rgba(214, 176, 90, 0.1);
  --accent-line: rgba(214, 176, 90, 0.38);
  --ok: #8fd0ad;
  --warn: #e7c27a;
  --bad: #ec9a8e;
  --bad-wash: rgba(236, 154, 142, 0.1);
  --r-card: 14px;
  --r-field: 10px;
  --r-pill: 999px;
  --shadow: 0 24px 60px -28px rgba(0, 8, 5, 0.85);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --font-display: "Alexandria", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --gutter: clamp(18px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--bg); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Film grain: fixed, non-interactive layer. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0; }
html[dir="ltr"] h1, html[dir="ltr"] h2 { letter-spacing: -0.015em; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px var(--gutter);
}
.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(7, 17, 14, 0.8);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-block-end: 1px solid var(--line);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.topbar.is-solid::before { opacity: 1; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(140deg, #e7c878 0%, var(--accent) 45%, #9c7a2c 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 0 24px -6px rgba(214, 176, 90, 0.6);
  flex-shrink: 0;
}
.brand-copy { display: flex; flex-direction: column; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
.brand-tag { display: none; }

.lang-toggle {
  font: 500 0.85rem/1 var(--font-body);
  color: var(--ink);
  background: rgba(7, 17, 14, 0.45);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  padding: 9px 18px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.2s var(--ease), border-color 0.2s;
}
.lang-toggle:hover { border-color: var(--accent-line); }
.lang-toggle:active { transform: scale(0.97); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: min(92dvh, 940px);
  display: grid;
  align-items: end;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
html[dir="rtl"] .hero-media { transform: scaleX(-1); }
.hero-pic, .hero-pic img { width: 100%; height: 100%; }
.hero-pic img { display: block; object-fit: cover; object-position: 68% 50%; }
.hero::before, .hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero::before { background: linear-gradient(90deg, rgba(7, 17, 14, 0.94) 0%, rgba(7, 17, 14, 0.7) 38%, rgba(7, 17, 14, 0.08) 72%); }
html[dir="rtl"] .hero::before { background: linear-gradient(270deg, rgba(7, 17, 14, 0.94) 0%, rgba(7, 17, 14, 0.7) 38%, rgba(7, 17, 14, 0.08) 72%); }
.hero::after { background: linear-gradient(0deg, var(--bg) 0%, rgba(7, 17, 14, 0) 34%), linear-gradient(180deg, rgba(7, 17, 14, 0.7) 0%, rgba(7, 17, 14, 0) 18%); }

.hero-inner {
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding: 140px var(--gutter) clamp(48px, 9vh, 104px);
}
.hero-title {
  font-weight: 800;
  font-size: clamp(2.4rem, 5.6vw, 5.2rem);
  line-height: 1.18;
  max-width: 13ch;
  padding-block-end: 0.08em;
  text-wrap: balance;
}
html[dir="ltr"] .hero-title { line-height: 1.04; letter-spacing: -0.03em; max-width: 14ch; }
.hero-lede {
  margin: 22px 0 0;
  max-width: 46ch;
  font-size: clamp(1rem, 1.25vw, 1.18rem);
  color: var(--ink-soft);
  text-wrap: pretty;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  margin-block-start: 34px;
  padding: 15px 30px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 1rem/1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 14px 40px -14px rgba(214, 176, 90, 0.65);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 20px 44px -14px rgba(214, 176, 90, 0.75); }
.hero-cta:active { transform: translateY(0) scale(0.98); }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px clamp(28px, 4vw, 56px);
  margin-block-start: clamp(40px, 7vh, 72px);
  padding-block-start: 22px;
  border-block-start: 1px solid var(--line);
  max-width: 760px;
}
.stat { margin: 0; display: flex; align-items: baseline; gap: 10px; color: var(--muted); font-size: 0.92rem; }
.stat strong { font: 700 clamp(1.7rem, 2.6vw, 2.3rem)/1 var(--font-display); color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-text { align-self: center; }

/* Intro sequence (runs once on load). */
@media (prefers-reduced-motion: no-preference) {
  .hero-pic { animation: hero-settle 2.6s var(--ease) both; }
  .hero-inner > * { animation: rise-in 1s var(--ease) both; }
  .hero-inner > :nth-child(1) { animation-delay: 0.25s; }
  .hero-inner > :nth-child(2) { animation-delay: 0.42s; }
  .hero-inner > :nth-child(3) { animation-delay: 0.58s; }
  .hero-inner > :nth-child(4) { animation-delay: 0.74s; }
}
@keyframes hero-settle { from { opacity: 0; transform: scale(1.1); } to { opacity: 1; transform: scale(1); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* Scroll-driven parallax where supported (no JS). */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero-pic img { animation: hero-drift linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
    .hero-inner { animation: hero-lift linear both; animation-timeline: scroll(root); animation-range: 0 85vh; }
  }
}
@keyframes hero-drift { to { transform: translateY(14%) scale(1.06); } }
@keyframes hero-lift { to { transform: translateY(-10%); opacity: 0.15; } }

/* ---------- Disclaimer band ---------- */
.disclaimer {
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px var(--gutter);
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.7;
  border-block-end: 1px solid var(--line);
}

/* ---------- Workspace ---------- */
.layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter) 80px;
  display: grid;
  grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 40px);
  align-items: start;
  scroll-margin-top: 64px;
}
.col-form, .col-results { display: grid; gap: 20px; min-width: 0; }
#results { display: grid; gap: 22px; }

.panel {
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(20px, 2.2vw, 28px);
  box-shadow: var(--shadow);
}
.panel h2 { font-size: 1.12rem; line-height: 1.4; }
.panel-lede { margin: 8px 0 18px; color: var(--muted); font-size: 0.9rem; max-width: 62ch; }

/* Reveal (classes added by motion.js only when motion is allowed). */
.js-motion .reveal { opacity: 0; transform: translateY(28px); }
.js-motion .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.9s var(--ease) var(--reveal-delay, 0ms), transform 0.9s var(--ease) var(--reveal-delay, 0ms);
}

/* ---------- Upload ---------- */
.dropzone {
  display: grid;
  gap: 6px;
  place-items: center;
  text-align: center;
  padding: 34px 20px;
  border: 1.5px dashed var(--accent-line);
  border-radius: var(--r-card);
  background: radial-gradient(120% 90% at 50% 0%, var(--accent-wash) 0%, transparent 70%);
  cursor: pointer;
  transition: border-color 0.25s, transform 0.25s var(--ease);
}
.dropzone:hover, .dropzone.is-drag { border-style: solid; border-color: var(--accent); transform: translateY(-1px); }
.dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.drop-title { font-weight: 600; font-size: 0.98rem; color: var(--ink); }
.drop-sub { font-size: 0.8rem; color: var(--muted); }

.scan-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 14px; }
.scan-chip {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
}
.scan-chip.is-ok { color: var(--ok); border-color: rgba(143, 208, 173, 0.35); }
.scan-chip.is-warn { color: var(--warn); border-color: rgba(231, 194, 122, 0.35); }

/* ---------- Form ---------- */
form { display: grid; gap: 14px; }
form label { display: grid; gap: 6px; font-size: 0.82rem; font-weight: 500; color: var(--ink-soft); }
form input:not([type="checkbox"]), form select {
  width: 100%;
  font: 400 0.95rem/1.4 var(--font-body);
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-field);
  padding: 11px 13px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
form input::placeholder { color: #6f857a; }
form input:hover, form select:hover { border-color: rgba(206, 226, 214, 0.32); }
form input:focus, form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
form select option { background: var(--surface); color: var(--ink); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.toggles {
  display: grid;
  gap: 2px;
  padding: 8px 0;
  border-block: 1px solid var(--line);
}
.checkline {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 0.88rem !important;
  color: var(--ink) !important;
  cursor: pointer;
}
.checkline input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); flex-shrink: 0; }

.btn-primary {
  font: 600 1rem/1.3 var(--font-body);
  color: var(--accent-ink);
  background: var(--accent);
  border: 0;
  border-radius: var(--r-pill);
  padding: 15px 22px;
  cursor: pointer;
  box-shadow: 0 14px 36px -16px rgba(214, 176, 90, 0.7);
  transition: transform 0.2s var(--ease), filter 0.2s;
}
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: progress; }

.form-msg { margin: 8px 0 0; min-height: 1.2em; font-size: 0.84rem; color: var(--muted); }
.form-msg:empty { margin: 0; min-height: 0; }
.form-msg.is-err { color: var(--bad); }

/* ---------- Weights ---------- */
.weights { list-style: none; margin: 14px 0 0; padding: 0; display: grid; }
.weights li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-block-end: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.weights li strong { color: var(--accent); font-variant-numeric: tabular-nums; font-weight: 600; }
.weights .w-note { display: block; border: 0; padding-block-start: 12px; font-size: 0.8rem; color: var(--muted); }

/* ---------- Empty state ---------- */
.empty-state {
  min-height: 420px;
  display: grid;
  place-content: center;
  text-align: center;
  background:
    radial-gradient(70% 60% at 50% 40%, rgba(214, 176, 90, 0.07) 0%, transparent 70%),
    linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
}
.empty-state p {
  margin: 0 auto;
  max-width: 34ch;
  font: 500 clamp(1.1rem, 1.6vw, 1.35rem)/1.6 var(--font-display);
  color: var(--ink-soft);
}
.match-list .empty-state { min-height: 180px; }

/* ---------- Recommendations ---------- */
.recs-panel { border-color: var(--accent-line); }
.recs-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.recs-pill {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: var(--r-pill);
  background: var(--accent-wash);
  color: var(--accent);
  border: 1px solid var(--accent-line);
  white-space: nowrap;
}
.recs-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; }
.rec-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 13px 0;
  border-block-start: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.rec-sev {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  border: 1px solid currentColor;
}
.sev-blocker { color: var(--bad); }
.sev-high { color: var(--warn); }
.sev-quick_win { color: var(--ok); }

/* ---------- Results head + filters ---------- */
.results-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; padding-block-start: 10px; }
.results-head h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.3; }
.results-sub { margin: 6px 0 0; color: var(--muted); font-size: 0.9rem; }
.pub-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip {
  font: 500 0.82rem/1 var(--font-body);
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  padding: 9px 15px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.filter-chip:hover { border-color: var(--accent-line); color: var(--ink); }
.filter-chip:active { transform: scale(0.97); }
.filter-chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }

/* ---------- Match cards ---------- */
.match-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.match-card {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 20px;
  padding: clamp(18px, 2vw, 24px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  transition: border-color 0.3s, transform 0.3s var(--ease);
}
.match-card:hover { border-color: var(--line-strong); }
.match-card.is-top {
  border-color: var(--accent-line);
  background: linear-gradient(135deg, rgba(214, 176, 90, 0.08) 0%, var(--surface) 46%);
  box-shadow: var(--shadow);
}
.match-card.is-blocked { opacity: 0.66; }
.match-card.is-blocked:hover { opacity: 0.9; }

@media (prefers-reduced-motion: no-preference) {
  .match-card { animation: rise-in 0.7s var(--ease) both; }
  .match-card:nth-child(2) { animation-delay: 60ms; }
  .match-card:nth-child(3) { animation-delay: 120ms; }
  .match-card:nth-child(4) { animation-delay: 180ms; }
  .match-card:nth-child(5) { animation-delay: 240ms; }
  .match-card:nth-child(6) { animation-delay: 300ms; }
  .match-card:nth-child(n + 7) { animation-delay: 360ms; }
  .rec-item { animation: rise-in 0.6s var(--ease) both; }
}

.ring-wrap { width: 84px; }
.score-ring { width: 84px; height: 84px; display: block; }
.ring-bg { fill: none; stroke: rgba(206, 226, 214, 0.1); stroke-width: 6; }
.ring-fg { fill: none; stroke: var(--ink-soft); stroke-width: 6; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 40px 40px; }
.match-card.is-top .ring-fg { stroke: var(--accent); }
.match-card.is-blocked .ring-fg { stroke: var(--bad); }
.ring-text { fill: var(--ink); font: 700 17px var(--font-display); }

.card-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; }
.card-title-group { display: grid; gap: 3px; min-width: 0; }
.card-provider { font-size: 0.78rem; color: var(--muted); font-weight: 500; }
.card-name { font-size: 1.08rem; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  white-space: nowrap;
}
.badge-top { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.badge-blocked { color: var(--bad); border-color: rgba(236, 154, 142, 0.4); background: var(--bad-wash); }
.badge-waiver { color: var(--ok); border-color: rgba(143, 208, 173, 0.35); }
.badge-taibah { color: var(--accent); border-color: var(--accent-line); }

.meta-line { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-block-start: 12px; font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.meta-line span + span { padding-inline-start: 18px; border-inline-start: 1px solid var(--line-strong); }
.card-notes { margin: 12px 0 0; font-size: 0.9rem; color: var(--ink-soft); max-width: 72ch; }
.checklist { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-block-start: 1px solid var(--line); display: grid; gap: 6px; font-size: 0.86rem; }
.chk-ok { color: var(--ok); }
.chk-bad { color: var(--bad); }

.pub-actions-box {
  margin-block-start: 14px;
  padding: 14px 16px;
  border-radius: var(--r-field);
  background: var(--accent-wash);
  border: 1px solid var(--accent-line);
}
.pub-actions-title { margin: 0 0 6px; font-weight: 600; font-size: 0.86rem; color: var(--accent); }
.pub-actions-list { margin: 0; padding-inline-start: 18px; display: grid; gap: 4px; font-size: 0.86rem; color: var(--ink-soft); }

.card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-block-start: 16px; }
.official-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.2s;
}
.official-link:hover { text-decoration-color: var(--accent); }
.btn-secondary {
  font: 500 0.84rem/1 var(--font-body);
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  padding: 9px 16px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s var(--ease);
}
.btn-secondary:hover { border-color: var(--accent-line); }
.btn-secondary:active { transform: scale(0.97); }
.cover-box {
  margin-block-start: 14px;
  padding: 16px 18px;
  border-radius: var(--r-field);
  background: var(--field);
  border: 1px solid var(--line);
  white-space: pre-wrap;
  font-size: 0.86rem;
  line-height: 1.8;
  color: var(--ink-soft);
}

/* ---------- Discovery ---------- */
.disc-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-block: 8px 22px; }
.disc-block h3 { font-size: 0.95rem; color: var(--ink); margin-block-end: 10px; }
.disc-list { list-style: none; margin: 0; padding: 0; display: grid; }
.disc-item { padding: 10px 0; border-block-start: 1px solid var(--line); display: grid; gap: 3px; font-size: 0.86rem; color: var(--muted); }
.disc-item-title { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
a.disc-item-title { color: var(--ink); text-decoration-color: var(--line-strong); }
.disc-item-meta { font-size: 0.8rem; color: var(--muted); }
.conns-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.conn-card {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 16px;
  border-radius: var(--r-card);
  background: var(--field);
  border: 1px solid var(--line);
  font-size: 0.86rem;
}
.conn-card strong { color: var(--ink); font-weight: 600; }

/* ---------- Footer ---------- */
.foot {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  border-block-start: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .hero { min-height: 88dvh; }
  .hero-pic img { object-position: 74% 50%; }
  .hero::before, html[dir="rtl"] .hero::before { background: linear-gradient(0deg, rgba(7, 17, 14, 0.96) 0%, rgba(7, 17, 14, 0.72) 48%, rgba(7, 17, 14, 0.2) 100%); }
  .disc-columns { grid-template-columns: 1fr; }
  .recs-head { flex-direction: column; }
}
@media (max-width: 560px) {
  body { font-size: 14.5px; }
  .row2 { grid-template-columns: 1fr; }
  .match-card { grid-template-columns: 1fr; gap: 12px; }
  .ring-wrap, .score-ring { width: 68px; height: 68px; }
  .rec-item { grid-template-columns: 1fr; gap: 6px; }
  .rec-sev { justify-self: start; }
  .brand-name { font-size: 0.98rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .topbar::before { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
