/* ==========================================================================
   BeeTool — Design System
   Brand: yellow + white + black (bee), diagonal corner-cut cards,
   honeycomb loader, underline motif. No inline event handlers used anywhere.
   ========================================================================== */

:root {
  /* Brand palette */
  --yellow: #FFD43B;
  --yellow-strong: #F5B800;
  --yellow-soft: #FFF8D6;
  --white: #FFFFFF;
  --ink: #171717;
  --ink-soft: #5F5F5F;
  --border: #E8E4D8;
  --success: #168A52;
  --error: #C9362B;
  --success-bg: #EAF6EF;
  --error-bg: #FCEBE9;

  /* Derived */
  --shadow-sm: 0 1px 2px rgba(23,23,23,0.06);
  --shadow-md: 0 6px 20px rgba(23,23,23,0.08);
  --shadow-yellow: 0 6px 18px rgba(245,184,0,0.25);
  --radius-sm: 8px;
  --radius-md: 14px;
  --cut: 18px; /* diagonal corner-cut size, brand signature */

  /* Type */
  --font-en: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-ar: "Noto Sans Arabic", "Inter", "Segoe UI", sans-serif;
  --font: var(--font-en);

  --container: 1180px;
}

[dir="rtl"] {
  --font: var(--font-ar);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: currentColor;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: 10px 16px;
  z-index: 200;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Focus states ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--yellow-strong);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.9rem, 3.4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.4rem); }
p { margin: 0 0 1em; color: var(--ink-soft); }

.section-heading {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: 44px;
}
.section-heading h2 { color: var(--ink); }
.section-heading p { font-size: 1.05rem; }

/* Brand underline motif */
.underline {
  display: inline-block;
  position: relative;
}
.underline::after {
  content: "";
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: -0.14em;
  height: 0.32em;
  background: var(--yellow);
  border-radius: 3px;
  transform: rotate(-0.6deg);
  z-index: -1;
}
.underline-wrap { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--yellow-strong);
  background: var(--yellow-soft);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
}

/* ==========================================================================
   Buttons — signature diagonal corner cut
   ========================================================================== */
.btn {
  --cutc: var(--cut);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 26px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  clip-path: polygon(0 0, calc(100% - var(--cutc)) 0, 100% var(--cutc), 100% 100%, 0 100%);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
[dir="rtl"] .btn {
  clip-path: polygon(var(--cutc) 0, 100% 0, 100% 100%, 0 100%, 0 var(--cutc));
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--yellow);
  border-color: var(--yellow-strong);
  color: var(--ink);
}
.btn-primary:hover { background: var(--yellow-strong); box-shadow: var(--shadow-yellow); }

.btn-dark {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}
.btn-dark:hover { background: #2b2b2b; }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); }

.btn-sm { min-height: 40px; padding: 8px 18px; font-size: 0.9rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(1.1) blur(6px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-mark {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-name {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--ink);
}
.brand-name .accent { color: var(--yellow-strong); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.nav-item { position: relative; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-link:hover { background: var(--yellow-soft); }
.nav-link .icon { width: 16px; height: 16px; }

.dropdown-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 260px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 10px;
  display: none;
  z-index: 50;
}
[dir="rtl"] .dropdown-panel { left: auto; right: 0; }
.nav-item.open .dropdown-panel { display: block; }
.dropdown-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
}
.dropdown-link:hover { background: var(--yellow-soft); }
.dropdown-link .icon { width: 20px; height: 20px; color: var(--yellow-strong); margin-top: 2px; flex-shrink: 0; }
.dropdown-link-body { display: flex; flex-direction: column; gap: 2px; }
.dropdown-link-body strong { font-size: 0.92rem; }
.dropdown-link-body span { font-size: 0.8rem; color: var(--ink-soft); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lang-switch {
  display: flex;
  align-items: center;
  border: 2px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
}
.lang-switch button {
  border: none;
  background: var(--white);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 8px 14px;
  cursor: pointer;
  min-height: 40px;
}
.lang-switch button[aria-pressed="true"] {
  background: var(--yellow);
}

.menu-toggle {
  display: none;
  border: 2px solid var(--ink);
  background: var(--white);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-menu { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  background: var(--yellow-soft);
  border-bottom: 1px solid var(--border);
  padding: 64px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset-inline-end: -60px;
  top: -60px;
  width: 260px;
  height: 260px;
  background: var(--yellow);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  opacity: 0.35;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.hero h1 { margin-bottom: 0.5em; }
.hero-sub {
  font-size: 1.12rem;
  max-width: 620px;
  margin: 0 auto 28px;
}
.hero-badge-row {
  display: flex;
  justify-content: center;
  margin-bottom: 26px;
}

.tool-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 6px 8px 6px 20px;
  max-width: 560px;
  margin: 0 auto 22px;
  box-shadow: var(--shadow-sm);
}
[dir="rtl"] .tool-search { padding: 6px 20px 6px 8px; }
.tool-search .icon { color: var(--ink-soft); }
.tool-search input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: var(--font);
  background: transparent;
  min-width: 0;
}
.tool-search button {
  min-height: 40px;
}

.search-results-list {
  max-width: 560px;
  margin: 0 auto 22px;
  text-align: start;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.search-results-list:empty { display: none; }
.search-results-list a {
  display: block;
  padding: 12px 18px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.search-results-list a:last-child { border-bottom: none; }
.search-results-list a:hover { background: var(--yellow-soft); }
.search-empty {
  padding: 14px 18px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.hero-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
}
.chip:hover { border-color: var(--yellow-strong); background: var(--yellow-soft); }

/* Privacy badge, used across site */
.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--white);
  padding: 9px 16px 9px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}
[dir="rtl"] .privacy-badge { padding: 9px 12px 9px 16px; }
.privacy-badge .icon { color: var(--yellow); width: 18px; height: 18px; }

/* Small inline privacy note near uploads */
.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--yellow-soft);
  border: 1px solid var(--border);
  border-inline-start: 4px solid var(--yellow-strong);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--ink);
  margin: 16px 0;
}
.privacy-note .icon { color: var(--yellow-strong); width: 20px; height: 20px; margin-top: 1px; }

/* ==========================================================================
   Category filters
   ========================================================================== */
.filter-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.filter-btn {
  border: 2px solid var(--border);
  background: var(--white);
  padding: 9px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--ink);
}
.filter-btn[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

/* ==========================================================================
   Tool cards — signature diagonal cut, utility label
   ========================================================================== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.tool-card {
  --cutc: 26px;
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  padding: 26px 24px 24px;
  clip-path: polygon(0 0, calc(100% - var(--cutc)) 0, 100% var(--cutc), 100% 100%, 0 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  text-decoration: none;
  color: var(--ink);
}
[dir="rtl"] .tool-card {
  clip-path: polygon(var(--cutc) 0, 100% 0, 100% 100%, 0 100%, 0 var(--cutc));
}
.tool-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.tool-card::after {
  content: "";
  position: absolute;
  inset-inline-end: 0;
  top: 0;
  width: var(--cutc);
  height: var(--cutc);
  background: var(--yellow);
}
.tool-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--yellow-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.tool-icon-box .icon { width: 28px; height: 28px; }
.tool-card h3 { margin-bottom: 0; }
.tool-card .tool-desc { margin-bottom: 0; font-size: 0.92rem; }
.tool-formats {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  text-transform: uppercase;
}
.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
  gap: 10px;
}
.tool-privacy-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--success);
}
.tool-privacy-tag .icon { width: 14px; height: 14px; }
.tool-card .btn { min-height: 40px; padding: 8px 16px; font-size: 0.85rem; }

.utility-label {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--yellow-strong);
  background: var(--yellow-soft);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 5px;
}

/* ==========================================================================
   Sections generic
   ========================================================================== */
.section { padding: 72px 0; }
.section-alt { background: var(--yellow-soft); }
.section-tight { padding: 48px 0; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.feature-list .icon { color: var(--yellow-strong); width: 22px; height: 22px; margin-top: 2px; }
.feature-list strong { display: block; }
.feature-list span { color: var(--ink-soft); font-size: 0.92rem; }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}
.step-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  position: relative;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--yellow);
  font-weight: 800;
  margin-bottom: 12px;
}

/* Benefits grid */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}
.benefit-card {
  text-align: center;
  padding: 22px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
}
.benefit-card .tool-icon-box { margin: 0 auto 14px; }

/* Related tools */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

/* ==========================================================================
   FAQ accordion
   ========================================================================== */
.faq-list { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: var(--white);
  border: none;
  text-align: start;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  color: var(--ink);
}
.faq-question:hover { background: var(--yellow-soft); }
.faq-question .icon { flex-shrink: 0; transition: transform 0.2s ease; color: var(--yellow-strong); }
.faq-item[data-open="true"] .faq-question .icon { transform: rotate(180deg); }
.faq-answer {
  display: none;
  padding: 0 20px 18px;
  color: var(--ink-soft);
}
.faq-item[data-open="true"] .faq-answer { display: block; }

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumb a { text-decoration: none; color: var(--ink-soft); font-weight: 600; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-inline-start: 6px; color: var(--border); }
[dir="rtl"] .breadcrumb li:not(:last-child)::after { content: "\\"; }

/* ==========================================================================
   Tool page layout
   ========================================================================== */
.tool-hero {
  padding: 36px 0 8px;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.tool-hero .eyebrow { margin-bottom: 14px; }

.workspace {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

/* Dropzone — distinctive patterned upload border */
.dropzone {
  border: 3px dashed var(--yellow-strong);
  border-radius: var(--radius-md);
  background:
    repeating-linear-gradient(135deg, var(--yellow-soft) 0 14px, var(--white) 14px 28px);
  padding: 44px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dropzone:hover, .dropzone.drag-over {
  border-color: var(--ink);
  background: var(--yellow-soft);
}
.dropzone-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dropzone-icon .icon { width: 30px; height: 30px; }
.dropzone h3 { margin-bottom: 6px; }
.dropzone p { margin-bottom: 14px; font-size: 0.9rem; }
.dropzone input[type="file"] {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.dropzone-hint { font-size: 0.78rem; color: var(--ink-soft); }

/* Selected files list */
.file-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.file-row.is-dragging { opacity: 0.5; }
.file-row .drag-handle { cursor: grab; color: var(--ink-soft); flex-shrink: 0; }
.file-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--yellow-soft);
}
.file-meta { flex: 1; min-width: 0; }
.file-name {
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-sub { font-size: 0.8rem; color: var(--ink-soft); }
.file-remove {
  background: none;
  border: none;
  color: var(--error);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.file-remove:hover { background: var(--error-bg); }
.file-remove .icon { width: 18px; height: 18px; }

/* Settings panel */
.settings-panel {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 20px;
}
.field-group { display: grid; gap: 8px; }
.field-label {
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.field-hint { font-size: 0.8rem; color: var(--ink-soft); margin: 0; }

input[type="range"] {
  width: 100%;
  accent-color: var(--yellow-strong);
  height: 6px;
}
input[type="text"], input[type="number"], input[type="email"], select, textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  min-height: 44px;
  background: var(--white);
  color: var(--ink);
}
textarea { min-height: 120px; }

.radio-card-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.radio-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.radio-card:has(input:checked) {
  border-color: var(--yellow-strong);
  background: var(--yellow-soft);
}
.radio-card input { margin-top: 3px; accent-color: var(--yellow-strong); }
.radio-card strong { display: block; font-size: 0.9rem; }
.radio-card span { font-size: 0.78rem; color: var(--ink-soft); }

.color-swatch-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.color-swatch {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  padding: 0;
}
.color-swatch[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--yellow); }
.color-swatch-custom {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  padding: 0;
  overflow: hidden;
}

.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; }
.checkbox-row input { width: 18px; height: 18px; accent-color: var(--yellow-strong); }

/* Action bar */
.action-bar {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Before / After comparison slider (Remove Background)
   ========================================================================== */
.ba-wrap { display: none; }
.ba-wrap.is-visible { display: block; }
.ba-media {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: 70vh;
  margin: 0 auto;
  /* Overridden inline (in px) once an image loads, so the box takes the
     photo's own proportions instead of a generic fixed shape. */
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #e8e4d8 25%, transparent 25%),
    linear-gradient(-45deg, #e8e4d8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e8e4d8 75%),
    linear-gradient(-45deg, transparent 75%, #e8e4d8 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}
.ba-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.ba-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--white);
  box-shadow: 0 0 0 1px var(--ink);
  transform: translateX(-50%);
  pointer-events: none;
}
.ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--ink);
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  pointer-events: none;
}
.ba-handle .icon { width: 18px; height: 18px; color: var(--ink); }
.ba-tag {
  position: absolute;
  top: 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--white);
  padding: 4px 10px;
  border-radius: 999px;
  pointer-events: none;
}
/* Physical (not logical/RTL-flipping) positions on purpose: this is a
   spatial image widget, not text, and the canvas drawing below is always
   physically left-to-right regardless of page language — using logical
   inset-inline-start/end here made the labels flip in Arabic while the
   actual pixels didn't, which is what made it look reversed. */
.ba-tag-after { left: 10px; }
.ba-tag-before { right: 10px; }
.ba-range {
  width: 100%;
  margin-top: 14px;
  accent-color: var(--yellow-strong);
}
.ba-hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 8px;
}

/* ==========================================================================
   Honeycomb / beehive loader
   ========================================================================== */
.hive-loader {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 30px 10px 34px;
}
.hive-loader.is-active { display: flex; }
.hive-grid {
  position: relative;
  width: 168px;
  /* Cell 5 sits at top:129px and is 64px tall, so the grid needs at least
     193px to contain it — it was 150px, and the bottom hexagons spilled
     out over the status text below. */
  height: 196px;
  margin-bottom: 4px;
}
.hive-cell {
  position: absolute;
  width: 56px;
  height: 64px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: var(--white);
  border: 2px solid var(--border);
  animation: hive-fill 2.6s ease-in-out infinite;
}
.hive-cell::after { content: ""; }
.hive-cell:nth-child(1) { top: 43px; left: 0; animation-delay: 0s; }
.hive-cell:nth-child(2) { top: 0; left: 56px; animation-delay: 0.18s; }
.hive-cell:nth-child(3) { top: 43px; left: 112px; animation-delay: 0.36s; }
.hive-cell:nth-child(4) { top: 86px; left: 112px; animation-delay: 0.54s; }
.hive-cell:nth-child(5) { top: 129px; left: 56px; animation-delay: 0.72s; }
.hive-cell:nth-child(6) { top: 86px; left: 0; animation-delay: 0.9s; }
.hive-cell:nth-child(7) { top: 65px; left: 56px; animation-delay: 1.08s; background: var(--ink); border-color: var(--ink); }

@keyframes hive-fill {
  0%, 100% { background: var(--white); border-color: var(--border); transform: scale(1); }
  50% { background: var(--yellow); border-color: var(--yellow-strong); transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .hive-cell { animation: none; background: var(--yellow-soft); }
}

.hive-status { font-weight: 700; font-size: 0.95rem; }
.hive-progress-text { font-size: 0.85rem; color: var(--ink-soft); }

.progress-bar-track {
  width: 100%;
  max-width: 320px;
  height: 10px;
  background: var(--yellow-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--yellow-strong);
  transition: width 0.2s ease;
}

/* ==========================================================================
   Results
   ========================================================================== */
.results-panel { margin-top: 24px; display: none; }
.results-panel.is-visible { display: block; }
.result-summary-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  padding: 18px 20px;
  background: var(--yellow-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.result-stat { display: flex; flex-direction: column; }
.result-stat .label { font-size: 0.78rem; color: var(--ink-soft); font-weight: 700; text-transform: uppercase; }
.result-stat .value { font-size: 1.25rem; font-weight: 800; }
.result-stat .value.success { color: var(--success); }

.result-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.status-message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  margin: 16px 0;
}
.status-message.success { background: var(--success-bg); color: var(--success); }
.status-message.error { background: var(--error-bg); color: var(--error); }
.status-message .icon { flex-shrink: 0; margin-top: 1px; }
.status-message[hidden] { display: none; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--ink);
  color: #d9d9d9;
  padding: 56px 0 24px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid #3a3a3a;
}
.footer-brand .brand-name { color: var(--white); }
.footer-brand p { color: #b8b8b8; font-size: 0.9rem; max-width: 280px; }
.footer-col h4 { color: var(--white); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col a { color: #b8b8b8; text-decoration: none; font-size: 0.92rem; }
.footer-col a:hover { color: var(--yellow); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 22px;
  font-size: 0.82rem;
  color: #999;
}
.footer-bottom .lang-switch { border-color: #555; }
.footer-bottom .lang-switch button { background: #222; color: #d9d9d9; }
.footer-bottom .lang-switch button[aria-pressed="true"] { background: var(--yellow); color: var(--ink); }

/* ==========================================================================
   Static content pages
   ========================================================================== */
.prose { max-width: 780px; margin: 0 auto; }
.prose h2 { margin-top: 1.6em; }
.prose ul, .prose ol { color: var(--ink-soft); padding-inline-start: 1.3em; }
.prose li { margin-bottom: 0.5em; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: start;
}
.contact-card {
  background: var(--yellow-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}

.error-page {
  text-align: center;
  padding: 100px 0;
}
.error-code {
  font-size: 6rem;
  font-weight: 800;
  color: var(--yellow-strong);
  line-height: 1;
  margin-bottom: 6px;
}

.ad-slot {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  text-align: center;
  background: var(--yellow-soft);
  margin: 24px 0;
  overflow: hidden;
}
.ad-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 10px;
}

.compat-warning {
  display: none;
  background: var(--error-bg);
  color: var(--error);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  gap: 10px;
  align-items: flex-start;
}
.compat-warning.is-visible { display: flex; }

/* Long-form bilingual prose blocks (privacy/about/terms) are authored as
   paired [lang] elements and toggled by the active document language,
   rather than routed through the data-i18n key system used for UI chrome. */
html[lang="en"] [data-lang-block="ar"] { display: none; }
html[lang="ar"] [data-lang-block="en"] { display: none; }

.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
