/* HIYU sign-in pages (issue #29): same look as the prototype login, for
   - the Blade pages (portal code, invitation): body.hy-auth-page
   - the Filament simple layout (admin and portal login, two-step check, password reset): .fi-simple-layout:has(.hy-auth-top)
   Light and dark follow the system, or Filament's .dark class. */
.hy-auth-page,
body:has(.hy-auth-top){
  --hy-bg:#f6f6f6; --hy-card:#fff; --hy-fg:#121214; --hy-dim:#6c6c72; --hy-dot:#c4c4c9; --hy-lime:#d8f26a; --hy-violet:#6a3dff; --hy-red:#c2333c;
}
@media (prefers-color-scheme:dark){
  .hy-auth-page{--hy-bg:#0f0f11; --hy-card:#19191c; --hy-fg:#f1f1f3; --hy-dim:#9b9ba3; --hy-dot:#3a3a40; --hy-violet:#a48cff; --hy-red:#ff8a93; color-scheme:dark}
}
.dark body:has(.hy-auth-top),body.dark:has(.hy-auth-top),.dark:has(.hy-auth-top) body{--hy-bg:#0f0f11; --hy-card:#19191c; --hy-fg:#f1f1f3; --hy-dim:#9b9ba3; --hy-dot:#3a3a40; --hy-violet:#a48cff; --hy-red:#ff8a93}

/* ---------- page and grid ---------- */
.hy-auth-page{margin:0;min-height:100vh;background:var(--hy-bg);color:var(--hy-fg);font:15px/1.5 Inter,system-ui,sans-serif}
.hy-auth-page *{box-sizing:border-box}
.hy-auth{max-width:1080px;margin:0 auto;padding:40px 24px 64px}
.hy-auth-top{display:flex;align-items:center;gap:16px;padding:14px 0 26px;border-bottom:1px dotted var(--hy-dot);color:var(--hy-fg);font-family:Inter,system-ui,sans-serif}
.hy-auth-brand{display:inline-flex;align-items:center;gap:8px;color:var(--hy-fg);text-decoration:none}
.hy-auth-brand .hiyu-logo{height:22px;width:auto}
.hy-auth-brand .pr-logo{height:14px;width:auto}
.hy-auth-by{color:var(--hy-dim);font-size:13.5px}
.hy-auth-tag{flex:1;color:var(--hy-dim);font-size:13.5px}
.hy-auth-site{color:var(--hy-fg);font-size:14.5px;font-weight:500;text-decoration:none;padding:8px 12px;border-radius:8px}
.hy-auth-site:hover{text-decoration:underline;text-underline-offset:3px}
.hy-auth-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:14px;margin-top:28px;align-items:start}
.hy-auth-main,.hy-auth-side{background:var(--hy-card);border-radius:10px;padding:34px 32px 30px;min-width:0}
.hy-auth-eye{display:block;font-size:13px;color:var(--hy-fg);margin-bottom:12px}
.hy-auth-eye::before{content:"";display:inline-block;width:8px;height:8px;background:var(--hy-lime);margin-right:8px;vertical-align:1px}
.hy-auth-line{display:grid;gap:3px;padding:12px 0;border-bottom:1px dotted var(--hy-dot)}
.hy-auth-line:last-child{border-bottom:0}
.hy-auth-k{font-weight:600;font-size:14.5px}
.hy-auth-d{color:var(--hy-dim);font-size:14px;line-height:1.5}

/* ---------- Blade pages: headings, fields, buttons ---------- */
.hy-auth-main h1{font:700 clamp(34px,5vw,56px)/1.05 'Inter Tight',Inter,system-ui,sans-serif;letter-spacing:-.02em;margin:0 0 14px}
.hy-lead{color:var(--hy-dim);font-size:15.5px;line-height:1.55;max-width:52ch;margin:0 0 22px}
.hy-lab{display:block;font-size:13px;margin:0 0 8px}
.hy-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:14px}
.hy-in{flex:1 1 240px;height:46px;width:100%;border:1px solid var(--hy-dot);border-radius:8px;background:transparent;color:var(--hy-fg);font:16px Inter,system-ui,sans-serif;padding:0 14px;margin-bottom:14px}
.hy-row .hy-in{margin-bottom:0;width:auto}
.hy-in:focus{outline:2px solid var(--hy-fg);outline-offset:1px;border-color:var(--hy-fg)}
.hy-in.code{letter-spacing:.4em;font-variant-numeric:tabular-nums;max-width:220px}
.hy-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:46px;padding:0 20px;border-radius:8px;border:1px solid var(--hy-fg);background:transparent;color:var(--hy-fg);font:500 15px Inter,system-ui,sans-serif;cursor:pointer;text-decoration:none}
.hy-btn.solid{background:var(--hy-fg);color:var(--hy-card)}
.hy-btn.solid:hover{background:#5a3fd6;border-color:#5a3fd6;color:#fff}
.hy-link{background:none;border:0;padding:0;font:inherit;font-size:14.5px;color:var(--hy-fg);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.hy-err{color:var(--hy-red);font-size:13.5px;margin:-4px 0 12px}
.hy-ok{font-size:14px;margin:0 0 14px}
.hy-note{color:var(--hy-dim);font-size:13px;margin:4px 0 0}
.hy-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

body:has(.fi-simple-layout .hy-auth-top){background:var(--hy-bg)}

/* ---------- Filament simple layout: same frame, Filament's own form inside ---------- */
.fi-simple-layout:has(.hy-auth-top){background:var(--hy-bg);color:var(--hy-fg);font-family:Inter,system-ui,sans-serif;display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);column-gap:14px;align-content:start;max-width:1080px;margin:0 auto;padding:40px 24px 64px;min-height:100vh}
.fi-simple-layout:has(.hy-auth-top) > .hy-auth-top{grid-column:1 / -1}
.fi-simple-layout:has(.hy-auth-top) > .fi-simple-main-ctn{grid-column:1;display:block;padding:0;margin-top:28px;min-height:0}
.fi-simple-layout:has(.hy-auth-top) > .hy-auth-side{grid-column:2;grid-row:2;margin-top:28px;align-self:start}
.fi-simple-layout:has(.hy-auth-top) .fi-simple-main{max-width:none;width:100%;margin:0;background:var(--hy-card);border-radius:10px;padding:34px 32px 30px;box-shadow:none;--tw-ring-shadow:0 0 #0000;ring:0;outline:0}
.fi-simple-layout:has(.hy-auth-top) .fi-simple-header{align-items:flex-start;text-align:left}
.fi-simple-layout:has(.hy-auth-top) .fi-simple-header .fi-logo{display:none}
.fi-simple-layout:has(.hy-auth-top) .fi-simple-header-heading{font:700 clamp(34px,5vw,56px)/1.05 'Inter Tight',Inter,system-ui,sans-serif;letter-spacing:-.02em;text-align:left;color:var(--hy-fg)}
.fi-simple-layout:has(.hy-auth-top) .fi-simple-header-subheading{color:var(--hy-dim);font-size:15.5px;line-height:1.55;max-width:52ch;text-align:left;margin-top:14px}
.fi-simple-layout:has(.hy-auth-top) .fi-btn{height:46px;border-radius:8px;font:500 15px Inter,system-ui,sans-serif}
.fi-simple-layout:has(.hy-auth-top) .fi-input-wrp{border-radius:8px;min-height:46px}
.fi-simple-layout:has(.hy-auth-top) .fi-fo-field-label-content{font-size:13px;font-weight:500}
.hy-auth-alt{margin-top:18px;display:flex;flex-wrap:wrap;gap:12px 18px;align-items:center}

/* ---------- phones ---------- */
@media (max-width:760px){
  .hy-auth,.fi-simple-layout:has(.hy-auth-top){padding:16px 16px 40px}
  .hy-auth-grid,.fi-simple-layout:has(.hy-auth-top){grid-template-columns:minmax(0,1fr)}
  .fi-simple-layout:has(.hy-auth-top) > .hy-auth-side{grid-column:1;grid-row:auto}
  .hy-auth-tag{display:none}
  .hy-auth-brand{flex:1}
  .hy-auth-main,.hy-auth-side,.fi-simple-layout:has(.hy-auth-top) .fi-simple-main{padding:26px 20px 22px}
  .hy-in.code{max-width:none}
}

/* dark: the black primary button becomes light on the dark card, as in the prototype */
.dark .fi-simple-layout:has(.hy-auth-top) .fi-btn.fi-color-primary{background:#f1f1f3;color:#121214}
.dark .fi-simple-layout:has(.hy-auth-top) .fi-btn.fi-color-primary:hover{background:#a48cff;color:#121214}
.fi-simple-layout:has(.hy-auth-top) .fi-btn.fi-color-primary:hover{background:#5a3fd6;color:#fff}

/* free sign-up (D-28): honeypot hidden from people, consent checkbox */
.hy-hp{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}
.hy-check{display:flex;gap:10px;align-items:flex-start;font-size:14px;margin:4px 0 16px;color:var(--hy-fg)}
.hy-check input{width:20px;height:20px;margin:1px 0 0;accent-color:var(--hy-fg)}
.hy-check a{color:var(--hy-fg)}
.cf-turnstile{margin:0 0 14px}

/* One sign-in page for everyone (issue #30): passkey first, then email and code. */
.hy-key{width:24px;height:10px;fill:currentColor;flex:none;shape-rendering:crispEdges}
.hy-or{display:flex;align-items:center;gap:12px;margin:22px 0 4px;color:var(--hy-dim);font-size:13px}
.hy-or::before,.hy-or::after{content:"";flex:1;height:1px;background:currentColor;opacity:.3}
.hy-pk .hy-err{margin-top:8px}
.hy-note .hy-link{font-size:13px}

/* "Keep me signed in on this device for 30 days" (Matt, 15 Nov 2026). */
.hy-check{display:flex;align-items:center;gap:10px;margin:16px 0 0;font-size:14px;cursor:pointer}
.hy-check input{width:18px;height:18px;margin:0;accent-color:currentColor;flex:0 0 auto}
.hy-check-note{margin:2px 0 0 28px}
@media (prefers-color-scheme:dark){.hy-check input{color-scheme:light}.hy-auth-page .hy-check input{color-scheme:dark}}
/* Approval of an AI assistant (MCP, issue #23): what it may and may not do, as plain lists. */
.hy-scopes{margin:4px 0 18px;padding-left:18px;font-size:14px;line-height:1.5}
.hy-scopes li{margin:2px 0}
.hy-actions{margin-top:18px}
.hy-actions form{margin:0}
