/* Sukun base — reset, typography, a11y primitives */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5 {
  margin: 0;
  line-height: var(--lh-tight);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 5vw, var(--fs-4xl));
}
h2 {
  font-size: clamp(1.6rem, 3.5vw, var(--fs-2xl));
}
h3 {
  font-size: var(--fs-lg);
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding-inline-start: 1.15em;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

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

button {
  cursor: pointer;
  background: none;
  border: none;
}

[hidden] {
  display: none !important;
}

/* Numerals always western, even in Arabic UI (matches the deck) */
.num,
table td,
.kpi__value {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* Focus */
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.on-dark :focus-visible {
  outline-color: #A9A2FF;
}

/* Skip link */
.skip-link {
  position: absolute;
  inset-inline-start: var(--s-4);
  top: -80px;
  z-index: var(--z-toast);
  background: var(--brand);
  color: #fff;
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-md);
  font-weight: 600;
  transition: top var(--dur) var(--ease);
}

.skip-link:focus {
  top: var(--s-4);
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s-6);
}

.stack > * + * {
  margin-block-start: var(--s-4);
}

.eyebrow {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.08em;
  margin-block-end: var(--s-3);
}

.on-dark .eyebrow {
  color: #A9A2FF;
}

.lede {
  font-size: var(--fs-md);
  color: var(--muted-strong);
  max-width: 68ch;
}

.on-dark .lede {
  color: var(--muted);
}

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

.grid {
  display: grid;
  gap: var(--s-4);
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1024px) {
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Motion */
@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;
  }
}

@media print {
  .no-print {
    display: none !important;
  }
}
