/* The JustBee palette (justbee.nl, theme justbee-showcase, assets/brand.css): paper, ink and bee yellow. */
:root {
    --bg: #faf7ee;
    --card: #fffdf7;
    --text: #1f1f1f;
    --muted: #6a665d;
    --line: #e8dfc9;
    --soft: #fff0b7;
    --yellow: #ffc629;
    --views: #f3d98a;
    --visitors: #1f1f1f;
    --link-line: #ffc629;
    --error: #b3261e;
    --ok: #5d6b2f;
    --heading: 'Fredoka', ui-rounded, 'Arial Rounded MT Bold', 'Nunito Sans', system-ui, sans-serif;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #171612;
        --card: #211f1a;
        --text: #f4efe0;
        --muted: #b3ab98;
        --line: #3a362c;
        --soft: #3a3115;
        --views: #6e5a1d;
        --visitors: #ffc629;
        --error: #ff8a80;
        --ok: #c7d68f;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--link-line);
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
}

a:hover { text-decoration-thickness: 5px; }

h1, h2, .brand { font-family: var(--heading); font-weight: 600; letter-spacing: -0.03em; }

.top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
}

.top form { margin: 0; }

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    text-decoration: none;
    color: var(--text);
}

.brand img { width: 52px; height: auto; display: block; }
.brand span b { color: #e8a900; font-weight: 700; }

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

h1 { font-size: 2.1rem; margin: 0.2em 0 0.4em; line-height: 1.1; }
h2 { font-size: 1.2rem; margin: 0 0 0.5em; }

.note, .rest, .pulled, .crumbs { color: var(--muted); font-size: 0.9rem; }
.error { color: var(--error); }

.flash { padding: 8px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.flash.error { border-color: var(--error); color: var(--error); }
.flash.notice { border-color: var(--yellow); background: var(--soft); color: var(--text); }

button {
    font: inherit;
    font-weight: 800;
    padding: 7px 18px;
    border-radius: 999px;
    border: 0;
    background: var(--yellow);
    color: #1f1f1f;
    cursor: pointer;
    box-shadow: 0 6px 0 -4px var(--line);
}

button:hover { background: #ffd550; }
button.link { background: none; box-shadow: none; padding: 0; font-weight: 700; color: var(--text); text-decoration: underline; text-decoration-color: var(--link-line); text-decoration-thickness: 3px; text-underline-offset: 4px; }

.sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }

.site-card, .dimensions section, .chart {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 16px 18px;
}

.site-card h2 a { text-decoration-thickness: 4px; }

.figures { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 0 0 12px; }
.figures div { min-width: 90px; }
.figures dt { color: var(--muted); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.02em; }
.figures dd { margin: 0; font-family: var(--heading); font-size: 1.4rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.figures dd small { display: block; font-family: 'Nunito Sans', system-ui, sans-serif; font-size: 0.8rem; font-weight: 400; color: var(--muted); }
.figures.big dd { font-size: 1.9rem; }

.periods { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.periods a { padding: 4px 13px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; background: var(--card); font-weight: 700; }
.periods a:hover { border-color: var(--yellow); }
.periods a[aria-current="page"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.periods form { margin: 0 0 0 auto; }

.chart { position: relative; margin: 0 0 18px; padding-left: 64px; }
.chart.small { padding: 0; border: 0; margin: 0; background: none; }
.chart svg { display: block; width: 100%; height: 200px; }
.chart.small svg { height: 60px; }
.chart .scale { position: absolute; left: 10px; top: 16px; height: 200px; display: flex; flex-direction: column; justify-content: space-between; font-size: 0.75rem; color: var(--muted); }
.chart .labels { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); }
.chart figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 6px; }
.chart.small figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.views { fill: var(--views); }
.visitors { fill: var(--visitors); }
.hit { fill: transparent; }
.bar:hover .views { fill: var(--yellow); }

.dimensions { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.dimensions table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.dimensions th { text-align: left; font-weight: 400; padding: 2px 8px 2px 0; overflow-wrap: anywhere; }
.dimensions td { padding: 2px 0 2px 8px; }
.dimensions meter { width: 100%; min-width: 60px; height: 10px; }
meter::-webkit-meter-bar { background: var(--soft); border: 0; border-radius: 5px; height: 10px; }
meter::-webkit-meter-optimum-value { background: var(--yellow); border-radius: 5px; }
meter::-moz-meter-bar { background: var(--yellow); border-radius: 5px; }
meter { background: var(--soft); border: 0; border-radius: 5px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pct { color: var(--muted); }

.login { max-width: 340px; margin: 40px auto; display: grid; gap: 8px; background: var(--card); padding: 22px; border-radius: 22px; border: 1px solid var(--line); text-align: left; }
.login .bee { width: 120px; height: auto; margin: -64px auto 0; display: block; }
.login h1 { text-align: center; }
.login input { font: inherit; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); }
.login input:focus { outline: 3px solid var(--yellow); outline-offset: 1px; }
.login button { margin-top: 8px; }

@media (max-width: 600px) {
    .chart { padding-left: 16px; }
    .chart .scale { display: none; }
    .periods form { margin-left: 0; }
    .brand img { width: 42px; }
}
