/* RAMP'S COMMUNITY PAGES: the forum and the wiki (server/lib/Page.php makes them). The homepage's look: graphite, one
   volt, Barlow Condensed for what you read at a glance, Barlow for what you read through. Dark only, like the site. */
:root {
  --bg: #15161a; --bg2: #101114; --tile: #1e2025; --tile2: #272a30; --line: #ffffff1a; --line2: #ffffff30;
  --ink: #f6f6f3; --muted: #a9adb5; --dim: #747883; --volt: #d7ff3c; --bad: #ff6b6b;
  --num: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif; --ui: "Barlow", system-ui, -apple-system, sans-serif;
  --r: 20px; --r-m: 14px; --wrap: 1000px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 500 17px/1.6 var(--ui); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--num); margin: 0; letter-spacing: -.005em; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--volt); outline-offset: 3px; border-radius: 6px; }

/* ---------- the top bar, as on the homepage ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.top .wrap { display: flex; align-items: center; gap: 12px; height: 66px; max-width: 1180px; }
.brand { display: flex; align-items: flex-start; gap: 5px; text-decoration: none; margin-right: auto; }
.brand span { font: italic 900 32px/.86 var(--num); letter-spacing: -.01em; }
.brand svg { width: 20px; fill: var(--volt); margin-top: -3px; transform: skewX(-9deg); }
.top nav { display: flex; gap: 22px; margin-right: 14px; }
.top nav a { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 15.5px; padding: 6px 0; border-bottom: 2px solid transparent; }
.top nav a:hover { color: var(--ink); }
.top nav a[aria-current] { color: var(--ink); border-bottom-color: var(--volt); }
.top .me { color: var(--muted); font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
@media (max-width: 560px) { .top .me { display: none; } .top nav { gap: 16px; margin-right: 6px; } .brand span { font-size: 28px; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line2); background: var(--tile2); color: var(--ink); font: 700 16px/1 var(--ui); cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .15s, box-shadow .2s, border-color .15s; }
.btn:hover { transform: translateY(-1px); border-color: #ffffff55; }
.btn.go { background: var(--volt); color: #0a0a0a; border-color: transparent; box-shadow: 0 10px 30px -12px #d7ff3caa; }
.btn.sm { height: 40px; padding: 0 18px; font-size: 15px; }
.btn.ghost { background: transparent; }

/* ---------- the page ---------- */
.cm-main { flex: 1; padding-top: 44px; padding-bottom: 80px; }
.cm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 28px; }
.cm-main h1 { font: italic 800 clamp(34px, 4.4vw, 48px)/1.02 var(--num); }
h1.two span { display: block; color: var(--volt); }
.cm-lede { margin-top: 8px; color: var(--muted); font-size: 18px; max-width: 56ch; }
.cm-crumbs { margin-bottom: 14px; color: var(--dim); font-weight: 600; font-size: 15px; }
.cm-crumbs a { color: var(--muted); text-decoration: none; } .cm-crumbs a:hover { color: var(--ink); text-decoration: underline; }
.cm-sub { margin: 44px 0 14px; font: italic 800 26px/1 var(--num); }
.cm-none, .cm-note { color: var(--muted); }
.cm-note { margin-top: 30px; } .cm-note a { color: var(--ink); text-underline-offset: 3px; }
.cm-empty { padding: 40px 0; display: grid; gap: 16px; justify-items: start; } .cm-empty p { color: var(--muted); }

/* ---------- the forum: categories, thread lists, posts ---------- */
.cm-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .cm-cats { grid-template-columns: minmax(0, 1fr); } }
.cm-cat { display: grid; gap: 4px; padding: 20px 22px; border-radius: var(--r-m); background: var(--tile); border: 1px solid var(--line); text-decoration: none; transition: border-color .15s; }
.cm-cat:hover { border-color: var(--volt); }
.cm-cat b { font: italic 800 25px/1.05 var(--num); }
.cm-cat span { color: var(--muted); font-size: 15.5px; line-height: 1.45; }
.cm-cat em { margin-top: 6px; color: var(--dim); font: 600 13.5px/1.2 var(--ui); font-style: normal; }
.cm-rows { border-top: 1px solid var(--line); }
.cm-row { display: grid; grid-template-columns: minmax(0, 1fr) 70px 120px; gap: 16px; align-items: center; padding: 15px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.cm-row:hover b { color: var(--volt); }
.cm-row .t b { display: block; font-weight: 700; font-size: 17.5px; line-height: 1.3; transition: color .15s; }
.cm-row small { display: block; color: var(--dim); font-size: 13.5px; font-weight: 600; }
.cm-row .n, .cm-row .l { text-align: right; font: 700 17px/1.2 var(--num); }
.cm-row .l { font: 600 14px/1.3 var(--ui); color: var(--muted); }
.cm-row i { font-style: normal; font: 700 11.5px/1 var(--ui); letter-spacing: .06em; text-transform: uppercase; vertical-align: 2px; color: var(--volt); margin-right: 8px; }
.cm-row i.lock { color: var(--dim); margin: 0 0 0 6px; }
.cm-row.hidden, .cm-post.hidden { opacity: .45; }
@media (max-width: 640px) { .cm-row { grid-template-columns: minmax(0, 1fr) auto; } .cm-row .n { display: none; } }
.cm-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 22px; }
.cm-flag { font: 700 12px/1 var(--ui); font-style: normal; letter-spacing: .06em; text-transform: uppercase; color: var(--volt); padding: 6px 9px; border-radius: 999px; border: 1px solid #d7ff3c55; }
.cm-flag.off { color: var(--bad); border-color: #ff6b6b55; }
.cm-post { padding: 20px 0 22px; border-top: 1px solid var(--line); }
.cm-post header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 8px; }
.cm-post header b { font-weight: 700; }
.cm-post header span { color: var(--dim); font-size: 14px; font-weight: 600; }
.cm-post header nav { margin-left: auto; display: flex; gap: 12px; align-items: baseline; }
.cm-post header nav a, .cm-act button { color: var(--dim); font: 600 14px/1 var(--ui); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; }
.cm-post header nav a:hover, .cm-act button:hover { color: var(--ink); text-decoration: underline; }
.cm-act { display: inline; margin: 0; }
.cm-admin { display: flex; gap: 18px; padding: 14px 0; border-top: 1px dashed var(--line2); }

/* ---------- forms ---------- */
.cm-form { display: grid; gap: 14px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.cm-form label { display: grid; gap: 6px; color: var(--muted); font: 700 14px/1.2 var(--ui); }
.cm-form input, .cm-form textarea, .cm-form select { width: 100%; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg2); color: var(--ink); font: 500 16.5px/1.5 var(--ui); padding: 12px 14px; }
.cm-form textarea { resize: vertical; min-height: 120px; }
.cm-form input:focus, .cm-form textarea:focus, .cm-form select:focus { outline: none; border-color: var(--volt); box-shadow: 0 0 0 3px #d7ff3c26; }
.cm-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cm-actions span { color: var(--dim); font-size: 13.5px; font-family: ui-monospace, Menlo, monospace; }

/* ---------- what riders and pages write (Md) ---------- */
.md { font-size: 17.5px; line-height: 1.65; overflow-wrap: anywhere; }
.md > * + * { margin-top: 14px; }
.md h2 { margin-top: 34px; font: italic 800 28px/1.1 var(--num); }
.md h3, .md h4 { margin-top: 26px; font: 700 20px/1.2 var(--ui); }
.md ul, .md ol { padding-left: 22px; } .md li + li { margin-top: 6px; }
.md li::marker { color: var(--volt); }
.md a { color: var(--volt); text-underline-offset: 3px; }
.md strong { color: var(--ink); font-weight: 700; }
.md code { font: 500 .88em ui-monospace, Menlo, monospace; background: var(--tile2); padding: 2px 6px; border-radius: 6px; }
.md pre { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; overflow-x: auto; }
.md pre code { background: none; padding: 0; }
.md blockquote { margin: 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--line2); color: var(--muted); }

/* ---------- the wiki: a standard wiki in Ramp's look ----------
   Three columns on a computer: every page by section on the left (with the search), the page in the middle, its
   contents on the right. The sidebar and the contents stay in view while you scroll. Narrower, the contents go; on a
   phone the sidebar folds into "All pages" above the page (.wk-fold, the same list again). No scripts: the pages are
   made on the server and the contents are plain links to the headings. */
.cm-wiki .cm-main { max-width: 1180px; padding-top: 32px; }
.wk { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 0 52px; align-items: start; }
.wk.has-toc { grid-template-columns: 232px minmax(0, 1fr) 196px; }
.wk-side, .wk-toc { position: sticky; top: 92px; max-height: calc(100vh - 112px); overflow-y: auto; overscroll-behavior: contain; padding-bottom: 12px; }
.wk-fold { display: none; }
.wk-main { min-width: 0; max-width: 70ch; }

/* the search, and the pages by section */
.wk-search input { width: 100%; height: 42px; border-radius: 999px; border: 1px solid var(--line2); color: var(--ink); font: 500 15.5px/1 var(--ui); padding: 0 16px 0 40px;
  background: var(--bg2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23747883' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5l5 5'/%3E%3C/svg%3E") no-repeat 14px 50% / 17px; }
.wk-search input::placeholder { color: var(--dim); }
.wk-search input:focus { outline: none; border-color: var(--volt); box-shadow: 0 0 0 3px #d7ff3c26; }
.wk-tree { display: grid; margin-top: 18px; }
.wk-home { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15.5px; padding: 4px 0; }
.wk-home:hover { color: var(--volt); } .wk-home[aria-current] { color: var(--volt); }
.wk-tree h2 { margin: 20px 0 6px; color: var(--muted); font: italic 800 18px/1 var(--num); }
.wk-tree ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.wk-tree li a { display: block; margin-left: -1px; padding: 6px 0 6px 14px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15.5px; line-height: 1.35; transition: color .15s; }
.wk-tree li a:hover { color: var(--ink); }
.wk-tree li a[aria-current] { color: var(--volt); border-left-color: var(--volt); }

/* the page */
.wk-crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; color: var(--dim); font-weight: 600; font-size: 14.5px; }
.wk-crumbs a { color: var(--muted); text-decoration: none; } .wk-crumbs a:hover { color: var(--ink); text-decoration: underline; }
.wk-crumbs span::before { content: "›"; margin-right: 8px; }
.cm-main h1.wk-title { font: italic 800 clamp(36px, 4.4vw, 50px)/1.02 var(--num); }
.wk-meta { margin-top: 10px; color: var(--dim); font-size: 14.5px; font-weight: 600; }
.wk-meta a { color: var(--muted); text-underline-offset: 3px; } .wk-meta a:hover { color: var(--ink); }
.wk-page .md { margin-top: 26px; }
.wk-page .md > p:first-child { font-size: 20px; color: var(--ink); }
.wk-page .md p, .wk-page .md li { color: #d9dbe0; }
.wk-page .md h3 { margin-top: 38px; padding-top: 14px; border-top: 1px solid var(--line); font: italic 800 27px/1.1 var(--num); scroll-margin-top: 90px; }
.wk-page .md h3:target { color: var(--volt); }   /* the part the contents just jumped to */
.wk-page .md h4 { scroll-margin-top: 90px; }

/* its contents */
.wk-toc h2 { margin-bottom: 10px; color: var(--muted); font: italic 800 18px/1 var(--num); }
.wk-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.wk-toc a { display: block; padding: 5px 0 5px 13px; color: var(--dim); text-decoration: none; font-size: 14.5px; font-weight: 600; line-height: 1.35; transition: color .15s; }
.wk-toc a:hover { color: var(--ink); }

/* the front page and search: pages as rows, title over a line */
.wk-lede { margin-top: 14px; color: var(--muted); font-size: 19px; line-height: 1.55; }
.wk-lede a { color: var(--volt); text-underline-offset: 3px; }
.wk-group { margin-top: 38px; }
.wk-group h2 { margin-bottom: 12px; font: italic 800 27px/1 var(--num); }
.wk-group ul, .wk-results { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.wk-results { margin-top: 26px; }
.wk-group a, .wk-results a { display: grid; gap: 3px; padding: 14px 4px 15px; border-bottom: 1px solid var(--line); text-decoration: none; }
.wk-group b, .wk-results b { font-weight: 700; font-size: 18px; line-height: 1.3; transition: color .15s; }
.wk-group a:hover b, .wk-results a:hover b { color: var(--volt); }
.wk-group span, .wk-results span { color: var(--muted); font-size: 15.5px; line-height: 1.5; }
.wk-results small { color: var(--dim); font-weight: 600; font-size: 13.5px; }
.wk-results mark { background: #d7ff3c30; color: var(--ink); border-radius: 3px; padding: 0 2px; }
.wk-foot { margin-top: 40px; color: var(--muted); } .wk-foot a { color: var(--ink); text-underline-offset: 3px; }

/* previous and next */
.wk-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 48px; }
.wk-nav a { display: grid; gap: 4px; padding: 16px 18px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--tile); text-decoration: none; font: italic 800 21px/1.1 var(--num); }
.wk-nav a:hover { border-color: var(--volt); }
.wk-nav small { color: var(--dim); font: 700 12px/1 var(--ui); letter-spacing: .08em; text-transform: uppercase; }
.wk-nav .next { grid-column: 2; text-align: right; }

/* narrower: the contents go; a phone: the sidebar folds above the page */
@media (max-width: 1100px) { .wk.has-toc { grid-template-columns: 220px minmax(0, 1fr); } .wk-toc { display: none; } .wk { gap: 0 40px; } }
@media (max-width: 900px) {
  .wk, .wk.has-toc { grid-template-columns: minmax(0, 1fr); }
  .wk-side { display: none; }
  .wk-fold { display: block; margin-bottom: 24px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--tile); }
  .wk-fold summary { padding: 13px 16px; cursor: pointer; font-weight: 700; list-style-position: inside; }
  .wk-fold[open] { padding-bottom: 16px; }
  .wk-fold .wk-search, .wk-fold .wk-tree { margin-left: 16px; margin-right: 16px; }
  .wk-nav { grid-template-columns: minmax(0, 1fr); } .wk-nav .next { grid-column: auto; }
}

footer { border-top: 1px solid var(--line); padding: 26px 0 calc(26px + env(safe-area-inset-bottom, 0px)); color: var(--dim); font-size: 14.5px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 1180px; }
footer a { color: var(--muted); text-underline-offset: 3px; } footer a:hover { color: var(--ink); }
