/* Look inspired by wecourts.com (deep gradient header, bold geometric headings, soft floating
   cards, pill controls, small uppercase labels), in Daniella's colours: burgundy + court green. */
:root {
  --burgundy: #7A1F2B;
  --wine: #561520;
  --night: #3A0D15;
  --rose: #B23A48;
  --green: #1F4D3A;
  --turf: #3E7D5C;
  --cream: #F7F3EE;
  --card: #FFFFFF;
  --ink: #2A1216;
  --muted: #7A6A66;
  --line: #EDE4DB;
  --soft-red: #F8E9EA;
  --soft-green: #E4F1EA;
  --soft-amber: #FBF0D9;
  --amber: #8A5A00;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(86, 21, 32, .05), 0 10px 28px rgba(86, 21, 32, .07);
  --display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: linear-gradient(135deg, #FCFAF7, #F8F1EC 50%, #EFF5F0) fixed;
  color: var(--ink);
  font: 16px/1.45 var(--body);
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
  overflow-x: clip;
}
a { color: var(--burgundy); text-decoration: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; line-height: 1.15; letter-spacing: -.015em; }
h1 { font-size: 30px; }
h2 { font-size: 21px; margin: 30px 0 12px; color: var(--wine); }
h3 { font-size: 17px; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.eyebrow.dot::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--turf); margin-right: 7px; vertical-align: 1px; }

/* ---------- frame ---------- */
.top { background: var(--night); color: #fff; position: sticky; top: 0; z-index: 5; }
.top-in { max-width: 760px; margin: 0 auto; padding: 13px 16px 11px; display: flex; align-items: center; justify-content: space-between; }
.brand { color: #fff; font-family: var(--display); font-size: 21px; font-weight: 700; font-style: italic; letter-spacing: -.02em; text-transform: uppercase; }
.brand span { opacity: .6; }
.ver { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .85); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px 24px; }

.hero {
  margin: 0 calc(50% - 50vw) 20px; padding: 22px calc(50vw - 50% + 16px) 30px;
  color: #fff; border-radius: 0 0 30px 30px;
  background:
    radial-gradient(60% 120% at 62% 10%, rgba(214, 92, 104, .55), transparent 70%),
    linear-gradient(135deg, var(--night), var(--wine) 45%, var(--burgundy));
}
.hero h1 { color: #fff; }
.hero .sub { color: rgba(255, 255, 255, .8); margin-top: 4px; font-size: 15px; }
.hero .back { color: rgba(255, 255, 255, .8); }
.hero .pill { background: rgba(255, 255, 255, .14); color: #fff; }
.hero .level { background: var(--cream); color: var(--green); }
.hero:has(+ .seg), .hero:has(+ .lift) { padding-bottom: 60px; }
.hero + .seg, .hero + .lift { margin-top: -42px; position: relative; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: flex; justify-content: center; padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
}
.tabs a { flex: 1; max-width: 150px; text-align: center; padding: 6px 2px 4px; font-size: 11px; color: var(--muted); font-weight: 600; border-radius: 14px; }
.tabs svg { display: block; width: 23px; height: 23px; margin: 0 auto 2px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs a.on { color: var(--burgundy); background: var(--soft-red); }

/* ---------- building blocks ---------- */
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.head > :first-child { min-width: 0; }
.back { display: inline-block; font-size: 14px; font-weight: 600; margin-bottom: 10px; }

.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px; margin-bottom: 12px; display: block; color: inherit;
}
a.card:active, .card[data-act]:active { transform: scale(.992); }
.card[data-act] { cursor: pointer; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row > :first-child { min-width: 0; }
.title { font-family: var(--display); font-weight: 700; font-size: 16.5px; letter-spacing: -.01em; }
.sub { color: var(--muted); font-size: 14px; }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fee { text-align: right; flex: none; }
.fee b { font-family: var(--display); font-size: 19px; color: var(--wine); letter-spacing: -.01em; }
.fee small { font-size: 12px; color: var(--muted); font-weight: 500; }

.btn {
  appearance: none; border: 0; color: #fff; cursor: pointer; white-space: nowrap;
  background: linear-gradient(135deg, var(--wine), var(--rose));
  font: 700 15px var(--display); padding: 11px 18px; border-radius: 999px;
  box-shadow: 0 4px 12px rgba(122, 31, 43, .22);
}
.btn:active { transform: translateY(1px); }
.btn.accent { background: var(--cream); color: var(--wine); box-shadow: none; }
.btn.ghost { background: #fff; color: var(--burgundy); box-shadow: inset 0 0 0 1.5px var(--burgundy); }
.btn.green { background: linear-gradient(135deg, var(--green), var(--turf)); box-shadow: 0 4px 12px rgba(31, 77, 58, .22); }
.btn.quiet { background: #fff; color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.btn.danger { background: transparent; color: #A12A2A; font-weight: 600; box-shadow: none; }
.btn.sm { padding: 7px 13px; font-size: 13.5px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.go { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 20px; background: linear-gradient(135deg, var(--wine), var(--burgundy)); }

.pill {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: #F3ECE5; color: var(--muted); white-space: nowrap;
}
.pill.line { background: #fff; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font-weight: 500; }
.pill.club { background: var(--soft-green); color: var(--green); }
.pill.freelance { background: var(--soft-red); color: var(--burgundy); }
.pill.ok { background: var(--soft-green); color: var(--green); }
.pill.warn { background: var(--soft-amber); color: var(--amber); }
.pill.bad { background: var(--soft-red); color: #A12A2A; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.level {
  flex: none; min-width: 58px; text-align: center; border-radius: 16px; padding: 7px 9px;
  background: linear-gradient(135deg, var(--green), var(--turf)); color: #fff; line-height: 1.1;
}
.level b { display: block; font-family: var(--display); font-size: 21px; letter-spacing: -.02em; }
.level i { font-style: normal; font-size: 11px; font-weight: 600; opacity: .9; }
.level.none { background: #F3ECE5; color: var(--muted); }
.level.big { min-width: 98px; padding: 16px 12px; border-radius: 22px; }
.level.big b { font-size: 42px; }
.level.big i { font-size: 14px; }

.seg { display: flex; background: #fff; border-radius: 18px; padding: 5px; margin-bottom: 18px; overflow-x: auto; box-shadow: var(--shadow); }
.seg a { flex: 1; text-align: center; padding: 9px 12px; border-radius: 13px; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.seg a.on { background: var(--soft-red); color: var(--burgundy); }

.week { padding: 18px 18px 0; overflow: hidden; }
.week .big { font-family: var(--display); font-weight: 700; font-size: 25px; letter-spacing: -.02em; color: var(--muted); margin-top: 4px; }
.week .big b { color: var(--burgundy); }
.week .big b + b, .week .big .g { color: var(--green); }
.week .pulse { height: 3px; margin: 14px -18px 0; background: linear-gradient(90deg, #EBC9CD, var(--rose), var(--turf), #CFE5D8); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.stat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; display: block; color: inherit; }
.stat .k { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stat .v { font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -.02em; color: var(--burgundy); margin-top: 4px; }
.stat .n { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.banner { background: var(--soft-amber); color: var(--amber); border-radius: 16px; padding: 11px 15px; font-size: 14px; margin-bottom: 14px; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; border: 1.5px dashed #E2D6CB; border-radius: var(--radius); margin-bottom: 12px; }

.bar { height: 8px; border-radius: 99px; background: #F1E9E1; overflow: hidden; margin-top: 10px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--turf)); border-radius: 99px; }
.bar.low > i { background: linear-gradient(90deg, var(--wine), var(--rose)); }

dl.facts { display: grid; grid-template-columns: 130px 1fr; gap: 9px 12px; margin: 0; font-size: 15px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }

.log { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14.5px; }
.log p { margin: 0 0 5px; }
.log b { color: var(--green); font-weight: 700; }
.log .chips { margin: 0 0 8px; }

table.grid { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.grid th { text-align: left; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 6px 8px 8px 0; border-bottom: 1px solid var(--line); }
table.grid td { padding: 9px 8px 9px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.grid tr:last-child td { border-bottom: 0; }
table.grid th.right, table.grid td.right { padding-right: 0; }
.plus { letter-spacing: 1px; font-weight: 700; color: var(--green); }
.gap { color: #A12A2A; font-weight: 600; }

details > summary { cursor: pointer; color: var(--burgundy); font-size: 14px; font-weight: 600; margin-top: 12px; }

/* ---------- forms ---------- */
.sheet {
  border: 0; padding: 0; width: 100%; max-width: 640px; max-height: 92dvh; margin: auto auto 0;
  border-radius: 28px 28px 0 0; background: #FBF7F3; color: var(--ink);
}
@media (min-width: 700px) { .sheet { margin: auto; border-radius: 28px; } }
.sheet::backdrop { background: rgba(58, 13, 21, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet form { padding: 20px 16px 20px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.sheet-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 18px; position: sticky; bottom: 0; background: #FBF7F3; padding: 12px 0 2px; }
.x { appearance: none; border: 0; background: #F1E9E1; width: 34px; height: 34px; border-radius: 50%; font-size: 21px; line-height: 1; color: var(--muted); cursor: pointer; }

label.f, div.f { display: block; margin-bottom: 13px; font-size: 13px; font-weight: 600; color: var(--muted); }
label.f > input, label.f > select, label.f > textarea { margin-top: 5px; }
input[type=text], input[type=password], input[type=tel], input[type=date], input[type=time], input[type=number], input[type=search], select, textarea {
  display: block; width: 100%; font: 16px var(--body); color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 14px; padding: 11px 13px; min-height: 46px;
}
input[type=search] { border: 0; box-shadow: var(--shadow); border-radius: 16px; }
textarea { min-height: 78px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--turf); outline-offset: 0; border-color: var(--turf); }
input[type=checkbox] { accent-color: var(--green); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.group { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.group h3 { margin-bottom: 12px; color: var(--wine); }
.hint { font-size: 13px; color: var(--muted); font-weight: 400; margin: -4px 0 12px; }
.earn { font: 700 22px var(--display); color: var(--green); padding-top: 12px; letter-spacing: -.02em; }

.checks { display: flex; flex-wrap: wrap; gap: 7px; }
.checks label, .rate label { cursor: pointer; }
.checks input, .rate input, .pick input { position: absolute; opacity: 0; pointer-events: none; }
.checks span {
  display: inline-block; padding: 8px 13px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line);
  background: #fff; font-size: 14px; font-weight: 500; color: var(--ink);
}
.checks input:checked + span { background: linear-gradient(135deg, var(--green), var(--turf)); box-shadow: none; color: #fff; font-weight: 600; }

.rate-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.rate-row:last-child { border-bottom: 0; }
.rate-row > b { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.rate { display: flex; gap: 4px; }
.rate span { display: block; width: 34px; height: 34px; line-height: 34px; text-align: center; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 600; background: #fff; }
.rate input:checked + span { background: linear-gradient(135deg, var(--green), var(--turf)); box-shadow: none; color: #fff; }

.pick label { display: block; cursor: pointer; margin-bottom: 7px; }
.pick span { display: block; padding: 10px 13px; box-shadow: inset 0 0 0 1px var(--line); border-radius: 14px; background: #fff; font-size: 14px; font-weight: 400; color: var(--ink); }
.pick span b { color: var(--green); margin-right: 6px; font-family: var(--display); }
.pick input:checked + span { box-shadow: inset 0 0 0 2px var(--turf); background: var(--soft-green); }

.result { background: linear-gradient(135deg, var(--green), var(--turf)); color: #fff; border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.result .v { font-family: var(--display); font-size: 30px; font-weight: 700; white-space: nowrap; letter-spacing: -.02em; }
.result .k { font-size: 13px; opacity: .9; }

.price-row { display: grid; grid-template-columns: 1fr 84px 84px 26px; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.price-row.one { grid-template-columns: 1fr 84px 26px; }
.price-row:last-child { border-bottom: 0; }
.price-row input[type=number] { padding: 6px 8px; min-height: 38px; text-align: right; border-radius: 10px; }
.price-row input[type=checkbox] { width: 20px; height: 20px; }
.price-head { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }

/* ---------- statement (printed / saved as PDF) ---------- */
.paper { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 22px; }
.paper table.grid { font-size: 13.5px; }
.paper td.right, .paper th.right { padding-left: 12px; }
.paper td .sub { font-size: 12.5px; }
@media print {
  .top, .tabs, .noprint { display: none !important; }
  body { background: #fff; padding: 0; }
  .wrap { max-width: none; padding: 0; }
  .paper { box-shadow: none; border-radius: 0; padding: 0; }
}

/* ---------- client portal: court green, so the two sides are never confused ---------- */
.portal .top { background: #0F2E22; }
.portal .hero {
  background:
    radial-gradient(60% 120% at 62% 10%, rgba(110, 190, 150, .5), transparent 70%),
    linear-gradient(135deg, #0F2E22, var(--green) 50%, var(--turf));
}
.portal .hero .level { color: var(--burgundy); }
.portal .tabs a.on, .portal .seg a.on { color: var(--green); background: var(--soft-green); }
.portal h2 { color: var(--green); }
.portal .btn.accent { color: var(--green); }
.portal .go { background: linear-gradient(135deg, var(--green), var(--turf)); }
.portal .stat .v { color: var(--green); }
.demo-bar { background: var(--soft-amber); color: var(--amber); font-size: 13px; text-align: center; padding: 7px 12px; }
.demo-bar a { color: var(--amber); font-weight: 700; text-decoration: underline; }
.quote { border-left: 3px solid var(--turf); padding: 2px 0 2px 12px; margin: 10px 0 0; }
.pre { white-space: pre-line; }

/* Online: "not saved" bar */
.save-bar { position: fixed; left: 12px; right: 12px; bottom: 84px; z-index: 50; background: var(--soft-amber); color: var(--amber); border-radius: 16px; padding: 10px 14px; font-size: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; box-shadow: 0 6px 20px rgba(0, 0, 0, .12); }
.cred { font-family: ui-monospace, Menlo, monospace; font-size: 17px; font-weight: 600; user-select: all; }
