@font-face {
    font-family: Inter;
    src: url("fonts/inter-latin.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    color-scheme: light;
    --night: #10233F;
    --teal: #11D1B4;
    --teal-strong: #00BEA8;
    --mint: #69E8C7;
    --canvas: #F6F9FB;
    --muted: #64748B;
    --white: #FFFFFF;
    --line: #DFE8EE;
    --control-line: #7D8B9D;
    --tint: #E7FBF6;
    --error: #8B253C;
    --error-bg: #FFF0F3;
    --shadow: 0 8px 26px rgb(16 35 63 / 5%);
    --radius: 20px;
    font: 400 1rem/1.55 Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); color: var(--night); background: var(--canvas); }
img { display: block; max-width: 100%; object-fit: contain; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.13; letter-spacing: -.035em; }
h1 { font-size: clamp(2rem, 5.5vw, 3.6rem); font-weight: 790; }
h2 { font-size: clamp(1.23rem, 2vw, 1.65rem); font-weight: 760; }
h3 { font-size: 1.25rem; }
ol { padding-left: 1.35rem; }
ol li + li { margin-top: .6rem; }
code { overflow-wrap: anywhere; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--night); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 3; top: .75rem; left: .75rem; padding: .75rem; background: var(--white); clip-path: inset(50%); }
.skip-link:focus { clip-path: none; }
.shell { width: min(100% - 2rem, 72rem); margin-inline: auto; }
.narrow { width: min(100% - 2rem, 35rem); padding-block: 2rem; }
.workspace, .install-guide { display: grid; gap: 1.2rem; padding-block: 1.4rem 1.9rem; }
.page-heading { padding-block: .6rem; }
.eyebrow { font-size: .72rem; line-height: 1.4; letter-spacing: .11em; text-transform: uppercase; font-weight: 770; margin-bottom: .45rem; }
.card .eyebrow, .auth-form .eyebrow { color: var(--muted); }
.lede { margin-top: .65rem; max-width: 40rem; }
.muted, small { color: var(--muted); }
.text-link, .back-link { font-weight: 660; text-underline-offset: .2em; }
.text-link:hover, .back-link:hover { text-decoration-thickness: .15em; }
.back-link { width: fit-content; font-size: .9rem; }
.nowrap { white-space: nowrap; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    border: 1px solid transparent;
    border-radius: .72rem;
    padding: .62rem 1.05rem;
    color: var(--night);
    font-weight: 720;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    transition: background-color 150ms ease, border-color 150ms ease;
}
.button.primary { background: var(--teal); }
.button.primary:hover { background: var(--teal-strong); }
.button.secondary { background: var(--white); border-color: var(--control-line); }
.button.secondary:hover, .button.quiet:hover { background: var(--tint); }
.button.quiet { background: transparent; }
.button.danger { color: var(--error); background: var(--error-bg); border-color: var(--error); }
.button.small { min-height: 2.75rem; padding-inline: .78rem; font-size: .86rem; }
.button:disabled { cursor: wait; opacity: .72; }
.notice { padding: .75rem .9rem; border-radius: .65rem; background: var(--tint); color: var(--night); font-size: .9rem; }
.notice.error { background: var(--error-bg); color: var(--error); }
.card, .metric { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
.card { padding: clamp(1.05rem, 3vw, 1.65rem); }
.card > h2 + p { margin-top: .55rem; }
.card > h2 + form, .card > p + form, .card > h2 + table { margin-top: 1rem; }
.empty { text-align: center; padding-block: 2.2rem; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.section-head + * { margin-top: .85rem; }

.form-stack { display: grid; gap: .95rem; }
.form-stack > button { justify-self: start; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.inline-form, .filters { display: flex; gap: .55rem; align-items: end; flex-wrap: wrap; }
.filters { margin-block: 1rem; gap: .7rem; }
.filters label { flex: 1 1 9rem; }
label, legend { color: var(--night); font-size: .85rem; font-weight: 680; }
label { display: grid; gap: .28rem; min-width: 0; }
input:not([type="checkbox"]), select {
    min-height: 2.75rem;
    min-width: 0;
    width: 100%;
    padding: .52rem .62rem;
    border: 1px solid var(--control-line);
    border-radius: .55rem;
    background: var(--white);
    color: var(--night);
    font-size: 1rem;
}
input[type="month"] { min-width: 8.7rem; }
input[type="number"] { max-width: 13rem; }
.check { display: flex; align-items: center; min-height: 2.75rem; gap: .5rem; }
input[type="checkbox"] { width: 1.15rem; height: 1.15rem; accent-color: var(--night); }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: .6rem; padding: .4rem .75rem; margin: 0; }
.weekday-grid { display: grid; grid-template-columns: repeat(2, 1fr); }

.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { width: min(100% - 2rem, 72rem); margin: auto; padding-block: .55rem; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .45rem; }
.brand { display: inline-flex; width: max-content; align-items: center; min-height: 2.75rem; }
.main-nav { grid-row: 2; grid-column: 1 / -1; display: flex; align-items: center; gap: .22rem; flex-wrap: wrap; }
.main-nav a, .tabs a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .38rem .65rem; border-radius: .55rem; text-decoration: none; font-size: .84rem; font-weight: 680; }
.main-nav a:hover, .tabs a:hover { background: var(--canvas); }
.main-nav a[aria-current], .tabs a[aria-current] { background: var(--tint); box-shadow: inset 0 -2px var(--teal-strong); }
.sign-out { justify-self: end; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .65rem 1rem; padding-block: 1rem 1.55rem; font-size: .84rem; border-top: 1px solid var(--line); }
.site-footer a { min-height: 2.75rem; display: inline-flex; align-items: center; text-underline-offset: .18em; }
.footer-separator { padding-inline: .2rem; }

.auth { display: grid; padding-block: 1.1rem 1.5rem; gap: 1.1rem; }
.auth-form, .auth-aside { border: 1px solid var(--line); border-radius: 1.45rem; }
.auth-form { background: var(--white); padding: clamp(1.4rem, 5vw, 3.4rem); box-shadow: var(--shadow); }
.auth-logo { width: min(100%, 14.55rem); height: auto; }
.auth-content { display: grid; gap: .8rem; max-width: 26rem; margin-top: clamp(2rem, 5vw, 3.65rem); }
.auth-content .eyebrow, .auth-content .lede { margin: 0; }
.auth-content h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
.auth-content .form-stack { margin-top: .6rem; }
.auth-content .button { width: 100%; margin-top: .3rem; }
.auth-aside { overflow: hidden; color: var(--white); background: var(--night); border-color: var(--night); padding: 1.4rem; }
.auth-art { display: none; }
.auth-copy { position: relative; }
.auth-copy .eyebrow { color: var(--mint); }
.auth-copy h2 { font-size: clamp(1.6rem, 5vw, 3.4rem); }
.auth-copy p:last-child { margin-top: .65rem; max-width: 23rem; color: #DFEAF3; }
.setup { display: grid; gap: .8rem; }
.setup .auth-logo { margin-bottom: 1rem; }
.setup .button { justify-self: start; }
.requirements { list-style: none; padding: 0; margin: .1rem 0; font-size: .88rem; }
.requirements li { display: flex; align-items: center; justify-content: space-between; gap: .55rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.install-hero { display: grid; justify-items: start; gap: 1rem; }
.install-hero h1 { font-size: clamp(1.85rem, 5.5vw, 3.2rem); }

.dashboard-hero { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: clamp(1.15rem, 4vw, 2.15rem); border-radius: var(--radius); background: var(--night); color: var(--white); }
.dashboard-hero .eyebrow { color: var(--mint); }
.dashboard-hero .lede { color: #DFEAF3; }
.dashboard-hero img { width: clamp(2.8rem, 15vw, 6.75rem); height: auto; flex: 0 0 auto; }
.metrics { display: grid; gap: .6rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.section-head + .metrics { margin-top: 0; }
.metric { padding: clamp(.56rem, 2.1vw, 1.2rem); border-radius: 1rem; border-top: 3px solid var(--mint); }
.metric p { font-size: clamp(.72rem, 2vw, .88rem); font-weight: 690; }
.metric strong { display: block; margin-block: .13rem; font-size: clamp(1.2rem, 4vw, 2.15rem); letter-spacing: -.045em; word-spacing: .12em; line-height: 1.15; overflow-wrap: anywhere; }
.metric span { display: block; color: var(--muted); font-size: .74rem; line-height: 1.3; }
.goal-grid, .two-columns, .admin-columns { display: grid; align-items: start; gap: .95rem; }
.goal-grid { align-items: stretch; }
.goal-card { display: grid; grid-template-rows: auto auto auto 1fr auto; gap: .9rem; }
.goal-top { display: flex; justify-content: space-between; align-items: start; gap: .55rem; }
.goal-top a { text-underline-offset: .2em; text-decoration-color: var(--teal-strong); }
.goal-top .muted { margin-top: .35rem; font-size: .82rem; }
.badge { display: inline-block; border-radius: 99px; padding: .26rem .55rem; font-size: .73rem; font-weight: 720; line-height: 1.2; background: var(--tint); color: var(--night); }
.badge.neutral { background: #EDF2F6; }
.goal-top .badge { flex-shrink: 0; max-width: 45%; text-align: center; }
.progress-label { display: flex; justify-content: space-between; gap: .55rem; align-items: baseline; font-size: .84rem; font-weight: 700; }
.progress-label strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
progress, meter { display: block; appearance: none; width: 100%; height: .62rem; border: 0; border-radius: 1rem; background: #E7EDF1; color: var(--teal-strong); overflow: hidden; }
progress::-webkit-progress-bar, meter::-webkit-meter-bar { background: #E7EDF1; border: 0; border-radius: 1rem; }
progress::-webkit-progress-value, meter::-webkit-meter-optimum-value { background: var(--teal-strong); border-radius: 1rem; transition: width 220ms ease; }
progress::-moz-progress-bar, meter::-moz-meter-bar { background: var(--teal-strong); border-radius: 1rem; }
.weekly progress::-webkit-progress-value { background: var(--mint); }
.weekly progress::-moz-progress-bar { background: var(--mint); }
.progress-block progress { margin-block: .36rem .24rem; }
.progress-caption { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.goal-meta { padding-top: .65rem; border-top: 1px solid var(--line); align-self: start; font-size: .85rem; }
.goal-meta p + p { margin-top: .18rem; color: var(--muted); font-size: .78rem; }
.sale-button { width: 100%; min-height: 3.2rem; }
.sale-message { font-size: .78rem; padding-top: .3rem; min-height: 1.45rem; font-weight: 630; }
.sale-message.error { color: var(--error); }
.week-note { margin-top: .7rem; padding-inline: .1rem; color: var(--night); font-size: .83rem; }
.daily-chart { list-style: none; padding: 0; }
.daily-chart li { display: grid; grid-template-columns: 3rem 1fr 2.5rem; gap: .75rem; align-items: center; font-size: .86rem; }
.daily-chart li + li { margin-top: .5rem; }
.daily-chart strong { text-align: end; }

.tabs { display: flex; flex-wrap: wrap; gap: .25rem; padding: .35rem; border-radius: .8rem; background: var(--white); border: 1px solid var(--line); }
.table-scroll { overflow-x: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; text-align: start; font-size: .86rem; }
th, td { padding: .66rem .55rem; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--canvas); color: var(--night); white-space: nowrap; }
tbody th { font-weight: 650; }
.table-note { display: block; margin-top: .3rem; color: var(--muted); font-size: .75rem; }
td progress { min-width: 5rem; margin-top: .3rem; }
.editor { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 680; }
.editor summary { padding-block: .8rem; }
.editor summary span { display: block; padding-left: 1rem; margin-top: .25rem; font-size: .8rem; color: var(--muted); font-weight: 470; }
.editor form { padding-bottom: 1rem; }
.void-form { width: 13.5rem; padding-top: .55rem; }
.pagination { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; margin-top: .95rem; font-size: .85rem; }
.closure-list { padding: 0; list-style: none; }
.closure-list li { display: flex; gap: .6rem; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding-block: .35rem; }

@media (min-width: 42rem) {
    .header-inner { display: flex; justify-content: space-between; gap: .7rem; min-height: 4.45rem; }
    .main-nav { justify-content: center; }
    .main-nav a, .tabs a { padding-inline: .9rem; }
    .workspace, .install-guide { gap: 1.5rem; padding-block: 2rem 2.5rem; }
    .metrics { gap: .9rem; }
    .metric span { font-size: .84rem; }
    .goal-grid, .two-columns, .admin-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.05rem; }
    .section-head { align-items: center; }
    .auth { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-block: 2.5rem; }
    .auth-form { min-height: 33.5rem; }
    .auth-aside { padding: clamp(1.6rem, 4vw, 3rem); display: grid; grid-template-rows: 1fr auto; gap: 1rem; }
    .auth-art {
        display: grid;
        place-items: center;
        border-radius: 1.2rem;
        background:
            radial-gradient(ellipse at 58% 42%, rgb(17 209 180 / 22%), transparent 62%),
            repeating-linear-gradient(0deg, transparent 0 28px, rgb(105 232 199 / 13%) 28px 29px),
            repeating-linear-gradient(90deg, transparent 0 28px, rgb(105 232 199 / 13%) 28px 29px);
    }
    .auth-art img { width: min(48%, 11rem); height: auto; filter: drop-shadow(0 1rem 1.1rem rgb(0 0 0 / 23%)); }
    .install-hero { grid-template-columns: auto 1fr; align-items: center; }
    .install-hero button, .install-hero [data-installed] { grid-column: 2; }
}
@media (min-width: 62rem) {
    .goal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .admin-columns { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0s !important; }
}
