/* Slipstream - themed for The Lollypop Agency community offering.
   Palette + type lifted from thelollypopagency.co.za design tokens:
   charcoal #343434 / off-white #fbfbfb, magenta primary #e13bba, rainbow accents,
   Red Hat Display (display, 900) + Inclusive Sans (body & labels). */
:root {
  /* Lollypop brand tokens */
  --base-dark: #343434;
  --base-light: #fbfbfb;
  --primary: #e13bba;        /* magenta - reward / GO / active / streak / success */
  --on-primary: #fbfbfb;
  --secondary: #4467dd;      /* blue */
  --tertiary: #fbda25;       /* yellow */
  --amber: #e09952;          /* caution / mid */
  --coral: #cf4662;          /* low / max effort */

  /* Dark surfaces derived from the brand charcoal */
  --bg-0: #2b2b2b;           /* screen background (a touch under base-dark) */
  --bg-1: #383838;           /* cards / panels (Lollypop dark bg-accent) */
  --bg-2: #404040;           /* inputs / unfilled meter segments (bg-accent-2) */
  --bg-tabbar: #242424;      /* bottom tab bar */
  --bg-inset: #4a4a4a;       /* unfilled pips / tracks */

  --text: #fbfbfb;
  --text-mut: #a8a8a8;
  --text-dim: #8a8a8a;
  --text-faint: #707070;

  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);

  /* primary tints (magenta) used for selected / reacted states */
  --primary-soft: rgba(225, 59, 186, 0.14);
  --primary-edge: rgba(225, 59, 186, 0.5);

  --gradient-rainbow: linear-gradient(90deg, #cf4662 10%, #fbda25 30%, #62c95c 50%, #08bccb 75%, #a977d5 90%);

  --font-display: 'Red Hat Display', 'Segoe UI', system-ui, sans-serif;
  --font-base: 'Inclusive Sans', system-ui, sans-serif;

  --shell-w: 440px;
  --radius-card: 0.85rem;
  --radius-input: 0.4rem;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #1f1f1f;
  color: var(--text);
  font-family: var(--font-base);
  letter-spacing: -0.01ch;
  -webkit-font-smoothing: antialiased;
}

/* Label layer - Lollypop uses Inclusive Sans uppercase (not a mono font). */
.mono,
.eyebrow,
.section-label {
  font-family: var(--font-base);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}
.eyebrow { font-size: 10px; color: var(--text-dim); }
.section-label { font-size: 10px; color: var(--text-mut); margin-bottom: 10px; }

a { color: inherit; text-decoration: none; }

/* ---- App shell: a phone-width column, full-bleed on mobile ---- */
.shell {
  position: relative;
  width: 100%;
  max-width: var(--shell-w);
  height: 100vh;
  height: 100dvh;        /* fixed viewport height so the tab bar pins */
  margin: 0 auto;
  background: var(--bg-0);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (min-width: 480px) {
  .shell { box-shadow: 0 0 80px rgba(0, 0, 0, 0.55); }
}

.screen {
  flex: 1;
  min-height: 0;         /* lets the scroll area shrink instead of pushing the tab bar off */
  overflow-y: auto;
  padding: 34px 18px 16px;
  -webkit-overflow-scrolling: touch;
}
.screen::-webkit-scrollbar { width: 0; }

/* ---- Common bits ---- */
.daystrip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.daystrip .phase { color: var(--primary); }
.greeting {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.04ch;
  line-height: 1.1;
  margin: 0 0 16px;
}
.h-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.04ch;
  line-height: 1.1;
  margin: 0 0 4px;
}
.h-sub { margin-bottom: 20px; }

.card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 14px;
}

/* ---- Buttons ---- */
.btn-primary {
  height: 54px;
  border-radius: var(--radius-input);
  background: var(--primary);
  color: var(--on-primary);
  border: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: -0.02ch;
  cursor: pointer;
}
.btn-primary:disabled {
  background: var(--bg-2);
  color: var(--text-faint);
  cursor: not-allowed;
}
.btn-block { padding: 10px 18px 12px; }
.btn-danger {
  height: 48px;
  width: 100%;
  border-radius: var(--radius-input);
  background: transparent;
  color: var(--coral);
  border: 1px solid var(--coral);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
}

/* ---- Your sessions list ---- */
.sess-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.sess-row .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.sess-body { flex: 1; min-width: 0; }
.sess-title { font-size: 14.5px; font-weight: 700; }
.sess-detail { font-size: 12.5px; color: var(--text-mut); }
.sess-date {
  font-family: var(--font-base);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  color: var(--text-faint);
  margin-top: 3px;
}
.sess-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.sess-actions form { margin: 0; }
.sess-edit, .sess-del {
  font-family: var(--font-base);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 11px;
  border-radius: var(--radius-input);
  cursor: pointer;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
}
.sess-edit { color: var(--text); }
.sess-del { color: var(--coral); border-color: rgba(207, 70, 98, 0.4); }

/* Edit affordance on own feed items */
.edit-link {
  font-family: var(--font-base);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
}
.edit-link:hover { color: var(--primary); }

/* ---- Streak card ---- */
.streak-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}
.streak-num { display: flex; align-items: baseline; gap: 8px; }
.streak-num .n {
  font-family: var(--font-display);
  font-size: 60px;
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: -0.04ch;
  color: var(--primary);
}
.streak-flame { fill: var(--primary); animation: flamePulse 2.4s ease-in-out infinite; }
.streak-meta { flex: 1; }
.streak-status { font-size: 13px; font-weight: 700; margin-top: 3px; }
.streak-pips { display: flex; gap: 4px; margin-top: 9px; }
.streak-pips > span { flex: 1; height: 5px; border-radius: 3px; background: var(--bg-inset); }
.streak-pips > span.on { background: var(--primary); }

/* ---- Readiness ring ---- */
.ring {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ring .hole {
  border-radius: 50%;
  background: var(--bg-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
}
.ready-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  cursor: pointer;
}
.ready-card .ring { width: 50px; height: 50px; }
.ready-card .ring .hole { width: 38px; height: 38px; font-size: 15px; }
.ready-card .meta { flex: 1; }
.ready-card .meta .t { font-size: 15px; font-weight: 700; }
.ready-card .meta .s { font-size: 12px; color: var(--text-mut); }

/* ---- About the phases ---- */
.about-intro { font-size: 14px; line-height: 1.65; color: var(--text-mut); margin: 0 0 18px; }
.about-intro strong { color: var(--text); font-weight: 700; }
.phase-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 15px;
  margin-bottom: 10px;
}
.phase-card.now { border-color: var(--primary-edge); background: var(--primary-soft); }
.phase-card-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.phase-card-head .pnum {
  font-family: var(--font-base); text-transform: uppercase; letter-spacing: 0.1em;
  font-size: 9px; font-weight: 700; color: var(--text-dim);
}
.phase-card-head .pname { font-family: var(--font-display); font-weight: 900; font-size: 18px; letter-spacing: -0.02ch; }
.phase-card-head .pweeks { font-size: 11px; color: var(--text-mut); margin-left: auto; }
.phase-card-head .pweeks + .pacer { margin-left: 6px; }
.phase-target {
  font-family: var(--font-base); text-transform: uppercase; letter-spacing: 0.06em;
  font-size: 10px; font-weight: 700; color: var(--primary); margin-bottom: 8px;
}
.phase-intent { font-size: 13.5px; line-height: 1.6; color: #cfcfcf; margin: 0; }

/* ---- Phase timeline ---- */
.phases { display: flex; gap: 6px; margin-bottom: 18px; }
.phase-col { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.phase-col .tag { font-family: var(--font-base); text-transform: uppercase; font-size: 8px; font-weight: 700; letter-spacing: 0.08em; }
.phase-col .bar { height: 4px; border-radius: 3px; }
.phase-col .name { font-size: 11px; font-weight: 700; }

/* ---- Target tiles ---- */
.tiles { display: flex; gap: 10px; margin-bottom: 18px; }
.tile {
  flex: 1;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 13px;
}
.tile .val { font-family: var(--font-display); font-size: 22px; font-weight: 900; margin: 4px 0; }
.tile .val small { font-size: 13px; color: var(--text-mut); font-weight: 500; font-family: var(--font-base); }
.tile .track { height: 4px; border-radius: 3px; background: var(--bg-inset); }
.tile .track > i { display: block; height: 100%; border-radius: 3px; background: var(--primary); }

/* ---- Feed ---- */
.avatar {
  border-radius: 50%;
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  flex-shrink: 0;
}
.feed-mini {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.feed-mini .avatar { width: 32px; height: 32px; font-size: 11px; }
.feed-mini .who { font-size: 13.5px; font-weight: 700; flex: 1; min-width: 0; }
.feed-mini .who span { color: var(--text-mut); font-weight: 400; }
.feed-mini .ago { font-family: var(--font-base); font-size: 10px; color: var(--text-faint); }

.empty { padding: 24px 4px; color: var(--text-mut); font-size: 13.5px; line-height: 1.6; }

.feed-item {
  display: flex;
  gap: 11px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.feed-item .avatar { width: 36px; height: 36px; font-size: 12px; }
.feed-body { flex: 1; min-width: 0; }
.feed-head { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.feed-head .name { font-weight: 700; font-size: 14.5px; }
.feed-head .dot { width: 6px; height: 6px; border-radius: 50%; }
.feed-head .disc { font-family: var(--font-base); text-transform: uppercase; letter-spacing: 0.08em; font-size: 10px; color: var(--text-mut); }
.feed-head .ago { font-family: var(--font-base); font-size: 10px; color: var(--text-faint); margin-left: auto; }
.feed-title { font-size: 14px; font-weight: 700; color: var(--text); }
.feed-detail { font-size: 12.5px; color: var(--text-mut); margin-bottom: 10px; }

.reacts { display: flex; gap: 7px; }
.react {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--line-2);
}
.react .count { font-family: var(--font-base); font-size: 10px; font-weight: 700; color: var(--text-mut); }
.react.on { background: var(--primary-soft); border-color: var(--primary-edge); }

/* ---- Log form ---- */
/* ---- Log: collapsible date picker ---- */
.logdate { margin-bottom: 18px; }
.logdate-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  padding: 11px 13px;
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-base);
  font-size: 13px;
  font-weight: 700;
}
.logdate-toggle .cal { color: var(--primary); flex-shrink: 0; }
.logdate-toggle .chev { margin-left: auto; color: var(--text-mut); transition: transform 0.2s ease; }
.logdate-toggle.open .chev { transform: rotate(180deg); }
.logdate-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 var(--radius-input) var(--radius-input);
  padding: 10px 12px;
}
/* hidden attribute must beat the display:flex above (collapsed by default) */
.logdate-body[hidden] { display: none; }
.logdate-body button {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-input);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logdate-body button:disabled { opacity: 0.35; cursor: not-allowed; }
.logdate-body .d { font-weight: 700; font-size: 15px; }

.disc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 22px; }
.disc {
  border-radius: var(--radius-card);
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: var(--bg-1);
}
.disc span { font-weight: 700; font-size: 15px; }
.disc.sel { border: 1.5px solid var(--primary); background: var(--primary-soft); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.chip {
  padding: 10px 14px;
  border-radius: var(--radius-input);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  min-width: 54px;
  text-align: center;
  background: var(--bg-1);
  color: #d8d8d8;
  border: 1px solid var(--line-2);
}
.chip.sel { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

.meter-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.meter-head .read { font-size: 13px; font-weight: 700; }
.meter { display: flex; gap: 5px; margin-bottom: 22px; }
.meter .seg { flex: 1; height: 32px; border-radius: var(--radius-input); cursor: pointer; background: var(--bg-2); }

.feels { display: flex; gap: 7px; margin-bottom: 26px; }
.feel {
  flex: 1;
  text-align: center;
  padding: 11px 2px;
  border-radius: var(--radius-input);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--bg-1);
  color: #b8b8b8;
  border: 1px solid var(--line-2);
}
.feel.sel { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-edge); }

.splits-input {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-input);
  color: var(--text);
  font-family: var(--font-base);
  font-size: 14px;
  padding: 12px 14px;
  margin-bottom: 26px;
}
.splits-input::placeholder { color: var(--text-faint); }
.splits-input:focus { outline: none; border-color: var(--primary); }

/* ---- Recovery ---- */
.big-ring { display: flex; flex-direction: column; align-items: center; margin-bottom: 24px; }
.big-ring .ring { width: 128px; height: 128px; }
.big-ring .ring .hole { width: 104px; height: 104px; background: var(--bg-0); flex-direction: column; }
.big-ring .ring .hole .v { font-family: var(--font-display); font-size: 44px; font-weight: 900; line-height: 1; }
.big-ring .ring .hole .lbl {
  font-family: var(--font-base);
  text-transform: uppercase;
  font-size: 9px; letter-spacing: 0.16em; color: var(--text-mut); margin-top: 3px;
}
.big-ring .status { margin-top: 12px; font-size: 16px; font-weight: 700; }
.dots { display: flex; gap: 7px; margin-bottom: 20px; }
.dots .dot { flex: 1; height: 34px; border-radius: var(--radius-input); cursor: pointer; background: var(--bg-2); }

/* ---- Boards ---- */
.seg {
  display: flex;
  gap: 5px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  padding: 4px;
  margin-bottom: 8px;
}
.seg a {
  flex: 1;
  text-align: center;
  padding: 9px 4px;
  border-radius: var(--radius-input);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--text-mut);
}
.seg a.on { background: var(--primary); color: var(--on-primary); }
.board-caption { font-size: 12.5px; color: var(--text-mut); }
.repel-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.seg-sm { margin-bottom: 0; flex-shrink: 0; }
.seg-sm a { padding: 6px 10px; font-size: 11px; }

/* Pacer (bot) badge */
.pacer {
  display: inline-block;
  font-family: var(--font-base);
  text-transform: uppercase;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--primary-edge);
  border-radius: 999px;
  padding: 1px 6px;
  vertical-align: middle;
}
.board-rows { display: flex; flex-direction: column; gap: 8px; }
.board-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  border-radius: var(--radius-card);
  position: relative;
  overflow: hidden;
  background: var(--bg-1);
  border: 1px solid var(--line);
}
.board-row.me { background: var(--primary-soft); border-color: var(--primary-edge); }
.board-row .barfill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(225, 59, 186, 0.08); }
.board-row .rank { font-family: var(--font-display); font-size: 15px; font-weight: 900; width: 22px; position: relative; color: var(--text-mut); }
.board-row.lead .rank, .board-row.me .rank { color: var(--primary); }
.board-row .avatar { width: 32px; height: 32px; font-size: 11px; color: #d8d8d8; position: relative; }
.board-row .name { flex: 1; font-size: 15px; font-weight: 700; position: relative; }
.board-row .value { font-family: var(--font-display); font-size: 16px; font-weight: 900; position: relative; }
.board-row .value small { font-size: 11px; color: var(--text-mut); font-family: var(--font-base); font-weight: 400; }

/* ---- Tab bar ---- */
.tabbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding: 8px 8px 24px;
  background: var(--bg-tabbar);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  padding: 4px 0;
  color: var(--text-dim);
}
.tabbar a.on { color: var(--primary); }
.tabbar a .lbl { font-family: var(--font-base); text-transform: uppercase; font-size: 8.5px; font-weight: 700; letter-spacing: 0.05em; }

/* ---- Toast ---- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--on-primary);
  padding: 11px 18px;
  border-radius: var(--radius-input);
  font-weight: 700;
  font-size: 13.5px;
  white-space: nowrap;
  z-index: 40;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  animation: toastUp 0.35s ease;
}

/* ---- Auth ---- */
.auth { padding: 64px 24px 40px; max-width: var(--shell-w); margin: 0 auto; }
.auth .brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.auth .brand .mark {
  width: 42px; height: 42px; border-radius: 12px; background: var(--bg-1);
  display: flex; align-items: center; justify-content: center;
}
.auth h1 { font-family: var(--font-display); font-size: 36px; font-weight: 900; letter-spacing: -0.04ch; margin: 0; }
.auth .lead { color: var(--text-mut); font-size: 14px; line-height: 1.6; margin: 0 0 26px; }
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-family: var(--font-base);
  text-transform: uppercase;
  font-size: 10px; letter-spacing: 0.12em; font-weight: 700;
  color: var(--text-mut); margin-bottom: 7px;
}
.field input {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-input);
  color: var(--text);
  font-family: var(--font-base);
  font-size: 15px;
  padding: 13px 14px;
}
.field input:focus { outline: none; border-color: var(--primary); }
.row-2 { display: flex; gap: 12px; }
.row-2 .field { flex: 1; }
.auth .alt { margin-top: 20px; font-size: 13.5px; color: var(--text-mut); text-align: center; }
.auth .alt a { color: var(--primary); font-weight: 700; }
.val-summary { color: var(--coral); font-size: 13px; margin-bottom: 16px; }
.val-summary ul { margin: 0; padding-left: 18px; }

@keyframes toastUp { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes flamePulse { 0%, 100% { opacity: 0.85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.07); } }

@media (prefers-reduced-motion: reduce) {
  .streak-flame { animation: none; }
  .toast { animation: none; }
  .logdate-toggle .chev { transition: none; }
}
