/* Greenderboard -- site styles. A results sheet in dark ink: ruled tables, a highlighter for the records. Dark only. */

:root {
    --paper: #171814;
    --ink: #e7e5dd;
    --muted: #9c9a90;
    --rule: #35362f;
    --rule-strong: #e7e5dd;
    --green: #93c79e;
    --mark: #4f4719;
    --focus: #58a6ff;
    --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
    color-scheme: dark;
}

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

html, body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.55;
    -webkit-text-size-adjust: 100%;
}

a { color: var(--green); text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

h1, h2, h3 { line-height: 1.15; text-wrap: balance; overflow-wrap: break-word; }
h1 { font-size: clamp(1.9rem, 5vw, 2.5rem); font-weight: 700; margin: 0 0 0.4rem; letter-spacing: -0.01em; }
h1:focus { outline: none; }
h2 { font-size: 1.4rem; font-weight: 700; margin: 2.4rem 0 0.4rem; }
h3 { font-size: 1.08rem; font-weight: 600; font-style: italic; margin: 1.6rem 0 0.3rem; }
p { margin: 0 0 1em; max-width: 66ch; }

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

/* ---------- masthead and footer ---------- */

.masthead { border-bottom: 3px double var(--rule-strong); margin-bottom: 1.8rem; }
.masthead .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-top: 1.3rem; padding-bottom: 0.8rem; }
.title { display: flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; }
.title:hover { color: var(--ink); }
.title-name { font-size: 2rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1; }
.title-tag { display: block; font-size: 0.88rem; font-style: italic; color: var(--muted); margin-top: 0.2rem; letter-spacing: 0; font-weight: 400; }

.nav { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 1.2rem; font-family: var(--sans); font-size: 0.95rem; }
.nav a { color: var(--ink); text-decoration: none; padding-bottom: 2px; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--rule); }
.nav a.active { border-bottom-color: var(--green); }


.footer { margin-top: 4rem; border-top: 1px solid var(--rule); padding: 1rem 0 2.5rem; color: var(--muted); font-size: 0.9rem; }
.footer p { margin: 0.2rem 0; max-width: none; }

main.wrap { min-height: 60vh; }

/* ---------- text bits ---------- */

.intro { font-size: 1.2rem; line-height: 1.5; max-width: 60ch; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.nowrap { white-space: nowrap; }
.crumbs { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); margin-bottom: 0.4rem; }
.crumbs a { color: var(--muted); }
.facts { color: var(--muted); font-style: italic; }
.mark { background: var(--mark); padding: 0 0.2em; }

/* Times are set in a typewriter face, like a printed results sheet. */
.t { font-family: var(--mono); font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- tables ---------- */

.scroll { overflow-x: auto; margin: 0.6rem 0 1.4rem; }
table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 0.92rem; }
th, td { padding: 0.45rem 0.9rem 0.45rem 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
th:last-child, td:last-child { padding-right: 0; }
thead th { font-weight: 600; font-size: 0.84rem; border-bottom: 1.5px solid var(--rule-strong); white-space: nowrap; }
tfoot td { border-bottom: none; border-top: 1.5px solid var(--rule-strong); font-weight: 600; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.wraps { white-space: normal; }
tr.hl td { background: var(--mark); }
tr.hl td:first-child { box-shadow: -6px 0 0 var(--mark); }
tr.hl td:last-child { box-shadow: 6px 0 0 var(--mark); }

.board { min-width: 640px; }
.board thead tr:first-child th { border-bottom: 1px solid var(--rule); font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1rem; }
.board .start { padding-left: 0.9rem; border-left: 1px solid var(--rule); }
.board th.route { font-family: var(--serif); font-size: 1.02rem; font-weight: 600; white-space: nowrap; }
.board th.route a { color: var(--ink); }
.board td .t { display: block; font-size: 1rem; font-weight: 600; }
.board td .who { display: block; font-size: 0.82rem; color: var(--muted); }
.board td .who a { color: var(--muted); }
.board td .who a:hover { color: var(--green); }
.board td.none { color: var(--muted); font-size: 0.85rem; font-style: italic; }

.columns { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 0 2.5rem; align-items: start; }
.columns.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 800px) { .columns, .columns.even { grid-template-columns: 1fr; } }

.recent { list-style: none; margin: 0.6rem 0 0; padding: 0; font-family: var(--sans); font-size: 0.92rem; }
.recent li { padding: 0.45rem 0; border-bottom: 1px solid var(--rule); }
.recent .when { color: var(--muted); font-size: 0.82rem; display: block; }
.recent .was { display: block; margin-left: 0; }

/* ---------- route page ---------- */

.switch { font-family: var(--sans); font-size: 0.95rem; margin: 1rem 0 0.6rem; }
.switch strong { border-bottom: 2px solid var(--green); }
.switch .sep { color: var(--rule); margin: 0 0.5rem; }

.records { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1.5px solid var(--rule-strong); border-bottom: 1px solid var(--rule); margin: 0.4rem 0 0.5rem; }
.record { padding: 0.8rem 1.2rem 0.9rem 0; min-width: 0; }
.record + .record { padding-left: 1.2rem; border-left: 1px solid var(--rule); }
.record .label { font-style: italic; color: var(--muted); }
.record .big { font-family: var(--mono); font-size: clamp(2.2rem, 6vw, 3rem); font-weight: 600; line-height: 1.1; margin: 0.1rem 0 0.2rem; }
.record .big .mark { padding: 0 0.12em; }
.record .who { font-size: 1.05rem; }
.record .extra { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); margin-top: 0.2rem; }
@media (max-width: 560px) {
    .records { grid-template-columns: 1fr; }
    .record + .record { padding-left: 0; border-left: none; border-top: 1px solid var(--rule); }
}

/* ---------- markers ---------- */

/* Circled "i" after a time that has no GPS track. */
.info-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1em;
    height: 1.1em;
    margin-left: 0.3rem;
    border: 1px solid currentColor;
    border-radius: 50%;
    color: var(--muted);
    font-family: var(--serif);
    font-style: italic;
    font-weight: 700;
    font-size: 0.7rem;
    line-height: 1;
    vertical-align: 0.1em;
}
.info-marker:hover, .info-marker:focus-visible { color: var(--ink); }
.note-marker { color: var(--muted); cursor: pointer; margin-left: 0.2rem; }
[data-note] { cursor: pointer; }
.was { font-style: italic; color: var(--muted); font-size: 0.85em; margin-left: 0.3rem; }

/* Floating note shown for any [data-note] element (see index.html). */
.note-pop {
    position: fixed;
    z-index: 1000;
    display: none;
    max-width: min(300px, calc(100vw - 16px));
    padding: 0.4rem 0.6rem;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--sans);
    font-size: 0.82rem;
    line-height: 1.4;
    pointer-events: none;
}

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

input[type="search"] {
    font: inherit;
    font-family: var(--sans);
    font-size: 0.95rem;
    padding: 0.35rem 0.5rem;
    border: none;
    border-bottom: 1.5px solid var(--rule-strong);
    background: transparent;
    color: var(--ink);
    width: min(100%, 320px);
}
input[type="search"]:focus { outline: none; border-bottom-color: var(--green); }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: baseline; margin: 0.5rem 0; font-family: var(--sans); }

/* ---------- loading / errors ---------- */

.loading { color: var(--muted); font-style: italic; padding: 2rem 0; }
.callout { border-left: 3px solid var(--rule-strong); padding: 0.2rem 0 0.2rem 1rem; margin: 1rem 0; }
.callout p:last-child { margin-bottom: 0; }

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    color: #1f1f1c;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

.blazor-error-boundary { background: #b32121; padding: 1rem; color: white; }
.blazor-error-boundary::after { content: "An error has occurred."; }

.loading-progress {
    position: absolute;
    display: block;
    width: 5rem;
    height: 5rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}
.loading-progress circle {
    fill: none;
    stroke: var(--rule);
    stroke-width: 0.3rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}
.loading-progress circle:last-child {
    stroke: var(--green);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}
.loading-progress-text {
    position: absolute;
    text-align: center;
    font-style: italic;
    color: var(--muted);
    inset: calc(20vh + 2rem) 0 auto 0.2rem;
}
.loading-progress-text:after { content: var(--blazor-load-percentage-text, "Loading"); }
