:root {
  --bg: #0A0C1C;
  --surface: #12152B;
  --surface-2: #151935;
  --inset: #0F1226;
  --line: #262B4D;
  --line-2: #3A4070;
  --row: #1E2242;
  --text: #F3F4F8;
  --text-2: #DCDEEA;
  --text-3: #C7CBE0;
  --muted: #A9AECB;
  --icon: #8E94B8;
  --accent: #5BE3A0;
  --accent-hover: #8FF0BF;
  --on-accent: #0A0C1C;
  --critical: #FF7A85;
  --fail: #FFB86B;
  --warn: #F5D76E;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; line-height: 1.5; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img, svg { display: block; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 860px; }

/* Header */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 24px; padding-bottom: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-name { font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.brand-name span { color: var(--accent); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.nav a { color: var(--text-3); text-decoration: none; font-size: 15px; padding: 12px; }
.nav a:hover { color: var(--text); }
.nav .btn { margin-left: 4px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 14px 20px; border-radius: 12px; font-family: var(--sans); font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid var(--line-2); background: transparent; color: var(--text); }
.btn:hover { border-color: var(--icon); color: var(--text); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: 44px; padding: 10px 16px; border-radius: 10px; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* Type */
.eyebrow { margin: 0 0 12px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; color: var(--accent); text-transform: uppercase; }
.h1 { margin: 0 auto; max-width: 900px; font-family: var(--display); font-weight: 700; font-size: clamp(2.3rem, 5vw, 4.2rem); line-height: 1.04; letter-spacing: -0.025em; }
.h2 { margin: 0; max-width: 760px; font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.08; letter-spacing: -0.02em; }
.lead { margin: 22px auto 0; max-width: 680px; font-size: 19px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }

/* Hero + switches */
.hero { padding-top: 48px; padding-bottom: 16px; text-align: center; }
.switch { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 6px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.switch button { display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 14px 28px; border-radius: 13px; border: 0; background: transparent; color: var(--text-3); font-family: var(--sans); font-size: 17px; font-weight: 600; cursor: pointer; }
.switch button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.switch button:not([aria-pressed="true"]):hover { color: var(--text); }
.billing { margin-top: 32px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; }
.pill-switch { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.pill-switch button { min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 0; background: transparent; color: var(--text-3); font-family: var(--sans); font-size: 14px; font-weight: 600; cursor: pointer; }
.pill-switch button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.mono-note { font-family: var(--mono); font-size: 13px; color: var(--accent); }

/* Sections */
.section { padding-top: 104px; }
.section-tight { padding-top: 32px; }

/* Plan cards */
.plans { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.card { flex: 1 1 250px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 22px; }
.card.wide { flex: 1 1 280px; }
.card.featured { flex: 1.3 1 300px; background: var(--surface-2); border: 2px solid var(--accent); }
.card-title { margin: 0; font-family: var(--display); font-size: 24px; font-weight: 700; }
.card.featured .card-title { font-size: 28px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.badge { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.04em; background: var(--accent); color: var(--on-accent); padding: 6px 10px; border-radius: 999px; }
.card-desc { margin: 8px 0 0; font-size: 15px; color: var(--muted); }
.card.featured .card-desc { color: var(--text-3); }
.price { display: flex; align-items: baseline; gap: 6px; }
.price-from { font-size: 15px; color: var(--muted); }
.price-amount { font-family: var(--display); font-size: 48px; font-weight: 700; line-height: 1; }
.card.featured .price-amount { font-size: 60px; }
.price-per { font-size: 16px; color: var(--muted); }
.price-note { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.plus-label { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--muted); }
.card.featured .plus-label { color: var(--accent); }
.fine { margin: 12px 0 0; text-align: center; font-size: 13px; color: var(--muted); }

.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.45; color: var(--text-2); }
.checks li svg { flex: none; margin-top: 2px; color: var(--icon); }
.card.featured .checks li { color: var(--text); }
.card.featured .checks li svg, .accent-icons li svg { color: var(--accent); }

.included { background: var(--inset); border: 1px solid #2E3460; border-radius: 14px; padding: 16px; display: flex; gap: 14px; align-items: flex-start; }
.included svg { flex: none; color: var(--accent); }
.included p { margin: 0; }
.included .t { font-size: 15px; font-weight: 600; }
.included .d { margin-top: 6px; font-size: 14px; color: var(--muted); }

.note { margin: 28px auto 0; max-width: 760px; text-align: center; font-size: 14px; color: var(--muted); }
.cross { margin: 28px auto 0; max-width: 820px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 20px; }
.cross p { margin: 0; flex: 1 1 340px; font-size: 15px; color: var(--text-2); }
.cross strong { color: var(--text); }

.tags { list-style: none; margin: 0 0 32px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tags li { font-size: 14px; color: var(--text-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 14px; }

/* Steps */
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 20px; }
.steps li { flex: 1 1 230px; min-width: 0; border-top: 2px solid var(--line-2); padding-top: 20px; }
.steps li:first-child { border-top-color: var(--accent); }
.steps .num { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.steps li:first-child .num { color: var(--accent); }
.steps h3 { margin: 8px 0; font-family: var(--display); font-size: 24px; font-weight: 700; }
.steps p { margin: 0; font-size: 15px; color: var(--muted); }
.band { margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.band .mono-note { letter-spacing: 0.08em; }
.band p { margin: 0; flex: 1 1 420px; font-size: 16px; color: var(--text-2); }

/* Scope */
.meter-card { margin-top: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; }
.meter { display: flex; gap: 6px; }
.meter span { flex: 1; height: 16px; border-radius: 5px; background: var(--accent); }
.meter span.extra { background: transparent; border: 1.5px dashed #5A6090; }
.meter-labels { margin-top: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 15px; }
.meter-labels strong { font-weight: 600; }
.scope { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 20px; }
.scope > div { flex: 1 1 420px; min-width: 0; border: 1px solid var(--line); border-radius: 20px; padding: 28px; }
.scope > div.dashed { border-style: dashed; border-color: var(--line-2); }
.scope h3 { margin: 0 0 18px; font-family: var(--display); font-size: 22px; font-weight: 700; }

/* Table */
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: 20px; margin-top: 32px; }
table { width: 100%; min-width: 780px; border-collapse: collapse; font-size: 15px; text-align: start; }
thead tr { background: var(--surface); }
th, td { padding: 16px 20px; border-bottom: 1px solid var(--row); }
thead th { padding-top: 18px; padding-bottom: 18px; border-bottom-color: var(--line); font-weight: 600; }
thead th:first-child { color: var(--muted); font-weight: 500; }
tbody th { font-weight: 500; color: var(--text-2); }
tbody td { color: var(--muted); }
tbody td.hl { color: var(--text); font-weight: 600; }
thead th.hl { color: var(--accent); font-weight: 700; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

/* FAQ */
.faq { margin-top: 28px; }
.faq details { border-top: 1px solid var(--line); padding: 6px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; min-height: 44px; font-size: 18px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { font-size: 24px; color: var(--accent); transition: transform 0.2s; }
.faq details[open] .plus { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; font-size: 16px; color: var(--muted); }

/* CTA + footer */
.cta { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 56px 32px; text-align: center; }
.cta .h2 { margin: 0 auto; }
.cta p { margin: 18px auto 32px; max-width: 560px; font-size: 18px; color: var(--muted); }
.site-footer { padding-top: 56px; padding-bottom: 48px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }

/* Check page */
.panel { margin-top: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 28px; }
.field-label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.input, .textarea { width: 100%; background: var(--inset); color: var(--text); border: 1px solid var(--line-2); border-radius: 12px; padding: 14px 16px; font-family: var(--sans); font-size: 16px; }
.input { flex: 1 1 320px; min-height: 52px; }
.textarea { min-height: 180px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: #7D83A6; }
.hint { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.quiz { display: flex; flex-direction: column; gap: 14px; }
.q { border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin: 0; }
.q legend { padding: 0 6px; margin-left: -6px; font-size: 16px; font-weight: 600; }
.q .help { margin: 4px 0 12px; font-size: 14px; color: var(--muted); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; font-size: 15px; }
.choices input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.choices label:has(input:checked) { border-color: var(--accent); background: rgba(91, 227, 160, 0.08); }

.status { margin-top: 20px; display: flex; align-items: center; gap: 12px; color: var(--text-3); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } html { scroll-behavior: auto; } }
.error { margin-top: 20px; padding: 14px 16px; border-radius: 12px; background: rgba(255, 122, 133, 0.1); border: 1px solid rgba(255, 122, 133, 0.4); color: #FFC2C7; }

.result { margin-top: 28px; display: flex; flex-direction: column; gap: 20px; }
.summary { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; }
.score { --pct: 0; width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--score-color, var(--accent)) calc(var(--pct) * 1%), var(--line) 0); flex: none; }
.score-inner { width: 88px; height: 88px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; }
.score-num { font-family: var(--display); font-size: 34px; font-weight: 700; line-height: 1; }
.score-of { font-size: 12px; color: var(--muted); }
.summary h2 { margin: 0; font-family: var(--display); font-size: 28px; line-height: 1.15; }
.summary p { margin: 6px 0 0; color: var(--muted); }
.counts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.count { font-family: var(--mono); font-size: 12px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-3); }

.items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 14px; background: var(--inset); border: 1px solid var(--line); }
.item .tag { flex: none; min-width: 74px; text-align: center; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; margin-top: 2px; }
.item h3 { margin: 0; font-size: 16px; font-weight: 600; }
.item p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.item .fix { color: var(--text-3); }
.item ul { margin: 8px 0 0; padding-left: 18px; font-size: 14px; color: var(--text-3); }
.item ul li { margin: 3px 0; }
.lv-critical .tag { background: rgba(255, 122, 133, 0.16); color: var(--critical); }
.lv-critical { border-color: rgba(255, 122, 133, 0.45); }
.lv-fail .tag { background: rgba(255, 184, 107, 0.16); color: var(--fail); }
.lv-warn .tag { background: rgba(245, 215, 110, 0.14); color: var(--warn); }
.lv-info .tag { background: rgba(122, 162, 255, 0.14); color: #A9C1FF; }
.lv-pass .tag { background: rgba(91, 227, 160, 0.12); color: var(--accent); }
details.passed summary { cursor: pointer; color: var(--text-3); font-size: 15px; padding: 8px 0; min-height: 44px; display: flex; align-items: center; }

.reco { border: 2px solid var(--accent); background: var(--surface-2); border-radius: 18px; padding: 22px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.reco .k { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--accent); }
.reco h3 { margin: 6px 0 0; font-family: var(--display); font-size: 26px; }
.reco h3 span { font-family: var(--sans); font-size: 16px; font-weight: 500; color: var(--text-3); }
.reco p { margin: 6px 0 0; color: var(--text-3); max-width: 560px; }
.reco .actions { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 640px) {
  .site-header { padding-top: 16px; padding-bottom: 8px; }
  .nav a:not(.btn) { padding: 12px 8px; font-size: 14px; }
  .switch button { padding: 12px 18px; font-size: 16px; }
  .card { padding: 22px; }
  .section { padding-top: 80px; }
  .cta { padding: 40px 20px; }
  .panel { padding: 20px; }
  .item { flex-direction: column; gap: 8px; }
}

.hero .h1 { margin-top: 40px; }
.mt-32 { margin-top: 32px; }
.mt-16 { margin-top: 16px; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: var(--on-accent); padding: 10px 16px; }
.compact { min-width: 0; }
.legal { padding-top: 24px; }
.legal h2 { margin: 40px 0 12px; font-family: var(--display); font-size: 24px; }
.legal p, .legal li { color: var(--text-2); font-size: 16px; line-height: 1.65; }
.legal ul { padding-left: 20px; }
.legal li { margin: 8px 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.issues { list-style: none; }
.item .fix-label { margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--text); text-transform: uppercase; letter-spacing: 0.06em; }
.item ol.fix-steps { margin: 6px 0 0; padding-left: 20px; font-size: 14px; color: var(--text-3); }
.item ol.fix-steps li { margin: 4px 0; }
.item p strong { color: var(--text-2); font-weight: 600; }
.reply-box { background: var(--inset); border: 1px solid var(--line-2); border-radius: 16px; padding: 20px; }
.reply-box h3 { margin: 0; font-family: var(--display); font-size: 22px; }
.reply-box .muted { margin: 6px 0 12px; }
.reply-text { min-height: 200px; background: var(--surface); }
.cross.human { margin: 0; max-width: none; }
.cross.human.quiet { background: transparent; }
td.msg { white-space: pre-wrap; max-width: 420px; font-size: 13px; }
.contact-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); color: var(--text); border: 1px solid var(--line-2); border-radius: 20px; padding: 28px; }
.contact-dialog::backdrop { background: rgba(5, 6, 15, 0.7); }
.contact-dialog h2 { margin: 0 32px 8px 0; font-family: var(--display); font-size: 24px; line-height: 1.2; }
.contact-dialog .textarea { min-height: 110px; font-size: 14px; }
.contact-dialog .or { margin-bottom: 0; font-weight: 600; }
.contact-dialog .sent { margin: 16px 0 0; color: var(--accent); font-weight: 600; }
.dialog-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--text-3); font-size: 28px; line-height: 1; cursor: pointer; }
.dialog-close:hover { color: var(--text); background: var(--inset); }
[dir="rtl"] .dialog-close { right: auto; left: 12px; }
[dir="rtl"] .contact-dialog h2 { margin: 0 0 8px 32px; }

/* Arabic, right to left */
html[lang="ar"] { --display: 'IBM Plex Sans Arabic', system-ui, sans-serif; --sans: 'IBM Plex Sans Arabic', system-ui, sans-serif; --mono: 'IBM Plex Sans Arabic', system-ui, sans-serif; }
html[lang="ar"] .brand-name { font-family: 'Bricolage Grotesque', system-ui, sans-serif; }
html[lang="ar"] .h1, html[lang="ar"] .h2 { letter-spacing: 0; line-height: 1.3; font-weight: 700; }
html[lang="ar"] .card-title, html[lang="ar"] .steps h3, html[lang="ar"] .scope h3 { font-weight: 700; }
html[lang="ar"] .eyebrow, html[lang="ar"] .mono-note, html[lang="ar"] .plus-label, html[lang="ar"] .badge, html[lang="ar"] .reco .k, html[lang="ar"] .item .tag, html[lang="ar"] .count, html[lang="ar"] .item .fix-label { letter-spacing: 0; text-transform: none; font-weight: 600; }
html[lang="ar"] .eyebrow, html[lang="ar"] .mono-note { font-size: 14px; }
html[lang="ar"] body, html[lang="ar"] .lead, html[lang="ar"] .checks li, html[lang="ar"] .faq details p { line-height: 1.7; }
[dir="rtl"] .item ul, [dir="rtl"] .item ol.fix-steps, [dir="rtl"] .legal ul { padding-left: 0; padding-right: 20px; }
[dir="rtl"] .nav .btn { margin-left: 0; margin-right: 4px; }
[dir="rtl"] .input[dir="ltr"] { text-align: left; }
