/* Bit Quirky / Round Trip. Fider v0.39.0 (133d5de2).
   Paste this entire file into the tenant's Advanced > Custom CSS setting.
   Asset path: /brand/ on the directory and wildcard board hosts. See INTEGRATION.txt. */
@font-face {
  font-family: Geist;
  src: url("/brand/geist-latin-400-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Geist;
  src: url("/brand/geist-latin-600-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/brand/space-grotesk-latin-600-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/brand/jetbrains-mono-latin-400-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* Fider attaches the active theme to BODY, and generates its variables there. */
body,
body[data-theme="light"] {
  --bq-font-body: Geist, Inter, system-ui, sans-serif;
  --bq-font-display: "Space Grotesk", "Inter Tight", system-ui, sans-serif;
  --bq-font-mono: "JetBrains Mono", ui-monospace, monospace;
  --bq-ink: #0a0812;
  --bq-mint: #30ffa0;
  --bq-mint-hover: #7affc1;
  --bq-background: #f3eee3;
  --bq-panel: #fffaf2;
  --bq-tile: #ebe3d5;
  --bq-text: #0a0812;
  --bq-muted: #5b5264;
  --bq-border: #827486;
  --bq-link: #990087;
  --bq-focus: #990087;
  --bq-positive: #006b43;
  --bq-vote-wash: #d7f5e5;
  --bq-vote-hover: #bbefd4;
  --colors-white: var(--bq-panel);
  --colors-black: var(--bq-text);
  --colors-gray-50: var(--bq-tile);
  --colors-gray-100: var(--bq-background);
  --colors-gray-200: var(--bq-tile);
  --colors-gray-300: var(--bq-border);
  --colors-gray-400: var(--bq-border);
  --colors-gray-500: var(--bq-muted);
  --colors-gray-600: var(--bq-muted);
  --colors-gray-700: var(--bq-muted);
  --colors-gray-800: var(--bq-text);
  --colors-gray-900: var(--bq-text);
  --colors-primary-light: var(--bq-vote-wash);
  --colors-primary-base: var(--bq-positive);
  --colors-primary-dark: var(--bq-positive);
  color-scheme: light;
  color: var(--bq-text);
  background: var(--bq-background);
  font-family: var(--bq-font-body);
  line-height: 1.65;
}
body[data-theme="dark"] {
  --bq-background: #0a0812;
  --bq-panel: #19131f;
  --bq-tile: #181426;
  --bq-text: #f3eee3;
  --bq-muted: #c0b5c9;
  --bq-border: #726478;
  --bq-link: #ff80ef;
  --bq-focus: #30ffa0;
  --bq-positive: #30ffa0;
  --bq-vote-wash: #102c24;
  --bq-vote-hover: #153e2f;
  --colors-white: var(--bq-panel);
  --colors-black: var(--bq-text);
  --colors-gray-50: var(--bq-background);
  --colors-gray-100: var(--bq-background);
  --colors-gray-200: var(--bq-panel);
  --colors-gray-300: var(--bq-border);
  --colors-gray-400: var(--bq-border);
  --colors-gray-500: var(--bq-muted);
  --colors-gray-600: var(--bq-muted);
  --colors-gray-700: var(--bq-muted);
  --colors-gray-800: var(--bq-text);
  --colors-gray-900: var(--bq-text);
  --colors-primary-light: var(--bq-vote-wash);
  --colors-primary-base: var(--bq-positive);
  --colors-primary-dark: var(--bq-positive);
  color-scheme: dark;
}

/* Generated Fider utility classes contain literal colors, not var() references.
   Preserve their roles while replacing only the neutral and primary palette.
   Leave status/tag/error palettes and OAuth provider marks intact. */
body[data-theme] :is(.text-gray-500, .text-gray-600, .text-gray-700) { color: var(--bq-muted); }
body[data-theme] :is(.text-gray-800, .text-gray-900, .text-black) { color: var(--bq-text); }
body[data-theme] .text-white { color: var(--bq-panel); }
body[data-theme] .bg-white { background-color: var(--bq-panel); }
body[data-theme] .bg-gray-50 { background-color: var(--colors-gray-50); }
body[data-theme] .bg-gray-100 { background-color: var(--bq-background); }
body[data-theme] .bg-gray-200 { background-color: var(--colors-gray-200); }
body[data-theme] :is(.border-gray-200, .border-gray-300, .border-gray-400) { border-color: var(--bq-border); }
body[data-theme] :is(.text-primary-base, .text-primary-dark, .header-emphasis) { color: var(--bq-positive); }
body[data-theme] :is(.hover\:bg-gray-50, .hover\:bg-gray-100):hover { background-color: var(--bq-tile); }
body[data-theme] :is(.hover\:text-gray-800, .hover\:text-gray-900):hover { color: var(--bq-text); }

body[data-theme] :is(button, input, select, textarea, optgroup) { font-family: var(--bq-font-body); }
body[data-theme] :is(h1, h2, h3, h4, .text-display, .text-display2, .text-header, .text-title, .p-home__welcome-title, .c-posts-container__post-title) {
  font-family: var(--bq-font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
}
body[data-theme] :is(code, pre, .c-markdown-textarea, .c-editor-raw-markdown) { font-family: var(--bq-font-mono); }
body[data-theme] :is(.text-link, .c-markdown a, .fider-tiptap-editor .ProseMirror a) {
  color: var(--bq-link);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
body[data-theme] .text-link:hover { color: var(--bq-link); text-decoration-thickness: 2px; }
body[data-theme] :focus-visible { outline: 3px solid var(--bq-focus); outline-offset: 3px; }
body[data-theme] :is(.c-input, .c-textarea, select):focus-visible {
  outline: 3px solid var(--bq-focus);
  outline-offset: 3px;
  border-color: var(--bq-focus);
  box-shadow: none;
}
body[data-theme] .fider-tiptap-editor:focus-within {
  outline: 3px solid var(--bq-focus);
  outline-offset: 3px;
}
body[data-theme] :is(.c-input, .c-textarea, select) { min-height: 44px; }
body[data-theme] :is(.c-input, .c-textarea)::placeholder { color: var(--bq-muted); opacity: 1; }
body[data-theme] :is(.c-button, .c-themeswitcher, .c-header__nav-link, .c-editor-button, .c-markdown-toggle) { min-height: 44px; }
body[data-theme] :is(.c-themeswitcher, .c-editor-button, .c-markdown-toggle) { min-width: 44px; }

/* Keep the real uploaded tenant logo and Fider's navigation/actions. */
body[data-theme] #c-header { background-color: var(--bq-background); }
body[data-theme] #c-header .c-header__brand { height: auto; min-height: 64px; gap: 24px; }
body[data-theme] #c-header .c-header__brand img { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; }
body[data-theme] #c-header .c-header__nav-link { display: inline-flex; align-items: center; color: var(--bq-muted); }
body[data-theme] #c-header .c-header__nav-link--active { color: var(--bq-text); box-shadow: 0 2px 0 var(--bq-positive); }
body[data-theme] #c-header .c-header__nav-link:hover { color: var(--bq-text); }
body[data-theme] #p-home { background: var(--bq-background); }
body[data-theme] #p-home .p-home__welcome-title { line-height: 1.15; }
body[data-theme] #p-home .p-home__welcome-body { color: var(--bq-muted); }
body[data-theme] #p-home .p-home__welcome-body a { color: var(--bq-link); text-decoration: underline; text-underline-offset: 0.2em; }
body[data-theme] :is(.c-posts-container__post, #p-home .p-home__add-idea-btn) {
  background: var(--bq-panel);
  border: 1px solid var(--bq-border);
  border-radius: 12px;
  box-shadow: none;
}
body[data-theme] #p-home .p-home__add-idea-btn { color: var(--bq-text); }
body[data-theme] #p-home .p-home__add-idea-btn:hover { border-color: var(--bq-positive); box-shadow: none; }
body[data-theme] .c-posts-container__post-link:hover .c-posts-container__post { border-color: var(--bq-positive); box-shadow: none; }
body[data-theme] .c-posts-container__post-title { color: var(--bq-text); }
body[data-theme] .c-posts-container__post-link:hover .c-posts-container__post-title { color: var(--bq-positive); }

/* Mint is the Round Trip action color. Never cream/white text on bright mint. */
body[data-theme] .c-button--primary {
  background: var(--bq-mint);
  border-color: var(--bq-mint);
  font-weight: 600;
}
body[data-theme] .c-button--primary:not(.c-button--loading) { color: var(--bq-ink); }
body[data-theme] .c-button--primary:hover { background: var(--bq-mint-hover); border-color: var(--bq-mint-hover); }
body[data-theme] .c-button--primary.c-button--loading::after { border-top-color: var(--bq-ink); }
body[data-theme] .c-button--secondary { border-color: var(--bq-border); box-shadow: none; }
body[data-theme] .c-button--link { color: var(--bq-link); }
body[data-theme] .c-dropdown__list--primary { background: var(--bq-panel); border-color: var(--bq-border); color: var(--bq-text); }
body[data-theme] .c-dropdown__list--primary .c-dropdown__listitem:hover { background: var(--bq-tile); }

/* Upstream hard-codes blue vote colors in both themes. Replace that component
   only, retaining its voted, disabled, hover and size modifiers. */
body[data-theme] .c-vote-counter__button { background: var(--bq-vote-wash); border-color: var(--bq-border); color: var(--bq-positive); }
body[data-theme] .c-vote-counter__button:hover { background: var(--bq-vote-hover); border-color: var(--bq-positive); color: var(--bq-positive); }
body[data-theme] .c-vote-counter__button--voted { background: var(--bq-mint); border-color: var(--bq-mint); color: var(--bq-ink); }
body[data-theme] .c-vote-counter__button--voted:hover { background: var(--bq-mint-hover); border-color: var(--bq-mint-hover); color: var(--bq-ink); }
body[data-theme] .c-vote-counter__icon,
body[data-theme] .c-vote-counter__button:hover .c-vote-counter__icon { color: var(--bq-positive); }
body[data-theme] .c-vote-counter__button--voted .c-vote-counter__icon,
body[data-theme] .c-vote-counter__button--voted:hover .c-vote-counter__icon { color: var(--bq-ink); }

body[data-theme] .p-show-post__actions { border-top-color: var(--bq-border); }
body[data-theme] .p-show-post__discussion-count { background: var(--bq-mint); color: var(--bq-ink); }

@media (max-width: 639px) {
  body[data-theme] #c-header .c-header__brand { min-height: 64px; }
  body[data-theme] #p-home { padding-top: 28px; padding-bottom: 40px; }
  body[data-theme] .c-posts-container__post { padding: 20px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-theme] :is(.c-button, .c-vote-counter__button, .c-vote-counter__icon, .c-posts-container__post, .c-posts-container__post-title) { transition: none; }
  body[data-theme] .c-button:active { transform: none; }
  body[data-theme] .c-vote-counter__button:hover .c-vote-counter__icon { transform: none; }
}