/* Parrity Board's own look, loaded after Parrity's shared glass.css.
   glass.css is copied into every Parrity app, so Board's changes live here instead.
   Tokens: the Parrity Board identity (design tokens board). A gym's colour arrives as
   --gym-accent, --gym-ink, --gym-text-light and --gym-text-dark on <html>, worked out
   by brandColour() in src/rules.ts; without them the accent is Parrity's violet. */

:root {
  --pb-bg: #f4f5fb;
  --pb-surface: #ffffff;
  --pb-surface-2: #eceef6;
  --pb-line: #dfe2ee;
  --pb-text: #0a0b1a;
  --pb-muted: #5a5f78;
  --pb-faint: #696e86;
  --pb-accent: var(--gym-accent, #6a4cff);
  --pb-accent-ink: var(--gym-ink, #ffffff);
  --pb-accent-text: var(--gym-text-light, #6a4cff);
  --pb-success: #13804a;
  --pb-warning: #a14a00;
  --pb-danger: #c42330;
  --pb-gold: #f2b705;
  --pb-silver: #b8bfcc;
  --pb-bronze: #d0874e;
  --pb-gradient: linear-gradient(100deg, #4f6bff 0%, #9b6bff 45%, #f0569f 100%);
  /* The logo's colour: the gym's, else Parrity's gradient. */
  --pb-mark: var(--gym-text-light, var(--pb-gradient));
  --pb-font-marker: "Permanent Marker", "Segoe Print", "Bradley Hand", cursive;
  --pb-tap: 44px;
}
:root[data-theme="dark"] {
  --pb-bg: #0a0b1a;
  --pb-surface: #16172b;
  --pb-surface-2: #212339;
  --pb-line: #2a2c45;
  --pb-text: #f2f3fa;
  --pb-muted: #b4b8cf;
  --pb-faint: #8a90a8;
  --pb-accent: var(--gym-accent, #9d8cff);
  --pb-accent-ink: var(--gym-ink, #0a0b1a);
  --pb-accent-text: var(--gym-text-dark, #9d8cff);
  --pb-success: #3ddc84;
  --pb-warning: #ffb547;
  --pb-danger: #ff6b6f;
  --pb-gradient: linear-gradient(100deg, #7c9bff 0%, #b78cff 40%, #ff6fb5 100%);
  --pb-mark: var(--gym-text-dark, var(--pb-gradient));
  --glass: linear-gradient(180deg, rgba(30, 30, 58, .78), rgba(20, 20, 42, .62));
  --glass-flat: rgba(36, 36, 64, .7);
  --glow: rgba(157, 140, 255, .08);
}
/* glass.css's names, pointed at Board's tokens (both selectors, so dark beats glass.css's dark). */
:root, :root[data-theme="dark"] {
  --bg: var(--pb-bg);
  --text: var(--pb-text);
  --muted: var(--pb-muted);
  --faint: var(--pb-faint);
  --accent: var(--pb-accent);
  --accent-ink: var(--pb-accent-ink);
  --accent-text: var(--pb-accent-text);
  --danger: var(--pb-danger);
  --success: var(--pb-success);
  --warning: var(--pb-warning);
  --inverse: var(--pb-text);
  --inverse-ink: var(--pb-bg);
}

body { font-size: 16px; }
h1 { font-weight: 700; letter-spacing: -.035em; }
h2, h3 { font-weight: 650; }
a { color: var(--accent-text); }

/* The logo: the board mark, then "Parrity Board" with "Board" in the mark's colour. */
.brand { gap: 10px; font-size: 17px; font-weight: 700; letter-spacing: -.03em; }
.brand::before {
  width: 28px;
  height: 28px;
  border-radius: 0;
  box-shadow: none;
  background: var(--pb-mark);
  -webkit-mask: url(/brand/mark-mono.svg) center / contain no-repeat;
  mask: url(/brand/mark-mono.svg) center / contain no-repeat;
}
.brand span { font-weight: 700; color: transparent; background: var(--pb-mark); -webkit-background-clip: text; background-clip: text; }

/* Big enough to hit with a thumb between sets. */
button, .btn { min-height: var(--pb-tap); }
.chip { min-height: var(--pb-tap); }
.badge.accent { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-text); }
.badge.success { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.badge.warning { background: color-mix(in srgb, var(--warning) 14%, transparent); color: var(--warning); }

/* Medals: 1, 2, 3 on gold, silver, bronze. The number says it too, not just the colour. */
.medal {
  display: inline-grid;
  place-items: center;
  justify-self: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #0a0b1a;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 -2px 0 rgba(10, 11, 26, .18);
}
.medal.m1 { background: var(--pb-gold); }
.medal.m2 { background: var(--pb-silver); }
.medal.m3 { background: var(--pb-bronze); }

.marker { font-family: var(--pb-font-marker); font-weight: 400; letter-spacing: 0; }
