/* Slim base stylesheet: everything the public pages (landing, pricing, faq, blog) and the app share.
   Loaded first by every page, then app.css (app, login) or public.css (+ blog.css) (Lighthouse unused-CSS fix). */
/* Tokens from docs/ux/design-system.md §3.10, values from v0.2 (§3.11). Logical properties only. */
@font-face { font-family: "Geist"; src: url("../fonts/Geist-Variable.0e46e732cced.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap; } /* SIL OFL 1.1, fonts/Geist-OFL.txt */
:root {
  /* T-AF-00: §3.10 names kept, values moved to design system v0.2 (§3.11, app-v2.css), so every
     existing page takes the deeper teal, cool neutrals and Geist before it is rebuilt. */
  --c-canvas:#EDF1F1; --c-surface:#FFFFFF; --c-sunken:#F1F4F4; --c-hover:#F2F7F7;
  --c-line-subtle:#E2E8E8; --c-line:#CDD6D6; --c-line-strong:#7E9092;
  --c-text:#0E1D21; --c-text-2:#43555A; --c-text-3:#5A6C71; --c-text-inverse:#FFFFFF;
  --c-primary-50:#EFF7F7; --c-primary-100:#DCEFEE; --c-primary-500:#0F6B74;
  --c-primary-600:#0C5660; --c-primary-700:#0A434C;
  --c-success:#17663F; --c-success-tint:#E3F2EA;
  --c-danger:#A8261D; --c-danger-tint:#FBE9E7;
  --c-warning:#7D5200; --c-warning-tint:#FBF0D9; --c-warning-line:#E9C982;
  --c-info:#0C5660; --c-info-tint:#EFF7F7; --c-focus-inner:#FFFFFF;
  --c-pencil-text:#4F5F64; --c-pencil-line:#93A3A6; --pencil-angle:135deg;
  --pencil-hatch:repeating-linear-gradient(var(--pencil-angle),rgba(79,95,100,.07) 0 1px,#FFFFFF 1px 6px);
  --f-ui:"Geist","IBM Plex Sans Arabic","Noto Sans Arabic",system-ui,"Segoe UI",Tahoma,sans-serif;
  --f-num:"Geist","IBM Plex Sans",system-ui,"Segoe UI",Tahoma,sans-serif;
  --fs-xs:12px; --fs-sm:13px; --fs-base:14px; --fs-md:15.5px; --fs-lg:18px; --fs-xl:24px;
  --fs-2xl:32px; --fs-display:clamp(30px, 4.6vw, 52px);
  --lh-snug:1.35; --lh-base:1.55; --lh-tight:1.25;
  --s-1:4px; --s-2:8px; --s-3:12px; --s-4:16px; --s-5:20px; --s-6:24px; --s-8:32px; --s-10:40px; --s-12:48px; --s-16:64px;
  --gap-inline:var(--s-2); --gap-stack:var(--s-3); --gap-block:var(--s-4); --gap-section:var(--s-6);
  --page-gutter:var(--s-6); --touch:44px;
  --r-1:4px; --r-2:8px; --r-3:12px; --r-4:16px;
  --row-h:36px; --ctl-h:34px; --header-h:56px;
  --elev-1:0 1px 2px rgba(6,50,58,.05),0 0 0 1px rgba(6,50,58,.04);
  --elev-2:0 8px 24px -8px rgba(6,50,58,.16),0 2px 6px rgba(6,50,58,.06);
  --elev-3:0 24px 48px -12px rgba(6,50,58,.24),0 0 0 1px rgba(6,50,58,.08);
  --m-fast:120ms ease-out; --m-base:200ms ease-out; --m-slow:320ms ease-in-out;
  --z-sticky:10; --z-popover:40; --z-dialog:50; --z-skip:100;
  --focus-ring:2px solid var(--c-primary-500);
}
:lang(ar) { --fs-xs:13px; --fs-sm:14px; --fs-base:15px; --fs-md:17px; --fs-lg:21px; --fs-xl:27px; --fs-2xl:33px; }
[dir="rtl"] { --pencil-angle:45deg; }

*, *::before, *::after { box-sizing: border-box; }
html { font-family: var(--f-ui); font-size: var(--fs-base); color: var(--c-text); background: var(--c-canvas); }
body { margin: 0; line-height: 1.5; min-block-size: 100vh; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
h1 { font-size: var(--fs-xl); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-lg); line-height: var(--lh-tight); }
h3 { font-size: var(--fs-md); line-height: var(--lh-base); }
h4 { font-size: var(--fs-base); line-height: var(--lh-base); color: var(--c-text-2); }
.stack > * + * { margin-block-start: var(--gap-stack); }
a { color: var(--c-primary-500); }
:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
/* On dark fills the 2px offset leaves a light gap, so the ring reads as a double ring. */
.btn-primary:focus-visible, .btn-danger:focus-visible { box-shadow: 0 0 0 2px var(--c-focus-inner); }
.sr-only { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted, .hint { color: var(--c-text-3); }
.hint { font-size: var(--fs-sm); margin-block: var(--s-1) 0; }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums lining-nums; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.col-num, .col-num .num { text-align: end; }
.col-num { text-align: end; }
code.sha { font-size: var(--fs-xs); }

/* wordmark */
.wordmark { display: inline-flex; align-items: baseline; gap: .45em; line-height: 1; white-space: nowrap; color: var(--c-primary-600); }
.wm-mark { inline-size: 1.7em; block-size: 1.7em; flex: none; align-self: center; }
.wm-ar { font-family: var(--f-ui); font-weight: 700; font-size: 1.35em; }
.wm-en { font-family: var(--f-num); font-weight: 400; font-size: .85em; letter-spacing: .06em; opacity: .85; unicode-bidi: isolate; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-block-size: var(--ctl-h); padding-inline: var(--s-4);
  border-radius: var(--r-2); border: 1px solid transparent; font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--c-primary-600); color: var(--c-text-inverse); }
.btn-primary:hover { background: var(--c-primary-700); }
.btn-secondary { background: var(--c-surface); color: var(--c-primary-600); border-color: var(--c-primary-600); }
.btn-secondary:hover { background: var(--c-primary-50); }
.btn-primary:active { background: var(--c-primary-700); box-shadow: inset 0 1px 2px rgba(15,23,42,.35); }
.btn-secondary:active { background: var(--c-primary-100); }
.btn-quiet { background: transparent; color: var(--c-primary-600); }
.btn-quiet:hover { background: var(--c-hover); }
.btn-quiet:active { background: var(--c-sunken); }
.btn.is-current, .btn[aria-current="true"], .btn[aria-current="page"] { background: var(--c-primary-50); color: var(--c-primary-700); box-shadow: inset 0 -2px 0 var(--c-primary-600); }
/* Disabled: sunken fill, muted text, no hover. Never rely on colour alone: the cursor changes and the text is muted. */
.btn:disabled, .btn[aria-disabled="true"], .btn:disabled:hover, .btn[aria-disabled="true"]:hover {
  background: var(--c-sunken); color: var(--c-text-3); border: 1px solid var(--c-line); box-shadow: none; cursor: not-allowed; }
.btn-small { min-block-size: 28px; padding-inline: var(--s-3); font-size: var(--fs-sm); }
/* Link-styled button (auth.css and inline forms). */
details[open] > summary.btn { background: var(--c-primary-50); color: var(--c-primary-700); border-color: var(--c-primary-600); }
summary.btn { list-style: none; } summary.btn::-webkit-details-marker { display: none; }

/* inputs */
input, select { font: inherit; color: var(--c-text); min-block-size: var(--ctl-h); padding-inline: var(--s-2);
  border: 1px solid var(--c-line-strong); border-radius: var(--r-2); background: var(--c-surface); }
input:disabled, select:disabled, textarea:disabled { background: var(--c-sunken); color: var(--c-text-3); cursor: not-allowed; }
input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: var(--c-text-3); }
input[type=checkbox], input[type=radio] { min-block-size: 0; padding: 0; accent-color: var(--c-primary-600); }
input[type=checkbox], input[type=radio] { inline-size: 1.1em; block-size: 1.1em; }

/* chip */
.chip { display: inline-block; padding: 1px var(--s-2); margin-block: 1px; margin-inline-end: var(--s-1); border: 1px solid var(--c-line); border-radius: var(--r-2); background: var(--c-surface); font-size: var(--fs-xs); color: var(--c-text); text-decoration: none; }

/* skip link */
.skip-link { position: absolute; inset-inline-start: var(--s-2); inset-block-start: -64px; z-index: var(--z-skip); padding: var(--s-2) var(--s-4);
  background: var(--c-primary-600); color: var(--c-text-inverse); border-radius: var(--r-2); text-decoration: none; }
.skip-link:focus { inset-block-start: var(--s-2); outline: 2px solid var(--c-surface); box-shadow: 0 0 0 4px var(--c-primary-600); }

/* Touch widths: 44px targets, 16px inputs (no iOS zoom on focus). Rest of this block is in app.css. */
@media (max-width: 640px) {
  :root { --ctl-h: var(--touch); }
  input, select, textarea { font-size: 16px; }
  input[type=checkbox], input[type=radio] { inline-size: 1.4em; block-size: 1.4em; }
  .btn-small { min-block-size: var(--touch); }
}
