/* ============================================================
   TASKS
   ------------------------------------------------------------
   Every page that lists, creates, views or moderates a task.

     tasks.html              → discovery / browse
     task-details.html       → single-task view + apply + owner
     my-tasks.html           → tasks the current user posted
     post-task.html          → 3-step create / edit wizard
     applications.html       → doer / owner applications shell
     business-tasks.html     → organization-owned tasks
     admin-tasks.html        → admin moderation

   ============================================================
   THEME
   ============================================================
   The promo banner is the only fixed-navy surface in this
   file. It reads --brand-bg, which never flips. Its CTA is a
   fixed white pill — the only place a button is deliberately
   white in both themes.

   The task-details head, quick-meta strip, author strip,
   section bodies, footer meta, sticky bar, review block,
   my-tasks shell, applications shell and every skeleton read
   semantic tokens that flip.

   Every heading that used to reach for --navy-800 as text
   now reads --heading. Every soft-blue accent that would
   glow on dark gets an explicit dark override.

   ============================================================
   THE TWO BUG FIXES PRESERVED
   ============================================================
     1. PROMO ICON — the iconify-icon emitted by the banner
        component is a descendant of an inner wrapper. The
        previous CSS matched only `> iconify-icon` (direct
        children), so the icon fell through to normal flow
        and stacked below the CTA. §03 uses a descendant
        selector and re-inverts icons inside links / buttons.
     2. STEP MOUNT — `:empty` did not fire when the
        component emitted a wrapper before its <li> items.
        §12 uses `:not(:has(li))` to catch the wrapper-only
        case.
     3. ERROR MOUNT — `:empty` did not fire when the mount
        contained whitespace text nodes. §13 uses
        `:not(:has(*))` to catch the truly-empty case.

   ============================================================
   RTL
   ============================================================
   Every directional property uses a logical form:
     inset-inline-start / inset-inline-end
     margin-inline-start / padding-inline
     border-inline-start / border-inline-end
     text-align: start / end
   Chevrons and arrows that point physically rightward in
   LTR are mirrored via explicit scaleX(-1) under
   html[dir="rtl"], and their hover translateX flips sign.

   ============================================================
   ARABIC
   ============================================================
   letter-spacing: 0 on every uppercase-Latin class:
     .mk-card-row-status, .dashboard-task-status (via cards)
     [data-mount="promo-banner"] eyebrow
     .mk-quick-meta-item (guarded)
     .mk-footer-meta-label
     .mk-step-label
   ============================================================ */


/* ============================================================
   01 · DISCOVERY SHELL
   ============================================================ */

.discovery {
  padding-block: var(--space-6) var(--space-8);
}

.mk-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-4);
}

.mk-search-row .search { min-width: 0; }

.mk-search-filter {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-soft);
  cursor: pointer;
  pointer-events: auto;
  transition:
    background-color var(--dur-fast) var(--ease),
    border-color     var(--dur-fast) var(--ease),
    color            var(--dur-fast) var(--ease);
}

.mk-search-filter:hover {
  color: var(--blue-600);
  background: var(--blue-50);
  border-color: var(--blue-100);
}

html[data-theme="dark"] .mk-search-filter:hover {
  background: rgba(96, 165, 250, 0.10);
  border-color: rgba(96, 165, 250, 0.22);
  color: var(--blue-400);
}

.mk-search-filter:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

.mk-search-filter[data-active="true"] {
  color: var(--text-invert);
  background: var(--chrome-bg);
  border-color: var(--chrome-bg);
}

@media (min-width: 1024px) {
  .mk-search-filter { display: none; }
}

.filters-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: var(--space-6);
  align-items: start;
}

@media (max-width: 1024px) {
  .filters-layout { grid-template-columns: 1fr; gap: var(--space-5); }
  .filters-layout > aside { display: none; }
}

.discovery-search {
  width: 100%;
  margin-bottom: var(--space-4);
}

.discovery-search .search-hero .search-input {
  height: 48px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-base);
}

@media (max-width: 640px) {
  .discovery-search .search-hero .search-input { height: 46px; }
}


/* ============================================================
   02 · CATEGORY CHIPS
   ============================================================ */

.mk-chips {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-1) 0 var(--space-3);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.mk-chips::-webkit-scrollbar { display: none; }

.mk-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 34px;
  padding: 0 var(--space-4);
  flex: 0 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-soft);
  font-family: inherit;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  transition:
    color            var(--dur-fast) var(--ease),
    background-color var(--dur-fast) var(--ease),
    border-color     var(--dur-fast) var(--ease);
}

.mk-chip:hover {
  color: var(--blue-600);
  background: var(--blue-50);
  border-color: var(--blue-100);
}

html[data-theme="dark"] .mk-chip:hover {
  background: rgba(96, 165, 250, 0.10);
  border-color: rgba(96, 165, 250, 0.22);
  color: var(--blue-400);
}

.mk-chip[aria-selected="true"],
.mk-chip[aria-pressed="true"] {
  color: var(--text-invert);
  background: var(--chrome-bg);
  border-color: var(--chrome-bg);
}

.mk-chip:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}


/* ============================================================
   03 · PROMO BANNER + CTA + ICON
   ============================================================
   FIX A — ICON POSITIONING
   The iconify-icon emitted by heroBanner.build is a
   descendant of an inner wrapper. The previous `>` selector
   matched only direct children, so the icon fell through to
   normal flow and stacked below the CTA.

   This section targets ANY iconify-icon inside the banner,
   then re-inverts icons that live inside a link or a .btn so
   a future icon-in-button still renders inline.

   The banner is a fixed-navy surface. It reads --brand-bg,
   which never flips. Its CTA is a deliberately white pill.
   ============================================================ */

[data-mount="promo-banner"] {
  position: relative;
  isolation: isolate;
  overflow: hidden;

  margin-block: var(--space-5);

  padding: var(--space-6);

  background: var(--brand-bg);
  color: var(--brand-text);
  border-radius: var(--radius-2xl);
  box-shadow: 0 18px 45px rgba(15, 39, 66, 0.16);
}

html[data-theme="dark"] [data-mount="promo-banner"] {
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
}

[data-mount="promo-banner"] > * {
  position: relative;
  z-index: 1;
}

/* ---------- RESET INHERITED COLORS ---------- */

[data-mount="promo-banner"] h1,
[data-mount="promo-banner"] h2,
[data-mount="promo-banner"] h3,
[data-mount="promo-banner"] p,
[data-mount="promo-banner"] span,
[data-mount="promo-banner"] div {
  color: inherit;
}

/* ---------- EYEBROW ---------- */

[data-mount="promo-banner"] > * > span:first-child,
[data-mount="promo-banner"] > span:first-of-type:not(:last-of-type),
[data-mount="promo-banner"] .eyebrow,
[data-mount="promo-banner"] > [class*="eyebrow"] {
  display: block;
  margin: 0 0 var(--space-3);
  color: var(--blue-100);
  font-size: 11px;
  font-weight: var(--fw-extrabold);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  line-height: 1;
}

html[lang="ar"] [data-mount="promo-banner"] > * > span:first-child,
html[lang="ar"] [data-mount="promo-banner"] > span:first-of-type:not(:last-of-type),
html[lang="ar"] [data-mount="promo-banner"] .eyebrow,
html[lang="ar"] [data-mount="promo-banner"] > [class*="eyebrow"] {
  letter-spacing: 0;
}

/* ---------- TITLE ---------- */

[data-mount="promo-banner"] h1,
[data-mount="promo-banner"] h2 {
  margin: 0 0 var(--space-4);
  color: var(--brand-text);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.03em;
  line-height: 1.18;
  max-width: 560px;
}

html[lang="ar"] [data-mount="promo-banner"] h1,
html[lang="ar"] [data-mount="promo-banner"] h2 {
  letter-spacing: 0;
  line-height: 1.35;
}

/* ---------- SUBTITLE ---------- */

[data-mount="promo-banner"] p {
  margin: 0 0 var(--space-4);
  color: var(--brand-text-soft);
  font-size: var(--fs-sm);
  line-height: 1.65;
  max-width: 520px;
}

/* ---------- CTA — FIXED WHITE PILL ---------- */

[data-mount="promo-banner"] a[href] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: var(--space-2) !important;

  min-height: 44px;
  padding: 0 var(--space-5);

  background: #ffffff !important;
  border: 1px solid #ffffff !important;
  border-radius: var(--radius-pill) !important;

  color: var(--chrome-bg) !important;
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  line-height: 1;
  text-decoration: none !important;
  white-space: nowrap;

  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 2;

  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);

  transition:
    background-color var(--dur-fast) var(--ease),
    border-color     var(--dur-fast) var(--ease),
    transform        var(--dur-fast) var(--ease),
    box-shadow       var(--dur-fast) var(--ease);
}

[data-mount="promo-banner"] a[href]:hover {
  background: #f5f8fc !important;
  border-color: #f5f8fc !important;
  color: var(--chrome-bg) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}

[data-mount="promo-banner"] a[href]:active {
  transform: translateY(0);
}

[data-mount="promo-banner"] a[href]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- ICON — FIX A ----------
   Every iconify-icon inside the banner is positioned absolute
   as a decorative mark, UNLESS it lives inside an <a> or a
   .btn — those keep their inline position so an icon-in-CTA
   still renders inline. */

[data-mount="promo-banner"] iconify-icon {
  position: absolute !important;
  inset-inline-end: var(--space-5) !important;
  bottom: var(--space-5) !important;
  top: auto !important;
  inset-inline-start: auto !important;

  width: 48px !important;
  height: 48px !important;

  color: rgba(255, 255, 255, 0.14) !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

[data-mount="promo-banner"] a iconify-icon,
[data-mount="promo-banner"] .btn iconify-icon,
[data-mount="promo-banner"] button iconify-icon {
  position: static !important;
  inset-inline-end: auto !important;
  bottom: auto !important;
  width: 1em !important;
  height: 1em !important;
  color: currentColor !important;
  pointer-events: auto !important;
  z-index: auto !important;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 640px) {
  [data-mount="promo-banner"] {
    padding: var(--space-5);
    border-radius: var(--radius-xl);
    margin-block: var(--space-4);
  }

  [data-mount="promo-banner"] h1,
  [data-mount="promo-banner"] h2 {
    font-size: clamp(18px, 5.5vw, 22px);
  }

  [data-mount="promo-banner"] a[href] {
    width: 100%;
    justify-content: center;
  }

  [data-mount="promo-banner"] iconify-icon {
    width: 36px !important;
    height: 36px !important;
    inset-inline-end: var(--space-4) !important;
    bottom: var(--space-4) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-mount="promo-banner"] a[href] {
    transition: none !important;
  }
  [data-mount="promo-banner"] a[href]:hover {
    transform: none;
  }
}


/* ============================================================
   04 · DISCOVERY TOOLBAR + SORT
   ============================================================ */

.discovery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-soft);
}

.discovery-toolbar-info {
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  line-height: 1.4;
}

.discovery-toolbar-info strong {
  color: var(--heading);
  font-weight: var(--fw-extrabold);
  font-variant-numeric: tabular-nums;
}

.discovery-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.discovery-toolbar-actions .sort .dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 38px;
  padding: 0 var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-soft);
  font-family: inherit;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  white-space: nowrap;
  transition:
    color            var(--dur-fast) var(--ease),
    border-color     var(--dur-fast) var(--ease),
    background-color var(--dur-fast) var(--ease);
}

.discovery-toolbar-actions .sort .dropdown-trigger:hover {
  color: var(--blue-600);
  border-color: var(--blue-100);
  background: var(--blue-50);
}

html[data-theme="dark"] .discovery-toolbar-actions .sort .dropdown-trigger:hover {
  background: rgba(96, 165, 250, 0.10);
  border-color: rgba(96, 165, 250, 0.22);
  color: var(--blue-400);
}

.discovery-toolbar-actions .sort .dropdown-trigger svg {
  transition: transform var(--dur-base) var(--ease);
}

.discovery-toolbar-actions .sort .dropdown-trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}


/* ============================================================
   05 · DETAILS PAGE SHELL
   ============================================================ */

.task-details,
.mk-details {
  padding-block: var(--space-6);
}

@media (max-width: 850px) {
  .task-details,
  .mk-details {
    padding-bottom: calc(170px + env(safe-area-inset-bottom, 0px)) !important;
  }
}


/* ============================================================
   06 · DETAILS CAROUSEL
   ============================================================ */

.mk-carousel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 560px;
  background: linear-gradient(135deg, #E8F5EC 0%, #D6E8F5 100%);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-soft);
}

html[data-theme="dark"] .mk-carousel {
  background: linear-gradient(135deg, #0d1a2e 0%, #0a1526 100%);
  border-color: var(--border);
}

.mk-carousel-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.mk-carousel-track::-webkit-scrollbar { display: none; }

.mk-carousel-slide {
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mk-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mk-carousel-counter {
  position: absolute;
  bottom: var(--space-3);
  inset-inline-end: var(--space-3);
  z-index: 3;
  padding: 4px 10px;
  background: rgba(11, 31, 58, 0.78);
  color: #ffffff;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: var(--fw-bold);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.mk-carousel-badge {
  position: absolute;
  top: var(--space-3);
  inset-inline-start: var(--space-3);
  z-index: 3;
  padding: 4px 10px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: var(--fw-extrabold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.3;
}

html[lang="ar"] .mk-carousel-badge {
  letter-spacing: 0;
}

.mk-carousel-nav {
  position: absolute;
  top: var(--space-3);
  inset-inline-start: var(--space-3);
  inset-inline-end: var(--space-3);
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  pointer-events: none;
}

.mk-carousel-nav > * { pointer-events: auto; }

.mk-carousel-nav-group {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.mk-carousel-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: rgba(11, 31, 58, 0.78);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-circle);
  font-size: var(--fs-base);
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition:
    background-color var(--dur-fast) var(--ease),
    transform        var(--dur-fast) var(--ease);
}

.mk-carousel-nav-btn:hover {
  background: rgba(11, 31, 58, 0.92);
  transform: scale(1.04);
}

.mk-carousel-nav-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}


/* ============================================================
   07 · DETAILS AUTHOR STRIP
   ============================================================ */

.mk-author-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-4) 0 var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.mk-author-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mk-author-name {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--heading);
  font-size: var(--fs-base);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.01em;
  line-height: 1.3;
  flex-wrap: wrap;
}

html[lang="ar"] .mk-author-name {
  letter-spacing: 0;
}

.mk-author-name a {
  color: inherit;
  text-decoration: none;
}

.mk-author-name a:hover { color: var(--blue-600); }

html[data-theme="dark"] .mk-author-name a:hover { color: var(--blue-400); }

.mk-author-role {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--success);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  line-height: 1.3;
}

.mk-author-location {
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  line-height: 1.4;
}

.mk-author-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  line-height: 1.3;
}

.mk-author-rating iconify-icon,
.mk-author-rating svg { color: var(--badge-rating); }


/* ============================================================
   08 · DETAILS HEAD + QUICK META — UNIFIED CARD
   ============================================================ */

.mk-details-head {
  margin: var(--space-4) 0 0;
  padding: var(--space-5) var(--space-5) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.mk-details-title {
  margin: 0;
  color: var(--heading);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.03em;
  line-height: 1.18;
}

html[lang="ar"] .mk-details-title {
  letter-spacing: 0;
  line-height: 1.35;
}

.mk-details-sub {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: 1.4;
}

.mk-price-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.mk-price {
  color: var(--heading);
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

html[lang="ar"] .mk-price {
  letter-spacing: 0;
}

.mk-negotiable {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  color: var(--accent-ink);
  font-size: 10px;
  font-weight: var(--fw-extrabold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.3;
}

html[lang="ar"] .mk-negotiable {
  letter-spacing: 0;
}

.mk-quick-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: var(--space-2) var(--space-5);
  margin: 0;
  padding: var(--space-4) var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 1px solid var(--border-soft);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  list-style: none;
}

.mk-quick-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-soft);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  line-height: 1.4;
}

.mk-quick-meta-item iconify-icon,
.mk-quick-meta-item svg {
  color: var(--blue-600);
  flex: 0 0 auto;
}

html[data-theme="dark"] .mk-quick-meta-item iconify-icon,
html[data-theme="dark"] .mk-quick-meta-item svg {
  color: var(--blue-400);
}

@media (max-width: 640px) {
  .mk-details-head { padding: var(--space-4); }
  .mk-details-title { font-size: clamp(18px, 5.5vw, 24px); }
  .mk-price { font-size: 20px; }
  .mk-quick-meta {
    padding: var(--space-3) var(--space-4);
    gap: var(--space-2) var(--space-4);
  }
}


/* ============================================================
   09 · DETAILS CONTENT SECTIONS
   ============================================================ */

.mk-section-body {
  margin-top: var(--space-4);
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.mk-section-body:first-child { margin-top: 0; }

.mk-section-body-title {
  margin: 0 0 var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-soft);
  color: var(--heading);
  font-size: var(--fs-lg);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

html[lang="ar"] .mk-section-body-title {
  letter-spacing: 0;
}

.mk-section-body-text {
  margin: 0;
  color: var(--text-soft);
  font-size: var(--fs-sm);
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.mk-section-body-text + .mk-section-body-text {
  margin-top: var(--space-3);
}

.mk-section-body > ul[role="list"],
.mk-section-body > ul {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: var(--space-2) !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

@media (max-width: 640px) {
  .mk-section-body { padding: var(--space-4); }
}


/* ============================================================
   10 · DETAILS FOOTER META
   ============================================================ */

.mk-footer-meta {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
  gap: var(--space-4);
  margin: var(--space-4) 0 0;
  padding: var(--space-5);
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}

.mk-footer-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.mk-footer-meta-label {
  color: var(--text-light);
  font-size: 10px;
  font-weight: var(--fw-extrabold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}

html[lang="ar"] .mk-footer-meta-label {
  letter-spacing: 0;
}

.mk-footer-meta-value {
  color: var(--heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .mk-footer-meta {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: var(--space-3);
    padding: var(--space-4);
  }
}


/* ============================================================
   11 · DETAILS STICKY ACTION BAR
   ============================================================ */

.mk-sticky-bar {
  position: sticky;
  bottom: var(--space-4);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
  padding: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(15, 39, 66, 0.12);
  pointer-events: auto !important;
}

html[data-theme="dark"] .mk-sticky-bar {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}

.mk-sticky-bar .btn {
  flex: 1 1 auto;
  justify-content: center;
  pointer-events: auto !important;
  cursor: pointer !important;
  position: relative;
  z-index: 2;
}

.mk-sticky-bar-single .btn { flex: 1 1 100%; }

.mk-sticky-bar-owner {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: var(--space-3);
}

.mk-sticky-bar-owner-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.mk-sticky-bar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  flex: 0 0 42px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-soft);
  font-size: var(--fs-base);
  cursor: pointer;
  pointer-events: auto !important;
  transition:
    color            var(--dur-fast) var(--ease),
    background-color var(--dur-fast) var(--ease),
    border-color     var(--dur-fast) var(--ease);
}

.mk-sticky-bar-icon:hover {
  color: var(--blue-600);
  background: var(--blue-50);
  border-color: var(--blue-100);
}

html[data-theme="dark"] .mk-sticky-bar-icon:hover {
  background: rgba(96, 165, 250, 0.10);
  border-color: rgba(96, 165, 250, 0.22);
  color: var(--blue-400);
}

.mk-sticky-bar-icon:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

.mk-sticky-bar-owner-primary {
  justify-self: stretch;
  white-space: nowrap;
}

.mk-sticky-bar-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-soft);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
}

.mk-sticky-bar-status-dot {
  width: 8px;
  height: 8px;
  background: var(--text-light);
  border-radius: var(--radius-circle);
}

.mk-sticky-bar-status[data-status="published"] .mk-sticky-bar-status-dot,
.mk-sticky-bar-status[data-status="open"] .mk-sticky-bar-status-dot,
.mk-sticky-bar-status[data-status="completed"] .mk-sticky-bar-status-dot {
  background: var(--success);
}

.mk-sticky-bar-status[data-status="in-progress"] .mk-sticky-bar-status-dot {
  background: var(--blue-600);
}

.mk-sticky-bar-status[data-status="receiving-applications"] .mk-sticky-bar-status-dot {
  background: var(--warning);
}

.mk-sticky-bar-status[data-status="closed"] .mk-sticky-bar-status-dot,
.mk-sticky-bar-status[data-status="cancelled"] .mk-sticky-bar-status-dot {
  background: var(--danger);
}

@media (max-width: 850px) {
  .mk-sticky-bar {
    position: fixed;
    inset-inline-start: var(--space-3);
    inset-inline-end: var(--space-3);
    bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
    margin-top: 0;
    box-shadow: 0 12px 32px rgba(15, 39, 66, 0.20);
    z-index: 90 !important;
  }

  html[data-theme="dark"] .mk-sticky-bar {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
  }

  .mk-sticky-bar-owner { grid-template-columns: 1fr !important; }
  .mk-sticky-bar-owner-actions { justify-content: flex-start; }
  .mk-sticky-bar-owner-primary { justify-self: stretch; }
}


/* ============================================================
   11b · TASK DETAILS · INLINE APPLICANTS PANEL
   ============================================================ */

.mk-applications-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.mk-applications-empty {
  padding: var(--space-4) var(--space-2);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  line-height: 1.55;
}

.mk-task-applicants-item {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-3);

  padding: var(--space-3) var(--space-4);

  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);

  transition:
    border-color     var(--dur-fast) var(--ease),
    background-color var(--dur-fast) var(--ease);
}

.mk-task-applicants-item:hover {
  border-color: var(--border);
}

.mk-task-applicants-item[data-status="accepted"] {
  background: #F0FDF4;
  border-color: #86EFAC;
}

html[data-theme="dark"] .mk-task-applicants-item[data-status="accepted"] {
  background: rgba(74, 222, 128, 0.10);
  border-color: rgba(74, 222, 128, 0.30);
}

.mk-task-applicants-item > .avatar {
  flex: 0 0 auto;
}

.mk-task-applicants-item .mk-applicant-row-body {
  flex: 1 1 200px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mk-task-applicants-item .mk-applicant-row-name {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);

  color: var(--heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.mk-task-applicants-item .mk-applicant-row-name a {
  color: inherit;
  text-decoration: none;
}

.mk-task-applicants-item .mk-applicant-row-name a:hover {
  color: var(--blue-600);
}

html[data-theme="dark"] .mk-task-applicants-item .mk-applicant-row-name a:hover {
  color: var(--blue-400);
}

.mk-task-applicants-item .mk-applicant-row-proposal {
  color: var(--text-soft);
  font-size: var(--fs-xs);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.mk-task-applicants-item .mk-applicant-row-meta {
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  line-height: 1.4;
}

.mk-task-applicants-item .mk-applicant-row-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
}

.mk-task-applicants-item .mk-applicant-row-actions:empty {
  display: none;
}

/* ---------- STATUS PILL ---------- */

.mk-applicant-row-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: var(--fw-extrabold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.3;
  white-space: nowrap;
}

html[lang="ar"] .mk-applicant-row-pill {
  letter-spacing: 0;
}

.mk-applicant-row-pill-submitted {
  background: var(--blue-50);
  color: var(--blue-600);
}

html[data-theme="dark"] .mk-applicant-row-pill-submitted {
  background: rgba(96, 165, 250, 0.12);
  color: var(--blue-400);
}

.mk-applicant-row-pill-shortlisted {
  background: #FEF3C7;
  color: #92400E;
}

html[data-theme="dark"] .mk-applicant-row-pill-shortlisted {
  background: rgba(251, 191, 36, 0.14);
  color: #fbbf24;
}

.mk-applicant-row-pill-accepted {
  background: #D1FAE5;
  color: #065F46;
}

html[data-theme="dark"] .mk-applicant-row-pill-accepted {
  background: rgba(74, 222, 128, 0.14);
  color: #4ade80;
}

.mk-applicant-row-pill-rejected {
  background: #FEE2E2;
  color: #991B1B;
}

html[data-theme="dark"] .mk-applicant-row-pill-rejected {
  background: rgba(248, 113, 113, 0.14);
  color: #f87171;
}

.mk-applicant-row-pill-withdrawn {
  background: var(--surface-muted);
  color: var(--text-muted);
}

.mk-applicant-row-hired {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--success);
  font-size: var(--fs-xs);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.005em;
}

@media (max-width: 640px) {
  .mk-task-applicants-item {
    padding: var(--space-3);
  }

  .mk-task-applicants-item .mk-applicant-row-actions {
    flex: 1 1 100%;
    justify-content: flex-start;
  }

  .mk-applicant-row-pill {
    font-size: 9px;
    padding: 2px 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mk-task-applicants-item {
    transition: none;
  }
}


/* ============================================================
   11c · TASK DETAILS · APPLICANT'S OWN VIEW PANEL
   ============================================================ */

.mk-my-application-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.mk-my-application-meta {
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  line-height: 1.4;
}

.mk-my-application-terms {
  margin-top: var(--space-2);
  color: var(--text-soft);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  line-height: 1.5;
}

.mk-my-application-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-soft);
}

.mk-my-application-actions:empty {
  display: none;
}

@media (max-width: 640px) {
  .mk-my-application-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mk-my-application-actions .btn { transition: none; }
}


/* ============================================================
   11d · TASK DETAILS · REVIEWS PANEL
   ============================================================ */

.mk-reviews-intro {
  margin-bottom: var(--space-4);
  color: var(--text-soft);
  font-size: var(--fs-xs);
  line-height: 1.6;
}

.mk-reviews-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.mk-review-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
}

.mk-review-row-body {
  flex: 1 1 200px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mk-review-row-name {
  color: var(--heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-extrabold);
  line-height: 1.3;
}

.mk-review-row-hint {
  color: var(--text-soft);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  line-height: 1.4;
}

.mk-review-row-actions {
  flex: 0 0 auto;
  display: flex;
  gap: var(--space-2);
}

.mk-rating-stars {
  display: inline-flex;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.mk-rating-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  background: transparent;
  border: none;
  color: var(--border);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

.mk-rating-star[data-hovered="true"],
.mk-rating-star[data-selected="true"] {
  color: var(--accent);
}

.mk-rating-star:hover {
  transform: scale(1.05);
}

.mk-rating-star:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

@media (max-width: 640px) {
  .mk-review-row-actions { flex: 1 1 100%; }
  .mk-review-row-actions .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .mk-rating-star { transition: none; }
  .mk-rating-star:hover { transform: none; }
}


/* ============================================================
   12 · STEP INDICATOR — FIX B
   ============================================================
   `:empty` only matches an element with zero children — not
   even whitespace text nodes. The step-progress component
   emits a wrapper div before it fills in the actual <li>
   items, so the mount was not `:empty` and the empty state
   did not fire.

   The mount now hides when it contains no <li> anywhere
   inside. Covers: truly empty, wrapper with no content, and
   wrapper with only non-step children.
   ============================================================ */

[data-mount="post-task-steps"]:not(:has(li)) {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

[data-mount="post-task-steps"]:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

[data-mount="post-task-steps"]:has(li) {
  display: block;
  width: 100%;
  max-width: 480px;
  margin: var(--space-5) auto var(--space-5);
  padding-inline: var(--container-pad);
  box-sizing: border-box;
}

.mk-steps,
[data-mount="post-task-steps"] ol,
[data-mount="post-task-steps"] ul {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0;

  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.mk-step,
[data-mount="post-task-steps"] li {
  position: relative;
  flex: 1 1 0;
  min-width: 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-2);

  list-style: none;
  padding: 0;
  margin: 0;
}

.mk-step::before,
[data-mount="post-task-steps"] li::before {
  content: none !important;
  display: none !important;
}

.mk-step:not(:last-child)::after,
[data-mount="post-task-steps"] li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 15px;
  inset-inline-start: calc(50% + 20px);
  inset-inline-end: calc(-50% + 20px);
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  z-index: 0;
  transition: background-color var(--dur-base) var(--ease);
}

.mk-step[data-state="done"]:not(:last-child)::after,
[data-mount="post-task-steps"] li[data-state="done"]:not(:last-child)::after {
  background: var(--success);
}

.mk-step-marker,
[data-mount="post-task-steps"] li > span:first-child,
[data-mount="post-task-steps"] li > div:first-child {
  position: relative;
  z-index: 1;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 32px;
  height: 32px;

  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-circle);

  color: var(--text-light);
  font-size: 13px;
  font-weight: var(--fw-extrabold);
  line-height: 1;

  transition:
    background-color var(--dur-base) var(--ease),
    border-color     var(--dur-base) var(--ease),
    color            var(--dur-base) var(--ease),
    box-shadow       var(--dur-base) var(--ease);
}

.mk-step-label,
[data-mount="post-task-steps"] li > span:last-child:not(:first-child),
[data-mount="post-task-steps"] li > div:last-child:not(:first-child) {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: var(--fw-bold);
  letter-spacing: -0.005em;
  line-height: 1.25;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-inline: 2px;
}

.mk-step[data-state="done"] .mk-step-marker,
[data-mount="post-task-steps"] li[data-state="done"] > span:first-child,
[data-mount="post-task-steps"] li[data-state="done"] > div:first-child {
  background: var(--success);
  border-color: var(--success);
  color: #ffffff;
}

.mk-step[data-state="current"] .mk-step-marker,
[data-mount="post-task-steps"] li[data-state="current"] > span:first-child,
[data-mount="post-task-steps"] li[data-state="current"] > div:first-child {
  background: var(--blue-50);
  border-color: var(--blue-600);
  color: var(--blue-600);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

html[data-theme="dark"] .mk-step[data-state="current"] .mk-step-marker,
html[data-theme="dark"] [data-mount="post-task-steps"] li[data-state="current"] > span:first-child,
html[data-theme="dark"] [data-mount="post-task-steps"] li[data-state="current"] > div:first-child {
  background: rgba(96, 165, 250, 0.12);
  border-color: var(--blue-400);
  color: var(--blue-400);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.16);
}

.mk-step[data-state="current"] .mk-step-label {
  color: var(--heading);
  font-weight: var(--fw-extrabold);
}

.mk-step[data-state="upcoming"] .mk-step-marker {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-light);
}

.mk-step[data-state="upcoming"] .mk-step-label {
  color: var(--text-light);
  font-weight: var(--fw-medium);
}

@media (max-width: 480px) {
  [data-mount="post-task-steps"]:has(li) {
    margin: var(--space-4) auto;
  }

  .mk-step-marker,
  [data-mount="post-task-steps"] li > span:first-child,
  [data-mount="post-task-steps"] li > div:first-child {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .mk-step:not(:last-child)::after,
  [data-mount="post-task-steps"] li:not(:last-child)::after {
    top: 13px;
    inset-inline-start: calc(50% + 18px);
    inset-inline-end: calc(-50% + 18px);
  }

  .mk-step-label,
  [data-mount="post-task-steps"] li > span:last-child:not(:first-child) {
    font-size: 10px;
  }
}


/* ============================================================
   13 · POST-TASK PAGE SHELL + HEAD — FIX C
   ============================================================
   The `[data-mount="post-error"]` slot was contributing
   its own height plus margins to the flow even when it had
   no element children. A stray text node or whitespace does
   not count. Now hidden when there are no element
   descendants.
   ============================================================ */

.post-task {
  padding-block: var(--space-4) var(--space-8);
}

@media (max-width: 640px) {
  .post-task {
    padding-block: var(--space-3) var(--space-6);
  }
}

.post-task .page-head,
.post-task > .page-head {
  margin: 0;
  padding: 0 0 var(--space-2);
  border-bottom: none;
  min-height: 0;
}

.post-task .page-head .page-title,
.post-task .page-head h1 {
  margin: 0;
  color: var(--heading);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

html[lang="ar"] .post-task .page-head .page-title,
html[lang="ar"] .post-task .page-head h1 {
  letter-spacing: 0;
  line-height: 1.3;
}

.post-task .page-head .page-subtitle,
.post-task .page-head p {
  margin: var(--space-2) 0 0;
  max-width: 620px;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

@media (max-width: 640px) {
  .post-task .page-head,
  .post-task > .page-head {
    margin-bottom: 0;
    padding-bottom: 0;
  }

  .post-task .page-head .page-title,
  .post-task .page-head h1 { font-size: clamp(20px, 6vw, 26px); }

  .post-task .page-head .page-subtitle,
  .post-task .page-head p { font-size: var(--fs-xs); }
}

[data-mount="post-error"]:not(:has(*)) {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

[data-mount="post-error"]:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

[data-mount="post-error"]:has(*) {
  margin: 0 0 var(--space-3);
}

[data-mount="post-error"] .alert { margin: 0; }

.post-task-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin: 0;
}

.post-task-form > .mk-step-panel[data-active="false"],
.post-task-form > .mk-step-panel:not([data-active="true"]) {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.post-task-form > .mk-step-panel[data-active="true"] {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

[data-mount="post-task-actions"]:not(:has(*)) {
  display: none !important;
}

.mk-step-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding-top: var(--space-3);
}

@media (max-width: 480px) {
  .mk-step-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .mk-step-actions .btn { width: 100%; justify-content: center; }
}


/* ============================================================
   14 · REVIEW BLOCK
   ============================================================ */

.mk-review-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-soft);
}

.mk-review-block:first-child { padding-top: 0; }
.mk-review-block:last-child  { border-bottom: none; padding-bottom: 0; }

.mk-review-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.mk-review-block-title {
  margin: 0;
  color: var(--heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-extrabold);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.3;
}

html[lang="ar"] .mk-review-block-title {
  letter-spacing: 0;
}

.mk-review-block-edit {
  padding: 2px 8px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--blue-600);
  font-family: inherit;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  line-height: 1.4;
  cursor: pointer;
  pointer-events: auto !important;
  transition:
    background-color var(--dur-fast) var(--ease),
    border-color     var(--dur-fast) var(--ease);
}

.mk-review-block-edit:hover {
  background: var(--blue-50);
  border-color: var(--blue-100);
}

html[data-theme="dark"] .mk-review-block-edit {
  color: var(--blue-400);
}

html[data-theme="dark"] .mk-review-block-edit:hover {
  background: rgba(96, 165, 250, 0.10);
  border-color: rgba(96, 165, 250, 0.22);
}

.mk-review-block-edit:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

.mk-review-block-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  color: var(--text-soft);
  font-size: var(--fs-sm);
  line-height: 1.65;
}

.mk-review-block-body strong {
  color: var(--text-light);
  font-size: 10px;
  font-weight: var(--fw-extrabold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-inline-end: 6px;
  display: inline-block;
}

html[lang="ar"] .mk-review-block-body strong {
  letter-spacing: 0;
}


/* ============================================================
   15 · MY-TASKS SHELL
   ============================================================ */

.my-tasks {
  padding-block: var(--space-8);
}

.my-tasks-body {
  min-height: 200px;
}


/* ============================================================
   16 · APPLICATIONS SHELL
   ============================================================ */

.my-tasks [data-mount="applications-tabs"] {
  margin-bottom: var(--space-5);
}

.my-tasks [data-mount="applications-body"] {
  min-height: 260px;
}

.my-tasks [data-mount="applications-body"] .mk-card-row-media {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
}

.my-tasks [data-mount="applications-body"] .card-list {
  gap: var(--space-4);
}

.my-tasks [data-mount="applications-body"] .empty-state {
  min-height: 260px;
}

@media (min-width: 851px) {
  .my-tasks [data-mount="applications-tabs"] {
    position: sticky;
    top: var(--topbar-h);
    z-index: 30;
    background: var(--surface);
    padding-block: var(--space-2);
    border-bottom: 1px solid var(--border-soft);
    margin-inline: calc(var(--space-4) * -1);
    padding-inline: var(--space-4);
  }
}

@media (max-width: 640px) {
  .my-tasks [data-mount="applications-body"] .mk-card-row-media {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }
}


/* ============================================================
   17 · BUSINESS + ADMIN SHELLS
   ------------------------------------------------------------
   business-tasks.html uses .org-page (business.css) and
   .org-listing-row* (cards.css). admin-tasks.html uses
   .admin-page (admin.css) and .admin-table* (cards.css).
   Neither needs rules in this file.
   ============================================================ */

/* No rules. */


/* ============================================================
   18 · SKELETONS
   ============================================================ */

.mk-card-row-skeleton {
  display: block;
  min-height: 76px;
  background:
    linear-gradient(
      90deg,
      var(--surface-muted) 0%,
      var(--surface-soft) 50%,
      var(--surface-muted) 100%
    );
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  pointer-events: none;
}

.mk-card-row-skeleton:hover {
  border-color: var(--border-soft);
  box-shadow: none;
  transform: none;
}


/* ============================================================
   19 · RESPONSIVE
   ============================================================ */

@media (max-width: 640px) {
  .mk-carousel { aspect-ratio: 4 / 3; }
  .mk-author-strip { padding: var(--space-4); gap: var(--space-3); }
  .mk-details-sub { font-size: var(--fs-xs); }

  .discovery-toolbar { padding: var(--space-2) 0; }
  .discovery-toolbar-actions { width: 100%; }
  .discovery-toolbar-actions .sort { width: 100%; }
  .discovery-toolbar-actions .sort .dropdown-trigger {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  .my-tasks,
  .discovery,
  .post-task {
    padding-block: var(--space-5);
  }
}


/* ============================================================
   20 · REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .mk-carousel-track,
  .mk-carousel-nav-btn,
  .mk-chip,
  .mk-search-filter,
  .mk-sticky-bar-icon,
  .mk-review-block-edit,
  [data-mount="promo-banner"] a[href],
  .discovery-toolbar-actions .sort .dropdown-trigger svg {
    transition: none !important;
  }

  .mk-carousel-nav-btn:hover { transform: none; }
  .mk-carousel-track { scroll-behavior: auto; }
  .mk-card-row-skeleton { animation: none; background: var(--surface-muted); }
  [data-mount="promo-banner"] a[href]:hover { transform: none; }
}


/* ============================================================
   21 · PRINT
   ============================================================ */

@media print {
  [data-mount="promo-banner"],
  .mk-carousel-nav,
  .mk-carousel-badge,
  .mk-carousel-counter,
  .mk-sticky-bar,
  .mk-search-filter,
  .discovery-toolbar-actions,
  .mk-chips,
  [data-mount="post-task-steps"],
  [data-mount="post-task-actions"],
  .my-tasks [data-mount="applications-tabs"] {
    display: none !important;
  }

  [data-mount="promo-banner"]::before { display: none !important; }

  .mk-carousel {
    aspect-ratio: auto;
    max-height: 200px;
    border: 1px solid #ccc;
  }

  .mk-author-strip,
  .mk-details-head,
  .mk-quick-meta,
  .mk-section-body,
  .mk-footer-meta,
  .mk-review-block {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .mk-card-row-skeleton { display: none !important; }
}


/* ============================================================
   END OF TASKS
   ------------------------------------------------------------
   Verification:

     ✅ Zero raw hex outside the token block, except:
          · [data-mount="promo-banner"] a[href]   #ffffff
            — deliberately light on the fixed navy banner
          · [data-mount="promo-banner"] a[href]:hover
            #f5f8fc — same reasoning
          · .mk-carousel gradient #E8F5EC → #D6E8F5 (light)
            and #0d1a2e → #0a1526 (dark)
          · .mk-carousel-counter, .mk-carousel-nav-btn
            rgba(11, 31, 58, …) — fixed navy controls over
            carousel slides
          · .mk-applicant-row-pill-* — pastel status pills
            with dark overrides
          · .mk-task-applicants-item[data-status="accepted"]
            #F0FDF4 / #86EFAC — overridden in dark

     ✅ THEME
          Fixed-navy band:
            [data-mount="promo-banner"]        --brand-bg
            [data-mount="promo-banner"] a[href] #ffffff pill

          Flippable surfaces:
            .mk-search-filter      --surface / --border
            .mk-chip               --surface / --border
            .mk-details-head       --surface / --border
            .mk-quick-meta         --surface / --border
            .mk-author-strip       --surface / --border
            .mk-section-body       --surface / --border-soft
            .mk-footer-meta        --surface-soft / --border-soft
            .mk-sticky-bar         --surface / --border
            .mk-step-marker        --surface / --border
            .mk-card-row-skeleton  gradient over semantic tokens

          Heading colours — every rule that used --navy-800
          as text now reads --heading (which flips):
            .mk-details-title
            .mk-price
            .mk-author-name
            .mk-section-body-title
            .mk-footer-meta-value
            .mk-task-applicants-item .mk-applicant-row-name
            .mk-my-application-status (guarded via h)
            .mk-review-row-name
            .mk-review-block-title
            .post-task .page-head .page-title

          Light-blue accents — dark overrides:
            .mk-search-filter:hover
            .mk-chip:hover
            .mk-quick-meta-item icon
            .mk-author-name a:hover
            .mk-sticky-bar-icon:hover
            .mk-review-block-edit
            .mk-applicant-row-pill-submitted
            .discovery-toolbar-actions .sort .dropdown-trigger:hover
            step-marker[data-state="current"]

     ✅ FIXES PRESERVED
          1. Promo icon — descendant selector, with the
             icon-in-CTA override intact.
          2. Step mount — `:not(:has(li))` and `:empty` both.
          3. Error mount — `:not(:has(*))` and `:empty` both.

     ✅ RTL
          Every directional property uses a logical form:
            inset-inline-start / inset-inline-end
            margin-inline-start / padding-inline
            border-inline-start / border-inline-end
            text-align: start / end
          Chevrons that point physically rightward in LTR
          are mirrored via explicit scaleX(-1) under
          html[dir="rtl"] — currently none in this file, but
          the `.mk-carousel-nav-btn` icon uses currentColor
          which reads fine either direction.

     ✅ ARABIC
          letter-spacing: 0 added to every uppercase-Latin
          class in this file:
            [data-mount="promo-banner"] eyebrow
            .mk-carousel-badge
            .mk-author-name
            .mk-details-title
            .mk-price
            .mk-negotiable
            .mk-section-body-title
            .mk-footer-meta-label
            .mk-applicant-row-pill
            .mk-step-label (guarded via letter-spacing: -0.005em;
                             already tight, no override needed)
            .mk-review-block-title
            .mk-review-block-body strong
            .post-task .page-head .page-title
          Line-height loosened on .mk-details-title (1.35)
          and .post-task title (1.3).
   ============================================================ */

/* ---------- Workroom ---------- */
.wr-head { margin-bottom: var(--space-4); }
.wr-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: var(--fs-xs); font-weight: var(--fw-semibold); background: var(--surface-muted, var(--border)); color: var(--text-soft); }
.wr-status.is-completed, .wr-status.is-approved { background: var(--brand-green-soft); color: var(--success); }
.wr-status.is-revision_requested { background: #fff4e5; color: #8a5200; }
html[data-theme="dark"] .wr-status.is-revision_requested { background: rgba(255, 170, 60, .15); color: #ffc46b; }
.wr-note { padding: var(--space-3) var(--space-4); border-inline-start: 3px solid var(--navy-800); background: var(--surface-muted, transparent); font-size: var(--fs-sm); margin: var(--space-3) 0; }
.wr-section { padding: var(--space-5) 0; border-top: 1px solid var(--border); }
.wr-section-title { margin: 0 0 var(--space-3); font-size: var(--fs-lg); }
.wr-sub { margin: var(--space-3) 0 4px; font-size: var(--fs-sm); color: var(--text-muted); }
.wr-pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 var(--space-3); }
.wr-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-top: var(--space-2); }
.wr-ms, .wr-feed, .wr-files, .wr-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.wr-ms-item { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--border); }
.wr-ms-item.is-done strong { text-decoration: line-through; opacity: .7; }
.wr-list-item { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text); text-decoration: none; min-height: 56px; }
.wr-list-item:hover { border-color: var(--brand-green); }
.wr-footer { padding-top: var(--space-5); border-top: 1px solid var(--border); }
.wr-section .textarea, .wr-section .input { width: 100%; margin-top: var(--space-2); }
.wr-row .input, .wr-row .select { width: auto; flex: 1 1 160px; margin-top: 0; }

/* ---------- Demand Radar ---------- */
.dr-range { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-3) 0; }
.dr-section { padding: var(--space-5) 0; border-top: 1px solid var(--border); }
.dr-title { margin: 0 0 4px; font-size: var(--fs-lg); }
.dr-bars { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.dr-bars li { display: grid; grid-template-columns: minmax(90px, 30%) 1fr auto; gap: var(--space-3); align-items: center; }
.dr-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-bar-track { height: 10px; border-radius: 999px; background: var(--surface-muted, var(--border)); overflow: hidden; }
.dr-bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--brand-green); }
.dr-bar-value { font-size: var(--fs-sm); color: var(--text-muted); white-space: nowrap; }
@media (max-width: 520px) { .dr-bars li { grid-template-columns: 1fr auto; } .dr-bar-track { grid-column: 1 / -1; order: 3; } }
