
:root {
  --bg: #07070b;
  --bg-elev: #121218;
  --bg-soft: #1a1a22;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f5f5f7;
  --muted: #9b9ba8;

  /* One accent for the whole product. The palette used to declare a pink here
     while every screen hard-coded this orange, so the variables described a
     theme nothing actually rendered. */
  --accent: #ff6b1a;
  --accent-hover: #ff8340;
  --accent-press: #e85c0f;
  --accent-soft: rgba(255, 107, 26, 0.12);
  --accent-line: rgba(255, 107, 26, 0.45);
  --accent-ring: rgba(255, 107, 26, 0.55);
  --accent-grad: linear-gradient(90deg, #ff8340, #ff6b1a);
  --accent-2: #a855f7;
  --gold: var(--accent);
  --gold-2: var(--accent-hover);
  --rose: var(--accent-2);
  --danger: #ff5c7a;
  --ok: #34d399;

  /* Radii match what the components already draw — cards really are 22px — so
     adopting these tokens keeps the current look while ending the drift. */
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;
  --radius: var(--r-sm);

  --sh-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --sh-md: 0 12px 32px rgba(0, 0, 0, 0.42);
  --sh-lg: 0 24px 80px rgba(0, 0, 0, 0.55);
  --sh-accent: 0 10px 26px rgba(255, 107, 26, 0.34);
  --shadow: var(--sh-md);

  /* Page backdrop: the two corner glows behind the header and the grain overlay. */
  --glow-accent: rgba(255, 107, 26, 0.15);
  --glow-accent-2: rgba(168, 85, 247, 0.13);
  --noise-opacity: 0.035;

  /* Three durations for everything: press feedback, normal state changes, and
     entrances. Replaces the thirteen that had accumulated. */
  --dur-fast: 140ms;
  --dur: 220ms;
  --dur-slow: 320ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --disabled-opacity: 0.5;

  --header: 64px;
  --sidebar: 272px;
  --tabbar: 64px;
  --font-display: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
  --max: 1280px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
#app {
  min-height: 100%;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  background:
    radial-gradient(900px 420px at 15% -8%, var(--glow-accent), transparent 52%),
    radial-gradient(700px 380px at 92% 0%, var(--glow-accent-2), transparent 48%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: '';
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='80' height='80' filter='url(%23n)'/></svg>");
  z-index: 1;
}

#app {
  position: relative;
  z-index: 2;
}

img {
  max-width: 100%;
  display: block;
}

video {
  max-width: 100%;
  display: block;
}

/* Belt-and-suspenders for the standard Chromium shadow-DOM controls that some
   OEM browser forks still paint even without `controls`; the video tag
   attributes (x5-video-player-type, controlslist, disable*) above handle the
   TBS/X5-style native takeover, this catches the rest. Browsers that hijack
   video at the native chrome level (outside the page DOM) cannot be reached
   from CSS at all — that's a hard platform limitation, not something fixable
   here. */
video::-webkit-media-controls,
video::-webkit-media-controls-panel,
video::-webkit-media-controls-start-playback-button,
video::-webkit-media-controls-overlay-play-button,
video::-internal-media-controls-overflow-button {
  display: none !important;
}

/* Driven by the `v-img` directive. Cached images mount straight into `ready`,
   so the fade only ever plays for a picture the user actually waited for. */
img[data-img] {
  transition: opacity var(--dur-slow) ease;
}

img[data-img='loading'] {
  opacity: 0;
}

img[data-img='failed'] {
  background: var(--bg-soft);
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

/* Mobile browsers paint their own translucent block on tap, which fights every
   press state below. `manipulation` also drops the 300ms double-tap wait. */
a,
button,
summary,
[role='button'] {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Immediate physical press & touch feedback so users instantly feel their tap registered */
button:not(:disabled),
[role='button']:not([aria-disabled='true']) {
  transition: transform var(--dur-fast) ease, filter var(--dur-fast) ease, opacity var(--dur-fast) ease;
}

button:active:not(:disabled),
[role='button']:active:not([aria-disabled='true']) {
  transform: scale(0.975);
  transition-duration: 60ms;
}

/* One focus ring for the whole app. Components may override it, but nothing is
   left invisible to keyboard users by default. */
:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
  border-radius: inherit;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled,
[aria-disabled='true'] {
  cursor: not-allowed;
  opacity: var(--disabled-opacity);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
}

p {
  margin: 0;
}

.page-enter-active,
.page-leave-active {
  transition: opacity var(--dur) ease, transform var(--dur) ease;
}

.page-enter-from,
.page-leave-to {
  opacity: 0;
  transform: translateY(6px);
}

.fade-enter-active,
.fade-leave-active {
  transition: opacity var(--dur) ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

.btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: var(--r-pill);
  padding: 10px 16px;
  font-weight: 700;
  color: var(--fixed-ffffff);
  background: var(--accent-grad);
  box-shadow: var(--sh-accent);
  transition: filter var(--dur-fast) ease, transform var(--dur-fast) ease,
    box-shadow var(--dur-fast) ease;
}

.btn-accent:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn-accent:active:not(:disabled) {
  transform: translateY(0) scale(0.985);
  filter: brightness(0.96);
  box-shadow: var(--sh-sm);
}

.btn-accent:disabled {
  box-shadow: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--fg-a04);
  border-radius: var(--r-pill);
  padding: 7px 12px;
  color: var(--muted);
  white-space: nowrap;
  font-size: 0.84rem;
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease,
    background var(--dur-fast) ease, transform var(--dur-fast) ease;
}

.chip.on,
.chip:hover {
  color: var(--text-ffffff);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.chip:active {
  transform: scale(0.96);
}

.container {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

/* Drop the travel — page and overlay entrances, hover lifts, press scales — but
   deliberately leave the loading spinners turning. They are small, fixed in
   place, and are the only signal that a request is still running. Decorative
   loops such as the skeleton shimmer are switched off at their own component. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .page-enter-from,
  .page-leave-to {
    transform: none;
  }
}

/* Chatwoot paints the launcher with an inline inbox color after load. These
   rules keep the bubble on the site accent; the chat panel lives in a
   cross-origin iframe, so its header still follows the inbox Widget Color
   unless the SDK exposes setWidgetColor. */
.woot-widget-bubble {
  background: var(--accent) !important;
  box-shadow: var(--sh-accent) !important;
}

.woot-widget-bubble:hover {
  background: var(--accent-hover) !important;
}

/* Component placeholder of the no-build runtime (core/component.js): takes no part in layout. */
nt-c {
  display: contents;
}

/* ------------------------------------------------------------------ page switches
   Every page is its own document. Chrome / Edge / Safari 18.2+ keep the old page on screen and
   cross-fade to the new one (cross-document View Transitions); other browsers just navigate as before.
   The opt-in (`@view-transition { navigation: auto }`) is inline in the <head> of every generated page
   (tools/gen-pages.mjs): from this linked file Chrome did not see it in time and skipped the transition. */

/* Short cross-fade. The shell parts (sidebar, top bar, tab bar) are deliberately NOT given a
   `view-transition-name`: a named element becomes the containing block of its fixed descendants
   (the language panel), and the identical old / new pixels cross-fade invisibly anyway. */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 160ms;
  animation-timing-function: ease-out;
}

/* Hold the cross-fade at its first frame (old page still fully visible) until the new page has
   mounted its real shell: the inline script of every page sets `data-nt-hold` on <html>, boot.js clears
   it (and the script clears it by itself after 1.5 s if boot never gets there). Without this the
   fade would end on the empty skeleton and the content would pop in a moment later. */
html[data-nt-hold]::view-transition-group(*),
html[data-nt-hold]::view-transition-old(*),
html[data-nt-hold]::view-transition-new(*) {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}
