:root {
    --border: #999;
    --today: #e00;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: #fff;
    color: #111;
    font: 16px/1.5 system-ui, "Segoe UI", Roboto, sans-serif;
}

main {
    max-width: 960px;
    margin: 0 auto;
    padding: 16px;
}

h1 {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 4px;
}

.meta, .note {
    color: #555;
    font-size: 14px;
    margin: 0 0 8px;
}

table.plan {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 24px;
}

.plan th, .plan td {
    border: 1px solid var(--border);
    padding: 6px 8px;
    vertical-align: top;
    text-align: left;
}

.plan th {
    background: #f3f3f3;
    font-weight: 600;
}

.plan td.day { white-space: nowrap; }

.plan .num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    width: 1%;
}

.plan tr.race td { font-weight: 700; }

/* Today: the 2px red border wins over the 1px grey one in border-collapse. */
.plan tr.today td {
    border-top: 2px solid var(--today);
    border-bottom: 2px solid var(--today);
}
.plan tr.today td:first-child { border-left: 2px solid var(--today); }
.plan tr.today td:last-child { border-right: 2px solid var(--today); }

.chart-wrap {
    position: relative;
    height: 340px;
    margin: 0 0 24px;
}

.history {
    font-size: 13px;
    color: #555;
}
.history a, .history .current { margin-right: 10px; }
.history .current { font-weight: 600; color: #111; }

form.logout { margin: 24px 0 0; }
form.logout button, form.login button {
    font-size: 14px;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
}

form.login {
    max-width: 320px;
    margin: 60px auto;
}
form.login label { display: block; font-size: 14px; color: #555; }
form.login input[type=password] {
    width: 100%;
    font-size: 16px;
    padding: 8px;
    margin: 6px 0 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
}
.error { color: #c00; font-size: 14px; }

@media (max-width: 700px) {
    body { font-size: 14px; }
    main { padding: 10px; }
    .plan th, .plan td { padding: 5px 6px; }
    .chart-wrap { height: 260px; }
}
