/* PPS / 文章、书单、归档、分类列表 */

/* Entry / article */

.entry {
    padding-top: 46px;
}

.entry-head {
    padding-bottom: 26px;
    border-bottom: 1px dotted var(--line);
}

.entry-status {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    margin-bottom: 22px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.entry-status span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--yellow);
}

.entry-head--center {
    text-align: center;
}

.entry-kicker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.entry-kicker::before,
.entry-kicker::after {
    content: "";
    width: clamp(30px, 8vw, 94px);
    height: 1px;
    background: var(--line-strong);
}

.entry-kicker-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px 4px;
    border: 1px dotted var(--line);
    background: rgba(240, 236, 226, 0.025);
    color: var(--yellow);
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.13em;
    line-height: 1.4;
    text-transform: uppercase;
}

.entry-kicker-label i {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--yellow);
    box-shadow: 0 0 0 3px rgba(245, 227, 160, 0.12);
}

.entry-head--center h1 {
    max-width: 20ch;
    margin-inline: auto;
}

.entry-head--center .entry-dek {
    margin-inline: auto;
}

.entry-head--center .entry-meta {
    justify-content: center;
}

.entry-head h1 {
    max-width: 15ch;
    margin: 0;
    font-family: var(--sans);
    font-size: clamp(44px, 7vw, 116px);
    font-weight: 900;
    letter-spacing: -0.08em;
    line-height: 0.88;
    text-transform: uppercase;
}

.entry-dek {
    max-width: 54ch;
    margin: 22px 0 0;
    color: var(--dek);
    font-family: var(--sans);
    font-size: 19px;
    font-weight: 400;
    line-height: 1.82;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.entry-meta span + span::before,
.entry-meta time + span::before {
    content: " / ";
    color: var(--line-strong);
}

.entry-views b {
    color: var(--blue-ink);
    font-weight: 600;
}

.entry-head.entry-head--center h1 {
    max-width: 20ch;
    margin: 0 auto;
}

.entry-head.entry-head--center .entry-dek {
    margin: 22px auto 0;
}

.entry-head.entry-head--center .entry-meta {
    justify-content: center;
}

.entry-layout {
    display: grid;
    grid-template-columns: 130px minmax(0, 840px) 250px;
    gap: 32px;
    justify-content: center;
    align-items: start;
    padding-top: 38px;
}

.entry-side {
    position: sticky;
    top: 24px;
    align-self: start;
}

.side-block {
    padding: 9px 0;
    border-top: 1px dotted var(--line);
}

.side-block .eyebrow {
    display: block;
    margin-bottom: 3px;
}

.side-block strong {
    color: var(--ink);
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}

.article-body {
    color: var(--body-text);
    font-family: var(--sans);
    font-size: 18px;
    font-weight: 400;
    line-height: 2.02;
    letter-spacing: 0.01em;
}

.article-body > p {
    margin: 0 0 1.4em;
}

.article-body > p:first-of-type {
    color: var(--ink);
    font-size: 20px;
    line-height: 1.95;
}

.article-body h2 {
    margin: 2.4em 0 0.8em;
    padding: 0 0 8px;
    border: 0;
    border-bottom: 1px dotted var(--yellow);
    background: none;
    color: var(--body-text);
    font-family: var(--sans);
    font-size: var(--fs-heading);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.38;
}

.article-body blockquote h2 {
    margin: 1.4em 0 0.6em;
    padding: 0;
    border: 0;
    background: none;
    font-size: calc(var(--fs-heading) * 0.72);
}

.article-body h2:first-child {
    margin-top: 0;
}

.article-body h3 {
    margin: 1.8em 0 0.5em;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.5;
}

.article-body a {
    color: var(--yellow);
    overflow-wrap: anywhere;
    word-break: break-word;
    text-decoration-color: var(--yellow-deep);
    text-underline-offset: 3px;
}

.article-body img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.8em 0;
}

.article-body figure {
    margin: 2em 0;
}

.article-body figcaption {
    margin-top: 7px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 8px;
}

.article-body blockquote {
    position: relative;
    margin: 2.2em 0;
    padding: 22px 24px 20px 34px;
    border: 1px dotted var(--line);
    border-left: 3px dotted var(--yellow);
    border-radius: var(--radius);
    background: var(--panel);
    color: var(--body-text);
    font-family: var(--serif);
    font-size: max(15px, calc(var(--fs-article) - 1px));
    font-style: normal;
    line-height: 1.85;
}

.article-body blockquote::before {
    content: "“";
    position: absolute;
    top: 6px;
    left: 10px;
    color: var(--yellow);
    font-family: var(--serif);
    font-size: 38px;
    line-height: 1;
    opacity: 0.55;
    pointer-events: none;
}

.article-body blockquote > :first-child {
    margin-top: 0;
}

.article-body blockquote > :last-child {
    margin-bottom: 0;
}

.article-body blockquote p {
    margin: 0 0 0.8em;
}

.article-body blockquote cite,
.article-body blockquote footer {
    display: block;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dotted var(--line);
    color: var(--muted);
    font-family: var(--mono);
    font-size: var(--fs-micro);
    font-style: normal;
    letter-spacing: 0.04em;
}

.article-body blockquote cite::before,
.article-body blockquote footer::before {
    content: "— ";
    color: var(--blue);
}

.article-body blockquote a {
    color: var(--blue-ink);
    text-decoration-color: color-mix(in srgb, var(--blue) 55%, transparent);
}

.article-body blockquote pre {
    margin-top: 1em;
}

.article-body blockquote blockquote {
    margin: 1.2em 0;
    background: var(--panel-2);
}

.article-body ul,
.article-body ol {
    margin: 0 0 1.4em;
    padding-left: 1.25em;
}

.article-body li {
    margin-bottom: 0.4em;
}

.article-body hr {
    margin: 2.4em 0;
    border: 0;
    border-top: 1px dotted var(--line-strong);
}

.article-body pre {
    margin: 1.8em 0;
    padding: 16px;
    overflow: auto;
    border: 1px dotted var(--line);
    background: var(--panel-2);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.7;
}

.article-body code {
    padding: 0.08em 0.3em;
    background: var(--code-bg);
    font-family: var(--mono);
    font-size: 0.85em;
}

.article-body pre code {
    padding: 0;
    background: transparent;
}

.article-body table {
    width: 100%;
    margin: 1.8em 0;
    border-collapse: collapse;
    font-family: var(--sans);
    font-size: 12px;
}

.article-body th,
.article-body td {
    padding: 8px 9px;
    border-bottom: 1px dotted var(--line);
    text-align: left;
}

/* BookShelf on dark */

.article-body .bookinfo {
    margin: 2em 0;
    font-family: var(--sans);
    font-size: 12px;
    line-height: 1.7;
}

.article-body .bookinfo-single {
    padding: 20px;
    border: 1px dotted var(--line);
    border-radius: 0;
    background: var(--panel);
}

.article-body .bookinfo-title {
    color: var(--ink);
    font-family: var(--sans);
    font-size: 22px;
    font-weight: 700;
}

.article-body .bookinfo-summary,
.article-body .bookinfo-author-bio div {
    color: var(--ink);
    font-family: var(--serif);
    font-size: 14px;
}

.article-body .bookinfo-toc pre,
.article-body .bookinfo-post-toc {
    font-family: var(--mono);
    font-size: 10px;
}

.article-body .bookinfo-cover-large {
    width: 120px;
}

.entry-foot {
    max-width: 980px;
    margin-top: 42px;
    padding-top: 16px;
    border-top: 1px dotted var(--line-strong);
}

.entry-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 9px;
    margin-bottom: 26px;
    font-family: var(--mono);
    font-size: 8px;
}

.entry-tags a {
    padding: 3px 7px;
    border: 1px dotted var(--line);
    color: var(--muted);
    text-decoration: none;
}

.entry-tags a:hover {
    border-color: var(--yellow);
    color: var(--yellow);
}

.entry-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.entry-nav .next {
    text-align: right;
}

.entry-nav.is-single {
    grid-template-columns: minmax(0, 1fr);
}

.entry-nav.is-single .next {
    text-align: left;
}

.entry-nav a {
    display: block;
    margin-top: 6px;
    color: var(--ink);
    font-family: var(--sans);
    font-size: var(--fs-card);
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
}

.entry-nav a:hover {
    color: var(--yellow);
}

.entry-nav time {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: max(9px, var(--fs-micro));
}

/* Article sidebar */

.entry-related {
    min-width: 0;
    padding-top: 8px;
    border-top: 1px dotted var(--line-strong);
}

.related-block {
    margin-bottom: 26px;
}

.entry-related .panel-note {
    display: none;
}

.related-list,
.related-cats {
    margin: 0;
    padding: 0;
    list-style: none;
}

.related-list li {
    border-bottom: 1px dotted var(--line);
}

.related-list a {
    display: block;
    padding: 9px 0;
    text-decoration: none;
}

.related-list a:hover strong {
    color: var(--yellow);
}

.related-list span {
    display: block;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 7px;
}

.related-list strong {
    display: block;
    margin-top: 2px;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    transition: color 160ms ease;
}

.related-cats li {
    border-bottom: 1px dotted var(--line);
}

.related-cats a {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
}

.related-cats a:hover span {
    color: var(--yellow);
}

.related-cats b {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 8px;
    font-weight: 400;
}

.side-empty {
    margin: 10px 0 0;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 9px;
}

/* Archive */

.archive-head {
    padding: 48px 0 22px;
    border-bottom: 1px dotted var(--line-strong);
}

.archive-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.archive-status .archive-home-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted transparent;
    transition: color 160ms ease, border-color 160ms ease;
}

.archive-status .archive-home-link:hover,
.archive-status .archive-home-link:focus-visible {
    color: var(--yellow);
    border-color: var(--yellow);
}

.archive-status-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px 16px;
    margin-left: auto;
}

.archive-subcats {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.archive-subcats-label {
    color: var(--line-strong);
}

.archive-subcats a {
    color: var(--blue-ink);
    border-bottom: 1px dotted color-mix(in srgb, var(--blue) 45%, transparent);
    text-decoration: none;
    transition: color 160ms ease, border-color 160ms ease;
}

.archive-subcats a:hover,
.archive-subcats a:focus-visible {
    color: var(--yellow);
    border-color: var(--yellow);
}

.archive-head h1 {
    max-width: 16ch;
    margin: 20px 0 0;
    font-family: var(--sans);
    font-size: clamp(46px, 8vw, 120px);
    font-weight: 900;
    letter-spacing: -0.08em;
    line-height: 0.86;
    text-transform: uppercase;
}

.archive-intro {
    max-width: 56ch;
    margin: 16px 0 0;
    color: var(--muted);
    font-family: var(--sans);
    font-size: max(14px, calc(var(--fs-body) - 1px));
    line-height: 1.8;
}

.archive-list {
    padding-top: 0;
}

.archive-row {
    display: grid;
    grid-template-columns: 32px 90px minmax(0, 1fr) 80px;
    gap: 16px;
    align-items: baseline;
    padding: 14px 4px;
    border-bottom: 1px dotted var(--line);
}

.archive-row:hover {
    background: var(--panel);
}

.row-code,
.row-cat,
.archive-row time {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 8px;
}

.archive-row h2 {
    margin: 0;
    font-family: var(--sans);
    font-size: clamp(18px, 2.6vw, 30px);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.15;
}

.archive-row h2 a {
    text-decoration: none;
}

.archive-row h2 a:hover {
    color: var(--yellow);
}

.archive-views {
    margin-left: 8px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0;
    white-space: nowrap;
}

.archive-row time {
    text-align: right;
}

/* 通用分类：便签式信纸卡片 */
.category-paper-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 22px;
}

.category-paper {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 220px;
    padding: 27px 28px 25px;
    overflow: hidden;
    border: 1px dotted var(--line-strong);
    border-radius: var(--radius);
    background-color: var(--panel);
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 31px,
        color-mix(in srgb, var(--line) 62%, transparent) 31px,
        color-mix(in srgb, var(--line) 62%, transparent) 32px
    );
    box-shadow: 4px 5px 0 color-mix(in srgb, var(--line-strong) 55%, transparent);
    transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.category-paper::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 26px;
    width: 64px;
    height: 14px;
    background: color-mix(in srgb, var(--blue) 16%, transparent);
    transform: rotate(-2deg);
    pointer-events: none;
}

.category-paper:hover {
    border-color: var(--blue);
    transform: translateY(-3px);
    box-shadow: 6px 8px 0 color-mix(in srgb, var(--line-strong) 45%, transparent);
}

.category-paper-title {
    margin: 0 58px 11px 0;
    color: var(--ink);
    font-family: var(--sans);
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.2;
}

.category-paper-title a {
    color: inherit;
    text-decoration: none;
    transition: color 160ms ease;
}

.category-paper-title a:hover,
.category-paper-title a:focus-visible {
    color: var(--blue-ink);
}

.category-paper-date {
    color: var(--muted);
    font-family: var(--mono);
    font-size: max(9px, var(--fs-micro));
    letter-spacing: 0.08em;
}

.category-paper-excerpt {
    display: -webkit-box;
    margin: 16px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-family: var(--sans);
    font-size: max(13px, calc(var(--fs-body) - 2px));
    line-height: 1.75;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.category-paper-attachments {
    position: absolute;
    z-index: 1;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    border: 1px dotted var(--line);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--muted);
    font-family: var(--mono);
    font-size: max(9px, var(--fs-micro));
    line-height: 1;
}

.category-paper-attachments svg {
    display: block;
    width: 11px;
    height: 11px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
}

.category-paper-attachments:hover {
    color: var(--blue-ink);
    border-color: var(--blue);
}

/* 长物图库归档 */

.gallery-head {
    padding: 48px 0 22px;
    border-bottom: 1px dotted var(--line-strong);
}

.gallery-head h1 {
    max-width: 16ch;
    margin: 20px 0 0;
    font-family: var(--sans);
    font-size: clamp(46px, 8vw, 120px);
    font-weight: 900;
    letter-spacing: -0.08em;
    line-height: 0.86;
}

.gallery-grid-wrap {
    padding-top: 28px;
    padding-bottom: 38px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.gallery-card {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    border: 1px dotted var(--line-strong);
    border-radius: var(--radius);
    background: var(--panel);
    color: #f4efe3;
    text-decoration: none;
    isolation: isolate;
}

.gallery-media,
.gallery-media img,
.gallery-color,
.gallery-shade {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.gallery-media img {
    object-fit: cover;
    object-position: center center;
    transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.gallery-card:hover .gallery-media img {
    transform: scale(1.035);
}

.gallery-shade {
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(18, 18, 15, 0) 35%, rgba(18, 18, 15, 0.82) 100%),
        linear-gradient(90deg, rgba(18, 18, 15, 0.22), rgba(18, 18, 15, 0) 55%);
}

.gallery-color {
    background:
        linear-gradient(135deg,
            color-mix(in srgb, var(--yellow) var(--tile-mix, 40%), var(--blue)),
            color-mix(in srgb, var(--blue) 32%, #12120f));
}

.gallery-color::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.22;
    background-image: repeating-linear-gradient(
        135deg,
        transparent 0,
        transparent 11px,
        rgba(255, 255, 255, 0.24) 12px,
        transparent 13px
    );
}

.gallery-color b {
    position: absolute;
    right: 18px;
    bottom: 14px;
    color: rgba(255, 255, 255, 0.35);
    font-family: var(--sans);
    font-size: clamp(48px, 8vw, 112px);
    font-weight: 900;
    letter-spacing: -0.08em;
    line-height: 0.8;
}

.gallery-overlay {
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
}

.gallery-index {
    color: rgba(244, 239, 227, 0.7);
    font-family: var(--mono);
    font-size: max(9px, var(--fs-micro));
    letter-spacing: 0.08em;
}

.gallery-overlay h2 {
    margin: 8px 0 0;
    color: #f4efe3;
    font-family: var(--sans);
    font-size: clamp(17px, 1.6vw, 23px);
    font-weight: 600;
    line-height: 1.35;
    text-wrap: balance;
}

.gallery-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 12px;
    margin-top: 10px;
    color: rgba(244, 239, 227, 0.65);
    font-family: var(--mono);
    font-size: max(9px, var(--fs-micro));
}

.gallery-card:focus-visible {
    outline: 2px solid var(--yellow);
    outline-offset: 3px;
}

/* 书单 / 书架归档 */

.bookshelf-head {
    padding: 48px 0 22px;
    border-bottom: 1px dotted var(--line-strong);
}

.bookshelf-head h1 {
    max-width: 16ch;
    margin: 20px 0 0;
    font-family: var(--sans);
    font-weight: 900;
    letter-spacing: -0.08em;
    line-height: 0.86;
}

.bookshelf-wrap {
    padding-top: 28px;
    padding-bottom: 38px;
}

.bookshelf-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 38px 18px;
}

.book-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    color: var(--ink);
    text-decoration: none;
}

.book-cover {
    position: relative;
    display: block;
    overflow: visible;
    aspect-ratio: 2 / 3;
    margin-bottom: 0;
    border: 1px dotted var(--line-strong);
    border-radius: 1px 3px 3px 1px;
    background: var(--panel);
    box-shadow: 5px 7px 0 rgba(0, 0, 0, 0.22), 0 12px 24px rgba(0, 0, 0, 0.18);
    transition: transform 380ms cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 380ms ease;
}

.book-cover::before {
    content: "";
    position: absolute;
    z-index: 2;
    top: 0;
    bottom: 0;
    left: 0;
    width: 5px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.34), rgba(255, 255, 255, 0.08) 45%, rgba(0, 0, 0, 0.12));
    border-radius: 1px 0 0 1px;
    pointer-events: none;
}

.book-cover::after {
    content: "";
    position: absolute;
    right: -5px;
    bottom: -9px;
    left: -5px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line-strong) 8%, var(--line-strong) 92%, transparent);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.32);
    pointer-events: none;
}

.book-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    border-radius: 1px 3px 3px 1px;
}

.book-cover.is-placeholder {
    box-shadow: 5px 7px 0 rgba(0, 0, 0, 0.25), 0 12px 24px rgba(0, 0, 0, 0.2);
}

.book-subcategory {
    position: absolute;
    z-index: 4;
    top: 9px;
    right: 9px;
    max-width: calc(100% - 18px);
    overflow: hidden;
    padding: 3px 6px;
    border-radius: var(--radius);
    background: var(--blue);
    color: #fff;
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.book-card:hover .book-cover {
    transform: translateY(-5px) rotate(-0.7deg);
    box-shadow: 7px 12px 0 rgba(0, 0, 0, 0.26), 0 18px 30px rgba(0, 0, 0, 0.28);
}

