/* Blog pages (uses the site's tokens from style.css) */
.blog-main { padding: clamp(36px, 6vw, 72px) 0 clamp(48px, 8vw, 96px); }
.blog-head { max-width: 760px; }
.blog-head .eyebrow { font-family: var(--mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.blog-head h1 { font-family: var(--display); font-size: clamp(2rem, 4.6vw, 3rem); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 14px; }
.blog-head p.lead { color: var(--muted); font-size: 1.1rem; margin: 0; max-width: 62ch; }
.crumbs { font-size: .9rem; margin-bottom: 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

/* index */
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 8px; }
.tag-chip { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-size: .86rem; padding: 6px 13px; border-radius: 999px; cursor: pointer; }
.tag-chip:hover { color: var(--ink); border-color: var(--muted); }
.tag-chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.post-count { color: var(--muted); font-size: .9rem; margin: 6px 0 22px; }
.year-block { margin-top: 22px; }
.year-block > h2 { max-width: none; line-height: 1.4; font-family: var(--mono); font-size: .9rem; letter-spacing: .08em; color: var(--muted); font-weight: 500; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.posts { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.post-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0; overflow: hidden; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s; }
.post-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-2px); box-shadow: var(--shadow); }
.post-card .meta { font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.post-card h3 { font-family: var(--display); font-size: 1.12rem; line-height: 1.3; margin: 0; letter-spacing: -.01em; }
.post-card p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.55; }
.post-card .venue { margin-top: auto; padding-top: 6px; font-size: .82rem; color: var(--muted); }
.post-card .badge { display: inline-block; font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 2px 9px; margin-left: 8px; }
.blog-note { max-width: 62ch; color: var(--muted); font-size: .9rem; margin-top: 44px; border-top: 1px solid var(--line); padding-top: 16px; }

/* article */
.article { max-width: 720px; }
.article .tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.article .tags span { font-size: .78rem; color: var(--accent); background: var(--accent-soft); padding: 3px 11px; border-radius: 999px; }
.article h1 { font-family: var(--display); font-size: clamp(1.9rem, 4.4vw, 2.7rem); line-height: 1.14; letter-spacing: -.02em; margin: 0 0 14px; }
.article .byline { color: var(--muted); font-size: .95rem; margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.paper-box { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 16px 20px; margin: 0 0 34px; font-size: .94rem; }
.paper-box .lbl { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.paper-box .pt { font-weight: 600; line-height: 1.4; }
.paper-box .pa, .paper-box .pv { color: var(--muted); margin-top: 3px; }
.paper-box .pa b { color: var(--ink); font-weight: 600; }
.paper-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.paper-links a, .cta a { display: inline-block; font-size: .9rem; font-weight: 600; text-decoration: none; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--bg); }
.paper-links a:hover, .cta a:hover { border-color: var(--accent); color: var(--accent); }
.cta { margin: 30px 0 6px; }
.cta a { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); padding: 11px 18px; font-size: .98rem; }
.cta a:hover { color: var(--accent-ink); filter: brightness(1.1); }
.prose { font-size: 1.07rem; line-height: 1.75; }
.prose > p:first-child { font-size: 1.18rem; line-height: 1.7; }
.prose h2 { max-width: none; font-family: var(--display); font-size: 1.45rem; line-height: 1.25; letter-spacing: -.01em; margin: 2.2em 0 .6em; }
.prose h3 { font-family: var(--display); font-size: 1.15rem; margin: 1.8em 0 .5em; }
.prose p { margin: 0 0 1.1em; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.prose li { margin-bottom: .45em; }
.prose code { font-family: var(--mono); font-size: .9em; background: var(--chip); padding: 1px 6px; border-radius: 6px; }
.prose figure { margin: 1.9em 0; }
.prose .frame { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; justify-content: center; }
.prose .frame img { max-width: 100%; height: auto; border-radius: 4px; }
.prose figcaption { font-size: .9rem; color: var(--muted); margin-top: 10px; line-height: 1.55; }
.prose figcaption .src { display: block; font-size: .8rem; margin-top: 2px; opacity: .85; }
.callout { margin: 1.8em 0; padding: 16px 20px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 12px 12px 0; font-size: 1.05rem; line-height: 1.6; }
.ack { margin-top: 2.6em; padding-top: 18px; border-top: 1px solid var(--line); font-size: .92rem; color: var(--muted); line-height: 1.65; }
.ack h2 { max-width: none; font-family: var(--mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; margin: 0 0 8px; color: var(--muted); }
.ack p { margin: 0 0 .6em; }
.cite-box { margin-top: 24px; font-size: .86rem; color: var(--muted); }
.cite-box summary { cursor: pointer; }
.cite-box pre { white-space: pre-wrap; background: var(--chip); border-radius: 10px; padding: 12px 14px; font-family: var(--mono); font-size: .78rem; line-height: 1.55; color: var(--ink); margin: 10px 0 0; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 44px; }
.pager a { display: block; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 14px 18px; text-decoration: none; color: var(--ink); }
.pager a:hover { border-color: var(--accent); }
.pager small { display: block; font-family: var(--mono); font-size: .72rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }
.pager .next { text-align: right; }
@media (max-width: 600px) { .pager { grid-template-columns: 1fr; } .pager .next { text-align: left; } }

.sources { margin-top: 2.2em; padding-top: 16px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); line-height: 1.6; }
.sources h2 { max-width: none; font-family: var(--mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; margin: 0 0 8px; color: var(--muted); }
.sources p { margin: 0 0 .5em; }
.sources ul { margin: 0; padding-left: 1.1em; }
.sources b { color: var(--ink); font-weight: 600; }

/* index thumbnails */
.post-card .thumb { aspect-ratio: 16 / 9; background: #fff; border-bottom: 1px solid var(--line); overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .thumb img { transform: scale(1.03); }
.post-card .pc-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 20px 18px; flex: 1; }
@media (prefers-reduced-motion: reduce) { .post-card .thumb img { transition: none; } }

/* cite */
.cite-btn { appearance: none; cursor: pointer; font: inherit; font-size: .9rem; font-weight: 600; padding: 8px 14px; border: 1px solid var(--accent); border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.cite-btn:hover { background: var(--accent); color: var(--accent-ink); }
.cite-btn.done { background: #1a7f4b; border-color: #1a7f4b; color: #fff; }
.cite-box { margin-top: 2.2em; padding-top: 18px; border-top: 1px solid var(--line); font-size: .92rem; color: var(--muted); line-height: 1.6; }
.cite-box h2 { max-width: none; font-family: var(--mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; margin: 0 0 8px; color: var(--muted); }
.cite-box p { margin: 0 0 12px; }
.cite-box .bib-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }
.cite-box .cite-btn { font-size: .8rem; padding: 6px 12px; }
.cite-box pre { white-space: pre-wrap; word-break: break-word; background: var(--chip); border-radius: 10px; padding: 12px 14px; font-family: var(--mono); font-size: .78rem; line-height: 1.55; color: var(--ink); margin: 8px 0 0; }

/* result tables */
.prose figure.tbl { margin: 1.9em 0; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.tbl table { border-collapse: collapse; width: 100%; font-size: .9rem; line-height: 1.45; min-width: 420px; }
.tbl caption { caption-side: top; text-align: left; padding: 12px 14px 8px; font-weight: 600; font-size: .94rem; color: var(--ink); }
.tbl th, .tbl td { padding: 8px 14px; text-align: left; border-top: 1px solid var(--line); vertical-align: top; }
.tbl thead th { background: var(--chip); font-size: .8rem; letter-spacing: .02em; color: var(--muted); font-weight: 600; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--chip) 45%, transparent); }
.prose figure.tbl figcaption { margin-top: 10px; }

/* icons beside the four top-bar headings */
.nav-links > a, .nav-btn { display: inline-flex; align-items: center; gap: 6px; }
.nav-btn svg.ni, .nav-links > a svg.ni { width: 16px; height: 16px; flex: none; opacity: .85; transform: none !important; }
