/* =====================================================================
   Base — reset, typography, RTL, boot splash
   ===================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

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

body {
  font-family: var(--font);
  font-size: var(--fs-md);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  line-height: 1.3;
  font-weight: 800;
  color: var(--ink);
}

a {
  color: var(--green);
  text-decoration: none;
}
a:hover { color: var(--green-600); }

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

button { cursor: pointer; }

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

/* Icons: sane default so an un-sized inline <svg> never falls back to the
   300×150 replaced-element default (caused horizontal overflow). Specific
   rules in components.css (.btn svg, .kpi__icon svg, …) override this. */
svg:not([width]) { width: 1.15em; height: 1.15em; flex-shrink: 0; }

ul { list-style: none; padding: 0; }

/* Numbers & latin fragments keep LTR direction inline */
.ltr,
.num {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

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

/* Scrollbar polish */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: #d8d0c0;
  border-radius: 999px;
  border: 2px solid var(--cream);
}
::-webkit-scrollbar-thumb:hover { background: #c4baa6; }

/* ------- Boot splash ------- */
.boot {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(201, 162, 39, 0.10), transparent 60%),
    linear-gradient(160deg, #0c2f2b, #15514a 60%, #103e39);
  color: var(--cream);
  z-index: 9999;
}
.boot__mark {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: grid;
  place-content: center;
  font-weight: 900;
  font-size: 1.5rem;
  color: #0c2f2b;
  background: linear-gradient(145deg, #e7c75a, var(--gold));
  box-shadow: 0 10px 30px rgba(201, 162, 39, 0.35);
}
.boot__spin {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(250, 247, 240, 0.25);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.boot__txt {
  font-size: var(--fs-sm);
  opacity: 0.85;
  letter-spacing: 0.3px;
}
@keyframes spin { to { transform: rotate(360deg); } }

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

[hidden] { display: none !important; }

/* Utilities */
.muted { color: var(--ink-faint); }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.hide-sm { }
@media (max-width: 720px) { .hide-sm { display: none !important; } }
