/* زمام — base styles shared by the site and the web app. Tokens only (design/generated/tokens.css),
   logical properties only: inline-start is the right side in Arabic. */

:root {
  color-scheme: light dark;
  accent-color: var(--brand);
  /* Layout measures, derived from the spacing tokens. */
  --gutter: var(--space-4);
  --measure: calc(var(--space-8) * 22); /* 704px: readable text column */
  --page: calc(var(--space-8) * 34); /* 1088px: page width */
  --card-min: calc(var(--space-11) * 6); /* 264px: smallest card in a grid */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-block-size: 100dvh;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-kerning: normal;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

img,
svg {
  display: block;
  max-inline-size: 100%;
}

a {
  color: var(--brand);
  text-underline-offset: 0.2em;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

/* A link styled as a design-system button keeps the button's size and alignment. */
.zm-btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  text-decoration: none;
}

/* The reference circle is 24px; its hit area grows to 44px without moving the layout. */
.zm-check {
  position: relative;
}
.zm-check::before {
  content: "";
  position: absolute;
  inset: calc((100% - var(--space-11)) / 2);
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  inline-size: 1px !important;
  block-size: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.skip-link {
  position: fixed;
  inset-block-start: var(--space-2);
  inset-inline-start: var(--space-2);
  z-index: 10;
  padding-block: var(--space-2);
  padding-inline: var(--space-4);
  min-block-size: var(--space-11);
  display: inline-flex;
  align-items: center;
  background: var(--surface-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
}

.muted {
  color: var(--ink-muted);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
