/* ============ Knowledge page ============ */
.kb-hero { padding: 150px 0 60px; overflow: clip; }
.kb-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(30px, 5vw, 70px); align-items: end; }
.kb-title { font: 700 clamp(2.8rem, 4.9vw, 5.2rem)/1.3 var(--display); margin-bottom: 22px; }
.kb-title .accent { color: var(--ochre); }
.kb-copy { padding-bottom: 30px; }

/* hero visual: every article is a book on the shelf */
.shelf { position: relative; justify-self: center; width: min(430px, 100%); }
.shelf-books { display: flex; align-items: flex-end; gap: 6px; height: 340px; padding-inline: 14px; }
.book { --c: var(--ink); --t: var(--paper); position: relative; flex: 0 0 auto; width: 62px; height: var(--h); display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 18px 0 14px; border-radius: 4px 4px 2px 2px; background: var(--c); color: var(--t); text-decoration: none; transform-origin: 50% 100%; box-shadow: inset -6px 0 0 rgba(0, 0, 0, .12), inset 0 14px 0 -10px rgba(255, 255, 255, .18), inset 0 -14px 0 -10px rgba(255, 255, 255, .18); }
.book:nth-child(2) { width: 54px; } .book:nth-child(4) { width: 70px; }
.book::before, .book::after { content: ""; position: absolute; inset-inline: 8px; height: 2px; background: currentColor; opacity: .35; }
.book::before { top: 10px; } .book::after { bottom: 34px; }
.book-t { writing-mode: vertical-rl; font: 700 1.15rem/1 var(--display); white-space: nowrap; overflow: hidden; max-height: calc(100% - 60px); }
.book-m { font-size: .72rem; font-weight: 700; opacity: .75; }
.b-dev { --c: var(--ink); }
.b-perf { --c: var(--ochre); }
.b-guide { --c: var(--sand); --t: var(--ink); }
.b-sec { --c: #4a4740; }
.book:last-of-type { margin-inline-start: 23px; transform: rotate(5deg); transform-origin: 0% 100%; }
.book.is-dim { opacity: .25; }
.shelf-board { display: block; height: 16px; border-radius: 3px; background: linear-gradient(#cbb88d, #b8a277); box-shadow: 0 18px 30px -16px rgba(27, 26, 23, .5); }
.book-end { display: none; }

/* filters */
.kb-list { padding: 40px 0 var(--sec); }
.kb-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: clamp(30px, 5vw, 50px); }
.kb-filter button { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; padding: 9px 18px; border-radius: 99px; border: 1.5px solid rgba(27, 26, 23, .2); background: transparent; color: var(--ink); cursor: pointer; transition: background-color .25s, color .25s, border-color .25s; }
.kb-filter button span { font: 700 .95rem var(--display); color: var(--ochre); }
.kb-filter button:hover { border-color: var(--ink); }
.kb-filter button.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.kb-filter button.is-on span { color: var(--sand); }

/* the latest article */
.feat { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: clamp(20px, 4vw, 50px); align-items: center; padding: clamp(28px, 4vw, 50px); border-radius: var(--radius); background: var(--ink); color: var(--paper); text-decoration: none; margin-bottom: 20px; }
.feat-ic { display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(243, 236, 220, .2); }
.feat-ic .ic { width: 70px; height: 70px; stroke: var(--paper); stroke-width: 1.8; }
.feat-ic .ic .d, .feat-ic .ic .f { fill: var(--paper); }
.feat-k { display: flex; align-items: center; gap: 12px; font-size: .9rem; font-weight: 600; opacity: .8; margin-bottom: 10px; }
.feat-k span { padding: 3px 12px; border-radius: 99px; background: var(--ochre); color: #fff; }
.feat h2 { font: 700 clamp(1.7rem, 3vw, 2.6rem)/1.4 var(--display); margin-bottom: 12px; }
.feat p { opacity: .8; max-width: 62ch; }
.feat .meta { margin-top: 14px; font-size: .9rem; opacity: .6; }
.feat-go { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--paper); }
.feat-go .ic { width: 26px; height: 26px; stroke-width: 3; transition: transform .35s; }
.feat:hover .feat-go .ic { transform: translateX(-6px); }

/* the rest, as rows */
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 50px 56px minmax(0, 1fr) 170px; gap: clamp(14px, 3vw, 34px); align-items: center; padding: clamp(24px, 3.4vw, 38px) 6px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: background-color .35s; }
.row:hover { background: var(--card); }
.row-n { font: 700 1.2rem var(--display); color: var(--muted); }
.row-ic .ic { width: 46px; height: 46px; }
.row-main { display: grid; gap: 6px; }
.row-cat { font-size: .85rem; font-weight: 700; color: var(--ochre); }
.row-t { font: 700 clamp(1.35rem, 2.2vw, 1.75rem)/1.45 var(--display); }
.row-ex { color: var(--muted); max-width: 64ch; }
.row-meta { display: grid; gap: 8px; font-size: .86rem; color: var(--muted); font-weight: 600; }
.rt { display: block; height: 4px; border-radius: 2px; background: var(--paper-2); overflow: hidden; }
.rt i { display: block; height: 100%; width: calc(var(--w) * 100%); background: var(--ink); border-radius: 2px; transform-origin: right; }

@media (max-width: 900px) {
	.kb-hero { padding: 120px 0 40px; }
	.kb-top { grid-template-columns: minmax(0, 1fr); }
	.kb-copy { padding-bottom: 0; }
	.shelf { width: min(340px, 100%); }
	.shelf-books { height: 260px; gap: 4px; }
	.book { width: 48px; } .book:nth-child(2) { width: 42px; } .book:nth-child(4) { width: 54px; }
	.book-t { font-size: .95rem; }
	.kb-filter { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
	.kb-filter button { flex: none; }
	.feat { grid-template-columns: minmax(0, 1fr); }
	.feat-ic { width: 84px; }
	.feat-ic .ic { width: 44px; height: 44px; }
	.feat-go { display: none; }
	.row { grid-template-columns: 46px minmax(0, 1fr); align-items: start; }
	.row-n { display: none; }
	.row-ic .ic { width: 38px; height: 38px; }
	.row-meta { grid-column: 2; grid-template-columns: auto 60px auto; align-items: center; gap: 12px; }
}

.js .kb-title, .js .kb-hero .lead, .js .shelf { visibility: hidden; }
