/* Light colours are for the pages clients and the public see (join page, client link, printed reports).
   The platform itself (staff and clipper portal) runs on the dark set below. */
:root {
  --red: #E2302B;
  --red-dark: #C42520;
  --red-soft: #FDECEB;
  --navy: #10141F;
  --navy-2: #1A2030;
  --navy-3: #2B3245;
  --ink: #141826;
  --body: #374151;
  --muted: #6B7280;
  --faint: #9CA3AF;
  --line: #E6E8EE;
  --line-soft: #F0F1F5;
  --bg: #F5F6F9;
  --card: #FFFFFF;
  --tint: #F8F9FB;
  --field: #FFFFFF;
  --hover: #FBFBFC;
  --track: #EEF0F4;
  --green: #15803D;
  --green-soft: #E8F7EE;
  --amber: #B45309;
  --amber-soft: #FEF3E2;
  --blue: #1D4ED8;
  --blue-soft: #E8EEFD;
  --money: #15803D;
}

body.app, body.bare, body.panel {
  --navy: #0B0C0F;
  --navy-2: #17191E;
  --navy-3: #24272E;
  --ink: #F3F4F6;
  --body: #C9CDD4;
  --muted: #8B909A;
  --faint: #5E636D;
  --line: rgba(255, 255, 255, .075);
  --line-soft: rgba(255, 255, 255, .045);
  --bg: #08090B;
  --card: #111317;
  --tint: #1A1C21;
  --field: #0F1114;
  --hover: #181A1F;
  --track: #24272E;
  --red-soft: rgba(226, 48, 43, .14);
  --green: #3DD68C;
  --green-soft: rgba(61, 214, 140, .12);
  --amber: #F5B544;
  --amber-soft: rgba(245, 181, 68, .12);
  --blue: #7AA2FF;
  --blue-soft: rgba(122, 162, 255, .14);
  --money: #3DD68C;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 14px/1.45 "Segoe UI", Inter, system-ui, -apple-system, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
img, video { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
svg.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- layout ---------- */

.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }

.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--navy); border-right: 1px solid var(--line-soft); color: var(--body);
  display: flex; flex-direction: column; padding: 18px 14px 14px;
}
.brand { display: flex; align-items: center; gap: 10px; margin: 0 6px 18px; text-decoration: none; }
.mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: var(--red); color: #fff; font-weight: 800; font-size: 17px;
  display: grid; place-items: center;
}
.brand b { color: var(--ink); font-size: 15px; display: block; line-height: 1.2; }
.brand small { font-size: 10px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; font-weight: 700; display: block; }

.navswitch { display: grid; grid-template-columns: 1fr 1fr; background: var(--navy-2); border-radius: 10px; padding: 3px; margin: 0 2px 14px; }
.navswitch button {
  border: 0; background: none; color: var(--muted); border-radius: 8px; padding: 6px 0;
  font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.navswitch button.on { background: var(--navy-3); color: var(--ink); }
.navgroup[hidden] { display: none; }

.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin-bottom: 2px; border-radius: 9px;
  font-size: 14px; color: var(--body); text-decoration: none;
}
.nav a .t { flex: 1; }
.nav a:hover { background: var(--navy-2); color: var(--ink); }
.nav a.on { background: var(--navy-2); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.nav a svg.i { color: var(--muted); }
.nav a.on svg.i { color: var(--ink); }
.nav .n { background: var(--red); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 7px; font-weight: 700; }
.nav .sec { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 16px 12px 6px; font-weight: 700; }

.me { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: var(--navy-2); border: 1px solid var(--line); border-radius: 12px; }
.av {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: var(--navy-3); color: var(--ink); font-size: 12.5px; font-weight: 700;
  display: grid; place-items: center;
}
.me .who { flex: 1; min-width: 0; }
.me b { color: var(--ink); font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.signout { background: none; border: 0; color: var(--muted); font-size: 12px; cursor: pointer; padding: 4px 2px; }
.signout:hover { color: var(--ink); }

.mobilebar { display: none; }

.main { padding: 22px 28px 48px; min-width: 0; width: 100%; max-width: 1560px; }

.top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.top h1 { font-size: 23px; letter-spacing: -.01em; line-height: 1.2; }
.top .sub { color: var(--muted); font-size: 13px; }
.crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 3px; }
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--ink); text-decoration: underline; }
.grow { flex: 1; }

.search input { width: 260px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--red); background: var(--red); color: #fff;
  border-radius: 9px; padding: 8px 14px; line-height: 1.2;
  font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn.ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--hover); border-color: var(--faint); }
.btn.dark { background: var(--navy-3); border-color: var(--navy-3); color: var(--ink); }
.btn.dark:hover { background: var(--line); }
.btn.green { background: #16A34A; border-color: #16A34A; color: #fff; }
.btn.green:hover { background: #128a3f; border-color: #128a3f; }
.btn.outline-red { background: transparent; color: #FF6B66; border-color: rgba(226, 48, 43, .6); }
.btn.outline-red:hover { background: var(--red-soft); }
.btn.outline-green { background: transparent; color: var(--green); border-color: rgba(61, 214, 140, .45); }
.btn.outline-green:hover { background: var(--green-soft); }
.btn.small { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 12.5px; }
.linkish:hover { color: var(--ink); }
.inline { display: inline; }

/* ---------- cards & numbers ---------- */

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; min-width: 0; }
.card + .card { margin-top: 16px; }
.card > h2 { font-size: 15px; display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.card > h2 span, .card > h2 small { font-size: 12px; color: var(--muted); font-weight: 500; }
.card > h2 a { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.card.warn-edge { border-color: rgba(245, 181, 68, .55); }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis .card + .card { margin-top: 0; }
.k .lbl { font-size: 11.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.k .lbl span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.k .val { font-size: 26px; font-weight: 800; margin: 8px 0 6px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.k .val small { font-size: 14px; color: var(--muted); font-weight: 500; }
.k .foot { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* Lumina-style stats strip */
.statbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 16px; overflow: hidden; }
.statbar > div { padding: 16px 18px; border-left: 1px solid var(--line); min-width: 0; }
.statbar > div:first-child { border-left: 0; }
.statbar span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.statbar b { display: block; font-size: 24px; font-weight: 800; margin-top: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.statbar b.money { color: var(--money); }

.linkbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.linkbar > span { font-size: 12.5px; color: var(--muted); }
.linkbar .pill { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 5px 6px 5px 12px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }

.bar { height: 7px; background: var(--track); border-radius: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--red); border-radius: 6px; }
.bar i.amber { background: #F59E0B; }
.bar i.green { background: #22C55E; }
.bar i.blue { background: #3B82F6; }
.up { color: var(--green); font-weight: 600; }
.down { color: var(--amber); font-weight: 600; }
.money { color: var(--money); }

.cols { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.cols.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols .card + .card { margin-top: 0; }
.cols > div > .card + .card { margin-top: 16px; }

.mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mini div { background: var(--tint); border-radius: 10px; padding: 10px 12px; font-size: 12px; color: var(--muted); }
.mini b { display: block; color: var(--ink); font-size: 18px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.note { margin-top: 12px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.callout { background: var(--tint); border-radius: 10px; padding: 12px 14px; font-size: 13px; color: var(--body); line-height: 1.5; }
.callout.warn { background: var(--amber-soft); color: var(--amber); }
.callout.good { background: var(--green-soft); color: var(--green); }
.callout + .callout { margin-top: 10px; }

dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; font-size: 13px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; text-align: right; font-weight: 500; overflow-wrap: anywhere; }

/* ---------- tables ---------- */

.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; color: var(--muted); font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: .06em; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
td { padding: 10px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td b, td a.strong { font-weight: 600; }
td small { color: var(--muted); display: block; font-size: 11.5px; margin-top: 1px; }
td a { text-decoration: none; }
td a:hover { text-decoration: underline; }
tbody tr:hover td { background: var(--hover); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
th.num { text-align: right; }
.nowrap { white-space: nowrap; }

.prog { display: flex; align-items: center; gap: 8px; min-width: 200px; }
.prog .bar { flex: 1; }
.prog em { font-style: normal; font-size: 12px; color: var(--body); min-width: 92px; text-align: right; white-space: nowrap; }

.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.pager .btns { display: flex; gap: 8px; }

/* ---------- chips ---------- */

.st { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.st.ok { background: var(--green-soft); color: var(--green); }
.st.risk { background: var(--amber-soft); color: var(--amber); }
.st.done { background: var(--blue-soft); color: var(--blue); }
.st.bad { background: var(--red-soft); color: #FF6B66; }
.st.muted { background: var(--tint); color: var(--muted); }
:root .st.bad { color: var(--red); }
body.app .st.bad, body.panel .st.bad { color: #FF6B66; }

.chip { display: inline-block; font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 6px; letter-spacing: .01em; }
.chip.blue { background: var(--blue-soft); color: var(--blue); }
.chip.green { background: var(--green-soft); color: var(--green); }
.chip.red { background: var(--red-soft); color: #FF6B66; }
.chip.amber { background: var(--amber-soft); color: var(--amber); }
.chip.muted { background: var(--tint); color: var(--muted); }

/* ---------- list rows ---------- */

.q { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; text-decoration: none; }
.q:last-child { border-bottom: 0; }
a.q:hover .who b { text-decoration: underline; }
.q .who { flex: 1; min-width: 0; }
.q .who b { display: block; font-size: 13px; }
.q .who small { color: var(--muted); font-size: 11.5px; }
.q .v { text-align: right; font-size: 12.5px; white-space: nowrap; }
.q .v small { display: block; color: var(--muted); font-size: 11px; }

/* ---------- tabs and filters ---------- */

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a {
  padding: 9px 12px; font-size: 13.5px; color: var(--muted); text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--red); font-weight: 600; }
.tabs .c { font-size: 11px; background: var(--tint); color: var(--muted); border-radius: 10px; padding: 1px 7px; margin-left: 4px; font-weight: 700; }
.tabs a.on .c { background: var(--red-soft); color: #FF6B66; }

/* pill tabs used on the board, like Lumina's */
.pills { display: inline-flex; gap: 2px; background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 3px; flex-wrap: wrap; }
.pills a { padding: 6px 12px; border-radius: 9px; font-size: 13px; color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap; }
.pills a:hover { color: var(--ink); }
.pills a.on { background: var(--navy-3); color: var(--ink); }
.pills .c { font-size: 11px; color: var(--faint); margin-left: 4px; font-weight: 700; }
.pills a.on .c { color: var(--muted); }

.chipbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chipbar a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 20px; border: 1px solid var(--line); color: var(--body); text-decoration: none; font-size: 13px; font-weight: 600; }
.chipbar a:hover { border-color: var(--faint); color: var(--ink); }
.chipbar a.on { background: var(--green-soft); border-color: rgba(61, 214, 140, .4); color: var(--green); }
.chipbar svg.i { width: 14px; height: 14px; }

.board { background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.board-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.board-head h2 { font-size: 15px; display: flex; align-items: baseline; gap: 6px; }
.board-head h2 small { color: var(--muted); font-size: 12px; font-weight: 600; }
.board-sub { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.board-sub select, .board-sub input[type=search] { width: auto; min-width: 180px; min-height: 34px; padding: 6px 10px; font-size: 13px; }
.board-body { padding: 14px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters select, .filters input { width: auto; min-width: 150px; }

/* ---------- submission cards ---------- */

.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.sc { background: var(--card); border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; min-width: 0; }
.sc-camp { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-camp a { text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
.sc-camp a:hover { text-decoration: underline; }
.sc-camp .ci { width: 18px; height: 18px; border-radius: 5px; background: var(--red); color: #fff; font-size: 10px; display: grid; place-items: center; flex: none; }
.sc-body { padding: 12px 14px 0; }
.sc-head { display: flex; align-items: center; gap: 8px; }
.sc-head .pf { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); }
.sc-head .pf svg.i { width: 14px; height: 14px; }
.sc-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.sc-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.sc-state.ok { color: var(--green); }
.sc-state.ok i { background: var(--green); }
.sc-state.bad { color: #FF6B66; }
.sc-state.bad i { background: #FF6B66; }
.sc-state.risk i { background: var(--amber); }
.sc-state.done { color: var(--blue); }
.sc-state.done i { background: var(--blue); }
.botpill { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); }
.botpill svg.i { width: 13px; height: 13px; }
.botpill.ok { color: var(--green); border-color: rgba(61, 214, 140, .35); }
.botpill.risk { color: var(--amber); border-color: rgba(245, 181, 68, .4); background: var(--amber-soft); }
.botpill.bad { color: #FF6B66; border-color: rgba(226, 48, 43, .45); background: var(--red-soft); }
.sc-more { color: var(--muted); text-decoration: none; padding: 0 2px; font-weight: 800; letter-spacing: 1px; }
.sc-more:hover { color: var(--ink); }
.sc-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.sc-who { font-size: 12px; color: var(--muted); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-who a { text-decoration: none; color: var(--body); }
.sc-who a:hover { text-decoration: underline; }

.sc-media { position: relative; margin-top: 10px; height: 420px; border-radius: 12px; overflow: hidden; background: #050608; }
.sc-media .ph {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: radial-gradient(120% 80% at 50% 0%, #22252c 0%, #0b0c0f 70%); color: var(--muted); border: 0; width: 100%; cursor: pointer; font-size: 12.5px;
}
.sc-media .ph.thumb { background-size: cover; background-position: center; }
.sc-media .ph.thumb::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .25); }
.sc-media .ph b { color: var(--ink); font-size: 13px; position: relative; }
.sc-media .ph small { position: relative; }
.sc-media .play { position: relative; width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, .14); display: grid; place-items: center; backdrop-filter: blur(4px); }
.sc-media .play::after { content: ""; border-left: 16px solid #fff; border-top: 10px solid transparent; border-bottom: 10px solid transparent; margin-left: 4px; }
.sc-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.sc-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.sc-live { display: flex; align-items: center; gap: 6px; padding: 9px 2px 0; font-size: 12px; font-weight: 600; color: var(--body); }
.sc-live .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.sc-live .dot.on { background: var(--green); }
.sc-live .when { margin-left: auto; color: var(--muted); font-weight: 500; }
.sc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 12px 2px; border-bottom: 1px solid var(--line-soft); }
.sc-stats span { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.sc-stats b { display: block; font-size: 15px; font-weight: 800; margin-top: 3px; font-variant-numeric: tabular-nums; }
.sc-stats b.money { color: var(--money); }
details.sc-geo { border-bottom: 1px solid var(--line-soft); }
details.sc-geo > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 7px; padding: 10px 2px; font-size: 12.5px; font-weight: 600; color: var(--body); }
details.sc-geo > summary::-webkit-details-marker { display: none; }
details.sc-geo > summary::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); margin-right: 4px; }
details.sc-geo[open] > summary::after { transform: rotate(-135deg); margin-top: 5px; }
.geo { padding: 0 2px 10px; }
.geo .r { display: grid; grid-template-columns: 90px minmax(0, 1fr) 44px; gap: 8px; align-items: center; font-size: 12px; margin-bottom: 6px; }
.geo .r .num { color: var(--body); }
.geo .bar { height: 5px; }
.geo .bar i.other { background: var(--faint); }
.sc-foot { display: flex; align-items: center; gap: 10px; padding: 10px 14px 12px; font-size: 12px; }
.sc-foot .id { color: var(--faint); font-variant-numeric: tabular-nums; }
.sc-foot a { text-decoration: none; color: var(--body); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.sc-foot a:hover { color: var(--ink); }
.sc-foot .details { margin-left: auto; color: var(--ink); font-weight: 700; }
.sc-foot svg.i { width: 13px; height: 13px; }

.viewswitch { display: inline-flex; background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.viewswitch a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); text-decoration: none; }
.viewswitch a.on { background: var(--navy-3); color: var(--ink); }
.viewswitch svg.i { width: 14px; height: 14px; }

/* ---------- drawer and panel pages ---------- */

.drawer-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 60; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(980px, 100vw); background: var(--bg); border-left: 1px solid var(--line); z-index: 61; display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(0, 0, 0, .45); }
.drawer iframe { flex: 1; width: 100%; border: 0; background: var(--bg); }
body.drawer-open { overflow: hidden; }

body.panel { min-height: 100vh; }
.panel-main { padding: 0 22px 110px; }
.panel-head {
  position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 14px 22px; margin: 0 -22px 18px;
}
.panel-head .pf { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); display: grid; place-items: center; }
.panel-head h1 { font-size: 16px; }
.panel-head .sub { font-size: 12.5px; color: var(--muted); }
.panel-head .close { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); text-decoration: none; background: none; cursor: pointer; font-size: 18px; line-height: 1; }
.panel-head .close:hover { color: var(--ink); background: var(--hover); }
.page-main .panel-head { position: static; margin: 0 0 18px; padding: 0 0 14px; }

.actbar {
  position: fixed; bottom: 0; left: 248px; right: 0; z-index: 6; background: rgba(11, 12, 15, .96); border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px; padding: 12px 22px; flex-wrap: wrap;
}
body.panel .actbar { left: 0; }
.actbar .grow { flex: 1; }
.actbar input[type=text] { width: 260px; min-height: 34px; }

.sec-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; }
.sec-card > h2 { font-size: 14.5px; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.sec-card > h2 small { font-size: 12px; color: var(--muted); font-weight: 500; }
.sec-card > h2 .grow { flex: 1; }
.two { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 16px; align-items: start; }
.adminnote { background: var(--green-soft); border: 1px solid rgba(61, 214, 140, .25); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--ink); }
.adminnote b { display: block; font-size: 10.5px; color: var(--green); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 3px; }
.adminnote.red { background: var(--red-soft); border-color: rgba(226, 48, 43, .3); }
.adminnote.red b { color: #FF6B66; }
.decisions { list-style: none; margin: 0; padding: 0; }
.decisions li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.decisions li:last-child { border-bottom: 0; }
.decisions .ic { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--muted); }
.decisions .ic svg.i { width: 12px; height: 12px; }
.decisions .ic.ok { background: var(--green-soft); color: var(--green); }
.decisions .ic.bad { background: var(--red-soft); color: #FF6B66; }
.decisions small { color: var(--muted); font-size: 12px; }
.decisions .what.ok { color: var(--green); font-weight: 700; }
.decisions .what.bad { color: #FF6B66; font-weight: 700; }
.decisions .quote { background: var(--tint); border-radius: 8px; padding: 7px 10px; margin-top: 5px; color: var(--body); }

/* ---------- forms ---------- */

.form { max-width: 820px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; min-width: 0; }
.field label, .label { font-size: 12.5px; font-weight: 600; color: var(--body); }
.hint { font-size: 12px; color: var(--muted); font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date],
input[type=datetime-local], input[type=url], input[type=search], select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--field); border-radius: 9px;
  padding: 8px 11px; font-size: 14px; outline: none; min-height: 38px; color: var(--ink);
}
input:focus, select:focus, textarea:focus { border-color: var(--faint); box-shadow: 0 0 0 3px rgba(226, 48, 43, .14); }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input[readonly] { background: var(--tint); }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.row.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 4px 0; }
.checks label { font-weight: 500; display: inline-flex; gap: 7px; align-items: center; font-size: 13.5px; color: var(--ink); }
.actions { display: flex; gap: 10px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.prefix { position: relative; }
.prefix span { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.prefix input { padding-left: 24px; }
.formsec { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin: 10px 0 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }

.errors { background: var(--red-soft); color: #FF8A86; border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: 13px; }
:root .errors { color: #991B1B; }
body.app .errors, body.bare .errors, body.panel .errors { color: #FF8A86; }
.errors ul { margin: 4px 0 0 18px; padding: 0; }

.flash { border-radius: 10px; padding: 11px 14px; margin-bottom: 16px; font-size: 13.5px; background: var(--green-soft); color: var(--green); border: 1px solid rgba(61, 214, 140, .25); }
.flash.error { background: var(--red-soft); color: #FF8A86; border-color: rgba(226, 48, 43, .3); }
.flash.info { background: var(--blue-soft); color: var(--blue); border-color: rgba(122, 162, 255, .3); }
.copy-row { display: flex; gap: 8px; margin-top: 8px; }
.copy-row input { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }

.country-rows { display: grid; gap: 6px; }
.country-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 8px; }
.country-head { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 8px; font-size: 11.5px; color: var(--muted); }

.file-box { border: 1.5px dashed var(--line); border-radius: 10px; padding: 12px 14px; background: var(--tint); font-size: 13px; }
.file-box input[type=file] { width: 100%; font-size: 13px; }
.file-box .chosen { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }

details.panel { border-top: 1px solid var(--line-soft); margin-top: 12px; padding-top: 12px; }
details.panel > summary { cursor: pointer; font-weight: 600; font-size: 13.5px; list-style: none; display: flex; align-items: center; gap: 8px; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::before { content: "+"; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--tint); color: var(--muted); }
details.panel[open] > summary::before { content: "−"; }
details.panel[open] > summary { margin-bottom: 12px; }

details.sec-card > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; }
details.sec-card > summary::-webkit-details-marker { display: none; }
details.sec-card > summary h2 { font-size: 14.5px; }
details.sec-card > summary small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
details.sec-card > summary::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); }
details.sec-card[open] > summary::after { transform: rotate(45deg); }
details.sec-card[open] > summary { margin-bottom: 14px; }

/* ---------- misc ---------- */

.empty { padding: 34px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.ellipsis { display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pre { white-space: pre-wrap; line-height: 1.55; font-size: 13.5px; color: var(--body); }
.spacer { height: 16px; }

.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--track); stroke-width: 1; }
.chart .axis { fill: var(--faint); font-size: 11px; }
.chart .line { fill: none; stroke: var(--red); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--red); fill-opacity: .1; }
.chart .dot { fill: var(--card); stroke: var(--red); stroke-width: 2; }
.chart .pace { stroke: var(--faint); stroke-width: 2; stroke-dasharray: 6 6; }
body.app .chart .line, body.panel .chart .line { stroke: #3DD68C; }
body.app .chart .area, body.panel .chart .area { fill: #3DD68C; }
body.app .chart .dot, body.panel .chart .dot { stroke: #3DD68C; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); font-weight: 500; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }

/* ---------- submission detail pieces ---------- */

.phone { background: #050608; border: 1px solid var(--line); border-radius: 18px; padding: 8px; }
.phone video, .phone img { width: 100%; max-height: 560px; object-fit: contain; border-radius: 12px; display: block; background: #000; }
.phone .none { aspect-ratio: 9 / 14; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 20px; font-size: 13px; }
.phone .cap { color: var(--muted); font-size: 11.5px; padding: 8px 6px 2px; overflow-wrap: anywhere; }

.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.tile { background: var(--tint); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.tile span { font-size: 10.5px; color: var(--muted); display: block; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.tile b { font-size: 18px; display: block; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tile.hl b { color: var(--money); }

.split .r { display: grid; grid-template-columns: 130px minmax(0, 1fr) 48px; gap: 10px; align-items: center; font-size: 12.5px; margin-bottom: 7px; }
.split .r .bar i.other { background: var(--faint); }
.split .r .num { color: var(--body); }

.score { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.score .big { font-size: 36px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.score .big.low { color: var(--green); }
.score .big.medium { color: var(--amber); }
.score .big.high { color: #FF6B66; }
.checklist .c { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.checklist .c:last-child { border-bottom: 0; }
.checklist .c small { display: block; color: var(--muted); font-size: 12px; }
.checklist .pts { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dotc { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; }
.lvl-ok { background: #22C55E; }
.lvl-warn { background: #F59E0B; }
.lvl-bad { background: var(--red); }

.history { list-style: none; margin: 0; padding: 0; }
.history li { display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 10px; padding: 7px 0; font-size: 12.5px; }
.history li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); margin-top: 6px; }
.history small { display: block; color: var(--muted); font-size: 11.5px; }

/* ---------- sign-in pages ---------- */

.bare { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(120% 80% at 50% 0%, #1A1C21 0%, #0B0C0F 70%); }
.auth { width: 100%; max-width: 410px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.auth .brand { margin: 0 0 22px; }
.auth h1 { font-size: 20px; margin-bottom: 6px; }
.auth .lead { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }
.auth .foot { margin-top: 16px; font-size: 12.5px; color: var(--muted); }

/* ---------- smaller screens ---------- */

@media (max-width: 1240px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .statbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .statbar > div:nth-child(4) { border-left: 0; }
  .statbar > div:nth-child(n + 4) { border-top: 1px solid var(--line); }
}

@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .mobilebar {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20;
    background: var(--navy); border-bottom: 1px solid var(--line); color: var(--ink); padding: 10px 16px;
  }
  .mobilebar .brand { margin: 0; flex: 1; }
  .mobilebar .mark { width: 30px; height: 30px; font-size: 15px; }
  .menu-btn { background: var(--navy-2); border: 1px solid var(--line); color: var(--ink); border-radius: 8px; padding: 7px 12px; font-size: 13px; cursor: pointer; }
  .side { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 40; transform: translateX(-100%); transition: transform .18s ease; }
  body.menu-open .side { transform: none; }
  body.menu-open::after { content: ""; position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 30; }
  .main { padding: 16px 16px 40px; }
  .cols, .cols.even, .two { grid-template-columns: minmax(0, 1fr); }
  .row, .row.three, .row.four { grid-template-columns: minmax(0, 1fr); }
  .kpis.three { grid-template-columns: minmax(0, 1fr); }
  .search { width: 100%; }
  .search input { width: 100%; }
  .top .grow { display: none; }
  .actbar { left: 0; }
  .actbar input[type=text] { width: 100%; }
}

@media (max-width: 560px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .statbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .statbar > div { border-left: 0; border-top: 1px solid var(--line); }
  .statbar > div:nth-child(-n + 2) { border-top: 0; }
  .statbar > div:nth-child(even) { border-left: 1px solid var(--line); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top h1 { font-size: 20px; }
  .card { padding: 14px; }
  .split .r { grid-template-columns: 100px minmax(0, 1fr) 44px; }
  .hide-sm { display: none; }
  .sc-media { height: 380px; }
  .panel-main { padding: 0 14px 140px; }
  .panel-head { margin: 0 -14px 14px; padding: 12px 14px; }
}

/* ---------- client pages (light) ---------- */

.client-page { background: var(--bg); }
.client-page .wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.client-bar { background: var(--navy); padding: 14px 0; margin-bottom: 22px; }
.client-bar .brand { margin: 0; }
.client-bar .brand b { color: #fff; }
.client-bar .brand small { color: #8C93A6; }
.client-page main.wrap { padding-bottom: 24px; }
.client-foot { font-size: 12.5px; color: var(--muted); line-height: 1.6; padding-bottom: 40px !important; }
.preview-bar { background: var(--amber-soft); color: #7C3D0A; font-size: 13px; padding: 9px 24px; text-align: center; }
.preview-bar a { font-weight: 600; }

/* ---------- weekly report (light, prints on A4) ---------- */

.report { color: var(--ink); line-height: 1.55; font-size: 14px; }
.report-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.report-head .brand { margin: 0; }
.report-head .brand b { color: var(--ink); }
.report-head .brand small { color: var(--muted); }
.report-week { font-size: 12.5px; font-weight: 700; color: var(--red); background: var(--red-soft); border-radius: 20px; padding: 4px 12px; }
.report h1 { font-size: 24px; letter-spacing: -.01em; }
.report-meta { color: var(--muted); font-size: 13px; margin: 2px 0 14px; }
.report-status { background: var(--tint); border-radius: 10px; padding: 12px 14px; font-size: 14.5px; }
.report-status .st { margin-right: 6px; }
.report h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 8px; }
.report h3 { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.report p { margin: 0 0 6px; }
.report .pre { white-space: pre-wrap; font-size: 14px; color: var(--ink); }
.scorecard tr.total td { font-weight: 700; border-top: 1px solid var(--line); }
.report-chart { margin-top: 18px; }
.chart.bars .col { fill: var(--red); }
.chart.bars .val { fill: var(--body); font-size: 11px; font-weight: 600; }
.performed { margin: 0; padding-left: 20px; }
.performed li { margin-bottom: 6px; }
.report-foot { margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }

/* the report preview inside the app stays on white paper */
.report-preview {
  --ink: #141826; --body: #374151; --muted: #6B7280; --faint: #9CA3AF; --line: #E6E8EE; --line-soft: #F0F1F5;
  --tint: #F8F9FB; --card: #FFFFFF; --track: #EEF0F4; --red-soft: #FDECEB; --green: #15803D; --green-soft: #E8F7EE;
  --amber: #B45309; --amber-soft: #FEF3E2; --blue: #1D4ED8; --blue-soft: #E8EEFD; --hover: #FBFBFC;
  background: #fff; color: var(--ink); padding: 28px 32px;
}
.report-preview .chart .line { stroke: var(--red); }
.report-cols { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
textarea.cover { font-size: 13px; min-height: 140px; background: var(--tint); }
.checklist-plain { margin: 0; padding-left: 18px; font-size: 13px; color: var(--body); }
.checklist-plain li { margin-bottom: 4px; }

.report-page { background: #E9EBF0; }
.report-page .report { max-width: 820px; margin: 0 auto 40px; background: #fff; padding: 40px 48px; border-radius: 6px; box-shadow: 0 1px 3px rgba(16, 20, 31, .08); }
.report-toolbar { max-width: 820px; margin: 0 auto; padding: 16px 0; display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; }

@media (max-width: 700px) {
  .report-page .report { padding: 24px 18px; border-radius: 0; }
  .report-toolbar { padding: 12px 16px; }
  .report-preview { padding: 18px; }
  .client-page .wrap { padding: 0 16px; }
}

@media print {
  @page { size: A4; margin: 14mm; }
  body, .report-page { background: #fff; }
  .no-print { display: none !important; }
  .report-page .report { box-shadow: none; padding: 0; margin: 0; max-width: none; }
  .report { font-size: 11.5pt; }
  .report h2 { break-after: avoid; }
  .report table, .report-chart, .performed li { break-inside: avoid; }
  .st { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .chart.bars .col, .report-week, .report-status, .mark { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: inherit; text-decoration: none; }
}

@media (max-width: 1100px) {
  .report-cols { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- join page (light) ---------- */

.join-page { background: #fff; }
.join-page .wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.join-bar { background: var(--navy); padding: 14px 0; position: sticky; top: 0; z-index: 10; }
.join-bar .wrap { display: flex; align-items: center; gap: 16px; }
.join-bar .brand { margin: 0; flex: 1; }
.join-bar .brand b { color: #fff; }
.join-bar .brand small { color: #8C93A6; }
.join-bar nav { display: flex; align-items: center; gap: 18px; }
.join-bar nav a:not(.btn) { color: #C9CEDA; text-decoration: none; font-size: 13.5px; }
.join-bar nav a:not(.btn):hover { color: #fff; }

.hero { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding: 56px 0 64px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero h1 { font-size: 46px; line-height: 1.05; letter-spacing: -.02em; margin-bottom: 14px; }
.hero .lead { color: #C9CEDA; font-size: 17px; line-height: 1.55; max-width: 540px; }
.invited { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .08); border-radius: 20px; padding: 4px 12px 4px 4px; font-size: 13px; margin-bottom: 16px; }
.invited .mark { width: 24px; height: 24px; font-size: 12px; border-radius: 50%; }
.hero-cta { display: flex; gap: 10px; margin: 24px 0 26px; flex-wrap: wrap; }
.btn.big { padding: 11px 20px; font-size: 15px; border-radius: 10px; }
.hero .btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .25); }
.hero .btn.ghost:hover { background: rgba(255, 255, 255, .06); }
.hero-facts { list-style: none; margin: 0; padding: 0; display: flex; gap: 26px; flex-wrap: wrap; }
.hero-facts li { font-size: 13px; color: #A9B0C2; max-width: 150px; line-height: 1.35; }
.hero-facts b { display: block; color: #fff; font-size: 24px; margin-bottom: 2px; }

.hero-card { background: #fff; color: var(--ink); border-radius: 16px; padding: 18px 20px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.hc-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; margin-bottom: 6px; }
.hc-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.hc-row span { color: var(--body); }
.hc-row b { text-align: right; }
.hc-foot { font-size: 12px; color: var(--muted); margin-top: 10px; }

.join-page main { padding-bottom: 20px; }
.jblock { padding-top: 48px; }
.jblock > h2 { font-size: 26px; letter-spacing: -.01em; margin-bottom: 18px; }
.steps4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.steps4 div { background: var(--tint); border-radius: 14px; padding: 18px; }
.steps4 i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff; font-style: normal; font-weight: 700; margin-bottom: 12px; }
.steps4 b { display: block; font-size: 15px; margin-bottom: 6px; }
.steps4 p { font-size: 13.5px; color: var(--body); line-height: 1.5; }

.camp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.camp-grid .card + .card { margin-top: 0; }
.camp-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.camp-top b { display: block; font-size: 15.5px; }
.camp-top small { color: var(--muted); font-size: 12.5px; }
.camp-pool { display: flex; align-items: baseline; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.camp-pool b { color: var(--ink); font-size: 20px; }
.camp-pool span { margin-left: auto; }
.camp .facts { margin-top: 14px; }

.two-up { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.two-up .card + .card { margin-top: 0; }
.card.soft { background: var(--tint); border-color: transparent; padding: 22px; }
.card.soft h3 { font-size: 17px; margin-bottom: 8px; }
.card.soft p { font-size: 14px; color: var(--body); line-height: 1.55; }
ul.ticks { list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--body); }
ul.ticks li { padding: 4px 0 4px 24px; position: relative; line-height: 1.45; }
ul.ticks li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 10px; height: 6px; border-left: 2px solid #16A34A; border-bottom: 2px solid #16A34A; transform: rotate(-45deg); }

.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 15px; list-style: none; display: flex; justify-content: space-between; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 18px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--body); font-size: 14px; line-height: 1.55; margin-top: 8px; max-width: 760px; }

.join-form-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 32px; align-items: start; background: var(--bg); border-radius: 18px; padding: 32px; }
.join-copy h2 { font-size: 26px; letter-spacing: -.01em; margin-bottom: 8px; }
.join-copy p { color: var(--body); font-size: 14.5px; line-height: 1.55; margin-bottom: 10px; }
.join-copy .offer { background: var(--red-soft); color: #7F1D1D; border-radius: 10px; padding: 12px 14px; }
.agree { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; color: var(--body); margin: 4px 0 16px; line-height: 1.45; }
.agree input { margin-top: 3px; }
.join-foot { border-top: 1px solid var(--line); margin-top: 48px; padding: 20px 0 28px; font-size: 12.5px; color: var(--muted); }
.join-foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.join-page .flash { color: #14532D; }
.join-page .errors { color: #991B1B; }

@media (max-width: 900px) {
  .hero { padding: 36px 0 44px; }
  .hero-grid, .join-form-wrap, .two-up { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: 34px; }
  .steps4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .join-bar nav a:not(.btn) { display: none; }
  .join-form-wrap { padding: 18px; }
}
@media (max-width: 560px) {
  .join-page .wrap { padding: 0 16px; }
  .steps4 { grid-template-columns: minmax(0, 1fr); }
  .hero-facts { gap: 16px; }
  .jblock { padding-top: 36px; }
}

/* ---------- clipping space pieces ---------- */

.bonus-card { border-color: rgba(245, 181, 68, .55); }
.bonus-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 6px 0 12px; }
.bonus-steps div { position: relative; font-size: 12.5px; color: var(--muted); }
.bonus-steps b { display: block; color: var(--ink); font-size: 13.5px; margin-top: 6px; }
.bonus-steps i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--amber); color: var(--amber); font-style: normal; font-weight: 700; font-size: 12.5px; background: var(--card); }
.bonus-steps .done i { background: #16A34A; border-color: #16A34A; color: #fff; }
.bonus-steps .void i { background: var(--tint); border-color: var(--line); color: var(--muted); }
.link-box { display: flex; gap: 8px; align-items: center; }
.link-box input { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.how4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.how4 div { border: 1px dashed var(--line); border-radius: 10px; padding: 9px 10px; font-size: 12.5px; color: var(--body); line-height: 1.35; }
.how4 b { display: block; color: var(--red); font-size: 12px; margin-bottom: 2px; }
.rank { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--tint); font-size: 12px; font-weight: 700; color: var(--body); margin-right: 8px; }
.rank.r1 { background: var(--amber-soft); color: var(--amber); }
tr.me-row td { background: var(--red-soft); }
.files { list-style: none; margin: 0; padding: 0; }
.files li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.files li:last-child { border-bottom: 0; }
.files .ext { width: 38px; height: 38px; border-radius: 8px; background: var(--navy-3); color: var(--ink); display: grid; place-items: center; font-size: 10.5px; font-weight: 700; text-transform: uppercase; flex: none; }
.files .nm { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.files .nm small { display: block; color: var(--muted); font-size: 11.5px; }
.community { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); color: var(--ink); border-radius: 14px; padding: 14px 18px; margin-bottom: 16px; }
.community p { flex: 1; font-size: 13.5px; color: var(--body); }
.community b { color: var(--ink); }

@media (max-width: 900px) {
  .how4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .link-box { flex-wrap: wrap; }
}

/* =====================================================================
   Depth and motion for the platform (staff, clipper portal, sign-in).
   The public join page, client links and printed reports stay as they are.
   ===================================================================== */

/* page-to-page cross-fade in browsers that support it; the sidebar stays put */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }
.side { view-transition-name: sidebar; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes fill { from { transform: scaleX(0); } }
@keyframes drawer-in { from { transform: translateX(100%); } }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(4%, 3%, 0) scale(1.08); }
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(61, 214, 140, .45); }
  100% { box-shadow: 0 0 0 7px rgba(61, 214, 140, 0); }
}

/* background: soft glows and a faint grid that fades out down the page */
body.app, body.panel {
  background:
    radial-gradient(900px 520px at 12% -10%, rgba(226, 48, 43, .11), transparent 60%),
    radial-gradient(760px 480px at 100% -5%, rgba(122, 162, 255, .08), transparent 60%),
    radial-gradient(1100px 640px at 55% 115%, rgba(61, 214, 140, .05), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
body.app::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 55% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 75% 60% at 55% 0%, #000 0%, transparent 72%);
}
body.app > .main { position: relative; z-index: 1; }
body.app ::selection, body.panel ::selection { background: rgba(226, 48, 43, .38); color: #fff; }

/* thin dark scrollbars */
body.app, body.panel { scrollbar-width: thin; scrollbar-color: #2A2D34 transparent; }
body.app ::-webkit-scrollbar, body.panel ::-webkit-scrollbar { width: 10px; height: 10px; }
body.app ::-webkit-scrollbar-thumb, body.panel ::-webkit-scrollbar-thumb { background: #262930; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
body.app ::-webkit-scrollbar-thumb:hover, body.panel ::-webkit-scrollbar-thumb:hover { background: #343841; background-clip: padding-box; }

/* glass sidebar */
body.app .side {
  z-index: 2;
  background: linear-gradient(180deg, rgba(19, 21, 26, .82), rgba(9, 10, 12, .9));
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-right: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 1px 0 0 rgba(0, 0, 0, .4);
}
body.app .mark, body.bare .mark, body.panel .mark {
  background: linear-gradient(145deg, #F2524C 0%, #E2302B 45%, #B82019 100%);
  box-shadow: 0 8px 22px -6px rgba(226, 48, 43, .65), inset 0 1px 0 rgba(255, 255, 255, .28);
}
body.app .nav a { position: relative; transition: background .2s ease, color .2s ease, transform .2s ease; }
body.app .nav a:hover { transform: translateX(2px); }
body.app .nav a.on {
  background: linear-gradient(90deg, rgba(226, 48, 43, .16), rgba(255, 255, 255, .025) 70%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
body.app .nav a.on::before {
  content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--red); box-shadow: 0 0 14px rgba(226, 48, 43, .9);
}
body.app .nav a.on svg.i { color: #FF7A75; }
body.app .navgroup:not([hidden]) { animation: rise .3s cubic-bezier(.2, .8, .2, 1); }

/* Main / More tools with a sliding pill */
.navswitch { position: relative; }
.navswitch::before {
  content: ""; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 8px;
  background: var(--navy-3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 4px 14px rgba(0, 0, 0, .35);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.navswitch.more::before { transform: translateX(100%); }
.navswitch button { position: relative; z-index: 1; transition: color .2s ease; }
.navswitch button.on { background: none; }
body.app .me { background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .07); }

/* cards: a lit top edge, a little depth, and a lift on hover */
body.app .card, body.app .board, body.app .statbar, body.app .sc, body.app .sec-card, body.app .linkbar .pill,
body.panel .sec-card, body.panel .card, body.bare .auth {
  background: linear-gradient(180deg, rgba(255, 255, 255, .035) 0%, rgba(255, 255, 255, .008) 38%, rgba(255, 255, 255, 0) 100%), var(--card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 1px 2px rgba(0, 0, 0, .35), 0 12px 32px -18px rgba(0, 0, 0, .7);
}
body.app .card.report-preview { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
body.app .board .sc { background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .01) 40%, rgba(255, 255, 255, 0)), #0E1014; }
.sc, .card.k, .camp { transition: transform .22s cubic-bezier(.2, .8, .2, 1), border-color .22s ease, box-shadow .22s ease; }
body.app .sc:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, .15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 22px 44px -16px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .03);
}
body.app .card.k:hover { border-color: rgba(255, 255, 255, .13); transform: translateY(-2px); }
body.app .statbar > div { transition: background .2s ease; }
body.app .statbar > div:hover { background: rgba(255, 255, 255, .02); }
body.app .statbar b.money, body.app .k .val.money { text-shadow: 0 0 24px rgba(61, 214, 140, .35); }

/* the post area on a card */
.sc-media .ph { transition: filter .25s ease; }
.sc-media .play { transition: transform .25s cubic-bezier(.2, .8, .2, 1), background .25s ease; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.sc-media .ph:hover .play { transform: scale(1.1); background: rgba(255, 255, 255, .24); }
.sc-media .ph:hover { filter: brightness(1.12); }
.sc-media iframe { animation: fade .4s ease; }
.sc-live .dot.on { animation: pulse-ring 1.8s ease-out infinite; }
.sc-state i { box-shadow: 0 0 8px currentColor; }

/* buttons */
.btn { transition: background .18s ease, border-color .18s ease, box-shadow .22s ease, transform .1s ease, color .18s ease; }
.btn:active { transform: translateY(1px) scale(.985); }
body.app .btn, body.panel .btn, body.bare .btn {
  background: linear-gradient(180deg, #EE403A 0%, #D42A24 100%);
  border-color: rgba(255, 255, 255, .08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 8px 20px -10px rgba(226, 48, 43, .8);
}
body.app .btn:hover, body.panel .btn:hover, body.bare .btn:hover {
  background: linear-gradient(180deg, #F24C46 0%, #DA2F29 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 12px 28px -10px rgba(226, 48, 43, .95);
}
body.app .btn.ghost, body.panel .btn.ghost {
  background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .09); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
body.app .btn.ghost:hover, body.panel .btn.ghost:hover { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
body.app .btn.dark, body.panel .btn.dark { background: var(--navy-3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
body.app .btn.green, body.panel .btn.green {
  background: linear-gradient(180deg, #22C55E, #16A34A); border-color: rgba(255, 255, 255, .08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 8px 20px -10px rgba(34, 197, 94, .8);
}
body.app .btn.green:hover, body.panel .btn.green:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26), 0 12px 28px -10px rgba(34, 197, 94, .95); }
body.app .btn.outline-red, body.panel .btn.outline-red { background: rgba(226, 48, 43, .05); box-shadow: none; border-color: rgba(226, 48, 43, .55); }
body.app .btn.outline-red:hover, body.panel .btn.outline-red:hover { background: rgba(226, 48, 43, .14); }
body.app .btn.outline-green, body.panel .btn.outline-green { background: transparent; box-shadow: none; }

/* tabs, pills and chips glide between states */
.pills a, .viewswitch a, .chipbar a, .tabs a, .q, td, .linkish, .sc-foot a, .sc-more { transition: background .18s ease, color .18s ease, border-color .18s ease; }
body.app .pills a.on, body.app .viewswitch a.on {
  background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 2px 8px rgba(0, 0, 0, .35);
}
body.app .chipbar a.on { box-shadow: 0 0 0 1px rgba(61, 214, 140, .15), 0 0 18px -6px rgba(61, 214, 140, .6); }
body.app .tabs a.on { box-shadow: 0 1px 0 0 var(--red), 0 6px 14px -10px rgba(226, 48, 43, .9); }
body.app .board-head, body.app .board-sub { background: rgba(255, 255, 255, .012); }

/* inputs */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date],
input[type=datetime-local], input[type=url], input[type=search], select, textarea {
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
body.app input:focus, body.app select:focus, body.app textarea:focus,
body.panel input:focus, body.panel select:focus, body.panel textarea:focus,
body.bare input:focus {
  border-color: rgba(226, 48, 43, .55); box-shadow: 0 0 0 3px rgba(226, 48, 43, .16), 0 0 18px -6px rgba(226, 48, 43, .5);
}
body.app :focus-visible, body.panel :focus-visible { outline: 2px solid rgba(226, 48, 43, .6); outline-offset: 2px; }
body.app input:focus-visible, body.app select:focus-visible, body.app textarea:focus-visible,
body.panel input:focus-visible, body.panel textarea:focus-visible { outline: none; }

/* pages arrive in a quick cascade; cards follow one after another */
body.app .main > *, body.panel .panel-main > * { animation: rise .5s cubic-bezier(.2, .8, .2, 1) backwards; }
body.app .main > *:nth-child(2), body.panel .panel-main > *:nth-child(2) { animation-delay: .05s; }
body.app .main > *:nth-child(3), body.panel .panel-main > *:nth-child(3) { animation-delay: .1s; }
body.app .main > *:nth-child(4), body.panel .panel-main > *:nth-child(4) { animation-delay: .15s; }
body.app .main > *:nth-child(5), body.panel .panel-main > *:nth-child(5) { animation-delay: .2s; }
body.app .main > *:nth-child(n + 6), body.panel .panel-main > *:nth-child(n + 6) { animation-delay: .24s; }
body.panel .panel-main > .panel-head { animation: none; }
.sc { animation: rise .55s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(.18s + min(var(--i, 0), 14) * 45ms); }
.kpis > .card, .statbar > div { animation: rise .5s cubic-bezier(.2, .8, .2, 1) backwards; }
.kpis > .card:nth-child(2), .statbar > div:nth-child(2) { animation-delay: .06s; }
.kpis > .card:nth-child(3), .statbar > div:nth-child(3) { animation-delay: .12s; }
.kpis > .card:nth-child(4), .statbar > div:nth-child(4) { animation-delay: .18s; }
.statbar > div:nth-child(5) { animation-delay: .24s; }
.bar i { transform-origin: left center; animation: fill 1s cubic-bezier(.2, .8, .2, 1) .25s backwards; }
.chart .line { stroke-dasharray: 9000; animation: draw 1.6s cubic-bezier(.4, 0, .2, 1) .2s backwards; }
@keyframes draw { from { stroke-dashoffset: 9000; } to { stroke-dashoffset: 0; } }
.chart .area { animation: fade 1s ease .6s backwards; }
.chart .dot { animation: fade .4s ease 1.2s backwards; }

/* messages slide in, and quiet ones fade away by themselves */
.flash { animation: drop .4s cubic-bezier(.2, .8, .2, 1); transition: opacity .4s ease, transform .4s ease, max-height .4s ease, margin .4s ease, padding .4s ease; max-height: 300px; overflow: hidden; }
.flash.gone { opacity: 0; transform: translateY(-6px); max-height: 0; margin: 0; padding-top: 0; padding-bottom: 0; border-width: 0; }

/* review drawer slides in from the right and back out */
.drawer { animation: drawer-in .38s cubic-bezier(.16, .84, .24, 1); transition: transform .26s cubic-bezier(.5, 0, .75, 0); }
.drawer.out { transform: translateX(105%); }
.drawer-back { animation: fade .3s ease; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); transition: opacity .26s ease; }
.drawer-back.out { opacity: 0; }
.drawer { border-left: 1px solid rgba(255, 255, 255, .08); box-shadow: -30px 0 80px rgba(0, 0, 0, .6); }
body.panel .actbar {
  background: rgba(8, 9, 11, .78); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, .07);
}
body.app .actbar { background: rgba(8, 9, 11, .78); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
body.panel .panel-head, body.app .page-main .panel-head { background: rgba(8, 9, 11, .8); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
body.app .page-main .panel-head { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }

/* sign-in: the card floats over a slowly moving glow */
body.bare { position: relative; background: #08090B; }
body.bare::before, body.bare::after {
  content: ""; position: fixed; width: 70vmax; height: 70vmax; border-radius: 50%; pointer-events: none; filter: blur(40px);
  animation: drift 18s ease-in-out infinite alternate;
}
body.bare::before { top: -35vmax; left: -20vmax; background: radial-gradient(circle, rgba(226, 48, 43, .22), transparent 60%); }
body.bare::after { bottom: -40vmax; right: -25vmax; background: radial-gradient(circle, rgba(122, 162, 255, .14), transparent 60%); animation-duration: 22s; animation-direction: alternate-reverse; }
body.bare .auth { position: relative; z-index: 1; border-color: rgba(255, 255, 255, .08); animation: rise .6s cubic-bezier(.2, .8, .2, 1); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
body.bare .auth .brand small { letter-spacing: .1em; }

/* headings a touch tighter, numbers a touch bolder */
body.app .top h1, body.panel .panel-head h1 { letter-spacing: -.02em; font-weight: 800; }
body.app .k .val, body.app .statbar b { letter-spacing: -.02em; }

/* people who ask for less motion get none of it */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  @view-transition { navigation: none; }
}

/* shown when a file couldn't go up */
.upload-error { margin: 8px 0 0; color: #FF8C86; font-size: 13px; font-weight: 600; }
