/* ---------- base ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: grid;
  grid-template-rows: var(--banner-h) 1fr;
  height: 100dvh;
  overflow: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
code { font-family: var(--font-mono); font-size: 0.82em; background: var(--bg-2);
       padding: 0.12em 0.4em; border-radius: 5px; border: 1px solid var(--rule); }
pre { background: var(--bg-2); border: 1px solid var(--rule); border-radius: 10px;
      padding: 1.05rem 1.2rem; overflow-x: auto; font-size: 0.88rem; }
pre code { background: none; padding: 0; border: 0; }
blockquote { margin: 1.4rem 0; padding: 0.3rem 0 0.3rem 1.2rem;
             border-left: 3px solid var(--rule); color: var(--muted); font-style: italic; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
img { max-width: 100%; height: auto; border-radius: 6px; }
h1,h2,h3 { font-family: var(--font-serif); color: var(--heading); font-weight: 700; }
.muted { color: var(--muted); }

/* ---------- banner ---------- */
.banner { display: flex; align-items: center; border-bottom: 1px solid var(--rule);
          background: var(--bg-2); }
.banner-inner { width: 100%; max-width: var(--shell-max); margin: 0 auto; padding: 0 2.4rem 0 0; }
.site-name { font-family: var(--font-serif); font-weight: 700; font-size: 2rem; letter-spacing: -0.01em;
             line-height: 1.1; color: var(--heading); display: inline-block; }
.site-name:hover { text-decoration: none; color: #fff; }
.site-tagline { margin: 0.28rem 0 0; color: var(--muted); font-family: var(--font-sans); font-size: 0.9rem; font-style: italic; }

/* ---------- layout ---------- */
.layout { min-height: 0; display: grid; grid-template-columns: 264px minmax(0,1fr);
          width: 100%; max-width: var(--shell-max); margin: 0 auto; }
.sidebar { overflow-y: auto; padding: 2.1rem 1.5rem 2rem 2.4rem;
           border-right: 1px solid var(--rule-soft); font-family: var(--font-sans); font-size: 0.9rem; }
.content { overflow-y: auto; }
.content-inner { max-width: 70rem; margin: 0; padding: 2.8rem 2.6rem 4rem 3.4rem; }
.sidebar::-webkit-scrollbar, .content::-webkit-scrollbar { width: 10px; }
.sidebar::-webkit-scrollbar-thumb, .content::-webkit-scrollbar-thumb {
  background: var(--bg-3); border-radius: 6px; border: 3px solid transparent; background-clip: padding-box; }

/* ---------- sidebar ---------- */
.nav-links { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 1.8rem;
             padding-bottom: 1.4rem; border-bottom: 1px solid var(--rule-soft); }
.nav-links a { color: var(--heading); font-weight: 600; }
.nav-links a:hover { color: var(--accent); }
.sidebar-block { margin-bottom: 2rem; }
.sidebar-h { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.18em;
             color: var(--muted); margin: 0 0 0.8rem; font-weight: 700; }
.archive-tree summary { cursor: pointer; color: var(--heading); font-weight: 600; padding: 0.22rem 0;
                        list-style: none; display: flex; justify-content: flex-start; align-items: center; gap: 0.4rem; }
.archive-tree summary::-webkit-details-marker { display: none; }
.archive-tree summary::before { content: "\203A"; color: var(--muted); margin-right: 0.55rem;
                                transition: transform .18s; font-size: 1.1em; }
.archive-tree details[open] > summary::before { transform: rotate(90deg); }
.archive-tree .months { list-style: none; margin: 0.2rem 0 0.7rem; padding-left: 1.15rem;
                        border-left: 1px solid var(--rule); }
.archive-tree .months li { display: flex; justify-content: flex-start; align-items: center; gap: 0.4rem; padding: 0.18rem 0 0.18rem 0.6rem; }
.archive-tree .months a { color: var(--text); }
.archive-tree .months a:hover { color: var(--accent); }
.count { color: var(--muted); font-size: 0.74rem; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.tag { display: inline-flex; align-items: center; gap: 0.3rem; background: var(--bg-2);
       border: 1px solid var(--rule); border-radius: 999px; padding: 0.2rem 0.7rem;
       font-size: 0.79rem; color: var(--text); }
.tag:hover { background: var(--bg-3); color: var(--heading); }

/* ---------- river of posts (flat, hairline-separated — no cards) ---------- */
.river .post { position: relative; max-width: var(--measure); margin: 0 auto 2.4rem;
               padding-bottom: 2.4rem; border-bottom: 1px solid var(--rule-soft); }
.river .post:last-of-type { border-bottom: 0; margin-bottom: 0; }
.post-title { line-height: 1.22; margin: 0 0 0.4rem; letter-spacing: -0.01em; }
.post-article .post-title { font-size: 1.8rem; }
.post-full .post-title { font-size: 2.35rem; }
.post-title a { color: var(--heading); }
.post-title a:hover { color: #fff; }
.post-tagline { margin: 0 0 0.7rem; color: var(--muted); font-size: 1.05rem; font-style: italic; }
.post-meta { font-family: var(--font-sans); font-size: 0.78rem; color: var(--muted);
             margin-bottom: 1rem; display: flex; gap: 0.9rem; flex-wrap: wrap; align-items: baseline; }
.post-body { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.post-body > *:first-child { margin-top: 0; }
.post-body p { margin: 0 0 1.05rem; }
.post-body a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent-dim); }
.readmore { font-family: var(--font-sans); font-weight: 600; font-size: 0.9rem; display: inline-block; margin-top: 0.4rem; }
.tags { margin-top: 1.1rem; display: flex; flex-wrap: wrap; gap: 0.45rem; }

/* full post: no card frame, more air; one centered column matching --measure */
.post-full { padding: 0; border: 0; background: none; max-width: var(--measure); margin: 0 auto; }

/* ---------- linked-list ---------- */
.post-link .post-title { font-size: 1.42rem; }
.post-link .link-out { color: var(--accent); }
.post-link .link-out::after { content: " \2197"; font-size: 0.7em; vertical-align: .12em; color: var(--muted); }
.post-link .link-out:hover { color: #9cc6f0; text-decoration: none; }
.post-link .permalink { color: var(--muted); font-weight: 400; margin-left: 0.4rem; font-size: 0.95rem; }
.post-link .post-meta { margin-top: 0.8rem; margin-bottom: 0; }
.via { font-style: italic; }

/* ---------- listing / tag pages ---------- */
.listing-title { font-size: 1.85rem; margin: 0 0 1.6rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--rule); }
.tag-index { list-style: none; padding: 0; columns: 2; font-family: var(--font-sans); }
.tag-index li { padding: 0.28rem 0; }
.proof { font-family: var(--font-sans); font-size: 0.82rem; color: var(--muted);
         border-top: 1px solid var(--rule); padding-top: 1.1rem; margin-top: 1.8rem; }

/* ---------- forms ---------- */
.subscribe-form { display: flex; gap: 0.55rem; flex-wrap: wrap; margin: 1.2rem 0; }
.subscribe-form input { flex: 1; min-width: 240px; background: var(--bg-2); color: var(--text);
                        border: 1px solid var(--rule); border-radius: 6px; padding: 0.7rem 0.9rem; font-size: 1rem;
                        font-family: var(--font-sans); }
.subscribe-form input:focus { outline: none; border-color: var(--accent-dim); }
.subscribe-form button { background: var(--accent); color: var(--bg); border: 0; border-radius: 6px;
                         padding: 0.7rem 1.4rem; font-weight: 700; cursor: pointer; font-family: var(--font-sans); }
.subscribe-form button:hover { background: #9cc6f0; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--rule-soft); margin-top: 3rem; padding-top: 1.5rem;
        display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
        font-family: var(--font-sans); font-size: 0.76rem; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  body { display: block; height: auto; overflow: visible; }
  .banner { position: static; height: auto; padding: 1.3rem 0; }
  .banner-inner { padding: 0 1.3rem; }
  .layout { display: flex; flex-direction: column; }
  .sidebar { overflow: visible; border-right: 0; border-top: 1px solid var(--rule-soft); order: 2; padding: 1.6rem 1.3rem; }
  .content { overflow: visible; order: 1; }
  .content-inner { padding: 1.6rem 1.3rem 3rem; }
  body { font-size: 18px; }
}
