/*
 * Signal — a personal publishing dashboard
 * Typecho 1.2 theme
 */

:root {
    --bg: #12120f;
    --panel: #191915;
    --panel-2: #1f1f1a;
    --ink: #f0ece2;
    --muted: #aaa397;
    --line: rgba(240, 236, 226, 0.14);
    --line-strong: rgba(240, 236, 226, 0.32);
    --yellow: #ffe680;
    --yellow-deep: #b88900;
    --on-accent: #12120f;
    --fs-micro: 9px;
    --fs-meta: 10px;
    --fs-body: 15px;
    --fs-article: 18px;
    --fs-card: 18px;
    --fs-heading: 29px;
    --fs-kpi: 64px;
    --fs-hero: 116px;
    --blue: #3346ff;
    --blue-ink: #6674ff;
    --blue-ink-light: #3346a8;
    --yellow-ink-light: #6d5a00;
    --radius: 0px;
    --grid-line: rgba(240, 236, 226, 0.035);
    --panel-bg: rgba(25, 25, 21, 0.8);
    --inset-bg: rgba(240, 236, 226, 0.015);
    --placeholder-bg: rgba(240, 236, 226, 0.045);
    --body-text: #e3ddd1;
    --dek: #c6bfb2;
    --list-dek: #c3bcaf;
    --code-bg: rgba(240, 236, 226, 0.08);
    --green: #9bdf8f;
    --serif: "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
    --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    --gutter: clamp(20px, 3.5vw, 80px);
}

[data-theme="light"] {
    color-scheme: light;
    --bg: #e8e2d3;
    --panel: #f4efe3;
    --panel-2: #ede7d9;
    --ink: #14130e;
    --muted: #5c564b;
    --line: rgba(20, 19, 14, 0.18);
    --line-strong: rgba(20, 19, 14, 0.32);
    --grid-line: rgba(20, 19, 14, 0.07);
    --panel-bg: rgba(244, 239, 227, 0.94);
    --inset-bg: rgba(20, 19, 14, 0.03);
    --placeholder-bg: rgba(20, 19, 14, 0.05);
    --body-text: #2a2721;
    --dek: #565044;
    --list-dek: #5c564a;
    --code-bg: rgba(20, 19, 14, 0.07);
    --green: #2e7d32;
}


*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    max-width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    max-width: 100%;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background-color: var(--bg);
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 64px 64px;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: auto;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
}

::selection {
    background: var(--yellow);
    color: var(--on-accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--blue-ink);
    outline-offset: 3px;
}

.wrap {
    width: calc(100% - (2 * var(--gutter)));
    max-width: none;
    margin-inline: auto;
}

.skip {
    position: fixed;
    top: -100px;
    left: 20px;
    z-index: 100;
    padding: 8px 12px;
    background: var(--yellow);
    color: var(--on-accent);
    font-family: var(--mono);
    font-size: 10px;
    text-decoration: none;
}

.skip:focus {
    top: 12px;
}

.eyebrow {
    margin: 0;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.12em;
    line-height: 1.5;
    text-transform: uppercase;
}

.text-link {
    display: inline-block;
    padding-bottom: 3px;
    border-bottom: 1px solid var(--yellow);
    color: var(--yellow);
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.1em;
    text-decoration: none;
    text-transform: uppercase;
}

.text-link:hover {
    color: var(--ink);
    border-color: var(--ink);
}

/* Header */

.topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    width: calc(100% - (2 * var(--gutter)));
    margin-inline: auto;
    padding: 20px 0 18px;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    color: var(--ink);
    text-decoration: none;
}

.brand-text {
    font-family: var(--sans);
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: 1;
    text-transform: lowercase;
}

.brand-logo {
    display: block;
    width: auto;
    max-width: min(230px, 32vw);
    max-height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 0 1px rgba(240, 236, 226, 0.6)) drop-shadow(0 0 10px rgba(240, 236, 226, 0.18));
}

.brand.has-logo-bg .brand-logo {
    padding: 4px 7px;
    border-radius: 2px;
    background: #f0ece2;
    filter: none;
}

.brand-fallback {
    align-items: center;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: 1;
    text-transform: lowercase;
}

.brand-fallback sup {
    margin-left: 3px;
    color: var(--yellow);
    font-family: var(--mono);
    font-size: 8px;
}

.system-state {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.pulse,
.live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(155, 223, 143, 0.12);
}

.system-sep {
    color: var(--line-strong);
}

.desk-nav {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.6vw, 24px);
}

.desk-nav a {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.1em;
    text-decoration: none;
    text-transform: uppercase;
}

.desk-nav a:hover,
.desk-nav a[aria-current="page"] {
    color: var(--yellow);
}

.mobile-nav {
    display: none;
}

.status-strip {
    display: flex;
    align-items: center;
    gap: 14px;
    width: calc(100% - (2 * var(--gutter)));
    margin-inline: auto;
    padding: 7px 0;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-family: var(--mono);
    font-size: 7px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-line {
    flex: 1 1 auto;
    height: 1px;
    background: var(--line);
}

.status-strip span:first-child {
    color: var(--yellow-deep);
}

/* Hero */

.site-main {
    padding: 0;
}

.console-hero {
    border-bottom: 1px solid var(--line);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(280px, 25vw, 440px);
    gap: 54px;
    align-items: center;
    padding: 56px 0 48px;
}

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

.live {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--green);
}

.hero-copy h1 {
    margin: 0;
    font-family: var(--sans);
    font-size: clamp(50px, 8vw, 150px);
    font-weight: 900;
    letter-spacing: -0.085em;
    line-height: 0.84;
    text-transform: uppercase;
}

.hero-copy h1 span {
    display: block;
}

.hero-copy h1 .is-yellow {
    color: var(--yellow);
}

.hero-intro {
    max-width: 48ch;
    margin: 26px 0 0;
    color: var(--muted);
    font-family: var(--serif);
    font-size: 16px;
    line-height: 1.8;
}

.hero-readout {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1;
    width: 100%;
    max-width: 380px;
    border: 1px solid rgba(51, 70, 255, 0.28);
    border-radius: 50%;
    color: var(--yellow);
}

.readout-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    transform: rotate(-90deg);
    transition: transform 520ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.hero-readout:hover .readout-svg {
    transform: rotate(-90deg) scale(1.025);
}

.readout-track,
.readout-stroke {
    fill: none;
    stroke-width: 1.2;
}

.readout-track {
    stroke: rgba(51, 70, 255, 0.32);
}

.readout-stroke {
    stroke: var(--blue);
    stroke-dasharray: 289;
    stroke-dashoffset: 289;
    animation: draw-ring 1.35s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s forwards;
}

@keyframes draw-ring {
    to {
        stroke-dashoffset: 0;
    }
}

.readout-ring {
    position: absolute;
    inset: 13%;
    border: 1px dashed var(--line-strong);
    border-radius: 50%;
    animation: ring-spin 26s linear infinite;
}

.readout-ring::after {
    content: "";
    position: absolute;
    top: -3px;
    left: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--blue);
    transform: translateX(-50%);
}

@keyframes ring-spin {
    to {
        transform: rotate(360deg);
    }
}

.readout-cross {
    position: absolute;
    top: 8%;
    right: 13%;
    color: var(--blue);
    font-family: var(--mono);
    font-size: 24px;
}

.readout-label,
.readout-small {
    position: relative;
    z-index: 1;
    font-family: var(--mono);
    font-size: 7px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.readout-slides {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 100%;
    height: clamp(104px, 10vw, 142px);
    margin-top: 4px;
}

.readout-slide {
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    opacity: 0;
    transform: translateY(5px);
    pointer-events: none;
    transition: opacity 520ms ease, transform 520ms ease;
}

.readout-slide.is-active {
    opacity: 1;
    transform: translateY(0);
}

.readout-big {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--yellow);
    font-family: var(--sans);
    font-size: clamp(48px, calc(var(--fs-kpi) * 1.6), 132px);
    font-weight: 900;
    letter-spacing: -0.08em;
    line-height: 0.8;
    font-variant-numeric: tabular-nums;
}

.readout-slide--compact .readout-big {
    font-size: clamp(36px, calc(var(--fs-kpi) * 1.15), 104px);
}

.readout-small {
    margin-top: 6px;
}

.kpi-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.kpi-row.has-views {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.kpi {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    padding: 16px 18px 18px;
    border-right: 1px solid var(--line);
}

.kpi:last-child {
    border-right: 0;
}

.kpi-label {
    flex: 0 0 100%;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.kpi strong {
    flex: 0 0 100%;
    color: var(--ink);
    font-family: var(--sans);
    font-size: clamp(40px, 4.4vw, 64px);
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: 1;
}

.kpi-unit {
    flex: 0 0 auto;
    display: inline-block;
    width: max-content;
    margin-top: 4px;
    padding: 2px 6px;
    border-radius: var(--radius);
    background: var(--yellow);
    color: var(--on-accent);
    font-family: var(--mono);
    font-size: 9px;
    line-height: 1.4;
}

/* Dashboard */

.dashboard {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
    padding-top: 14px;
    padding-bottom: 38px;
}

.panel {
    position: relative;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    background: var(--panel-bg);
}

.panel::before {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    width: 7px;
    height: 7px;
    border-top: 1px solid var(--yellow);
    border-left: 1px solid var(--yellow);
}

.panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.panel-index {
    color: var(--yellow);
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.panel-note {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.activity {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    grid-column: span 7;
}

.channels {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    grid-column: span 5;
}

.activity .chart {
    flex: 1 1 auto;
    height: auto;
    min-height: 190px;
}

.channels .channel-list {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.channels .channel-list li {
    flex: 1 1 auto;
}

.board {
    grid-column: span 12;
}

.feed {
    grid-column: span 12;
}

/* Activity */

.chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 190px;
    padding: 10px 2px 0;
}

.chart-col {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    min-width: 0;
}

.chart-value {
    margin-bottom: 4px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 7px;
    opacity: 0;
    transition: opacity 160ms ease;
}

.chart-col:hover .chart-value {
    opacity: 1;
}

.chart-bar {
    display: block;
    width: 100%;
    height: var(--bar);
    min-height: 3px;
    background: var(--yellow);
    opacity: 0.9;
    animation: bar-rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) var(--delay, 0ms) both;
    transform-origin: bottom;
}

.chart-col:nth-child(3n) .chart-bar {
    background: var(--blue);
}

.chart-label {
    margin-top: 6px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 7px;
}

@keyframes bar-rise {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

/* Channels */

.channel-list {
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.channel-list li {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) 34px;
    gap: 12px;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}

.channel-name {
    overflow: hidden;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.channel-track {
    display: block;
    width: 100%;
    height: 8px;
    background: rgba(240, 236, 226, 0.06);
}

.channel-track i {
    display: block;
    width: var(--width);
    height: 100%;
    background: var(--yellow);
    animation: grow-bar 720ms cubic-bezier(0.2, 0.7, 0.2, 1) var(--delay, 0ms) both;
    transform-origin: left;
}

@keyframes grow-bar {
    from { width: 0; }
    to { width: var(--width); }
}

.channel-list li:nth-child(2n) .channel-track i {
    background: var(--blue);
}

.channel-count {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 8px;
    text-align: right;
}

/* Board */

.board-columns {
    display: grid;
    grid-template-columns: repeat(var(--board-cols, 3), minmax(0, 1fr));
    gap: 12px;
}

.board-col {
    min-width: 0;
    padding: 0 10px 10px;
    border: 1px solid var(--line);
    background: var(--inset-bg);
}

.board-col > header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin: 0 -10px;
    padding: 9px 10px;
    border-bottom: 1px solid var(--line);
}

.board-col h2 {
    margin: 0;
    overflow: hidden;
    color: var(--yellow);
    font-family: var(--sans);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-col header span {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 7px;
}

.board-col h2 a {
    display: inline-block;
    color: inherit;
    text-decoration: none;
    text-underline-offset: 3px;
    transition: color 160ms ease;
}

.board-col h2 a:hover,
.board-col h2 a:focus-visible {
    color: var(--blue-ink);
    text-decoration: underline;
    text-decoration-thickness: 1px;
}

.board-card {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
}

.board-card:last-child {
    border-bottom: 0;
}

.board-card:hover strong {
    color: var(--yellow);
}

.board-meta {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 8px;
}

.board-meta i {
    color: var(--line-strong);
    font-style: normal;
}

.board-card strong {
    display: block;
    font-family: var(--sans);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.55;
    transition: color 160ms ease;
}

.board-dek {
    display: -webkit-box;
    margin-top: 6px;
    overflow: hidden;
    color: var(--list-dek);
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.7;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.board-empty {
    margin: 14px 0;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 8px;
}

/* Feed */

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

.feed-item {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
}

.feed-item:last-child {
    border-bottom: 0;
}

.feed-media {
    display: block;
    width: 46px;
    height: 46px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--panel-2);
}

.feed-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feed-media-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    border-style: dashed;
    background: var(--placeholder-bg);
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
}

.feed-media-empty span::before {
    content: "+";
    color: var(--muted);
    font-size: 14px;
    font-weight: 400;
}

.feed-copy {
    min-width: 0;
}

.feed-title {
    display: block;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.5;
    transition: color 160ms ease;
}

.feed-item:hover .feed-title {
    color: var(--yellow);
}

.feed-meta {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.03em;
}

.feed-meta i {
    color: var(--line-strong);
    font-style: normal;
}

.feed-dek {
    display: -webkit-box;
    margin-top: 5px;
    overflow: hidden;
    color: var(--list-dek);
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.7;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* Entry / article */

.entry {
    padding-top: 46px;
}

.entry-head {
    padding-bottom: 26px;
    border-bottom: 1px solid 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 solid 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-cover {
    max-width: 1200px;
    margin-top: 26px;
    padding: 20px;
    border: 1px solid var(--line);
    background: var(--panel);
}

.entry-cover img {
    display: block;
    width: 100%;
    max-height: 640px;
    object-fit: contain;
}

.entry-cover figcaption {
    margin-top: 8px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 7px;
    text-align: right;
    text-transform: uppercase;
}

.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 solid 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.2em 0 0.6em;
    padding-top: 0.45em;
    border-top: 1px solid var(--line-strong);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 29px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.38;
}

.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);
    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 {
    margin: 2em 0;
    padding: 2px 0 2px 22px;
    border-left: 3px solid var(--yellow);
    color: var(--yellow);
    font-family: var(--serif);
    font-size: 22px;
    font-style: italic;
    line-height: 1.6;
}

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

.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 solid var(--line-strong);
}

.article-body pre {
    margin: 1.8em 0;
    padding: 16px;
    overflow: auto;
    border: 1px solid 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 solid 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 solid 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 solid 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 solid 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 solid 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 solid 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 solid 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 solid var(--line-strong);
}

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

.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 solid 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;
}

.archive-row.has-thumb {
    grid-template-columns: 32px 80px 56px minmax(0, 1fr) 80px;
    align-items: center;
}

.archive-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--placeholder-bg);
    flex: none;
}

.archive-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.archive-thumb.is-empty {
    border-style: dashed;
}

.archive-thumb.is-empty::before {
    content: "+";
    color: var(--muted);
    font-family: var(--mono);
    font-size: 14px;
}

/* 长物图库归档 */

.gallery-head {
    padding: 48px 0 22px;
    border-bottom: 1px solid 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 solid 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;
    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 solid 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(5, 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: 15px;
    border: 1px solid 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;
    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-number {
    position: absolute;
    z-index: 3;
    top: 9px;
    right: 9px;
    color: rgba(244, 239, 227, 0.7);
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.08em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.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);
}

.book-copy {
    display: block;
    min-width: 0;
}

.book-copy strong {
    display: -webkit-box;
    overflow: hidden;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.book-card:hover strong {
    color: var(--blue-ink);
}

.book-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 10px;
    margin-top: 5px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.03em;
}

/* Top views */

.top-views {
    grid-column: span 12;
}

.top-views-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.top-view-column {
    min-width: 0;
}

.top-view-column > header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line-strong);
}

.top-view-column h3 {
    margin: 0;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.top-view-column header span {
    color: var(--muted);
    font-family: var(--mono);
    font-size: max(9px, var(--fs-micro));
    letter-spacing: 0.08em;
}

.top-view-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.top-view-list li {
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: baseline;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}

.top-view-rank {
    color: var(--muted);
    font-family: var(--mono);
    font-size: max(9px, var(--fs-micro));
}

.top-view-copy {
    min-width: 0;
}

.top-view-copy a {
    display: block;
    overflow: hidden;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-view-copy a:hover {
    color: var(--blue-ink);
}

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

.top-view-count {
    color: var(--ink);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.top-view-empty {
    margin: 14px 0 0;
    color: var(--muted);
    font-family: var(--mono);
    font-size: max(9px, var(--fs-micro));
}

/* Chronicle archive */

.chronicle-hero {
    padding: 48px 0 30px;
    border-bottom: 1px solid var(--line-strong);
}

.chronicle-kicker {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px 4px;
    border: 1px solid var(--line);
    color: var(--blue-ink);
    font-family: var(--mono);
    font-size: max(9px, var(--fs-micro));
    letter-spacing: 0.12em;
    line-height: 1.4;
    text-transform: uppercase;
}

.chronicle-hero-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 30px;
    align-items: end;
    margin-top: 24px;
}

.chronicle-hero h1 {
    margin: 0;
    font-family: var(--sans);
    font-size: clamp(44px, 7vw, var(--fs-hero));
    font-weight: 900;
    letter-spacing: -0.08em;
    line-height: 0.82;
    text-transform: uppercase;
}

.chronicle-hero-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    padding-bottom: 5px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: max(9px, var(--fs-meta));
    letter-spacing: 0.1em;
    text-align: right;
    white-space: nowrap;
}

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

.chronicle {
    padding-top: 0;
}

.chronicle-year {
    padding: 24px 0 30px;
    border-bottom: 1px solid var(--line-strong);
}

.chronicle-year-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 18px;
}

.chronicle-year-number {
    color: var(--ink);
    font-family: var(--sans);
    font-size: calc(var(--fs-hero) * 0.4);
    font-weight: 900;
    letter-spacing: -0.07em;
    line-height: 0.82;
}

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

.chronicle-month {
    display: grid;
    grid-template-columns: 90px 24px minmax(0, 1fr);
    align-items: stretch;
}

.chronicle-scale {
    padding: 3px 12px 0 0;
    text-align: right;
}

.chronicle-month-num {
    display: block;
    color: var(--blue-ink);
    font-family: var(--mono);
    font-size: calc(var(--fs-card) * 1.05);
    font-weight: 600;
    line-height: 1;
}

.chronicle-month-name {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: max(9px, var(--fs-micro));
    letter-spacing: 0.1em;
}

.chronicle-axis {
    position: relative;
    min-height: 40px;
}

.chronicle-axis::before {
    content: "";
    position: absolute;
    top: 2px;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: var(--line-strong);
}

.chronicle-month:last-child .chronicle-axis::before {
    bottom: 24px;
}

.chronicle-node {
    position: absolute;
    top: 4px;
    left: 50%;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 12%, transparent);
    transform: translateX(-50%);
    z-index: 1;
}

.chronicle-content {
    min-width: 0;
    padding: 0 0 22px 20px;
}

.chronicle-month-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-family: var(--mono);
    font-size: max(9px, var(--fs-micro));
    letter-spacing: 0.1em;
}

.chronicle-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.chronicle-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 138px;
    padding: 13px 14px 14px;
    border: 1px solid var(--line);
    background: var(--panel-bg);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color 160ms ease, background-color 160ms ease;
}

.chronicle-card:hover {
    border-color: var(--blue-ink);
    background: var(--panel-2);
}

.chronicle-card-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: max(9px, var(--fs-meta));
    letter-spacing: 0.04em;
}

.chronicle-card-top span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chronicle-card h3 {
    margin: 10px 0 6px;
    color: var(--ink);
    font-family: var(--sans);
    font-size: var(--fs-card);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.45;
    transition: color 160ms ease;
}

.chronicle-card p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--list-dek);
    font-family: var(--sans);
    font-size: max(12px, calc(var(--fs-article) - 6px));
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.chronicle-card-arrow {
    position: absolute;
    right: 13px;
    bottom: 10px;
    color: var(--blue-ink);
    font-family: var(--mono);
    font-size: max(9px, var(--fs-micro));
    opacity: 0;
    transform: translateX(-3px);
    transition: opacity 160ms ease, transform 160ms ease;
}

.chronicle-card:hover h3,
.chronicle-card:hover .chronicle-card-arrow {
    color: var(--blue-ink);
}

.chronicle-card:hover .chronicle-card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Archive page */

.year-list {
    padding-top: 8px;
}

.year-block {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 24px;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
}

.year-block h2 {
    margin: 0;
    color: var(--yellow);
    font-family: var(--sans);
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -0.06em;
    line-height: 0.9;
}

.year-block ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.year-block li {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: baseline;
    padding: 4px 0;
}

.year-block time {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 8px;
}

.year-block li a {
    color: var(--ink);
    font-family: var(--sans);
    font-size: 14px;
    text-decoration: none;
}

.year-block li a:hover {
    color: var(--yellow);
}

.year-block li span {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 7px;
    text-transform: uppercase;
}

/* Pager */

.pager {
    margin-top: 36px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    text-align: center;
}

.page-navigator {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.page-navigator li a,
.page-navigator li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    color: var(--muted);
    font-family: var(--mono);
    font-size: 9px;
    line-height: 1;
    text-decoration: none;
    transition: border-color 220ms ease, color 220ms ease, background 220ms ease;
}

.page-navigator li > span {
    border-color: transparent;
    background: transparent;
    min-width: 18px;
    padding: 0 2px;
}

.page-navigator li a:hover {
    border-color: var(--yellow);
    color: var(--yellow);
}

.page-navigator li.current a {
    background: var(--yellow);
    border-color: var(--yellow);
    color: var(--on-accent);
}

.page-navigator li.next a,
.page-navigator li.prev a {
    padding: 0 12px;
    color: var(--ink);
}

/* Comments */

.comments {
    max-width: 930px;
    margin: 50px auto 0;
    padding: 16px;
    border: 1px solid var(--line);
    background: var(--panel);
}

.comments .panel-head {
    margin-bottom: 18px;
}

.comment-list ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.comment-list .comment-body {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.comment-list .comment-author {
    color: var(--ink);
    font-family: var(--sans);
    font-size: 13px;
}

.comment-list .comment-meta {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 7px;
}

.comment-list .comment-content {
    margin-top: 5px;
    color: var(--body-text);
    font-family: var(--serif);
    font-size: 13px;
}

.comment-list .comment-reply a {
    color: var(--yellow);
    font-family: var(--mono);
    font-size: 8px;
    text-decoration: none;
}

.comment-list .children {
    margin-left: 22px;
    padding-left: 12px;
    border-left: 1px solid var(--line);
}

.comment-pager {
    margin-bottom: 20px;
}

.respond h2 {
    margin: 0 0 15px;
    font-family: var(--sans);
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
}

.comment-form label {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.06em;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 0;
    outline: 0;
    background: var(--panel-2);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 13px;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--yellow);
}

.comment-form textarea {
    min-height: 120px;
    resize: vertical;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.form-grid p {
    margin: 0;
}

.comment-form p {
    margin: 0 0 12px;
}

.submit-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.btn {
    display: inline-block;
    padding: 8px 13px;
    border: 1px solid var(--yellow);
    background: var(--yellow);
    color: var(--on-accent);
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
}

.btn:hover {
    border-color: var(--ink);
    background: transparent;
    color: var(--ink);
}

.submit-row span,
.login-note,
.closed {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 8px;
}

/* Empty / 404 */

.empty,
.error {
    padding: 60px 0 90px;
}

.error h1,
.empty h1 {
    max-width: 14ch;
    margin: 16px 0 14px;
    font-family: var(--sans);
    font-size: clamp(38px, 6vw, 80px);
    font-weight: 900;
    letter-spacing: -0.07em;
    line-height: 0.95;
    text-transform: uppercase;
}

.error p,
.empty p {
    max-width: 50ch;
    color: var(--muted);
    font-family: var(--serif);
    font-size: 16px;
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 24px;
}

.empty h2 {
    margin: 0 0 10px;
    font-family: var(--sans);
    font-size: 28px;
}

/* Footer */

.site-foot {
    margin-top: 56px;
    border-top: 1px solid var(--line-strong);
}

.foot-top {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    padding: 34px var(--gutter) 28px;
}

.foot-title {
    display: flex;
    align-items: center;
    margin: 7px 0 7px;
    color: var(--yellow);
    font-family: var(--sans);
    font-size: clamp(30px, 4vw, 52px);
    font-weight: 900;
    letter-spacing: -0.06em;
    line-height: 0.9;
    text-transform: uppercase;
}

.foot-logo {
    display: block;
    width: auto;
    max-width: min(300px, 40vw);
    max-height: 54px;
    object-fit: contain;
    filter: drop-shadow(0 0 1px rgba(240, 236, 226, 0.6)) drop-shadow(0 0 10px rgba(240, 236, 226, 0.18));
}

.foot-logo.has-logo-bg {
    padding: 4px 7px;
    border-radius: 2px;
    background: #f0ece2;
    filter: none;
}

.foot-logo-fallback {
    display: inline-flex;
    align-items: center;
}

.foot-logo-fallback[hidden] {
    display: none;
}

.foot-logo-fallback sup {
    margin-left: 3px;
    color: var(--yellow);
    font-family: var(--mono);
    font-size: 9px;
}

.foot-note {
    max-width: 46ch;
    margin: 0;
    color: var(--muted);
    font-family: var(--serif);
    font-size: 13px;
    line-height: 1.8;
}

.foot-code {
    display: grid;
    grid-template-columns: repeat(2, 60px);
    grid-template-rows: repeat(2, 60px);
    align-self: end;
}

.foot-code span {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    color: var(--yellow);
    font-family: var(--mono);
    font-size: 20px;
}

.foot-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.4fr;
    gap: 34px;
    padding-top: 20px;
    padding-bottom: 26px;
    border-top: 1px solid var(--line);
}

.foot-grid nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: 7px;
}

.foot-grid a {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 9px;
    text-decoration: none;
}

.foot-grid a:hover {
    color: var(--yellow);
}

.foot-meta p {
    margin: 0 0 8px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 8px;
    line-height: 1.7;
}

/* Mobile */

@media (max-width: 1100px) {
    .topbar {
        grid-template-columns: auto 1fr auto;
        gap: 16px;
    }

    .system-state {
        justify-self: center;
        font-size: 7px;
    }

    .system-state span:nth-last-child(-n+2) {
        display: none;
    }

    .desk-nav {
        display: none;
    }

    .mobile-nav {
        display: block;
        position: relative;
        justify-self: end;
    }

    .mobile-nav summary {
        display: flex;
        flex-direction: column;
        gap: 5px;
        width: 26px;
        padding: 5px 0;
        cursor: pointer;
        list-style: none;
    }

    .mobile-nav summary::-webkit-details-marker {
        display: none;
    }

    .mobile-nav summary span {
        display: block;
        width: 24px;
        height: 1px;
        background: var(--ink);
    }

    .mobile-nav[open] summary span:first-child {
        transform: translateY(3px) rotate(45deg);
    }

    .mobile-nav[open] summary span:nth-child(2) {
        opacity: 0;
    }

    .mobile-nav[open] summary span:last-child {
        transform: translateY(-3px) rotate(-45deg);
    }

    .mobile-panel {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        z-index: 30;
        width: min(260px, calc(100vw - 40px));
        padding: 14px;
        border: 1px solid var(--line-strong);
        background: var(--panel);
        box-shadow: 7px 7px 0 var(--yellow);
    }

    .mobile-panel nav {
        display: flex;
        flex-direction: column;
        gap: 9px;
    }

    .mobile-panel a {
        color: var(--ink);
        font-family: var(--sans);
        font-size: 18px;
        font-weight: 700;
        text-decoration: none;
        text-transform: uppercase;
    }

    .mobile-panel a:hover,
    .mobile-panel a[aria-current="page"] {
        color: var(--blue-ink);
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .entry-layout {
        grid-template-columns: 120px minmax(0, 1fr);
    }

    .entry-related {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 22px;
        margin-top: 10px;
        padding-top: 18px;
    }

    .hero-readout {
        justify-self: start;
        width: 260px;
    }

    .activity,
    .channels,
    .board,
    .feed {
        grid-column: span 12;
    }

    .board {
        grid-column: span 12;
    }

    .feed {
        grid-column: span 12;
    }
}

@media (max-width: 760px) {
    :root {
        --gutter: 18px;
    }

    .status-strip {
        display: none;
    }

    .topbar {
        grid-template-columns: 1fr auto 1fr;
        padding: 14px 0;
    }

    .topbar > .brand {
        grid-column: 2;
        justify-self: center;
    }

    .topbar > .mobile-nav {
        grid-column: 3;
        justify-self: end;
    }

    .system-state {
        display: none;
    }

    .brand-text {
        font-size: 22px;
    }

    .brand-logo {
        max-height: 36px;
        max-width: 180px;
    }

    .site-main {
        padding-top: 0;
    }

    .console-hero {
        display: block;
    }

    .hero-grid {
        display: block;
        padding: 16px 0 10px;
    }

    .hero-copy {
        display: none;
    }

    .hero-readout {
        width: min(190px, 52vw);
        max-width: 190px;
        margin: 0 auto;
    }

    .readout-slides {
        height: 72px;
        margin-top: 2px;
    }

    .readout-big {
        font-size: clamp(30px, calc(var(--fs-kpi) * 0.6), 48px);
    }

    .readout-slide--compact .readout-big {
        font-size: clamp(22px, calc(var(--fs-kpi) * 0.42), 34px);
    }

    .readout-label,
    .readout-small {
        font-size: 9px;
    }

    .readout-cross {
        font-size: 17px;
    }

    .kpi-row {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        padding: 0;
    }

    .kpi {
        grid-column: span 2;
        padding: 12px 10px 13px;
        border-right: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
    }

    .kpi:nth-child(3n) {
        border-right: 0;
    }

    .kpi:nth-child(4),
    .kpi:nth-child(5) {
        grid-column: span 3;
        border-top: 1px solid var(--line);
        border-bottom: 0;
    }

    .kpi:nth-child(4) {
        border-right: 1px solid var(--line);
    }

    .kpi:nth-child(5) {
        border-right: 0;
    }

    .kpi-row.has-views .kpi,
    .kpi-row.has-views .kpi:nth-child(4),
    .kpi-row.has-views .kpi:nth-child(5) {
        grid-column: span 2;
    }

    .kpi-row.has-views .kpi:nth-child(n+4) {
        border-top: 1px solid var(--line);
        border-bottom: 0;
    }

    .kpi-row.has-views .kpi:nth-child(5) {
        border-right: 1px solid var(--line);
    }

    .kpi strong {
        font-size: clamp(26px, 7vw, 34px);
    }

    .kpi-label {
        font-size: 8px;
    }

    .kpi-unit {
        font-size: 9px;
    }

    .dashboard {
        display: block;
        padding-top: 14px;
        padding-bottom: 24px;
    }

    .activity,
    .channels,
    .board {
        display: none;
    }

    .feed {
        padding: 0;
        border: 0;
        background: transparent;
    }

    .feed::before {
        display: none;
    }

    .feed .panel-head {
        margin-bottom: 6px;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--line-strong);
    }

    .feed .panel-index {
        display: none;
    }

    .feed .panel-note {
        color: var(--yellow);
    }

    .feed-list {
        display: block;
    }

    .feed-item {
        display: block;
        padding: 20px 0;
        border-bottom: 1px solid var(--line-strong);
    }

    .feed-item:first-child {
        padding-top: 14px;
    }

    .feed-media {
        display: block;
        width: 100%;
        height: auto;
        margin-bottom: 10px;
        border: 0;
        background: transparent;
    }

    .feed-media-empty {
        display: none;
    }

    .feed-media img {
        display: block;
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    .feed-title {
        font-size: 22px;
        line-height: 1.2;
    }

    .feed-meta {
        margin-top: 5px;
        font-size: 8px;
    }

    .feed-dek {
        display: -webkit-box;
        margin-top: 7px;
        color: var(--muted);
        font-family: var(--serif);
        font-size: 14px;
        line-height: 1.65;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 4;
    }

    .entry {
        padding-top: 20px;
    }

    .entry-status {
        display: none;
    }

    .entry-head {
        display: flex;
        flex-direction: column;
        padding-bottom: 18px;
    }

    .entry-kicker {
        gap: 10px;
        margin-bottom: 16px;
    }

    .entry-kicker::before,
    .entry-kicker::after {
        width: 26px;
    }

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

    .entry-head h1 {
        order: 1;
        font-size: 34px;
        letter-spacing: -0.045em;
        line-height: 1.16;
    }

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

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

    .entry-meta {
        order: 2;
        justify-content: center;
        margin-top: 10px;
        font-size: 8px;
    }

    .entry-meta [itemprop="author"] {
        display: none;
    }

    .entry-dek {
        order: 3;
        margin: 10px auto 0;
        font-size: 16px;
        line-height: 1.8;
    }

    .entry-cover {
        padding: 0;
        border: 0;
        background: transparent;
    }

    .entry-cover img {
        width: 100%;
        max-height: none;
        height: auto;
        object-fit: contain;
    }

    .entry-layout {
        display: block;
        padding-top: 22px;
    }

    .entry-related {
        display: block;
        margin-top: 26px;
        padding-top: 18px;
    }

    .entry-side {
        display: none;
    }

    .article-body {
        font-size: 17px;
        line-height: 1.95;
    }

    .article-body > p:first-of-type {
        font-size: 18px;
        line-height: 1.9;
    }

    .article-body h2 {
        font-size: 23px;
    }

    .article-body img {
        width: 100%;
        height: auto;
    }

    .gallery-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .gallery-overlay {
        padding: 14px;
    }

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

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

    .archive-head {
        padding-top: 30px;
    }

    .archive-head h1 {
        font-size: 42px;
    }

    .archive-intro {
        margin-top: 12px;
        font-size: max(13px, calc(var(--fs-body) - 2px));
    }

    .archive-row {
        grid-template-columns: 24px minmax(0, 1fr);
        gap: 8px;
        padding: 12px 2px;
    }

    .archive-row.has-thumb {
        grid-template-columns: 24px 56px minmax(0, 1fr);
        align-items: center;
    }

    .archive-row .row-cat,
    .archive-row time {
        display: none;
    }

    .top-views-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .gallery-head {
        padding-top: 30px;
    }

    .gallery-head h1 {
        font-size: 42px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bookshelf-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .top-view-copy a {
        font-size: 14px;
    }

    .chronicle-hero {
        padding: 30px 0 22px;
    }

    .chronicle-kicker {
        font-size: max(9px, var(--fs-micro));
    }

    .chronicle-hero-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        margin-top: 16px;
    }

    .chronicle-hero h1 {
        font-size: clamp(32px, 9vw, var(--fs-hero));
    }

    .chronicle-hero-meta {
        flex-direction: row;
        align-items: baseline;
        justify-content: space-between;
        padding-bottom: 0;
        font-size: max(9px, var(--fs-meta));
        text-align: left;
    }

    .chronicle-intro {
        margin-top: 12px;
        font-size: max(13px, calc(var(--fs-body) - 2px));
    }

    .chronicle-year {
        padding: 18px 0 22px;
    }

    .chronicle-year-head {
        gap: 10px;
        padding-bottom: 12px;
    }

    .chronicle-year-number {
        font-size: max(28px, calc(var(--fs-hero) * 0.3));
    }

    .chronicle-year-count {
        font-size: max(9px, var(--fs-micro));
    }

    .chronicle-month {
        grid-template-columns: 48px 14px minmax(0, 1fr);
    }

    .chronicle-scale {
        padding: 2px 7px 0 0;
    }

    .chronicle-month-num {
        font-size: max(15px, calc(var(--fs-card) * 0.85));
    }

    .chronicle-month-name {
        font-size: max(9px, var(--fs-micro));
    }

    .chronicle-content {
        padding: 0 0 16px 8px;
    }

    .chronicle-month-head {
        font-size: max(9px, var(--fs-micro));
    }

    .chronicle-cards {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        margin-top: 8px;
    }

    .chronicle-card {
        min-height: 0;
        padding: 11px 12px 12px;
    }

    .chronicle-card h3 {
        margin-top: 7px;
        font-size: var(--fs-card);
    }

    .chronicle-card p {
        font-size: max(12px, calc(var(--fs-article) - 6px));
    }

    .year-block {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .year-block h2 {
        font-size: 30px;
    }

    .year-block li {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .year-block li span {
        display: none;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .foot-top {
        padding: 24px var(--gutter) 20px;
    }

    .foot-code {
        display: none;
    }

    .foot-grid {
        grid-template-columns: 1fr 1fr;
        gap: 22px;
    }

    .foot-meta {
        grid-column: 1 / -1;
    }

    .comments {
        margin-top: 34px;
        padding: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .chart-bar,
    .channel-track i,
    .readout-stroke,
    .readout-ring {
        animation: none;
    }

    .readout-stroke {
        stroke-dashoffset: 0;
    }

    .hero-readout:hover .readout-svg {
        transform: rotate(-90deg);
    }

    .readout-slide {
        transition: none;
    }

    .gallery-media img {
        transition: none;
    }

    .gallery-card:hover .gallery-media img {
        transform: none;
    }

    .book-cover,
    .book-card:hover .book-cover {
        transform: none;
        transition: none;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}


/* Secondary accent and link system */

.article-body a,
.text-link,
.desk-nav a:hover,
.desk-nav a[aria-current="page"],
.feed-item:hover .feed-title,
.board-card:hover strong,
.entry-nav a:hover,
.archive-row h2 a:hover,
.year-block li a:hover,
.related-list a:hover strong,
.related-cats a:hover span,
.foot-grid a:hover,
.entry-tags a:hover,
.comment-list .comment-reply a {
    color: var(--blue-ink);
}

.article-body a {
    text-decoration-color: var(--blue-ink);
}

.text-link {
    border-bottom-color: var(--blue-ink);
}

.board-col h2 a:hover,
.board-col h2 a:focus-visible {
    color: var(--blue-ink);
}

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

/* Rounded borders (0px keeps the original sharp look) */

.panel,
.feed-media,
.feed-media-empty,
.entry-kicker-label,
.entry-cover,
.entry-tags a,
.btn,
.comments,
.comment-form input,
.comment-form textarea,
.page-navigator li a,
.page-navigator li span,
.mobile-panel,
.skip,
.article-body pre,
.article-body .bookinfo-single,
.archive-thumb {
    border-radius: var(--radius);
}

.chart-bar {
    border-radius: var(--radius) var(--radius) 0 0;
}

/* Light theme text and accent adjustments */

[data-theme="light"] .hero-readout,
[data-theme="light"] .status-strip span:first-child,
[data-theme="light"] .readout-big,
[data-theme="light"] .panel-index,
[data-theme="light"] .entry-kicker-label,
[data-theme="light"] .board-col h2,
[data-theme="light"] .year-block h2,
[data-theme="light"] .foot-title,
[data-theme="light"] .article-body blockquote {
    color: var(--yellow-ink-light);
}

[data-theme="light"] .entry-kicker-label i {
    background: var(--yellow-ink-light);
    box-shadow: 0 0 0 3px rgba(109, 90, 0, 0.14);
}

[data-theme="light"] .brand-fallback sup,
[data-theme="light"] .foot-logo-fallback sup {
    color: var(--yellow-ink-light);
}

[data-theme="light"] a:focus-visible,
[data-theme="light"] button:focus-visible,
[data-theme="light"] input:focus-visible,
[data-theme="light"] textarea:focus-visible,
[data-theme="light"] summary:focus-visible {
    outline-color: var(--blue-ink-light);
}

[data-theme="light"] .mobile-panel a:hover,
[data-theme="light"] .mobile-panel a[aria-current="page"],
[data-theme="light"] .article-body a,
[data-theme="light"] .text-link,
[data-theme="light"] .desk-nav a:hover,
[data-theme="light"] .desk-nav a[aria-current="page"],
[data-theme="light"] .feed-item:hover .feed-title,
[data-theme="light"] .board-card:hover strong,
[data-theme="light"] .board-col h2 a:hover,
[data-theme="light"] .board-col h2 a:focus-visible,
[data-theme="light"] .entry-nav a:hover,
[data-theme="light"] .archive-row h2 a:hover,
[data-theme="light"] .year-block li a:hover,
[data-theme="light"] .related-list a:hover strong,
[data-theme="light"] .related-cats a:hover span,
[data-theme="light"] .foot-grid a:hover,
[data-theme="light"] .entry-tags a:hover,
[data-theme="light"] .comment-list .comment-reply a {
    color: var(--blue-ink-light);
}

[data-theme="light"] .article-body a {
    text-decoration-color: var(--blue-ink-light);
}

[data-theme="light"] .text-link {
    border-bottom-color: var(--blue-ink-light);
}

[data-theme="light"] .entry-tags a:hover {
    border-color: var(--blue-ink-light);
}

[data-theme="light"] .top-view-copy a:hover {
    color: var(--blue-ink-light);
}

[data-theme="light"] .chronicle-kicker,
[data-theme="light"] .chronicle-month-num,
[data-theme="light"] .chronicle-card-arrow,
[data-theme="light"] .chronicle-card:hover h3 {
    color: var(--blue-ink-light);
}

[data-theme="light"] .chronicle-card:hover {
    border-color: var(--blue-ink-light);
}

[data-theme="light"] .panel::before {
    border-color: var(--yellow-ink-light);
}

[data-theme="light"] .brand-logo,
[data-theme="light"] .foot-logo {
    filter: drop-shadow(0 0 1px rgba(23, 22, 16, 0.55)) drop-shadow(0 0 8px rgba(23, 22, 16, 0.12));
}

[data-theme="light"] .brand.has-logo-bg .brand-logo,
[data-theme="light"] .foot-logo.has-logo-bg {
    filter: none;
}

[data-theme="light"] .readout-stroke {
    stroke: var(--blue);
}

/* Chronicle card density */

@media (min-width: 1500px) {
    .chronicle-cards {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .chronicle-card {
        min-height: 126px;
    }
}

@media (min-width: 1100px) and (max-width: 1499px) {
    .chronicle-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Typography scale */

body {
    font-size: var(--fs-body);
}

.system-state,
.status-strip,
.readout-label,
.readout-small,
.readout-cross,
.chart-label,
.chart-value,
.channel-count,
.panel-index,
.panel-note,
.kpi-label,
.kpi-unit,
.board-meta,
.board-empty,
.board-col header span,
.entry-status,
.entry-kicker-label,
.entry-tags,
.side-block .eyebrow,
.eyebrow,
.archive-status,
.row-code,
.row-cat,
.archive-row time,
.year-block time,
.year-block li span,
.pager,
.page-navigator li a,
.page-navigator li span,
.comment-list .comment-meta,
.comment-list .comment-reply a,
.login-note,
.closed,
.submit-row span,
.comment-form label,
.related-cats b,
.brand-fallback sup,
.entry-cover figcaption,
.article-body figcaption,
.btn,
.foot-meta p {
    font-size: max(9px, var(--fs-micro));
}

.feed-meta,
.hero-meta,
.entry-meta,
.related-list span,
.desk-nav a,
.foot-grid a,
.entry-kicker {
    font-size: max(10px, var(--fs-meta));
}

.feed-meta,
.entry-meta,
.related-list span {
    line-height: 1.55;
}

.kpi strong {
    font-size: clamp(36px, 4.4vw, var(--fs-kpi));
}

.board-col h2,
.board-card strong,
.feed-title {
    font-size: var(--fs-card);
}

.entry-head h1 {
    font-size: clamp(44px, 7vw, var(--fs-hero));
}

.entry-dek {
    font-size: calc(var(--fs-article) + 1px);
}

.article-body {
    font-size: var(--fs-article);
}

.article-body h2 {
    font-size: var(--fs-heading);
}

.article-body h3 {
    font-size: calc(var(--fs-heading) * 0.72);
}

@media (max-width: 760px) {
    .feed-title {
        font-size: max(22px, var(--fs-card));
    }

    .entry-head h1 {
        font-size: max(34px, calc(var(--fs-hero) * 0.3));
    }

    .entry-dek {
        font-size: max(16px, calc(var(--fs-article) - 2px));
    }

    .article-body {
        font-size: max(17px, var(--fs-article));
    }

    .article-body h2 {
        font-size: max(23px, calc(var(--fs-heading) * 0.8));
    }
}

@media print {
    .topbar,
    .status-strip,
    .site-foot,
    .entry-nav,
    .comments,
    .pager {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    .entry-layout {
        display: block;
    }

    .entry-side {
        display: none;
    }

    .article-body {
        color: #000;
    }
}

@media (max-width: 760px) {
    .gallery-grid-wrap {
        padding-top: 24px;
    }

    .bookshelf-wrap {
        padding-top: 24px;
    }

    .bookshelf-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 30px 14px;
    }

    .book-cover {
        margin-bottom: 12px;
    }

    .book-copy strong {
        font-size: 13px;
    }

    .gallery-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* Pager: final responsive refinement */

.pager {
    margin-top: 36px;
    padding-top: 18px;
}

.pager .page-navigator li a,
.pager .page-navigator li span {
    font-size: 9px;
    color: var(--muted);
}

.pager .page-navigator li.next a,
.pager .page-navigator li.prev a {
    color: var(--ink);
}

.pager .page-navigator li.current a {
    color: var(--on-accent);
}

.pager .page-navigator li > span {
    color: var(--muted);
}

@media (max-width: 760px) {
    .pager {
        margin-top: 28px;
        padding-top: 16px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        text-align: left;
    }

    .pager::-webkit-scrollbar {
        display: none;
    }

    .pager .page-navigator {
        width: max-content;
        min-width: 100%;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 6px;
        padding-bottom: 2px;
    }

    .pager .page-navigator li a,
    .pager .page-navigator li span {
        min-width: 34px;
        height: 34px;
        padding: 0 8px;
    }

    .pager .page-navigator li.next a,
    .pager .page-navigator li.prev a {
        padding: 0 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pager .page-navigator li a {
        transition: none;
    }
}

/* Main titles follow the article hero size setting */

.archive-head h1,
.bookshelf-head h1,
.gallery-head h1,
.chronicle-hero h1,
.entry-head h1 {
    font-size: var(--fs-hero);
}

@media (max-width: 1100px) {
    .archive-head h1,
    .bookshelf-head h1,
    .gallery-head h1,
    .chronicle-hero h1,
    .entry-head h1 {
        font-size: clamp(42px, 7vw, var(--fs-hero));
    }
}

@media (max-width: 760px) {
    .archive-head h1,
    .bookshelf-head h1,
    .gallery-head h1,
    .chronicle-hero h1,
    .entry-head h1 {
        font-size: clamp(34px, calc(var(--fs-hero) * 0.45), 64px);
    }
}


@media (min-width: 761px) and (max-width: 1100px) {
    .bookshelf-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
