/* منصة ديزاين — فاحص توافق السيرة مع أنظمة ATS */
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../fonts/IBMPlexSansArabic-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../fonts/IBMPlexSansArabic-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../fonts/IBMPlexSansArabic-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../fonts/IBMPlexSansArabic-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../fonts/IBMPlexSansArabic-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --deep: #0E4A3C;
  --brand: #2E957C;
  --mint: #CFE6DC;
  --ivory: #F5F1E8;
  --brass: #C9A46A;
  --brand-600: #277F6A;
  --brand-700: #1F6B59;
  --brand-800: #0E4A3C;
  --brand-900: #0A3329;
  --brand-50: #F5FAF8;
  --brand-100: #E8F3EF;
  --brand-200: #CFE6DC;
  --brand-300: #8ED4C0;
  --brand-400: #56B99D;
  --ink: #14211D;
  --ink-soft: #3D5751;
  --ink-mute: #6B817B;
  --paper: #F5F1E8;
  --paper-2: #FFFcf7;
  --line: #D7E2DE;
  --gold: #C9A46A;
  --gold-soft: #F6EDD9;
  --danger: #b44538;
  --danger-soft: #fdecea;
  --warn: #c4841a;
  --warn-soft: #fdf3e1;
  --ok: #2E957C;
  --ok-soft: #E8F3EF;
  --shadow: 0 8px 30px rgba(14, 74, 60, 0.07);
  --shadow-lg: 0 22px 55px rgba(14, 74, 60, 0.12);
  --radius: 20px;
  --radius-sm: 12px;
  --header-h: 80px;
  --sticky-cta: 0px;
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --store: https://ats-cvv.com;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  padding-bottom: var(--sticky-cta);
  background-image:
    radial-gradient(ellipse 900px 520px at 100% -10%, rgba(46, 149, 124, 0.16), transparent 60%),
    radial-gradient(ellipse 700px 400px at -10% 20%, rgba(201, 164, 106, 0.10), transparent 55%),
    linear-gradient(180deg, #FBF9F4 0%, #F5F1E8 40%, #EEF5F2 100%);
}

img, svg { max-width: 100%; display: block; }

a { color: var(--brand-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand); }

:focus-visible {
  outline: 3px solid var(--brand-300);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  inset-inline-start: -999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 8px 16px;
  z-index: 100;
}
.skip:focus { inset-inline-start: 8px; top: 8px; }

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255, 252, 247, 0.84);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid rgba(215, 226, 222, 0.8);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.logo-img {
  display: block;
  height: 46px;
  width: auto;
  max-width: min(200px, 58vw);
  object-fit: contain;
  object-position: center;
}
@media (min-width: 768px) {
  .logo-img { height: 54px; max-width: 240px; }
}
.nav-cta { display: inline-flex; padding: 8px 14px; font-size: 0.82rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 20px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 20px rgba(46, 149, 124, 0.28);
}
.btn-primary:hover { background: var(--brand-600); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--brand-800);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--brand-50); color: var(--brand-800); }
.btn-lg { padding: 14px 26px; font-size: 1.02rem; }
.btn-xl {
  padding: 16px 28px;
  font-size: 1.08rem;
  box-shadow: 0 12px 28px rgba(46, 149, 124, 0.32);
}
.btn-block { width: 100%; }
.btn-pulse {
  animation: pulseCta 2.4s ease-in-out infinite;
}
@keyframes pulseCta {
  0%, 100% { box-shadow: 0 12px 28px rgba(46, 149, 124, 0.32); }
  50% { box-shadow: 0 12px 36px rgba(46, 149, 124, 0.5); }
}

/* Hero */
.hero {
  padding: 36px 0 20px;
  position: relative;
}
.hero-grid {
  display: grid;
  gap: 28px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-100);
  color: var(--brand-800);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(46, 149, 124, 0.18);
}
.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(1.55rem, 6vw, 2.45rem);
  line-height: 1.4;
  font-weight: 700;
  color: var(--brand-900);
  letter-spacing: -0.02em;
}
.hero-lead {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 1.02rem;
  max-width: 46rem;
}
.privacy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.privacy svg { flex: 0 0 auto; margin-top: 3px; color: var(--brand); }

/* Upload card */
.panel {
  background: var(--paper-2);
  border: 1px solid rgba(215, 226, 222, 0.95);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-lg);
  padding: 18px;
}
.dropzone {
  position: relative;
  border: 2px dashed var(--brand-300);
  background:
    linear-gradient(180deg, var(--brand-50), #fff 70%);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.dropzone:hover,
.dropzone.is-drag {
  border-color: var(--brand);
  background: var(--brand-50);
  transform: translateY(-1px);
}
.dropzone.is-ready {
  border-style: solid;
  border-color: var(--brand);
}
.drop-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  color: var(--brand);
}
.dropzone h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand-900);
}
.drop-hint { margin: 0; color: var(--ink-mute); font-size: 0.92rem; }
.file-chip {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 0.92rem;
}
.file-chip.is-on { display: inline-flex; }
.file-chip button {
  border: 0;
  background: var(--brand-100);
  color: var(--brand-800);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.extras {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}
.extras summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand-800);
  padding: 6px 0;
  list-style: none;
}
.extras summary::-webkit-details-marker { display: none; }
.extras summary::before {
  content: "＋  ";
  color: var(--brand);
  font-weight: 700;
}
.extras[open] summary::before { content: "－  "; }
label.field {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.input, .textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.7; }
.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(46, 149, 124, 0.18);
}
.actions { margin-top: 16px; display: grid; gap: 10px; }
.fine {
  margin: 8px 0 0;
  text-align: center;
  color: var(--ink-mute);
  font-size: 0.84rem;
}

/* Results */
#results {
  display: none;
  padding: 12px 0 40px;
}
#results.is-on { display: block; }

.result-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 22px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 22px 18px 20px;
  margin-bottom: 18px;
}

.gauge-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.gauge {
  width: min(240px, 70vw);
  height: auto;
}
.gauge-track { fill: none; stroke: var(--brand-100); stroke-width: 14; }
.gauge-bar {
  fill: none;
  stroke: var(--brand);
  stroke-width: 14;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 100px 100px;
  transition: stroke-dashoffset 1.15s cubic-bezier(0.22, 0.8, 0.28, 1), stroke 0.4s;
}
.gauge-score {
  font-size: 42px;
  font-weight: 700;
  fill: var(--ink);
  font-family: var(--font);
}
.gauge-unit { font-size: 16px; font-weight: 600; fill: var(--ink-mute); }
.gauge-label {
  font-size: 16px;
  font-weight: 700;
  fill: var(--brand-700);
}
.score-caption {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.score-caption strong { color: var(--ink); }
.disclaimer {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--ink-mute);
}

.is-weak .gauge-bar, .is-weak .gauge-label { stroke: var(--danger); fill: var(--danger); }
.is-mid .gauge-bar, .is-mid .gauge-label { stroke: var(--warn); fill: var(--warn); }
.is-good .gauge-bar, .is-good .gauge-label { stroke: var(--brand); fill: var(--brand-700); }
.is-great .gauge-bar, .is-great .gauge-label { stroke: var(--brand-700); fill: var(--brand-800); }

.cats { display: grid; gap: 11px; width: 100%; }
.cat { display: grid; gap: 4px; }
.cat-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 600;
}
.cat-name { color: var(--ink); }
.cat-val { color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.bar {
  height: 8px;
  background: var(--brand-100);
  border-radius: 99px;
  overflow: hidden;
}
.bar > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-400), var(--brand-700));
  transition: width 0.9s cubic-bezier(0.22, 0.8, 0.28, 1);
}
.bar.is-low > span { background: linear-gradient(90deg, #e07a70, var(--danger)); }
.bar.is-mid > span { background: linear-gradient(90deg, #e2b15a, var(--warn)); }

.cta-banner {
  background: linear-gradient(135deg, var(--brand-800), var(--brand) 70%);
  color: #fff;
  border-radius: var(--radius);
  padding: 22px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  text-align: center;
}
.cta-banner h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  line-height: 1.5;
}
.cta-banner p { margin: 0 0 16px; opacity: 0.92; }
.cta-banner .btn-primary {
  background: #fff;
  color: var(--brand-800);
  box-shadow: none;
}
.cta-banner .btn-primary:hover { background: var(--gold-soft); color: var(--brand-900); }
.cta-banner.is-soft {
  background: var(--brand-50);
  color: var(--ink);
  border: 1px solid var(--brand-200);
}
.cta-banner.is-soft h2 { color: var(--brand-900); }
.cta-banner.is-soft p { opacity: 1; color: var(--ink-soft); }
.cta-banner.is-soft .btn-primary {
  background: var(--brand);
  color: #fff;
}
.cta-banner.is-soft .btn-primary:hover { background: var(--brand-600); color: #fff; }
.price-note { font-size: 0.88rem; margin-top: 10px !important; }

.grid-2 { display: grid; gap: 16px; }
.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.card h3 {
  margin: 0 0 12px;
  font-size: 1.08rem;
  color: var(--brand-900);
  display: flex;
  align-items: center;
  gap: 8px;
}
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.list li {
  background: var(--brand-50);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.94rem;
}
.issues li {
  background: var(--danger-soft);
  border-inline-start: 4px solid var(--danger);
}
.issues li .fix {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.88rem;
}
.strengths li {
  background: var(--ok-soft);
  border-inline-start: 4px solid var(--brand);
}
.empty-note { color: var(--ink-mute); margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--gold-soft);
  color: #6a4d16;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.85rem;
  font-weight: 600;
}
.chip.is-ok {
  background: var(--brand-100);
  color: var(--brand-800);
}

.preview details { margin-top: 16px; }
.preview pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #0e332b;
  color: #e6f5f0;
  border-radius: 12px;
  padding: 14px;
  font-size: 0.82rem;
  max-height: 240px;
  overflow: auto;
  font-family: var(--font);
  line-height: 1.7;
}

.status {
  display: none;
  align-items: center;
  gap: 10px;
  justify-content: center;
  padding: 14px;
  color: var(--brand-800);
  font-weight: 600;
}
.status.is-on { display: flex; }
.spinner {
  width: 22px; height: 22px;
  border: 3px solid var(--brand-200);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-box {
  display: none;
  background: var(--danger-soft);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-top: 12px;
  font-weight: 600;
}
.error-box.is-on { display: block; }

/* Sections */
.section { padding: 28px 0; }
.section h2 {
  margin: 0 0 8px;
  font-size: 1.45rem;
  color: var(--brand-900);
}
.section-lead { color: var(--ink-soft); margin: 0 0 18px; }

.ats-expl {
  display: grid;
  gap: 12px;
}
.ats-expl p { margin: 0; color: var(--ink-soft); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pill {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.88rem;
  font-weight: 600;
}

.services { display: grid; gap: 12px; }
.service {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.18s, border-color 0.18s;
}
.service:hover { transform: translateY(-2px); border-color: var(--brand-300); color: inherit; }
.service h3 { margin: 0; font-size: 1.05rem; color: var(--brand-800); }
.service p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }
.service span { margin-top: auto; color: var(--brand); font-weight: 700; font-size: 0.88rem; }

.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px 16px;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 12px 0;
  color: var(--brand-900);
}
.faq details p { margin: 0 0 12px; color: var(--ink-soft); }

/* Footer */
.footer {
  background: var(--deep);
  color: var(--mint);
  margin-top: 20px;
  padding: 36px 0 28px;
}
.footer a { color: #fff; }
.footer-grid { display: grid; gap: 18px; }
.footer .logo-img { height: 58px; max-width: 220px; }
.footer p { margin: 8px 0; }
.copy { opacity: 0.8; font-size: 0.9rem; }
.footer-cta { margin-top: 6px; }

.sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  z-index: 45;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 252, 247, 0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(14, 51, 43, 0.08);
}


/* Order banner — اطلب الآن سيرتك */
.order-banner-wrap {
  padding: 8px 0 28px;
  scroll-margin-top: calc(var(--header-h) + 10px);
}
.order-banner {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 16px;
  align-items: center;
  background:
    radial-gradient(ellipse 90% 140% at 100% -20%, rgba(46, 149, 124, 0.45), transparent 55%),
    radial-gradient(ellipse 70% 120% at -10% 120%, rgba(201, 164, 106, 0.22), transparent 50%),
    linear-gradient(145deg, #0E4A3C 0%, #0A3329 48%, #146352 100%);
  color: var(--ivory);
  border-radius: 24px;
  padding: 22px 20px 22px;
  box-shadow: 0 18px 44px rgba(14, 74, 60, 0.28);
  border: 1px solid rgba(201, 164, 106, 0.28);
}
.order-banner::after {
  content: "";
  position: absolute;
  inset-inline-end: -40px;
  top: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(201, 164, 106, 0.10);
  pointer-events: none;
}
.order-banner-logo {
  position: relative;
  z-index: 1;
  display: block;
  height: 64px;
  width: auto;
  max-width: min(260px, 84vw);
  object-fit: contain;
}
.order-banner-copy { position: relative; z-index: 1; }
.order-banner h2 {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 6vw, 2.05rem);
  line-height: 1.35;
  font-weight: 700;
  color: var(--ivory);
  letter-spacing: -0.02em;
}
.order-banner p {
  margin: 0;
  color: var(--mint);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 38rem;
}
.btn-order {
  position: relative;
  z-index: 1;
  background: var(--brass);
  color: var(--deep);
  box-shadow: 0 8px 20px rgba(201, 164, 106, 0.35);
  font-weight: 700;
}
.btn-order:hover {
  background: #d4b57c;
  color: var(--deep);
}
.order-banner .btn-order { justify-self: stretch; }

@media (min-width: 768px) {
  .order-banner {
    grid-template-columns: auto 1fr auto;
    gap: 28px;
    padding: 26px 32px;
  }
  .order-banner-logo { height: 80px; max-width: 300px; }
  .order-banner .btn-order { justify-self: end; min-width: 160px; padding: 16px 28px; }
  .order-banner-wrap { padding: 10px 0 36px; }
}

#results .order-banner-wrap { padding: 4px 0 20px; }

@media (max-width: 767px) {
  :root { --sticky-cta: 76px; }
  .sticky-cta { display: block; }
  .hero { padding-top: 24px; }
}

@media (min-width: 768px) {
  .nav-cta { padding: 12px 20px; font-size: 0.95rem; }
  .hero { padding: 56px 0 28px; }
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 40px; }
  .panel { padding: 24px; }
  .result-head {
    flex-direction: row;
    align-items: center;
    padding: 28px 32px;
  }
  .gauge-wrap { flex: 0 0 280px; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .services { grid-template-columns: 1fr 1fr; }
  .services > .service:last-child {
    grid-column: 1 / -1;
    width: 100%;
    max-width: calc((100% - 12px) / 2);
    justify-self: center;
  }
  .footer-grid { grid-template-columns: 1.2fr 1fr; align-items: center; }
  .actions { grid-template-columns: 1fr auto; align-items: center; }
  .btn-block-sm { width: auto; }
}

@media (min-width: 1024px) {
  .hero h1 { font-size: 2.55rem; }
  .services { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .services > .service:last-child {
    grid-column: auto;
    max-width: none;
    justify-self: stretch;
  }
  .service h3 { font-size: 1rem; }
  .service p { font-size: 0.88rem; }
}

/* ---------- زر الوضع الليلي ---------- */
.header-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper-2); color: var(--brand-800);
  cursor: pointer; padding: 0;
  transition: background 0.2s ease, transform 0.18s ease, color 0.2s ease;
}
.theme-toggle:hover { background: var(--brand-50); }
.theme-toggle:active { transform: scale(0.95); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.gauge-bar { fill: none !important; }

/* ---------- الوضع الليلي (ألوان الهوية: أخضر داكن + عاجي) ---------- */
html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0B1D18;
  --paper-2: #122A24;
  --ink: #F1ECE1;
  --ink-soft: #C6D4CE;
  --ink-mute: #93AAA3;
  --line: #2A4A42;
  --brand-50: #12302A;
  --brand-100: #1B3E36;
  --brand-200: #2B554B;
  --brand-300: #8ED4C0;
  --brand-400: #56B99D;
  --brand-700: #8ED4C0;
  --brand-800: #CFE6DC;
  --brand-900: #F5F1E8;
  --gold-soft: #3A3122;
  --danger: #EE8F82;
  --danger-soft: #3B201D;
  --warn: #E8B45E;
  --warn-soft: #3A2E17;
  --ok-soft: #173C33;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 22px 55px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"], html[data-theme="dark"] body { background-color: var(--paper); }
html[data-theme="dark"] body {
  background-image:
    radial-gradient(ellipse 900px 520px at 100% -10%, rgba(46, 149, 124, 0.22), transparent 60%),
    radial-gradient(ellipse 700px 400px at -10% 20%, rgba(201, 164, 106, 0.08), transparent 55%),
    linear-gradient(180deg, #0D221C 0%, #0B1D18 45%, #0A1A16 100%);
}
html[data-theme="dark"] .header { background: rgba(11, 29, 24, 0.86); border-bottom-color: rgba(42, 74, 66, 0.9); }
html[data-theme="dark"] .panel { border-color: var(--line); }
html[data-theme="dark"] .dropzone { background: linear-gradient(180deg, var(--brand-50), var(--paper-2) 70%); }
html[data-theme="dark"] .drop-icon circle { fill: var(--brand-100); }
html[data-theme="dark"] .drop-icon path[stroke="#2e957c"] { stroke: var(--brand-300); }
html[data-theme="dark"] .file-chip,
html[data-theme="dark"] .input,
html[data-theme="dark"] .textarea { background: #0F241F; color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .input::placeholder,
html[data-theme="dark"] .textarea::placeholder { color: var(--ink-mute); }
html[data-theme="dark"] .sticky-cta { background: rgba(11, 29, 24, 0.95); box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.4); border-color: var(--line); }
html[data-theme="dark"] .cta-banner { background: linear-gradient(135deg, #0E4A3C, #2E957C 70%); }
html[data-theme="dark"] .cta-banner .btn-primary { background: #F5F1E8; color: #0E4A3C; }
html[data-theme="dark"] .cta-banner .btn-primary:hover { background: #FFFFFF; color: #0A3329; }
html[data-theme="dark"] .cta-banner.is-soft { background: var(--brand-50); border-color: var(--brand-200); }
html[data-theme="dark"] .cta-banner.is-soft .btn-primary { background: var(--brand); color: #fff; }
html[data-theme="dark"] .footer { background: #071511; border-top: 1px solid var(--line); }
html[data-theme="dark"] .order-banner { border-color: rgba(201, 164, 106, 0.35); }
html[data-theme="dark"] .gauge-score { fill: var(--ink); }
html[data-theme="dark"] .is-great .gauge-bar { stroke: var(--brand-400); }
html[data-theme="dark"] .bar > span { background: linear-gradient(90deg, #2E957C, #8ED4C0); }
html[data-theme="dark"] pre, html[data-theme="dark"] #extractedText { background: #0F241F; color: var(--ink-soft); border-color: var(--line); }
html[data-theme="dark"] .btn-primary { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35); }

.quality-cards { margin-top: 16px; }
.quality-card h3 {
  justify-content: space-between;
  gap: 10px;
}
.quality-score {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  color: var(--brand-800);
  background: var(--brand-100);
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 700;
}
.quality-card.is-low .quality-score { background: var(--danger-soft); color: var(--danger); }
.quality-card.is-mid .quality-score { background: var(--warn-soft); color: var(--warn); }
.quality-lead {
  margin: -4px 0 12px;
  color: var(--ink-mute);
  font-size: 0.88rem;
  line-height: 1.6;
}
.note-quote,
.note-suggest {
  display: block;
  margin-top: 6px;
  font-size: 0.88rem;
  line-height: 1.65;
}
.note-quote {
  background: var(--brand-50);
  border-radius: 8px;
  padding: 6px 8px;
  color: var(--ink);
  font-weight: 600;
}
.note-suggest { color: var(--brand-800); font-weight: 600; }
.issues li.is-ok-note {
  background: var(--ok-soft);
  border-inline-start-color: var(--brand);
  color: var(--ink-soft);
  font-weight: 600;
}

html[data-theme="dark"] .note-quote {
  background: var(--brand-100);
  color: var(--ink);
}
html[data-theme="dark"] .note-suggest { color: var(--brand-300); }
html[data-theme="dark"] .quality-card.is-high .quality-score { background: var(--brand-100); color: var(--brand-300); }
