/* Close-up of the cork board. This file adds to shelf.css, which gives the wall, the plates, and the paper. */
.sign { margin: 6px auto 0; }

/* The board hangs on the wall: a wood frame around cork. It shows the slips or one post. */
.cork {
    margin-bottom: 54px;
    padding: 12px;
    border: 10px solid var(--ink);
    border-image: url(/images/room/cork-frame.svg) 5 / 10px repeat;
    background: url(/images/room/cork-tile.svg) 0 0 / 96px 96px;
    box-shadow: inset 2px 2px 0 #8a5f31;
}

/* Each category has one colour: its pins, headlines, and quote bars use it. */
.k-coding-agents { --k: #c0392b; --k-dark: #7d1f16; }
.k-ai-engineering { --k: #2f5d8c; --k-dark: #1d3a5f; }
.k-benchmarks { --k: #3f7a4a; --k-dark: #25503a; }
.k-builds { --k: #6b4a8c; --k-dark: #432d5e; }
.k-other { --k: #b08a30; --k-dark: #6b4f17; }
[class*="k-"] { --pin: var(--k); --pin-dark: var(--k-dark); }

.plank {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    color: #fde9cb;
    font: inherit;
    text-align: center;
    background: #7a4e29;
    border: 2px solid var(--ink);
    box-shadow: inset 0 2px 0 #a9743f, inset 0 -2px 0 #4f3119;
}

/* The slips: one group for each category. The groups fill columns from left to right, and a group stays in one column. */
.index { columns: 204px; column-gap: 12px; margin-bottom: -16px; }
.stack { display: flex; flex-direction: column; gap: 8px; padding-bottom: 16px; break-inside: avoid; }
.stack .plank::before { content: ''; flex: none; width: 6px; height: 6px; margin-right: 8px; background: var(--k); box-shadow: 0 0 0 2px var(--ink); }
.slip { display: block; width: 100%; padding: 14px 10px 6px; color: var(--k-dark); font-family: inherit; font-size: 20px; line-height: 20px; text-align: left; cursor: pointer; }
.slip:hover, .slip:focus-visible, .back:hover, .back:focus-visible, .out:hover, .out:focus-visible, .link:focus-visible { outline: 2px solid #ffdf7f; outline-offset: 2px; }
/* A Substack essay has the Substack mark in the corner of its slip. A post on X has no mark. */
.slip.substack { padding-right: 32px; }
.slip.substack::after { content: ''; position: absolute; right: 10px; top: 10px; width: 14px; height: 18px; background: url(/images/room/substack.svg) 0 0 / 100% 100% no-repeat; }

/* The post: one sheet as wide as the board, with the text in a centre column of about 70 characters and a 24px line. The plate that goes back to the slips stays in the window beside the column. */
.back { position: sticky; top: 8px; z-index: 2; width: max-content; margin-bottom: 12px; cursor: pointer; }
/* The sheet is as wide as its text column plus a margin, and sits in the middle of the board. */
.sheet { max-width: 680px; margin: 0 auto; padding: 26px 40px 20px; }
.column { max-width: 600px; margin: 0 auto; }
.paper p.meta, .paper p.subtitle, .paper p.part, .paper p.foot { color: #7a6a55; }
.sheet.substack .meta::before { content: ''; display: inline-block; width: 14px; height: 18px; margin-right: 8px; vertical-align: -4px; background: url(/images/room/substack.svg) 0 0 / 100% 100% no-repeat; }
.paper .headline { margin: 4px 0 12px; font-size: 40px; font-weight: 400; line-height: 36px; color: var(--k-dark); }
.text { line-height: 24px; overflow-wrap: break-word; }
.text p { white-space: pre-line; }
.paper p.subtitle { margin: -6px 0 14px; }
.paper .text * + * { margin-top: 12px; }
.text h4 { font-size: 20px; font-weight: 400; letter-spacing: 2px; text-transform: uppercase; color: var(--k-dark); }
.paper .text * + h4 { margin-top: 20px; }
.text .item { position: relative; padding-left: 16px; }
.text .item::before { content: '-'; position: absolute; left: 2px; }
.paper .text .item + .item { margin-top: 0; }
.paper p.part { margin: 14px 0 6px; padding-top: 8px; border-top: 2px dashed #c9bd9c; }
.quote { margin-top: 14px; padding: 8px 10px; background: #e2eef2; border: 2px solid var(--ink); box-shadow: inset 4px 0 0 var(--k); }
.quote b { display: block; margin-bottom: 4px; font-weight: 400; color: var(--k-dark); }
.paper p.links { margin-top: 12px; }
.link { display: block; overflow: hidden; line-height: 24px; color: #2f5d8c; text-decoration: underline 2px; text-underline-offset: 2px; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.paper p.foot { display: flex; flex-wrap: wrap; gap: 0 14px; margin-top: 12px; padding-top: 4px; border-top: 2px dotted #c9bd9c; }
.likes::before { content: ''; display: inline-block; width: 14px; height: 12px; margin-right: 6px; vertical-align: -2px; background: url(/images/room/heart.svg) 0 0 / 100% 100% no-repeat; }
.out { width: max-content; margin-top: 12px; cursor: pointer; }

/* Change between the slips and a post. The two pictures of the paper keep their size and the box cuts them, so the text does not stretch. */
::view-transition-group(*) { animation-duration: 300ms; animation-timing-function: cubic-bezier(0.3, 0, 0.2, 1); }
::view-transition-group(post) { overflow: clip; }
::view-transition-old(post), ::view-transition-new(post) { width: 100%; height: 100%; object-fit: none; object-position: top left; }

@media (max-width: 700px) {
    .back { position: static; }
}
