/*
 * Curee look shared by the sign-in pages and the desktop products.
 * Palette from Curee Workstation (renderer/styles/01-tokens-base.css) and curee.ai: warm sage
 * canvas, white surfaces, near-black primary actions, muted status colors. Type from curee.ai:
 * Rethink Sans for headings, Geist for text, JetBrains Mono for data. Fonts are OFL-1.1
 * (fonts/LICENSE-*.txt), latin subset.
 */

@font-face {
  font-family: "Rethink Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400 800;
  src: url("fonts/rethink-sans-latin-wght-normal.woff2") format("woff2-variations");
}

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/geist-latin-wght-normal.woff2") format("woff2-variations");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations");
}

:root {
  color-scheme: light;

  --c-canvas: #e7e9e3;
  --c-app: #f6f7f3;
  --c-surface: #ffffff;
  --c-surface-soft: #f7f8f5;
  --c-panel: #f1f2ee;
  --c-panel-strong: #e4e6e0;
  --c-hover: rgba(35, 34, 34, 0.06);
  --c-press: rgba(35, 34, 34, 0.1);
  --c-border: #d5d8d1;
  --c-border-strong: #c3c6bf;
  --c-ink: #232222;
  --c-ink-strong: #0d0d0d;
  --c-muted: #5c697b;
  --c-subtle: #626b76;
  --c-on-ink: #ffffff;
  --c-focus: #3d5f76;

  --c-green: #2f6f5e;
  --c-green-bg: #ddebe4;
  --c-amber: #8a5314;
  --c-amber-bg: #f3e4cc;
  --c-red: #9d2e2e;
  --c-red-bg: #f0d8d8;
  --c-blue: #3d5f76;
  --c-blue-bg: #dde6ea;

  --shadow-subtle: 0 1px 2px rgba(13, 13, 13, 0.05);
  --shadow-card: 0 1px 2px rgba(13, 13, 13, 0.04), 0 8px 24px rgba(13, 13, 13, 0.06);
  --shadow-menu: 0 12px 32px rgba(13, 13, 13, 0.14), 0 2px 6px rgba(13, 13, 13, 0.06);

  --font-display: "Rethink Sans", "Geist", system-ui, sans-serif;
  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
}

/* Dark: follows the system unless the page sets data-theme="light" or "dark" on <html>. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --c-canvas: #101312;
    --c-app: #131715;
    --c-surface: #181c1a;
    --c-surface-soft: #1b201d;
    --c-panel: #202522;
    --c-panel-strong: #2a302c;
    --c-hover: rgba(228, 232, 227, 0.06);
    --c-press: rgba(228, 232, 227, 0.1);
    --c-border: #2d3430;
    --c-border-strong: #3f4742;
    --c-ink: #e4e8e3;
    --c-ink-strong: #f3f5f1;
    --c-muted: #a0a9a2;
    --c-subtle: #858e88;
    --c-on-ink: #0d0d0d;
    --c-focus: #8fb3c9;

    --c-green: #6cc3a3;
    --c-green-bg: #16302a;
    --c-amber: #e0a55f;
    --c-amber-bg: #33271b;
    --c-red: #f08a82;
    --c-red-bg: #3b1f1f;
    --c-blue: #8db5cf;
    --c-blue-bg: #1a2a34;

    --shadow-subtle: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-menu: 0 12px 32px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.3);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --c-canvas: #101312;
  --c-app: #131715;
  --c-surface: #181c1a;
  --c-surface-soft: #1b201d;
  --c-panel: #202522;
  --c-panel-strong: #2a302c;
  --c-hover: rgba(228, 232, 227, 0.06);
  --c-press: rgba(228, 232, 227, 0.1);
  --c-border: #2d3430;
  --c-border-strong: #3f4742;
  --c-ink: #e4e8e3;
  --c-ink-strong: #f3f5f1;
  --c-muted: #a0a9a2;
  --c-subtle: #858e88;
  --c-on-ink: #0d0d0d;
  --c-focus: #8fb3c9;

  --c-green: #6cc3a3;
  --c-green-bg: #16302a;
  --c-amber: #e0a55f;
  --c-amber-bg: #33271b;
  --c-red: #f08a82;
  --c-red-bg: #3b1f1f;
  --c-blue: #8db5cf;
  --c-blue-bg: #1a2a34;

  --shadow-subtle: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-menu: 0 12px 32px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.3);
}

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

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--c-canvas);
  color: var(--c-ink);
  font: 14px/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--c-ink-strong);
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
}

/* Wordmark: the Curee mark (a CSS mask, so it takes the text color) and "curee ai". */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--c-ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.wordmark .mark,
.mark {
  display: inline-block;
  width: 24px;
  height: 22px;
  background: currentColor;
  -webkit-mask: url("curee-mark.svg") center / contain no-repeat;
  mask: url("curee-mark.svg") center / contain no-repeat;
}

.wordmark .ai {
  color: var(--c-subtle);
  font-weight: 400;
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.muted {
  color: var(--c-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--c-ink);
  font: 500 14px/1 var(--font-sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.btn-primary {
  background: var(--c-ink-strong);
  color: var(--c-on-ink);
}

.btn-primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--c-ink-strong) 84%, var(--c-canvas));
}

.btn-secondary {
  border-color: var(--c-border);
  background: var(--c-surface);
  box-shadow: var(--shadow-subtle);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--c-panel);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--c-hover);
}

.btn-danger {
  color: var(--c-red);
}

.btn-danger:hover:not(:disabled) {
  background: var(--c-red-bg);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  height: 44px;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

/* Form fields */
.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 13px;
  font-weight: 500;
}

.input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius);
  background: var(--c-surface);
  color: var(--c-ink);
  font: 400 14px var(--font-sans);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.input:focus {
  outline: none;
  border-color: var(--c-focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-focus) 22%, transparent);
}

.input[readonly] {
  background: var(--c-panel);
  color: var(--c-muted);
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--c-muted);
  font-size: 13px;
  cursor: pointer;
}

.checkbox input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--c-ink-strong);
}

/* Avatars: initials on a tinted disc */
.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--c-panel-strong);
  color: var(--c-ink);
  font: 600 13px/1 var(--font-sans);
  letter-spacing: 0.02em;
}

.avatar.tint-0 {
  background: var(--c-blue-bg);
  color: var(--c-blue);
}

.avatar.tint-1 {
  background: var(--c-green-bg);
  color: var(--c-green);
}

.avatar.tint-2 {
  background: var(--c-amber-bg);
  color: var(--c-amber);
}

.avatar.tint-3 {
  background: var(--c-panel-strong);
  color: var(--c-ink);
}

.avatar.sm {
  width: 26px;
  height: 26px;
  font-size: 10.5px;
}

.avatar.lg {
  width: 48px;
  height: 48px;
  font-size: 16px;
}

/* Status pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--c-panel);
  color: var(--c-muted);
  font: 500 12px/1 var(--font-sans);
  white-space: nowrap;
}

.pill.dark {
  background: var(--c-ink-strong);
  color: var(--c-on-ink);
}

.pill.green {
  background: var(--c-green-bg);
  color: var(--c-green);
}

.pill.amber {
  background: var(--c-amber-bg);
  color: var(--c-amber);
}

.pill.red {
  background: var(--c-red-bg);
  color: var(--c-red);
}

.pill.blue {
  background: var(--c-blue-bg);
  color: var(--c-blue);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
}
