/* MIHHAR — «الأدوات المهنية» (4.21.0). Tools screens only. Mobile-first, RTL.
   Same tokens as the blog (the platform's values), no gradients, no web font of its own. */

body.mihhar-tools { background: #080b12; }

/* The theme's wrappers around the tools root: full width (same technique as the blog). */
body.mihhar-tools :has(#mihhar-tools-root) {
  max-width: none; width: auto; min-width: 0; padding-inline: 0; margin-inline: 0; float: none;
}
@supports not selector(:has(*)) {
  body.mihhar-tools :is(#content, #primary, #main, .site-content, .ast-container, .site-main, .content-area) {
    max-width: none; width: auto; padding-inline: 0; margin-inline: 0; float: none;
  }
}

.mh-tools {
  --t-bg: #080b12; --t-surface: #0f131c; --t-raise: #151b26; --t-line: rgba(255,255,255,.08);
  --t-text: #eef2f8; --t-text-2: #a9b4c7; --t-text-3: #7c889c;
  --t-accent: #4f8cff; --t-gold: #ebb824; --t-r: 18px;
  font-family: "Tajawal", "IBM Plex Sans Arabic", "Noto Sans Arabic", system-ui, sans-serif;
  color: var(--t-text); background: var(--t-bg); direction: rtl; text-align: start;
  line-height: 1.8; -webkit-font-smoothing: antialiased;
}
.mh-tools *, .mh-tools *::before, .mh-tools *::after { box-sizing: border-box; }
.mh-tools a { color: inherit; text-decoration: none; }
.mh-tools :is(h1, h2, h3) { color: var(--t-text); font-family: inherit; }
.mh-tools__wrap { max-width: 1120px; margin: 0 auto; padding: 20px 16px 64px; }
.mh-ticon { display: block; flex: 0 0 auto; }

/* Breadcrumbs + head */
.mh-tcrumbs ol { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--t-text-3); }
.mh-tcrumbs li + li::before { content: "/"; margin-inline-end: 6px; opacity: .6; }
.mh-tcrumbs a:hover { color: var(--t-text); }
.mh-thead { margin-bottom: 28px; }
.mh-tkicker { margin: 0 0 6px; color: var(--t-gold); font-size: 13px; font-weight: 700; }
.mh-thead__title { margin: 0 0 12px; font-size: clamp(26px, 6.4vw, 40px); line-height: 1.35; font-weight: 800; }
.mh-thead__lead { margin: 0; color: var(--t-text-2); font-size: 16.5px; max-width: 760px; }

/* Sections + grid */
.mh-tsection { margin-top: 32px; }
.mh-tsection__title { margin: 0 0 6px; font-size: 20px; font-weight: 800; }
.mh-tsection__note { margin: 0 0 14px; color: var(--t-text-3); font-size: 14px; }
.mh-tgrid { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .mh-tgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1025px) { .mh-tgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }

/* Cards */
.mh-tcard { height: 100%; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: var(--t-r); background: var(--t-surface); border: 1px solid var(--t-line); }
.mh-tcard__icon { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: rgba(79,140,255,.12); color: var(--t-accent); }
.mh-tcard.is-soon .mh-tcard__icon { background: rgba(255,255,255,.05); color: var(--t-text-2); }
.mh-tcard__title { margin: 0 0 4px; font-size: 17px; font-weight: 700; line-height: 1.5; }
.mh-tcard__text { margin: 0; color: var(--t-text-2); font-size: 14.5px; line-height: 1.75; }
.mh-tcard__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mh-tbadge { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.mh-tbadge.is-live { color: #7ee2a8; background: rgba(46,204,113,.12); }
.mh-tbadge.is-soon { color: var(--t-text-2); background: rgba(255,255,255,.06); }
.mh-tcard__cta { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--t-accent); color: #080b12 !important; font-weight: 800; font-size: 15px; }
.mh-tcard__cta .mh-ticon { transform: none; }
.mh-tcard__cta:focus-visible, .mh-tlink:focus-visible, .mh-tcrumbs a:focus-visible { outline: 2px solid var(--t-accent); outline-offset: 3px; }

/* How-to note */
.mh-tnote { margin-top: 36px; padding: 20px; border-radius: var(--t-r); background: var(--t-surface); border: 1px solid var(--t-line); }
.mh-tsteps { margin: 10px 0 14px; padding-inline-start: 22px; color: var(--t-text-2); font-size: 15px; }
.mh-tsteps li + li { margin-top: 6px; }
.mh-tlink { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--t-accent); font-weight: 700; }

/* Tool page shell (4.22.0) — shared by every tool; used only on /tools/{slug}/ */
.mh-tool__preview { margin: 0 0 20px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--t-gold); color: var(--t-text-2); font-size: 14px; display: grid; gap: 4px; }
.mh-tool__app { margin-top: 8px; padding: 18px; border-radius: var(--t-r); background: var(--t-surface); border: 1px solid var(--t-line); display: grid; gap: 16px; }
.mh-tool__result:empty { display: none; }
.mh-tool__result { padding-top: 16px; border-top: 1px solid var(--t-line); }
.mh-tool__q { margin: 18px 0 4px; font-size: 16.5px; font-weight: 700; line-height: 1.6; }
.mh-tool__text { margin: 0; color: var(--t-text-2); font-size: 15px; }
.mh-tool__sources a { color: var(--t-accent); }

/* Illustrative examples (4.23.0) — shared block, rendered only when a tool has examples */
.mh-tool__examples { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .mh-tool__examples { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mh-tool__examples li { min-width: 0; display: grid; gap: 4px; padding: 14px 16px; border-radius: 14px; background: var(--t-surface); border: 1px solid var(--t-line); }
.mh-tool__exlabel { color: var(--t-gold); font-size: 13px; font-weight: 700; }
.mh-tool__extext { color: var(--t-text); font-size: 15px; font-weight: 600; line-height: 1.7; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.mh-tool__exnote { color: var(--t-text-3); font-size: 13.5px; }
