/* Arkiad design foundations. Font binaries and OFL notices are self hosted. */
@font-face {
  font-family: Vazirmatn;
  src: url('/assets/fonts/Vazirmatn-Variable.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Yekan;
  src: url('/assets/fonts/Yekan.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Lalezar;
  src: url('/assets/fonts/Lalezar-arabic.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFC, U+200C-200E;
}
:root {
  color-scheme: light;
  --font-ui: Vazirmatn, Tahoma, Arial, sans-serif;
  --font-display: Lalezar, Yekan, Vazirmatn, Tahoma, sans-serif;
  --text-scale: 1;
  --text-xs: calc(clamp(.75rem, .73rem + .08vw, .8125rem) * var(--text-scale));
  --text-sm: calc(clamp(.875rem, .85rem + .1vw, .9375rem) * var(--text-scale));
  --text-base: calc(clamp(1rem, .97rem + .1vw, 1.0625rem) * var(--text-scale));
  --text-lg: calc(clamp(1.125rem, 1.06rem + .22vw, 1.25rem) * var(--text-scale));
  --text-xl: calc(clamp(1.375rem, 1.24rem + .45vw, 1.625rem) * var(--text-scale));
  --text-2xl: calc(clamp(1.625rem, 1.4rem + .75vw, 2rem) * var(--text-scale));
  --text-display: calc(clamp(2rem, 1.6rem + 1.55vw, 3rem) * var(--text-scale));
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --ink: #193c38;
  --muted: #566d65;
  --teal: #173f3d;
  --teal-hover: #245b53;
  --teal-soft: #eaf3ee;
  --teal-ring: #bfd6c9;
  --cream: #f6f8f6;
  --paper: #fff;
  --line: #dfe7e1;
  --white: #fff;
  --accent: #8e632e;
  --accent-soft: #faf1e4;
  --red: #a32e36;
  --red-soft: #fdf0f0;
  --green: #27654c;
  --shadow: 0 8px 28px #193c3806;
  --shadow-panel: 0 20px 60px #193c3812;
  --radius-control: .875rem;
  --radius-card: 1.25rem;
  --radius-panel: 1.5rem;
  --container: 75rem;
  --gutter: clamp(1rem, 2.4vw, 2rem);
  --section-space: clamp(3rem, 5.5vw, 5.5rem);
  --sidebar-width: 16rem;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --app-header-min-height: calc(4.5rem + var(--safe-top));
  --app-header-height: var(--app-header-min-height);
  --bottom-nav-min-height: calc(4.75rem + var(--safe-bottom));
  --bottom-nav-height: var(--bottom-nav-min-height);
}
html {
  font-size: 100%;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
  scroll-padding-block-start: calc(var(--app-header-height) + 1.5rem);
  scroll-behavior: smooth;
}
html[data-text-size='large'] { --text-scale: 1.15; }
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-inline-size: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--font-ui);
  font-size: var(--text-base);
  font-synthesis: none;
  line-height: 1.9;
  overflow-wrap: break-word;
}
button, input, select, textarea { font: inherit; color: inherit; }
button, a, summary, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a, summary { touch-action: manipulation; }
button { cursor: pointer; border: 0; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.65; letter-spacing: 0; }
h1 { font-size: var(--text-2xl); font-weight: 800; }
h2 { font-size: var(--text-xl); font-weight: 800; }
h3 { font-size: var(--text-base); font-weight: 750; }
small { font-size: var(--text-xs); }
img { max-inline-size: 100%; height: auto; }
input, textarea, select { font-size: max(1rem, var(--text-sm)); }
input[type='checkbox'], input[type='radio'] { accent-color: var(--teal); }
textarea { resize: vertical; }
button, a, input, select, textarea, summary, [tabindex] { scroll-margin-block: 6rem; }
:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
input::placeholder, textarea::placeholder { color: #6c7c73; opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); }
[dir='ltr'], bdi, code { unicode-bidi: isolate; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  inset-block-start: -10rem;
  inset-inline-start: 1rem;
  z-index: 200;
  background: var(--teal);
  color: white;
  padding: .75rem 1rem;
  border-radius: var(--radius-control);
}
.skip-link:focus { inset-block-start: calc(1rem + var(--safe-top)); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .625rem;
  min-block-size: 3rem;
  max-inline-size: 100%;
  padding: .625rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: var(--teal);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.8;
  text-align: center;
  white-space: normal;
  text-decoration: none;
  transition: background 180ms, border-color 180ms, box-shadow 180ms;
}
.btn.secondary { color: var(--teal); background: #fff; border-color: var(--line); }
.btn.ghost { color: var(--teal); background: var(--teal-soft); border-color: var(--teal-ring); }
.btn.warm { color: #775021; background: var(--accent-soft); border-color: #e9d6bb; }
.icon-button {
  display: inline-grid;
  place-items: center;
  flex: none;
  min-inline-size: 2.75rem;
  min-block-size: 2.75rem;
  padding: .5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #fff;
  color: var(--teal);
  font-size: var(--text-lg);
  line-height: 1;
}
.ui-icon { inline-size: 1.375rem; block-size: 1.375rem; flex: none; vertical-align: middle; }
.text-button { min-block-size: 2.75rem; padding: .5rem; color: var(--teal); background: none; font-size: var(--text-sm); }
.pill, .tag {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  max-inline-size: 100%;
  padding: .25rem .75rem;
  border-radius: 999px;
  background: var(--teal-soft);
  color: #385b4d;
  font-size: var(--text-xs);
  line-height: 1.8;
}
.tag { background: #f0f3f0; color: var(--muted); }
.eyebrow { font-size: var(--text-xs); color: var(--muted); margin-block-end: .375rem; }
.subtext, .source-note { color: var(--muted); font-size: var(--text-sm); line-height: 1.95; }
.subtext { margin-block-start: .5rem; }
.source-note { margin-block: 1rem; }
.surface { padding: var(--space-6); border: 1px solid var(--line); border-radius: var(--radius-card); background: #fff; margin-block-end: 1.5rem; min-inline-size: 0; }
.surface h2 { font-size: var(--text-lg); margin-block-end: .75rem; }
.form-error { color: var(--red); font-size: var(--text-sm); line-height: 1.9; }
.form-error:empty { display: none; }
.note-banner, .void-notice { padding: 1rem; border: 1px solid #eadac1; border-radius: var(--radius-control); background: var(--accent-soft); color: #795421; font-size: var(--text-sm); margin-block-start: 1rem; }
progress { inline-size: 100%; block-size: .625rem; accent-color: var(--teal); direction: rtl; }
.loader { display: block; inline-size: 2rem; block-size: 2rem; border: 3px solid var(--line); border-block-start-color: var(--teal); border-radius: 50%; animation: spin 850ms linear infinite; }
.loading { display: grid; place-content: center; gap: 1.25rem; min-block-size: 20rem; text-align: center; color: var(--muted); }
.loading .loader { margin-inline: auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (hover: hover) {
  .btn:not(:disabled):hover { background: var(--teal-hover); color: white; }
  .btn.secondary:not(:disabled):hover, .btn.ghost:not(:disabled):hover { background: var(--teal-soft); color: var(--teal); border-color: var(--teal-ring); }
  .btn.warm:not(:disabled):hover { background: #f1e3cc; color: #69451c; }
  .icon-button:not(:disabled):hover, .text-button:hover { background: var(--teal-soft); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
