:root {
  --brand: #006DAE;
  --brand-deep: #005A9B;
  --sidebar-brand: #0078C8;
  --sidebar-brand-deep: #0060A0;
  --brand-bright: #0090E0;
  --brand-weak: #E6F2FA;
  --canvas: #f5f7fb;
  --surface: #ffffff;
  --surface-muted: #f0f2f6;
  --line: #e4e8ef;
  --text: #20242c;
  --muted: #687082;
  --soft: #8a93a6;
  --danger: #9d2735;
  --radius-ui: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --sidebar-width: 264px;
  --topbar-height: 68px;
  /* iOS safe-area insets (0px in any normal browser / non-notched device, so
     every calc(x + var(--safe-*)) below is a no-op off-device). Only the
     Capacitor shell with viewport-fit=cover makes these non-zero. */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --focus: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);
  /* UI easing curves (Emil Kowalski): ease-out for enter/exit + press feedback
     (starts fast = feels responsive), ease-in-out for on-screen moves. Never
     ease-in for UI — it delays the first frame users watch most. */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
}

/* Thin, subtle scrollbars instead of the OS default chunky bar. */
* {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--soft) 45%, transparent) transparent;
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--soft) 40%, transparent);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--soft) 65%, transparent);
}
::-webkit-scrollbar-track {
  background: transparent;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.post-card:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
