/* The You're in page (Joined board), the privacy page and the founder dashboard. Theme tokens are set here per body class. */
body.night {
  --bg: #10172A; --card: #1E2A47; --inset: #172038; --text: #FFF8EC; --muted: #B7C0D6; --track: #2E3B60; --fill: #FFD27A;
  --highlight: #FFD27A; --control: #6B7A9E; --secondary-line: #B7C0D6; --primary: #FFD27A; --on-primary: #1E2A47;
  --ok-bg: #1F3B35; --ok-text: #CDEBDD; --focus: #FFD27A; --link: #FFD27A; --link-hover: #FFE7C2; --wordmark: #FFD27A;
  --error: #FFE7C2; --line: #2E3B60; --card-shadow: none;
}
body.cream {
  --bg: #FFF8EC; --card: #FFFFFF; --inset: #FFF1D6; --text: #1E2A47; --muted: #4A5675; --track: #EADFC8; --fill: #F4A52C;
  --highlight: #C9432F; --control: #7A8399; --secondary-line: #1E2A47; --primary: #1E2A47; --on-primary: #FFF8EC;
  --ok-bg: #EAF2EE; --ok-text: #1E2A47; --focus: #C9432F; --link: #1E2A47; --link-hover: #C9432F; --wordmark: #1E2A47;
  --error: #B33A26; --line: #E8DDCB; --card-shadow: 0 14px 40px rgba(30, 42, 71, 0.10);
}

/* ---- Shared bits ---- */
.j-header { max-width: 1240px; margin: 0 auto; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.j-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.j-brand img { width: 44px; height: 44px; object-fit: contain; }
.j-brand span { font-family: "Fredoka", "Nunito", sans-serif; font-weight: 700; font-size: 23px; color: var(--wordmark); }
.j-footer { max-width: 1240px; margin: 0 auto; padding: 24px 24px 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 14px; font-weight: 600; }
.j-card { padding: 26px; border-radius: 24px; background: var(--card); box-shadow: var(--card-shadow); }
.j-muted-sm { color: var(--muted); font-size: 15px; font-weight: 600; line-height: 1.45; margin: 0; }
.j-primary {
  display: inline-flex; align-items: center; justify-content: center; align-self: flex-start; min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 0; background: var(--primary); color: var(--on-primary); font-weight: 800; font-size: 16px; cursor: pointer; text-decoration: none;
}
.j-primary:hover { color: var(--on-primary); }
.j-primary:disabled { opacity: 0.55; cursor: not-allowed; }
.j-secondary {
  min-height: 48px; padding: 0 20px; border-radius: 14px; border: 1.5px solid var(--secondary-line);
  background: transparent; color: var(--text); font-weight: 800; font-size: 15px; cursor: pointer;
}
.j-error-text { margin: 0; color: var(--error); font-weight: 800; font-size: 15px; }
.j-error-text:empty { display: none; }

/* ---- You're in ---- */
.j-loading { max-width: 1240px; margin: 0 auto; padding: 24px; font-weight: 700; }
.j-error { max-width: 480px; margin: 24px auto 96px; padding: 36px 28px; border-radius: 28px; text-align: center; background: var(--card); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.j-error h1 { margin: 0; font-size: 32px; line-height: 1.1; }
.j-error p { margin: 0 0 8px; font-size: 17px; line-height: 1.5; color: var(--muted); }
.j-error .j-primary { align-self: center; }

.j-main { max-width: 1240px; margin: 0 auto; padding: 24px 24px 64px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 48px; }
.j-left { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.j-right { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.j-intro { display: flex; flex-direction: column; gap: 10px; }
.j-intro h1 { margin: 0; font-size: clamp(36px, 4vw, 54px); line-height: 1.05; }
.j-intro p { margin: 0; color: var(--muted); font-size: 18px; line-height: 1.5; }
.j-intro .j-unsub { padding: 10px 14px; border-radius: 14px; background: var(--inset); color: var(--text); font-size: 15px; font-weight: 700; }

.j-ticket { position: relative; aspect-ratio: 3 / 2; border-radius: 28px; overflow: hidden; box-shadow: var(--card-shadow); }
.j-ticket img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.j-ticket-text {
  position: absolute; left: 15%; top: 31%; width: 52%; height: 40%; transform: rotate(-9.5deg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #1E2A47; text-align: center;
}
.j-ticket-small { font-weight: 800; font-size: clamp(9px, 1vw, 14px); letter-spacing: 0.18em; }
.j-ticket-num { font-family: "Fredoka", sans-serif; font-weight: 700; font-size: clamp(36px, 5.4vw, 80px); line-height: 1; }

.j-progress { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 22px; }
.j-progress-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-weight: 800; font-size: 15px; }
.j-highlight { color: var(--highlight); }
.j-track { height: 14px; border-radius: 999px; background: var(--track); overflow: hidden; }
.j-fill { height: 100%; width: 0; border-radius: 999px; background: var(--fill); transition: width .5s ease; }
.j-progress .j-muted-sm { font-size: 14px; }

.j-step { display: flex; flex-direction: column; gap: 18px; }
.j-step-head { display: flex; align-items: center; gap: 14px; }
.j-step-head > div { flex: 1 1 240px; display: flex; flex-direction: column; gap: 2px; }
.j-step h2 { margin: 0; font-size: 23px; }
.j-badge { flex: none; width: 44px; height: 44px; border-radius: 999px; background: #FFD27A; color: #1E2A47; display: grid; place-items: center; font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 20px; }
.j-badge.done { background: #CDEBDD; }

.j-questions { display: flex; flex-direction: column; gap: 20px; }
.j-questions fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.j-questions legend { padding: 0; margin-bottom: 10px; font-weight: 800; font-size: 16px; }
.j-questions legend span { color: var(--muted); font-weight: 600; }
.j-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.j-chip {
  min-height: 44px; padding: 6px 16px; border-radius: 999px; cursor: pointer; font-weight: 800; font-size: 15px; text-align: left;
  border: 1.5px solid var(--control); background: transparent; color: var(--text);
}
.j-chip[aria-pressed="true"] { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.j-done { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.j-ok { margin: 0; padding: 12px 16px; border-radius: 14px; background: var(--ok-bg); color: var(--ok-text); font-weight: 700; font-size: 15px; align-self: stretch; }

.j-link-row { display: flex; flex-wrap: wrap; gap: 8px; }
.j-link-row input {
  flex: 1 1 240px; min-width: 0; height: 48px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--control);
  background: var(--inset); color: var(--text); font-weight: 700; font-size: 16px;
}
.j-friends { margin: 0; font-weight: 800; font-size: 16px; }
.j-milestones { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.j-milestones li { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 16px; background: var(--inset); color: var(--muted); font-size: 14px; font-weight: 600; }
.j-milestones li.reached { background: var(--ok-bg); color: var(--ok-text); }
.j-ms-count { font-weight: 800; font-size: 15px; }
.j-rewards { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.j-rewards li { padding: 10px 14px; border-radius: 14px; background: var(--ok-bg); color: var(--ok-text); font-weight: 800; font-size: 15px; }
.j-rewards:not(:has(li:not([hidden]))) { display: none; }

.j-shares { display: flex; flex-wrap: wrap; gap: 10px; }
.j-share {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border-radius: 14px; cursor: pointer; text-decoration: none;
  border: 1.5px solid var(--secondary-line); background: transparent; color: var(--text); font-weight: 800; font-size: 15px;
}
.j-share:hover { color: var(--text); border-color: var(--text); }
.j-share.shared { border-color: var(--ok-bg); background: var(--ok-bg); color: var(--ok-text); }

@media (max-width: 600px) {
  .j-header, .j-main, .j-footer, .j-loading { padding-left: 16px; padding-right: 16px; }
  .j-main { padding-top: 8px; gap: 32px; }
  .j-card { padding: 20px; }
  .j-error { margin-left: 16px; margin-right: 16px; }
}

/* ---- Privacy ---- */
.doc { max-width: 720px; margin: 0 auto; padding: 16px 24px 64px; }
.doc h1 { margin: 0 0 12px; font-size: clamp(34px, 4vw, 48px); line-height: 1.1; }
.doc h2 { margin: 36px 0 10px; font-size: 24px; }
.doc p, .doc li { font-size: 18px; line-height: 1.6; }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 14px; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.doc .lede { color: var(--muted); }
@media (max-width: 600px) { .doc { padding-left: 16px; padding-right: 16px; } }

/* ---- Founder dashboard ---- */
.admin-main { max-width: 1100px; margin: 0 auto; padding: 8px 24px 64px; display: flex; flex-direction: column; gap: 20px; }
.admin-main h1 { margin: 0; font-size: 34px; }
.admin-main h2 { margin: 0 0 12px; font-size: 22px; }
.admin-main h3 { margin: 16px 0 8px; font-size: 17px; }
.admin-main > div { display: flex; flex-direction: column; gap: 20px; }
.admin-main section { padding: 22px; border-radius: 20px; background: var(--card); box-shadow: var(--card-shadow); overflow-x: auto; }
.admin-main p { margin: 0 0 10px; line-height: 1.5; }
.admin-main table { border-collapse: collapse; width: 100%; font-size: 15px; }
.admin-main th, .admin-main td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-main th { font-weight: 800; }
.admin-main td.n, .admin-main th.n { text-align: right; font-variant-numeric: tabular-nums; }
.admin-main ul { margin: 0; padding-left: 18px; }
.admin-main .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin-main input[type="email"] { flex: 1 1 260px; min-width: 0; height: 44px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--control); background: var(--bg); color: var(--text); }
.admin-main button, .admin-main .j-secondary { min-height: 40px; padding: 0 14px; border-radius: 12px; }
.admin-main .big { font-family: "Fredoka", sans-serif; font-size: 28px; font-weight: 700; }
.admin-main .verdict { font-weight: 800; font-size: 18px; }
@media (max-width: 600px) { .admin-main { padding-left: 16px; padding-right: 16px; } }
