body { --header-height: 4.2rem; }
::view-transition-group(root) { animation-duration: var(--panel-time); }
.header-brand { display: flex; align-items: center; gap: clamp(.4rem, 1.1vw, .9rem); min-width: 0; }
.header-brand .identity { min-width: 0; flex-shrink: 1; }
.header-brand .identity-mark { flex: none; }
.header-brand .identity-name { overflow: hidden; text-overflow: ellipsis; }
.header-reward { position: relative; flex: none; }
.reward-trigger { padding-inline: .2rem; color: var(--orange-ink); }
.reward-trigger[aria-expanded='true'] { color: var(--ink); }
.reward-trigger[aria-expanded='true']::after { transform: scaleX(1); }
.reward-panel {
  position: absolute;
  z-index: 4;
  inset-block-start: 100%;
  inset-inline-start: 0;
  width: min(25rem, calc(100vw - 2 * var(--space)));
  padding: .6rem;
  border: 1px solid var(--line);
  border-top: 3px solid var(--signal);
  background: var(--surface);
  box-shadow: .35rem .35rem 0 color-mix(in srgb, var(--ink) 17%, transparent);
}
.reward-panel img {
  width: min(100%, calc(100dvh - var(--header-height) - 3.9rem));
  height: auto;
  margin-inline: auto;
}
.reward-panel p { padding-block: .55rem .06rem; text-align: center; color: var(--muted); }
.blog-header-action { flex-wrap: nowrap; gap: .75rem; }
.blog-header-action .nav-button { padding: 0 .15rem; }
.blog-header-action a.nav-button { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; }
.journal-kicker { display: flex; align-items: center; gap: .6rem; color: var(--muted); }
.journal-kicker > span { width: .55rem; height: .55rem; transform: rotate(45deg); background: var(--signal); }

.blog-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.22fr);
  align-items: center;
  gap: clamp(1.5rem, 4.6vw, 4.4rem);
  padding-block: clamp(2.4rem, 6vw, 5.5rem) clamp(1.8rem, 4vw, 3.1rem);
}
.blog-hero-copy h1 {
  margin-block: .55rem 1.3rem;
  font-size: clamp(2.65rem, 5.9vw, 6.3rem);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -.075em;
}
.blog-hero-copy em { font-style: normal; }
.hero-period { margin-left: .075em; color: var(--signal); font: 800 1.13em/.6 var(--font-display); }
.blog-hero-copy > p:not(.micro) { max-width: 29rem; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.16rem); text-wrap: balance; }
.blog-hero-copy .cluster { margin-top: 1.4rem; }
.blog-hero-figure {
  position: relative;
  background: #e3e3e3;
  border-top: 3px solid var(--rule);
  padding-top: .4rem;
}
.blog-hero-figure img { width: 100%; aspect-ratio: 1.66; height: auto; object-fit: cover; object-position: 55% 63%; }
.blog-hero-figure figcaption {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .35rem;
  min-height: 2.25rem;
  padding: .4rem .8rem;
  background: var(--dark-inset);
  color: var(--dark-ink);
  border-left: 5px solid var(--signal);
  font-size: .8rem;
}
.blog-hero-figure::after {
  position: absolute;
  content: '';
  width: 8%;
  height: .4rem;
  top: 0;
  right: 0;
  background: repeating-linear-gradient(135deg, var(--dark) 0 2px, var(--signal) 2px 5px);
}
.blog-metrics {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.05fr) minmax(0, 1.13fr) minmax(0, 1fr);
  border-block: 1px solid var(--line);
}
.blog-metrics > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: .6rem;
  padding: .8rem .95rem;
  border-right: 1px solid var(--line);
}
.blog-metrics > div:first-child { padding-left: 0; }
.blog-metrics > div:last-child { border-right: 0; padding-right: 0; justify-content: flex-end; flex-wrap: wrap; gap: .25rem .6rem; }
.blog-metrics strong { font: 800 clamp(1.45rem, 2.9vw, 2.35rem)/1 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.blog-metrics span { color: var(--muted); font-size: .82rem; }
.blog-metric-source #source-state { color: var(--orange-ink); font-weight: 750; }

.archive { margin-top: clamp(2.45rem, 5vw, 4.6rem); }
.archive .section-title { padding-bottom: .95rem; }
.archive .section-title .micro { color: var(--muted); }
.archive-layout {
  display: grid;
  grid-template-columns: minmax(11.4rem, .29fr) minmax(0, 1fr);
  gap: clamp(1rem, 3.2vw, 3.1rem);
  align-items: start;
}
.archive-tools { display: grid; gap: .75rem; min-width: 0; }
.archive-inspector { border: 1px solid var(--dark-rule); background: var(--dark); color: var(--dark-ink); }
.archive-peek-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .35rem;
  padding: .42rem .72rem;
  border-bottom: 1px solid var(--dark-rule);
  background: var(--dark-surface);
}
.archive-peek-head #archive-focus-index { color: var(--signal-on-dark); white-space: nowrap; }
.archive-peek-content { min-width: 0; overflow: hidden; }
.archive-media {
  position: relative;
  height: clamp(5.5rem, 9vw, 8.25rem);
  overflow: hidden;
  background:
    repeating-linear-gradient(142deg, #ffffff19 0 1px, transparent 1px 10px),
    linear-gradient(130deg, var(--dark-surface) 70%, var(--dark-raised) 70% 100%);
}
.archive-media::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 27%;
  height: 3px;
  background: var(--signal);
  content: '';
}
.archive-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; opacity: .76; }
.archive-media strong {
  position: absolute;
  right: .52rem;
  bottom: .32rem;
  padding: .18rem .38rem .23rem;
  background: var(--dark-inset);
  color: var(--dark-ink);
  font-size: clamp(1.45rem, 3vw, 2.5rem);
}
.archive-peek-text { padding: .62rem .72rem .05rem; }
.archive-peek-text .tag { border-color: var(--dark-rule); color: var(--dark-ink); }
.archive-peek-text .micro { color: var(--dark-muted); }
.archive-peek-text h3 {
  margin-block: .42rem;
  min-height: 2.28em;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.archive-peek-text p {
  min-height: 4.44em;
  color: var(--dark-muted);
  font-size: .86rem;
  line-height: 1.48;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.archive-peek-content .action { min-height: 2.6rem; margin: .78rem .72rem .72rem; }
.filter-panel {
  display: grid;
  gap: .8rem;
  padding: .95rem;
  border: 1px solid var(--line);
  border-top: 3px solid var(--rule);
  background: var(--surface);
}
.filter-caption { display: flex; align-items: center; justify-content: space-between; }
.filter-caption h3 { font-size: 1.05rem; }
.filter-caption kbd { color: var(--muted); }
.filter-panel .action { justify-self: start; }
.filter-actions { gap: .35rem; }
.filter-actions .action { padding-inline: .58rem; min-height: 2.55rem; }
.results-head { display: flex; justify-content: space-between; align-items: center; gap: .65rem; border-bottom: 1px solid var(--line); padding-bottom: .56rem; }
.results-head p { color: var(--muted); }
.results-head .order { flex-wrap: nowrap; }
.order .action { min-height: 2.55rem; }
.archive-track { position: relative; }
.archive-focus-rail {
  --rail-y: 0px;
  --rail-height: 0px;
  --rail-duration: 100ms;
  --rail-ease: linear;
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  left: 0;
  height: var(--rail-height);
  transform: translateY(var(--rail-y));
  border: 1px solid var(--signal);
  border-left-width: 4px;
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 0 100%);
  pointer-events: none;
  transition: transform var(--rail-duration) var(--rail-ease), height var(--rail-duration) var(--rail-ease);
}
.archive-focus-rail i {
  position: absolute;
  top: 0;
  right: 5px;
  width: min(21%, 7rem);
  height: 4px;
  background: repeating-linear-gradient(128deg, var(--signal) 0 4px, transparent 4px 7px);
  transform-origin: right;
  transition: transform var(--hover-time) var(--out), opacity var(--focus-time);
}
.archive-track[data-moving='true'] .archive-focus-rail i { transform: scaleX(.73); opacity: .65; }
.archive-key-hint {
  color: var(--muted);
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .26rem .42rem;
  margin-top: .9rem;
  font-size: .88rem;
}
.archive-key-hint span { margin-left: .65rem; }
.articles { list-style: none; padding: 0; margin: 0; }
.articles li { border-bottom: 1px solid var(--line); }
.article-row {
  --row-flag: var(--line);
  --row-indent: 0px;
  --row-trace: .08;
  --row-trace-opacity: 0;
  position: relative;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) minmax(5rem, 8rem) 1rem;
  align-items: center;
  min-height: 7.25rem;
  gap: .55rem 1.15rem;
  padding: .92rem .75rem .92rem .85rem;
  border: 1px solid transparent;
  color: var(--ink);
  text-decoration: none;
  transition: background-color var(--hover-time) var(--out), box-shadow var(--focus-time), transform var(--focus-time) var(--out);
}
.article-row[data-archive-active], .article-row:focus-visible { --row-flag: var(--signal); background: var(--surface); }
.article-row:focus-visible {
  --row-indent: 6px;
  --row-trace: 1;
  --row-trace-opacity: .36;
  outline: 1px dashed var(--ink);
  outline-offset: -6px;
}
.article-row:active, .article-row[data-pressure='down'] {
  transform: translate(3px, 2px);
  box-shadow: inset 0 -3px var(--signal);
  transition-duration: 44ms;
}
.article-row::before {
  position: absolute;
  inset: auto 8px 2px 8px;
  height: 2px;
  background: linear-gradient(90deg, var(--signal) 0 18%, var(--ink) 18% 100%);
  transform: scaleX(var(--row-trace));
  transform-origin: left;
  opacity: var(--row-trace-opacity);
  transition: transform var(--hover-time) var(--out), opacity var(--hover-time) var(--out);
  pointer-events: none;
  content: '';
}
.article-row::after {
  position: absolute;
  top: 0;
  right: 0;
  width: .85rem;
  height: .85rem;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  background: var(--row-flag);
  transform-origin: top right;
  transition: transform var(--hover-time) var(--out);
  content: '';
}
.article-row[data-pressure='down']::before { transform: scaleX(1); opacity: .74; }
.article-row[data-pressure='up']::before { animation: row-release-trace 330ms var(--out) both; }
@keyframes row-release-trace { from { transform: scaleX(1); opacity: .77; } to { transform: scaleX(var(--row-trace)); opacity: var(--row-trace-opacity); } }
.entry-number { color: var(--muted); font: 800 1.65rem/1 var(--font-display); transition: color var(--focus-time); }
.article-row[data-archive-active] .entry-number, .article-row:focus-visible .entry-number { color: var(--orange-ink); }
.entry-body { transform: translateX(var(--row-indent)); transition: transform var(--hover-time) var(--out); }
.entry-title { margin: .35rem 0; font-size: clamp(1.09rem, 2vw, 1.43rem); line-height: 1.3; overflow-wrap: anywhere; }
.entry-summary { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--muted); font-size: .9rem; line-height: 1.5; overflow: hidden; overflow-wrap: anywhere; }
.entry-date { display: grid; gap: .26rem; color: var(--muted); white-space: nowrap; }
.entry-date time { color: var(--ink); font: 650 .85rem/1.4 var(--font-mono); }
.entry-date span { font-size: .82rem; }
.entry-end {
  width: .55rem;
  height: 2rem;
  background: repeating-linear-gradient(135deg, var(--row-flag) 0 1px, transparent 1px 4px);
  transform: translateX(2px) scaleY(.76);
  opacity: .76;
  transition: transform var(--hover-time) var(--out), opacity var(--hover-time) var(--out);
}
.empty { margin-top: 1rem; padding: clamp(1rem, 4vw, 2rem); border: 1px solid var(--line); border-top: 3px solid var(--rule); background: var(--surface); }
.empty p { margin-block: .45rem .85rem; color: var(--muted); }

.page-mask {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--orange);
  box-shadow: inset 0 -6px var(--signal);
  pointer-events: none;
  clip-path: inset(0 100% 0 0);
}
.page-mask span { font: 800 clamp(5rem, 18vw, 14rem)/1 var(--font-display); }
:root[data-enter] .page-mask { clip-path: inset(0 0 0 0); }
.reading-rail { position: sticky; top: var(--header-height); z-index: 9; height: 4px; background: var(--soft); }
.reading-rail i { display: block; width: 100%; height: 100%; transform: scaleX(0); transform-origin: left; background: var(--signal); }
.reading-page { --measure: 83rem; }
.reading-return { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; align-items: center; padding: 1.3rem 0; color: var(--muted); }
.reading-return a, .reading-end a { text-underline-offset: .27em; font-weight: 680; font-size: .89rem; }
.reading-return a, .reading-end a, .markdown-content a {
  transition: color var(--hover-time), text-underline-offset var(--hover-time) var(--out);
}
.reading-return a[data-pressure='down'], .reading-end a[data-pressure='down'] { text-decoration-thickness: 3px; }
.article-head { padding: clamp(1.4rem, 4.8vw, 3.6rem) 0 clamp(1.2rem, 4.5vw, 2.55rem); border-top: 2px solid var(--rule); border-bottom: 1px solid var(--line); }
.article-head h1 {
  max-width: 22ch;
  margin: .65rem 0 .8rem;
  font-size: clamp(2rem, 6.15vw, 5.35rem);
  line-height: 1.13;
  font-weight: 860;
  letter-spacing: -.044em;
  overflow-wrap: anywhere;
}
.article-meta { color: var(--muted); font-size: .89rem; }
.article-label::before { width: .52rem; height: .52rem; background: var(--signal); transform: rotate(45deg); margin-right: .28rem; content: ''; }
.reading-column { max-width: 53rem; margin-inline: auto; padding-top: 1.6rem; }
.markdown-content { overflow-wrap: anywhere; font-size: clamp(1rem, 1.28vw, 1.125rem); line-height: 1.9; }
.markdown-content > :first-child { margin-top: 0; }
.markdown-content :is(p, ul, ol, pre, table, blockquote) { margin: 0 0 1.06em; }
.markdown-content :is(h1, h2, h3, h4, h5, h6) { margin: 1.4em 0 .58em; line-height: 1.28; scroll-margin-top: 1rem; }
.markdown-content h1 { font-size: 1.72em; }
.markdown-content h2 { font-size: 1.48em; }
.markdown-content h3 { font-size: 1.2em; }
.markdown-content .markdown-task { color: var(--orange-ink); }
.markdown-content li:has(> .markdown-task, > p > .markdown-task) { list-style: none; }
.markdown-content img { max-width: 100%; height: auto; margin: .7rem 0; background: var(--soft); }
.markdown-content blockquote { border-left: 3px solid var(--signal); background: var(--soft); padding: .75rem .95rem; }
.markdown-content blockquote > :last-child { margin-bottom: 0; }
.markdown-content :is(pre, code) { font-family: var(--font-mono); }
.markdown-content pre {
  max-width: 100%;
  padding: 1rem;
  overflow: auto;
  background: var(--dark-surface);
  color: var(--dark-ink);
  font-size: .86rem;
  line-height: 1.55;
}
.markdown-content :not(pre) > code { padding: .14em .26em; background: var(--soft); color: var(--blue-ink); font-size: .88em; }
.markdown-content a { color: var(--blue-ink); text-underline-offset: .24em; }
.markdown-content hr { margin: 1.6rem 0; border: 0; border-top: 1px solid var(--line); }
.markdown-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.markdown-content :is(th, td) { padding: .42em .65em; border: 1px solid var(--line); text-align: left; }
.markdown-content thead th { background: var(--soft); }
.reading-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .65rem; margin: 2.1rem 0 3rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.comments .section-title { padding-bottom: .65rem; }
.comment-source { color: var(--muted); font-size: .88rem; margin-bottom: .9rem; }
.comment-form { display: grid; gap: .75rem; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--rule); }
.comment-form label:first-child { max-width: 18rem; }
.comment-form :is([role='status'], .comment-source) { color: var(--muted); font-size: .87rem; }
.comments-list { display: grid; gap: 0; padding: 0; margin: 1rem 0 0; list-style: none; }
.comments-list li { border-bottom: 1px solid var(--line); padding: .82rem .05rem; }
.comment-head { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: baseline; margin-bottom: .35rem; font-size: .9rem; }
.comment-head time { color: var(--muted); font: .82rem/1.4 var(--font-mono); }
.comments-list li p { white-space: pre-wrap; overflow-wrap: anywhere; }
.muted { color: var(--muted); }

.auth-page { min-height: max(24rem, 55vh); }
.auth-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: clamp(2rem, 6.2vw, 6rem) auto 0;
  max-width: 56rem;
  border: 1px solid var(--line);
  border-top: 4px solid var(--signal);
  background: var(--surface);
}
.auth-copy, .auth-form { padding: clamp(1.2rem, 4vw, 2.4rem); }
.auth-copy { background: var(--dark); color: var(--dark-ink); }
.auth-copy .micro { color: var(--signal); }
.auth-copy h1 { margin: .42rem 0 .65rem; font-size: clamp(2.4rem, 5.9vw, 4.2rem); letter-spacing: -.055em; }
.auth-copy p { color: var(--dark-muted); }
.auth-form { align-self: center; }
.auth-form .cluster { margin: .8rem 0 .45rem; }
.auth-form [role='status'], #delete-status, #publish-status { color: var(--orange-ink); font-size: .9rem; }

@media (hover: hover) and (pointer: fine) {
  .markdown-content a:hover { color: var(--orange-ink); text-underline-offset: .4em; }
}

@media (hover: hover) and (pointer: fine) {
  .article-row:hover {
    --row-indent: 7px;
    --row-trace: 1;
    --row-trace-opacity: .38;
    background-color: var(--hover-surface);
  }
  .article-row:hover::after { transform: scale(1.18); }
  .article-row:hover .entry-end { transform: translateX(-4px) scaleY(1); opacity: 1; }
  .reading-return a:hover, .reading-end a:hover { color: var(--orange-ink); text-underline-offset: .42em; }
}

@media (min-width: 60rem) and (min-height: 57rem) {
  .archive-tools { position: sticky; top: calc(var(--header-height) + .8rem); }
}

@media (max-width: 62rem) {
  .blog-metrics > div { flex-wrap: wrap; gap: .2rem .5rem; }
  .blog-metrics > div:last-child { justify-content: flex-start; }
}
@media (max-width: 46rem) {
  .blog-hero { grid-template-columns: 1fr; }
  .blog-hero-copy h1 { font-size: clamp(2.8rem, 10.7vw, 5.05rem); }
  .blog-hero-figure img { aspect-ratio: 1.65; }
  .archive-layout { display: block; }
  .archive-inspector { display: none; }
  .filter-panel { grid-template-columns: 1fr 1fr; margin-bottom: 1rem; }
  .filter-caption, .filter-panel label:first-of-type { grid-column: 1/-1; }
  .article-row { min-height: 6.3rem; grid-template-columns: 1.4rem minmax(0,1fr) minmax(4rem,5.7rem) .45rem; gap: .45rem .65rem; padding-left: .55rem; padding-right: .55rem; }
  .auth-card { grid-template-columns: 1fr; }
}
@media (pointer: coarse) {
  .archive-key-hint { display: none; }
}
@media (max-width: 43rem) {
  body { --header-height: 3.5rem; }
  .header-reward { position: static; }
  .reward-panel { inset-block-start: calc(100% - .45rem); inset-inline-start: var(--space); }
  .blog-header-action { gap: .45rem; }
  .blog-header-action a.nav-button { max-width: 4.3rem; }
  .header-links .project-link { display: none; }
}
@media (max-width: 27rem) {
  .header-brand .identity-suffix { display: none; }
}
@media (max-width: 32rem) {
  .blog-metrics { grid-template-columns: 1fr 1fr; }
  .blog-metrics > div { padding: .65rem .45rem; }
  .blog-metrics > div:nth-child(2) { border-right: 0; }
  .blog-metrics > div:nth-child(3) { border-top: 1px solid var(--line); padding-left: 0; }
  .blog-metrics > div:nth-child(4) { border-top: 1px solid var(--line); }
  .entry-number { font-size: 1.28rem; align-self: start; margin-top: .23rem; }
  .article-row { grid-template-columns: 1.4rem minmax(0, 1fr); }
  .entry-date { grid-column: 2/-1; display: flex; flex-wrap: wrap; gap: .35rem .7rem; }
  .entry-end { display: none; }
}
@media (max-width: 23rem) {
  .identity { font-size: .86rem; }
  .blog-header-action .nav-button { font-size: .77rem; }
  .header-links { gap: .46rem; }
  .header-links a { font-size: .79rem; }
}
