/* The dashboard welcome tour with the hole of light that changes shape. The dashboard window is the component: over it
   an SVG veil with a masked hole (one rounded rectangle whose size and corner radius spring, so the same shape is a
   bar, a circle or a pill), a thin ring of light on the hole's edge and the step card that follows on its own spring. */
:root {
  --page: #ffffff;          /* the page */
  --app: #fbfbfa;           /* the dashboard window */
  --panel: #ffffff;         /* the cards inside it */
  --line: rgba(20, 21, 28, 0.08); /* hairlines */
  --ink: #14151b;           /* the words */
  --muted: #6c6f7a;         /* the small words */
  --accent: #4a57ff;        /* the one accent: the line, the ring, the Next pill, the dashes */
  --veil: #0a0b12;          /* the veil */
  --tip: #ffffff;           /* the step card */
}

* { box-sizing: border-box; }

html { touch-action: manipulation; }

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  min-height: 100svh;
  background: var(--page);
  color: var(--ink);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.stage {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 12px;
  overflow: hidden;
}

/* the window */
.app {
  position: relative;
  width: min(92vw, 600px);
  height: clamp(290px, 80vh, 392px);
  border-radius: 18px;
  background: var(--app);
  box-shadow:
    0 0 0 1px var(--line),
    0 1px 2px rgba(20, 21, 28, 0.05),
    0 12px 32px -12px rgba(20, 21, 28, 0.16),
    0 40px 80px -40px rgba(20, 21, 28, 0.22);
  overflow: hidden;
  isolation: isolate;
}

.ui {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.8vh, 14px);
  padding: clamp(10px, 2.4vh, 16px) clamp(10px, 3vw, 18px);
}

/* the top bar */
.bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 640;
  font-size: 14px;
  letter-spacing: -0.01em;
  font-variation-settings: 'wdth' 104;
  padding-right: 4px;
}

.brand__mark {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.search {
  flex: 1;
  min-width: 0;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 11px;
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(20, 21, 28, 0.04);
  color: var(--muted);
}

.search__icon {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.search__field {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  pointer-events: none;
}

.search__field::placeholder { color: var(--muted); }

.search__key {
  flex: none;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  font: inherit;
  font-size: 11px;
  color: var(--muted);
  background: var(--app);
  box-shadow: 0 0 0 1px var(--line), 0 1px 0 var(--line);
}

.add {
  flex: none;
  width: 38px;
  height: 38px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 4px 10px -4px rgba(20, 21, 28, 0.5);
  cursor: pointer;
}

.add svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

/* the panel */
.panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.4vh, 12px);
  padding: clamp(10px, 2.2vh, 16px) clamp(10px, 2.6vw, 16px) clamp(8px, 1.6vh, 12px);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(20, 21, 28, 0.04);
}

.panel__sum { padding: 2px 6px 2px 0; }

.panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.panel__label {
  margin: 0 0 3px;
  font-size: 12px;
  color: var(--muted);
}

.panel__num {
  margin: 0;
  font-size: clamp(19px, 5.4vw, 24px);
  font-weight: 620;
  letter-spacing: -0.025em;
  font-variation-settings: 'wdth' 96;
  white-space: nowrap;
}

.panel__delta {
  font-size: 12px;
  font-weight: 560;
  letter-spacing: 0;
  color: #138a57;
  vertical-align: 3px;
}

.filter {
  flex: none;
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px 0 11px;
  border: 0;
  border-radius: 999px;
  background: var(--app);
  box-shadow: 0 0 0 1px var(--line);
  font: inherit;
  font-size: 12px;
  font-weight: 540;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}

.filter svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.filter__cal { color: var(--muted); }

.chart {
  position: relative;
  flex: 1;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
}

.chart__svg {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: block;
  overflow: visible;
}

.chart__grid {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 3 4;
  vector-effect: non-scaling-stroke;
}

.chart__area { fill: url(#area); }

.chart__line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.chart__axis {
  display: flex;
  justify-content: space-between;
  padding-top: 6px;
  font-size: 10.5px;
  color: var(--muted);
}

/* the veil */
  --tip: #ffffff;           /* the step card */
}

* { box-sizing: border-box; }

html { touch-action: manipulation; }

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  min-height: 100svh;
  background: var(--page);
  color: var(--ink);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.stage {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 12px;
  overflow: hidden;
}

/* the window */
.app {
  position: relative;
  width: min(92vw, 600px);
  height: clamp(290px, 80vh, 392px);
  border-radius: 18px;
  background: var(--app);
  box-shadow:
    0 0 0 1px var(--line),
    0 1px 2px rgba(20, 21, 28, 0.05),
    0 12px 32px -12px rgba(20, 21, 28, 0.16),
    0 40px 80px -40px rgba(20, 21, 28, 0.22);
  overflow: hidden;
  isolation: isolate;
}

.ui {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.8vh, 14px);
  padding: clamp(10px, 2.4vh, 16px) clamp(10px, 3vw, 18px);
}

/* the top bar */
.bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 640;
  font-size: 14px;
  letter-spacing: -0.01em;
  font-variation-settings: 'wdth' 104;
  padding-right: 4px;
}

.brand__mark {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.search {
  flex: 1;
  min-width: 0;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 11px;
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(20, 21, 28, 0.04);
  color: var(--muted);
}

.search__icon {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.search__field {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  pointer-events: none;
}

.search__field::placeholder { color: var(--muted); }

.search__key {
  flex: none;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  font: inherit;
  font-size: 11px;
  color: var(--muted);
  background: var(--app);
  box-shadow: 0 0 0 1px var(--line), 0 1px 0 var(--line);
}

.add {
  flex: none;
  width: 38px;
  height: 38px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 4px 10px -4px rgba(20, 21, 28, 0.5);
  cursor: pointer;
}

.add svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

/* the panel */
.panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.4vh, 12px);
  padding: clamp(10px, 2.2vh, 16px) clamp(10px, 2.6vw, 16px) clamp(8px, 1.6vh, 12px);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(20, 21, 28, 0.04);
}

.panel__sum { padding: 2px 6px 2px 0; }

.panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.panel__label {
  margin: 0 0 3px;
  font-size: 12px;
  color: var(--muted);
}

.panel__num {
  margin: 0;
  font-size: clamp(19px, 5.4vw, 24px);
  font-weight: 620;
  letter-spacing: -0.025em;
  font-variation-settings: 'wdth' 96;
  white-space: nowrap;
}

.panel__delta {
  font-size: 12px;
  font-weight: 560;
  letter-spacing: 0;
  color: #138a57;
  vertical-align: 3px;
}

.filter {
  flex: none;
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px 0 11px;
  border: 0;
  border-radius: 999px;
  background: var(--app);
  box-shadow: 0 0 0 1px var(--line);
  font: inherit;
  font-size: 12px;
  font-weight: 540;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}

.filter svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.filter__cal { color: var(--muted); }

.chart {
  position: relative;
  flex: 1;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
}

.chart__svg {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: block;
  overflow: visible;
}

.chart__grid {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 3 4;
  vector-effect: non-scaling-stroke;
}

.chart__area { fill: url(#area); }

.chart__line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.chart__axis {
  display: flex;
  justify-content: space-between;
  padding-top: 6px;
  font-size: 10.5px;
  color: var(--muted);
}

/* the reading hairline that appears on the chart step */
.chart__hair {
  position: absolute;
  top: 4px;
  bottom: 22px;
  left: 75%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(20, 21, 28, 0.35) 30%, rgba(20, 21, 28, 0.35));
  opacity: 0;
  pointer-events: none;
}

.chart__val {
  position: absolute;
  top: 0;
  left: 50%;
  translate: -50% 0;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 10.5px;
  font-weight: 560;
  white-space: nowrap;
}

/* the veil */
.veil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.veil__fill { fill: var(--veil); }

.veil__ring {
  fill: none;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 1.25;
}

.veil__glow {
  fill: none;
  stroke: var(--accent);
  stroke-width: 5;
  opacity: 0.5;
}

/* the step card */
.tip {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  width: min(248px, calc(100% - 20px));
  will-change: transform;
}

.tip__card {
  position: relative;
  padding: 14px 14px 12px;
  border-radius: 14px;
  background: var(--tip);
  box-shadow:
    0 0 0 1px rgba(20, 21, 28, 0.06),
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 2px 4px rgba(10, 11, 18, 0.08),
    0 18px 40px -14px rgba(10, 11, 18, 0.45);
  opacity: 0;
  transform-origin: 50% 0;
}

.tip.is-above .tip__card { transform-origin: 50% 100%; }

.tip__notch {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 11px;
  height: 11px;
  margin-left: -5.5px;
  border-radius: 2px 0 0 0;
  background: var(--tip);
  box-shadow: -1px -1px 0 rgba(20, 21, 28, 0.06);
  rotate: 45deg;
}

.tip.is-above .tip__notch {
  top: auto;
  bottom: -5px;
  border-radius: 0 0 2px 0;
  box-shadow: 1px 1px 0 rgba(20, 21, 28, 0.06);
}

.tip__copy { min-height: 54px; }

.tip__title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 640;
  letter-spacing: -0.01em;
  font-variation-settings: 'wdth' 100;
}

.tip__text {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.42;
  color: var(--muted);
}

.tip__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}

.dashes {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dashes i {
  position: relative;
  display: block;
  width: 8px;
  height: 3px;
  border-radius: 2px;
  background: rgba(20, 21, 28, 0.13);
  overflow: hidden;
}

.dashes b {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

.tip__acts {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.skip,
.next {
  height: 30px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 580;
  cursor: pointer;
}

.skip {
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  transition: color 0.2s, background-color 0.2s;
}

.next {
  min-width: 62px;
  padding: 0 14px;
  background: var(--accent);
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.28) inset,
    0 -1px 0 rgba(0, 0, 0, 0.14) inset,
    0 4px 12px -4px color-mix(in srgb, var(--accent) 70%, transparent);
  font-variation-settings: 'wdth' 100;
  transition: font-variation-settings 0.35s cubic-bezier(0.3, 1.6, 0.5, 1), box-shadow 0.25s, filter 0.25s;
}

.next__words { display: inline-block; }

@media (hover: hover) {
  .skip:hover { color: var(--ink); background: rgba(20, 21, 28, 0.05); }
  .next:hover {
    font-variation-settings: 'wdth' 118;
    filter: brightness(1.06);
  }
}

.skip:focus-visible,
.next:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 420px) {
  .brand__name { display: none; }
  .search__key { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .next { transition: none; }
}
