* { box-sizing: border-box; }
html, body { min-height: 100%; }
/* Chromium/WebKit fill <progress> left-to-right unless direction is set explicitly on the element itself — inheriting it from an RTL ancestor is not enough. */
progress { direction: rtl; }
/* Preserve text metrics through rotation without preventing accessibility zoom. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  direction: rtl;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% -10%, var(--emerald-wash), transparent 26rem),
    radial-gradient(circle at 5% 100%, var(--gold-wash), transparent 32rem),
    var(--mineral-1000);
  color: var(--limestone-100);
  font-family: var(--font-ui);
  font-size: var(--text-md);
  line-height: 1.62;
  text-align: start;
  -webkit-font-smoothing: antialiased;
}
body::before {
  background-image: linear-gradient(var(--border-soft) 1px, transparent 1px), linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 4rem 4rem;
  content: "";
  inset: 0;
  mask-image: linear-gradient(to bottom, var(--mask-ink), transparent 65%);
  opacity: 0.28;
  pointer-events: none;
  position: fixed;
}
button, input, textarea { color: inherit; font: inherit; }
button { border: 0; cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--emerald-300);
  outline-offset: 3px;
}
button:disabled { cursor: not-allowed; opacity: 0.5; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-weight: 620; letter-spacing: -0.03em; }
h1 { font-size: var(--text-lg); }
h2 { font-size: var(--text-xl); }
h3 { color: var(--limestone-300); font-size: var(--text-xs); font-weight: 650; letter-spacing: 0.04em; }
small { color: var(--mineral-300); display: block; font-size: var(--text-xs); }
code { font-family: var(--font-mono); }
[data-icon] { align-items: center; display: inline-flex; flex: none; justify-content: center; }
[data-icon] svg { height: 1.05rem; stroke-width: 1.75; width: 1.05rem; }
[hidden], .is-hidden { display: none !important; }
.skip-link {
  background: var(--emerald-900);
  border: 1px solid var(--emerald-glow);
  border-radius: var(--radius-pill);
  color: var(--limestone-100);
  inset-block-start: 1rem;
  padding: var(--space-2) var(--space-4);
  position: absolute;
  inset-inline-start: 1rem;
  transform: translateY(calc(-100% - 2rem));
  transition: transform var(--duration-fast) var(--ease-out);
  z-index: 99;
}
.skip-link:focus { transform: translateY(0); }
.eyebrow { color: var(--emerald-300); display: block; font-size: var(--text-xs); font-weight: 650; margin-block-end: var(--space-1); }
.sadeed-sigil {
  align-items: center;
  background: linear-gradient(145deg, var(--emerald-300), var(--emerald-600));
  clip-path: polygon(25% 4%, 75% 4%, 98% 50%, 75% 96%, 25% 96%, 2% 50%);
  color: var(--mineral-1000);
  display: inline-flex;
  flex: none;
  font-size: 1.35rem;
  font-weight: 800;
  height: 2.75rem;
  justify-content: center;
  line-height: 1;
  position: relative;
  text-shadow: 0 1px var(--highlight-soft);
  width: 2.75rem;
}
.sadeed-sigil::after { border: 1px solid var(--seal-border); clip-path: inherit; content: ""; inset: 0.28rem; position: absolute; }
.sadeed-sigil.compact { font-size: 1rem; height: 2rem; width: 2rem; }
.icon-button {
  align-items: center; background: transparent; border-radius: var(--radius-sm); color: var(--mineral-300); display: inline-flex; height: 2.35rem; justify-content: center; transition: background var(--duration-fast), color var(--duration-fast), transform var(--duration-fast); width: 2.35rem;
}
.icon-button:hover { background: var(--mineral-750); color: var(--limestone-100); transform: translateY(-1px); }
.button { align-items: center; border-radius: var(--radius-sm); display: inline-flex; font-size: var(--text-sm); font-weight: 650; justify-content: center; min-height: 2.6rem; padding-inline: var(--space-5); }
.button.primary { background: var(--emerald-400); color: var(--mineral-1000); }.button.primary:hover { background: var(--emerald-300); }
.button.secondary { background: var(--mineral-750); color: var(--limestone-200); }.button.secondary:hover { background: var(--mineral-700); }
::-webkit-scrollbar { height: 0.5rem; width: 0.5rem; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--mineral-700); border: 2px solid transparent; border-radius: var(--radius-pill); background-clip: padding-box; }
