:root { --green: #2d5a14; --cream: #ecebc8; --visits: #8fc68f; --pv: #c490c4; }
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: #111; background: #fff; }
a { color: #1a1ae6; }
.top, .bottom { background: var(--green); color: #fff; padding: 14px 24px; font-size: 1.15rem; }
.top a, .bottom a, .linkbtn { color: #fff; }
.top form { display: inline; }
.brand { font-weight: bold; margin-right: 28px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }
.bottom { text-align: center; font-size: 1rem; margin-top: 24px; }
.bottom a { margin: 0 14px; }
.wrap { display: flex; gap: 4px; max-width: 1100px; margin: 2px auto; padding: 0 16px; align-items: flex-start; }
main { flex: 1; min-width: 0; padding-bottom: 16px; }
.side { width: 215px; flex: none; background: var(--cream); padding-bottom: 12px; font-size: 0.9rem; }
.side h3 { margin: 2px 0 4px; padding: 5px 8px; background: var(--green); color: #fff; text-align: center; font-size: 1rem; }
.side > a { display: block; padding: 2px 24px; }
.side p { margin: 0; padding: 2px 8px; text-align: center; }
.title { margin: 0 0 22px; padding: 8px; background: var(--green); color: #fff; text-align: center; font-size: 1.35rem; }
.title a { color: #fff; }
.bar { margin: 22px 0 12px; padding: 7px 16px; font-size: 1.15rem; }
.bar.visits { background: var(--visits); }
.bar.pv { background: var(--pv); }
.sum { margin: 0 auto; width: 70%; border-collapse: collapse; font-size: 1.15rem; }
.sum th { text-align: left; font-weight: normal; padding: 5px 0; }
.sum td { text-align: right; padding: 5px 0; }
.note { color: #555; font-size: 0.85rem; text-align: center; margin-top: 20px; }
.list { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.list.narrow { width: auto; min-width: 320px; margin: 16px auto; }
.list th { background: var(--cream); text-align: left; }
.list th, .list td { padding: 5px 8px; border-bottom: 1px solid #ddd; word-break: break-word; }
.r { text-align: right !important; }
.form { max-width: 460px; margin: 0 auto; display: grid; gap: 12px; }
.form label { display: grid; gap: 4px; font-weight: bold; }
.form label.check { display: block; font-weight: normal; }
.form input:not([type=checkbox]), .form select { padding: 7px; font: inherit; width: 100%; }
button { padding: 8px 16px; font: inherit; background: var(--green); color: #fff; border: 0; cursor: pointer; justify-self: start; }
button.danger { background: #a02020; }
.error { color: #a02020; font-weight: bold; text-align: center; }
.code { width: 100%; font-family: Menlo, Consolas, monospace; font-size: 0.95rem; padding: 10px; }
code { background: #f1f1e4; padding: 1px 4px; word-break: break-all; }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 260px; padding: 8px; border: 1px solid #ccc; border-bottom: 2px solid #333; margin-bottom: 30px; }
.chart .col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; }
.chart .bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 1px; }
.chart .bars i { display: block; flex: 1; max-width: 26px; min-height: 1px; }
.chart .col span { font-size: 0.7rem; height: 0; white-space: nowrap; transform: translateY(6px); }
.chart.n24 .col:nth-child(odd) span, .chart.n30 .col:nth-child(even) span { visibility: hidden; }
i.v { background: #3d8a3d; }
i.p { background: #9a4f9a; }
.legend i { display: inline-block; width: 12px; height: 12px; vertical-align: middle; }
@media (max-width: 700px) {
  .wrap { flex-direction: column; }
  .side { width: 100%; }
  .sum { width: 100%; }
}
