:root {
  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --fg: #1f2328;
  --muted: #656d76;
  --border: #d0d7de;
  --accent: #1f883d;
  --accent-fg: #ffffff;
  --link: #0969da;
  --danger: #cf222e;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1117; --bg-soft: #161b22; --fg: #e6edf3; --muted: #8d96a0;
    --border: #30363d; --accent: #2ea043; --accent-fg: #0d1117; --link: #4493f8; --danger: #f85149;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1117; --bg-soft: #161b22; --fg: #e6edf3; --muted: #8d96a0;
  --border: #30363d; --accent: #2ea043; --accent-fg: #0d1117; --link: #4493f8; --danger: #f85149;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", Tahoma, sans-serif;
}
a { color: var(--link); }
main, .nav, footer { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
section { margin: 64px 0; }
h1 { font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.15; margin: 12px 0; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; margin: 0 0 8px; }
h3 { font-size: 1.05rem; margin: 8px 0 4px; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

.nav { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; padding-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--fg); text-decoration: none; }
.nav nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.nav nav a { color: var(--fg); text-decoration: none; font-size: 0.95rem; }
.langs { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.langs button { background: none; border: 0; color: var(--fg); padding: 4px 10px; cursor: pointer; font: inherit; font-size: 0.9rem; }
.langs button[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); }

.hero { text-align: center; margin-top: 48px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 680px; margin: 0 auto; }
.pill { display: inline-block; border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; font-size: 0.85rem; color: var(--muted); margin: 0; }
.cta { display: flex; gap: 12px; justify-content: center; margin: 28px 0; flex-wrap: wrap; }
.btn { display: inline-block; padding: 12px 20px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--fg); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn.big { font-size: 1.05rem; padding: 14px 26px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 16px; }
.card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); padding: 20px; }
.card p { margin: 0; color: var(--muted); }
.icon { font-size: 1.8rem; }

.list { display: grid; gap: 10px; margin-top: 16px; }
.row-link { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); color: var(--fg); text-decoration: none; font-weight: 500; }
.row-link:hover { border-color: var(--accent); }

.steps { padding-inline-start: 22px; margin: 16px 0 0; }
.steps li { margin: 8px 0; }

.join { text-align: center; padding: 32px 20px; }
.join p { margin: 8px 0 20px; }
.msg { min-height: 1.5em; font-weight: 500; }
.msg.err { color: var(--danger); }

details { border-bottom: 1px solid var(--border); padding: 12px 0; }
summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); margin: 8px 0 0; }

footer { border-top: 1px solid var(--border); padding-top: 24px; padding-bottom: 40px; font-size: 0.9rem; }

.legal { max-width: 760px; }
.legal h2 { margin-top: 32px; }
.badge { margin-inline-start: auto; font-size: 0.75rem; font-weight: 700; color: var(--accent-fg); background: var(--accent); border-radius: 999px; padding: 2px 10px; }
.tip h3 { font-size: 1rem; }

/* Tools */
.tool { max-width: 760px; }
.tool h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); }
.field { display: grid; gap: 6px; margin: 14px 0; font-weight: 600; font-size: 0.95rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--fg); font: inherit; font-weight: 400;
}
.field textarea { min-height: 140px; resize: vertical; }
.row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.result { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-top: 16px; background: var(--bg-soft); }
.result h3 { margin-top: 0; }
.result ul { margin: 8px 0 0; padding-inline-start: 20px; }
.result li { margin: 6px 0; }
.level-low { border-color: var(--accent); }
.level-medium { border-color: #bf8700; }
.level-high { border-color: var(--danger); }
.pill-level { display: inline-block; padding: 2px 12px; border-radius: 999px; font-weight: 700; font-size: 0.9rem; color: #fff; }
.pill-low { background: var(--accent); }
.pill-medium { background: #9a6700; }
.pill-high { background: var(--danger); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; direction: ltr; unicode-bidi: embed; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; align-items: center; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.copy { font-size: 0.8rem; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--fg); cursor: pointer; margin-inline-start: 6px; }
.options { display: grid; gap: 10px; margin-top: 12px; }
.option { text-align: start; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--fg); font: inherit; cursor: pointer; }
.option:disabled { cursor: default; }
.option.right { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--bg)); }
.option.wrong { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--bg)); }
.progressbar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin: 8px 0 16px; }
.progressbar span { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.big-score { font-size: 3rem; font-weight: 800; margin: 8px 0; }
.fact { display: flex; gap: 14px; align-items: flex-start; }
.fact p { font-size: 1.05rem; color: var(--fg); }
.tool-card { display: block; text-decoration: none; color: var(--fg); }
.tool-card:hover { border-color: var(--accent); }
.tool-card .go { color: var(--link); font-weight: 600; font-size: 0.9rem; display: inline-block; margin-top: 10px; }
.note { font-size: 0.85rem; color: var(--muted); }
.group-title { margin: 28px 0 0; font-size: 1.1rem; }
[hidden] { display: none !important; }
.drop { display: block; }

/* Post-success prompt */
.bt-prompt { position: fixed; z-index: 900; inset-inline: 12px; bottom: 12px; max-width: 460px; margin-inline: auto; background: var(--bg); color: var(--fg); border: 1px solid var(--accent); border-radius: 14px; padding: 14px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.bt-prompt p { margin: 6px 0 4px; color: var(--muted); font-size: 0.95rem; }

/* Suggestion to switch to the visitor's language on a static language page */
.bt-langbar { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 8px 16px; background: var(--bg-soft); border-bottom: 1px solid var(--border); font-size: .9rem; }
.bt-langbar button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; }

/* Text read by screen readers only */
.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; }

/* Homepage: open or drop a file, tool search */
.open-file { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; }
.open-file .note { max-width: 520px; }
.tool-search { display: block; margin: 16px 0 8px; }
.tool-search input { width: 100%; padding: 14px 16px; font-size: 1.05rem; border: 2px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--fg); }
.tool-search input:focus { border-color: var(--accent); outline: none; }
.ho-dialog { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--fg); padding: 20px; }
.ho-dialog::backdrop { background: rgba(0, 0, 0, .55); }
.ho-close { float: inline-end; border: 0; background: none; color: var(--muted); font-size: 1.3rem; cursor: pointer; }
.ho-files { margin: 4px 0 12px; padding-inline-start: 20px; overflow-wrap: anywhere; }
.ho-text { margin: 4px 0 12px; padding: 8px 10px; border-inline-start: 3px solid var(--accent); background: var(--bg-soft); white-space: pre-wrap; overflow-wrap: anywhere; }
.ho-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin: 12px 0; }
.ho-actions .btn { text-align: start; justify-content: flex-start; }
.drop-overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(31, 136, 61, .85); color: #fff; font-size: 2rem; font-weight: 700; pointer-events: none; }

/* Homepage demo: real AI upscaling result, and a scam check, played in a loop */
.demo { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; max-width: 760px; margin: 22px auto 0; }
.demo-scene { position: relative; display: block; aspect-ratio: 3 / 2; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); color: #fff; text-decoration: none; background: #0d1117; }
.demo-frame, .demo-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.demo-frame .before { image-rendering: pixelated; }
.demo-frame .after { clip-path: inset(0 0 0 50%); animation: demo-wipe 6s ease-in-out infinite; }
.demo-frame .wipe { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; background: #fff; box-shadow: 0 0 6px rgba(0,0,0,.6); animation: demo-line 6s ease-in-out infinite; }
@keyframes demo-wipe { 0%, 10% { clip-path: inset(0 0 0 100%); } 45%, 60% { clip-path: inset(0 0 0 0); } 95%, 100% { clip-path: inset(0 0 0 100%); } }
@keyframes demo-line { 0%, 10% { left: 100%; } 45%, 60% { left: 0; } 95%, 100% { left: 100%; } }
.demo-tag { position: absolute; top: 8px; padding: 2px 8px; border-radius: 6px; background: rgba(0,0,0,.6); font-size: .75rem; }
.demo-tag.l { left: 8px; } .demo-tag.r { right: 8px; }
.demo-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 10px; background: linear-gradient(transparent, rgba(0,0,0,.75)); font-weight: 600; font-size: .9rem; }
.demo-sms { background: linear-gradient(135deg, #10301c, #0d1117); }
.demo-sms .sms { position: absolute; top: 14px; inset-inline: 14px; padding: 10px 12px; border-radius: 14px 14px 14px 4px; background: #e9ecef; color: #1f2328; font-size: .85rem; line-height: 1.4; text-align: start; }
.demo-sms .scan { position: absolute; left: 14px; right: 14px; top: 14px; height: 3px; background: #4ade80; box-shadow: 0 0 10px #4ade80; animation: demo-scan 6s linear infinite; }
.demo-sms .verdict { position: absolute; inset-inline: 14px; bottom: 42px; padding: 8px 10px; border-radius: 10px; background: #cf222e; font-size: .85rem; opacity: 0; transform: translateY(8px); animation: demo-verdict 6s ease-out infinite; }
.demo-sms .verdict b { display: block; }
@keyframes demo-scan { 0% { top: 14px; opacity: 1; } 35% { top: 90px; opacity: 1; } 40%, 100% { opacity: 0; } }
@keyframes demo-verdict { 0%, 38% { opacity: 0; transform: translateY(8px); } 45%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.demo-credit { font-size: .75rem; margin-top: 6px; }
@media (prefers-reduced-motion: reduce) {
  .demo-frame .after { animation: none; clip-path: inset(0 0 0 50%); } .demo-frame .wipe { animation: none; }
  .demo-sms .scan { display: none; } .demo-sms .verdict { animation: none; opacity: 1; transform: none; }
}

/* Homepage: daily challenge, family mode and scam alerts */
.today { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 8px 0 18px; }
.today-card { display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--fg); }
.today-card .icon { font-size: 2.2rem; }
.today-card strong { display: block; font-size: 1.1rem; }
.today-card .muted { display: block; font-size: .92rem; }
.streak-badge { display: inline-block; margin-top: 6px; padding: 2px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-fg); font-size: .85rem; }
.alerts { margin: 0 0 18px; border-color: var(--danger); }
.alerts h2 { margin-top: 0; font-size: 1.15rem; }
.alerts ul { list-style: none; padding: 0; margin: 0 0 10px; }
.alerts li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.alerts li b { display: block; font-size: .9rem; color: var(--muted); font-weight: 600; }

/* "One need, one tool" pages */
.need .pill a { color: inherit; text-decoration: none; }
.need-steps { padding-inline-start: 22px; }
.need-steps li { margin: 8px 0; padding-inline-start: 4px; }
.need-faq { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin: 8px 0; background: var(--bg-soft); }
.need-faq summary { font-weight: 600; cursor: pointer; }
.need-faq p { margin: 8px 0 0; color: var(--muted); }
.need-related li { margin: 6px 0; }
.guide-video { display: block; width: min(360px, 100%); height: auto; aspect-ratio: 9 / 16; margin: 8px auto; border-radius: 16px; background: #000; }
.need-hub h2 { font-size: 1rem; margin: 6px 0 0; }

/* Display panel (theme and text size), added to the navigation bar by common.js */
.bt-display { position: relative; }
.bt-display-btn { background: none; border: 1px solid var(--border); border-radius: 8px; color: var(--fg); font: inherit; font-weight: 700; padding: 4px 10px; cursor: pointer; }
.bt-display-panel { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 50; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; box-shadow: 0 8px 24px rgba(0,0,0,.18); min-width: 250px; }
.bt-display-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 6px 0; font-size: .92rem; }
.bt-display-row button:disabled { opacity: .4; cursor: default; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

.as-h3 { font-size: 1.05rem; margin: 8px 0 4px; }

.home-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 10px 0 0; }

/* ======================================================================
   Site chrome and business pages (header, menu, footer, services, pricing,
   contact). Added with the services site; same tokens as above.
   ====================================================================== */
:root { --accent-soft: color-mix(in srgb, var(--accent) 12%, var(--bg)); --shadow: 0 1px 2px rgba(31,35,40,.06), 0 8px 24px rgba(31,35,40,.08); --wa: #25d366; --wa-fg: #0b3d1f; --max: 1120px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); } }
:root[data-theme="dark"] { --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); }

/* Header and menu */
.site-head { position: sticky; top: 0; z-index: 40; max-width: none; padding-inline: max(16px, calc((100% - var(--max)) / 2 + 16px)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); flex-wrap: nowrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand small { display: block; font-size: .72rem; font-weight: 500; color: var(--muted); letter-spacing: .02em; line-height: 1.1; }
.brand > span:last-child { line-height: 1.15; }
.logo { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), #0f5c2a); color: #fff; font-weight: 800; font-size: 1.15rem; letter-spacing: -.04em; flex: none; }
.site-head nav { gap: 6px 18px; flex-wrap: nowrap; }
.site-head nav a:not(.btn) { padding: 6px 2px; border-bottom: 2px solid transparent; white-space: nowrap; }
.site-head nav a:not(.btn):hover, .site-head nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.site-head .nav-cta { padding: 8px 14px; font-size: .92rem; white-space: nowrap; }
.menu-btn { display: none; margin-inline-start: auto; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--fg); cursor: pointer; }
.menu-btn .bars, .menu-btn .bars::before, .menu-btn .bars::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; margin: auto; transition: transform .2s; }
.menu-btn .bars::before, .menu-btn .bars::after { content: ""; position: absolute; left: 0; }
.menu-btn .bars::before { top: -6px; } .menu-btn .bars::after { top: 6px; }
.menu-btn[aria-expanded="true"] .bars { background: transparent; }
.menu-btn[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--accent); color: var(--accent-fg); padding: 8px 12px; border-radius: 8px; z-index: 60; }
.skip:focus { top: 8px; }
@media (max-width: 1300px) {
  .js .menu-btn { display: inline-grid; place-items: center; }
  .js .site-head nav { display: none; position: absolute; inset-inline: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); max-height: calc(100vh - 70px); overflow-y: auto; }
  .js .site-head.open nav { display: flex; }
  .js .site-head nav a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--border); font-size: 1.05rem; }
  .js .site-head .nav-cta { margin: 12px 0 8px; text-align: center; padding: 12px; font-size: 1rem; }
  .js .site-head .langs, .js .site-head .bt-display { align-self: flex-start; margin-top: 6px; }
  .js .site-head .bt-display-panel { inset-inline-start: 0; inset-inline-end: auto; }
  html:not(.js) .site-head { flex-wrap: wrap; } html:not(.js) .site-head nav { flex-wrap: wrap; }
}

/* Footer */
.site-foot { max-width: none; padding: 0; margin-top: 72px; border-top: 1px solid var(--border); background: var(--bg-soft); }
.site-foot > * { max-width: var(--max); margin-inline: auto; padding-inline: 16px; }
.cta-band { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; justify-content: space-between; margin-top: -40px !important; padding: 26px 28px !important; border-radius: 18px; background: linear-gradient(135deg, #0f5c2a, var(--accent)); color: #fff; box-shadow: var(--shadow); max-width: calc(var(--max) - 32px) !important; }
.cta-band p { margin: 0; color: #e6f4ea; }
.cta-band .cta-band-title { font-size: 1.25rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cta-band .btn.primary { background: #fff; border-color: #fff; color: #0f5c2a; }
.cta-band .btn:not(.primary) { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.foot-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 28px; padding-top: 40px; padding-bottom: 24px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot-grid a { color: var(--fg); text-decoration: none; }
.foot-grid a:hover { color: var(--link); text-decoration: underline; }
.foot-title { font-weight: 700; margin: 0 0 10px; }
.foot-brand p { color: var(--muted); margin: 12px 0; }
.foot-contact { display: grid; gap: 8px; }
.foot-contact a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.foot-contact svg { color: var(--wa); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; padding-top: 16px; padding-bottom: 28px; border-top: 1px solid var(--border); font-size: .88rem; color: var(--muted); }
.foot-bottom p { margin: 0; } .foot-bottom a { color: var(--muted); }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } .cta-band { padding: 22px 18px !important; } }

/* Floating WhatsApp button */
.wa-float { position: fixed; z-index: 45; bottom: 18px; inset-inline-end: 18px; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--wa); color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.25); transition: transform .15s; }
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 30px; height: 30px; }
.wa-btn { display: inline-flex; align-items: center; gap: 8px; }
.wa-btn.solid { background: var(--wa); border-color: var(--wa); color: var(--wa-fg); }
@media print { .wa-float, .site-head, .cta-band { display: none !important; } }

/* Layout helpers for business pages */
.wide { max-width: var(--max); }
.section-head { max-width: 760px; margin-bottom: 8px; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }
:lang(ar) .eyebrow { letter-spacing: 0; }
.lead-l { font-size: 1.12rem; color: var(--muted); }
.btn.small { padding: 8px 14px; font-size: .92rem; }
.btn:hover { filter: brightness(1.04); }
.btn.ghost { background: transparent; }
.check-list { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 8px; }
.check-list li { position: relative; padding-inline-start: 28px; }
.check-list li::before { content: ""; position: absolute; inset-inline-start: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%231f883d' stroke-width='3' d='M5 10.5l3.2 3L15 7'/%3E%3C/svg%3E") center/12px no-repeat; }

/* Hero */
.hero2 { display: grid; grid-template-columns: 1.25fr .9fr; gap: 40px; align-items: center; margin-top: 40px; }
.hero2 h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); }
.hero2 .lead { margin: 0; max-width: 620px; font-size: 1.18rem; }
.hero2 .cta { justify-content: flex-start; margin: 26px 0 14px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 10px 0 0; list-style: none; color: var(--muted); font-size: .93rem; }
.trust li::before { content: "✓ "; color: var(--accent); font-weight: 700; }
.profile-card { position: relative; border: 1px solid var(--border); border-radius: 22px; background: var(--bg-soft); padding: 26px; box-shadow: var(--shadow); }
.profile-card .avatar { width: 112px; height: 112px; border-radius: 28px; display: grid; place-items: center; font-size: 2.6rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, #0f5c2a, var(--accent) 60%, #2da44e); letter-spacing: -.04em; overflow: hidden; }
.profile-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-card h2 { margin: 14px 0 2px; font-size: 1.35rem; }
.profile-card .role { color: var(--muted); margin: 0 0 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 10px 0 0; list-style: none; }
.chips li, .chip { border: 1px solid var(--border); background: var(--bg); border-radius: 999px; padding: 3px 11px; font-size: .84rem; }
.status-dot { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 600; color: var(--accent); }
.status-dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #2da44e; box-shadow: 0 0 0 4px color-mix(in srgb, #2da44e 25%, transparent); }
@media (max-width: 860px) { .hero2 { grid-template-columns: 1fr; gap: 26px; margin-top: 24px; } }

/* Service cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-top: 22px; }
.svc-card { display: flex; flex-direction: column; gap: 6px; padding: 22px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg); color: var(--fg); text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
a.svc-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.svc-card h3 { margin: 6px 0 2px; font-size: 1.12rem; }
.svc-card p { margin: 0; color: var(--muted); }
.svc-card .from { margin-top: auto; padding-top: 10px; font-size: .9rem; color: var(--fg); font-weight: 600; }
.svc-card .go { color: var(--link); font-weight: 600; font-size: .92rem; }
.ico { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.ico svg { width: 24px; height: 24px; }

/* Steps / process */
.process { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 22px 0 0; }
.process li { counter-increment: step; position: relative; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg-soft); }
.process li::before { content: counter(step); display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-fg); font-weight: 800; margin-bottom: 8px; }
.process h3 { margin: 4px 0; } .process p { margin: 0; color: var(--muted); }

/* Split blocks, stats, quotes */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.panel { border: 1px solid var(--border); border-radius: 18px; background: var(--bg-soft); padding: 24px; }
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 22px 0 0; padding: 0; list-style: none; }
.figures li { padding: 18px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg); }
.figures b { display: block; font-size: 1.8rem; line-height: 1.1; color: var(--accent); }
.figures span { color: var(--muted); font-size: .92rem; }

/* Pricing */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 22px; }
.price-card { display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--border); border-radius: 18px; background: var(--bg); }
.price-card.featured { border: 2px solid var(--accent); box-shadow: var(--shadow); position: relative; }
.price-card.featured::before { content: attr(data-badge); position: absolute; top: -12px; inset-inline-start: 18px; background: var(--accent); color: var(--accent-fg); font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.price-card h3 { margin: 0 0 4px; font-size: 1.15rem; }
.price-card .desc { color: var(--muted); margin: 0 0 12px; }
.price { font-weight: 800; font-size: 1.35rem; color: var(--fg); white-space: nowrap; }
.price-card .price { display: block; margin: 4px 0 2px; }
.price-ref { display: block; font-size: .8rem; color: var(--muted); font-weight: 400; }
.price-unit { font-size: .85rem; color: var(--muted); font-weight: 600; }
.price-card .btn { margin-top: auto; text-align: center; }
.currency-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0 0; font-size: .92rem; color: var(--muted); }
.currency-bar select { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--fg); font: inherit; }
.table-wrap { overflow-x: auto; }
.ptable { width: 100%; border-collapse: collapse; margin-top: 16px; }
.ptable th, .ptable td { padding: 12px 10px; border-bottom: 1px solid var(--border); text-align: start; vertical-align: top; }
.ptable th { font-size: .85rem; color: var(--muted); font-weight: 600; }
.ptable td:last-child { white-space: nowrap; }

/* FAQ (shared) */
.faq details { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin: 10px 0; background: var(--bg-soft); }
.faq summary { font-weight: 600; }
.faq details p, .faq details ul { color: var(--muted); }

/* Forms: stepper */
.form-card { border: 1px solid var(--border); border-radius: 18px; background: var(--bg); padding: 24px; box-shadow: var(--shadow); }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-soft); }
.tabs button { flex: 1 1 auto; border: 0; background: none; color: var(--fg); font: inherit; font-weight: 600; padding: 10px 14px; border-radius: 9px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--bg); box-shadow: var(--shadow); color: var(--accent); }
.stepper { display: flex; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; }
.stepper li { flex: 1; height: 6px; border-radius: 3px; background: var(--border); }
.stepper li.done { background: var(--accent); }
.step-title { font-size: 1.2rem; margin: 0 0 4px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 14px 0; }
.choice { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); cursor: pointer; font-weight: 500; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.choice:has(input:focus-visible) { outline: 3px solid var(--link); outline-offset: 2px; }
.choice small { display: block; color: var(--muted); font-weight: 400; }
.choice .ico { width: 36px; height: 36px; border-radius: 10px; flex: none; }
.choice .ico svg { width: 20px; height: 20px; }
.form-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--danger); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--muted); margin: 14px 0; }
.consent input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.hp { position: absolute !important; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.success { text-align: center; padding: 18px 6px; }
.success .big-ok { font-size: 3rem; }
.slot-days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; }
.slot-days button { flex: none; scroll-snap-align: start; min-width: 92px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--fg); font: inherit; cursor: pointer; text-align: center; line-height: 1.25; }
.slot-days button small { display: block; color: var(--muted); font-size: .78rem; }
.slot-days button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.slot-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin: 10px 0; }
.slot-times button { padding: 10px 6px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--fg); font: inherit; font-weight: 600; cursor: pointer; direction: ltr; }
.slot-times button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.contact-side { display: grid; gap: 14px; align-content: start; }
.contact-line { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-soft); color: var(--fg); text-decoration: none; }
.contact-line:hover { border-color: var(--accent); }
.contact-line b { display: block; } .contact-line span { color: var(--muted); font-size: .92rem; }
.contact-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* Audit results */
.gauge { --v: 0; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--g, var(--accent)) calc(var(--v) * 1%), var(--border) 0); margin: 0 auto; }
.gauge span { width: 104px; height: 104px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-size: 2rem; font-weight: 800; }
.checks { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 8px; }
.checks li { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.checks li b { display: block; } .checks li p { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }
.checks .st { font-size: 1.1rem; }

/* Breadcrumbs and article pages */
.crumbs { font-size: .88rem; color: var(--muted); margin: 18px 0 0; }
.crumbs a { color: var(--muted); }
.prose { max-width: 760px; }
.prose h2 { margin-top: 40px; }
.prose p, .prose li { color: var(--fg); }
.tag { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.case { display: grid; grid-template-columns: 1fr 1.2fr; gap: 28px; align-items: center; padding: 26px; border: 1px solid var(--border); border-radius: 20px; background: var(--bg-soft); margin-top: 22px; }
@media (max-width: 860px) { .case { grid-template-columns: 1fr; } }
.case-visual { border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: #0d1117; aspect-ratio: 16 / 10; display: grid; place-items: center; }
.case-visual img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.i { width: 24px; height: 24px; flex: none; vertical-align: middle; }
[dir="rtl"] .i.flip { transform: scaleX(-1); }
fieldset.step { border: 0; padding: 0; margin: 0; min-width: 0; }
legend.step-title { padding: 0; font-weight: 700; }
.ptable .cat td { background: var(--bg-soft); font-weight: 700; padding-top: 18px; }
.ptable td small { display: block; color: var(--muted); }
/* Grids never get wider than the screen (long prices, words or code) */
.hero2 { grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); }
.hero2 > *, .split > *, .case > *, .contact-grid > * { min-width: 0; }
.kv dd { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 860px) { .hero2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .profile-card .price, .svc-card .price { white-space: normal; } .profile-card { padding: 20px; } }
.guide code { overflow-wrap: anywhere; }
.guide svg, .guide img { max-width: 100%; height: auto; }
table.calc-table { display: block; max-width: 100%; overflow-x: auto; }
html { scroll-padding-top: 84px; }
.svc-card .price { white-space: normal; font-size: 1.05rem; }
.skip { position: fixed; top: 8px; transform: translateY(-300%); transition: transform .15s; }
.skip:focus { top: 8px; transform: none; }
/* Accent used for small text: contrast of at least 4.5:1 on every background */
:root { --accent-text: #116329; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --accent-text: #3fb950; } }
:root[data-theme="dark"] { --accent-text: #3fb950; }
.eyebrow, .status-dot, .tag, .tabs button[aria-selected="true"], .figures b { color: var(--accent-text); }

/* Site search (header button, Ctrl+K) */
.search-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-inline-start: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--fg); cursor: pointer; flex: none; }
.search-btn:hover { border-color: var(--accent); color: var(--accent-text); }
@media (max-width: 1300px) { .js .search-btn + .menu-btn { margin-inline-start: 8px; } }
@media (min-width: 1301px) and (max-width: 1600px) { .site-head nav { gap: 6px 9px; } .site-head nav a:not(.btn) { font-size: .9rem; } .site-head .brand small { display: none; } }
@media (min-width: 1301px) { .site-head .search-btn { order: 3; margin-inline-start: 4px; } .site-head nav { margin-inline-start: auto; } }
.search-dialog { width: min(680px, calc(100vw - 24px)); max-height: min(80vh, 720px); margin: 8vh auto auto; padding: 0; border: 1px solid var(--border); border-radius: 16px; background: var(--bg); color: var(--fg); box-shadow: var(--shadow); }
.search-dialog::backdrop { background: rgba(0, 0, 0, .5); }
.search-top { display: flex; gap: 8px; align-items: center; padding: 12px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg); }
.search-top input { flex: 1; padding: 12px 14px; font-size: 1.05rem; border: 2px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--fg); }
.search-top input:focus { border-color: var(--accent); outline: none; }
.search-results { list-style: none; margin: 0; padding: 6px; overflow-y: auto; }
.search-results a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--fg); text-decoration: none; }
.search-results a[aria-selected="true"], .search-results a:hover { background: var(--accent-soft); }
.search-results small { display: block; font-size: .75rem; color: var(--accent-text); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.search-results b { display: block; }
.search-results span { display: block; color: var(--muted); font-size: .88rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.search-empty { padding: 4px 18px 16px; }

/* Newsletter in the footer */
.nl-form { display: grid; grid-template-columns: 1fr 1.2fr; gap: 12px 28px; align-items: center; padding-top: 32px; padding-bottom: 8px; }
.nl-fields { display: flex; flex-wrap: wrap; gap: 8px; }
.nl-fields input[type=email] { flex: 1 1 220px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--fg); font: inherit; }
.nl-fields .consent { flex-basis: 100%; margin: 0; font-size: .85rem; }
.nl-fields .msg { flex-basis: 100%; margin: 0; }
.nl-form .note { margin: 4px 0 0; }
@media (max-width: 760px) { .nl-form { grid-template-columns: 1fr; } }
/* Footer links: comfortable tap targets on phones */
@media (max-width: 760px) { .foot-grid ul a { display: inline-block; padding: 6px 0; } .foot-bottom a { display: inline-block; padding: 6px 0; } }
/* Project estimator */
.est-card { max-width: 860px; }
.est-card button.choice { text-align: start; font: inherit; color: var(--fg); align-items: center; }
.est-card button.choice:hover { border-color: var(--accent); }
.est-emoji { font-size: 1.5rem; }
.est-result { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 14px 0; }
.est-result .eyebrow { margin: 0; }
.est-price { margin: 6px 0 2px; }
.est-price .price { font-size: 1.6rem; white-space: normal; }
/* Newsletter page, reviews */
.nl-state.good { border-color: var(--accent); background: var(--accent-soft); }
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
[dir="rtl"] .star-input { flex-direction: row-reverse; }
.star-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-input label { font-size: 2rem; line-height: 1; color: var(--border); cursor: pointer; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: #d4a72c; }
.star-input input:focus-visible + label { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 4px; }
.rating-field { border: 0; padding: 0; }
.reviews-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 18px; }
.review { margin: 0; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg); display: flex; flex-direction: column; gap: 10px; }
.review-stars { color: #d4a72c; font-size: 1.1rem; letter-spacing: 2px; }
.review blockquote { margin: 0; font-size: 1rem; }
.review figcaption b { display: block; } .review figcaption span { display: block; color: var(--muted); font-size: .9rem; } .review figcaption small { color: var(--accent-text); font-size: .78rem; font-weight: 600; }
.est-banner { flex-direction: row; align-items: center; gap: 16px; margin-top: 18px; border: 2px solid var(--accent); background: var(--accent-soft); }
.est-banner b { display: block; font-size: 1.15rem; } .est-banner span span { color: var(--muted); }
.est-banner .go { margin-inline-start: auto; white-space: nowrap; }
@media (max-width: 520px) { .est-banner { flex-wrap: wrap; } }
.est-banner .go { color: var(--accent-text); }
/* Book card (About page, AI Lab) */
.book-card { display: grid; grid-template-columns: 160px 1fr; gap: 22px; align-items: start; padding: 20px; border: 1px solid var(--border); border-radius: 18px; background: var(--bg-soft); margin-top: 16px; }
.book-card img { width: 160px; height: auto; border-radius: 8px; box-shadow: var(--shadow); }
.book-card h3 { margin: 0 0 4px; font-size: 1.3rem; } .book-card cite { font-style: normal; }
.book-card .book-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
@media (max-width: 560px) { .book-card { grid-template-columns: 96px 1fr; gap: 14px; padding: 16px; } .book-card img { width: 96px; } }

/* Audio reading (assets/listen.js) */
.listen-btn { margin: 12px 0 4px; }
.listen-note { margin-top: 6px; }
.listen-current { background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 6px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }
.listen-bar { position: fixed; inset-inline: 0; bottom: 0; z-index: 60; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center;
  padding: 10px max(12px, env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--border); box-shadow: 0 -6px 20px rgba(0,0,0,.08); }
.listen-bar button, .listen-bar select { min-width: 44px; min-height: 44px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-soft); color: var(--fg); font: inherit; font-size: 1.05rem; cursor: pointer; }
.listen-bar .lb-play { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); min-width: 56px; }
.listen-bar select { padding: 0 8px; font-size: .95rem; }
.listen-bar .lb-pos { font-size: .9rem; color: var(--muted); min-width: 96px; text-align: center; font-variant-numeric: tabular-nums; }
body.listening { padding-bottom: 76px; }
body.listening .wa-float { bottom: 90px; }
@media print { .listen-btn, .listen-bar { display: none !important; } }
/* Media controls keep a left-to-right order in every language; one compact row on phones. */
.listen-bar { direction: ltr; flex-wrap: nowrap; gap: 6px; }
.listen-bar .lb-pos { unicode-bidi: isolate; }
@media (max-width: 420px) {
  .listen-bar { gap: 4px; padding-inline: 8px; }
  .listen-bar button, .listen-bar select { min-width: 40px; min-height: 42px; font-size: 1rem; }
  .listen-bar .lb-play { min-width: 48px; }
  .listen-bar .lb-pos { min-width: 0; font-size: .82rem; }
  .listen-bar select { padding: 0 4px; }
}
