@font-face {
  font-family: Figtree;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/static/fonts/figtree-latin.woff2") format("woff2");
}

body:has(#dashboard:not([hidden]) #overview:not([hidden])),
#tip {
  /* Layout: one range row (quick ranges + a day slider) scopes the whole page. Below it a hero figure with
     today's pace, a strip of key indicators, then a two-column grid of chart cards sharing one mark language. */
  --page: #f5f4f7;
  --surface: #ffffff;
  --ink: #1f1a24;
  --ink-2: #5a5361;
  --muted: #857e8c;
  --hair: #e6e3ea;
  --axis: #cdc8d4;
  --wash: #ebe8f0;
  --ghost: #dcd8e3;
  --hover: rgba(31, 26, 36, 0.06);
  --c-sales: #5b48d9;
  --c-orders: #c98500;
  --c-blue: #2a78d6;
  --c-orange: #eb6834;
  --c-aqua: #1baf7a;
  --c-grey: #a39cab;
  --c-cocoa: #7b5646;
  --up: #006300;
  --down: #b42318;
  --shadow: rgba(20, 12, 30, 0.14);
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  body:has(#dashboard:not([hidden]) #overview:not([hidden])),
  #tip {
    --page: #141117;
    --surface: #1e1a22;
    --ink: #f1edf4;
    --ink-2: #c4bccb;
    --muted: #948c9c;
    --hair: #2f2a35;
    --axis: #463f50;
    --wash: #29242f;
    --ghost: #3a3442;
    --hover: rgba(255, 255, 255, 0.07);
    --c-sales: #9085e9;
    --c-orders: #c98500;
    --c-blue: #3987e5;
    --c-orange: #d95926;
    --c-aqua: #199e70;
    --c-grey: #6f6878;
    --c-cocoa: #b08a79;
    --up: #0ca30c;
    --down: #e66767;
    --shadow: rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}
#overview[data-theme="dark"] {
  --page: #141117;
  --surface: #1e1a22;
  --ink: #f1edf4;
  --ink-2: #c4bccb;
  --muted: #948c9c;
  --hair: #2f2a35;
  --axis: #463f50;
  --wash: #29242f;
  --ghost: #3a3442;
  --hover: rgba(255, 255, 255, 0.07);
  --c-sales: #9085e9;
  --c-orders: #c98500;
  --c-blue: #3987e5;
  --c-orange: #d95926;
  --c-aqua: #199e70;
  --c-grey: #6f6878;
  --c-cocoa: #b08a79;
  --up: #0ca30c;
  --down: #e66767;
  --shadow: rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

:focus-visible {
  outline: 2px solid var(--c-sales);
  outline-offset: 2px;
}
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.top {
  border-bottom: 1px solid var(--hair);
  background: var(--surface);
}
.top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 56px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
}
.mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--surface);
  font-weight: 800;
  font-size: 14px;
}
.acct {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-2);
  font-size: 13px;
}
.btn-quiet {
  border: 1px solid var(--hair);
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}
.btn-quiet:hover {
  border-color: var(--axis);
}

#overview .controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 24px;
  align-items: end;
  padding: 28px 0 4px;
}
#overview h1 {
  margin: 0;
  font-family: var(--font);
  font-size: 28px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.sub {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 13px;
}
.presets {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--wash);
  gap: 2px;
}
.presets button {
  border: 0;
  background: none;
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
}
.presets button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--surface);
}
.presets button:hover:not([aria-pressed="true"]) {
  color: var(--ink);
}

.brushbox {
  grid-column: 1/-1;
}
.brush {
  position: relative;
  height: 52px;
  --thumb: 16px;
  --thumb-height: 36px;
  --day-count: 31;
}
@media (min-width: 1000px) {
  .brush {
    height: 96px;
    --thumb-height: 52px;
  }
}
.bars {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  gap: 2px;
}
.bars button {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
}
.bars i {
  display: block;
  width: 100%;
  height: var(--h);
  min-height: 3px;
  background: var(--axis);
  border-radius: 2px 2px 0 0;
}
.bars .in i {
  background: var(--c-sales);
}
.win {
  position: absolute;
  top: -5px;
  bottom: -5px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--c-sales) 10%, transparent);
  pointer-events: none;
}
.brush input {
  position: absolute;
  top: 0;
  height: 100%;
  left: calc(100% / (2 * var(--day-count)) - var(--thumb) / 2);
  width: calc(100% - 100% / var(--day-count) + var(--thumb));
  margin: 0;
  padding: 0;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}
.brush input::-webkit-slider-runnable-track {
  height: var(--thumb-height);
  background: none;
}
.brush input::-moz-range-track {
  height: var(--thumb-height);
  background: none;
}
.brush input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto;
  width: var(--thumb);
  height: var(--thumb-height);
  border-radius: 8px;
  background: var(--surface);
  border: 2px solid var(--ink);
  cursor: ew-resize;
}
.brush input::-moz-range-thumb {
  pointer-events: auto;
  width: 12px;
  height: calc(var(--thumb-height) - 4px);
  border-radius: 8px;
  background: var(--surface);
  border: 2px solid var(--ink);
  cursor: ew-resize;
}
.brush input:focus-visible {
  outline: none;
}
.brush input:focus-visible::-webkit-slider-thumb {
  outline: 2px solid var(--c-sales);
  outline-offset: 2px;
}
.brush input:focus-visible::-moz-range-thumb {
  outline: 2px solid var(--c-sales);
  outline-offset: 2px;
}
.brush-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}
.brush-meta b {
  color: var(--ink-2);
  font-weight: 600;
  text-align: center;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px 48px;
  align-items: end;
  padding: 26px 0 26px;
}
.sales-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
#print-details {
  display: none;
}
.k {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
}
.hero-fig {
  margin: 2px 0 12px;
  font-size: clamp(52px, 8.4vw, 80px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.hero-fig small {
  font-size: 0.45em;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: -0.01em;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--hair);
  font-size: 13px;
  color: var(--ink-2);
}
.chip b,
.d {
  font-weight: 700;
  white-space: nowrap;
}
.up b,
.d.up {
  color: var(--up);
}
.down b,
.d.down {
  color: var(--down);
}
.pace-h {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.track {
  position: relative;
  height: 14px;
  border-radius: 7px;
  background: var(--wash);
}
.track .rng {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 7px;
  background: color-mix(in srgb, var(--c-sales) 30%, transparent);
}
.track .fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 7px;
  background: var(--c-sales);
}
.track .avg {
  position: absolute;
  top: -5px;
  bottom: -5px;
  width: 2px;
  margin-left: -1px;
  background: var(--ink);
  border-radius: 1px;
}
.pace-keys {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--ink-2);
}
.pace-keys b {
  display: block;
  font-size: 15px;
  color: var(--ink);
  font-weight: 700;
}
.pace-keys i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 6px;
}
.pace-keys i.ln {
  width: 2px;
  height: 12px;
  border-radius: 1px;
  margin: 0 10px -2px 4px;
}
.note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.facts span {
  display: block;
  color: var(--ink-2);
  font-size: 13px;
}
.facts b {
  display: block;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 2px;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
  border-radius: 14px;
  overflow: hidden;
}
.tile {
  background: var(--surface);
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.tile .l {
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 500;
}
.tile .v {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.tile .n {
  font-size: 12px;
  color: var(--ink-2);
  min-height: 35px;
}
.tile svg {
  margin-top: auto;
  display: block;
}
.cap {
  margin: 8px 2px 0;
  color: var(--muted);
  font-size: 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 14px;
  padding: 18px 18px 16px;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#c-traffic .chart {
  margin-bottom: 16px;
}
.span2 {
  grid-column: 1/-1;
}
.card-h {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 8px;
}
.card h2 {
  margin: 0 auto 0 0;
  font-size: 16px;
  font-weight: 700;
}
.card h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 12px;
  color: var(--ink-2);
}
.lk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sw {
  display: inline-block;
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.sw.ln {
  height: 3px;
  width: 14px;
  border-radius: 2px;
}
.tgl {
  border: 1px solid var(--hair);
  background: none;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
}
.tgl:hover {
  color: var(--ink);
  border-color: var(--axis);
}
.chart {
  position: relative;
  border-radius: 8px;
  outline-offset: 4px;
}
.chart svg {
  display: block;
  touch-action: pan-y;
  max-width: 100%;
}
.grid-l {
  stroke: var(--hair);
  stroke-width: 1;
}
.axis-l {
  stroke: var(--axis);
  stroke-width: 1;
}
.tick {
  fill: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.blabel {
  fill: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
}
.dlabel {
  fill: var(--ink);
  font-size: 11px;
  font-weight: 700;
}
.now-l {
  stroke: var(--ink);
  stroke-width: 1;
}
.now-t {
  fill: var(--ink);
  font-size: 11px;
  font-weight: 700;
}
.ghost {
  fill: var(--ghost);
}
.hov {
  fill: var(--hover);
}
.empty {
  margin: 0;
  padding: 56px 12px;
  text-align: center;
  color: var(--ink-2);
  font-size: 13px;
}

.tw {
  overflow: auto;
  max-height: 330px;
  border: 1px solid var(--hair);
  border-radius: 10px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
th,
td {
  padding: 6px 10px;
  text-align: right;
  border-bottom: 1px solid var(--hair);
  white-space: nowrap;
}
th:first-child,
td:first-child {
  text-align: left;
}
thead th {
  position: sticky;
  top: 0;
  background: var(--surface);
  color: var(--ink-2);
  font-weight: 600;
  font-size: 12px;
}
tbody tr:last-child td {
  border-bottom: 0;
}
.mini {
  margin-top: 12px;
  overflow-x: auto;
}
.mini td:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--hair);
  border-top: 1px solid var(--hair);
  margin: auto -18px -16px;
}
.stats div {
  background: var(--surface);
  padding: 11px 16px 12px;
}
.stats b {
  display: block;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.stats span {
  display: block;
  font-size: 12px;
  color: var(--ink-2);
}

.boxes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 4px 0 20px;
}
.boxes b {
  display: block;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.boxes span {
  display: block;
  font-size: 12px;
  color: var(--ink-2);
}
.hb {
  display: grid;
  grid-template-columns: max-content minmax(40px, 1fr) max-content;
  gap: 10px 12px;
  align-items: center;
  font-size: 13px;
}
.hb .flavour-bar {
  height: 10px;
  border-radius: 0 4px 4px 0;
  background: var(--c-cocoa);
  min-width: 2px;
}
.hb .val {
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.hb .val b {
  color: var(--ink);
  font-weight: 700;
  margin-right: 6px;
}

.tip {
  position: fixed;
  z-index: 10;
  pointer-events: none;
  min-width: 150px;
  max-width: 270px;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 10px;
  padding: 8px 11px;
  box-shadow: 0 6px 20px var(--shadow);
  font-size: 12px;
}
.tip h4 {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}
.tip .r {
  display: flex;
  align-items: baseline;
  gap: 6px;
  line-height: 1.55;
}
.tip .r i {
  flex: none;
  width: 10px;
  height: 3px;
  border-radius: 2px;
  align-self: center;
}
.tip .r b {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tip .r span {
  color: var(--ink-2);
}

@media (max-width: 1000px) {
  .tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 860px) {
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
  #overview .controls {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 560px) {
  .wrap {
    padding: 0 16px;
  }
  #overview h1 {
    font-size: 24px;
  }
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats,
  .boxes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .presets {
    display: flex;
    flex-wrap: wrap;
    border-radius: 18px;
  }
  .presets button {
    flex: 1;
    padding: 7px 6px;
  }
  .pace-keys {
    grid-template-columns: minmax(0, 1fr);
  }
  .mini th:nth-child(3),
  .mini td:nth-child(3) {
    display: none;
  }
  .mini th,
  .mini td {
    padding: 6px 6px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .presets button,
  .bars i {
    transition:
      background-color 0.15s,
      color 0.15s;
  }
}

#overview {
  background: var(--page);
  color: var(--ink);
  font: 400 14px/1.45 var(--font);
  padding-bottom: 30px;
}
#overview button {
  font: inherit;
}
#overview :focus-visible {
  outline-color: var(--c-sales);
}
#overview-status {
  margin: 12px 0 0;
}
#overview-status:empty {
  display: none;
}
body:has(#dashboard:not([hidden]) #overview:not([hidden])) {
  background: var(--page);
}
body:has(#dashboard:not([hidden]) #overview:not([hidden])) > .bar {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--hair);
}
body:has(#dashboard:not([hidden]) #overview:not([hidden])) > .bar .quiet {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--axis);
}
.account .quiet {
  white-space: nowrap;
}
