/* Site pages (features, commands, guides, forum, changelog, ...) in the original hanabot.xyz design.
   Loaded after legacy.css, which provides the tokens (--c-*, --border-*, --shadow-pop, --font-*), header, footer and modal.
   Element-level rules are scoped to body.sp so they never touch the original homepage. */

/* ---- base (site pages only) ---- */
.sp main { position: relative; z-index: 2; }
.sp h1, .sp h2, .sp h3, .sp h4 { font-family: var(--font-display); font-weight: 900; line-height: 1.05; margin: 0 0 .5em; color: var(--c-mahogany); }
.sp h1 { font-size: clamp(2.6rem, 6vw, 4.8rem); text-transform: uppercase; letter-spacing: -0.01em; text-shadow: 5px 5px 0 var(--c-rose); }
.sp h2 { font-size: clamp(2rem, 4vw, 3rem); text-transform: uppercase; text-shadow: 3px 3px 0 var(--c-pastel); }
.sp h3, .sp .h3 { font-size: 1.3rem; text-transform: uppercase; }
.sp p { margin: 0 0 1em; line-height: 1.65; }
.sp a { color: var(--c-rose); font-weight: 700; text-underline-offset: 4px; }
.sp a:hover { color: var(--c-mahogany); }
.sp code { font-family: var(--font-mono); font-weight: 700; font-size: .86em; background: var(--c-pastel); border: 2px solid var(--c-mahogany); padding: .05em .4em; color: var(--c-mahogany); white-space: nowrap; }
.sp img { max-width: 100%; height: auto; }
.sp :focus-visible { outline: 3px solid var(--c-rose); outline-offset: 3px; }
.wrap { width: 100%; max-width: 1300px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 920px; }
.center { text-align: center; justify-content: center; }
.muted { color: var(--c-raspberry); }
.small { font-family: var(--font-mono); font-size: .85rem; font-weight: 700; color: var(--c-raspberry); }
.ic { flex: none; vertical-align: -0.15em; }
.nav-link.is-current { background: var(--c-jasmine); border-color: var(--c-mahogany); }
.mobile-menu-links { margin-top: 40px; display: flex; flex-direction: column; gap: 22px; }
.mobile-nav-link { color: var(--c-mahogany); text-decoration: none; font-weight: 900; font-size: 20px; text-transform: uppercase; }
@media (min-width: 769px) { .footer-grid-wide { grid-template-columns: 1.6fr repeat(4, 1fr); } }

/* ---- buttons (base .btn comes from legacy.css) ---- */
.sp .btn, .hb-home .btn { text-decoration: none; }
.btn { background: var(--c-white); color: var(--c-mahogany); }
.btn:hover { background: var(--c-pastel); color: var(--c-mahogany); transform: translate(-4px, -4px); box-shadow: 12px 12px 0 var(--c-rose); }
.btn:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--c-mahogany); }
.btn-primary, .btn-yellow { background: var(--c-jasmine); color: var(--c-mahogany); }
.btn-primary:hover, .btn-yellow:hover { background: var(--c-rose); color: var(--c-snow); box-shadow: 12px 12px 0 var(--c-mahogany); }
.btn-outline { background: var(--c-white); }
.btn-pink { background: var(--c-rose); color: var(--c-white); }
.btn-pink:hover { background: var(--c-jasmine); color: var(--c-mahogany); box-shadow: 12px 12px 0 var(--c-mahogany); }
.btn-sm { font-size: 13px; padding: 9px 16px; gap: 8px; box-shadow: 4px 4px 0 var(--c-mahogany); }
.btn-sm:hover { box-shadow: 6px 6px 0 var(--c-rose); transform: translate(-2px, -2px); }
.btn-lg { font-size: 20px; padding: 18px 36px; }
.btn-ghost { background: transparent; box-shadow: none; }
.btn-ghost-inv { background: transparent; color: var(--c-snow); border-color: var(--c-snow); box-shadow: 8px 8px 0 var(--c-rose); }
.btn-ghost-inv:hover { background: var(--c-snow); color: var(--c-mahogany); }
.btn-danger { background: #FFC9C9; }
.linkbtn { background: none; border: 0; padding: 0; font: 700 1em var(--font-mono); color: var(--c-rose); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.linkbtn.danger { color: #B42318; }
.cta-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; margin-top: 12px; }
.more { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-weight: 700; text-transform: uppercase; font-size: .88rem; color: var(--c-mahogany) !important; text-decoration: none; }
.more:hover { color: var(--c-rose) !important; }

/* ---- labels, chips, cards ---- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: 1px; background: var(--c-jasmine); color: var(--c-mahogany); border: var(--border-light); padding: 6px 12px; box-shadow: 4px 4px 0 var(--c-mahogany); margin-bottom: 22px; transform: rotate(-1deg); }
.lede { font-family: var(--font-mono); font-weight: 700; font-size: 1.08rem; line-height: 1.6; color: var(--c-mahogany); max-width: 64ch; }
.lede-sm { font-family: var(--font-mono); font-weight: 700; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-weight: 700; font-size: .72rem; text-transform: uppercase; padding: 4px 8px; border: var(--border-light); background: var(--c-white); color: var(--c-mahogany) !important; text-decoration: none; }
.chip-pink { background: var(--c-pastel); }
.badge { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-weight: 700; font-size: .7rem; text-transform: uppercase; padding: 3px 7px; border: var(--border-light); background: var(--c-snow); }
.badge-perm { background: var(--c-jasmine); }
.st { font-family: var(--font-mono); font-weight: 700; font-size: .72rem; text-transform: uppercase; padding: 4px 8px; border: var(--border-light); background: var(--c-white); }
.st-planned { background: #DCE8FF; } .st-progress { background: var(--c-jasmine); } .st-done { background: #C9F2D6; } .st-declined { background: #E8E2E4; }
.card { background: var(--c-white); border: var(--border-heavy); box-shadow: var(--shadow-pop); padding: 28px; transition: 0.25s cubic-bezier(0.25, 0.8, 0.25, 1); }
.card-link { display: block; color: var(--c-mahogany) !important; text-decoration: none; }
.card-link:hover { transform: translate(-6px, -6px); box-shadow: 14px 14px 0 var(--c-rose); background: var(--c-snow); }
.card h3 { margin-bottom: 10px; }
.card p { font-family: var(--font-mono); font-weight: 700; font-size: .9rem; color: var(--c-mahogany); }
.grid { display: grid; gap: 32px; }
.g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); }
.stack { display: grid; gap: 22px; }
.split { display: grid; grid-template-columns: 1.25fr 1fr; gap: 60px; align-items: start; }
.split-even { grid-template-columns: 1fr 1fr; }
.ic-box { display: inline-grid; place-items: center; width: 52px; height: 52px; border: var(--border-heavy); background: var(--c-pastel); color: var(--c-mahogany); box-shadow: 4px 4px 0 var(--c-mahogany); margin-bottom: 18px; }
.checks, .dashes { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 12px; font-family: var(--font-mono); font-weight: 700; }
.checks li, .dashes li { position: relative; padding-left: 36px; }
.checks li::before { content: '\2713'; position: absolute; left: 0; top: 0; width: 24px; height: 24px; display: grid; place-items: center; border: var(--border-light); background: var(--c-jasmine); font-family: var(--font-display); font-weight: 900; font-size: 14px; }
.dashes li::before { content: ''; position: absolute; left: 4px; top: .7em; width: 16px; height: 4px; background: var(--c-rose); }
.alert { border: var(--border-heavy); background: #FFC9C9; padding: 14px 18px; margin: 0 0 22px; font-family: var(--font-mono); font-weight: 700; box-shadow: 6px 6px 0 var(--c-mahogany); }
.meta { font-family: var(--font-mono); font-size: .82rem; font-weight: 700; color: var(--c-raspberry); display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 22px; font-family: var(--font-mono); font-weight: 700; font-size: .82rem; text-transform: uppercase; position: relative; z-index: 2; }
.sp .crumbs a { color: var(--c-raspberry); }
.crumbs [aria-current] { color: var(--c-mahogany); max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- sections ---- */
.sec { padding: 100px 0; position: relative; }
.sec-tight { padding: 50px 0; }
.sec-alt { background: var(--c-pastel); border-top: var(--border-heavy); border-bottom: var(--border-heavy); }
.sec-head { margin-bottom: 44px; max-width: 760px; }
.sec-head > p:not(.eyebrow) { font-family: var(--font-mono); font-weight: 700; }
.sec-head-row { display: flex; justify-content: space-between; align-items: end; gap: 16px; max-width: none; margin-bottom: 28px; }
.sec-head-row h2 { margin: 0; }
.sp .sec-label { display: inline-block; background: var(--c-mahogany); color: var(--c-snow); text-shadow: none; padding: 8px 16px; box-shadow: 6px 6px 0 var(--c-rose); margin-bottom: 28px; }
.page-head { padding: 60px 0 56px; border-bottom: var(--border-heavy); background-color: var(--c-snow); background-image: repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(255, 202, 228, 0.35) 20px, rgba(255, 202, 228, 0.35) 40px); }
.page-head-sm { padding: 44px 0 40px; }
.page-head h1 { max-width: 20ch; }
.head-split { display: grid; grid-template-columns: 1fr auto; gap: 56px; align-items: center; }
.head-row { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.head-row .lede { margin: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.sp .pills a { font-family: var(--font-mono); font-weight: 700; font-size: .85rem; text-transform: uppercase; padding: 8px 14px; border: var(--border-light); background: var(--c-white); color: var(--c-mahogany); text-decoration: none; box-shadow: 4px 4px 0 var(--c-mahogany); }
.sp .pills a:hover { background: var(--c-jasmine); }

/* ---- module / feature cards ---- */
.mod { display: flex !important; flex-direction: column; }
.mod .cmds { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.mod .cmds code { font-size: .74rem; }
.mod-more { background: var(--c-jasmine); }
.head-facts { display: grid; grid-template-columns: repeat(3, auto); padding: 0; }
.head-facts div, .facts div { padding: 20px 24px; display: flex; flex-direction: column; border-left: var(--border-heavy); }
.head-facts div:first-child { border-left: 0; }
.head-facts b, .facts b { font: 900 2.4rem/1 var(--font-display); color: var(--c-rose); text-shadow: 3px 3px 0 var(--c-mahogany); }
.head-facts span, .facts span { font-family: var(--font-mono); font-weight: 700; font-size: .75rem; text-transform: uppercase; margin-top: 8px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; padding: 0; }
.facts div { border-left: 0; border-bottom: var(--border-heavy); }
.facts div:nth-child(odd) { border-right: var(--border-heavy); }
.facts div:nth-last-child(-n+2) { border-bottom: 0; }
.point p { margin: 0; }
.cmd-group-title { margin: 36px 0 16px; }
.cmds-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.cmds-grid .cmd { margin: 0; }

/* ---- faq (details) ---- */
.faq { display: grid; gap: 20px; }
.faq details { border: var(--border-heavy); background: var(--c-white); box-shadow: 8px 8px 0 var(--c-pastel); transition: 0.25s; }
.faq details:hover { box-shadow: 8px 8px 0 var(--c-rose); transform: translate(-3px, -3px); }
.faq summary { cursor: pointer; padding: 20px 64px 20px 24px; font-family: var(--font-display); font-weight: 900; font-size: 1.15rem; text-transform: uppercase; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); color: var(--c-rose); font-size: 32px; font-weight: 900; transition: 0.3s; }
.faq details[open] summary { background: var(--c-mahogany); color: var(--c-snow); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); color: var(--c-jasmine); }
.qa-a { border-top: var(--border-heavy); padding: 22px 24px 6px; background: var(--c-snow); font-family: var(--font-mono); font-weight: 700; }
.faq-group { margin: 48px 0; }

/* ---- CTA ---- */
.final { background: var(--c-mahogany); color: var(--c-snow); padding: 90px 0; border-top: var(--border-heavy); border-bottom: var(--border-heavy); position: relative; z-index: 2; }
.final-in { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.sp .final h2 { color: var(--c-jasmine); text-shadow: 4px 4px 0 var(--c-rose); }
.final p { font-family: var(--font-mono); font-weight: 700; color: var(--c-snow); }
.final-art { border: 4px solid var(--c-snow); box-shadow: 10px 10px 0 var(--c-rose); }
.final-sm { padding: 60px 0; }
.final-sm .final-in { grid-template-columns: 1fr auto; }

/* ---- command reference ---- */
.ref { display: grid; grid-template-columns: 270px 1fr; gap: 48px; padding-top: 44px; padding-bottom: 100px; align-items: start; }
.ref-side { position: sticky; top: 110px; max-height: calc(100vh - 130px); overflow: auto; padding: 4px 10px 16px 2px; }
.search { display: flex; align-items: center; gap: 8px; border: var(--border-heavy); background: var(--c-white); padding: 0 12px; box-shadow: 6px 6px 0 var(--c-mahogany); }
.search input { border: 0; outline: 0; background: transparent; font: 700 1rem var(--font-mono); padding: 12px 0; width: 100%; color: var(--c-mahogany); }
.search:focus-within { box-shadow: 6px 6px 0 var(--c-rose); }
.ref-count { font-family: var(--font-mono); font-weight: 700; font-size: .78rem; margin: 14px 0 6px; min-height: 1.2em; }
.ref-group { font-family: var(--font-mono); font-weight: 700; font-size: .75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--c-rose); margin: 20px 0 6px !important; }
.sp .ref-side nav a { display: flex; justify-content: space-between; padding: 5px 8px; color: var(--c-mahogany); text-decoration: none; font-weight: 700; font-size: .95rem; border: 2px solid transparent; }
.sp .ref-side nav a:hover, .sp .ref-side nav a.active { background: var(--c-jasmine); border-color: var(--c-mahogany); }
.ref-side nav a.dim { opacity: .35; }
.ref-side small { font-family: var(--font-mono); font-size: .75rem; }
.ref-cat { margin-bottom: 64px; }
.ref-cat-head { display: flex; gap: 18px; align-items: flex-start; padding: 18px 20px; border: var(--border-heavy); background: var(--c-mahogany); color: var(--c-snow); box-shadow: 8px 8px 0 var(--c-rose); margin-bottom: 20px; }
.ref-cat-head .ic-box { margin: 0; background: var(--c-jasmine); }
.sp .ref-cat-head h2 { font-size: 1.8rem; margin: 0 0 6px; color: var(--c-snow); text-shadow: 3px 3px 0 var(--c-rose); }
.sp .ref-cat-head p { margin: 0; font-family: var(--font-mono); font-weight: 700; font-size: .9rem; color: var(--c-pastel); }
.sp .ref-cat-head a { color: var(--c-jasmine); }
.cmd { border: var(--border-heavy); background: var(--c-white); padding: 16px 18px; margin-bottom: 14px; box-shadow: 5px 5px 0 var(--c-pastel); transition: 0.2s; }
.cmd:hover { box-shadow: 5px 5px 0 var(--c-rose); }
.cmd:target { box-shadow: 0 0 0 5px var(--c-jasmine); }
.cmd-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.sp .cmd-name { font-size: .95rem; background: var(--c-jasmine); }
.sp .cmd p { margin: 0; font-family: var(--font-mono); font-weight: 700; font-size: .88rem; }
.copy { margin-left: auto; font: 700 .72rem var(--font-mono); text-transform: uppercase; border: var(--border-light); background: var(--c-white); padding: 4px 8px; cursor: pointer; color: var(--c-mahogany); box-shadow: 3px 3px 0 var(--c-mahogany); }
.copy:hover { background: var(--c-pastel); }
.copy.done { background: #C9F2D6; }
.params { list-style: none; margin: 12px 0 0; padding: 12px 0 0; border-top: 2px dashed var(--c-pastel); display: grid; gap: 6px; font-family: var(--font-mono); font-size: .82rem; }
.sp .params code { background: var(--c-snow); font-size: .78rem; }
.opt { font: 700 .68rem var(--font-mono); color: var(--c-raspberry); margin: 0 6px; text-transform: uppercase; }
.flags summary { cursor: pointer; font: 700 .8rem var(--font-mono); text-transform: uppercase; margin-top: 10px; color: var(--c-rose); }
.ref-empty { padding: 36px; border: 4px dashed var(--c-mahogany); text-align: center; font-family: var(--font-mono); font-weight: 700; }

/* ---- guides / prose ---- */
.article { padding-top: 30px; padding-bottom: 90px; position: relative; z-index: 2; }
.article-head { max-width: 900px; padding: 30px 0 40px; margin-bottom: 48px; border-bottom: var(--border-heavy); }
.sp .article-head h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; align-items: start; }
.article-side { position: sticky; top: 110px; display: grid; gap: 24px; }
.toc { padding: 20px; display: grid; gap: 8px; box-shadow: 6px 6px 0 var(--c-pastel); }
.sp .toc a { color: var(--c-mahogany); text-decoration: none; font-family: var(--font-mono); font-size: .85rem; }
.sp .toc a:hover { color: var(--c-rose); text-decoration: underline; }
.toc-title { font-family: var(--font-mono); font-weight: 700; font-size: .75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--c-rose); margin: 0 0 6px !important; }
.side-feature { padding: 20px; }
.side-feature b { display: block; font: 900 1.15rem var(--font-display); text-transform: uppercase; margin-bottom: 10px; }
.side-cta { padding: 20px; background: var(--c-jasmine); }
.prose { max-width: 72ch; font-size: 1.08rem; }
.sp .prose h2 { font-size: 2rem; margin-top: 1.8em; }
.sp .prose h3 { margin-top: 1.5em; }
.prose > :first-child { margin-top: 0 !important; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.3em; }
.prose li { margin-bottom: .5em; line-height: 1.6; }
.prose ol { list-style: none; counter-reset: li; padding-left: 0; }
.prose ol > li { counter-increment: li; position: relative; padding-left: 46px; }
.prose ol > li::before { content: counter(li); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border: var(--border-light); display: grid; place-items: center; font: 900 .95rem var(--font-display); background: var(--c-jasmine); box-shadow: 3px 3px 0 var(--c-mahogany); }
.sp .prose code { white-space: normal; }
.cmd-link { text-decoration: none; }
.cmd-link:hover code { background: var(--c-jasmine); }
.code { background: var(--c-mahogany); color: var(--c-snow); padding: 18px 20px; overflow: auto; font: 700 .9rem/1.6 var(--font-mono); border: var(--border-heavy); box-shadow: 8px 8px 0 var(--c-rose); margin: 0 0 1.5em; }
.sp .code code { background: none; border: 0; color: inherit; padding: 0; white-space: pre; }
.callout { margin: 1.5em 0; border: var(--border-heavy); background: var(--c-jasmine); padding: 16px 20px; box-shadow: 6px 6px 0 var(--c-mahogany); transform: rotate(-0.3deg); }
.sp .callout p { margin: 0; font-family: var(--font-mono); font-weight: 700; font-size: .95rem; }
.quote { margin: 1em 0; border-left: 6px solid var(--c-rose); padding: 4px 18px; }
.table-wrap { overflow-x: auto; margin: 0 0 1.5em; border: var(--border-heavy); box-shadow: var(--shadow-pop); background: var(--c-white); }
.sp table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.sp th, .sp td { text-align: left; padding: 12px 16px; border-bottom: var(--border-light); vertical-align: top; }
.sp tr:last-child td { border-bottom: 0; }
.sp th { background: var(--c-mahogany); color: var(--c-snow); font-family: var(--font-display); font-weight: 900; text-transform: uppercase; }
.sp td + td, .sp th + th { border-left: var(--border-light); }
.vs .vs-h { background: #FFF6D6; font-weight: 700; }
.vs-cols { margin: 40px 0; }
.note-card { background: var(--c-jasmine); margin-top: 10px; }
.sp .note-card p:last-child { margin: 0; }

/* ---- changelog ---- */
.timeline { padding-top: 50px; padding-bottom: 100px; position: relative; z-index: 2; }
.release { border-left: var(--border-heavy); padding: 0 0 52px 34px; position: relative; }
.release::before { content: ''; position: absolute; left: -14px; top: 6px; width: 24px; height: 24px; background: var(--c-rose); border: var(--border-heavy); }
.release-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.sp .release-head h2 { margin: 0; font-size: 2.2rem; }
.sp .release-head h2 a { color: var(--c-mahogany); text-decoration: none; }
.release-head time { font-family: var(--font-mono); font-weight: 700; font-size: .85rem; background: var(--c-white); border: var(--border-light); padding: 3px 8px; }
.changes { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 12px; }
.changes li { display: grid; grid-template-columns: 100px 1fr; gap: 14px; align-items: start; background: var(--c-white); border: var(--border-light); padding: 12px 14px; }
.changes li > div { font-size: .98rem; line-height: 1.55; }
.ch { font: 700 .7rem/1 var(--font-mono); text-transform: uppercase; padding: 6px 0; text-align: center; border: var(--border-light); margin-top: 2px; }
.ch-new { background: var(--c-pastel); } .ch-improve { background: #DCE8FF; } .ch-fix { background: #C9F2D6; }

/* ---- roadmap ---- */
.lanes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; align-items: start; }
.lane { border: var(--border-heavy); padding: 18px; background: var(--c-pastel); display: grid; gap: 18px; box-shadow: var(--shadow-pop); }
.lane:nth-child(2) { background: #DCE8FF; } .lane:nth-child(3) { background: var(--c-snow); }
.sp .lane h2 { margin: 0; display: flex; justify-content: space-between; align-items: center; font-size: 1.5rem; }
.lane h2 small { font: 700 .85rem var(--font-mono); border: var(--border-light); padding: 3px 10px; background: var(--c-white); text-shadow: none; }
.lane-item { padding: 18px; box-shadow: 5px 5px 0 var(--c-mahogany); }
.sp .lane-item p { margin-bottom: 8px; }
.sp .lane-item p:last-child { margin: 0; }

/* ---- lists ---- */
.link-list { list-style: none; margin: 0; padding: 0; border: var(--border-heavy); background: var(--c-white); box-shadow: var(--shadow-pop); }
.link-list li { border-bottom: var(--border-light); }
.link-list li:last-child { border-bottom: 0; }
.sp .link-list a, .hb-home .link-list a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 18px; color: var(--c-mahogany); text-decoration: none; font-weight: 900; text-transform: uppercase; font-size: .95rem; }
.sp .link-list a:hover, .hb-home .link-list a:hover { background: var(--c-jasmine); }
.link-list small { font-family: var(--font-mono); font-size: .78rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.rel { padding: 20px 24px; }
.rel-head { display: flex; gap: 14px; align-items: baseline; margin-bottom: 8px; }
.rel-head b { font: 900 1.4rem var(--font-display); color: var(--c-rose); text-shadow: 2px 2px 0 var(--c-mahogany); }
.rel-head span { font-family: var(--font-mono); font-weight: 700; font-size: .8rem; }
.rel ul { margin: 0; padding-left: 18px; font-family: var(--font-mono); font-weight: 700; font-size: .85rem; }
.thread-card h3 { margin: 14px 0 6px; font-size: 1.1rem; }

/* ---- about ---- */
.about-art { width: 300px; transform: rotate(3deg); filter: drop-shadow(6px 6px 0 var(--c-mahogany)); }
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin: 28px 0; }
.person { display: flex; gap: 14px; align-items: center; border: var(--border-heavy); padding: 14px; background: var(--c-white); box-shadow: 5px 5px 0 var(--c-rose); }
.person img { width: 56px; height: 56px; border: var(--border-light); }
.person b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; text-transform: uppercase; }
.person span { font-family: var(--font-mono); font-weight: 700; font-size: .8rem; }
.banner-strip { border-top: var(--border-heavy); position: relative; z-index: 2; }
.banner-strip img { width: 100%; max-height: 420px; object-fit: cover; display: block; }
.err img { margin: 0 auto 16px; width: 160px; display: block; filter: drop-shadow(5px 5px 0 var(--c-mahogany)); }
.err .lede { margin: 0 auto 24px; }

/* ---- forum ---- */
.forum { padding-top: 34px; padding-bottom: 100px; position: relative; z-index: 2; }
.fbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border: var(--border-heavy); background: var(--c-white); padding: 12px 16px; margin-bottom: 32px; font-family: var(--font-mono); font-weight: 700; font-size: .88rem; box-shadow: 6px 6px 0 var(--c-pastel); }
.fbar-user { display: inline-flex; align-items: center; gap: 10px; }
.fbar-user img { width: 30px; height: 30px; border: var(--border-light); border-radius: 50%; }
.fbar form { margin: 0; }
.forum-grid { display: grid; grid-template-columns: 250px 1fr; gap: 40px; align-items: start; }
.forum-side { position: sticky; top: 110px; display: grid; gap: 22px; }
.forum-side nav { display: grid; gap: 4px; }
.sp .forum-side nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; color: var(--c-mahogany); text-decoration: none; font-weight: 900; font-size: .95rem; text-transform: uppercase; border: 2px solid transparent; }
.forum-side nav a small { margin-left: auto; font-family: var(--font-mono); font-size: .75rem; }
.sp .forum-side nav a:hover { background: var(--c-white); border-color: var(--c-mahogany); }
.sp .forum-side nav a[aria-current] { background: var(--c-jasmine); border-color: var(--c-mahogany); box-shadow: 4px 4px 0 var(--c-mahogany); }
.side-note { padding: 18px; }
.sp .side-note p { margin: 0; font-size: .82rem; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 20px; }
.sp .filters a { font-family: var(--font-mono); font-size: .78rem; font-weight: 700; text-transform: uppercase; padding: 5px 10px; border: var(--border-light); color: var(--c-mahogany); text-decoration: none; background: var(--c-white); }
.sp .filters a[aria-current] { background: var(--c-mahogany); color: var(--c-snow); }
.filters .sep { width: 2px; height: 24px; background: var(--c-mahogany); margin: 0 6px; }
.threads { list-style: none; margin: 0; padding: 0; border: var(--border-heavy); background: var(--c-white); box-shadow: var(--shadow-pop); }
.trow { display: grid; grid-template-columns: 52px 1fr auto; gap: 16px; align-items: center; padding: 16px 20px; border-bottom: var(--border-light); }
.trow:last-child { border-bottom: 0; }
.trow:hover { background: var(--c-snow); }
.trow.pinned { background: #FFF6D6; }
.trow .av, .post .av { width: 40px; height: 40px; border: var(--border-light); border-radius: 50%; object-fit: cover; background: var(--c-pastel); margin: 0 auto; }
.votes { display: flex; flex-direction: column; align-items: center; border: var(--border-light); padding: 4px 0; font-family: var(--font-mono); font-size: .85rem; background: var(--c-jasmine); box-shadow: 3px 3px 0 var(--c-mahogany); }
.sp .trow-title { font-weight: 900; color: var(--c-mahogany); text-decoration: none; font-size: 1.08rem; display: inline-flex; align-items: center; gap: 6px; }
.sp .trow-title:hover { color: var(--c-rose); text-decoration: underline; }
.sp .trow-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-family: var(--font-mono); font-weight: 700; font-size: .78rem; margin: 6px 0 0; }
.trow-side { text-align: right; font-family: var(--font-mono); font-weight: 700; font-size: .75rem; display: grid; }
.trow-side b { font: 900 1.4rem var(--font-display); color: var(--c-rose); }
.empty { text-align: center; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 28px; }
.sp .pager a { min-width: 40px; text-align: center; padding: 6px 10px; border: var(--border-light); color: var(--c-mahogany); text-decoration: none; background: var(--c-white); font-family: var(--font-mono); }
.sp .pager a[aria-current] { background: var(--c-mahogany); color: var(--c-snow); }
.thread { max-width: 980px; }
.thread-head { padding-bottom: 24px; border-bottom: var(--border-heavy); margin-bottom: 30px; }
.sp .thread-head h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 16px 0; text-shadow: 4px 4px 0 var(--c-pastel); }
.vote-form { margin: 0; }
.posts { list-style: none; margin: 0 0 30px; padding: 0; display: grid; gap: 22px; }
.post { display: grid; grid-template-columns: 44px 1fr; gap: 16px; }
.post-body { border: var(--border-heavy); background: var(--c-white); padding: 16px 20px; min-width: 0; box-shadow: 6px 6px 0 var(--c-pastel); }
.post-op .post-body { box-shadow: var(--shadow-pop); }
.post-staff .post-body { background: #FFF0F8; box-shadow: 6px 6px 0 var(--c-rose); }
.sp .post-meta { font-family: var(--font-mono); font-weight: 700; font-size: .8rem; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.sp .post-meta a { color: var(--c-raspberry); }
.md { overflow-wrap: anywhere; }
.sp .md p:last-child { margin-bottom: 0; }
.md .code { box-shadow: none; }
.post-tools { display: flex; gap: 16px; align-items: flex-start; margin-top: 14px; padding-top: 12px; border-top: 2px dashed var(--c-pastel); font-family: var(--font-mono); font-size: .82rem; }
.post-tools form { margin: 0; }
.edit summary { cursor: pointer; color: var(--c-rose); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.edit .form { margin-top: 12px; }
.staff-tools { box-shadow: 6px 6px 0 var(--c-jasmine); margin-bottom: 30px; background: var(--c-snow); padding: 18px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }
.inline-form select { font: 700 .85rem var(--font-mono); border: var(--border-light); padding: 7px 8px; background: var(--c-white); }
.form { display: grid; gap: 18px; }
.form label { display: grid; gap: 8px; font-weight: 900; text-transform: uppercase; font-size: .95rem; }
.form input[type=text], .form textarea { font: 700 1rem/1.5 var(--font-mono); color: var(--c-mahogany); border: var(--border-heavy); padding: 12px 14px; background: var(--c-snow); width: 100%; text-transform: none; }
.form textarea { resize: vertical; min-height: 130px; }
.form input:focus, .form textarea:focus { outline: 0; box-shadow: 6px 6px 0 var(--c-rose); background: var(--c-white); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cat-pick { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cat-pick legend { font-weight: 900; text-transform: uppercase; margin-bottom: 8px; }
.cat-pick label { display: flex; gap: 10px; align-items: flex-start; border: var(--border-light); padding: 12px 14px; cursor: pointer; background: var(--c-snow); text-transform: none; }
.cat-pick label:has(input:checked) { background: var(--c-jasmine); box-shadow: 4px 4px 0 var(--c-mahogany); }
.cat-pick input { margin-top: 4px; accent-color: var(--c-rose); }
.cat-pick small { display: block; font-family: var(--font-mono); font-weight: 700; font-size: .78rem; text-transform: none; }

/* ---- homepage additions (new sections inside the original homepage) ---- */
.hb-home { padding: 110px 0; border-top: var(--border-heavy); position: relative; z-index: 2; background: var(--c-snow); }
.hb-home.hb-pastel { background: var(--c-pastel); }
.hb-home.hb-stripes { background-image: repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(255, 202, 228, 0.35) 20px, rgba(255, 202, 228, 0.35) 40px); }
.hb-plus { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; background: var(--c-white); border: var(--border-heavy); box-shadow: 16px 16px 0 var(--c-rose); padding: 48px; transform: rotate(-0.5deg); transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); }
.hb-plus:hover { transform: rotate(0deg) translate(-4px, -4px); box-shadow: 20px 20px 0 var(--c-jasmine); }
.hb-plus h2 { font-family: var(--font-display); font-size: clamp(2.2rem, 4.5vw, 3.6rem); font-weight: 900; text-transform: uppercase; line-height: 1; margin-bottom: 20px; color: var(--c-mahogany); text-shadow: 4px 4px 0 var(--c-pastel); }
.hb-plus p { font-family: var(--font-mono); font-weight: 700; line-height: 1.6; margin-bottom: 18px; color: var(--c-mahogany); }
.hb-plus img { width: 100%; max-width: 300px; justify-self: center; transform: rotate(6deg); filter: drop-shadow(8px 8px 0 var(--c-mahogany)); }
.hb-tag { display: inline-block; font-family: var(--font-mono); font-weight: 700; text-transform: uppercase; background: var(--c-jasmine); color: var(--c-mahogany); border: var(--border-light); padding: 6px 12px; box-shadow: 4px 4px 0 var(--c-mahogany); margin-bottom: 20px; transform: rotate(-1deg); }
.hb-home .checks { margin-bottom: 28px; color: var(--c-mahogany); }
.hb-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.hb-steps li { border: var(--border-heavy); padding: 32px 28px; background: var(--c-white); box-shadow: var(--shadow-pop); transition: 0.3s; color: var(--c-mahogany); }
.hb-steps li:hover { transform: translate(-6px, -6px); box-shadow: 14px 14px 0 var(--c-rose); }
.hb-steps h3 { font-size: 24px; font-weight: 900; text-transform: uppercase; margin: 16px 0 10px; }
.hb-steps p { font-family: var(--font-mono); font-weight: 700; line-height: 1.6; margin-bottom: 18px; }
.hb-home code { font-family: var(--font-mono); font-weight: 700; font-size: .85em; background: var(--c-pastel); border: 2px solid var(--c-mahogany); padding: 0 .3em; }
.hb-step-n { display: inline-grid; place-items: center; width: 56px; height: 56px; border: var(--border-heavy); font: 900 28px var(--font-display); background: var(--c-rose); color: var(--c-white); box-shadow: 4px 4px 0 var(--c-mahogany); }
.hb-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.hb-col-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 26px; }
.hb-col-head h2 { font-family: var(--font-display); font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 900; text-transform: uppercase; line-height: 1; color: var(--c-mahogany); text-shadow: 3px 3px 0 var(--c-white); }
.hb-home .card { color: var(--c-mahogany); }
.hb-home .card h3 { font-weight: 900; text-transform: uppercase; }
.hb-home .chip, .hb-home .st { display: inline-block; }
.hb-home .section-header h2 { color: var(--c-mahogany); text-shadow: 4px 4px 0 var(--c-rose); }

/* ---- responsive ---- */
@media (max-width: 1150px) {
  .header .nav-links { gap: 12px; }
  .header .nav-links .nav-link { padding: 8px 10px; font-size: 15px; }
}
@media (max-width: 900px) {
  .split, .split-even, .final-in, .head-split, .article-grid, .ref, .forum-grid, .hb-plus, .hb-cols { grid-template-columns: 1fr; }
  .g3, .lanes, .hb-steps { grid-template-columns: 1fr 1fr; }
  .ref-side, .article-side, .forum-side { position: static; max-height: none; }
  .ref-side nav { display: none; }
  .final-sm .final-in { grid-template-columns: 1fr; }
  .cmds-grid { grid-template-columns: 1fr; }
  .sec, .hb-home { padding: 70px 0; }
  .hb-plus { padding: 32px 24px; }
  .about-art { width: 200px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .g2, .g3, .lanes, .cat-pick, .hb-steps { grid-template-columns: 1fr; }
  .head-facts div { padding: 14px; }
  .trow { grid-template-columns: 44px 1fr; }
  .trow-side { display: none; }
  .changes li { grid-template-columns: 1fr; gap: 6px; }
  .ch { justify-self: start; padding: 6px 8px; }
  .sec-head-row, .hb-col-head { flex-direction: column; align-items: start; }
  .sp h1 { text-shadow: 3px 3px 0 var(--c-rose); }
}
