@font-face {
            font-family: 'tajwal'; /* Give your font any name you like */
            src: url('./fonts/Tajawal-Medium.ttf') format('truetype');
            font-weight: normal;
            font-style: normal;
}


:root {
  --bg: #fff;
  --fg: #1d2b2a;
  --mute: #5f6f6e;
  --card: #f3f8f7;
  --line: #dde8e6;
  --brand: #0e8d5f;
  --on: #fff;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101615;
    --fg: #e8f1f0;
    --mute: #9bb0ae;
    --card: #18221f;
    --line: #273634;
    --brand: #0e8d5f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101615;
  --fg: #e8f1f0;
  --mute: #9bb0ae;
  --card: #18221f;
  --line: #273634;
  --brand: #0e8d5f;
  color-scheme: dark;
}
*,
*::before,
*::after {
  box-sizing: inherit;
}
[hidden] {
  display: none !important;
}
html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
}
body {
  margin: 0;
  min-height: 100dvh;
  /* display: flex; */
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: 'tajwal', sans-serif;

}
nav {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 16px;
  max-width: 960px;
  margin: auto;
}
nav > div {
  display: flex;
  gap: 10px;
}
main {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 8px 16px 32px;
  text-align: center;
}
.b {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: #ffffff;
  color: #000000;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}
.b:hover {
  filter: brightness(1.08);
}
.b:focus-visible,
.mn:focus-visible,
.s:focus-visible,
#lm button:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}
svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#logo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--card);
  /* border: 3px solid var(--brand); */
}
h1 {
  margin: 14px 0 24px;
  font-size: clamp(1.5rem, 5vw, 2rem);
}
h2 {
  font-size: 1.1rem;
  text-align: start;
  margin: 0 0 10px;
}
.mn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  margin-bottom: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-weight: 300;
  font-size: 1.2rem;
  color: inherit;
  text-decoration: none;
  text-align: start;
}
.mn:hover {
  border-color: var(--brand);
}
.mn svg {
  color: var(--brand);
  flex: none;
}
button.mn {
  width: 100%;
  justify-content: center;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
[dir="rtl"] .mn svg,
[dir="rtl"] #bk svg {
  transform: scaleX(-1);
}
#err {
  color: var(--mute);
  margin: 0 0 14px;
}

/* loading skeleton */
.sk {
  display: block;
  background: linear-gradient(
    90deg,
    var(--card) 25%,
    var(--line) 50%,
    var(--card) 75%
  );
  background-size: 200% 100%;
  animation: sh 1.2s linear infinite;
  border-radius: 14px;
}
.sk.c {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  margin: 0 auto 14px;
}
.sk.l {
  width: 55%;
  height: 28px;
  margin: 0 auto 24px;
}
.sk.r {
  height: 54px;
  margin-bottom: 10px;
}
@keyframes sh {
  to {
    background-position: -200% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sk {
    animation: none;
  }
}

/* footer */
footer {
  width:99%;
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px 24px;
  text-align: center;
  border-top: 1px solid var(--line);
}
.soc {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.soc:not(:empty) {
  margin-bottom: 16px;
}
#copy {
  margin: 0;
  font-size: 0.85rem;
  color: var(--mute);
}

/* language menu */
.lw {
  position: relative;
  display: flex;
}
#lm {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  display: none;
  flex-direction: column;
  min-width: 130px;
  padding: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 24px #0003;
  z-index: 5;
}
#lm.o {
  display: flex;
}
#lm button {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  text-align: start;
}
#lm button:hover,
#lm button[aria-checked="true"] {
  background: var(--card);
  color: var(--brand);
}

/* info modal */
dialog {
  border: 0;
  border-radius: 18px;
  padding: 0;
  width: min(92vw, 420px);
  background: var(--bg);
  color: var(--fg);
  box-shadow: 0 10px 40px #0005;
}
dialog::backdrop {
  background: #0008;
}
.m {
  padding: 20px;
  max-height: 80vh;
  overflow: auto;
}
.m h3 {
  margin: 0 0 4px;
  font-size: 1.3rem;
}
.m dl {
  margin: 0;
}
.m dt {
  font-weight: 600;
  margin-top: 12px;
  color: var(--brand);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.m dd {
  margin: 2px 0 0;
}
.x {
  float: inline-end;
  width: 36px;
  height: 36px;
}
