.analytics {
|
|
--analytics-positive: #1a863a;
|
|
--analytics-negative: #b24226;
|
|
--analytics-neutral: #c08a1e;
|
|
|
|
max-width: 1100px;
|
|
padding-bottom: 4rem;
|
|
}
|
|
|
|
|
|
/* ----------------------------------------------------------- period picker */
|
|
|
|
.analytics-periods {
|
|
display: flex;
|
|
gap: 0.25rem;
|
|
align-items: center;
|
|
}
|
|
|
|
.analytics-period {
|
|
padding: 0.35em 0.8em;
|
|
border-radius: 999px;
|
|
border: 1px solid var(--border);
|
|
color: var(--secondary);
|
|
text-decoration: none;
|
|
font-size: 0.85rem;
|
|
white-space: nowrap;
|
|
|
|
&:hover {
|
|
background: var(--hover);
|
|
}
|
|
|
|
&.current {
|
|
background: var(--clr-black);
|
|
border-color: var(--clr-black);
|
|
color: #fff;
|
|
}
|
|
}
|
|
|
|
|
|
.analytics-warning {
|
|
border: 1px solid #e0c060;
|
|
background: #fdf6e3;
|
|
border-radius: 8px;
|
|
padding: 0.8rem 1rem;
|
|
margin: 1.5rem 0 0;
|
|
font-size: 0.85rem;
|
|
line-height: 1.5;
|
|
max-width: 70ch;
|
|
|
|
& code {
|
|
font-family: var(--font-mono);
|
|
font-size: 0.8em;
|
|
}
|
|
}
|
|
|
|
|
|
/* ------------------------------------------------------------------- cards */
|
|
|
|
.analytics-cards {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
|
gap: 1rem;
|
|
margin: 1.5rem 0;
|
|
}
|
|
|
|
.analytics-card {
|
|
border: 1px solid var(--border);
|
|
border-radius: 10px;
|
|
padding: 1.1rem 1.2rem;
|
|
background: #fff;
|
|
|
|
&.positive .analytics-card-value { color: var(--analytics-positive); }
|
|
&.negative .analytics-card-value { color: var(--analytics-negative); }
|
|
}
|
|
|
|
.analytics-card-value {
|
|
font-size: 2rem;
|
|
line-height: 1.1;
|
|
font-weight: 500;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
.analytics-card-label {
|
|
margin-top: 0.35rem;
|
|
color: var(--secondary);
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.analytics-card-sub {
|
|
margin-top: 0.2rem;
|
|
color: var(--clr-grey-400);
|
|
font-size: 0.78rem;
|
|
}
|
|
|
|
|
|
/* ------------------------------------------------------------------ panels */
|
|
|
|
.analytics-panel {
|
|
border-top: 1px solid var(--border);
|
|
padding-top: 1.5rem;
|
|
margin-top: 2.5rem;
|
|
|
|
& > h2 {
|
|
font-size: 1.1rem;
|
|
font-weight: 500;
|
|
margin: 0 0 0.25rem;
|
|
|
|
& small {
|
|
color: var(--clr-grey-400);
|
|
font-weight: 400;
|
|
font-size: 0.8rem;
|
|
margin-left: 0.5rem;
|
|
}
|
|
}
|
|
|
|
& .analytics-cards {
|
|
margin-top: 1rem;
|
|
}
|
|
}
|
|
|
|
.analytics-note,
|
|
.analytics-empty {
|
|
color: var(--secondary);
|
|
font-size: 0.85rem;
|
|
margin: 0.25rem 0 0;
|
|
max-width: 60ch;
|
|
}
|
|
|
|
.analytics-empty {
|
|
padding: 1rem 0;
|
|
font-style: italic;
|
|
}
|
|
|
|
.analytics-columns {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
|
|
gap: 0 2.5rem;
|
|
}
|
|
|
|
|
|
/* -------------------------------------------------------------------- bars */
|
|
|
|
.analytics-bars {
|
|
margin-top: 1.25rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.35rem;
|
|
}
|
|
|
|
/* Narrow two-column breakdowns have no delta column, and the label and value
|
|
columns have to shrink or the track collapses to nothing. */
|
|
.analytics-bars--compact .analytics-bar-row {
|
|
grid-template-columns: minmax(80px, 12rem) 1fr 6.5rem;
|
|
gap: 0.6rem;
|
|
}
|
|
|
|
.analytics-bar-row {
|
|
display: grid;
|
|
grid-template-columns: minmax(140px, 22rem) 1fr 8.5rem 6rem;
|
|
align-items: center;
|
|
gap: 0.85rem;
|
|
font-size: 0.85rem;
|
|
padding: 0.25rem 0;
|
|
|
|
&.is-outcome {
|
|
font-size: 0.8rem;
|
|
opacity: 0.8;
|
|
|
|
& .analytics-bar-label {
|
|
padding-left: 1rem;
|
|
}
|
|
}
|
|
}
|
|
|
|
.analytics-bar-label {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
|
|
& em {
|
|
color: var(--clr-grey-400);
|
|
font-style: normal;
|
|
font-size: 0.72rem;
|
|
margin-left: 0.4rem;
|
|
}
|
|
}
|
|
|
|
.analytics-bar-track {
|
|
background: var(--clr-grey-200);
|
|
border-radius: 3px;
|
|
height: 12px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.analytics-bar-fill {
|
|
height: 100%;
|
|
background: var(--action);
|
|
border-radius: 3px;
|
|
transition: width 0.2s ease;
|
|
|
|
&.positive { background: var(--analytics-positive); }
|
|
&.negative { background: var(--analytics-negative); }
|
|
&.neutral { background: var(--analytics-neutral); }
|
|
}
|
|
|
|
.analytics-bar-value {
|
|
font-variant-numeric: tabular-nums;
|
|
white-space: nowrap;
|
|
|
|
& span {
|
|
color: var(--secondary);
|
|
margin-left: 0.4rem;
|
|
font-size: 0.78rem;
|
|
}
|
|
}
|
|
|
|
.analytics-bar-delta {
|
|
font-variant-numeric: tabular-nums;
|
|
font-size: 0.78rem;
|
|
text-align: right;
|
|
|
|
& .negative { color: var(--analytics-negative); }
|
|
}
|
|
|
|
|
|
/* ------------------------------------------------------------ split & stage */
|
|
|
|
.analytics-split {
|
|
display: flex;
|
|
height: 14px;
|
|
border-radius: 3px;
|
|
overflow: hidden;
|
|
margin-top: 1.25rem;
|
|
background: var(--clr-grey-200);
|
|
}
|
|
|
|
.analytics-split-part {
|
|
&.positive { background: var(--analytics-positive); }
|
|
&.negative { background: var(--analytics-negative); }
|
|
}
|
|
|
|
.analytics-stage {
|
|
margin-top: 2rem;
|
|
|
|
& > h3 {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
font-size: 0.95rem;
|
|
font-weight: 500;
|
|
margin: 0;
|
|
|
|
& small {
|
|
color: var(--clr-grey-400);
|
|
font-weight: 400;
|
|
font-size: 0.78rem;
|
|
}
|
|
}
|
|
}
|
|
|
|
.analytics-stage-index {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 1.5rem;
|
|
aspect-ratio: 1;
|
|
border-radius: 50%;
|
|
background: var(--clr-grey-200);
|
|
font-size: 0.75rem;
|
|
}
|