/* Motor:Cycles site: carbon, bone and signal red (docs/logo/README.md). */
:root {
  --carbon: #0b0b0c; --panel: #141416; --panel-2: #1a1a1d; --line: #2a2a2e;
  --bone: #ece8e1; --muted: #a39e96; --dim: #6f6b65;
  --red: #e5281f; --red-dark: #b81e17; --red-glow: rgba(229, 40, 31, .14); --ok: #5fbf6f;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1080px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--carbon); scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--carbon); color: var(--bone);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--bone); text-decoration-color: var(--red); text-underline-offset: 3px; }
a:hover { color: #fff; }
img { max-width: 100%; height: auto; }
code, kbd { font-family: var(--mono); font-size: .9em; }
kbd {
  display: inline-block; padding: 0 6px; border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 4px; background: var(--panel-2); color: var(--bone); white-space: nowrap; font-size: .82em; line-height: 1.6;
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10; background: rgba(11, 11, 12, .92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: .04em; }
.brand img { width: 34px; height: 34px; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { padding: 8px 12px; border-radius: 6px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--bone); background: var(--panel-2); }
.nav a[aria-current="page"] { color: var(--bone); box-shadow: inset 0 -2px 0 var(--red); border-radius: 6px 6px 0 0; }
@media (max-width: 640px) {
  .site-header .wrap { gap: 4px; padding-top: 8px; padding-bottom: 4px; }
  .nav { margin-left: -12px; width: calc(100% + 12px); }
  .nav a { padding: 8px 10px; font-size: .9rem; }
  html { scroll-padding-top: 120px; }
}

/* Buttons */
.btn {
  appearance: none; display: inline-block; border: 0; border-radius: 8px; padding: 13px 22px;
  font: inherit; font-weight: 700; background: var(--red); color: #fff; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--red-dark); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--bone); }
.btn.ghost:hover { border-color: var(--bone); background: transparent; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero */
.hero { padding: 56px 0 40px; border-bottom: 1px solid var(--line);
  background: radial-gradient(900px 380px at 50% -40px, var(--red-glow), transparent 70%); }
.hero .logo { display: block; width: min(860px, 100%); margin: 0 auto 28px; }
.hero h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.15; margin: 0 auto 14px; max-width: 760px; text-align: center; letter-spacing: -.01em; }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 680px; margin: 0 auto 28px; text-align: center; }
.hero .actions { justify-content: center; }
.eyebrow { color: var(--red); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: .78rem; margin: 0 0 8px; }

/* Sections */
section.block { padding: 56px 0; border-bottom: 1px solid var(--line); }
section.block:last-of-type { border-bottom: 0; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.2; margin: 0 0 12px; letter-spacing: -.01em; }
h3 { font-size: 1.15rem; margin: 28px 0 8px; }
.lede { color: var(--muted); max-width: 720px; margin: 0 0 32px; font-size: 1.05rem; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.card h3 { margin: 0 0 8px; }
.card p { margin: 0; color: var(--muted); }
.card .gesture { margin-top: 12px; font-size: .9rem; color: var(--bone); }
.feature-link { display: block; text-decoration: none; transition: border-color .15s, transform .15s; }
.feature-link:hover { border-color: var(--red); transform: translateY(-2px); }
.split { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; align-items: center; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; position: relative; padding: 14px 16px 14px 56px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.steps li::before {
  content: counter(s); position: absolute; left: 16px; top: 13px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--red); color: #fff; font-weight: 800; font-size: .85rem; display: grid; place-items: center;
}
.note { color: var(--muted); font-size: .95rem; }
.callout { border-left: 3px solid var(--red); background: var(--panel); padding: 14px 18px; border-radius: 0 8px 8px 0; margin: 20px 0; }
.callout p { margin: 0; }
.callout p + p { margin-top: 8px; }

/* Patcher */
.patcher { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
#drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  min-height: 200px; border: 2px dashed var(--line); border-radius: 10px; padding: 24px; text-align: center;
  cursor: pointer; transition: border-color .15s, background .15s;
}
#drop:hover, #drop:focus-visible, #drop.over { border-color: var(--red); background: #1b1416; outline: none; }
#drop strong { font-size: 1.1rem; }
#drop small { color: var(--muted); }
#status { margin-top: 18px; min-height: 1.6em; }
#status.error { color: #ff7a72; }
#status.done { color: var(--ok); }
#result { display: none; margin-top: 14px; gap: 12px; flex-wrap: wrap; align-items: center; }
#result.show { display: flex; }
.hash { font: 12px/1.4 var(--mono); color: var(--dim); word-break: break-all; margin-top: 12px; }

/* Docs layout (manual) */
.doc { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; padding: 40px 16px 64px; }
.toc { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; font-size: .92rem; }
.toc p { margin: 0 0 8px; color: var(--dim); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li a { display: block; padding: 5px 10px; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; }
.toc li a:hover { color: var(--bone); border-left-color: var(--red); }
.toc li li a { padding-left: 22px; font-size: .88rem; }
@media (max-width: 860px) {
  .doc { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 24px; }
  .toc { position: static; max-height: none; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
}
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0 0 8px; line-height: 1.15; }
.prose h2 { margin-top: 48px; padding-top: 8px; border-top: 1px solid var(--line); }
.prose h2:first-of-type { border-top: 0; margin-top: 32px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 5px 0; }
.prose li > ul { margin-top: 4px; }
.table-wrap { overflow-x: auto; margin: 16px 0; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
td:first-child { white-space: nowrap; }

/* Changelog */
.release { position: relative; padding: 0 0 32px 28px; border-left: 2px solid var(--line); margin-left: 6px; }
.release::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.release.current::before { background: var(--red); box-shadow: 0 0 0 4px var(--red-glow); }
.release h2 { margin: 0; font-size: 1.3rem; border: 0; padding: 0; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.release .date { color: var(--dim); font-size: .9rem; font-weight: 500; }
.tag { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; }
.tag.now { background: var(--red); color: #fff; }
.tag.off { border: 1px solid var(--dim); color: var(--muted); }
.release ul { margin: 10px 0 0; padding-left: 1.2em; }
.release p { margin: 8px 0 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); color: var(--dim); font-size: .88rem; padding: 32px 0 48px; }
.site-footer .wrap { display: grid; gap: 8px; }
.site-footer a { color: var(--muted); }
@media (max-width: 640px) { td:first-child { white-space: normal; } th, td { padding: 8px; } }
