:root
{
    --bg: #fafafa;
    --surface: #fff;
    --ink: #242424;
    --muted: #8a8a8a;
    --line: #e7e7e7;
    --soft: #f3f3f3;
    --chart-1: #343434;
    --chart-2: #757575;
    --chart-3: #a3a3a3;
    --chart-4: #c4c4c4;
    --chart-5: #dedede;
}
body.dark
{
    --bg: #141414;
    --surface: #1b1b1b;
    --ink: #e7e7e7;
    --muted: #989898;
    --line: #333;
    --soft: #262626;
    --chart-1: #dedede;
    --chart-2: #aaa;
    --chart-3: #858585;
    --chart-4: #5b5b5b;
    --chart-5: #373737;
}
*
{
    box-sizing: border-box;
}
body
{
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 12px/1.6 "Segoe UI", sans-serif;
}
button, input
{
    font: inherit;
}
button, a
{
    cursor: pointer;
    color: inherit;
}
button:focus-visible, a:focus-visible, input:focus-visible
{
    outline: 2px solid var(--ink);
    outline-offset: 4px;
}
aside
{
    width: 194px;
    position: fixed;
    inset: 0 auto 0 0;
    background: var(--surface);
    border-right: 1px solid var(--line);
    padding: 32px 22px 22px;
    display: flex;
    flex-direction: column;
}
.brand
{
    font: 26px/1 Georgia, serif;
    letter-spacing: 3px;
    text-decoration: none;
}
.brand span
{
    font: 6px/3 monospace;
    letter-spacing: 2.3px;
    display: block;
}
.eyebrow
{
    color: var(--muted);
    font: 8px/1.6 monospace;
    letter-spacing: 1.4px;
}
aside > .eyebrow
{
    margin-top: 55px;
    font-size: 7px;
}
nav
{
    display: grid;
    gap: 7px;
    margin-top: 12px;
}
nav a, nav button
{
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    color: var(--muted);
    text-decoration: none;
    text-align: left;
    font-size: 10px;
}
nav .selected
{
    background: var(--soft);
    border-radius: 6px;
    color: var(--ink);
}
nav svg
{
    width: 13px;
    height: 13px;
}
.sidebar-bottom
{
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-size: 9px;
}
.sidebar-bottom small
{
    display: block;
    color: var(--muted);
    font-size: 7px;
}
.avatar
{
    background: var(--soft);
    padding: 7px 12px;
    font: 17px Georgia, serif;
}
main
{
    margin-left: 194px;
    padding: 25px 34px;
    max-width: 1500px;
}
header, .page-heading, .controls, .actions, .panel-heading, .chart-footer, footer
{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}
header
{
    color: var(--muted);
    font-size: 9px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}
header i
{
    font-style: normal;
    margin: 0 12px;
    color: var(--chart-4);
}
#theme
{
    display: flex;
    align-items: center;
    gap: 7px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 9px;
}
#theme svg
{
    width: 13px;
    height: 13px;
}
.page-heading
{
    margin: 27px 0 20px;
}
h1
{
    font-size: 34px;
    font-weight: 500;
    letter-spacing: -1.5px;
    margin: 6px 0;
    line-height: 1.1;
}
.page-heading p:not(.eyebrow)
{
    color: var(--muted);
    font-size: 11px;
    margin-bottom: 0;
}
.sample-badge
{
    font: 7px monospace;
    letter-spacing: 1px;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 5px 9px;
    display: block;
    width: fit-content;
    margin-left: auto;
}
.page-heading .date-label
{
    font-size: 9px;
}
.controls
{
    margin-bottom: 22px;
}
.ranges, .metric-tabs
{
    display: flex;
    padding: 3px;
    background: var(--soft);
    border-radius: 6px;
    gap: 3px;
}
.ranges button, .metric-tabs button
{
    border: 0;
    background: transparent;
    padding: 7px 13px;
    color: var(--muted);
    font-size: 9px;
    border-radius: 4px;
}
.ranges .active, .metric-tabs .active
{
    color: var(--ink);
    background: var(--surface);
    box-shadow: 0 1px 3px #0000000c;
}
.actions button, #restore
{
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 8px 11px;
    font-size: 9px;
}
.stats
{
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 18px;
    margin-bottom: 22px;
}
.stats article, .panel
{
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
    background: var(--surface);
}
.stats article > div
{
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    color: var(--muted);
}
.stats svg
{
    width: 15px;
    height: 15px;
    color: var(--chart-3);
}
.stats strong
{
    display: block;
    font-size: 34px;
    line-height: 1.2;
    letter-spacing: -1.3px;
    font-weight: 500;
    margin: 14px 0 10px;
    font-variant-numeric: tabular-nums;
}
.stats small
{
    color: var(--muted);
    font-size: 8px;
}
.insight
{
    padding: 6px 0 0 14px;
    border-left: 1px solid var(--line);
}
.insight .eyebrow
{
    font-size: 6px;
}
.insight h2
{
    font: 25px/1.15 Georgia, serif;
    margin: 10px 0;
}
.insight > p:last-child
{
    font-size: 8px;
    color: var(--muted);
}
h2
{
    font-size: 13px;
    font-weight: 500;
    margin: 0;
}
.panel-heading p
{
    color: var(--muted);
    font-size: 9px;
    margin: 5px 0 0;
}
.panel-heading > span
{
    font: 7px monospace;
    color: var(--muted);
    letter-spacing: 1px;
}
.metric-tabs button
{
    font-size: 8px;
    padding: 5px 10px;
}
#trend-chart
{
    display: block;
    width: 100%;
    height: 150px;
    margin-top: 16px;
    color: var(--chart-1);
}
.chart-footer
{
    font: 7px monospace;
    color: var(--muted);
}
.day-control
{
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 8px;
    color: var(--muted);
    margin-top: 14px;
}
.day-control input
{
    flex: 1;
    min-width: 0;
    height: 2px;
    accent-color: var(--ink);
}
.breakdowns
{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 22px;
}
.breakdowns .panel
{
    padding: 18px 20px;
}
.bar-row
{
    margin-top: 13px;
    font-size: 9px;
}
.bar-label
{
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}
.bar-label span:first-child
{
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bar-label span:last-child
{
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}
.bar-track
{
    background: var(--soft);
    height: 4px;
    border-radius: 3px;
    margin-top: 5px;
}
.bar-fill
{
    height: 100%;
    background: var(--chart-2);
    border-radius: 3px;
}
.no-data
{
    font-size: 10px;
    color: var(--muted);
    margin-top: 25px;
}
#empty
{
    text-align: center;
    padding: 30px 15px;
}
.empty-icon
{
    border: 1px solid var(--line);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin: auto;
    padding-top: 8px;
    font-size: 15px;
}
#empty h3
{
    font: 24px Georgia, serif;
}
#empty p
{
    color: var(--muted);
    max-width: 350px;
    font-size: 10px;
    margin: 15px auto 20px;
}
footer
{
    padding-top: 24px;
    color: var(--muted);
    font: 7px/1.6 monospace;
    letter-spacing: .5px;
}
dialog
{
    width: 430px;
    max-width: calc(100vw - 30px);
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 30px;
}
dialog::backdrop
{
    background: #0008;
}
dialog h2
{
    font: 30px Georgia, serif;
    margin: 20px 0;
}
dialog p
{
    color: var(--muted);
    font-size: 12px;
}
.close
{
    float: right;
    background: transparent;
    border: 0;
    font-size: 22px;
}
[hidden]
{
    display: none !important;
}
@media (max-width: 700px)
{
    aside
    {
        position: static;
        width: auto;
        padding: 20px 22px;
    }
    aside > .eyebrow, nav, .sidebar-bottom
    {
        display: none;
    }
    .brand
    {
        font-size: 22px;
    }
    main
    {
        margin: 0;
        padding: 20px;
    }
    .page-heading
    {
        align-items: center;
    }
    .page-heading .date-label
    {
        font-size: 7px;
    }
    .controls
    {
        flex-wrap: wrap;
    }
    .actions
    {
        gap: 10px;
    }
    .stats
    {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .stats article
    {
        padding: 16px;
    }
    .stats strong
    {
        font-size: 30px;
    }
    .insight
    {
        display: none;
    }
    .trend
    {
        padding: 17px;
    }
    .trend .panel-heading
    {
        flex-wrap: wrap;
    }
    #trend-chart
    {
        height: 135px;
    }
    #daily-summary
    {
        max-width: 180px;
        text-align: center;
    }
    .breakdowns
    {
        grid-template-columns: 1fr;
    }
    footer
    {
        flex-wrap: wrap;
    }
}
