/* أميري — نسخُ بولاق، مُحمَّلٌ من عندنا لا من خادمٍ أجنبيّ: لا يُسرَّب عنوانُ زائرٍ لأحد. رخصة OFL في fonts/OFL.txt */
@font-face { font-family: Amiri; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/amiri-arabic-400-normal.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F, U+2010-2011, U+204F, U+2E41, U+FDFD; }
@font-face { font-family: Amiri; font-style: normal; font-weight: 700; font-display: swap;
  src: url(fonts/amiri-arabic-700-normal.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F, U+2010-2011, U+204F, U+2E41, U+FDFD; }
@font-face { font-family: Amiri; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/amiri-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0100-024F, U+0259, U+1E00-1EFF, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Amiri; font-style: normal; font-weight: 700; font-display: swap;
  src: url(fonts/amiri-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0100-024F, U+0259, U+1E00-1EFF, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #F5F6F3;
  --surface: #FFFFFF;
  --ink: #1E2433;
  --muted: #5B6272;
  --rule: #D9DCD3;
  --action: #2B3A67;
  --action-ink: #FFFFFF;
  --blocking: #9B1C31;
  --high: #B7791F;
  --medium: #6B7D3A;
  --low: #7A808C;
  --strength: #2F6F5E;
  --mark: rgba(155, 28, 49, 0.09);
  --focus: #2B3A67;

  --naskh: Amiri, "Noto Naskh Arabic", "Traditional Naskh", "Geeza Pro", "Traditional Arabic", serif;
  --sans: "Noto Sans Arabic", "SF Arabic", "Segoe UI", "Geeza Pro", Tahoma, sans-serif;

  /* حِبرُ الطُّرَّة: أحمرُ الشنجرف الذي تُكتب به رؤوسُ الفواصل في المخطوط */
  --rubric: #9B1C31;
  --leaf: #FBFBF8;      /* ورقُ الصفحة، أدفأ قليلًا من ورق الموقع */
  --gutter: #E8E6DE;    /* جدولُ الصفحة الفاصل بين المتن والطرّة */
  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14171F; --surface: #1C2029; --ink: #E7E9EE; --muted: #9AA1AE; --rule: #2C313C;
    --action: #8FA3E0; --action-ink: #14171F; --blocking: #E0677A; --high: #E0A94F; --medium: #A9BC72;
    --low: #9AA1AE; --strength: #6FC0A8; --mark: rgba(224, 103, 122, 0.14); --focus: #8FA3E0;
    --rubric: #E0677A; --leaf: #1F242E; --gutter: #2C313C;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.7; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--naskh); font-weight: 700; margin: 0 0 12px; }
h1 { font-size: 1.9rem; line-height: 1.4; }
h2 { font-size: 1.2rem; }
::selection { background: var(--mark); }

/* الشريط */
.bar { display: flex; align-items: baseline; gap: 20px; padding: 14px 24px; border-bottom: 1px solid var(--rule); }
.brand { font-family: var(--naskh); font-size: 1.85rem; font-weight: 700; color: var(--ink); text-decoration: none;
  line-height: 1; padding-bottom: 5px; border-bottom: 2px solid var(--rubric); }
.bar-note { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* الرفع */
.view { padding: 32px 24px 64px; }
.upload { max-width: 640px; margin: 0 auto; display: grid; gap: 24px; }
.sheet { position: relative; display: grid; place-items: center; align-content: center; gap: 8px; min-height: 300px;
  background: var(--surface); border: 1px solid var(--rule); border-inline-start: 6px solid var(--blocking);
  padding: 32px; text-align: center; cursor: pointer; }
.sheet input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sheet:focus-within { outline: 2px solid var(--focus); outline-offset: 3px; }
.sheet.dragging { background: var(--mark); }
.sheet-title { font-family: var(--naskh); font-size: 2.2rem; line-height: 1.3; }
.sheet-hint { color: var(--muted); }
.sheet.has-file .sheet-title { font-size: 1.5rem; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 4px; font-size: 0.92rem; color: var(--muted); }
.field:first-child { grid-column: 1 / -1; }
.field input, .field select { background: var(--surface); border: 1px solid var(--rule); padding: 8px 10px; color: var(--ink); border-radius: 2px; }

.consents { border: 0; border-top: 1px solid var(--rule); padding: 16px 0 0; margin: 0; display: grid; gap: 14px; }
.consents legend { font-family: var(--naskh); font-size: 1.15rem; font-weight: 700; padding: 0; }
.consent { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; color: var(--muted); font-size: 0.93rem; }
.consent strong { color: var(--ink); display: block; font-weight: 600; }
.consent input { margin-top: 6px; width: 18px; height: 18px; accent-color: var(--action); }
.consent-off { margin: 0; color: var(--muted); font-size: 0.9rem; }

.primary, .secondary, .danger { border: 1px solid transparent; padding: 10px 22px; cursor: pointer; border-radius: 2px; font-weight: 600; }
.primary { background: var(--ink); color: var(--paper); justify-self: start; padding: 12px 26px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .primary { background: var(--ink); color: var(--paper); } }
.primary:disabled { opacity: 0.55; cursor: progress; }
.secondary { background: transparent; border-color: var(--rule); }
.danger { background: transparent; color: var(--blocking); border-color: currentColor; margin-top: 12px; }
.fine { margin: 0; color: var(--muted); font-size: 0.85rem; }
.form-error { margin: 0; color: var(--blocking); font-weight: 600; }

/* التقدّم */
.progress { max-width: 520px; margin: 0 auto; }
.stages { list-style: none; padding: 0; margin: 20px 0; counter-reset: stage; }
.stages li { counter-increment: stage; display: grid; grid-template-columns: 2.2em 1fr auto; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--rule); color: var(--muted); }
.stages li::before { content: counter(stage); font-family: var(--naskh); text-align: center; }
html[lang="ar"] .stages li::before { content: counter(stage, arabic-indic); }
.stages li[data-state="running"] { color: var(--ink); font-weight: 600; }
.stages li[data-state="done"] { color: var(--ink); }
.stages .state { font-size: 0.85rem; }
.stages li[data-state="done"] .state { color: var(--strength); }

/* النتائج */
.view-result { padding: 0; }
.tabs { display: none; }
.panes { display: grid; grid-template-columns: minmax(260px, 23rem) minmax(0, 1fr) minmax(260px, 22rem); height: calc(100vh - 62px); }
.pane { overflow-y: auto; padding: 20px; }
.pane-findings { border-inline-end: 1px solid var(--rule); }
.pane-diagnosis { border-inline-start: 1px solid var(--rule); display: grid; align-content: start; gap: 28px; }

.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.filter { border: 1px solid var(--rule); background: var(--surface); padding: 2px 10px; border-radius: 999px; cursor: pointer; font-size: 0.85rem; }
.filter[aria-pressed="true"] { border-color: var(--ink); font-weight: 600; }

.findings { list-style: none; margin: 0; padding: 0; }
.finding { border-bottom: 1px solid var(--rule); }
.finding button { all: unset; box-sizing: border-box; display: block; width: 100%; padding: 12px 10px 12px 4px; cursor: pointer;
  border-inline-start: 4px solid var(--sev, var(--low)); padding-inline-start: 12px; }
.finding button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.finding.active button { background: var(--surface); }
.finding-head { display: flex; gap: 10px; align-items: baseline; font-size: 0.82rem; color: var(--muted); }
.finding-locus { display: block; font-size: 0.8rem; color: var(--muted); }
.fid { font-variant-numeric: tabular-nums; }
.finding-head .sev { color: var(--sev); font-weight: 700; }
.finding-claim { margin: 4px 0 0; }
.finding-detail { display: none; padding: 0 12px 14px; font-size: 0.92rem; color: var(--muted); border-inline-start: 4px solid var(--sev, var(--low)); }
.finding.active .finding-detail { display: block; }
.finding-detail p { margin: 6px 0; }
.finding-detail strong { color: var(--ink); font-weight: 600; }

.sev-blocking { --sev: var(--blocking); }
.sev-high { --sev: var(--high); }
.sev-medium { --sev: var(--medium); }
.sev-low { --sev: var(--low); }
.sev-strength { --sev: var(--strength); }

/* المخطوط: نصٌّ بالنسخ، وعلاماتُ الرتبة في الهامش */
.manuscript { max-width: 46rem; margin: 0 auto; padding-inline-end: 3.2em; font-family: var(--naskh); font-size: 1.12rem; line-height: 2.05; }
.para { position: relative; margin: 0 0 0.9em; padding-inline-start: 18px; border-inline-start: 3px solid transparent; }
.para.marked { border-inline-start-color: var(--sev); }
.para.focus { background: var(--mark); }
.para .page { position: absolute; inset-inline-end: -3.2em; top: 0.2em; font-family: var(--sans); font-size: 0.72rem; color: var(--muted); }
.para.heading { font-weight: 700; font-size: 1.3rem; margin-top: 1.4em; }
.para.bibliography { font-size: 0.98rem; color: var(--muted); }
.para mark { background: var(--mark); color: inherit; box-shadow: inset 0 -2px 0 var(--sev); }
.para .glosses { display: inline-flex; gap: 4px; margin-inline-start: 6px; vertical-align: super; }
.gloss { all: unset; cursor: pointer; font-family: var(--sans); font-size: 0.7rem; color: var(--sev); font-weight: 700; }
.gloss:focus-visible { outline: 2px solid var(--focus); }
.notes { margin: 4px 0 0; padding: 0; list-style: none; font-size: 0.9rem; color: var(--muted); line-height: 1.8; }
.notes li::before { content: attr(data-n) " — "; }

/* التشخيص */
.folio { margin: 0; font-family: var(--naskh); font-size: 4.2rem; line-height: 1; font-weight: 700; }
.folio small { font-size: 1.3rem; color: var(--muted); font-weight: 400; }
.band { margin: 8px 0 0; font-family: var(--naskh); font-size: 1.15rem; }
.gate { margin: 12px 0 0; padding-inline-start: 12px; border-inline-start: 3px solid var(--blocking); color: var(--ink); font-size: 0.92rem; }
.axes { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.axis { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 0.88rem; }
.axis .meter { grid-column: 1 / -1; height: 5px; background: var(--rule); }
.axis .meter span { display: block; height: 100%; background: var(--ink); }

.persona { margin-bottom: 16px; }
.persona h3 { margin: 0 0 4px; font-size: 0.98rem; }
.persona ol { margin: 0; padding-inline-start: 1.3em; font-size: 0.92rem; }
.persona li { margin-bottom: 6px; }
.persona .ref { color: var(--muted); font-size: 0.8rem; }

.downloads { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.downloads a { color: var(--action); font-weight: 600; }

@media (max-width: 1100px) {
  .tabs { display: flex; position: sticky; top: 0; z-index: 2; background: var(--paper); border-bottom: 1px solid var(--rule); }
  .tab { flex: 1; background: none; border: 0; padding: 12px 6px; cursor: pointer; border-bottom: 3px solid transparent; }
  .tab[aria-selected="true"] { border-bottom-color: var(--ink); font-weight: 700; }
  .panes { display: block; height: auto; }
  .pane { display: none; border: 0; padding: 16px; }
  .pane.shown { display: block; }
  .pane-diagnosis.shown { display: grid; }
  .para .page { position: static; display: block; }
}

@media (max-width: 560px) {
  .bar { flex-direction: column; gap: 0; padding: 10px 16px; }
  .view { padding: 20px 16px 48px; }
  .fields { grid-template-columns: 1fr; }
  .sheet { min-height: 220px; }
  .sheet-title { font-size: 1.8rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .para.focus { transition: background-color 0.4s ease; }
}

/* اللغة */
.lang { margin-inline-start: auto; }
.lang select { background: var(--surface); border: 1px solid var(--rule); padding: 2px 6px; border-radius: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.content-note { margin: 0 0 10px; }
.consent strong + span { display: block; }
html[dir="ltr"] .manuscript, html[dir="ltr"] .brand { font-family: var(--naskh); }

/* ---------------------------------------------------------------- التنقّل */
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: baseline; margin-inline-start: auto; }
.nav-link { color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.nav-link[aria-current="page"] { font-weight: 700; box-shadow: inset 0 -2px 0 var(--ink); }
.nav-button { background: none; border: 0; padding: 0; cursor: pointer; }
.nav + .lang { margin-inline-start: 18px; }
.bar-note + .nav { margin-inline-start: auto; }
.text-link { background: none; border: 0; padding: 0; color: var(--action); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
a.primary { display: inline-block; text-decoration: none; }

/* ---------------------------------------------------------------- الصفحة الرئيسة
   الفكرةُ الحاكمة: الصفحةُ نفسُها ورقةٌ ذاتُ طُرَّة. المتنُ في الجدول، والحكمُ في الهامش
   معقودًا عليه برقم، ولا حكمَ إلّا ومعه شاهدُه. */
.home { max-width: 74rem; margin: 0 auto; padding: 0 24px 0; }

/* الفاتحة */
.hero { display: grid; grid-template-columns: minmax(0, 25rem) minmax(0, 1fr); gap: 0 64px;
  align-items: center; padding: 68px 0 60px; }
.hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.2rem); line-height: 1.34; letter-spacing: -0.005em;
  margin: 0 0 20px; }
html[dir="ltr"] .hero h1 { line-height: 1.12; }
.lead { font-size: 1.06rem; line-height: 1.85; color: var(--muted); max-width: 30em; margin: 0 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin: 0 0 14px; }
.hero .fine { max-width: 26em; }

/* الورقةُ وطُرَّتُها */
.folio { margin: 0; }
.folio-sheet { display: grid; grid-template-columns: minmax(0, 1fr) 15rem;
  background: var(--leaf); border: 1px solid var(--gutter);
  box-shadow: 0 1px 0 var(--gutter), 0 18px 34px -30px rgba(30, 36, 51, 0.5); }
.folio-body { padding: 40px 32px 34px; border-inline-end: 1px solid var(--gutter); position: relative; }
.folio-page { position: absolute; top: 14px; inset-inline-start: 32px;
  font-family: var(--sans); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.04em; }
.folio-text { margin: 0; font-family: var(--naskh); font-size: 1.22rem; line-height: 2.2; text-align: justify;
  text-justify: inter-word; hyphens: none; }
.folio-text mark { background: none; color: inherit; box-shadow: inset 0 -0.42em 0 rgba(155, 28, 49, 0.16); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .folio-text mark { box-shadow: inset 0 -0.42em 0 rgba(224, 103, 122, 0.22); } }
.key { font-family: var(--sans); font-size: 0.62em; font-weight: 700; color: var(--rubric);
  vertical-align: super; margin-inline-start: 2px; }
.folio-margin { padding: 40px 20px 34px; display: grid; align-content: start; gap: 6px; }
.folio-note { margin: 0; display: grid; gap: 5px; font-size: 0.9rem; line-height: 1.75; }
.folio-note b { font-family: var(--sans); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.02em;
  color: var(--rubric); display: block; }
.folio-note cite { font-style: normal; font-family: var(--naskh); color: var(--muted); font-size: 0.95rem; }
.folio-note cite::before { content: ""; display: block; width: 22px; height: 1px;
  background: var(--gutter); margin: 8px 0 6px; }
.folio figcaption { margin-top: 10px; }

@media (prefers-reduced-motion: no-preference) {
  .folio-margin > * { animation: gloss 520ms 320ms both ease-out; }
  @keyframes gloss { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

/* شريطُ ما ننفرد به */
.claims { padding: 0 0 8px; }
.claims dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
.claim { position: relative; padding: 24px 0 26px; border-top: 1px solid var(--rule); }
.claim::before { content: ""; position: absolute; top: -1px; inset-inline-start: 0; width: 26px; height: 2px; background: var(--rubric); }
.claim dt { font-family: var(--naskh); font-size: 1.24rem; font-weight: 700; margin-bottom: 6px; line-height: 1.5; }
.claim dd { margin: 0; color: var(--muted); font-size: 0.93rem; max-width: 34em; }

/* الأقسام */
.home-section { padding: 56px 0; border-top: 1px solid var(--rule); }
.home-section > h2 { font-size: 1.7rem; margin-bottom: 8px; }
.section-lead { margin: 0 0 28px; color: var(--muted); max-width: 42em; }
.works { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }
.works > div { border-top: 2px solid var(--ink); padding-top: 14px; }
.works dt { font-family: var(--naskh); font-size: 1.32rem; font-weight: 700; margin-bottom: 8px; }
.works dd { margin: 0; color: var(--muted); font-size: 0.95rem; }
.home-two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 64px; }
.plain-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.plain-list li { padding-inline-start: 18px; position: relative; }
.plain-list li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.72em;
  width: 7px; height: 1px; background: var(--rubric); }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 14px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 1.8em 1fr; gap: 10px; }
.steps li::before { content: counter(step); font-family: var(--naskh); font-size: 1.5rem; line-height: 1.1;
  color: var(--rubric); font-weight: 700; }
html[lang="ar"] .steps li::before { content: counter(step, arabic-indic); }

/* الأسعار */
.tariff { width: 100%; border-collapse: collapse; margin-top: 8px; }
.tariff caption { text-align: start; color: var(--muted); font-size: 0.9rem; padding-bottom: 12px; }
.tariff th, .tariff td { text-align: start; padding: 14px 8px; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
.tariff thead th { font-size: 0.82rem; font-weight: 600; color: var(--muted); padding-bottom: 8px; }
.tariff tbody th { font-family: var(--naskh); font-size: 1.15rem; font-weight: 700; }
.tariff .num { text-align: end; font-family: var(--naskh); font-size: 1.5rem; font-weight: 700; white-space: nowrap; }
.tariff .limit { color: var(--muted); font-size: 0.92rem; }
.tariff tr.free .num { color: var(--strength); }

.home-section > p { max-width: 46em; }
.promises { border-bottom: 0; padding-bottom: 8px; }
.promises .plain-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 56px; }
@media (max-width: 720px) { .promises .plain-list { grid-template-columns: 1fr; } }
.scope-note { margin-top: 24px; padding-inline-start: 14px; border-inline-start: 2px solid var(--rubric); }

/* ---------------------------------------------------------------- صفحاتُ النصّ: الأسعار والخصوصيّة */
.doc { max-width: 58rem; margin: 0 auto; padding: 56px 24px 24px; }
.doc h1 { font-size: clamp(2rem, 3.6vw, 2.7rem); border-top: 2px solid var(--rubric); padding-top: 20px; margin-bottom: 14px; }
.doc-lead { font-size: 1.06rem; line-height: 1.85; color: var(--muted); max-width: 40em; margin: 0 0 8px; }
.doc-section { padding: 44px 0; border-top: 1px solid var(--rule); }
.doc-section > h2 { font-size: 1.55rem; margin-bottom: 10px; }
.doc-section > p { max-width: 44em; margin: 0 0 18px; }
.doc-section > p:last-child { margin-bottom: 0; }
.doc .tariff { margin-top: 18px; }
.doc-section .plain-list { margin: 0 0 20px; }
.qa { margin: 0; display: grid; gap: 0; }
.qa > div { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.qa > div:last-child { border-bottom: 0; }
.qa dt { font-family: var(--naskh); font-size: 1.2rem; font-weight: 700; margin-bottom: 5px; }
.qa dd { margin: 0; color: var(--muted); max-width: 46em; }

/* الذيل */
.foot { border-top: 1px solid var(--rule); margin-top: 40px; }
.foot-in { max-width: 74rem; margin: 0 auto; padding: 32px 24px 56px;
  display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: baseline; }
.foot .brand { font-size: 1.3rem; }
.foot p { margin: 0; color: var(--muted); font-size: 0.85rem; }
.foot .foot-langs { margin-inline-start: auto; }
.foot-nav { display: flex; gap: 20px; }
.foot-nav a { color: var(--muted); font-size: 0.88rem; text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 2px; }
.foot-nav a:hover { color: var(--ink); border-bottom-color: var(--rubric); }

/* ---------------------------------------------------------------- الدخول والحساب والإدارة */
.narrow { max-width: 440px; margin: 0 auto; padding: 48px 24px 72px; }
.narrow.wide { max-width: 900px; }
.narrow h1 { font-size: 2rem; }
/* صفحةُ الدخول: ورقةٌ صغيرةٌ بخيطٍ أحمرَ في رأسها، على نمط الفاتحة */
.page-login .narrow { max-width: 27rem; padding-top: 64px; }
.page-login h1 { border-top: 2px solid var(--rubric); padding-top: 18px; margin-bottom: 22px; }
.page-login .field input { background: var(--surface); }
.page-login .stack { margin-top: 18px; }
.page-login .stack .primary { justify-self: stretch; text-align: center; }
.narrow .block h2 { font-size: 1.45rem; }
.stack { display: grid; gap: 16px; margin: 20px 0; }
.stack .primary, .stack .secondary { justify-self: start; }
.field small { color: var(--muted); }
.block { padding: 28px 0; border-top: 1px solid var(--rule); }
.block:first-of-type { margin-top: 20px; }

.worktype { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; grid-column: 1 / -1; }
.worktype legend { padding: 0; margin-bottom: 4px; color: var(--muted); font-size: 0.92rem; width: 100%; }
.worktype label { display: inline-flex; gap: 6px; align-items: center; color: var(--ink); cursor: pointer; }
.worktype input { accent-color: var(--action); }

.reviews { list-style: none; margin: 12px 0 0; padding: 0; }
.review { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.review-title { font-weight: 600; }
.review .fine { grid-column: 1; }
.review .text-link { grid-column: 2; grid-row: 1 / span 2; align-self: center; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; margin: 24px 0; }
.stats div { border-inline-start: 3px solid var(--rule); padding-inline-start: 12px; }
.stats dt { color: var(--muted); font-size: 0.85rem; }
.stats dd { margin: 0; font-family: var(--naskh); font-size: 2rem; font-weight: 700; line-height: 1.3; }
.stats .stat-wide { grid-column: 1 / -1; }
.stats .stat-wide dd { font-family: var(--sans); font-size: 0.95rem; font-weight: 400; }
.caps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cap { display: flex; justify-content: space-between; border-bottom: 1px solid var(--rule); padding: 6px 0; }
.cap.on .cap-state { color: var(--strength); font-weight: 600; }
.cap.off .cap-state { color: var(--muted); }
.table-wrap { overflow-x: auto; }
.users { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.users th, .users td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.users th { color: var(--muted); font-weight: 600; }
.users .num { font-variant-numeric: tabular-nums; }
.state-off { color: var(--blocking); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 40px 0 48px; }
  .home-two { grid-template-columns: 1fr; gap: 36px; }
  .works { grid-template-columns: 1fr; gap: 24px; }
  .claims dl { grid-template-columns: 1fr; gap: 0; }
  .home { padding: 0 16px; }
  .foot-in { padding: 28px 16px 48px; }
}
@media (max-width: 620px) {
  .doc { padding: 36px 16px 16px; }
  .doc-section { padding: 32px 0; }
  .folio-sheet { grid-template-columns: 1fr; }
  .folio-body { border-inline-end: 0; border-bottom: 1px solid var(--gutter); padding: 30px 20px 22px; }
  .folio-margin { padding: 18px 20px 22px; }
  .folio-text { font-size: 1.18rem; text-align: start; }
  .home-section { padding: 40px 0; }
  .tariff th, .tariff td { padding: 12px 4px; }
  .tariff .limit { display: block; }
  .foot .foot-langs { margin-inline-start: 0; }
}
@media (max-width: 560px) {
  .bar { flex-direction: row; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
  .nav { order: 3; width: 100%; margin-inline-start: 0; }
  .lang { margin-inline-start: auto; }
  .narrow { padding: 28px 16px 56px; }
}

/* المساندة */
.share { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--rule); display: grid; gap: 10px; justify-items: start; }
.share h2 { margin: 0; }
.tickets { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.ticket { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; border-bottom: 1px solid var(--rule); padding-bottom: 8px; }
.ticket p { grid-column: 1 / -1; margin: 0; }
.ticket-view { background: var(--surface); border: 1px solid var(--rule); padding: 12px; max-height: 340px; overflow: auto; font-size: 0.8rem; direction: ltr; text-align: left; }

.consent.choice { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; grid-template-columns: 1fr; }
.consent.choice legend { padding: 0; color: var(--muted); font-size: 0.93rem; }
.consent.choice legend strong { color: var(--ink); display: block; font-weight: 600; }
.consent.choice label { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.consent.choice input { width: 18px; height: 18px; accent-color: var(--action); }

.google { display: inline-flex; gap: 8px; align-items: center; }
.or { color: var(--muted); font-size: 0.9rem; margin: 14px 0 0; }
