:root {
    --ink: #333;
    --muted: #555;
    --line: #ddd;
    --header: #26374a;
    --accent: #2b4380;
    --danger: #d3080c;
    --ok: #278400;
    --bg: #fff;
    --panel: #f5f5f5;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: "Noto Sans", "Liberation Sans", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.45;
}

.masthead {
    background: var(--header);
    color: #fff;
    padding: 0.9rem 1.25rem;
}

.masthead h1 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
}

.masthead p {
    margin: 0.2rem 0 0;
    font-size: 0.95rem;
    opacity: 0.9;
}

main {
    max-width: 52rem;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
}

h2 {
    font-size: 1.15rem;
    margin: 1.5rem 0 0.6rem;
    color: var(--header);
}

.lede {
    color: var(--muted);
    margin-top: 0;
}

label, .label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.hint {
    display: block;
    color: var(--muted);
    font-weight: 400;
    font-size: 0.9rem;
    margin: 0.15rem 0 0.4rem;
}

input[type="text"],
input[type="password"],
input[type="file"] {
    width: 100%;
    padding: 0.45rem 0.5rem;
    border: 1px solid #6f6f6f;
    border-radius: 2px;
    font: inherit;
    background: #fff;
}

.slot {
    margin: 0 0 1rem;
    padding: 0.85rem 0.9rem;
    border: 1px solid var(--line);
    background: var(--panel);
}

.slot.error {
    border-color: var(--danger);
    background: #fbeaea;
}

.quota {
    font-weight: 700;
    margin: 0 0 1rem;
}

.quota.over-limit {
    color: var(--danger);
}

.slot-error {
    color: var(--danger);
    font-size: 0.9rem;
    margin: 0.35rem 0 0;
    min-height: 1.2em;
}

.modes {
    display: flex;
    gap: 1.25rem;
    margin: 0.4rem 0 1rem;
}

.modes label {
    font-weight: 400;
}

.progress {
    height: 0.55rem;
    background: #e0e0e0;
    margin-top: 0.45rem;
    overflow: hidden;
}

.progress > span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--accent);
}

.progress-label {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.2rem;
}

.actions {
    margin-top: 1.25rem;
}

button[type="submit"],
.btn {
    background: var(--accent);
    color: #fff;
    border: 0;
    padding: 0.55rem 1.1rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

button[type="submit"]:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.banner {
    padding: 0.75rem 0.9rem;
    margin: 0 0 1rem;
    border-left: 4px solid var(--accent);
    background: #eef4fa;
}

.banner.error {
    border-left-color: var(--danger);
    background: #fbeaea;
    color: #6d0c0e;
}

.status-card dt {
    font-weight: 700;
    margin-top: 0.75rem;
}

.status-card dd {
    margin: 0.15rem 0 0;
}

.bar {
    position: relative;
    height: 1.6rem;
    background: #e0e0e0;
    margin-top: 0.4rem;
}

.bar > span {
    display: block;
    height: 100%;
    background: var(--ok);
    width: 0;
}

.bar > b {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--ink);
    text-shadow: 0 0 3px #fff, 0 0 3px #fff;
}

.chart-frame {
    position: relative;
    width: 100%;
    max-width: 52rem;
    margin: 0.4rem 0 1rem;
    background: #fff;
    border: 1px solid var(--line);
}

.chart-frame.track { height: 32rem; }
.chart-frame.height { height: 22rem; }
.chart-frame.sky {
    width: min(32rem, 100%);
    aspect-ratio: 1;
    height: auto;
}

.sky-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.9rem;
    list-style: none;
    margin: 0.15rem 0 1rem;
    padding: 0;
    max-width: 52rem;
}

.sky-legend li {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.sky-mark {
    width: 0.9rem;
    text-align: center;
    font-weight: 700;
    line-height: 1;
}
.chart-frame.diagnostics { height: 24rem; }

.chart-frame canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.status-counts {
    list-style: none;
    margin: 0.85rem 0 0;
    padding: 0;
}

.status-counts li {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0.2rem 0;
}

.status-counts .swatch {
    width: 0.75rem;
    height: 0.75rem;
    flex: 0 0 auto;
}

a.btn {
    display: inline-block;
    text-decoration: none;
}

footer {
    max-width: 52rem;
    margin: 0 auto;
    padding: 0 1.25rem 2rem;
    color: var(--muted);
    font-size: 0.85rem;
}
