:root {
  color-scheme: light;
  --ink: #171c25;
  --muted: #626d7a;
  --line: #e5e8ec;
  --surface: #f6f7f8;
  --gutter: clamp(20px, 5vw, 56px);
  --text-font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono-font: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  font: 100%/1.6 var(--text-font);
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: transparent; border: 0; cursor: pointer; }
button, a, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #374151; outline-offset: 4px; }
svg { display: block; flex: none; }
h1, h2, p, ul { margin: 0; }
.skip { position: fixed; z-index: 4; top: -100px; left: 16px; padding: 8px 15px; background: var(--ink); color: white; }
.skip:focus { top: 10px; }
.site-head { border-bottom: 1px solid var(--line); position: relative; background: #fff; z-index: 2; }
.head-inner, .foot > div, #main { width: calc(100% - 2 * var(--gutter)); margin-inline: auto; }
.head-inner { max-width: 1100px; min-height: 80px; display: flex; align-items: center; gap: clamp(32px, 5vw, 76px); }
.brand { display: inline-flex; align-items: baseline; gap: 1px; white-space: nowrap; font-size: 1.48rem; line-height: 1.25; font-weight: 740; letter-spacing: -.055em; }
.brand span { color: #818b95; }
.main-nav, .head-actions { display: flex; align-items: center; }
.main-nav { gap: 28px; }
.main-nav a { color: var(--muted); font-size: .91rem; padding: 10px 0; }
.main-nav a[aria-current], .main-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 7px; }
.head-actions { margin-left: auto; gap: 15px; }
.search-open, .menu-toggle, .identity, .icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 6px; }
.search-open kbd { color: var(--muted); font: .78rem/1 var(--mono-font); padding: 3px 5px; border: 1px solid var(--line); border-radius: 3px; }
.identity { padding-inline: 4px; font-size: .9rem; }
.identity:hover, .foot button:hover { text-decoration: underline; text-underline-offset: 4px; }
.menu-toggle { display: none; }
#main { max-width: 980px; margin-block: clamp(38px, 5vw, 64px) clamp(60px, 9vw, 108px); flex: 1; outline: none; }
.index-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.index-heading h1, .reading h1 { font-size: clamp(1.4rem, 2vw, 1.65rem); font-weight: 650; line-height: 1.4; letter-spacing: -.035em; }
.category-filter { display: inline-flex; position: relative; color: var(--muted); }
.category-filter select { appearance: none; border: 0; background: transparent; padding: 9px 20px 9px 9px; color: inherit; cursor: pointer; font-size: .87rem; }
.category-filter svg { position: absolute; right: 0; top: calc(50% - 7px); pointer-events: none; }
.journal-list { list-style: none; padding: 0; }
.journal-list > li { border-bottom: 1px solid var(--line); }
.entry { display: grid; grid-template-columns: 114px minmax(0, 1fr) auto; align-items: baseline; gap: 24px; padding-block: 25px; }
.entry time, .metadata time { font: .82rem/1.7 var(--mono-font); color: var(--muted); font-variant-numeric: tabular-nums; }
.entry strong { font-size: 1.09rem; line-height: 1.65; font-weight: 580; overflow-wrap: anywhere; }
.entry-excerpt { display: block; margin-top: .35rem; font-size: .9rem; font-weight: 400; color: var(--muted); }
.entry-category { color: var(--muted); font-size: .82rem; }
.entry:hover strong { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.month { margin-top: 28px; }
.month h2 { font-size: 1rem; font-weight: 620; padding: 5px 0 8px; }
.month .entry { padding-block: 17px; }
.reading { max-width: 700px; margin-inline: auto; }
.reading header { border-bottom: 1px solid var(--line); padding-bottom: 22px; }
.reading h1 { font-size: clamp(1.5rem, 3vw, 2rem); text-wrap: balance; }
.metadata { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 14px; }
.metadata span { font-size: .86rem; color: var(--muted); }
.prose { font-size: 1.065rem; line-height: 1.95; margin-block: 26px 34px; }
.prose p + p, .article-image + p { margin-top: 1.25em; }
.article-image { display: block; max-width: 100%; max-height: 430px; margin: 24px auto; }
.all-posts, .close-out { font-size: .9rem; text-decoration: underline; text-underline-offset: 4px; }
.foot { margin-top: auto; border-top: 1px solid var(--line); }
.foot > div { max-width: 980px; min-height: 76px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .82rem; }
.foot button { padding: 10px 0 10px 10px; font: inherit; }
#modal { width: min(450px, calc(100% - 32px)); padding: 0; max-height: 85vh; overflow: auto; border: 1px solid #ccd0d5; border-radius: 7px; color: var(--ink); background: #fff; }
#modal::backdrop { background: rgb(20 24 30 / 26%); }
#modal-body { padding: 20px 24px 24px; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dlg-head h2 { font-size: 1.15rem; font-weight: 630; }
.icon-btn { width: 40px; }
.role-btn, .result { display: flex; align-items: baseline; gap: 10px; width: 100%; padding: 13px 0; text-align: left; border-top: 1px solid var(--line); }
.role-btn small, .result small { font-size: .8rem; color: var(--muted); }
.role-btn small { margin-left: auto; }
.role-btn:hover span, .result:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.close-out { padding: 10px 0 0; color: var(--muted); }
.search-input { border: 1px solid #c6cbd2; border-radius: 4px; padding: 10px 12px; width: 100%; }
.results { max-height: 51vh; overflow: auto; }
.results:not(:empty) { margin-top: 15px; }
.result { flex-direction: column; gap: 2px; }
.result strong { font-size: .97rem; font-weight: 580; }
.empty { font-size: .9rem; color: var(--muted); }
@media (max-width: 700px) {
  .head-inner { min-height: 65px; gap: 22px; }
  .head-actions { gap: 6px; }
  .main-nav { display: none; }
  .main-nav.mobile-open { display: flex; flex-wrap: wrap; position: absolute; top: 100%; left: 0; right: 0; gap: 20px; padding: 6px var(--gutter); background: #fff; border-block: 1px solid var(--line); }
  .brand { font-size: 1.27rem; }
  .menu-toggle { display: inline-flex; }
  .search-open, .menu-toggle { width: 36px; }
  .search-open kbd { display: none; }
  .entry { grid-template-columns: 1fr auto; row-gap: 5px; padding-block: 20px; }
  .entry strong { grid-column: 1 / -1; grid-row: 1; font-size: 1.02rem; }
  .entry time, .entry-excerpt { display: block; margin-top: .35rem; font-size: .9rem; font-weight: 400; color: var(--muted); }
.entry-category { font-size: .8rem; }
  .index-heading { padding-bottom: 14px; }
  #main { margin-block: 30px 60px; }
}
