/* e'thix AI — the sign-in page (ACCOUNTS-SPEC S1, GET /signin). Its own page, no SPA.
   2026-09-30 redesign (v2): the second step of one journey (front door /welcome → sign-in → product), drawn in the front door's
   own language, so the two read as one place:
   - the same night (#0E1116), the one champagne gold, bone paper for what the product makes, the four architecture hairlines;
   - the same display type (Ethix Display) for the statement, Naskh (gold) for its second voice, Plex for the small print;
   - the front door's engine at rest (img/engine.svg: one point per article in force of the nine staged laws, Labor Law 84, 85
     and 81 lit), with the same case beside it, still (an illustration, labelled so; no control in it);
   - the form in a night glass card with the front door's moving gold edge (the ask box), Google's own button the one strong
     control; methods not available today stay drawn, disabled, and say «غير متوفر» (owner decision), as quiet tiles.
   One look in either OS theme (the front door's): the page sets its own tokens over the product's, so every shared control
   (.input, .b, .field-hint) is drawn dark here. Mobile first at 375 px, one column, 44 px targets, logical properties for
   Arabic (RTL) and English (LTR). No inline style anywhere (strict CSP; Google's button brings its own, on this page only).
   Motion: an entry, the slow orbits and the gold edge; nothing under prefers-reduced-motion. */

@property --si-ang{syntax:'<angle>';initial-value:0deg;inherits:false}

.si-page{
  --night:#0E1116;--night-2:#171C24;--night-3:#1E242E;--bone:#ECE7DE;--gold:#C9AE7E;--gold-2:#E2CCA2;--gold-3:#9A7E51;--steel:#A8B7CC;
  --disp:'Ethix Display','IBM Plex Sans Arabic',system-ui,sans-serif;--naskh:'Ethix Naskh','Noto Naskh Arabic',serif;
  --si-out:cubic-bezier(.16,1,.3,1);
  /* the product's tokens, drawn dark for this page */
  --paper:#0E1116;--paper-hi:#171C24;--paper-deep:#12161D;--surface:rgba(236,231,222,.05);--surface-2:#171C24;
  --line:rgba(236,231,222,.14);--ink:#ECE7DE;--ink-soft:rgba(236,231,222,.72);--muted:#8F97A3;
  --gold-text:#E2CCA2;--gold-deep:#C9AE7E;--danger:#E0806F;--danger-soft:rgba(224,128,111,.16);
  --g-ink:linear-gradient(135deg,#E2CCA2,#C9AE7E 55%,#B8976A);--ring:0 0 0 4px rgba(201,174,126,.18);--hair:none;--shadow-1:none;
  color-scheme:dark;
  margin:0;min-block-size:100dvh;block-size:auto;overflow:auto;overflow-x:clip;color:var(--bone);font-family:var(--ar);
  background:var(--night) url("/ethixd/img/noise-240.svg");-webkit-font-smoothing:antialiased;
}
html:has(.si-page){background:#0E1116}
html[lang="en"] .si-page{font-family:var(--lt);--disp:'Montserrat','IBM Plex Sans Arabic',system-ui,sans-serif}
.si-sprite{position:absolute;inline-size:0;block-size:0;overflow:hidden}
/* the architecture: four hairlines the length of the page, as on the front door */
.si-arch{position:fixed;inset:0;z-index:0;pointer-events:none;display:flex;justify-content:space-between;padding-inline:clamp(18px,4.2vw,64px)}
.si-arch i{inline-size:1px;block-size:100%;background:linear-gradient(to bottom,transparent,rgba(236,231,222,.05) 18%,rgba(236,231,222,.05) 82%,transparent)}

/* ── layout: form (start) · the engine and the case (end) ── */
.auth{position:relative;z-index:1;overflow-x:clip;display:grid;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);grid-template-areas:"main art";min-block-size:100dvh}
.auth-main{grid-area:main}
.auth-art{grid-area:art}

/* ── the art side: no panel, the night itself; the engine behind layered type ── */
.auth-art{position:relative;overflow:hidden;isolation:isolate;color:var(--bone);
  background:radial-gradient(52% 50% at 50% 46%,rgba(168,183,204,.1),transparent 70%),radial-gradient(30% 32% at 50% 46%,rgba(201,174,126,.1),transparent 72%)}
.auth-grain{display:none}
.si-engine{position:absolute;z-index:0;inset-block-start:42%;inset-inline-start:50%;inline-size:min(88%,640px);aspect-ratio:1;transform:translate(-50%,-54%);
  background:url("/ethixd/img/engine.svg") center/contain no-repeat;pointer-events:none;opacity:.95}
html[dir="rtl"] .si-engine{transform:translate(50%,-54%)}
.si-orbit{position:absolute;inset:6% -12%;border-radius:50%;border:1px solid rgba(201,174,126,.18);transform:rotate(-18deg) scaleY(.26)}
.si-orbit-2{inset:-2% -22%;border-color:rgba(168,183,204,.1);transform:rotate(12deg) scaleY(.34)}
.si-orbit::after{content:"";position:absolute;inset-block-start:-4px;inset-inline-start:50%;inline-size:8px;block-size:8px;border-radius:50%;background:var(--gold-2);box-shadow:0 0 16px 4px rgba(201,174,126,.6)}
.si-orbit-2::after{inline-size:6px;block-size:6px;background:var(--steel);box-shadow:0 0 12px 3px rgba(168,183,204,.5);inset-block-start:auto;inset-block-end:-3px}
.auth-art-inner{position:relative;z-index:3;block-size:100%;box-sizing:border-box;display:flex;flex-direction:column;gap:26px;padding:clamp(28px,4vh,44px) clamp(28px,4vw,64px) clamp(28px,4vh,40px)}
.auth-brand{display:inline-flex;align-items:center;gap:10px;text-decoration:none}
.si-page .wordmark{color:var(--bone)}
.auth-art .wordmark{font-size:26px}
.si-page .wordmark .tick::before{background:linear-gradient(160deg,#E2CCA2,#9A7E51)}
.si-ai{background:transparent;border:1px solid rgba(236,231,222,.3);color:rgba(236,231,222,.8);block-size:20px}
.auth-copy{margin-block-start:auto;display:grid;gap:14px;max-inline-size:34rem}
.auth-copy .kicker{margin:0;display:flex;align-items:center;gap:14px;font-size:13px;font-weight:500;color:var(--muted);letter-spacing:0}
.auth-copy .kicker::before{content:"";inline-size:32px;block-size:1px;background:var(--gold);flex:none}
html[lang="en"] .auth-copy .kicker{font-family:'Montserrat',sans-serif;font-size:11px;letter-spacing:.18em;text-transform:uppercase}
.auth-hero{margin:0;font-family:var(--disp);font-size:clamp(34px,1rem + 3.2vw,64px);line-height:1.15;font-weight:800;letter-spacing:0;text-wrap:balance;color:var(--bone);text-shadow:0 20px 60px rgba(0,0,0,.55)}
html[lang="en"] .auth-hero{letter-spacing:-.04em;line-height:1}
html .auth-art .auth-hero .grad-text{background:none;-webkit-background-clip:border-box;background-clip:border-box;color:inherit}
.auth-lead{margin:0;font-size:15.5px;line-height:1.95;color:rgba(236,231,222,.72);max-inline-size:28rem}
html[lang="en"] .auth-lead{line-height:1.7}

/* the case, still: bone paper laid over the night, like the front door's answer card */
.si-still{display:grid;gap:14px;padding:18px 20px 20px;border-radius:8px;background:var(--bone) url("/ethixd/img/noise-240.svg");color:#1D232C;max-inline-size:28rem;transform:rotate(-1.2deg);
  box-shadow:0 50px 100px -40px rgba(0,0,0,.9),0 0 0 1px rgba(201,174,126,.5),0 0 80px -20px rgba(201,174,126,.3)}
.si-still-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-block-end:12px;border-block-end:1px solid rgba(29,35,44,.12)}
.si-still-case{display:inline-flex;align-items:center;gap:9px;font-size:13px;font-weight:700;color:#7A6035}
.si-still-case::before{content:"";inline-size:7px;block-size:7px;border-radius:50%;background:#9A7E51;box-shadow:0 0 0 4px rgba(154,126,81,.18)}
.si-still-tag{font-size:11.5px;font-weight:600;color:#434C59;padding:2px 9px;border-radius:999px;background:rgba(29,35,44,.07);white-space:nowrap}
.si-still-trail{margin:0;padding:0;list-style:none;display:grid;grid-template-columns:repeat(4,1fr);position:relative}
.si-still-trail::before{content:"";position:absolute;inset-inline:12.5%;inset-block-start:10px;block-size:1.5px;background:#9A7E51}
.si-still-trail li{position:relative;display:grid;justify-items:center;gap:5px;font-size:12px;font-weight:600;color:#434C59}
.si-still-trail li::before{content:"";inline-size:21px;block-size:21px;border-radius:50%;background:#9A7E51;box-shadow:0 0 0 3px var(--bone)}
.si-still-trail li::after{content:"";position:absolute;inset-block-start:5px;inline-size:5px;block-size:9px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}
.si-still-answer{display:grid;gap:6px;padding:14px 16px;border-radius:6px;background:#1D232C;color:var(--bone)}
.si-still-fig{margin:0;display:flex;align-items:baseline;gap:8px;font-size:14px;font-weight:600;color:rgba(236,231,222,.74)}
.si-still-num{font-size:34px;line-height:1.1;font-weight:700;color:var(--bone);font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.si-still-text{margin:0;font-size:13.5px;line-height:1.8;color:var(--bone)}
.si-still-cites{margin:4px 0 0;display:flex;flex-wrap:wrap;gap:6px}
.si-still-cites span{font-family:var(--naskh);font-size:12.5px;font-weight:600;color:var(--gold-2);padding:3px 10px;border-radius:999px;border:1px solid rgba(226,204,162,.35)}
.si-art-source{margin:0;font-size:12px;line-height:1.7;color:#A3ABB7;max-inline-size:30rem}

/* ── the form column ── */
.auth-main{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;padding:24px 32px calc(20px + env(safe-area-inset-bottom));position:relative;outline:none;min-inline-size:0}
.auth-top{inline-size:100%;max-inline-size:460px;display:flex;flex-direction:column;align-items:center;gap:6px;min-block-size:44px}
.si-tagline{display:none;margin:0;font-size:13px;font-weight:500;color:var(--muted);text-align:center}
.auth-brand-sm{display:none}
.auth-brand-sm .wordmark{font-size:24px}
.auth-card{position:relative;box-sizing:border-box;inline-size:100%;max-inline-size:460px;margin-block:auto;padding:38px 32px 28px;border-radius:28px;
  background:rgba(23,28,36,.9);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);
  box-shadow:0 60px 120px -50px rgba(0,0,0,.9),0 0 90px -30px rgba(201,174,126,.35)}
/* the front door's ask box edge: a gold light that travels the border */
.auth-card::before{content:"";position:absolute;inset:0;border-radius:inherit;padding:1.5px;pointer-events:none;
  background:conic-gradient(from var(--si-ang),rgba(201,174,126,.22),var(--gold-2) 12%,rgba(201,174,126,.22) 30%,rgba(168,183,204,.28) 60%,rgba(201,174,126,.22));
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0);
  animation:si-ang 7s linear infinite}
@keyframes si-ang{to{--si-ang:360deg}}
html[data-theme="dark"] .auth-card{background:rgba(23,28,36,.9)}
.auth-stage{position:relative}
.auth-step{display:grid;gap:18px}
.auth-step[hidden]{display:none}
.auth-head{text-align:center;display:grid;justify-items:center;gap:10px;margin-block-end:6px}
.auth-head h1{margin:0;font-family:var(--disp);font-size:clamp(26px,1rem + 1.4vw,32px);font-weight:800;letter-spacing:0;line-height:1.3;text-wrap:balance;color:var(--bone)}
html[lang="en"] .auth-head h1{letter-spacing:-.03em;line-height:1.15}
.auth-head p{margin:0;color:var(--muted);font-size:15px;line-height:1.7}
/* the seal: the e'thix tick in a gold ring on night */
.auth-orb{inline-size:56px;block-size:56px;border-radius:50%;display:grid;place-items:center;margin-block-end:4px;background:radial-gradient(circle at 50% 35%,#232A35,#12161D);
  box-shadow:0 0 0 1px rgba(201,174,126,.55),0 0 0 7px rgba(201,174,126,.07),0 18px 40px -14px rgba(0,0,0,.8),0 0 40px -6px rgba(201,174,126,.35)}
html[data-theme="dark"] .auth-orb{background:radial-gradient(circle at 50% 35%,#232A35,#12161D)}
.auth-orb .tick{inline-size:14px;block-size:21px}
.auth-orb .tick::before{background:linear-gradient(160deg,#E2CCA2,#9A7E51)}

/* providers: Google is the full row (its own white pill: the one bright control); the unavailable ones are quiet tiles */
.providers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.providers[hidden]{display:none}
.prov{position:relative;box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:8px;min-block-size:50px;padding:0 10px;border-radius:14px;font:inherit;
  background:rgba(236,231,222,.03);border:1px solid var(--line);font-size:13px;font-weight:600;color:var(--bone);isolation:isolate}
.prov .brand-i{inline-size:18px;block-size:18px;flex:none}
.prov [href="#b-apple"],.prov [href="#b-github"]{color:#fff}
.prov[hidden]{display:none}
.prov-live,#si-google-off{grid-column:1/-1}
.prov-live{padding:0;border:0;background:none;min-block-size:50px;display:flex;align-items:center;justify-content:center}
.prov-live[hidden]{display:none}
.si-google-btn{inline-size:100%;min-block-size:44px;display:grid;place-items:center;max-inline-size:100%;color-scheme:normal;border-radius:999px;box-shadow:0 18px 44px -18px rgba(236,231,222,.4)}
.si-google-btn:empty{box-shadow:none}
.si-google-btn[hidden]{display:none}
.prov-idle{display:flex;align-items:center;justify-content:center;gap:10px;inline-size:100%;min-block-size:50px;padding:0 12px;box-sizing:border-box;border-radius:999px;
  background:var(--bone);border:0;color:#1D232C;font-size:13.5px;font-weight:600}
.prov-idle[hidden]{display:none}
/* not available today: drawn, not clickable, no flow behind it */
.prov.is-off{cursor:not-allowed;color:var(--muted);flex-direction:column;gap:4px;padding-block:9px;background:rgba(236,231,222,.025)}
.prov.is-off .brand-i{opacity:.5;filter:grayscale(.8)}
.prov.is-off .prov-name{position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
#si-google-off.is-off{flex-direction:row;gap:10px}
#si-google-off.is-off .prov-name{position:static;inline-size:auto;block-size:auto;overflow:visible;clip:auto}
.prov-off{display:inline-flex;align-items:center;block-size:18px;padding:0 7px;border-radius:999px;font-size:10.5px;font-weight:700;line-height:1;white-space:nowrap;letter-spacing:0;
  background:rgba(236,231,222,.07);color:var(--muted)}
.prov-off[hidden]{display:none}
.si-status{margin:0;font-size:13px;line-height:1.6;color:var(--muted);text-align:center}
.si-status[hidden]{display:none}

.auth-or{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:12.5px;font-weight:600}
.auth-or::before,.auth-or::after{content:"";flex:1;block-size:1px;background:var(--line)}
.auth-or[hidden]{display:none}
.auth-form{display:grid;gap:12px}
.auth-form[hidden]{display:none}
.si-page .input{background:rgba(236,231,222,.04);border-color:var(--line);color:var(--bone)}
.si-page .input:focus{border-color:var(--gold);box-shadow:var(--ring)}
.input-lg{min-block-size:52px;font-size:16px;border-radius:14px}
.si-page .b-dark{background:var(--g-ink);color:#15181E;box-shadow:0 18px 50px -16px rgba(201,174,126,.6),inset 0 1px 0 rgba(255,255,255,.35)}
.si-page .b-ghost{color:var(--bone);background:transparent;border:1px solid var(--line);box-shadow:none}
.auth-consent{display:grid;gap:10px;padding-block-start:14px;border-block-start:1px solid var(--line)}
.auth-fine{margin:0;font-size:12.5px;line-height:1.75;color:var(--muted);text-align:center}
.auth-fine a{color:var(--gold-2);font-weight:600;text-decoration:underline;text-underline-offset:2px}
.auth-legal{display:flex;gap:4px 8px;flex-wrap:wrap;justify-content:center;align-items:center;font-size:12.5px;color:#5F6874;margin-block-start:18px;max-inline-size:460px}
.auth-legal a{text-decoration:none;color:var(--muted);padding-block:12px;min-block-size:44px;box-sizing:border-box;display:inline-flex;align-items:center}
@media (hover:hover){.auth-legal a:hover{color:var(--gold-2);text-decoration:underline;text-underline-offset:3px}}
.auth-legal [hidden]{display:none}
/* Stage 5 visual review: on a narrow screen the links wrap, so a separator dot can start a line; the gap alone separates them there */
@media (max-width:560px){.auth-legal{gap:0 18px}.auth-legal > span{display:none}}
html[dir="rtl"] .flip-rtl use{transform:scaleX(-1);transform-box:fill-box;transform-origin:center}

/* ── what the sign-in itself needs on top ── */
.si-sub{margin:0}
.si-h2{margin:0;font-family:var(--disp);font-weight:800;font-size:20px;line-height:1.4;color:var(--bone)}
.si-notice{display:grid;gap:8px;padding:12px 14px;border:1px solid rgba(201,174,126,.45);border-radius:14px;background:rgba(201,174,126,.08);color:var(--bone);font-size:14px;line-height:1.7}
.si-notice[hidden]{display:none}
.si-email{display:grid;gap:16px}
.si-email[hidden]{display:none}
.si-form{gap:14px}
.si-form .b{min-block-size:52px}
.si-form .b .prov-off{margin-inline:8px}
.si-sent{margin:0;font-size:14px;line-height:1.75;color:var(--ink-soft)}
.si-code{font-family:var(--mono,ui-monospace,Consolas,monospace);font-size:22px;letter-spacing:.32em;text-align:center}
.si-code::placeholder{letter-spacing:normal}
.si-code-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between}
.si-code-actions .b{flex:1 1 140px;min-block-size:44px}
/* the e-mail method while e-mail is off: drawn as what it is, one disabled method like the tiles above */
.si-email.is-off .field{display:none}
.si-page .si-email.is-off .si-form .b{min-block-size:50px;cursor:not-allowed;background:rgba(236,231,222,.025);color:var(--muted);box-shadow:none;border:1px solid var(--line);font-size:13.5px}
.si-email.is-off .si-form .b .i{display:none}

.si-error{margin:0;min-block-size:1.4em;font-size:14px;line-height:1.6;color:var(--danger);font-weight:600;text-align:center}
.si-error:empty{min-block-size:0;margin-block:-9px}
.si-busy{margin:0;font-size:14px;color:var(--ink-soft);text-align:center}
.si-busy[hidden]{display:none}
.si input[aria-invalid="true"]{border-color:var(--danger)}
.si-link{color:var(--gold-2);font-weight:600;text-underline-offset:3px;display:inline-block;min-block-size:44px;line-height:44px}
.si-link:focus-visible,.si input:focus-visible,.si .b:focus-visible,.auth-legal a:focus-visible,.auth-brand:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.si-noscript{margin:0;padding:16px;text-align:center;color:var(--bone)}

/* entry: the card rises, the statement is set, the engine assembles out of the dark */
@keyframes si-rise{from{opacity:0;transform:translateY(18px)}}
@keyframes si-in{from{opacity:0}}
@keyframes si-engine-in{from{opacity:0;scale:.9}}
@keyframes si-still-in{from{opacity:0;transform:translateY(24px) rotate(-4deg)}}
@keyframes si-orbit{to{rotate:360deg}}
.auth-card{animation:si-rise .9s var(--si-out) .1s both}
.auth-top,.auth-legal{animation:si-in .8s ease .3s both}
.si-engine{animation:si-engine-in 1.8s var(--si-out) both}
.auth-copy{animation:si-rise 1s var(--si-out) .35s both}
.si-still{animation:si-still-in 1.1s var(--si-out) .6s both}
.si-orbit{animation:si-orbit 40s linear infinite}
.si-orbit-2{animation-duration:64s;animation-direction:reverse}

@media (max-width:1100px){.auth{grid-template-columns:minmax(0,1fr) minmax(0,.9fr)}.si-still{display:none}.auth-copy{margin-block:auto}}
/* phones: one column; the engine rises behind the brand as the page's one image */
@media (max-width:820px){
  .auth{grid-template-columns:minmax(0,1fr);grid-template-areas:"main"}
  .auth-art{display:none}
  .si-arch i:nth-child(2),.si-arch i:nth-child(3){display:none}
  .auth-brand-sm{display:inline-flex}
  .auth-main{padding-inline:16px}
  .si-page .auth-main{isolation:isolate}
  .auth-main::before{content:"";position:absolute;z-index:-1;inset-block-start:-60px;inset-inline-start:50%;inline-size:min(100vw,480px);aspect-ratio:1;transform:translateX(-50%);
    background:url("/ethixd/img/engine.svg") center/contain no-repeat;opacity:.5;pointer-events:none;
    -webkit-mask-image:linear-gradient(to bottom,#000 30%,transparent 78%);mask-image:linear-gradient(to bottom,#000 30%,transparent 78%)}
  html[dir="rtl"] .auth-main::before{transform:translateX(50%)}
  .auth-top{justify-content:center;min-block-size:56px;margin-block:4px 10px}
  .si-tagline{display:block}
  .auth-card{padding:30px 20px 22px;border-radius:24px;margin-block:clamp(40px,14vh,120px) auto}
  .auth-head h1{font-size:26px}
}
@media (max-width:359px){.auth-main{padding-inline:12px}.auth-card{padding-inline:14px}.providers{gap:6px}}
@media (max-height:640px) and (min-width:821px){.si-still{display:none}}
@media (prefers-reduced-motion:reduce){.si-page *,.si-page *::before,.si-page *::after{animation:none!important;transition:none!important}}
