/* masroofak.com content pages (guides, calculators, about). The app itself uses app/styles.css. */
@font-face { font-family: 'Plex Arabic'; font-style: normal; font-display: swap; font-weight: 400; src: url(/app/vendor/fonts/plex-arabic-arabic-400.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EEFF; }
@font-face { font-family: 'Plex Arabic'; font-style: normal; font-display: swap; font-weight: 500; src: url(/app/vendor/fonts/plex-arabic-arabic-500.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EEFF; }
@font-face { font-family: 'Plex Arabic'; font-style: normal; font-display: swap; font-weight: 600; src: url(/app/vendor/fonts/plex-arabic-arabic-600.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EEFF; }
@font-face { font-family: 'Plex Arabic'; font-style: normal; font-display: swap; font-weight: 400; src: url(/app/vendor/fonts/plex-arabic-latin-400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plex Arabic'; font-style: normal; font-display: swap; font-weight: 600; src: url(/app/vendor/fonts/plex-arabic-latin-600.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --fg: #101a2e;
  --muted: #55627a;
  --line: #dde3ee;
  --navy: #0b1220;
  --navy-2: #1a2a48;
  --accent: #2f5fd0;
  --accent-soft: #e8eefc;
  --green: #1f8a64;
  --green-soft: #e3f5ee;
  --warn-soft: #fdf3e2;
  --shadow: 0 10px 30px rgba(16, 26, 46, 0.08);
  --radius: 18px;
  --font: 'Plex Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;
}
/* Dark follows the device. data-theme (set only on /embed/ pages, from ?theme=) forces light or dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #070b14;
    --surface: #0f1726;
    --fg: #eef3fb;
    --muted: #9aa6bd;
    --line: #1f2b42;
    --accent: #8fb1ff;
    --accent-soft: #15213a;
    --green: #8fe0c2;
    --green-soft: #10261f;
    --warn-soft: #2a2213;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070b14;
  --surface: #0f1726;
  --fg: #eef3fb;
  --muted: #9aa6bd;
  --line: #1f2b42;
  --accent: #8fb1ff;
  --accent-soft: #15213a;
  --green: #8fe0c2;
  --green-soft: #10261f;
  --warn-soft: #2a2213;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 17px/1.85 var(--font); }
a { color: var(--accent); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
[hidden] { display: none !important; }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 10px; z-index: 10; }
.skip:focus { inset-inline-start: 8px; }

/* header */
.top { background: var(--navy); color: #eef3fb; position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; gap: 10px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 600; font-size: 20px; }
.brand svg { width: 34px; height: 34px; border-radius: 10px; }
.nav { display: flex; gap: 2px; margin-inline-start: auto; align-items: center; }
.nav a, .menu nav a { color: #c9d6ee; text-decoration: none; padding: 8px 10px; border-radius: 10px; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"], .menu nav a:hover, .menu nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.08); }
.top .cta { background: #dfe9ff; color: #0b1424; font-weight: 600; text-decoration: none; padding: 8px 14px; border-radius: 12px; font-size: 15px; white-space: nowrap; }
.top .cta:hover { background: #fff; }
/* phones: the links fold into «القائمة» (a <details>, so it works without scripts) */
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; color: #eef3fb; border: 1px solid rgba(223, 233, 255, 0.3); border-radius: 12px; padding: 7px 12px; font-size: 15px; min-height: 40px; display: flex; align-items: center; gap: 6px; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: rgba(255, 255, 255, 0.08); }
.menu nav { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); background: var(--navy-2); border: 1px solid rgba(223, 233, 255, 0.15); border-radius: 14px; padding: 8px; min-width: 210px; display: grid; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35); }
.menu nav a { padding: 11px 12px; font-size: 16px; }
@media (max-width: 860px) {
  .nav { display: none; }
  .menu { display: block; }
  .top .cta { margin-inline-start: auto; }
}
@media (max-width: 360px) {
  .brand span { display: none; }
}

/* breadcrumbs */
.crumbs { font-size: 14px; color: var(--muted); margin: 18px 0 0; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "‹"; margin-inline-end: 6px; color: var(--muted); }
.crumbs a { color: var(--muted); }

/* article */
main { padding-bottom: 40px; }
h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.35; margin: 18px 0 10px; font-weight: 600; letter-spacing: -0.2px; }
h2 { font-size: 24px; line-height: 1.45; margin: 36px 0 10px; font-weight: 600; }
h3 { font-size: 19px; margin: 24px 0 6px; font-weight: 600; }
.meta { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.answer { background: var(--green-soft); border-inline-start: 4px solid var(--green); padding: 14px 18px; border-radius: 12px; margin: 18px 0 26px; font-size: 18px; }
.answer strong:first-child { display: block; font-size: 14px; color: var(--green); margin-bottom: 2px; }
.note { background: var(--warn-soft); padding: 12px 16px; border-radius: 12px; font-size: 15px; }
article p, article li { max-width: 70ch; }
article ul, article ol { padding-inline-start: 22px; }
article li { margin: 4px 0; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
table { width: 100%; border-collapse: collapse; margin: 14px 0 20px; background: var(--surface); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); font-size: 16px; }
th, td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line); }
th { background: var(--accent-soft); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; }
.sources { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 30px; padding-top: 12px; }
.sources ol { padding-inline-start: 20px; }

/* FAQ */
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 16px; margin: 10px 0; }
.faq summary { cursor: pointer; font-weight: 600; padding: 10px 0; list-style-position: inside; }
.faq details p { margin: 0 0 12px; }

/* app box */
.appbox { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; background: var(--navy); color: #eef3fb; border-radius: var(--radius); padding: 20px; margin: 30px 0; box-shadow: var(--shadow); }
.appbox p { margin: 4px 0 0; color: #c9d6ee; font-size: 15px; }
.appbox b { font-size: 19px; }
@media (max-width: 560px) { .appbox { grid-template-columns: 1fr; } }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: 14px; font: 600 16px var(--font); text-decoration: none; border: 0; cursor: pointer; }
.btn-light { background: #dfe9ff; color: #0b1424; }
.btn-primary { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #0b1424; } }
:root[data-theme="dark"] .btn-primary { color: #0b1424; }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }

/* cards / lists */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin: 18px 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); text-decoration: none; color: inherit; display: block; }
a.card:hover { border-color: var(--accent); }
.card h2, .card h3 { margin: 0 0 6px; font-size: 18px; line-height: 1.5; }
.card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.tag { display: inline-block; font-size: 12px; background: var(--accent-soft); color: var(--accent); padding: 2px 10px; border-radius: 999px; margin-bottom: 8px; }

/* hero (home page) */
.hero { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%); color: #eef3fb; padding: 34px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 26px; align-items: center; }
.hero h1 { color: #fff; margin-top: 0; }
.hero p { color: #c9d6ee; font-size: 18px; }
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.hero .btn-ghost { color: #dfe9ff; border-color: rgba(223, 233, 255, 0.3); }
.hero .phone { justify-self: center; }
@media (max-width: 760px) { .hero .wrap { grid-template-columns: 1fr; } }
.hero .hero-sub { font-size: 14px; margin-top: 12px; }
.lead { font-size: 18px; color: var(--muted); margin: 0 0 14px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* feature pages */
.feat-hero { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 26px; align-items: center; margin-top: 6px; }
.feat-hero .phone { margin: 0; justify-self: center; text-align: center; }
.feat-hero .phone img { width: 250px; }
.feat-hero figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
.plan-line { font-size: 15px; }
.plan-line .tag { margin: 0 0 0 6px; }
@media (max-width: 760px) {
  .feat-hero { grid-template-columns: 1fr; }
  .feat-hero .phone img { width: 220px; }
}
.narrow-col { max-width: 760px; }
.narrow-col p, .narrow-col li { max-width: 70ch; }
.feat-grid .with-shot { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: start; }
.feat-grid .with-shot img { grid-row: span 2; width: 96px; border-radius: 14px; box-shadow: var(--shadow); }
.feat-grid .with-shot .ico { display: none; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 30px; }

/* home: how it works */
.steps { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: step; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 18px 18px; box-shadow: var(--shadow); counter-increment: step; display: grid; gap: 4px; }
.steps li::before { content: counter(step); width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 600; margin-bottom: 6px; }
.steps span { color: var(--muted); font-size: 15px; line-height: 1.7; }
.phone img { width: 280px; border-radius: 34px; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08); display: block; }
.shots { display: flex; gap: 16px; overflow-x: auto; padding: 8px 2px 18px; scroll-snap-type: x mandatory; }
.shots figure { margin: 0; flex: 0 0 220px; scroll-snap-align: start; }
.shots img { width: 220px; border-radius: 26px; box-shadow: var(--shadow); display: block; }
.shots figcaption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 8px; }
.feature { display: flex; gap: 12px; align-items: flex-start; }
.feature .ico { flex: 0 0 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 20px; }
.plans { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.plans .card ul { margin: 8px 0 0; padding-inline-start: 20px; font-size: 15px; }
.price { font-size: 28px; font-weight: 600; }

/* calculators */
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin: 20px 0; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: 15px; }
.field.check label { display: flex; gap: 10px; align-items: center; font-weight: 500; min-height: 44px; cursor: pointer; }
.field.check input { width: 22px; height: 22px; min-height: 0; accent-color: var(--accent); }
.field small { color: var(--muted); font-size: 13px; }
.field input, .field select { font: 400 18px var(--font); padding: 10px 14px; min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); width: 100%; }
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.row2 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (max-width: 480px) { .row2 { grid-template-columns: 1fr; } }
.seg { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.seg button { font: 500 15px var(--font); padding: 8px 14px; min-height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg button[aria-pressed="true"] { color: #0b1424; } }
:root[data-theme="dark"] .seg button[aria-pressed="true"] { color: #0b1424; }
.result { background: var(--accent-soft); border-radius: 14px; padding: 16px; margin-top: 6px; }
.result .big { font-size: 34px; font-weight: 600; line-height: 1.3; }
.result p { margin: 4px 0; }
.result .err { color: #b3261e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .result .err { color: #ff8a8a; } }
:root[data-theme="dark"] .result .err { color: #ff8a8a; }
.bars { display: grid; gap: 10px; margin-top: 10px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 15px; }
.bar-row .track { grid-column: 1 / -1; height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar-row .fill { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

/* footer */
.foot { background: var(--navy); color: #c9d6ee; padding: 28px 0; font-size: 15px; }
.foot a { color: #dfe9ff; }
.foot .btn-light { color: #0b1424; }
.foot .cols { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.foot h2 { font-size: 16px; color: #fff; margin: 0 0 6px; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin: 4px 0; }
.foot .copy { margin-top: 20px; font-size: 13px; color: #8b97ad; }
@media (max-width: 480px) {
  table { font-size: 14px; }
  th, td { padding: 8px 7px; }
}

/* /embed/<tool>/: the calculator alone, inside an iframe on another site */
body.embed { background: transparent; }
.embed-main { max-width: 760px; margin: 0 auto; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.embed-main .calc { margin: 0; padding: 0; border: 0; box-shadow: none; background: none; }
.embed-h { font-size: 20px; line-height: 1.4; margin: 0 0 12px; }
.embed-by { font-size: 13px; color: var(--muted); margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 2px 12px; justify-content: space-between; }
.embed-by a { font-weight: 600; }

/* «ضيف الحاسبة لموقعك» box on /tools/<tool>/ */
.embed-box { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 4px 20px 18px; margin: 30px 0; }
.embed-box h2 { margin-top: 16px; }
.embed-box textarea { width: 100%; min-height: 150px; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); resize: vertical; }
.embed-box .actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.embed-box .seg { margin: 6px 0 10px; }
