:root {
    --ink: #16202a;
    --muted: #5d6b79;
    --line: #e2e8ef;
    --bg: #f7f9fb;
    --card: #ffffff;
    --accent: #1f6f5c;
    --accent-soft: #e8f3ef;
    --strava: #fc4c02;
    --warn: #b45309;
    --radius: 12px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
}

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

a { color: var(--accent); }

.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { font-weight: 700; font-size: 20px; text-decoration: none; color: var(--ink); display: flex; align-items: center; }
.brand span { color: var(--accent); }
.brand-logo { height: 44px; width: auto; display: block; }
nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
nav a { text-decoration: none; color: var(--muted); font-size: 15px; }
nav a:hover { color: var(--ink); }

main { padding: 32px 20px 64px; }

h1 { font-size: 34px; line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 22px; margin: 32px 0 12px; }
h3 { font-size: 17px; margin: 20px 0 8px; }
p.lead { font-size: 19px; color: var(--muted); margin-top: 0; }

.btn {
    display: inline-block; padding: 11px 18px; border-radius: 8px; border: 0;
    font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn-strava { background: var(--strava); color: #fff; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn:hover { filter: brightness(0.95); }
.link-button { background: none; border: 0; color: var(--muted); font: inherit; font-size: 15px; cursor: pointer; padding: 0; }
.inline { display: inline; }

.card {
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
}

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.stat { text-align: left; }
.stat .value { font-size: 28px; font-weight: 700; line-height: 1.1; }
.stat .label { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
tbody tr:hover { background: var(--accent-soft); }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill-good { background: var(--accent-soft); color: var(--accent); }
.pill-warn { background: #fef3c7; color: var(--warn); }
.pill-muted { background: #eef2f6; color: var(--muted); }

.notice { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 12px 16px; border-radius: 6px; margin-bottom: 20px; }
.notice-warn { border-left-color: var(--warn); background: #fef3c7; }

.preview {
    background: #12181d; color: #dfe7ee; border-radius: var(--radius);
    padding: 18px 20px; font: 14px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    white-space: pre-wrap; overflow-x: auto;
}

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; }
.field .hint { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
input[type=number], input[type=text], select {
    padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; width: 100%; max-width: 320px;
}
input[type=checkbox] { width: 18px; height: 18px; vertical-align: -3px; margin-right: 8px; }

.site-footer { border-top: 1px solid var(--line); background: var(--card); padding: 28px 0; color: var(--muted); font-size: 14px; }
.site-footer a { color: var(--muted); }
.powered { font-weight: 700; color: var(--strava); letter-spacing: .02em; margin: 0 0 6px; }
.fine { font-size: 12.5px; margin-top: 10px; }

.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
