* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    color-scheme: light;

    --paper: #f4f0e8;
    --paper-raised: #fbf9f4;
    --ink: #1c1b18;
    --ink-2: #5d5a52;
    --ink-3: #6f6b62;
    --rule: #cfc8b9;

    /* high load, "good" and delete follow the accent color too; the text labels say which is which */
    --warn: var(--accent);
    --good: var(--accent);

    /* set from the head script in index.html; this is only the fallback */
    --accent: #b9a7f5;

    /* fonts: change these three lines to change the whole look */
    --display: "Unbounded", "Trebuchet MS", system-ui, sans-serif;
    --sans: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

/* keep --paper in sync with BG.dark in the head script of index.html */
:root[data-theme="dark"] {
    color-scheme: dark;

    --paper: #151513;
    --paper-raised: #1e1d1a;
    --ink: #efebe2;
    --ink-2: #b8b2a4;
    --ink-3: #9a9486;
    --rule: #3a3831;
}

[hidden] { display: none !important; }

body {
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.5;
    background: var(--paper);
    color: var(--ink);
    min-height: 100vh;
}

button, input, select, textarea { font-family: inherit; color: inherit; }

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

.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding-left: 32px;
    padding-right: 32px;
}


/* top bar */

.topbar {
    border-bottom: 1px solid var(--ink);
}

.topbar-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "logo nav toggle";
    align-items: end;
    column-gap: 24px;
    padding-top: 20px;
}

.logo {
    grid-area: logo;
    font-family: var(--display);
    font-weight: 300;
    font-size: 22px;
    line-height: 1;
    letter-spacing: -0.02em;
    padding-bottom: 14px;
}

.logo em { font-style: normal; font-weight: 700; }

.navigation {
    grid-area: nav;
    justify-self: end;
    min-width: 0;
    display: flex;
    gap: 26px;
    overflow-x: auto;
    scrollbar-width: none;
}

.navigation::-webkit-scrollbar { display: none; }

.nav-item {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 10px 0 11px;
    font-size: 14px;
    color: var(--ink-2);
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s;
}

.nav-item:hover { color: var(--ink); }

.nav-item.active {
    color: var(--ink);
    font-weight: 500;
    border-bottom-color: var(--accent);
}

.theme-toggle {
    grid-area: toggle;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-bottom: 6px;
    background: none;
    border: 1px solid var(--rule);
    border-radius: 2px;
    color: var(--ink);
    cursor: pointer;
    transition: border-color 0.15s;
}

.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }


/* header */

.main { padding-top: 44px; padding-bottom: 80px; }

.header { margin-bottom: 36px; }

.header h1 {
    font-family: var(--display);
    font-weight: 500;
    font-size: clamp(26px, 5.4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.subtitle {
    color: var(--ink-2);
    font-size: 15px;
}


/* stats */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--rule);
}

.stat-card {
    padding: 20px 24px 22px 0;
}

.stat-card + .stat-card {
    padding-left: 24px;
    border-left: 1px solid var(--rule);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    color: var(--ink-2);
    font-size: 14px;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-3);
}

.stat-label.high { color: var(--warn); font-weight: 600; }
.stat-label.good { color: var(--good); }

.stat-value {
    font-family: var(--display);
    font-size: 44px;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.stat-value strong { font-weight: 500; }

.stat-value span {
    font-family: var(--sans);
    font-size: 17px;
    letter-spacing: 0;
    color: var(--ink-2);
}

.stat-card p {
    color: var(--ink-3);
    font-size: 13px;
    margin-top: 10px;
}

.progress {
    height: 3px;
    background: var(--rule);
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    transition: width 0.3s, background-color 0.2s;
}

.progress-fill.high,
.large-progress-fill.high { background: var(--warn); }


/* blocks */

.content-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 0 56px;
}

.block {
    padding: 34px 0 38px;
    border-bottom: 1px solid var(--rule);
}

.block h2 {
    font-family: var(--display);
    font-weight: 500;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.section-description {
    color: var(--ink-2);
    font-size: 14px;
    max-width: 54ch;
    margin-bottom: 20px;
}


/* form controls */

textarea,
input[type=text],
input[type=number],
input[type=time],
select {
    background: var(--paper-raised);
    border: 1px solid var(--rule);
    border-radius: 2px;
    padding: 10px 12px;
    font-size: 15px;
    transition: border-color 0.15s;
}

textarea:hover,
input:hover,
select:hover { border-color: var(--ink-3); }

textarea:focus,
input:focus,
select:focus { border-color: var(--ink); }

textarea {
    width: 100%;
    min-height: 150px;
    resize: vertical;
    line-height: 1.6;
}

textarea::placeholder,
input::placeholder { color: var(--ink-3); }

input[type=checkbox] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

input[type=color] {
    width: 44px;
    height: 38px;
    padding: 3px;
    background: var(--paper-raised);
    border: 1px solid var(--rule);
    border-radius: 2px;
    cursor: pointer;
}

.primary-button,
.secondary-button {
    margin-top: 12px;
    border-radius: 2px;
    padding: 11px 18px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

/* the accent is always picked to be readable against --paper, so paper text works on top of it */
.primary-button {
    border: 1px solid var(--accent);
    background: var(--accent);
    color: var(--paper);
}

.primary-button:hover {
    background: var(--ink);
    border-color: var(--ink);
}

.secondary-button {
    border: 1px solid var(--ink);
    background: transparent;
}

.secondary-button:hover {
    background: var(--ink);
    color: var(--paper);
}


/* notes result */

.analysis-result {
    display: none;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--rule);
}

.result-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2);
    margin-bottom: 10px;
}

.analysis-result p {
    color: var(--ink-2);
    font-size: 14px;
    max-width: 54ch;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.tag {
    font-size: 13px;
    padding: 2px 9px;
    border: 1px solid var(--rule);
    border-radius: 2px;
    background: var(--paper-raised);
}


/* plan */

.task {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--rule);
}

.task:first-child { border-top: 1px solid var(--rule); }

.time {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--ink-3);
    padding-top: 2px;
}

.task-info { display: flex; flex-direction: column; }
.task-info strong { font-weight: 500; }
.task-info small { color: var(--ink-3); font-size: 13px; }

.task.break .task-info strong { font-weight: 400; color: var(--ink-3); font-style: italic; }

.warning {
    margin-top: 22px;
    padding: 14px 16px;
    background: var(--paper-raised);
    border: 1px solid var(--rule);
    border-radius: 2px;
}

.warning-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.warning[data-level="2"] .warning-title,
.warning[data-level="3"] .warning-title { color: var(--warn); }

.warning p {
    font-size: 14px;
    color: var(--ink-2);
}


/* overload */

.overload-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.score {
    font-family: var(--display);
    font-weight: 500;
    font-size: 64px;
    line-height: 0.95;
    letter-spacing: -0.04em;
}

.score.high { color: var(--warn); }

.large-progress {
    position: relative;
    height: 8px;
    background: var(--rule);
    overflow: hidden;
    margin-bottom: 8px;
}

.large-progress-fill {
    height: 100%;
    background: var(--accent);
    transition: width 0.3s, background-color 0.2s;
}

/* four segments: low / normal / high / critical */
.large-progress::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(to right, transparent 0, transparent calc(25% - 3px), var(--paper) calc(25% - 3px), var(--paper) 25%);
}

.scale {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    font-size: 13px;
    color: var(--ink-3);
}

.scale span.active {
    color: var(--ink);
    font-weight: 600;
}

.breakdown { margin: 22px 0 0; }


/* tasks & settings */

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.form-row .primary-button { margin-top: 0; }

#taskTitle { flex: 1; min-width: 180px; }
#taskMinutes { width: 90px; }

.task-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--rule);
}

.task-row:first-child { border-top: 1px solid var(--rule); }

.task-name { flex: 1; display: flex; flex-direction: column; }
.task-row small { color: var(--ink-3); font-size: 13px; }

.task-row.done .task-name span { text-decoration: line-through; color: var(--ink-3); }

.icon-btn {
    background: none;
    border: none;
    color: var(--ink-3);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    padding: 4px 8px;
}

.icon-btn:hover { color: var(--warn); }

.empty {
    color: var(--ink-3);
    font-size: 14px;
    padding: 12px 0;
}

.setting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
    color: var(--ink-2);
}

.block h2 + .setting { border-top: 1px solid var(--rule); }
.setting:last-child { border-bottom: none; }
.setting .secondary-button { margin-top: 0; }

.accent-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 14px;
}

.swatches { display: flex; gap: 8px; }

.swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--paper);
    background: var(--c);
    box-shadow: 0 0 0 1px var(--rule);
    cursor: pointer;
}

.swatch:hover { box-shadow: 0 0 0 1px var(--ink-3); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }


/* narrow screens */

@media (max-width: 900px) {
    .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .wrap { padding-left: 20px; padding-right: 20px; }

    .topbar-inner {
        grid-template-columns: 1fr auto;
        grid-template-areas: "logo toggle" "nav nav";
        align-items: center;
        row-gap: 10px;
        padding-top: 16px;
    }
    .logo { padding-bottom: 0; }
    .theme-toggle { margin-bottom: 0; }
    .navigation { justify-self: stretch; gap: 22px; }

    .main { padding-top: 30px; }

    .stats-grid { grid-template-columns: 1fr; }
    .stat-card,
    .stat-card + .stat-card { padding: 16px 0; border-left: none; }
    .stat-card + .stat-card { border-top: 1px solid var(--rule); }
    .stat-value { font-size: 38px; }

    .score { font-size: 52px; }

    .setting { flex-wrap: wrap; }
}

/* smart input, deadlines, peak focus */
.quick { display: flex; gap: 10px; margin-bottom: 8px; }
.quick input { flex: 1; min-width: 0; }
.quick .primary-button { margin-top: 0; }
.hint { color: var(--ink-3); font-size: 13px; margin: 0 0 18px; }
.form-row input[type="datetime-local"] { min-width: 0; }
.row-actions { margin: 14px 0 4px; }
.task.peak { border-left: 3px solid var(--accent); padding-left: 12px; }
.task-row small.soon { color: var(--accent); font-weight: 600; }
.task-row small.overdue { color: var(--accent); font-weight: 600; text-decoration: underline; }
.cal-link { font-family: var(--mono); font-size: 12px; color: var(--accent); text-decoration: none; border: 1px solid var(--rule); border-radius: 6px; padding: 4px 8px; white-space: nowrap; }
.cal-link:hover { border-color: var(--accent); }
@media (max-width: 640px) { .quick { flex-wrap: wrap; } }
.coach-out { white-space: pre-wrap; margin: 14px 0 0; color: var(--ink-2); line-height: 1.55; }
.coach-out:empty { display: none; }
.primary-button:disabled { opacity: .6; cursor: wait; }

/* coach block */
.primary-button, .secondary-button, .theme-toggle, .nav-item, .icon-btn, input, select, textarea { border-radius: 6px; }

.topbar, .main { position: relative; z-index: 1; }

.coach { padding: 22px 0 24px; }
.coach-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.coach h2 { font-size: 18px; }
.coach .section-description { margin-bottom: 0; }
.coach .primary-button { margin-top: 0; padding: 14px 26px; font-size: 15px; white-space: nowrap; box-shadow: 0 6px 18px -8px var(--accent); }
.coach-out { padding: 14px 16px; border-left: 3px solid var(--accent); background: var(--paper-raised); border-radius: 0 6px 6px 0; }
@media (max-width: 640px) { .coach-head { flex-direction: column; align-items: flex-start; } }

/* layout, cursor, header, buttons */
@keyframes rise { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
#dots { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
body::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .4; background: linear-gradient(90deg, var(--rule) 1px, transparent 1px) 0 0 / 25% 100%; }
.wipe { position: fixed; left: 0; right: 0; top: 0; height: 2px; background: var(--accent); transform: scaleX(0); z-index: 98; pointer-events: none; }
.cursor { position: fixed; left: 0; top: 0; z-index: 99; pointer-events: none; mix-blend-mode: difference; }
.cursor i { position: absolute; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: #fff; }
.cursor b { position: absolute; width: 34px; height: 34px; margin: -17px; border: 1px solid #fff; border-radius: 50%; transition: width .3s, height .3s, margin .3s, background .3s, scale .2s; }
.cursor.hot b { width: 68px; height: 68px; margin: -34px; background: #fff; }
@media (hover: hover) and (pointer: fine) { html:not(.std), html:not(.std) * { cursor: none !important; } }
@media (hover: none) { .cursor { display: none; } }

.topbar { background: color-mix(in srgb, var(--paper) 70%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--rule); }
.logo { font: 700 15px 'Unbounded', sans-serif; letter-spacing: -.03em; }
.nav-item, .nav-item.active { font: 500 11px 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: .14em; border: 0; border-radius: 0; box-shadow: none; position: relative; background: none; }
.nav-item::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -8px; height: 1px; background: var(--accent); transition: right .4s cubic-bezier(.2, .8, .2, 1); }
.nav-item:hover::after, .nav-item.active::after { right: 0; }
.tools { display: flex; align-items: center; gap: 16px; justify-self: end; }
.lang { display: flex; align-items: center; gap: 6px; font: 500 11px 'JetBrains Mono', monospace; letter-spacing: .14em; }
.lang span { color: var(--ink-3); }
.lang button { background: none; border: 0; border-radius: 0; padding: 2px; color: var(--ink-3); font: inherit; transition: color .2s; }
.lang button.on, .lang button:hover { color: var(--ink); }

.primary-button, .secondary-button { position: relative; background: transparent; color: var(--ink); border: 0; border-radius: 0; box-shadow: none; font: 500 11px 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: .14em; padding: 15px 24px; transition: color .3s, background .3s, transform .25s ease-out; }

.header { padding-top: 7vh; }
.header h1 { font: 700 clamp(30px, 4.4vw, 60px) / 1 'Unbounded', sans-serif; letter-spacing: -.04em; }
.subtitle { font: 400 12px 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-3); }
.quote { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; align-items: baseline; padding: 30px 0; border-top: 1px solid var(--rule); }
.quote small { font: 400 11px 'JetBrains Mono', monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.quote p { margin: 0; font: 300 clamp(20px, 2.7vw, 36px) / 1.2 'Unbounded', sans-serif; letter-spacing: -.035em; }
.stat-card { background: transparent; border: 1px solid var(--rule); transition: transform .45s cubic-bezier(.2, .8, .2, 1), border-color .3s; }
.stat-card:hover { transform: translateY(-5px); border-color: var(--accent); }
.task-row, .task { transition: transform .3s ease-out, background .3s; }
.task-row:hover { transform: translateX(6px); }
@media (max-width: 760px) { .quote { grid-template-columns: 1fr; gap: 10px; } .tools { gap: 10px; } }

/* buttons and cursor */
.primary-button { background: var(--accent); color: #fff; }
.primary-button:hover { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent); }
.secondary-button { background: color-mix(in srgb, var(--ink) 8%, transparent); box-shadow: inset 0 0 0 1px var(--ink-3); }
.cursor { mix-blend-mode: normal; }
.cursor i { width: 10px; height: 10px; margin: -5px; background: var(--accent); box-shadow: 0 0 0 2px #fff; }
.cursor b { width: 40px; height: 40px; margin: -20px; border: 2px solid var(--accent); background: transparent; }
.cursor.hot b { width: 64px; height: 64px; margin: -32px; background: color-mix(in srgb, var(--accent) 22%, transparent); }
html.std .cursor { display: none; }

/* buttons and cursor (final) */
.primary-button, .secondary-button { border-radius: 8px; padding: 14px 26px; letter-spacing: .1em; }
.primary-button { background: var(--accent); color: var(--paper); box-shadow: none; transition: transform .25s ease-out, box-shadow .3s, filter .3s; }
.primary-button:hover { background: var(--accent); color: var(--paper); box-shadow: 0 10px 26px -10px var(--accent); filter: brightness(1.06); }
.secondary-button { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-3); }
.secondary-button:hover { background: var(--ink); color: var(--paper); box-shadow: none; }
.cursor i { width: 8px; height: 8px; margin: -4px; background: var(--accent); box-shadow: none; }
.cursor b { width: 38px; height: 38px; margin: -19px; border: 0; background: color-mix(in srgb, var(--accent) 30%, transparent); }
.cursor.hot b { width: 60px; height: 60px; margin: -30px; background: color-mix(in srgb, var(--accent) 38%, transparent); }

/* overload index */
.overload-header .score, #score { font: 700 clamp(64px, 9vw, 128px) / .9 'Unbounded', sans-serif; letter-spacing: -.05em; }
.large-progress { height: 10px; }
.adv { padding: 14px 0; border-top: 1px solid var(--rule); }
.adv summary { font: 500 11px 'JetBrains Mono', monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); cursor: pointer; }
.adv[open] summary { margin-bottom: 8px; }
.adv .setting { border-top: 1px solid var(--rule); }
.breakdown + .warning { margin-top: 22px; }

/* tasks form */
.manual { margin: 6px 0 22px; }
.manual summary { font: 500 11px 'JetBrains Mono', monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); cursor: pointer; padding: 6px 0; }
.manual[open] summary { color: var(--ink); }
.manual-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; padding: 16px 0 4px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 6px; font: 500 11px 'JetBrains Mono', monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.field.wide { grid-column: 1 / -1; }
.field input, .field select { font: 400 15px inherit; text-transform: none; letter-spacing: 0; }
.dur { display: flex; align-items: center; gap: 8px; }
.dur em { font-style: normal; color: var(--ink-3); letter-spacing: 0; }
.dur input[type="number"] { width: 70px; }
.dur select { flex: 1; min-width: 0; }
.manual-form .primary-button { justify-self: start; }
@media (max-width: 640px) { .manual-form { grid-template-columns: 1fr; } }
.coach .primary-button { box-shadow: none; padding: 18px 30px; }

/* priorities, deadline cushion, row buttons */
.prio { font: 700 12px 'JetBrains Mono', monospace; color: var(--accent); margin-right: 8px; letter-spacing: .04em; }
.task-name em.cushion { font: 500 11px 'JetBrains Mono', monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-top: 3px; }
.task-name em.cushion.bad, .task-name em.cushion.tight { color: var(--accent); font-weight: 700; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.icon-btn.small { font-size: 14px; padding: 6px 8px; }
.icon-btn.play:hover { color: var(--accent); }
.task { grid-template-columns: 58px 1fr auto; align-items: start; }
.task .icon-btn.play { opacity: 0; transition: opacity .2s; }
.task:hover .icon-btn.play, .task .icon-btn.play:focus-visible { opacity: 1; }
@media (hover: none) { .task .icon-btn.play { opacity: 1; } }
.unload-hint { margin: 10px 0 0; }
.unload-hint:empty { display: none; }
.warning .secondary-button { padding: 10px 18px; }

/* week */
.week { border-top: 1px solid var(--rule); margin-top: 18px; }
.day { display: grid; grid-template-columns: 150px 1fr 100px; gap: 8px 22px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.day-name { display: flex; flex-direction: column; font-weight: 500; }
.day-name small { font: 400 11px 'JetBrains Mono', monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.day.today .day-name span { color: var(--accent); }
.day-bar { position: relative; height: 10px; background: var(--rule); border-radius: 5px; overflow: hidden; }
.day-bar i { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--accent) 60%, transparent); border-radius: 5px; transition: width .4s cubic-bezier(.2, .8, .2, 1); }
.day.over .day-bar i { background: repeating-linear-gradient(45deg, var(--accent) 0 6px, color-mix(in srgb, var(--accent) 55%, var(--paper)) 6px 12px); }
.day-load { font: 500 13px 'JetBrains Mono', monospace; text-align: right; color: var(--ink-2); white-space: nowrap; }
.day.over .day-load { color: var(--accent); font-weight: 700; }
.day-tasks { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.day-tasks:empty { display: none; }
.day-tasks .tag { font-size: 12px; color: var(--ink-2); }
.day-tasks .tag.deadline { border-color: var(--accent); color: var(--ink); }
#weekSummary { margin: 4px 0 0; }
@media (max-width: 640px) { .day { grid-template-columns: 1fr auto; } .day-bar, .day-tasks { grid-column: 1 / -1; } }

/* focus timer */
.pomo { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 48px; align-items: center; margin-top: 18px; }
.pomo-dial { position: relative; aspect-ratio: 1; }
.pomo-dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pomo-dial circle { fill: none; stroke-width: 6; }
.pomo-dial .track { stroke: var(--rule); }
.pomo-dial .arc { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .3s linear; }
.pomo-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.pomo-center strong { font: 700 clamp(44px, 6vw, 62px) / 1 'Unbounded', sans-serif; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.pomo-phase, .pomo-center small { font: 500 11px 'JetBrains Mono', monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.pomo-phase { color: var(--accent); margin-bottom: 10px; }
.pomo-center small { margin-top: 12px; }
.pomo-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pomo-side .hint { margin: 0; }
.pomo-modes { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 500 11px 'JetBrains Mono', monospace; letter-spacing: .12em; text-transform: uppercase; background: none; border: 1px solid var(--rule); border-radius: 999px; padding: 8px 14px; color: var(--ink-3); cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.chip:hover { color: var(--ink); border-color: var(--ink-3); }
.chip[aria-pressed="true"] { border-color: var(--accent); color: var(--ink); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.pomo-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.pomo-buttons button { margin-top: 0; }
.pomo-task-note { font-size: 13px; color: var(--ink-3); margin-top: -6px; }
.focus-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; height: 160px; margin-top: 18px; }
.focus-week div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; min-width: 0; }
.focus-week i { width: 100%; max-width: 40px; min-height: 2px; background: color-mix(in srgb, var(--accent) 65%, transparent); border-radius: 5px 5px 0 0; transition: height .4s cubic-bezier(.2, .8, .2, 1); }
.focus-week .today i { background: var(--accent); }
.focus-week span, .focus-week small { font: 400 11px 'JetBrains Mono', monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.focus-week .today small { color: var(--ink); font-weight: 500; }
.pomo-pill { font: 500 12px 'JetBrains Mono', monospace; letter-spacing: .04em; font-variant-numeric: tabular-nums; color: var(--ink); background: color-mix(in srgb, var(--accent) 18%, transparent); border: 1px solid var(--accent); border-radius: 999px; padding: 5px 12px; cursor: pointer; white-space: nowrap; }
.setting .dur input[type="number"] { width: 64px; }
@media (max-width: 720px) {
    .pomo { grid-template-columns: 1fr; justify-items: center; gap: 28px; }
    .pomo-dial { width: min(280px, 78vw); }
    .pomo-side { width: 100%; }
}

/* account: button in the top bar + sign-in window */
.account-btn { font: 500 11px 'JetBrains Mono', monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); background: none; border: 1px solid var(--ink-3); border-radius: 999px; padding: 6px 14px; cursor: pointer; white-space: nowrap; transition: border-color .2s, background .2s, color .2s; }
.account-btn:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.account-btn.in { text-transform: none; letter-spacing: .02em; border-color: var(--accent); }
.account-btn.in::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
.account-btn[data-status="saving"]::before { animation: pulse 1s ease-in-out infinite; }
.account-btn[data-status="error"]::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
@keyframes pulse { 50% { opacity: .25; } }

.auth-veil { position: fixed; inset: 0; z-index: 97; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--paper) 55%, transparent); backdrop-filter: blur(6px); animation: veil .25s ease-out; }
@keyframes veil { from { opacity: 0; } }
body.auth-open { overflow: hidden; }
.auth-box { position: relative; width: min(420px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--paper-raised); color: var(--ink); border: 1px solid var(--rule); border-radius: 14px; padding: 30px 28px 24px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .45); animation: rise .45s cubic-bezier(.2, .8, .2, 1); }
.auth-box h2 { font: 500 22px / 1.2 'Unbounded', sans-serif; letter-spacing: -.03em; margin: 0 36px 20px 0; }
.auth-close { position: absolute; top: 14px; right: 14px; font-size: 22px; line-height: 1; padding: 4px 10px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.auth-form { display: grid; gap: 14px; }
.auth-form input { width: 100%; background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 11px 12px; font: 400 15px var(--sans); color: var(--ink); text-transform: none; letter-spacing: 0; }
.auth-form input:hover { border-color: var(--ink-3); }
.auth-form input:focus { border-color: var(--ink); outline: none; }
.auth-form .primary-button { margin-top: 4px; width: 100%; }
.link-btn { justify-self: start; background: none; border: 0; padding: 2px 0; color: var(--ink-3); font: 400 13px var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--ink); }
.auth-msg { min-height: 1.2em; margin: 14px 0 6px; font-size: 14px; color: var(--ink-2); }
.auth-msg:empty { margin: 6px 0 0; }
.auth-msg.bad { color: var(--ink); padding-left: 10px; border-left: 3px solid var(--accent); }
.auth-who { font: 500 16px var(--sans); margin: 0 0 6px; word-break: break-all; }
#authAbout { margin: 4px 0 0; }
#authIn .secondary-button { margin-top: 4px; }
@media (max-width: 760px) { .account-btn { padding: 5px 10px; } }
