/* REPS design tokens. An Offsset product: Offsset's dark ground, ink and signal red,
   plus REPS-specific tokens for habits, streaks and the four sections. */
:root {
  /* Colour (Offsset base) */
  --ground: #07080a;          /* app background */
  --surface: #0f1115;         /* cards, done rows, selected states */
  --surface-raised: #181b21;  /* pressed / focused */
  --hairline: #1c1f24;        /* 1px borders, empty dots */
  --dot-empty: #15181d;       /* empty days in calendars */
  --ink: #f2f2f0;             /* text, DONE dots */
  --muted: #8a8d93;           /* secondary text, labels (4.5:1 on ground) */
  --signal: #ff3b2f;          /* TODAY, the primary button, the S in the logo */
  --signal-text: #ff5a4f;     /* red text under 24px (slightly lighter for contrast) */

  /* REPS meaning */
  --done: var(--ink);                                   /* a kept habit / completed day */
  --done-glow: 0 0 10px rgba(242, 242, 240, 0.55);      /* soft glow on done dots only */
  --today: var(--signal);
  --today-glow: 0 0 10px rgba(255, 59, 47, 0.8);
  --todo: var(--hairline);                              /* not done yet */

  /* Type */
  --font-display: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font-sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --text-hero: 44px;          /* "4/6" score */
  --text-title: 32px;         /* screen titles: Today, Progress */
  --text-card: 20px;          /* card titles */
  --text-body: 16px;
  --text-small: 14px;
  --text-label: 12px;         /* mono, uppercase, 0.16em */
  --tracking-display: -0.04em;
  --tracking-label: 0.16em;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;            /* screen side padding */
  --space-6: 24px;            /* gap between sections */
  --space-7: 40px;

  /* Shape and touch */
  --radius: 0px;              /* square everything, like all Offsset products */
  --radius-dot: 9999px;       /* dots only */
  --row-height: 52px;         /* habit rows */
  --tap-min: 44px;            /* minimum touch target */
  --button-height: 48px;

  /* iPhone safe areas (standalone web app) */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  color-scheme: dark;
}

/* Mono section label: "R · REPEAT · HABITS" */
.label {
  font: 500 var(--text-label)/1.2 var(--font-mono);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--muted);
}

/* Habit / day dots */
.dot { width: 14px; height: 14px; border-radius: var(--radius-dot); background: var(--todo); flex: none; }
.dot.done { background: var(--done); box-shadow: var(--done-glow); }
.dot.today { background: var(--today); box-shadow: var(--today-glow); }

/* Buttons */
.btn-primary {
  height: var(--button-height); padding: 0 18px; border: 0; border-radius: var(--radius);
  background: var(--signal); color: var(--ground); font: 700 16px/1 var(--font-sans);
}
.btn-secondary {
  height: var(--button-height); padding: 0 18px; border: 1px solid var(--hairline); border-radius: var(--radius);
  background: transparent; color: var(--ink); font: 600 16px/1 var(--font-sans);
}
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
