/*
 * PoE Powerwalking — site-wide style ("old-school game ladder").
 * Tokens from todo/hall-of-fame-spec.md §5. No web fonts, no rounded corners,
 * no gradients, no shadows (except the inset search highlight), no pills.
 */

:root {
    --bg-page: #070605;
    --bg-container: #11100d;
    --border-container: #2e271d;
    --border-box: #3b3226;
    --bg-titlebar: #221d15;
    --bg-thead: #18150f;
    --border-thead: #2a241b;
    --row-odd: #11100d;
    --row-even: #15130f;
    --border-cell: #221e17;
    --bg-nav: #1d1913;
    --nav-sep: #5a4e3c;

    --text: #d8cfbf;
    --text-secondary: #b3a892;
    --text-muted: #9a8f7c;
    --text-faint: #6a604f;
    --link: #d9bb7a;
    --link-hover: #f0d79c;
    --gold: #c8a96a;
    --h1: #e6d6b4;
    --racing: #e08a4f;

    --input-bg: #070605;
    --input-border: #4a3d2a;
    --btn-bg: #2a2318;
    --btn-border: #5a4a30;

    --medal-1: #e2b84f;
    --medal-2: #c4c4c4;
    --medal-3: #c98a55;
    --trophy-major: #e2b84f;
    --trophy-minor: #a8925e;

    --ok: #6fbf7a;
    --warn: #d9b44a;
    --late: #d9774f;
    --bad: #c9584a;
    --maxed: #8a8478;

    --highlight-bg: #3a2f12;

    --font-body: Verdana, Tahoma, Geneva, sans-serif;
    --font-head: Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg-page);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 12px;
    line-height: 1.5;
    padding: 16px 12px 40px;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
    outline: 1px solid var(--gold);
    outline-offset: 1px;
}

[v-cloak] { display: none; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Page container ---------- */

.site {
    max-width: 1180px;
    margin: 0 auto;
    background: var(--bg-container);
    border: 1px solid var(--border-container);
}

.site-main { padding: 14px 18px 18px; }

/* ---------- Header ---------- */

.site-header {
    padding: 18px 18px 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--border-box);
}

.site-name {
    font-family: var(--font-head);
    font-size: 30px;
    color: var(--gold);
    font-variant: small-caps;
    letter-spacing: 0.03em;
    line-height: 1;
}
.site-name a { color: inherit; }
.site-name a:hover { color: var(--link-hover); text-decoration: none; }

.site-tagline { color: var(--text-muted); font-size: 11px; margin-top: 4px; }

.site-search { display: flex; align-items: center; gap: 6px; }
.site-search label { color: var(--text-muted); }
.site-search input { width: 170px; }

/* ---------- Nav ---------- */

.site-nav {
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border-box);
    padding: 6px 18px;
    font-weight: bold;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.site-nav li + li::before { content: "|"; color: var(--nav-sep); margin: 0 10px; font-weight: normal; }
.site-nav [aria-current="page"] { color: var(--link-hover); }

/* ---------- Footer ---------- */

.site-footer {
    border-top: 1px solid var(--border-box);
    padding: 12px 18px;
    text-align: center;
    color: var(--text-muted);
    font-size: 11px;
}
.site-footer p { margin: 2px 0; }
.site-footer .sep { color: var(--nav-sep); margin: 0 6px; }

/* ---------- Typography ---------- */

h1 {
    font-family: var(--font-head);
    font-size: 24px;
    font-weight: normal;
    color: var(--h1);
    margin: 4px 0 4px;
}
.intro { color: var(--text-secondary); margin: 0 0 4px; }
.legend { color: var(--text-muted); font-size: 11px; margin: 0 0 12px; }
.legend .item + .item::before { content: "·"; margin: 0 6px; color: var(--nav-sep); }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.secondary { color: var(--text-secondary); }
.nowrap { white-space: nowrap; }

/* ---------- Form controls ---------- */

input[type="text"], input[type="search"], select, input[type="datetime-local"] {
    background: var(--input-bg);
    color: var(--text);
    border: 1px solid var(--input-border);
    border-radius: 0;
    padding: 4px 6px;
    font: 12px var(--font-body);
    min-height: 28px;
}
/* Safari/iOS draw text and search fields with rounded native chrome unless this is off. */
input[type="text"], input[type="search"] { -webkit-appearance: none; appearance: none; }
select { padding-right: 4px; }
input[type="datetime-local"] { color-scheme: dark; }

.btn {
    background: var(--btn-bg);
    border: 1px solid var(--btn-border);
    border-radius: 0;
    color: var(--link);
    font: bold 12px var(--font-body);
    padding: 4px 10px;
    min-height: 28px;
    cursor: pointer;
}
.btn:hover:not(:disabled) { color: var(--link-hover); border-color: var(--gold); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-small { min-height: 24px; padding: 1px 6px; font-size: 11px; }
.btn[aria-pressed="true"] { background: #3a3020; color: var(--link-hover); border-color: var(--gold); }

.btn-group { display: inline-flex; flex-wrap: wrap; gap: 0; }
.btn-group .btn + .btn { border-left: 0; }

.linklike {
    background: none; border: 0; padding: 0; margin: 0;
    font: inherit; color: var(--link); cursor: pointer; text-align: left;
}
.linklike:hover { color: var(--link-hover); text-decoration: underline; }

/* Loading spinner: a plain rotating square outline (no rounded shapes). */
.spinner {
    display: inline-block; width: 9px; height: 9px;
    border: 1px solid currentColor; border-right-color: transparent;
    animation: spin 0.8s linear infinite; vertical-align: -1px; margin-right: 5px;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* ---------- Boxed section pattern (spec §3.1) ---------- */

.box { border: 1px solid var(--border-box); margin-bottom: 12px; background: var(--bg-container); }

.box-title {
    background: var(--bg-titlebar);
    border-bottom: 1px solid var(--border-box);
    padding: 5px 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
}
.box-title h2 {
    margin: 0;
    font: bold 14px var(--font-head);
    color: var(--gold);
}
.box-title .aside { font-size: 11px; color: var(--text-muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }

.box-body { padding: 8px; }

.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.grid { width: 100%; border-collapse: collapse; }
table.grid th, table.grid td {
    border: 1px solid var(--border-cell);
    padding: 4px 6px;
    text-align: left;
    vertical-align: middle;
}
table.grid thead th {
    background: var(--bg-thead);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: normal;
    border-bottom: 1px solid var(--border-thead);
    white-space: nowrap;
}
table.grid tbody tr:nth-child(odd) { background: var(--row-odd); }
table.grid tbody tr:nth-child(even) { background: var(--row-even); }
table.grid .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.grid .center { text-align: center; }
/* Must out-rank the striping above (0,2,3): same specificity, declared later. */
table.grid tbody tr.is-highlight { background: var(--highlight-bg); box-shadow: inset 0 0 0 1px var(--gold); }

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

/* ---------- Shared bits ---------- */

/* Trophy count: an outlined badge (square corners to match the site; the old site used a
   rounded pill). Hover shows the list of achievements. */
.trophy {
    display: inline-flex; align-items: center; gap: 2px;
    margin-left: 5px; padding: 0 4px;
    border: 1px solid currentColor;
    background: rgba(226, 184, 79, 0.08);
    color: var(--trophy-minor);
    font-size: 10px; font-weight: bold; line-height: 14px;
    white-space: nowrap; vertical-align: 1px;
    cursor: help;
}
.trophy.major { color: var(--trophy-major); background: rgba(226, 184, 79, 0.16); }
.trophy svg { width: 9px; height: 9px; }

.dagger { color: var(--text-secondary); margin-left: 3px; cursor: help; }
.is-inactive { text-decoration: line-through; text-decoration-color: var(--text-faint); }

.medal-1 { color: var(--medal-1); font-weight: bold; }
.medal-2 { color: var(--medal-2); font-weight: bold; }
.medal-3 { color: var(--medal-3); font-weight: bold; }
.racing { color: var(--racing); font-style: italic; }

.dot { display: inline-block; width: 8px; height: 8px; vertical-align: 0; margin-right: 6px; }
