/* FuzzyShare design tokens.
 *
 * The visual language follows Supabase's marketing site and dashboard: near-black, green-tinted
 * greys, hairline borders, a single green brand, Inter for text, Manrope for headings and
 * Source Code Pro for code. Values were measured on supabase.com (page #131413, hairline
 * #232423, text #edefee, muted #989a99, brand #3ecf8e, primary button fill #006338, body 16/24
 * weight 450, hero heading 46/46, card titles 16/24 weight 600, header 65px, container 1280px
 * with 96px gutters, header buttons 26px tall / 12px text, hero buttons 38px tall / 14px text,
 * 8px button radius).
 *
 * Every other stylesheet reads these variables; change the look here.
 * Dark is the default. Light follows the system setting, unless the account chose a theme in Settings.
 */

@font-face { font-family: "Inter"; src: url(/assets/fonts/Inter.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url(/assets/fonts/Manrope.woff2) format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Code Pro"; src: url(/assets/fonts/SourceCodePro.woff2) format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;

  /* surfaces, from the page outward */
  --sb-bg: #131413;
  --sb-surface-1: #181918;
  --sb-surface-2: #1d1e1d;
  --sb-surface-3: #232423;
  --sb-border: #232423;
  --sb-border-strong: #2e2f2e;

  /* text */
  --sb-text: #edefee;
  --sb-text-muted: #989a99;
  --sb-text-faint: #8a8d8b;

  /* brand and status */
  --sb-brand: #3ecf8e;          /* links, focus, accents */
  --sb-brand-fill: #006338;     /* filled primary buttons */
  --sb-brand-fill-hover: #00714a;
  --sb-brand-ring: rgb(62 207 142 / .4);
  --sb-ok: #3ecf8e;
  --sb-warn: #ffb224;
  --sb-bad: #ff6369;
  --sb-info: #52a9ff;
  --sb-on-brand: #ffffff;       /* text on the filled primary button */
  --sb-brand-soft: rgb(62 207 142 / .12);   /* tinted fills: badges, active items */
  --sb-warn-soft: rgb(255 178 36 / .12);
  --sb-bad-soft: rgb(255 99 105 / .12);
  --sb-info-soft: rgb(82 169 255 / .12);
  --sb-overlay: rgb(0 0 0 / .6);

  /* type */
  --font-sans: Inter, "Inter Fallback", ui-sans-serif, system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: Manrope, "Manrope Fallback", Inter, ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Source Code Pro", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs-xs: 12px;   /* header buttons, captions */
  --fs-sm: 14px;   /* nav links, default buttons, dense UI text */
  --fs-md: 16px;   /* body copy, card titles */
  --fs-lg: 18px;
  --fs-h3: 20px;
  --fs-h2: 36px;
  --fs-h1: 46px;   /* hero heading, line-height 1 */
  --fw-text: 450;
  --fw-medium: 500;
  --fw-semibold: 600;

  /* shape */
  --r-sm: 6px;
  --r-md: 8px;     /* buttons, inputs */
  --r-lg: 12px;    /* panels */
  --r-xl: 20px;    /* large feature cards */
  --r-pill: 999px;

  /* layout */
  --container: 1280px;
  --gutter: 96px;
  --header-h: 65px;
  --dash-topbar-h: 48px;
  --dash-rail-w: 48px;
  --dash-side-w: 240px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --sb-bg: #fcfcfc;
    --sb-surface-1: #f7f8f7;
    --sb-surface-2: #f0f1f0;
    --sb-surface-3: #e8eae8;
    --sb-border: #e4e6e4;
    --sb-border-strong: #d4d7d4;
    --sb-text: #171917;
    --sb-text-muted: #5b5e5c;
    --sb-text-faint: #686b69;
    --sb-brand: #00714a;
    --sb-brand-fill: #006338;
    --sb-brand-fill-hover: #00714a;
    --sb-brand-ring: rgb(0 113 74 / .35);
    --sb-ok: #00714a;
    --sb-warn: #a14a08;
    --sb-bad: #c4222f;
    --sb-info: #0a60b8;
    --sb-brand-soft: rgb(0 113 74 / .1);
    --sb-warn-soft: rgb(161 74 8 / .1);
    --sb-bad-soft: rgb(196 34 47 / .1);
    --sb-info-soft: rgb(10 96 184 / .1);
    --sb-overlay: rgb(0 0 0 / .4);
  }
}
/* A theme chosen in Settings is saved on the account and set on <html> by the dashboard: it wins over the system setting. */
:root[data-theme="light"] {
  color-scheme: light;
  --sb-bg: #fcfcfc;
  --sb-surface-1: #f7f8f7;
  --sb-surface-2: #f0f1f0;
  --sb-surface-3: #e8eae8;
  --sb-border: #e4e6e4;
  --sb-border-strong: #d4d7d4;
  --sb-text: #171917;
  --sb-text-muted: #5b5e5c;
  --sb-text-faint: #686b69;
  --sb-brand: #00714a;
  --sb-brand-fill: #006338;
  --sb-brand-fill-hover: #00714a;
  --sb-brand-ring: rgb(0 113 74 / .35);
  --sb-ok: #00714a;
  --sb-warn: #a14a08;
  --sb-bad: #c4222f;
  --sb-info: #0a60b8;
  --sb-brand-soft: rgb(0 113 74 / .1);
  --sb-warn-soft: rgb(161 74 8 / .1);
  --sb-bad-soft: rgb(196 34 47 / .1);
  --sb-info-soft: rgb(10 96 184 / .1);
  --sb-overlay: rgb(0 0 0 / .4);
}

@media (max-width: 1024px) { :root { --gutter: 48px; } }
@media (max-width: 640px) { :root { --gutter: 20px; --fs-h2: 28px; --fs-h1: 34px; } }

/* theme switch (public pages): theme-toggle.js fills these in */
.theme-cycle { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--sb-border-strong); border-radius: var(--r-md); background: transparent; color: var(--sb-text-muted); cursor: pointer; flex: none; }
.theme-cycle:hover { color: var(--sb-text); background: var(--sb-surface-2); }
.theme-seg { display: inline-flex; padding: 2px; gap: 2px; border: 1px solid var(--sb-border-strong); border-radius: var(--r-md); background: var(--sb-surface-1); }
.theme-seg button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 var(--sp-3); border: 0; border-radius: 6px; background: none; color: var(--sb-text-muted); font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-medium); cursor: pointer; }
.theme-seg button:hover { color: var(--sb-text); }
.theme-seg button[aria-pressed="true"] { background: var(--sb-surface-3); color: var(--sb-text); }
