:root {
    color-scheme: light;
    --bg: #f4f7f6;
    --ink: #17211d;
    --muted: #66736f;
    --line: #d8e1de;
    --panel: #ffffff;
    --accent: #166a5b;
    --accent-strong: #0f4f44;
    --danger: #9c2f28;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

h1,
h2 {
    margin: 0;
    letter-spacing: 0;
}

h1 {
    font-size: 26px;
}

h2 {
    font-size: 18px;
}

code,
pre {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

pre {
    overflow: auto;
    padding: 14px;
    border: 1px solid var(--line);
    background: #f8faf9;
}

.login {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 20px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px clamp(16px, 4vw, 44px);
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.topbar p {
    margin: 6px 0 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.layout {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto 48px;
}

.panel {
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.section-title,
.task-head,
.actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
    margin-top: 14px;
}

label,
legend {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-weight: 650;
}

input,
select,
textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 9px 10px;
    color: var(--ink);
    background: #fff;
    font: inherit;
}

textarea {
    resize: vertical;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 8px 13px;
    color: #fff;
    background: var(--accent);
    font: inherit;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}

button:hover,
.button:hover {
    background: var(--accent-strong);
}

.secondary {
    color: var(--accent);
    background: #fff;
}

.secondary:hover {
    color: #fff;
}

.danger {
    border-color: var(--danger);
    color: var(--danger);
    background: #fff;
}

.danger:hover {
    color: #fff;
    background: var(--danger);
}

.task {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdfc;
}

.task-status {
    margin: 10px 0 0;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
    background: #fff;
}

.check,
.chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--ink);
    font-weight: 650;
}

.check input,
.chip input {
    width: auto;
    min-height: auto;
}

fieldset {
    margin: 14px 0 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
}

fieldset .chip {
    margin: 7px 11px 3px 0;
}

.notice,
.error {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 6px;
}

.notice {
    border: 1px solid #9fc7ba;
    background: #edf8f4;
}

.error {
    border: 1px solid #e1aaa5;
    background: #fff0ee;
}

.fixed-fields[hidden],
.interval-fields[hidden] {
    display: none;
}

@media (max-width: 720px) {
    .topbar,
    .section-title,
    .task-head,
    .actions {
        align-items: stretch;
        flex-direction: column;
    }

    button,
    .button {
        width: 100%;
    }
}
