/* presik hub design tokens.
   One shared set for the login, home, admin and hub pages, so every page
   feels like the same product. Deploy this file to the site root as
   /hub-tokens.css and link it from each page.
   Contrast, teal on near-black about 10.5 to 1, muted about 7.6 to 1,
   muted2 about 5.7 to 1, red text about 6.7 to 1. All pass WCAG AA
   at the sizes used. */
:root{
  /* colors */
  --color-bg:#0B0C0E;
  --color-surface:#131619;
  --color-surface-2:#171B1E;
  --color-text:#F2F3F3;
  --color-muted:#9AA3A8;
  --color-muted-2:#828D93;
  --color-border:#242A2E;
  --color-accent:#4FD1C5;
  --color-accent-dim:rgba(79,209,197,.14);
  --color-accent-border:rgba(79,209,197,.4);
  --color-red:#E03131;
  --color-red-text:#F26D6D;
  --color-red-dim:rgba(224,49,49,.12);
  --color-red-border:rgba(224,49,49,.4);
  --color-amber:#E8B44A;
  --color-amber-border:rgba(232,180,74,.4);

  /* aliases used by the existing pages, kept so the pages work unchanged */
  --bg:var(--color-bg);
  --panel:var(--color-surface);
  --panel2:var(--color-surface-2);
  --line:var(--color-border);
  --text:var(--color-text);
  --muted:var(--color-muted);
  --muted2:var(--color-muted-2);
  --teal:var(--color-accent);
  --teal-dim:var(--color-accent-dim);
  --red:var(--color-red);
  --red-text:var(--color-red-text);
  --red-dim:var(--color-red-dim);
  --amber:var(--color-amber);

  /* radii */
  --radius:14px;
  --radius-sm:12px;
  --radius-pill:99px;

  /* spacing scale */
  --space-1:4px;
  --space-2:8px;
  --space-3:12px;
  --space-4:16px;
  --space-5:20px;
  --space-6:24px;
  --space-8:32px;
  --space-10:40px;

  /* type scale */
  --fs-xs:11px;
  --fs-sm:12px;
  --fs-md:13px;
  --fs-base:14px;
  --fs-lg:15px;
  --fs-xl:16px;
  --fs-h2:20px;
  --fs-h1:clamp(34px,8vw,48px);

  /* shadows */
  --shadow-sm:0 1px 2px rgba(0,0,0,.4);
  --shadow-md:0 4px 16px rgba(0,0,0,.45);
  --shadow-lg:0 8px 32px rgba(0,0,0,.55);

  /* focus ring */
  --focus-outline:2px solid var(--color-accent);
}

/* visible focus ring on every interactive element */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible{
  outline:var(--focus-outline);
  outline-offset:2px;
}

/* top bar actions, log out plus the text size toggle */
.top{flex-wrap:wrap}
.top-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}

/* text size toggle, larger text scales the whole page a touch.
   zoom is the honest way to do it here, the pages size text in px,
   so a root font size change would not move anything. */
html.text-large body{zoom:1.18}

/* toasts, one small system for all three pages. bottom, dark card,
   teal accent, red accent for errors, auto dismiss. */
.toasts{
  position:fixed;
  left:16px;
  right:16px;
  bottom:calc(16px + env(safe-area-inset-bottom, 0px));
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  z-index:200;
  pointer-events:none;
}
.toast{
  pointer-events:auto;
  width:100%;
  max-width:520px;
  background:var(--color-surface);
  border:1px solid var(--color-border);
  border-left:3px solid var(--color-accent);
  border-radius:var(--radius-sm);
  padding:14px 16px;
  color:var(--color-text);
  font-size:14px;
  line-height:1.5;
  box-shadow:var(--shadow-lg);
  animation:toast-in .25s ease;
}
.toast.bad{border-left-color:var(--color-red)}
.toast.out{opacity:0;transition:opacity .3s ease}
@keyframes toast-in{
  from{opacity:0;transform:translateY(8px)}
  to{opacity:1;transform:none}
}

/* honor reduced motion, no animation or transition anywhere */
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
    scroll-behavior:auto !important;
  }
}
