/* TopSet — Design Tokens
   Dark-first. Numbers, plates, bar diagrams.
   Accent (red-orange) reserved for AMRAP / PR / attention. */

@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700;800&display=swap');

:root {
  /* color */
  --ts-bg:         #0B0B0E;
  --ts-surface:    #15151A;
  --ts-surface-2:  #1F1F26;
  --ts-surface-3:  #2A2A33;
  --ts-border:     #2E2E38;
  --ts-border-2:   #3A3A45;
  --ts-text:       #F4F4F5;
  --ts-text-mute:  #A1A1AA;
  --ts-text-dim:   #6B6B75;
  --ts-text-strong:#FFFFFF;
  --ts-accent:     #FF4D2E;
  --ts-accent-hi:  #FF7A5E;
  --ts-accent-soft:rgba(255, 77, 46, 0.12);
  --ts-accent-line:rgba(255, 77, 46, 0.30);
  --ts-success:    #22C55E;
  --ts-danger:     #EF4444;
  --ts-warning:    #F59E0B;

  /* type */
  --ts-ui:   'Inter Tight', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --ts-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  /* spacing */
  --ts-1: 4px; --ts-2: 8px; --ts-3: 12px; --ts-4: 16px;
  --ts-5: 20px; --ts-6: 24px; --ts-8: 32px; --ts-10: 40px;
  --ts-12: 48px; --ts-16: 64px;

  /* radius */
  --ts-r-1: 4px; --ts-r-2: 8px; --ts-r-3: 12px;
  --ts-r-4: 16px; --ts-r-5: 24px; --ts-r-pill: 999px;
}

/* base for all artboards */
.ts {
  background: var(--ts-bg);
  color: var(--ts-text);
  font-family: var(--ts-ui);
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  position: relative;
  overflow: hidden;
}

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

.ts.phone {
  width: 390px;
  height: 844px;
  border-radius: 28px;
  overflow: hidden;
}

.ts.watch-square {
  width: 198px;
  height: 242px;
  border-radius: 38px;
  background: #000;
}

.ts.watch-round {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: #000;
}

/* status bar */
.ts-status {
  height: 47px;
  padding: 0 28px 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 600 15px/1 var(--ts-ui);
  color: var(--ts-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 5;
}
.ts-status .ts-status-r { display: flex; align-items: center; gap: 5px; }
.ts-status svg { width: 16px; height: 11px; }

/* home indicator */
.ts-home {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  border-radius: 999px;
  background: var(--ts-text);
}

/* mono helpers */
.mono { font-family: var(--ts-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.04em; }
.ui   { font-family: var(--ts-ui); }

/* big numerals tightening */
.num-xl { font-family: var(--ts-mono); font-weight: 700; letter-spacing: -0.06em; }

/* meta line — used for cycle/week annotation */
.meta {
  font-family: var(--ts-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ts-text-mute);
}

/* tab bar (phone) */
.ts-tabbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 84px;
  padding: 10px 16px 28px;
  background: rgba(11,11,14,0.78);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--ts-border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 3;
}
.ts-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--ts-text-dim);
  font: 600 10px/1 var(--ts-ui);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ts-tab.active { color: var(--ts-text); }
.ts-tab svg { width: 22px; height: 22px; }

/* common button */
.ts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  padding: 0 24px;
  border-radius: var(--ts-r-3);
  border: 0;
  font: 600 16px/1 var(--ts-ui);
  letter-spacing: -0.01em;
  background: var(--ts-text);
  color: var(--ts-bg);
  cursor: pointer;
  width: 100%;
}
.ts-btn.secondary {
  background: var(--ts-surface-2);
  color: var(--ts-text);
  border: 1px solid var(--ts-border);
}
.ts-btn.ghost { background: transparent; color: var(--ts-text-mute); }
.ts-btn.amrap {
  background: var(--ts-accent);
  color: #000;
  font-weight: 700;
}
.ts-btn.sm { height: 36px; font-size: 13px; padding: 0 14px; border-radius: 10px; }

/* chip */
.ts-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--ts-surface-2);
  color: var(--ts-text);
  font: 500 11px/1 var(--ts-ui);
  letter-spacing: 0.02em;
}
.ts-chip.accent {
  background: var(--ts-accent-soft);
  color: var(--ts-accent);
  border: 1px solid var(--ts-accent-line);
}
.ts-chip.outline {
  background: transparent;
  border: 1px solid var(--ts-border);
  color: var(--ts-text-mute);
}

/* divider line — measurement / industrial style */
.rule {
  height: 1px;
  background: var(--ts-border);
  width: 100%;
}
.rule.dashed {
  background: repeating-linear-gradient(to right, var(--ts-border) 0 4px, transparent 4px 8px);
}

/* tick row — decorative measurement marks */
.ticks {
  display: flex;
  height: 6px;
  align-items: flex-end;
  gap: 3px;
}
.ticks span {
  flex: 1;
  height: 3px;
  background: var(--ts-border);
}
.ticks span:nth-child(5n+1) { height: 6px; background: var(--ts-border-2); }

/* card */
.card {
  background: var(--ts-surface);
  border: 1px solid var(--ts-border);
  border-radius: var(--ts-r-4);
  padding: 16px;
}

/* badge — small mono pill (e1RM, etc) */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--ts-surface-3);
  color: var(--ts-text);
  font: 500 11px/1 var(--ts-mono);
  letter-spacing: -0.02em;
}
.badge.accent {
  background: var(--ts-accent);
  color: #000;
  font-weight: 700;
}

/* progress dot row (onboarding) */
.dots { display: flex; gap: 6px; align-items: center; }
.dots .dot {
  height: 4px;
  border-radius: 2px;
  background: var(--ts-surface-3);
  flex: 1;
  transition: background .2s;
}
.dots .dot.done { background: var(--ts-text-mute); }
.dots .dot.now  { background: var(--ts-text); }

/* small caps key */
.kicker {
  font-family: var(--ts-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ts-text-mute);
}
.kicker.accent { color: var(--ts-accent); }

/* annotation crosshair (used on hero numbers) */
.crosshair::before,
.crosshair::after {
  content: '';
  position: absolute;
  background: var(--ts-border);
}
.crosshair::before { left: 0; right: 0; top: 0; height: 1px; }
.crosshair::after  { top: 0; bottom: 0; left: 0; width: 1px; }

/* scroll-area placeholder */
.ts-screen {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* round small icon button */
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--ts-surface-2);
  border: 1px solid var(--ts-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ts-text);
  cursor: pointer;
}

/* dim plate / loaded plate */
.plate-loaded { fill: var(--ts-text-strong); }
.plate-dim    { fill: var(--ts-surface-3); }
.plate-stroke { stroke: var(--ts-border-2); }

/* timer ring colors handled inline via SVG */

/* watch */
.ts.watch-square .w-screen,
.ts.watch-round .w-screen {
  width: 100%;
  height: 100%;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
}
.ts.watch-round .w-screen { padding: 18px; }
