/* Orimovo account. The orimovo.co.uk sign-in design (global.css, auth.css and
   AuthShell) reduced to what these pages use. Night theme, coral primary action,
   Nunito Sans self-hosted. No inline styles anywhere (CSP style-src 'self'). */
@font-face {
  font-family: 'Nunito Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  font-stretch: 75% 125%;
  src: url(/static/fonts/nunito-sans-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  font-stretch: 75% 125%;
  src: url(/static/fonts/nunito-sans-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --night: #061428;
  --surface: #0D2244;
  --surface-2: #132B52;
  --line: #213D66;
  --line-2: #2C4B78;
  --ink: #F4F8FF;
  --ink-2: #B4C6DE;
  --ink-3: #8AA2C2;
  --violet: #8A50FF;
  --blue: #245CFA;
  --cyan: #04BDFC;
  --mint: #30E9C1;
  --coral: #FF6F59;
  --font: 'Nunito Sans Variable', 'Nunito Sans', system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--night); color: var(--ink); font: 16px/1.6 var(--font); overflow-x: clip; }
img, svg { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
h1, h2 { margin: 0; font-weight: 900; letter-spacing: -0.02em; line-height: 1.05; text-wrap: balance; }
p { margin: 0.6em 0 0; }
code { font-size: 0.95em; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font: 800 16px/1 var(--font); text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--coral); color: #2A0C06; }
.btn-primary:hover { background: #FF8873; }
.btn-light { background: var(--ink); color: var(--night); }
.btn-light:hover { background: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink-2); background: rgba(255, 255, 255, 0.04); }
.btn-block { width: 100%; min-height: 52px; }
.btn[aria-busy='true'] { opacity: 0.7; pointer-events: none; }
.link-btn {
  background: none; border: 0; padding: 0; min-height: 44px; cursor: pointer;
  font: 700 15px var(--font); color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--ink); }
.link-btn.danger { color: #FF9C8C; }

.lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; font-size: 24px; letter-spacing: -0.035em; line-height: 1; }
.lockup svg { flex: none; }

/* Frame (AuthShell) */
.auth { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-sky {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  padding: 32px clamp(24px, 4vw, 56px);
  background:
    radial-gradient(70% 60% at 50% 50%, rgba(36, 92, 250, 0.28), transparent 70%),
    radial-gradient(50% 50% at 0% 100%, rgba(138, 80, 255, 0.25), transparent 70%),
    #040E1F;
  border-right: 1px solid var(--line);
}
.stars {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(1px 1px at 12% 22%, #cfe0fa 60%, transparent),
    radial-gradient(1px 1px at 32% 78%, #cfe0fa 60%, transparent), radial-gradient(1.4px 1.4px at 54% 14%, #fff 60%, transparent),
    radial-gradient(1px 1px at 72% 62%, #cfe0fa 60%, transparent), radial-gradient(1px 1px at 88% 30%, #cfe0fa 60%, transparent),
    radial-gradient(1.4px 1.4px at 22% 52%, #fff 60%, transparent), radial-gradient(1px 1px at 64% 88%, #cfe0fa 60%, transparent),
    radial-gradient(1px 1px at 92% 84%, #cfe0fa 60%, transparent), radial-gradient(1px 1px at 6% 90%, #cfe0fa 60%, transparent),
    radial-gradient(1.2px 1.2px at 44% 40%, #cfe0fa 60%, transparent);
  background-size: 420px 420px; opacity: 0.55;
}
.auth-home { position: relative; z-index: 1; }
.auth-tag { position: relative; margin: 0; font-size: clamp(22px, 2.2vw, 30px); font-weight: 900; letter-spacing: -0.02em; line-height: 1.15; max-width: 18ch; }
.auth-orbit { position: relative; width: min(100%, 460px); aspect-ratio: 1; margin: 24px auto; }
.ring { position: absolute; border-radius: 50%; border: 1px solid #23426E; }
.r1 { inset: 0; border-style: dashed; border-color: #1A3456; }
.r2 { inset: 18%; }
.auth-core { position: absolute; inset: 38%; filter: drop-shadow(0 0 40px rgba(4, 189, 252, 0.45)); }
.auth-core svg { width: 100%; height: 100%; }
.auth-spin { position: absolute; inset: 0; animation: auth-turn 80s linear infinite; }
.auth-planet {
  position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 12px 24px -8px rgba(0, 0, 0, 0.8);
}
.p1 { transform: rotate(0deg) translateY(calc(min(460px, 40vw) * -0.32)); background: radial-gradient(circle at 35% 30%, #c9b0ff, #8A50FF 55%, #4a2a8a); }
.p2 { transform: rotate(90deg) translateY(calc(min(460px, 40vw) * -0.32)); background: radial-gradient(circle at 35% 30%, #9fd9ff, #04BDFC 55%, #02658a); }
.p3 { transform: rotate(180deg) translateY(calc(min(460px, 40vw) * -0.32)); background: radial-gradient(circle at 35% 30%, #b9fbe9, #30E9C1 55%, #1a8068); }
.p4 { transform: rotate(270deg) translateY(calc(min(460px, 40vw) * -0.32)); background: radial-gradient(circle at 35% 30%, #ffc4ba, #FF6F59 55%, #8a3a2e); }
@keyframes auth-turn { to { transform: rotate(360deg); } }

.auth-main {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  padding: 40px max(20px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
}
.auth-card { width: 100%; max-width: 420px; }
.auth-legal { display: flex; gap: 20px; margin: 0; font-size: 14px; }
.auth-legal a { color: var(--ink-3); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.auth-legal a:hover { color: var(--ink); }

@media (max-width: 860px) {
  .auth { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .auth-sky { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px; min-height: 220px; justify-content: center; }
  .auth-home, .auth-tag { display: none; }
  .auth-orbit { width: 200px; margin: 0 auto; }
  .auth-planet { width: 28px; height: 28px; margin: -14px 0 0 -14px; }
  .p1 { transform: rotate(0deg) translateY(-64px); }
  .p2 { transform: rotate(90deg) translateY(-64px); }
  .p3 { transform: rotate(180deg) translateY(-64px); }
  .p4 { transform: rotate(270deg) translateY(-64px); }
  .auth-main { justify-content: flex-start; padding-top: 28px; }
}

/* Forms (auth.css) */
.auth-card h1 { font-size: clamp(30px, 3.4vw, 38px); }
.auth-card .sub { color: var(--ink-2); margin: 10px 0 28px; }
.for-app {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; margin-bottom: 20px;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; color: var(--ink-2);
}
.for-app strong { color: var(--ink); }
.for-app-dot { width: 28px; height: 28px; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 30%, #9FF8DD, #04BDFC 50%, #245CFA); }
.stack { display: grid; gap: 12px; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 800; font-size: 15px; }
.field input {
  width: 100%; min-height: 52px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line-2);
  background: #081A35; color: var(--ink); font: 16px var(--font);
}
.field input::placeholder { color: var(--ink-3); }
.field input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(4, 189, 252, 0.25); }
.field input[aria-invalid='true'] { border-color: var(--coral); }
.field .err { color: #FF9C8C; font-size: 14px; font-weight: 700; margin: 0; }
.notice {
  margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: rgba(4, 189, 252, 0.1);
  border: 1px solid rgba(4, 189, 252, 0.35); color: var(--ink); font-size: 15px;
}
[hidden] { display: none !important; }
.fine { margin-top: 24px; color: var(--ink-3); font-size: 14px; }
.fine a { color: var(--ink-2); }
.cancel-form { margin-top: 8px; text-align: center; }

/* Consent */
.consent-head h1 { font-size: clamp(26px, 3vw, 32px); line-height: 1.15; }
.pair { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.glyph { display: grid; place-items: center; flex: none; border-radius: 28%; width: 56px; height: 56px; }
.app-glyph { background: linear-gradient(135deg, var(--blue), var(--cyan)); font-weight: 900; font-size: 24px; color: #fff; }
.pair-link { display: flex; gap: 6px; }
.pair-link span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: hop 1.4s ease-in-out infinite; }
.pair-link span:nth-child(2) { animation-delay: 0.15s; }
.pair-link span:nth-child(3) { animation-delay: 0.3s; }
@keyframes hop { 50% { background: var(--mint); transform: translateY(-3px); } }
.pair-me svg { display: block; border-radius: 28%; background: var(--surface); }
.account {
  display: flex; align-items: center; gap: 12px; margin-top: 24px; padding: 12px 14px;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
}
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #8A50FF, #04BDFC); font-weight: 900; flex: none; }
.account-text { display: grid; flex: 1; line-height: 1.3; font-size: 15px; }
.account-text strong { overflow-wrap: anywhere; }
.scopes-title, .section-title { font-size: 17px; letter-spacing: 0; margin: 24px 0 8px; }
.scopes { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.scopes li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.scopes li svg { width: 28px; height: 28px; }
.scopes strong { display: block; }
.scopes .muted { font-size: 14px; }
.return { color: var(--ink-2); margin-top: 16px; }
.consent-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-top: 24px; }

/* Account page */
.inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.inline-form .btn { min-height: 52px; }
.passkeys { list-style: none; margin: 0 0 16px; padding: 0; border-top: 1px solid var(--line); }
.passkeys li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pk-icon { color: var(--cyan); display: grid; }
.pk-text { display: grid; line-height: 1.35; }
.pk-text .muted { font-size: 14px; }
.signout { margin-top: 32px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
