/* Sadd — Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700&family=IBM+Plex+Sans+Arabic:wght@300;400;500;600&family=IBM+Plex+Mono:wght@400;500&family=Newsreader:ital,wght@0,400;0,500;1,400&family=Amiri:ital,wght@0,400;0,700;1,400;1,700&family=Reem+Kufi:wght@400;500;600;700&family=Aref+Ruqaa:wght@400;700&family=Lateef:wght@400;500;600;700&display=swap');

:root {
  --ink: #11141A;
  --ink-2: #1B1F26;
  --ink-3: #262B33;
  --parchment: #F4EFE6;
  --parchment-2: #ECE5D6;
  --parchment-3: #E2D9C4;
  --sage: #5C7A6A;
  --sage-2: #4A6557;
  --sage-3: #3B5446;
  --sage-tint: #A8C0B4;
  --rust: #B05D3B;
  --clay: #B05D3B;   /* alias for --rust */
  --clay-light: #D8916D;
  --hairline-d: rgba(244,239,230,0.10);
  --hairline-l: rgba(17,20,26,0.10);
  --muted-d: rgba(244,239,230,0.55);
  --muted-l: rgba(17,20,26,0.55);
  --tabular: 'Inter Tight', system-ui, sans-serif;
  --serif: 'Newsreader', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --arabic: 'IBM Plex Sans Arabic', system-ui, sans-serif;
}

* { box-sizing: border-box; }

.sadd { font-family: var(--tabular); -webkit-font-smoothing: antialiased; font-feature-settings: "ss01", "cv11"; letter-spacing: -0.01em; }
.sadd .ar { font-family: var(--arabic); letter-spacing: 0; direction: rtl; }
.sadd .mono { font-family: var(--mono); letter-spacing: 0; }
.sadd .serif { font-family: var(--serif); letter-spacing: -0.01em; }

.sadd .num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

.sadd button { font-family: inherit; cursor: pointer; border: 0; background: none; padding: 0; color: inherit; }
.sadd input, .sadd textarea { font-family: inherit; }

.sadd .hairline { height: 0.5px; background: currentColor; opacity: 0.12; }
.sadd .hairline-strong { height: 0.5px; background: currentColor; opacity: 0.22; }

/* eyebrow / footnote */
.sadd .eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.sadd .footnote {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  opacity: 0.55;
}

/* fade in */
@keyframes saddFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.sadd .fadein { animation: saddFade 320ms cubic-bezier(.2,.7,.3,1) both; }

/* shield pulse */
@keyframes shieldPulse {
  0% { box-shadow: 0 0 0 0 rgba(244,239,230,0.18); }
  100% { box-shadow: 0 0 0 22px rgba(244,239,230,0); }
}
.sadd .pulse { animation: shieldPulse 2.4s ease-out infinite; }

/* primary button */
.sadd .btn {
  height: 50px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  transition: transform .12s ease, opacity .12s ease, background .15s;
  user-select: none;
}
.sadd .btn:active { transform: scale(0.985); }
.sadd .btn[disabled] { opacity: 0.42; pointer-events: none; }

.sadd .btn-primary-d { background: var(--parchment); color: var(--ink); }
.sadd .btn-primary-d:hover { background: #fff; }
.sadd .btn-secondary-d { background: rgba(244,239,230,0.06); color: var(--parchment); border: 0.5px solid rgba(244,239,230,0.18); }

.sadd .btn-primary-l { background: var(--ink); color: var(--parchment); }
.sadd .btn-primary-l:hover { background: #000; }
.sadd .btn-secondary-l { background: rgba(17,20,26,0.04); color: var(--ink); border: 0.5px solid rgba(17,20,26,0.10); }

/* sage button */
.sadd .btn-sage { background: var(--sage); color: var(--parchment); }
.sadd .btn-sage:hover { background: var(--sage-2); }

/* inputs */
.sadd .input-d {
  background: rgba(244,239,230,0.04);
  border: 0.5px solid rgba(244,239,230,0.16);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--parchment);
  font-size: 16px;
  width: 100%;
  outline: none;
  resize: none;
  font-family: inherit;
}
.sadd .input-d:focus { border-color: rgba(244,239,230,0.34); background: rgba(244,239,230,0.06); }
.sadd .input-d::placeholder { color: rgba(244,239,230,0.35); }

.sadd .input-l {
  background: #fff;
  border: 0.5px solid rgba(17,20,26,0.12);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--ink);
  font-size: 16px;
  width: 100%;
  outline: none;
  resize: none;
  font-family: inherit;
}
.sadd .input-l:focus { border-color: rgba(17,20,26,0.32); }

/* card */
.sadd .card-d {
  background: var(--ink-2);
  border-radius: 18px;
  border: 0.5px solid rgba(244,239,230,0.06);
}
.sadd .card-l {
  background: #fff;
  border-radius: 18px;
  border: 0.5px solid rgba(17,20,26,0.06);
}

/* segmented */
.sadd .seg {
  display: flex;
  padding: 3px;
  border-radius: 10px;
}
.sadd .seg-d { background: rgba(244,239,230,0.06); border: 0.5px solid rgba(244,239,230,0.10); }
.sadd .seg-l { background: rgba(17,20,26,0.05); border: 0.5px solid rgba(17,20,26,0.06); }
.sadd .seg button {
  flex: 1;
  height: 36px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: background .12s, color .12s;
}
.sadd .seg-d button[data-on="1"] { background: var(--parchment); color: var(--ink); }
.sadd .seg-l button[data-on="1"] { background: var(--ink); color: var(--parchment); }
.sadd .seg button[data-on="0"] { color: inherit; opacity: 0.65; }

/* progress */
.sadd .progress-track {
  height: 2px;
  background: rgba(244,239,230,0.10);
  position: relative;
  overflow: hidden;
}
.sadd .progress-track-l {
  height: 2px;
  background: rgba(17,20,26,0.08);
  position: relative;
}
.sadd .progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--parchment);
  transition: width .35s cubic-bezier(.2,.7,.3,1);
}
.sadd .progress-fill-l { background: var(--ink); }

/* small chip */
.sadd .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-family: var(--mono);
  letter-spacing: 0.04em;
}
.sadd .chip-sage { background: rgba(92,122,106,0.18); color: #A8C0B4; border: 0.5px solid rgba(92,122,106,0.35); }
.sadd .chip-rust { background: rgba(176,93,59,0.16); color: #D8916D; border: 0.5px solid rgba(176,93,59,0.30); }
.sadd .chip-l { background: var(--parchment-2); color: var(--ink); border: 0.5px solid rgba(17,20,26,0.06); }

/* dot */
.sadd .dot { width: 6px; height: 6px; border-radius: 50%; }

/* tab bar */
.sadd .tabbar-d {
  display: flex;
  background: rgba(17,20,26,0.85);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border-top: 0.5px solid rgba(244,239,230,0.10);
}
.sadd .tabbar-l {
  display: flex;
  background: rgba(244,239,230,0.92);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border-top: 0.5px solid rgba(17,20,26,0.10);
}
.sadd .tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 0 22px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.sadd .tab[data-on="1"] { color: inherit; }
.sadd .tab[data-on="0"] { opacity: 0.45; }

/* striped placeholder */
.sadd .stripes {
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(244,239,230,0.04) 0 8px,
    rgba(244,239,230,0.08) 8px 16px
  );
  border: 0.5px dashed rgba(244,239,230,0.15);
}
.sadd .stripes-l {
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(17,20,26,0.03) 0 8px,
    rgba(17,20,26,0.06) 8px 16px
  );
  border: 0.5px dashed rgba(17,20,26,0.15);
}

/* keyboard caret */
@keyframes caret { 0%,49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.sadd .caret { display:inline-block; width:1.5px; height:1em; background: currentColor; vertical-align: -2px; margin-left:1px; animation: caret 1s steps(1) infinite; }

/* reduced motion — disable all animations for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .sadd .fadein   { animation: none !important; }
  .sadd .pulse    { animation: none !important; }
  .sadd .caret    { animation: none !important; opacity: 1; }
  .sadd *         { transition-duration: 0.01ms !important; }
}

/* keyboard focus ring — visible only for keyboard/non-pointer focus */
.sadd a:focus-visible,
.sadd button:focus-visible,
.sadd summary:focus-visible,
.sadd input:focus-visible,
.sadd [tabindex]:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
  border-radius: 4px;
}
