/* Layout and components. Colours, fonts, radii and the page heading size come from theme.css. */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.55; background: var(--bg); color: var(--fg);
    -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; min-height: 100vh; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { color: var(--fg); }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-tint); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin: 0; }
h2 { font-size: 28px; }
h3 { font-size: 20px; }
p { margin: 0; }

/* Big uppercase headings, the design's signature */
.display { font-size: var(--page-title-size); line-height: .95; text-transform: uppercase; letter-spacing: -.04em; text-wrap: balance; }
.display-xl { font-size: clamp(44px, 6.4vw, 88px); line-height: .92; letter-spacing: -.045em; }
.display-md { font-size: clamp(36px, 4.6vw, 64px); }
.lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; color: var(--muted); max-width: 560px; }
.subtitle { font-size: 18px; color: var(--muted); }

.container { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto;
    padding: clamp(20px, 4vw, 40px) clamp(16px, 4vw, 32px) clamp(56px, 8vw, 96px); }
.narrow { max-width: 480px; }
.page { display: flex; flex-direction: column; gap: 32px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.page-head > :first-child { flex: 1 1 min(320px, 100%); display: flex; flex-direction: column; gap: 8px; }
.head-buttons { display: flex; flex-direction: column; gap: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--header-bg); backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); }
.site-header .bar { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 8px;
    padding: 12px clamp(16px, 4vw, 32px); }
.brand { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -.04em; color: var(--fg);
    text-decoration: none; margin-right: 12px; white-space: nowrap; }
.brand span { color: var(--accent); }
/* The RiderMates logo in the site header: a sticker-style PNG with a transparent background. */
.site-header .brand { display: inline-flex; align-items: center; }
.brand-logo { display: block; height: 34px; width: auto; }
.brand:hover { color: var(--fg); }
.main-nav { display: flex; gap: 2px; margin-right: auto; overflow-x: auto; scrollbar-width: none; }
.main-nav a { padding: 8px 14px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--fg);
    text-decoration: none; white-space: nowrap; }
.main-nav a:hover, .main-nav a[aria-current="page"] { background: var(--surface-2); }
/* Marketplace: a small menu of Bikes for sale, Gear and Parts. Placed against the header, so the
   sideways-scrolling nav on phones doesn't clip it; nav.js lines it up under the button. */
.nav-menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; padding: 8px 10px 8px 14px;
    border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--fg); white-space: nowrap; user-select: none; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary:hover, .nav-menu summary[aria-current="page"], .nav-menu[open] summary { background: var(--surface-2); }
.nav-menu .caret { transition: rotate .15s; }
.nav-menu[open] .caret { rotate: 180deg; }
.nav-menu .menu { position: absolute; top: 100%; z-index: 40; background: var(--paper); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); padding: 8px; width: 280px; display: flex; flex-direction: column; gap: 2px; }
.nav-menu .menu::before { content: ""; position: absolute; top: -6px; left: var(--arrow-left, 28px); width: 12px; height: 12px; rotate: 45deg;
    background: var(--paper); border-radius: 2px; }
.main-nav .nav-menu .menu a { display: flex; flex-direction: column; gap: 1px; padding: 10px 14px; border-radius: 14px; white-space: normal; }
.nav-menu .menu b { font-weight: 600; }
.nav-menu .menu span { font-size: 13px; color: var(--muted); }
.main-nav .nav-menu .menu a[aria-current="page"] { background: var(--accent-tint); }
.nav-menu .menu a[aria-current="page"] b { color: var(--accent-tint-fg); }
.account { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--teal); color: #fff; display: grid;
    place-items: center; font-weight: 700; text-transform: uppercase; }
.account-menu { position: relative; }
.account-menu summary { list-style: none; cursor: pointer; border-radius: 50%; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu .menu { position: absolute; right: 0; top: 48px; z-index: 40; background: var(--paper); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); padding: 10px; min-width: 220px; display: flex; flex-direction: column; gap: 2px; }
.account-menu .who { padding: 8px 12px 10px; display: flex; flex-direction: column; }
.account-menu .who > span { font-size: 12px; color: var(--faint); }
.account-menu .who .who-badge { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--muted); font-weight: 600; }
.account-menu .who .who-badge .badge-coin { width: 14px; height: 14px; }
.account-menu .menu a, .account-menu .menu button { justify-content: flex-start; }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 48px clamp(16px, 4vw, 32px) 40px; }
.site-footer .cols { max-width: 1280px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 40px; }
.site-footer .about { flex: 1 1 min(240px, 100%); display: flex; flex-direction: column; gap: 8px; }
.site-footer .about p { font-size: 13px; color: var(--muted); max-width: 280px; }
.site-footer .brand { font-size: 20px; }
.site-footer .col { display: flex; flex-direction: column; gap: 8px; min-width: 150px; font-size: 13px; }
.site-footer .col a, .site-footer .col span { color: var(--muted); text-decoration: none; }
.site-footer .col a:hover { color: var(--fg); }
.site-footer .legal { max-width: 1280px; margin: 28px auto 0; font-size: 12px; color: var(--faint); }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 20px;
    border-radius: 999px; border: 1px solid transparent; background: var(--accent); color: var(--accent-fg);
    font: inherit; font-size: 15px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap; }
.button:hover { background: var(--accent-hover); color: var(--accent-fg); }
.button.secondary { background: var(--paper); color: var(--fg); border-color: var(--border-strong); }
.button.secondary:hover { background: var(--surface); }
.button.ghost { background: transparent; color: var(--fg); padding-inline: 12px; }
.button.ghost:hover { background: var(--surface-2); }
.button.large { padding: 14px 28px; font-size: 16px; }
.button.block { width: 100%; }
.button.back { align-self: flex-start; padding-left: 0; }
.button.back:hover { background: transparent; color: var(--accent-ink); }
.inline { display: inline; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-ink); cursor: pointer; text-decoration: underline; }

/* Tags and chips */
.tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.tag.neutral { background: var(--surface-2); color: var(--fg); }
.tag.teal { background: var(--teal-tint); color: var(--teal-tint-fg); }
.tag.accent { background: var(--accent-tint); color: var(--accent-tint-fg); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 9px 14px; border-radius: 999px; background: var(--surface); color: var(--fg); font-size: 14px; font-weight: 500;
    text-decoration: none; }
.chip:hover { background: var(--surface-2); color: var(--fg); }
.chip.on { background: var(--accent-tint); color: var(--accent-tint-fg); }

/* Cards */
.card { background: var(--surface); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.card.teal { background: var(--teal-tint); }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); }
.card.teal .kicker { color: var(--teal-tint-fg); }
.card p, .card li { font-size: 14px; line-height: 1.5; }
.card ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 12px; margin: 0; }
.stats > div { background: var(--surface); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.stats dt { font-size: 12px; color: var(--faint); }
.stats dd { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }

/* Text helpers */
.muted, .meta, .empty, .hint { color: var(--muted); }
.meta { font-size: 13px; }
.hint { font-weight: 400; font-size: 13px; }
.field-error, .error { color: var(--error); font-weight: 400; font-size: 13px; }
.notice { padding: 14px 18px; border-radius: 16px; background: var(--success-tint); color: var(--teal-tint-fg); font-size: 15px; }
p.error, div.error { padding: 14px 18px; border-radius: 16px; background: var(--error-tint); color: var(--accent-tint-fg); font-size: 15px; }
.description { white-space: pre-line; line-height: 1.6; max-width: 640px; }

/* Forms */
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
input, select, textarea { font: inherit; font-size: 15px; color: var(--fg); background: var(--paper); border: 1px solid var(--border-strong);
    border-radius: 999px; padding: 10px 16px; min-height: 44px; width: 100%; }
select { appearance: none; padding-right: 40px; cursor: pointer;
    background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2355555d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center; }
textarea { border-radius: var(--radius); resize: vertical; min-height: 120px; }
input[type="file"] { border-radius: var(--radius); padding: 8px; font-size: 14px; }
input[type="file"]::file-selector-button { font: inherit; font-weight: 600; border: 1px solid var(--border-strong); border-radius: 999px;
    background: var(--paper); padding: 6px 14px; margin-right: 12px; cursor: pointer; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
legend { font-weight: 800; font-size: 20px; letter-spacing: -.02em; color: var(--fg); margin-bottom: 12px; padding: 0; }
.form-card { background: var(--surface); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px); }
.form-card h1 { font-size: var(--page-title-size); }
.narrow .form-card { margin-top: clamp(0px, 4vw, 40px); }
.form-card .switch { text-align: center; font-size: 14px; color: var(--muted); }
.form-card .forgot { align-self: flex-end; margin-top: -8px; font-size: 14px; font-weight: 600; }
.form-card .button.google { gap: 10px; }
.form-card .or { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 13px; color: var(--muted); }
.form-card .or::before, .form-card .or::after { content: ""; flex: 1; border-top: 1px solid var(--border-strong); }

/* Home */
.split { display: flex; flex-wrap: wrap; gap: clamp(28px, 5vw, 64px); align-items: center; padding: clamp(24px, 6vw, 72px) 0; }
.split.reversed { flex-wrap: wrap-reverse; }
.split .copy { flex: 1 1 min(440px, 100%); display: flex; flex-direction: column; gap: 28px; max-width: 600px; }
.split .visual { flex: 1 1 min(380px, 100%); }
.features { list-style: none; padding: 0; margin: 0; }
.features li { display: flex; gap: 20px; padding: 24px 0; border-top: 1px solid var(--border); }
.features .icon { width: 48px; height: 48px; flex: none; border-radius: 50%; border: 1px solid var(--border); display: grid; place-items: center; }
.features div { display: flex; flex-direction: column; gap: 6px; }
.features strong { font-size: 20px; letter-spacing: -.01em; }
.features span { font-size: 17px; line-height: 1.5; color: var(--muted); }
/* The home page hero runs a size smaller than the other home sections. */
.hero-copy .display-xl { font-size: clamp(40px, 5.4vw, 72px); }
.hero-copy .lead { font-size: clamp(16px, 1.4vw, 18px); }
.hero-copy .button.large { font-size: 15px; }
.hero-copy .features strong { font-size: 18px; }
.hero-copy .features span { font-size: 15px; }
.hero-search { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px; border: 1px solid var(--border-strong); border-radius: 999px; max-width: 520px; }
.hero-search select { flex: 1 1 min(200px, 100%); border: 0; min-height: 40px; background-color: transparent; }
.hero-search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.hero-search select:focus-visible { outline: none; }

/* The long home page: a section for each part of the site. */
.home-section { display: flex; flex-direction: column; gap: 24px; padding: clamp(24px, 5vw, 56px) 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.home-routes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.home-routes .route-card { min-height: 132px; justify-content: space-between; }
.home-panel { border-radius: var(--radius-lg); padding: clamp(28px, 6vw, 64px) clamp(20px, 5vw, 56px); margin: clamp(16px, 4vw, 40px) 0;
    display: flex; flex-wrap: wrap; align-items: center; gap: clamp(28px, 5vw, 56px); overflow: hidden; }
.home-panel.teal { background: var(--teal-tint); }
.home-panel.teal .kicker { color: var(--teal-tint-fg); }
.home-panel.accent { background: var(--accent-tint); }
.home-panel .copy { flex: 1 1 min(420px, 100%); display: flex; flex-direction: column; gap: 20px; }
.plan-steps { flex: 1 1 min(340px, 100%); list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.plan-steps li { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border-radius: var(--radius); padding: 16px 18px; }
.plan-steps .stop-dot { width: 32px; height: 32px; font-size: 15px; background: var(--teal); }
.plan-steps div { display: flex; flex-direction: column; gap: 2px; }
.plan-steps strong { font-size: 17px; }
.plan-steps span:not(.stop-dot) { font-size: 15px; color: var(--muted); }
.home-rides { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.home-ride { position: relative; display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border-radius: var(--radius);
    padding: 18px; outline: 3px solid transparent; transition: outline-color .15s; }
.home-ride:hover, .home-ride:focus-within { outline-color: var(--accent); }
.home-ride > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.home-ride a { font-size: 17px; font-weight: 700; color: var(--fg); text-decoration: none; }
.home-ride a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.home-ride a:focus-visible { outline: none; }
.home-ride .tags { margin-top: 4px; }
.date-badge { width: 60px; flex: none; border-radius: 16px; background: var(--accent); color: var(--accent-fg); display: flex; flex-direction: column;
    align-items: center; padding: 8px 0 6px; line-height: 1; }
.date-badge span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.date-badge b { font-size: 26px; font-weight: 800; letter-spacing: -.03em; margin-top: 4px; }
.home-post .post-meta { gap: 8px; }
.home-band { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; background: var(--surface); border-radius: var(--radius);
    padding: 20px clamp(20px, 4vw, 32px); margin: clamp(16px, 4vw, 40px) 0; }
.home-band > div { flex: 1 1 min(320px, 100%); display: flex; flex-direction: column; gap: 4px; }
.home-band h2 { font-size: 22px; }
.band-icon { width: 64px; height: 64px; flex: none; border-radius: 50%; background: var(--bg); display: grid; place-items: center; }
.panel-bike { flex: 0 1 280px; width: 280px; max-width: 100%; height: auto; color: var(--accent); }
.home-section .bike-grid { grid-template-columns: repeat(auto-fill, minmax(min(240px, 45%), 1fr)); gap: 12px; }
@media (max-width: 720px) {
    .panel-bike { display: none; }
    .hero-search { border-radius: var(--radius); }
    .hero-search .button { flex: 1 1 100%; }
    .home-section .bike-card .body { padding: 10px 12px 12px; }
    .home-section .bike-card a { font-size: 14px; }
    .home-section .price { font-size: 17px; }
}

/* Route browsing */
.browse { display: flex; flex-wrap: wrap-reverse; gap: 24px; align-items: flex-start; }
.browse .list { flex: 1 1 min(300px, 100%); display: flex; flex-direction: column; gap: 12px; }
.browse .map-col { flex: 2 1 min(460px, 100%); position: sticky; top: 90px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filters label { flex: 1 1 150px; max-width: 240px; }
.filters .km { flex-basis: 110px; max-width: 130px; }
.route-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.route-card { position: relative; background: var(--surface); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column;
    gap: 6px; outline: 3px solid transparent; transition: outline-color .15s; }
.route-card:hover, .route-card:focus-within, .route-card.highlight { outline-color: var(--accent); }
.route-card a { font-size: 17px; font-weight: 700; color: var(--fg); text-decoration: none; }
.route-card a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.route-card a:focus-visible { outline: none; }
.route-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* Route detail */
.detail { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.detail .main { flex: 2 1 min(460px, 100%); display: flex; flex-direction: column; gap: 16px; }
.detail aside { flex: 1 1 min(280px, 100%); display: flex; flex-direction: column; gap: 14px; }
.stars { display: flex; gap: 2px; }
.stars button { font-size: 30px; line-height: 1; background: none; border: 0; cursor: pointer; color: var(--border-strong); padding: 0 2px; }
.stars button.on, .stars:hover button { color: var(--accent); }
.stars button:hover ~ button { color: var(--border-strong); }

.card.rider { flex-direction: row; align-items: center; gap: 12px; }
.card.rider div { display: flex; flex-direction: column; }

/* Maps */
.map { width: 100%; height: 420px; border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.map.tall { height: 560px; }
.form-card .map { background: var(--paper); border: 1px solid var(--border); }
.map.hero { height: clamp(320px, 55vw, 600px); border-radius: var(--radius-lg); }
.editor-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Route generator */
.planner { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.planner-panel { flex: 1 1 min(380px, 100%); max-width: 460px; display: flex; flex-direction: column; gap: 14px; }
.planner-map { flex: 2 1 min(460px, 100%); position: sticky; top: 90px; }
.plan-form .field { display: flex; flex-direction: column; gap: 6px; }
.plan-form .field > label, .plan-form .label { font-size: 13px; font-weight: 500; color: var(--muted); margin: 0 0 6px; }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type="range"] { flex: 1; min-height: 44px; padding: 0; border: 0; background: transparent; accent-color: var(--accent); cursor: pointer; }
.km-input { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--fg); }
.km-input input { width: 96px; text-align: right; }
.chip-check { position: relative; cursor: pointer; }
.chip-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-check span { display: inline-flex; align-items: center; min-height: 40px; padding: 9px 14px; border-radius: 999px; background: var(--paper);
    border: 1px solid var(--border-strong); color: var(--fg); font-size: 14px; font-weight: 500; transition: background .15s, border-color .15s; }
.chip-check:hover span { background: var(--surface-2); }
.chip-check input:checked + span { background: var(--accent-tint); border-color: var(--accent); color: var(--accent-tint-fg); }
.chip-check input:checked + span::before { content: "✓"; margin-right: 6px; font-weight: 700; }
.chip-check input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.center { text-align: center; }
.plan-loading { display: none; flex-direction: row; align-items: center; gap: 14px; scroll-margin: 96px 0 24px; }
.plan-loading.htmx-request { display: flex; }
.spinner { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent);
    animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.plan-form.busy > :not(.generate) { opacity: .6; }
.generate .when-busy { display: none; align-items: center; gap: 10px; }
.plan-form.busy .generate .when-idle { display: none; }
.plan-form.busy .generate .when-busy { display: inline-flex; }
.spinner.small { width: 18px; height: 18px; border-width: 2px; border-color: rgba(255, 255, 255, .45); border-top-color: var(--accent-fg); }
.card.problem { background: var(--error-tint); }
.plan-result, .card.problem { scroll-margin: 88px 0 24px; }
.card.problem .kicker { color: var(--accent-tint-fg); }
.plan-result { gap: 14px; animation: rise .25s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .plan-result { animation: none; } }
.plan-result h2 { font-size: 28px; }
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-result .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.plan-result .stats.compact > div { background: var(--bg); }
.stops { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.stops li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.stop-dot, .stop-marker { width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--fg); color: #fff; display: grid;
    place-items: center; font-size: 12px; font-weight: 700; }
.stop-marker { border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); cursor: default; }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Bikes for sale: filters on the left, results on the right */
.market { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: start; }
.filters-toggle { display: none; }
.market-filters { position: sticky; top: 90px; background: var(--surface); border-radius: var(--radius); padding: 20px;
    display: flex; flex-direction: column; gap: 16px; }
.filters-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; }
.filters-head h2 { font-size: 20px; }
.filters-head .button { padding: 6px 12px; font-size: 14px; }
.market-filters legend { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-bottom: 6px; }
fieldset.range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
fieldset.range legend { grid-column: 1 / -1; }
fieldset.range label { font-size: 12px; color: var(--faint); gap: 4px; }
fieldset.range select { padding-left: 12px; padding-right: 30px; background-position: right 12px center; }
select:disabled { color: var(--faint); background-color: var(--surface-2); cursor: not-allowed; }
label.check { flex-direction: row; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; color: var(--fg); cursor: pointer; min-height: 44px; }
label.check input { width: 20px; height: 20px; min-height: 0; margin: 0; flex: none; accent-color: var(--accent); cursor: pointer; }
.market-filters label.check + .hint { margin-top: -12px; }
.market-results { display: flex; flex-direction: column; gap: 20px; min-width: 0; transition: opacity .15s; }
#results.htmx-request { opacity: .55; }
.results-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.results-head .count { font-size: 15px; font-weight: 600; }
.sort { flex-direction: row; align-items: center; gap: 10px; white-space: nowrap; }
.sort select { width: auto; min-width: 190px; }
.empty-state { align-items: flex-start; padding: 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.bike-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.bike-grid.wide { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.bike-card { position: relative; background: var(--surface); border-radius: var(--radius); overflow: hidden; display: flex;
    flex-direction: column; outline: 3px solid transparent; transition: outline-color .15s; }
.bike-card:hover, .bike-card:focus-within { outline-color: var(--accent); }
.bike-card .photo, .main-photo { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); }
.bike-card .photo img, .main-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bike-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.bike-card a { font-size: 16px; font-weight: 700; color: var(--fg); text-decoration: none; line-height: 1.3; }
.bike-card a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.bike-card a:focus-visible { outline: none; }
.bike-card .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.price { font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--fg); }
.price.big { font-size: clamp(32px, 4vw, 44px); letter-spacing: -.03em; }
.photo .tag, .main-photo .tag { position: absolute; top: 12px; left: 12px; font-weight: 600; }
.tag.sold { background: var(--fg); color: var(--paper); }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; padding-top: 8px; }

/* Bike detail */
.listing { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); gap: 32px; align-items: start; }
.gallery { display: flex; flex-direction: column; gap: 10px; }
.main-photo { border-radius: var(--radius); overflow: hidden; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.thumbs button { padding: 0; border: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; cursor: pointer; background: var(--surface-2);
    outline: 3px solid transparent; outline-offset: -3px; opacity: .8; }
.thumbs button:hover { opacity: 1; }
.thumbs button[aria-current="true"] { outline-color: var(--accent); opacity: 1; }
.thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }
.listing-side { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 20px; }
.stack.tight { gap: 8px; }
.listing-title { font-size: var(--page-title-size); text-transform: uppercase; letter-spacing: -.035em; line-height: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.stats.compact { grid-template-columns: 1fr 1fr; gap: 8px; }
.listing-side .stats.compact > div { padding: 12px 14px; }
.listing-side .stats.compact dd { font-size: 17px; }
.card.seller .button { margin-top: 2px; }
.card.seller .email-row { display: flex; gap: 8px; align-items: center; margin-top: 2px; }
.card.seller .email-row .button { margin-top: 0; min-width: 0; }
.copy-email .done, .copy-email.copied .copy { display: none; }
.copy-email.copied .done { display: block; color: var(--teal); }
.copy-status:empty { display: none; }
.link-button.danger { color: var(--error); font-size: 14px; }
.listing-description { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }

/* Gear and parts: the type of each listing above its title, and the sub-type chips in the filters */
.bike-card .item-type { font-size: 12px; }
.market-filters .subtypes .chips { gap: 6px; }
.market-filters .subtypes .chip-check span { min-height: 34px; padding: 6px 12px; font-size: 14px; }
.market-filters .subtypes .chip-check input:checked + span::before { content: none; }

/* Sell form */
.narrow-wide { max-width: 820px; }
.photo-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.photo-choice { gap: 6px; }
.photo-choice img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--surface-2); }
.photo-choice .check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--fg); }
.photo-choice .check input { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--accent); }

@media (max-width: 900px) {
    .market { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .filters-toggle { display: inline-flex; justify-self: start; }
    .market-filters { display: none; position: static; }
    .market-filters.open { display: flex; }
    .listing { grid-template-columns: minmax(0, 1fr); }
    .listing-side { position: static; }
}

/* Cafe Stop: Reddit-style layout with topics on the left, the feed, and an about panel on the right */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.cafe { display: grid; grid-template-columns: 210px minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.cafe.no-nav { grid-template-columns: minmax(0, 1fr) 300px; max-width: 1040px; }
.cafe-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cafe-nav { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 2px; }
.cafe-nav a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 12px; border-radius: 12px; color: var(--fg);
    font-size: 15px; font-weight: 500; text-decoration: none; }
.cafe-nav a:hover { background: var(--surface); }
.cafe-nav a[aria-current="page"] { background: var(--surface-2); font-weight: 700; }
.cafe-nav-head { margin: 14px 12px 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.cafe-side { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 16px; }
.rules { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14px; }
.cafe-banner { display: flex; flex-direction: column; gap: 8px; padding-bottom: 4px; }
.cafe-banner .kicker a { color: inherit; text-decoration: none; }
.avatar.small { width: 28px; height: 28px; font-size: 13px; }
.topic-filter { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 0; font-size: 15px; }
.topic-filter a { font-size: 14px; font-weight: 600; }
.cafe-heading { margin-top: 12px; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.cafe-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.cafe-grid.featured { grid-template-columns: minmax(0, 1fr); }
.cafe-tile { display: flex; align-items: flex-start; gap: 14px; height: 100%; padding: 16px 18px; border-radius: var(--radius); background: var(--surface);
    color: var(--fg); text-decoration: none; outline: 3px solid transparent; transition: outline-color .15s; }
.cafe-tile:hover, .cafe-tile:focus-visible { outline-color: var(--accent); }
.cafe-mark { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-tint);
    color: var(--accent-tint-fg); font-size: 20px; font-weight: 800; }
.cafe-grid.featured .cafe-mark { background: var(--teal-tint); color: var(--teal-tint-fg); }
.cafe-tile-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cafe-tile-name { font-size: 17px; font-weight: 700; }
.cafe-tile-about { font-size: 14px; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; }
.cafe-chip { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; background: var(--accent-tint);
    color: var(--accent-tint-fg); font-size: 13px; font-weight: 600; text-decoration: none; position: relative; z-index: 1; }
.cafe-chip:hover { text-decoration: underline; }
.button.danger { color: var(--error); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: minmax(0, 1fr); } }

.compose { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 999px; background: var(--surface); text-decoration: none;
    outline: 2px solid transparent; transition: outline-color .15s; }
.compose:hover { outline-color: var(--accent); }
.compose-field { flex: 1; min-height: 40px; display: flex; align-items: center; padding: 0 16px; border-radius: 999px; background: var(--paper);
    border: 1px solid var(--border-strong); color: var(--muted); font-size: 15px; }

.cafe-search { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 18px; border-radius: 999px; background: var(--paper);
    border: 1px solid var(--border-strong); color: var(--muted); }
.cafe-search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.cafe-search input { flex: 1; min-width: 0; min-height: 40px; padding: 0 4px; border: 0; background: transparent; }
.cafe-search input:focus-visible { outline: none; }
.search-summary { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; font-size: 15px; }
.search-summary p { margin: 0; }
.search-summary b { font-weight: 700; }
.search-links { display: flex; gap: 16px; font-size: 14px; font-weight: 600; }

.sort-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.sort-tabs { display: flex; gap: 4px; }
.sort-tabs a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; color: var(--fg);
    font-size: 15px; font-weight: 600; text-decoration: none; }
.sort-tabs a:hover { background: var(--surface); }
.sort-tabs a[aria-current="page"] { background: var(--fg); color: var(--paper); }
.sort-tabs.small a { min-height: 34px; padding: 0 12px; font-size: 14px; }
.window label { flex-direction: row; align-items: center; gap: 8px; }
.window select { width: auto; min-height: 40px; }

.post-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.post-card { position: relative; background: var(--surface); border-radius: var(--radius); padding: 16px 20px 14px; display: flex;
    flex-direction: column; gap: 8px; outline: 3px solid transparent; transition: outline-color .15s; }
.post-card:hover, .post-card:focus-within { outline-color: var(--accent); }
.post-title { font-size: 19px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.post-title a { color: var(--fg); text-decoration: none; }
.post-card .post-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.post-card .post-title a:focus-visible { outline: none; }
.post-card .topic-chip, .post-card .post-actions > * { position: relative; z-index: 1; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.post-meta b { color: var(--fg); font-weight: 600; }
/* The first bike on the author's profile, after their name: " - Yamaha MT-09". Same colour as the name. */
b + .rider-bike { color: var(--fg); }
.topic-chip { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; background: var(--teal-tint);
    color: var(--teal-tint-fg); font-weight: 600; text-decoration: none; }
.topic-chip:hover { color: var(--teal-tint-fg); text-decoration: underline; }
.excerpt { color: var(--muted); font-size: 15px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden; white-space: pre-line; }
.post-actions, .comment-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.more { display: flex; justify-content: center; padding-top: 8px; }

/* Votes: the pill turns orange when you've upvoted and teal when you've downvoted */
.vote { display: inline-flex; align-items: center; border-radius: 999px; background: var(--surface-2); color: var(--fg); }
.vote button, .vote a { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
    background: transparent; color: inherit; cursor: pointer; }
.vote .vote-up:hover { background: var(--accent-tint); color: var(--accent-ink); }
.vote .vote-down:hover { background: var(--teal-tint); color: var(--teal-tint-fg); }
.vote .score { min-width: 2ch; text-align: center; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vote.up { background: var(--accent); color: var(--accent-fg); }
.vote.down { background: var(--teal); color: #fff; }
.vote.up button:hover, .vote.down button:hover { background: rgba(255, 255, 255, .2); color: inherit; }
.vote.up .vote-up svg, .vote.down .vote-down svg { fill: currentColor; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px;
    background: var(--surface-2); color: var(--fg); font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.pill:hover { background: var(--border); color: var(--fg); }
.pill.danger { color: var(--error); }

/* A post and its replies */
.post-full { background: var(--surface); border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 28px); display: flex; flex-direction: column; gap: 12px; }
.post-heading { font-size: var(--page-title-size); font-weight: 800; letter-spacing: -.025em; line-height: 1.15; text-wrap: balance; }
.post-body { white-space: pre-line; font-size: 16px; line-height: 1.65; max-width: 70ch; }
.post-full .post-actions { margin-top: 4px; }
.replies-section { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 90px; }
.reply-box { display: flex; flex-direction: column; gap: 8px; }
.reply-box textarea { min-height: 96px; }
.reply-actions { display: flex; justify-content: flex-end; }
.sign-in-prompt { flex-direction: row; }
.thread-head { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.thread .thread { margin: 4px 0 0 13px; padding-left: 16px; border-left: 2px solid var(--border); }
.comment { scroll-margin-top: 90px; }
.comment:target > details > .comment-head b { color: var(--accent-ink); }
.comment-head { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; color: var(--muted); cursor: pointer;
    list-style: none; border-radius: 999px; }
.comment-head::-webkit-details-marker { display: none; }
.comment-head b { color: var(--fg); font-weight: 600; font-size: 14px; }
.comment-head .author { min-width: 0; }
.comment-head .rider-bike { font-size: 14px; }
.comment-head .fold { margin-left: auto; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: var(--faint); }
.comment-head .fold::before { content: "\2212"; font-weight: 700; }
details:not([open]) > .comment-head .fold::before { content: "+"; }
.comment-head:hover .fold { background: var(--surface-2); color: var(--fg); }
.op { font-size: 11px; font-weight: 700; color: var(--accent-ink); background: var(--accent-tint); padding: 1px 6px; border-radius: 999px; }
.comment-body { padding-left: 36px; display: flex; flex-direction: column; gap: 6px; }
.comment-body > p { white-space: pre-line; font-size: 15px; line-height: 1.6; max-width: 70ch; }
.comment-actions { gap: 4px; }
.comment-actions .vote, .comment-actions .pill { background: transparent; }
.comment-actions .vote.up { background: var(--accent); }
.comment-actions .vote.down { background: var(--teal); }
.comment-actions .vote button, .comment-actions .vote a { width: 34px; height: 34px; }
.comment-actions .pill { min-height: 34px; padding: 0 10px; font-size: 13px; }
.comment-actions .pill:hover { background: var(--surface-2); }
.inline-form > summary { list-style: none; }
.inline-form > summary::-webkit-details-marker { display: none; }
.inline-form[open] { order: 10; flex-basis: 100%; display: flex; flex-direction: column; gap: 8px; }
.inline-form[open] > summary { align-self: flex-start; background: var(--surface-2); }

/* Pictures on posts and replies */
.cafe-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; max-width: 640px; }
.cafe-photos.single { grid-template-columns: minmax(0, 420px); }
.cafe-photo { display: block; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.cafe-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .2s; }
.cafe-photos.single .cafe-photo img { aspect-ratio: auto; max-height: 420px; object-fit: contain; }
.cafe-photo:hover img { transform: scale(1.03); }
.cafe-photo:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.card-photos { display: flex; gap: 6px; overflow: hidden; }
.card-photos img { width: 96px; height: 72px; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.photo-edit.small { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); max-width: 520px; }
.reply-actions { align-items: flex-start; gap: 12px; }
.reply-actions .button { margin-left: auto; }
.photo-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
label.photo-pick { flex-direction: row; font-size: 14px; font-weight: 600; color: var(--fg); background: var(--surface-2); }
.comment-actions label.photo-pick { min-height: 40px; padding: 0 14px; font-size: 14px; background: var(--surface-2); }
.photo-picker:focus-within label.photo-pick { outline: 3px solid var(--accent); outline-offset: 2px; }
.photo-previews { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.photo-previews:empty { display: none; }
.photo-previews li { position: relative; }
.photo-previews img { display: block; width: 72px; height: 54px; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.photo-previews button { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; padding: 0; border: 2px solid var(--surface);
    border-radius: 50%; background: var(--fg); color: var(--paper); font-size: 14px; line-height: 1; cursor: pointer; }
.photo-note { flex-basis: 100%; font-size: 13px; color: var(--error); }

/* Full-size picture over the page */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(17, 17, 20, .92); }
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: calc(100vw - 32px); max-height: calc(100dvh - 120px); object-fit: contain; border-radius: 8px; }
.lightbox button { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .14); color: #fff; font-size: 24px; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, .26); }
.lightbox .close { top: 16px; right: 16px; }
.lightbox .prev { left: 16px; top: 50%; translate: 0 -50%; }
.lightbox .next { right: 16px; top: 50%; translate: 0 -50%; }
.lightbox .count { position: absolute; bottom: 20px; left: 50%; translate: -50% 0; color: #fff; font-size: 14px; }

/* Group rides */
.ride-filters { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: flex-end; }
.filter-group { display: flex; flex-direction: column; gap: 10px; }
.filter-label { font-size: 14px; color: var(--muted); }
.ride-filters .chip { min-height: 44px; display: inline-flex; align-items: center; padding: 0 18px; font-size: 15px; }
.filter-group.place { flex-direction: row; flex-wrap: wrap; gap: 12px; }
.filter-group.place label { min-width: 190px; font-size: 14px; font-weight: 400; gap: 10px; }
.ride-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); }
.ride-card { background: var(--surface); border-radius: var(--radius-lg); padding: clamp(22px, 2.4vw, 32px);
    display: flex; flex-direction: column; gap: 14px; }
.ride-head { display: flex; align-items: center; gap: 16px; }
.ride-avatar { width: 56px; height: 56px; flex: none; border-radius: 50%; display: grid; place-items: center;
    font-size: 20px; font-weight: 800; letter-spacing: -.02em; text-transform: uppercase; }
.ride-avatar.tone-0 { background: var(--accent-tint); color: var(--accent-tint-fg); }
.ride-avatar.tone-1 { background: var(--teal-tint); color: var(--teal-tint-fg); }
.ride-avatar.tone-2 { background: var(--surface-2); color: var(--fg); }
.ride-title { font-size: 20px; line-height: 1.25; letter-spacing: -.01em; }
.ride-title a { color: var(--fg); text-decoration: none; }
.ride-title a:hover { color: var(--accent-ink); text-decoration: underline; }
.ride-where { color: var(--muted); font-size: 15px; margin-top: 2px; }
.ride-when { font-size: 16px; line-height: 1.45; }
.ride-when .tag { margin-right: 4px; vertical-align: 1px; }
.ride-status { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--muted); }
.ride-status .yes { display: inline-flex; align-items: center; gap: 4px; color: var(--teal); font-weight: 700; }
.ride-card .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag.plain { background: transparent; color: var(--fg); font-weight: 600; }
.ride-card .tag { font-size: 13px; padding: 5px 12px; }
.ride-card .tag.plain { padding-inline: 8px; }
.ride-card .excerpt { font-size: 15px; line-height: 1.55; color: var(--fg); }
.ride-actions { margin-top: auto; padding-top: 6px; }
.ride-actions .button { min-height: 48px; padding-inline: 24px; font-size: 16px; }
.button:disabled { background: var(--surface-2); color: var(--faint); cursor: not-allowed; }
/* A group ride's page: the dark banner, then the ride on the left and joining it on the right. */
.ride-detail { gap: 20px; }
.ride-hero { position: relative; overflow: hidden; background: var(--ink); color: var(--ink-fg); border-radius: var(--radius);
    padding: clamp(20px, 2.4vw, 28px) clamp(18px, 2.4vw, 28px); display: flex; flex-wrap: wrap; align-items: center;
    justify-content: space-between; gap: 20px; }
.ride-hero-trail { position: absolute; right: 0; bottom: 0; width: min(560px, 60%); height: 100%; fill: none;
    stroke: var(--accent); stroke-width: 2; stroke-dasharray: 2 7; stroke-linecap: round; opacity: .8; pointer-events: none; }
.ride-hero-text, .ride-when-tile { position: relative; }
.ride-hero-text { display: flex; flex-direction: column; gap: 10px; min-width: 0; flex: 1 1 420px; }
.ride-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--ink-muted); }
.hero-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
    background: var(--ink-raised); color: var(--ink-fg); }
.hero-pill.accent { background: var(--accent); color: var(--accent-fg); }
.ride-hero-title { font-size: var(--page-title-size); line-height: .98; text-transform: uppercase; letter-spacing: -.035em;
    text-wrap: balance; overflow-wrap: anywhere; }
.ride-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ride-chips li { display: inline-flex; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--ink-raised); font-size: 12px; }
.ride-chips span { color: var(--ink-muted); }
.ride-when-tile { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 16px; background: var(--ink-raised); }
.date-tile { width: 52px; flex: none; display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 10px;
    background: var(--paper); color: var(--fg); line-height: 1.1; }
.date-tile span { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.date-tile span:first-child { color: var(--accent-ink); }
.date-tile b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.ride-when-text { display: flex; flex-direction: column; gap: 1px; font-size: 12px; color: var(--ink-muted); }
.ride-when-text b { font-size: 20px; font-weight: 800; color: var(--ink-fg); letter-spacing: -.02em; }
.ride-when-text a { color: var(--accent); font-weight: 600; }
.ride-when-text a:hover { color: var(--ink-fg); }

.ride-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.ride-col-main, .ride-col-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.panel { background: var(--surface); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.panel h2.kicker { font-size: 12px; font-weight: 700; letter-spacing: .1em; line-height: 1.4; }
.panel p, .panel li { font-size: 14px; line-height: 1.5; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ride-trip { padding: 0; overflow: hidden; gap: 0; }
.ride-map { height: clamp(220px, 28vw, 300px); background: var(--surface-2); }
.trip-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; margin: 0; padding: 16px 20px;
    border-bottom: 1px solid var(--border); }
.trip-stats dt { font-size: 12px; color: var(--muted); }
.trip-stats dd { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.meet { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 20px; }
.meet-icon { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--accent-tint);
    color: var(--accent-ink); }
.meet-text { display: flex; flex-direction: column; flex: 1 1 160px; min-width: 0; }
.meet-text span { font-size: 12px; color: var(--muted); }
.meet-text b { font-size: 15px; overflow-wrap: anywhere; }
.meet-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.meet-actions .button, .share .button { padding: 8px 16px; font-size: 14px; }
.ride-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.dots { margin: 0; padding-left: 18px; display: grid; gap: 4px; }

.board-posts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.board-post { display: flex; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--border); }
.board-post.pinned { background: var(--accent-tint); border-color: transparent; }
.board-post .avatar.small { width: 32px; height: 32px; }
.board-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.board-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.board-head b { font-size: 15px; }
.board-text { overflow-wrap: anywhere; white-space: pre-line; }
.board-actions { display: flex; gap: 14px; margin-top: 2px; }
.board-actions .link-button { font-size: 13px; }
.board-form { display: flex; gap: 8px; }
.board-form input { flex: 1; min-width: 0; }
.button.dark { background: var(--fg); color: var(--paper); }
.button.dark:hover { background: var(--accent); color: var(--accent-fg); }
.avatar.tone-0 { background: var(--teal); color: #fff; }
.avatar.tone-1 { background: var(--accent); color: var(--accent-fg); }
.avatar.tone-2 { background: var(--fg); color: var(--paper); }

.more-rides { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.more-rides h2 { font-size: 20px; text-transform: uppercase; letter-spacing: -.02em; }
.more-rides .panel-head a { font-weight: 600; color: var(--fg); }
.mini-rides { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 12px; }
.mini-ride { position: relative; background: var(--surface); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 4px;
    outline: 3px solid transparent; transition: outline-color .15s; }
.mini-ride:hover, .mini-ride:focus-within { outline-color: var(--accent); }
.mini-when { font-size: 12px; font-weight: 600; color: var(--accent-ink); }
.mini-ride a { font-size: 17px; font-weight: 800; line-height: 1.15; text-transform: uppercase; letter-spacing: -.02em; color: var(--fg); text-decoration: none; }
.mini-ride a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.mini-ride a:focus-visible { outline: none; }

.ride-going { gap: 14px; }
.ride-invites { scroll-margin-top: 90px; }
.ride-invites .people { margin-top: 2px; }
.ride-invites .person .badge { flex: none; }
.going-count { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.going-count p { font-size: 15px; color: var(--muted); }
.going-count b { font-size: 26px; font-weight: 800; color: var(--fg); letter-spacing: -.02em; }
.going-bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.going-bar span { display: block; height: 100%; min-width: 6px; border-radius: inherit; background: var(--accent); }
.going-faces { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.going-faces .avatar.small { width: 32px; height: 32px; margin-right: -6px; border: 2px solid var(--surface); font-size: 13px; }
.going-faces .avatar.more { background: var(--surface-2); color: var(--fg); }
.going-faces .avatar.open { background: var(--surface); border: 2px dashed var(--border-strong); }
.going-main { display: flex; flex-direction: column; }
.going-main form { display: flex; flex-direction: column; }
.going-main .button { width: 100%; min-height: 48px; font-size: 16px; }
.share { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reminder { display: flex; flex-direction: column; gap: 4px; }
.reminder label, .checklist label { flex-direction: row; align-items: center; gap: 10px; font-size: 14px; color: var(--fg); cursor: pointer; }
.reminder input, .checklist input { width: 18px; height: 18px; min-height: 0; margin: 0; flex: none; accent-color: var(--teal); }
.checklist { gap: 14px; }
.checklist-count { font-size: 13px; font-weight: 700; color: var(--teal); }
.forecast { flex-direction: row; align-items: flex-start; gap: 14px; background: var(--deep-teal); color: var(--deep-teal-fg); }
.forecast > svg { flex: none; color: var(--deep-teal-fg); }
.forecast .sun, .forecast .wx-sun { color: var(--accent); stroke: var(--accent); }
.forecast .wx .wx-fill { fill: var(--deep-teal); }
.forecast h2 { font-size: 16px; letter-spacing: -.01em; margin-bottom: 4px; }
.forecast p { color: var(--deep-teal-muted); }
.forecast p b { color: var(--deep-teal-fg); }
.forecast .credit { font-size: 12px; margin-top: 4px; }
.forecast .credit a { color: var(--deep-teal-fg); }
.organiser-who { display: flex; align-items: center; gap: 12px; }
.organiser-who div { display: flex; flex-direction: column; }
.organiser-who b { font-size: 16px; }
.safety { display: flex; gap: 10px; font-size: 13px; color: var(--muted); padding: 0 4px; }
.safety svg { flex: none; margin-top: 1px; }

@media (max-width: 1180px) {
    .cafe { grid-template-columns: 190px minmax(0, 1fr); }
    .cafe.no-nav { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
    .cafe-side { display: none; }
}

@media (max-width: 900px) {
    .cafe { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .cafe-nav { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; gap: 6px; margin: 0 -16px; padding: 0 16px; }
    .cafe-nav-head { display: none; }
    .cafe-nav a { flex: none; white-space: nowrap; border-radius: 999px; background: var(--surface); min-height: 40px; padding: 0 14px; font-size: 14px; }
    .cafe-nav a svg { display: none; }
    .post-card { padding: 14px 16px 12px; }
    .post-title { font-size: 17px; }
    .thread .thread { margin-left: 8px; padding-left: 10px; }
    .comment-body { padding-left: 0; }
    .card-photos img { width: 72px; height: 54px; }
    .lightbox .prev, .lightbox .next { top: auto; bottom: 12px; translate: none; }
}

@media (max-width: 900px) {
    /* One column, with "Who's going" and its button straight after the map and meeting point. */
    .ride-layout { display: flex; flex-direction: column; }
    .ride-col-main, .ride-col-side { display: contents; }
    .ride-col-side > * { order: 1; }
    .ride-col-main > .ride-trip { order: -2; }
    .ride-col-side > .ride-going { order: -1; }
    .more-rides { order: 2; }
    .ride-filters { gap: 18px; }
    .ride-filters nav.chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
    .ride-filters .chip { flex: none; }
    .filter-group { width: 100%; }
    .filter-group.place label { flex: 1 1 40%; min-width: 0; }
}

/* Admin */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.admin-search { display: flex; flex-wrap: wrap; gap: 10px; max-width: 560px; }
.admin-search input { flex: 1 1 240px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.admin-table th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--faint); padding: 0 12px 10px; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 14px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table .who .meta { display: block; margin-top: 2px; overflow-wrap: anywhere; }
.admin-table .joined { white-space: nowrap; color: var(--muted); }
.admin-table .status { white-space: nowrap; }
.admin-table .row-actions { text-align: right; white-space: nowrap; }
.admin-table .row-actions form + form { margin-left: 6px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
    background: var(--surface-2); color: var(--muted); }
.badge + .badge { margin-left: 4px; }
.badge.admin { background: var(--teal-tint); color: var(--teal-tint-fg); }
.badge.suspended { background: var(--error-tint); color: var(--error); }
.badge.you { background: var(--accent-tint); color: var(--accent-tint-fg); }
.badge.going { background: var(--teal-tint); color: var(--teal-tint-fg); }
.card.admin-tools { border: 1px dashed var(--border-strong); background: var(--paper); }
.card.admin-tools .kicker { color: var(--teal); }
.admin-tabs { margin-top: -8px; }

/* Admin dashboard */
.dash-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px; }
.tile { background: var(--surface); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.tile-label { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tile-value { font-family: var(--font-display); font-size: 36px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.tile .trend { font-size: 14px; font-weight: 600; color: var(--muted); }
.tile .trend.up { color: var(--teal); }
.tile .trend.down { color: var(--error); }
.tile .hint { font-size: 13px; }
.dash-section { display: flex; flex-direction: column; gap: 14px; }
.dash-card h2 { font-size: 20px; }
.dash-card h3 { font-size: 16px; letter-spacing: -.01em; }
.dash-card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.dash-card-head a { font-size: 14px; font-weight: 600; color: var(--accent-ink); }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dash-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.legend { display: flex; gap: 16px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend .key { width: 14px; height: 10px; border-radius: 2px; }
.legend .key.views { background: var(--accent); }
.legend .key.visitors { height: 3px; background: var(--teal); }
.chart { width: 100%; height: auto; display: block; }
/* On phones the chart keeps a readable size and scrolls sideways, starting at today (the right end). */
.chart-scroll { overflow-x: auto; direction: rtl; }
.chart-scroll .chart { direction: ltr; }
.chart .grid line { stroke: var(--border); stroke-width: 1; }
.chart .axis { font-size: 12px; fill: var(--faint); font-family: var(--font-body); }
.chart .bar { fill: var(--accent); }
.chart .bar:hover { fill: var(--accent-hover); }
.chart .line { fill: none; stroke: var(--teal); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-table summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--accent-ink); }
.chart-table table { margin-top: 10px; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.dash-table th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--faint); padding: 0 10px 8px 0; border-bottom: 1px solid var(--border); }
.dash-table td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.dash-table tr:last-child td { border-bottom: 0; }
.dash-table th:last-child, .dash-table td:last-child { padding-right: 0; }
.dash-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dash-table td a { font-weight: 600; color: var(--fg); overflow-wrap: anywhere; }
.dash-table td a:hover { color: var(--accent-ink); }
.dash-table td .meta { display: block; margin-top: 2px; }
.dash-table .badge { margin-left: 6px; }
.dash-table .seller, .dash-table .listed { color: var(--muted); white-space: nowrap; }
.card .share-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.share-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 15px; }
.share-list .share-label { overflow-wrap: anywhere; }
.share-list .share-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.share-list .share-bar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.share-list .share-bar span { display: block; height: 100%; border-radius: 999px; background: var(--teal); }
.share-list li.empty { display: block; }
.dash-note { max-width: 70ch; }
.visitor-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.visitor-layout .map { height: 400px; background: var(--surface-2); }
.visitor-places { display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 900px) {
    .dash-grid, .dash-grid.three { grid-template-columns: minmax(0, 1fr); }
    .visitor-layout { grid-template-columns: minmax(0, 1fr); }
    .visitor-layout .map { height: 320px; }
}
@media (max-width: 720px) {
    .tile { padding: 14px 16px; }
    .tile-value { font-size: 28px; }
    .chart-scroll .chart { min-width: 600px; }
    .listing-views thead { display: none; }
    .listing-views, .listing-views tbody, .listing-views tr, .listing-views td { display: block; }
    .listing-views tr { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 16px; padding: 12px 0;
        border-bottom: 1px solid var(--border); }
    .listing-views td { padding: 0; border: 0; }
    .listing-views .bike { grid-column: 1 / -1; }
    .listing-views .seller { grid-column: 1; }
    .listing-views .listed, .listing-views .price { display: none; }
    .listing-views .views::after { content: " views"; font-weight: 400; color: var(--muted); }
    .listing-views .visitors::after { content: " visitors"; font-weight: 400; color: var(--muted); }
}
@media (max-width: 720px) {
    .admin-table thead { display: none; }
    .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; }
    .admin-table tr { padding: 14px 0; border-bottom: 1px solid var(--border); display: grid;
        grid-template-columns: 1fr auto; gap: 8px 12px; }
    .admin-table td { padding: 0; border: 0; }
    .admin-table .who { grid-column: 1 / -1; }
    .admin-table .joined { font-size: 13px; }
    .admin-table .status { text-align: right; }
    .admin-table .row-actions { grid-column: 1 / -1; text-align: left; white-space: normal; display: flex; flex-wrap: wrap; gap: 8px; }
    .admin-table .row-actions form + form { margin-left: 0; }
    .admin-table .row-actions:empty { display: none; }
}

@media (max-width: 720px) {
    .site-header .bar { flex-wrap: wrap; }
    .main-nav { order: 3; width: 100%; margin: 4px -10px 0; }
    .main-nav a { padding: 8px 10px; font-size: 14px; white-space: nowrap; }
    .nav-menu summary { padding: 8px 8px 8px 10px; font-size: 14px; }
    .account .button { padding: 8px 14px; font-size: 14px; }
    .site-header .brand { margin-right: 4px; }
    .brand-logo { height: 28px; }
    .browse .map-col, .planner-map { position: static; }
    .planner-panel { max-width: none; }
    .filters label, .filters .km { flex: 1 1 40%; max-width: none; }
    .map, .map.tall { height: 340px; }
    .sort select { min-width: 0; }
}

/* Messages to the admins: the header bubble, the conversation list and a thread of bubbles. */
.icon-button { position: relative; width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%;
    border: 1px solid var(--border-strong); background: var(--paper); color: var(--fg); }
.icon-button:hover, .icon-button[aria-current="page"] { background: var(--surface-2); color: var(--fg); }
.icon-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon-button .dot { position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%;
    background: var(--accent); box-shadow: 0 0 0 2px var(--paper); }
.messages-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 24px; align-items: start; }
.messages-layout.inbox-only { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.compose-message h2 { font-size: 22px; margin: 0; }
.conversation-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.conversation-row { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; border-radius: var(--radius);
    background: var(--surface); color: var(--fg); text-decoration: none; border: 1px solid transparent; }
.conversation-row:hover { border-color: var(--border-strong); color: var(--fg); }
.conversation-row .line { display: flex; align-items: center; gap: 8px; }
.conversation-row .subject { font-size: 16px; font-weight: 600; }
.conversation-row.unread .subject { font-weight: 800; }
.conversation-row .meta { color: var(--muted); }
.conversation-row .preview { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.messages-page.narrow { max-width: 820px; }
.messages-page h1 { font-size: var(--page-title-size); line-height: 1.1; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
.messages-page h1.display { line-height: .95; letter-spacing: -.04em; }
.thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.bubble { max-width: min(620px, 88%); align-self: flex-start; background: var(--surface); border-radius: 20px 20px 20px 6px;
    padding: 14px 18px; display: flex; flex-direction: column; gap: 6px; }
.bubble.mine { align-self: flex-end; background: var(--accent-tint); border-radius: 20px 20px 6px 20px; }
.bubble .from { font-size: 12px; color: var(--muted); }
.bubble .from b { color: var(--fg); font-weight: 600; }
.bubble p { margin: 0; white-space: pre-line; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
@media (max-width: 900px) {
    .messages-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
    .account { gap: 6px; }
    .icon-button, .account .avatar { width: 36px; height: 36px; }
    .account .button { padding: 8px 12px; }
}

/* Weather: the header icon and the weather page */
.wx { flex: none; }
.wx .wx-sun { color: var(--accent); }
.wx .wx-fill { fill: var(--paper); }
.wx .wx-wet { color: var(--teal); }
.wx .wx-bolt { color: var(--accent); }
.weather-now { display: grid; place-items: center; }
.weather-place { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.weather-place select { width: auto; min-height: 44px; }
.weather-place .use-location { display: inline-flex; align-items: center; gap: 6px; }
.weather-locating p { color: var(--muted); }
.weather-hero { gap: 20px; padding: clamp(20px, 3vw, 32px); }
.weather-headline { display: flex; align-items: center; gap: clamp(16px, 3vw, 28px); }
.weather-temp { display: flex; flex-direction: column; gap: 2px; }
.weather-temp b { font-family: var(--font-display); font-size: clamp(56px, 8vw, 88px); font-weight: 800; line-height: .9; letter-spacing: -.05em; }
.weather-temp > span:not(.meta) { font-size: 20px; font-weight: 600; }
.weather-temp .meta { font-size: 15px; color: var(--muted); }
.weather-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.weather-stats > div { background: var(--bg); }
.weather-stats dd { font-size: 20px; }
.hourly { list-style: none; margin: 0; padding: 4px 0 8px; display: flex; gap: 8px; overflow-x: auto;
    scroll-snap-type: x proximity; }
.hourly li { flex: none; width: 76px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 14px 8px; border-radius: 16px; background: var(--surface); }
.hourly .time { font-size: 13px; color: var(--muted); white-space: nowrap; }
.hourly b { font-size: 18px; }
.rain { font-size: 13px; font-weight: 600; color: var(--faint); }
.rain.likely { color: var(--teal); }
.week { padding: 8px; }
.week-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.week-list li + li { border-top: 1px solid var(--border); }
.day-row { display: grid; grid-template-columns: 92px minmax(0, 1.4fr) 48px minmax(0, 1fr) minmax(170px, 1.2fr); align-items: center;
    gap: 12px; padding: 12px 14px; border-radius: 14px; color: var(--fg); text-decoration: none; }
.day-row:hover, .day-row[aria-current="page"] { background: var(--surface-2); color: var(--fg); }
.day-name { display: flex; flex-direction: column; line-height: 1.25; }
.day-name .meta { color: var(--muted); }
.day-sky { display: flex; align-items: center; gap: 10px; min-width: 0; }
.day-sky span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-wind { color: var(--muted); }
.day-temps { display: flex; align-items: center; gap: 10px; }
.day-temps .low { color: var(--muted); width: 34px; text-align: right; }
.day-temps b { width: 34px; }
.day-temps .range { position: relative; flex: 1; height: 6px; border-radius: 999px; background: var(--surface-2); }
.day-temps .range span { position: absolute; top: 0; bottom: 0; min-width: 6px; border-radius: 999px;
    background: linear-gradient(90deg, var(--teal), var(--accent)); }
.weather-credit { color: var(--muted); }
@media (max-width: 720px) {
    .day-row { grid-template-columns: 56px 36px 40px minmax(0, 1fr); gap: 8px; padding: 12px 8px; }
    .day-sky span, .day-wind { display: none; }
    .weather-place { width: 100%; }
    .weather-place select { flex: 1; }
    .weather-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Profile: the rider's picture (also in the header's account button), details, bikes and password */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.large { width: 112px; height: 112px; font-size: 44px; }
.profile-page .section-title { font-weight: 800; font-size: 20px; letter-spacing: -.02em; margin: 0; }
.picture-row { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.picture-actions { flex: 1 1 min(320px, 100%); gap: 10px; }
.picture-upload { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.picture-upload label { align-self: stretch; }
.picture-actions .link-button { align-self: flex-start; }
.profile-page input[readonly] { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.bike-rows { display: flex; flex-direction: column; gap: 12px; }
.bike-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 44px; align-items: end; gap: 12px; }
.bike-row .remove-bike { width: 44px; height: 44px; }
.add-bike { align-self: flex-start; }
.add-bike[hidden] { display: none; }
@media (max-width: 560px) {
    .bike-row { grid-template-columns: minmax(0, 1fr) 44px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
    .bike-row label:first-child { grid-column: 1 / -1; }
    .avatar.large { width: 88px; height: 88px; font-size: 36px; }
}

/* Connections: the rider's connections, requests and the search for riders */
.connections-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 24px; align-items: start; }
.connections-page h1.display, .invite-page h1.display { line-height: .95; letter-spacing: -.04em; margin: 0; }
.connections-page .section-title { font-weight: 800; font-size: 20px; letter-spacing: -.02em; margin: 0; display: flex; align-items: center; gap: 8px; }
.connections-page .section-title .count { min-width: 26px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2);
    font-size: 13px; font-weight: 600; letter-spacing: 0; text-align: center; }
.connections-page .card { padding: 24px; }
.find-riders { position: sticky; top: 96px; }
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.card .people { padding: 0; gap: 0; }
.person { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.person:first-child { border-top: 0; padding-top: 4px; }
.person .who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.person .who b { font-weight: 600; overflow-wrap: anywhere; }
.person .who .meta { font-size: 13px; }
.person-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.person:has(.person-details) { flex-wrap: wrap; }
.person .name-line { display: flex; align-items: center; gap: 4px; min-width: 0; }
.details-toggle { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0;
    border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.details-toggle:hover { background: var(--surface-2); color: var(--fg); }
.details-toggle svg { transition: rotate .15s; }
.details-toggle[aria-expanded="true"] svg { rotate: 180deg; }
.person-details { flex-basis: 100%; margin-left: 52px; padding: 14px 16px; border-radius: 14px; background: var(--bg); }
.person-details[hidden] { display: none; }
.person-details .empty { margin: 12px 0 0; }
.person-details dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px 20px; }
.person-details dt { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.person-details dd { margin: 2px 0 0; font-weight: 500; overflow-wrap: anywhere; }
.person-details .badge-line { display: flex; align-items: center; gap: 6px; }
.person-details .badge-coin { width: 16px; height: 16px; }
.person-details .bike-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.invite-button { border: 1px solid var(--border-strong); background: var(--paper); color: var(--fg); cursor: pointer; }
.invite-button:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.invite-page { max-width: 560px; }
.invite-card { align-items: center; text-align: center; }
.invite-card .avatar { width: 88px; height: 88px; font-size: 36px; }
.invite-card .subtitle { margin: 0; }
.invite-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
@media (max-width: 900px) {
    .connections-layout { grid-template-columns: minmax(0, 1fr); }
    .find-riders { position: static; order: -1; }
}
@media (max-width: 480px) {
    .person { flex-wrap: wrap; }
    .person:has(.person-actions .button) .who { min-width: 150px; }
    .person-actions:has(.button) { margin-left: 52px; }
    .person-details { margin-left: 0; }
    .person-actions .button { padding: 8px 14px; }
}

/* Connection request alerts: the red dot on the account button and the count in the account menu */
.account-menu summary.avatar { position: relative; overflow: visible; }
.account-menu summary.avatar img { border-radius: 50%; }
.alert-dot { position: absolute; top: -2px; right: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--alert);
    box-shadow: 0 0 0 2px var(--bg); pointer-events: none; }
.alert-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: auto; padding: 0 7px;
    border-radius: 999px; background: var(--alert); color: var(--alert-fg); font-size: 12px; font-weight: 700; line-height: 1; }
.clear-alerts { align-self: flex-end; margin-bottom: -8px; }
.button.small { padding: 6px 14px; font-size: 13px; }

/* Rider badges: the coin on the account button (top left; the red dot has the top right), the account menu line and the Profile page's Badge card */
.badge-coin { --coin: var(--bronze); --coin-light: var(--bronze-light); --coin-dark: var(--bronze-dark);
    display: grid; place-items: center; flex: none; border-radius: 50%; border: 1.5px solid var(--coin-dark);
    background: radial-gradient(circle at 32% 28%, var(--coin-light) 0 14%, var(--coin) 58%, var(--coin-dark) 130%); }
.badge-coin.silver { --coin: var(--silver); --coin-light: var(--silver-light); --coin-dark: var(--silver-dark); }
.badge-coin.gold { --coin: var(--gold); --coin-light: var(--gold-light); --coin-dark: var(--gold-dark); }
.badge-coin.platinum { --coin: var(--platinum); --coin-light: var(--platinum-light); --coin-dark: var(--platinum-dark); }
.badge-coin.diamond { --coin: var(--diamond); --coin-light: var(--diamond-light); --coin-dark: var(--diamond-dark); }
.account-menu .avatar .badge-coin { position: absolute; top: -3px; left: -3px; width: 15px; height: 15px;
    box-shadow: 0 0 0 2px var(--bg); pointer-events: none; }
.badge-coin.large { width: 64px; height: 64px; border-width: 2px;
    box-shadow: inset 0 0 0 5px var(--coin), inset 0 0 0 6.5px var(--coin-dark), var(--coin-shadow); }
.badge-coin.large svg { width: 34px; height: 34px; fill: none; stroke: var(--coin-dark); stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round; }
.badge-card { flex: 0 1 380px; display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--radius);
    background: var(--surface); }
.badge-card .badge-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.badge-card .badge-kicker { margin: 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
    color: var(--muted); }
.badge-card .badge-name { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.badge-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.badge-bar span { display: block; height: 100%; min-width: 8px; border-radius: inherit; background: var(--accent); }
.badge-card .badge-miles { margin: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px;
    font-size: 14px; color: var(--muted); }
.badge-card .badge-miles b { color: var(--fg); }
@media (max-width: 560px) {
    .badge-card { flex-basis: 100%; }
}
