/* The door's pages in the language of jolaws.com. Values are the site's own (tokens.css is a trimmed
   copy of ~/dev/jo-law-landing-redesign/app/static/css/site.css@7c7b6e8); the components below keep the
   site's exact values: .bar, .brand i, .btn, .pill, .field, .form, .card.
   Differences from the site, on purpose:
   - .bar is ALWAYS glass. The site turns glass once content scrolls under the bar, with a script; the
     consent page runs no script (its CSP allows none), so the bar is glass from the first paint.
   - .chip is the door's MENU-NAME chip (the «Settings > Connectors» names in the connect steps), not the
     site's status chip (.chip.ok / .amend / .gone / .pend / .temp). Do not copy the site's chip rules here.
   - .linkbox and .section are the door's own: the connector link with its copy button, and the account
     page's label column beside a body column.
   Type: h1 is --t-h2 (the start page's h1 is the hero, --t-h1); section titles --t-h3.
   Every control is at least 44px tall. No inline styles anywhere: the CSP is style-src 'self'. */

/* ===== Base ===== */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-padding-top:72px}
body{margin:0;background:var(--page);color:var(--ink);font:400 var(--t-body)/1.75 var(--ui);letter-spacing:0;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
p,h1,h2,h3,ol,ul,dl,dd{margin:0}
ol,ul{padding:0;list-style:none}
a{color:var(--blue-ink);text-decoration:none}
a:hover{text-decoration:underline;text-underline-offset:3px}
button,input{font:inherit;color:inherit}
button{background:none;border:0;padding:0;cursor:pointer;text-align:start}
:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
[hidden]{display:none!important}
::selection{background:color-mix(in srgb,var(--blue) 22%,transparent)}
::placeholder{color:var(--ink-2);opacity:1}
bdi{unicode-bidi:isolate}
h1{font-size:var(--t-h2);line-height:1.2;font-weight:800;text-wrap:balance}
h2{font-size:var(--t-h3);line-height:1.3;font-weight:800}
h3{font-size:var(--t-body);line-height:1.5;font-weight:700}
.wrap{max-width:1200px;margin-inline:auto;padding-left:max(var(--gut),env(safe-area-inset-left,0px));padding-right:max(var(--gut),env(safe-area-inset-right,0px))}
/* A surface: white (dark: #1C1C1E) with the ring shadow */
.card{background:var(--card);border-radius:var(--r-lg);box-shadow:var(--ring)}

/* ===== The bar: always Liquid Glass ===== */
body::before{content:"";position:fixed;inset:0 0 auto;height:env(safe-area-inset-top,0px);z-index:31;background:var(--page)}
.bar{position:sticky;top:env(safe-area-inset-top,0px);z-index:30;background:var(--glass);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);border-bottom:1px solid var(--rule);box-shadow:var(--glass-rim)}
.bar .wrap{height:56px;display:flex;align-items:center;gap:4px}
.brand{font-weight:800;font-size:var(--t-body);color:var(--ink);white-space:nowrap;margin-inline-end:auto;min-height:44px;display:inline-flex;align-items:center;gap:10px}
.brand:hover{text-decoration:none}
.brand i{width:22px;height:22px;border-radius:6px;background:var(--ink);position:relative;flex:none}
.brand i::after{content:"";position:absolute;inset:6px 5px auto;height:1.5px;background:var(--page);box-shadow:0 4px 0 var(--page),0 8px 0 var(--blue)}

/* ===== Buttons: .btn the primary capsule, .pill the quiet one ===== */
.btn{min-height:50px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding-inline:28px;border-radius:25px;background:var(--blue);color:var(--on-blue);font-weight:700;transition:filter .15s}
.btn:hover{text-decoration:none;filter:brightness(1.08)}.btn:active{filter:brightness(.92)}
.pill{min-height:44px;display:inline-flex;align-items:center;gap:8px;padding-inline:18px;border-radius:22px;background:var(--card);color:var(--ink);font-size:var(--t-sm);font-weight:400;box-shadow:inset 0 0 0 1px var(--rule);transition:background-color .15s,box-shadow .15s}
.pill:hover{text-decoration:none;box-shadow:inset 0 0 0 1px var(--ink-3)}
.pill:active{background:var(--fill)}
.pill.danger{color:var(--amber);box-shadow:inset 0 0 0 1px var(--amber)}
.pill.danger:hover{box-shadow:inset 0 0 0 1.5px var(--amber)}
/* inside the bar a .pill is the call to action: a 44px target around a 34px capsule */
.bar .pill,.bar .pill:hover,.bar .pill:active{height:44px;min-height:0;padding:0;border-radius:0;background:none;box-shadow:none}
.bar .pill span{height:34px;display:inline-flex;align-items:center;padding-inline:16px;border-radius:17px;background:var(--blue);color:var(--on-blue);font-size:var(--t-sm);font-weight:600;white-space:nowrap;transition:filter .15s}
.bar .pill:hover{text-decoration:none}.bar .pill:hover span{filter:brightness(1.08)}.bar .pill:active span{filter:brightness(.92)}

/* ===== Forms ===== */
.form{background:var(--card);border-radius:var(--r-lg);box-shadow:var(--ring);padding:24px;display:grid;gap:18px}
@media (min-width:700px){.form{padding:32px}}
.field{display:grid;gap:6px}
.field label,.field>span{font-size:var(--t-sm);font-weight:600}
.field input{height:48px;width:100%;border-radius:12px;border:0;box-shadow:inset 0 0 0 1px var(--rule);background:var(--page);padding-inline:14px;transition:box-shadow .15s}
.field input:hover{box-shadow:inset 0 0 0 1px var(--ink-3)}
.field input:focus{outline:none;box-shadow:inset 0 0 0 1.5px var(--blue),0 0 0 4px var(--blue-soft)}
.field input[aria-invalid="true"]{box-shadow:inset 0 0 0 1.5px var(--amber)}
.field small{font-size:var(--t-cap);color:var(--ink-2);font-weight:400}
.form .btn{height:50px;width:100%}

/* ===== The door's own ===== */
/* a menu name in the connect steps: «Settings», «Connectors» */
.chip{display:inline-block;padding-inline:10px;border-radius:12px;background:var(--fill);color:var(--on-fill);font-size:var(--t-cap);font-weight:500;line-height:1.6;unicode-bidi:isolate}
/* the connector link and its copy button; wraps on a phone */
.linkbox{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:12px;background:var(--card);border-radius:var(--r-md);box-shadow:inset 0 0 0 1px var(--rule)}
.linkbox code{flex:1 1 240px;overflow-wrap:anywhere;font-size:var(--t-sm);user-select:all}
/* the copy toast: ONE live region in base.html, shown by door.js */
.toast{position:fixed;inset-inline:var(--gut);bottom:calc(16px + env(safe-area-inset-bottom,0px));margin-inline:auto;max-width:420px;z-index:50;padding:12px 16px;border-radius:var(--r-md);background:var(--ink);color:var(--page);font-size:var(--t-sm);text-align:center}
/* ===== The sign-in pages and the consent page: login, forgot, reset, message, consent ===== */
.auth{max-width:460px;margin:0 auto;padding:40px var(--gut) 32px;display:flex;flex-direction:column;gap:28px}
.intro{display:flex;flex-direction:column;gap:8px}
.eyebrow{font-size:var(--t-sm);font-weight:600;color:var(--blue-ink)}
.lede{font-size:var(--t-body);color:var(--ink-2)}
.note{font-size:var(--t-sm);color:var(--ink-2)}
/* the callback host (dir=ltr) sits on the reading edge of the right-to-left page */
.note[dir="ltr"]{text-align:right}
.alert,.info{padding:12px 16px;border-radius:var(--r-sm)}
.alert{background:var(--amber-soft);color:var(--amber)}
.info{background:var(--blue-soft);color:var(--ink)}
.check{display:flex;align-items:center;gap:8px;min-height:44px}
.check input{width:20px;height:20px;accent-color:var(--blue)}
/* consent: «اسمح» (.btn) over «لا تسمح» (.pill), both full width */
.decide{display:grid;gap:12px}
.decide .pill{justify-content:center;width:100%}
/* a state with no form (reset: done or expired; forgot: sent): a card holding heading, copy and the way on */
.notice{padding:24px;display:flex;flex-direction:column;align-items:flex-start;gap:12px}
@media (min-width:700px){.notice{padding:32px}}
.notice .btn{align-self:stretch;margin-top:8px}

/* ===== The account page ===== */
/* the menu in the bar: an avatar that opens a small panel (<details>, no script) */
.menu{position:relative}
.menu summary{list-style:none;cursor:pointer;min-height:44px;display:flex;align-items:center}
.menu summary::-webkit-details-marker{display:none}
.avatar{width:36px;height:36px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:var(--blue);color:var(--on-blue);font-weight:700}
.menu-panel{position:absolute;inset-inline-end:0;top:calc(100% + 8px);min-width:180px;padding:8px 16px;background:var(--card);border-radius:var(--r-md);box-shadow:var(--ring);display:flex;flex-direction:column;gap:4px;z-index:1}
.menu-panel a,.menu-panel button{min-height:44px;width:100%;display:flex;align-items:center;color:var(--blue-ink);font-weight:500}
.menu-panel a:hover{text-decoration:none}
.account{padding-block:32px 48px;display:flex;flex-direction:column;gap:24px}
/* each section is a card: a label column beside a body column; one column under 1024px (iPad portrait and phones) */
.section{display:grid;grid-template-columns:320px 1fr;gap:16px 40px;padding:24px}
@media (min-width:700px){.section{padding:32px}}
@media (max-width:1023px){.section{grid-template-columns:1fr}}
.section .label{display:flex;flex-direction:column;gap:8px}
.section .body{display:flex;flex-direction:column;gap:16px;min-width:0}
/* a form inside a card is not a card inside a card */
.section .form{background:none;box-shadow:none;padding:0}
.steps{padding-inline-start:1.4em;list-style:decimal;display:flex;flex-direction:column;gap:8px}
.more summary{min-height:44px;display:flex;align-items:center;cursor:pointer;color:var(--blue-ink);font-weight:500}
.ok{color:var(--ink-2)}
.ok::before{content:"✓ ";color:var(--green)}
.empty{color:var(--ink-2)}
/* a connected app: its name and dates, and «فصل» whose confirmation opens on its own line */
.app{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:12px;padding:12px 16px;border-radius:var(--r-md);box-shadow:inset 0 0 0 1px var(--rule)}
.app-text{display:flex;flex-direction:column;gap:4px}
.app-name{font-weight:700}
.confirm summary{list-style:none;cursor:pointer}
.confirm summary::-webkit-details-marker{display:none}
.confirm[open]{flex-basis:100%}
.confirm-panel{margin-top:12px;display:flex;flex-direction:column;gap:12px}
.signout{align-self:flex-start}
/* the personal link: its two actions side by side; an opened one takes the whole line */
.link-actions{display:flex;flex-wrap:wrap;align-items:flex-start;gap:12px}
.link-actions .confirm[open]{flex-basis:100%}
.link-actions .btn{align-self:flex-start}

/* ===== The start page: the hero h1, then two choices side by side (stacked under 1024px) ===== */
.start{padding-block:48px 64px;display:flex;flex-direction:column;gap:40px}
.start h1{font-size:var(--t-h1);line-height:1.15}
.choices{display:grid;grid-template-columns:1fr;gap:24px;align-items:start}
@media (min-width:1024px){.choices{grid-template-columns:minmax(0,5fr) minmax(0,7fr)}}
.choice{padding:24px;display:flex;flex-direction:column;align-items:flex-start;gap:16px;min-width:0}
@media (min-width:700px){.choice{padding:32px}}
.choice .linkbox{align-self:stretch}
.choice .more{align-self:stretch}
.choice .more>*+*{margin-top:12px}
