:root {
  --bg: #0f1419;
  --panel: #161b22;
  --panel-strong: #1d242d;
  --line: rgba(255, 255, 255, 0.09);
  --ink: #e7ebef;
  --muted: #8d99a5;
  --accent: #1d9bf0;
  --accent-soft: rgba(29, 155, 240, 0.14);
  --accent-warm: #f5b14c;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(29, 155, 240, 0.1), transparent 24%),
    radial-gradient(circle at bottom right, rgba(245, 177, 76, 0.08), transparent 22%),
    var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  width: min(1580px, calc(100% - 18px));
  margin: 0 auto;
  padding: 18px 0 32px;
  display: grid;
  grid-template-columns: clamp(248px, 23vw, 316px) minmax(0, 1fr);
  gap: 20px;
}

.left-rail,
.timeline-column {
  min-width: 0;
}

.brand {
  min-width: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(1.18rem, 1.85vw, 1.64rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  white-space: nowrap;
  line-height: 1;
}

.brand-shell {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 8px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 30% 25%, rgba(89, 183, 255, 0.22), transparent 38%),
    rgba(255, 255, 255, 0.02);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 30px rgba(0, 0, 0, 0.18);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-terminal {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  width: 100%;
  min-width: 0;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    rgba(255, 255, 255, 0.02);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 30px rgba(0, 0, 0, 0.18);
}

.brand-prompt {
  color: #73c3ff;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.96rem;
  font-weight: 600;
  flex: 0 0 auto;
}

.brand-caret {
  width: 9px;
  height: 1.25em;
  border-radius: 999px;
  background: rgba(115, 195, 255, 0.92);
  box-shadow: 0 0 18px rgba(115, 195, 255, 0.45);
  animation: blink-caret 1s steps(1, end) infinite;
  flex: 0 0 auto;
}

.brand-copy {
  margin: 0 0 18px;
  color: #b6c2cf;
  font-family: "Instrument Serif", "Source Serif 4", serif;
  font-size: 1.02rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.012em;
  white-space: nowrap;
  max-width: none;
  opacity: 0.94;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 4px;
  margin: 2px 0 12px auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.lang-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.lang-button.is-active {
  background: rgba(29, 155, 240, 0.18);
  color: #dff1ff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 18px rgba(0, 0, 0, 0.14);
}

.rail-card,
.timeline-header,
.post-card,
.comments-card,
.reader-drawer {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.rail-card,
.comments-card {
  border-radius: var(--radius-lg);
  padding: 18px;
  min-width: 0;
}

.reader-card {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.left-rail {
  display: grid;
  align-content: start;
  gap: 12px;
  position: sticky;
  top: 18px;
  height: fit-content;
}

.section-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.section-nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.section-nav-link:hover,
.section-nav-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(29, 155, 240, 0.24);
  color: #d8eefe;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.section-nav-link.is-active {
  border-color: rgba(29, 155, 240, 0.32);
  background: rgba(29, 155, 240, 0.12);
  color: #f5fbff;
}

.ui-icon--nav {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.main-view[hidden] {
  display: none;
}

.rail-label,
.eyebrow,
.meta-label {
  margin: 0 0 10px;
  color: #7f8d9b;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.69rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.stats div {
  display: grid;
  gap: 8px;
  padding: 12px 12px 13px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.stats dt {
  color: var(--muted);
  line-height: 1.1;
}

.stats dd {
  margin: 0;
  color: #f0f5fa;
  font-weight: 700;
  line-height: 1.1;
}

.search-block {
  display: grid;
}

.social-links,
.friend-links {
  display: grid;
  gap: 10px;
}

.friends-toggle {
  display: none;
  margin-top: 10px;
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.labels-toggle {
  display: none;
  margin-top: 10px;
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.social-link,
.friend-link {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 4px 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.018);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.social-link:hover,
.social-link:focus-visible,
.friend-link:hover,
.friend-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(29, 155, 240, 0.24);
  background: rgba(29, 155, 240, 0.06);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
}

.social-link--site {
  border-color: rgba(86, 184, 255, 0.26);
  background:
    linear-gradient(180deg, rgba(86, 184, 255, 0.08), rgba(86, 184, 255, 0.03)),
    rgba(255, 255, 255, 0.02);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 14px 28px rgba(0, 0, 0, 0.12);
}

.social-link--site:hover,
.social-link--site:focus-visible {
  border-color: rgba(86, 184, 255, 0.42);
  background:
    linear-gradient(180deg, rgba(86, 184, 255, 0.14), rgba(86, 184, 255, 0.05)),
    rgba(255, 255, 255, 0.025);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(86, 184, 255, 0.08);
}

.social-link {
  position: relative;
  overflow: hidden;
}

.friend-link {
  position: relative;
  overflow: hidden;
}

.social-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%);
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.social-link:hover::after,
.social-link:focus-visible::after {
  opacity: 1;
}

.friend-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 44%);
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.friend-link:hover::after,
.friend-link:focus-visible::after {
  opacity: 1;
}

.icon-badge {
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent),
    rgba(255, 255, 255, 0.02);
  color: #a8d9ff;
}

.social-link .icon-badge {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 10px 20px rgba(0, 0, 0, 0.18);
}

.social-link--site .icon-badge {
  color: #d6efff;
  border-color: rgba(120, 205, 255, 0.28);
  background:
    radial-gradient(circle at 30% 28%, rgba(117, 202, 255, 0.22), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    rgba(255, 255, 255, 0.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 10px 22px rgba(35, 115, 173, 0.14);
}

.friend-link .icon-badge {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    rgba(10, 13, 17, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.14);
}

.friend-link .ui-icon {
  stroke-width: 2.15;
  color: #f5f9ff;
}

.ui-icon--friend-nav {
  width: 21px;
  height: 21px;
}

.ui-icon--fluttermark {
  width: 22px;
  height: 22px;
  stroke-width: 2.25;
}

.icon-badge--github {
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.24), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.06);
  color: #f4f7fb;
}

.icon-badge--x {
  background:
    radial-gradient(circle at 28% 24%, rgba(96, 197, 255, 0.24), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(29, 155, 240, 0.14);
  color: #dff2ff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 10px 24px rgba(29, 155, 240, 0.16);
}

.icon-badge--mail-primary {
  background:
    radial-gradient(circle at 28% 24%, rgba(245, 177, 76, 0.28), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(245, 177, 76, 0.14);
  color: #ffe2aa;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 10px 24px rgba(245, 177, 76, 0.14);
}

.icon-badge--mail-secondary {
  background:
    radial-gradient(circle at 28% 24%, rgba(168, 85, 247, 0.28), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(168, 85, 247, 0.14);
  color: #ead4ff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 10px 24px rgba(168, 85, 247, 0.14);
}

.icon-badge--friend-carbon {
  border-color: rgba(110, 193, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 2px 2px 0 rgba(110, 193, 255, 0.12),
    0 8px 18px rgba(0, 0, 0, 0.14);
}

.icon-badge--friend-openbb {
  border-color: rgba(94, 234, 212, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 2px 2px 0 rgba(94, 234, 212, 0.12),
    0 8px 18px rgba(0, 0, 0, 0.14);
}

.icon-badge--friend-awesome {
  border-color: rgba(250, 204, 21, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 2px 2px 0 rgba(250, 204, 21, 0.11),
    0 8px 18px rgba(0, 0, 0, 0.14);
}

.icon-badge--friend-swift {
  border-color: rgba(251, 146, 60, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 2px 2px 0 rgba(251, 146, 60, 0.12),
    0 8px 18px rgba(0, 0, 0, 0.14);
}

.icon-badge--friend-flutter {
  border-color: rgba(96, 197, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 2px 2px 0 rgba(96, 197, 255, 0.12),
    0 8px 18px rgba(0, 0, 0, 0.14);
}

.ui-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-name,
.friend-link strong {
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.social-link--site .social-name {
  color: #eef8ff;
  font-size: 1rem;
  font-weight: 700;
}

.social-handle,
.friend-link span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.social-link--site .social-handle {
  color: #96c8ec;
}

.subscribe-note,
.subscribe-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

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

.subscribe-link,
.subscribe-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.subscribe-link:hover,
.subscribe-link:focus-visible,
.subscribe-copy:hover,
.subscribe-copy:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(29, 155, 240, 0.24);
  background: rgba(29, 155, 240, 0.06);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.subscribe-url {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: #c6d5e2;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: nowrap;
  overflow-x: auto;
  text-overflow: clip;
  outline: none;
}

.subscribe-url:focus {
  border-color: rgba(29, 155, 240, 0.32);
  box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.12);
}

.subscribe-status {
  margin-top: 10px;
}

.search-block input,
.page-size select {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #0f1419;
  color: var(--ink);
  padding: 0 14px;
  font: inherit;
}

.label-filters,
.post-tags,
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.label-chip,
.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--pill-border, rgba(255, 255, 255, 0.1));
  border-radius: 999px;
  background: var(--pill-bg, rgba(255, 255, 255, 0.028));
  color: var(--pill-fg, #a8b5c1);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.label-chip {
  cursor: pointer;
}

.label-chip.is-active {
  border-color: rgba(29, 155, 240, 0.4);
  background: var(--accent-soft);
  color: #d8efff;
}

.timeline-column {
  display: grid;
  gap: 14px;
  transition: transform 220ms ease, filter 220ms ease, opacity 220ms ease;
}

body.modal-open .left-rail,
body.modal-open .timeline-column {
  filter: blur(2px);
  opacity: 0.55;
  transform: scale(0.985);
}

.timeline-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  overflow: visible;
}

.timeline-header h1,
.reader-shell h2,
.comments-card h3 {
  margin: 0;
  font-family: "Source Serif 4", serif;
  font-weight: 700;
  line-height: 1;
}

.timeline-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.compose-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.compose-link:hover,
.compose-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(29, 155, 240, 0.28);
}

.timeline-toolbar,
.pagination,
.post-top,
.post-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.timeline-toolbar {
  align-items: center;
}

.result-count,
.page-indicator,
.post-summary,
.post-meta,
.comments-card p,
.reader-empty p,
.article-body {
  color: var(--muted);
  line-height: 1.7;
}

.comments-card a {
  color: #8fd0ff;
}

.comments-card a:hover,
.comments-card a:focus-visible {
  color: #b7e3ff;
}

.comments-thread {
  margin-top: 16px;
  min-height: 120px;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.comments-thread .utterances {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
}

.comments-thread iframe,
.comments-thread .utterances-frame {
  display: block;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  border: 0;
}

.page-size {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.seo-post-links {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.post-list {
  display: grid;
  gap: 14px;
}

.post-card {
  border-radius: var(--radius-md);
  padding: 18px;
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
  cursor: pointer;
  animation: card-enter 420ms ease both;
}

.post-card:hover,
.post-card.is-active {
  border-color: rgba(29, 155, 240, 0.36);
  background: #19202a;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
  transform: translateY(-2px);
}

.post-category {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--pill-border, rgba(245, 177, 76, 0.28));
  background: var(--pill-bg, rgba(245, 177, 76, 0.12));
  color: var(--pill-fg, #ffd48b);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.post-number {
  color: var(--muted);
  font-size: 0.92rem;
}

.post-card h3 {
  margin: 10px 0 8px;
  font-size: 1.2rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.post-summary {
  margin: 0 0 14px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow-wrap: anywhere;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.9rem;
}

.pagination {
  align-items: center;
  justify-content: center;
  padding: 6px 0 0;
}

.archive-shell,
.about-card {
  display: grid;
  gap: 18px;
}

.archive-group,
.about-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.archive-year {
  margin: 0 0 16px;
  color: #f4f8fc;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  font-weight: 700;
}

.archive-list {
  display: grid;
  gap: 10px;
}

.archive-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  color: inherit;
  text-align: left;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.archive-item:hover,
.archive-item:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(29, 155, 240, 0.22);
  background: rgba(29, 155, 240, 0.05);
}

.archive-item-date {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
}

.archive-item-title {
  min-width: 0;
  color: #edf3f8;
  font-size: 1rem;
  font-weight: 600;
}

.archive-item-category {
  justify-self: end;
}

.about-lead {
  margin: 0;
  max-width: 44rem;
  color: #d7e0e8;
  font-size: 1.06rem;
  line-height: 1.8;
}

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

.about-block {
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.about-block h3 {
  margin: 0 0 10px;
  color: #f5f9fc;
  font-size: 1.05rem;
}

.about-block p:last-child {
  margin: 0;
  color: #b9c6d2;
  line-height: 1.72;
}

.pager-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.pager-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.reader-empty {
  display: grid;
  place-items: center;
  min-height: 52vh;
  text-align: center;
}

.reader-shell {
  width: 100%;
  min-width: 0;
}

.article-layout {
  display: grid;
  gap: 20px;
}

.article-layout > * {
  min-width: 0;
  max-width: 100%;
}

.article-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  width: 100%;
  max-width: 84ch;
  margin: 0 auto;
  padding: 4px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.article-hero-copy {
  min-width: 0;
}

.article-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.article-title {
  margin: 0;
  max-width: none;
  font-size: clamp(2.2rem, 3.85vw, 3.35rem);
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: -0.055em;
  text-wrap: pretty;
  color: #f7fafc;
}

.article-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(29, 155, 240, 0.22);
  border-radius: 999px;
  background: rgba(29, 155, 240, 0.08);
  color: #c1d8e7;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.article-link:hover,
.article-link:focus-visible {
  transform: translateY(-1px);
  background: rgba(29, 155, 240, 0.14);
  border-color: rgba(29, 155, 240, 0.32);
}

.article-link-secondary {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.08);
  color: #aeb9c4;
}

.article-link-secondary:hover,
.article-link-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.14);
}

.article-link-static,
.article-link-static:hover,
.article-link-static:focus-visible {
  transform: none;
  cursor: default;
}

.article-meta-panel {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 84ch;
  margin: 0 auto;
}

.article-meta-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.meta-group {
  display: inline-grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 12px 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.meta-group strong {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
  color: #dbe5ee;
}

.meta-group-wide {
  width: 100%;
  max-width: 100%;
}

.article-tag-row {
  gap: 8px;
  padding: 10px 12px 12px;
}

.article-content-card {
  display: block;
  width: 100%;
  max-width: 84ch;
  margin: 0 auto;
  padding: 6px 0 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.article-body {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  color: #c6d0da;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.12rem;
  line-height: 1.98;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.article-body > *:first-child {
  margin-top: 0;
}

.article-body > *:last-child {
  margin-bottom: 0;
}

.article-body p,
.article-body ul,
.article-body ol {
  margin: 0 0 1.55rem;
}

.article-body .article-lead {
  margin-bottom: 1.85rem;
  color: #dde7ef;
  font-size: 1.16em;
  line-height: 1.72;
  letter-spacing: -0.015em;
  font-weight: 500;
}

.article-body li + li {
  margin-top: 0.52rem;
}

.article-body img {
  display: block;
  max-width: 100%;
  border-radius: 18px;
}

.article-body .article-figure {
  margin: 2rem 0;
}

.article-body .article-figure img {
  margin: 0 auto;
}

.article-body .article-figure figcaption {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  text-align: center;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
  margin: 1.9em 0 0.72em;
  color: #f6f9fc;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.article-body h1,
.article-body h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.85rem, 2.1vw, 2.34rem);
  font-weight: 700;
}

.article-body h3,
.article-body h4 {
  font-size: 1.16rem;
  font-weight: 700;
}

.article-body pre {
  position: relative;
  overflow: auto;
  max-width: 100%;
  margin: 1.8rem 0;
  padding: 60px 20px 18px 24px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(24, 31, 40, 0.98), rgba(14, 19, 26, 0.99));
  border: 1px solid rgba(143, 210, 255, 0.16);
  border-left: 3px solid rgba(106, 190, 255, 0.72);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.2);
  color: #dbe8f2;
  -webkit-overflow-scrolling: touch;
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
}

.article-body pre::before {
  content: attr(data-language);
  position: absolute;
  top: 12px;
  right: 14px;
  padding: 4px 9px;
  border: 1px solid rgba(143, 210, 255, 0.16);
  border-radius: 999px;
  background: rgba(143, 210, 255, 0.08);
  color: #8fb8d5;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.article-body pre::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 24px;
  width: 36px;
  height: 10px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 5px 5px, rgba(255, 122, 137, 0.9) 0 3px, transparent 3.5px),
    radial-gradient(circle at 18px 5px, rgba(255, 198, 93, 0.9) 0 3px, transparent 3.5px),
    radial-gradient(circle at 31px 5px, rgba(69, 208, 122, 0.9) 0 3px, transparent 3.5px);
  opacity: 0.9;
}

.article-body pre:not([data-language])::before,
.article-body pre[data-language=""]::before {
  display: none;
}

.article-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.95em;
}

.article-body pre code {
  display: block;
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
  line-height: 1.76;
}

.article-body pre code.hljs {
  padding: 0;
  background: transparent;
  color: inherit;
}

.article-body pre code.hljs {
  padding-top: 18px;
}

.article-body pre code.hljs .hljs-comment,
.article-body pre code.hljs .hljs-quote {
  color: #8d97a3;
  font-style: italic;
}

.article-body pre code.hljs .hljs-keyword,
.article-body pre code.hljs .hljs-selector-tag,
.article-body pre code.hljs .hljs-subst {
  color: #ff7b9c;
}

.article-body pre code.hljs .hljs-title,
.article-body pre code.hljs .hljs-title.function_,
.article-body pre code.hljs .hljs-title.class_,
.article-body pre code.hljs .hljs-function .hljs-title,
.article-body pre code.hljs .hljs-type {
  color: #79c0ff;
}

.article-body pre code.hljs .hljs-string,
.article-body pre code.hljs .hljs-regexp,
.article-body pre code.hljs .hljs-meta .hljs-string {
  color: #a5d6ff;
}

.article-body pre code.hljs .hljs-number,
.article-body pre code.hljs .hljs-literal,
.article-body pre code.hljs .hljs-symbol,
.article-body pre code.hljs .hljs-bullet {
  color: #ffb86c;
}

.article-body pre code.hljs .hljs-built_in,
.article-body pre code.hljs .hljs-attribute,
.article-body pre code.hljs .hljs-property {
  color: #8be9c2;
}

.article-body pre code.hljs .hljs-params,
.article-body pre code.hljs .hljs-variable,
.article-body pre code.hljs .hljs-template-variable {
  color: #dbe8f2;
}

.article-body pre code.hljs .hljs-meta,
.article-body pre code.hljs .hljs-meta-keyword {
  color: #c792ea;
}

.article-body pre code.hljs .hljs-function .hljs-params,
.article-body pre code.hljs .hljs-attr,
.article-body pre code.hljs .hljs-operator,
.article-body pre code.hljs .hljs-punctuation {
  color: #b9c7d5;
}

.article-body :not(pre) > code {
  padding: 0.18em 0.46em;
  border-radius: 8px;
  background: rgba(143, 210, 255, 0.12);
  border: 1px solid rgba(143, 210, 255, 0.18);
  color: #c9ebff;
}

.article-body a {
  color: #8fd2ff;
  text-decoration-color: rgba(143, 210, 255, 0.34);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.article-body a:hover,
.article-body a:focus-visible {
  color: #d6efff;
}

.article-body blockquote {
  margin: 1.8rem 0;
  padding: 0.25rem 0 0.25rem 1.15rem;
  border-left: 2px solid rgba(143, 210, 255, 0.46);
  background: transparent;
  border-radius: 0;
  color: #dce8f1;
  font-size: 1.06em;
  font-style: italic;
}

.article-body hr {
  margin: 2.3rem 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.article-body strong {
  color: #f3f8fc;
  font-weight: 700;
}

.article-body .article-table-wrap {
  margin: 1.7rem 0;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
}

.article-body th,
.article-body td {
  border: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
}

.article-bottom-stack {
  display: grid;
  gap: 18px;
  width: 100%;
  max-width: 84ch;
  margin: 0 auto;
  padding: 4px 0 4px;
}

.article-nav-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.article-nav-card {
  min-width: 0;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.01));
  color: inherit;
  text-align: left;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.article-nav-card:hover,
.article-nav-card:focus-visible,
.related-post-link:hover,
.related-post-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(29, 155, 240, 0.28);
  background: rgba(29, 155, 240, 0.08);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
}

.article-nav-label {
  display: block;
  margin-bottom: 10px;
  color: #7f8d9b;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.article-nav-card strong,
.related-post-title {
  display: block;
  color: #b8d7ec;
  font-size: 1.06rem;
  line-height: 1.42;
}

.related-posts {
  display: grid;
  gap: 10px;
}

.related-posts-head h3 {
  margin: 0;
  color: #eef5fa;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.related-post-list {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.related-empty {
  margin: 0;
  color: #aab6c1;
  line-height: 1.66;
}

.related-post-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  width: 100%;
  padding: 15px 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: inherit;
  text-align: left;
  transition:
    transform 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.related-post-title {
  text-decoration: underline;
  text-decoration-color: rgba(143, 210, 255, 0.2);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.related-post-link:hover,
.related-post-link:focus-visible {
  background: rgba(29, 155, 240, 0.045);
  box-shadow: inset 0 0 0 1px rgba(29, 155, 240, 0.08);
}

.related-post-link:hover .related-post-title,
.related-post-link:focus-visible .related-post-title {
  color: #d8eeff;
  text-decoration-color: rgba(143, 210, 255, 0.78);
}

.related-post-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #7f8d9b;
  white-space: nowrap;
}

.related-post-kicker {
  color: #8e9dad;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.related-post-arrow {
  color: rgba(143, 210, 255, 0.6);
  font-size: 0.86rem;
}

.related-post-link:hover .related-post-kicker,
.related-post-link:focus-visible .related-post-kicker,
.related-post-link:hover .related-post-arrow,
.related-post-link:focus-visible .related-post-arrow {
  color: #a8dcff;
}

.loading-state,
.no-results {
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 12, 0.72);
  backdrop-filter: blur(10px);
  z-index: 40;
  animation: fade-in 220ms ease both;
}

.reader-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms ease;
}

.reader-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-shell {
  width: min(1120px, 92vw);
  max-height: 88vh;
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 0 22px 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(17, 22, 28, 0.96);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.42);
  overflow-y: auto;
  transform: translateY(16px) scale(0.985);
  transition: transform 220ms ease;
}

.reader-modal.is-open .modal-shell {
  transform: translateY(0) scale(1);
}

.drawer-topbar {
  display: flex;
  align-items: start;
  justify-content: flex-end;
  gap: 16px;
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 6;
  margin: 0 -22px 0;
  padding: 18px 22px 14px;
  background: linear-gradient(180deg, rgba(17, 22, 28, 0.98), rgba(17, 22, 28, 0.92));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 28px 28px 0 0;
}

.drawer-topbar > div {
  margin-right: auto;
}

.reading-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.reading-progress-track {
  position: relative;
  width: min(280px, 52vw);
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.reading-progress-bar {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(0);
  border-radius: inherit;
  background: linear-gradient(90deg, #63c4ff, #1d9bf0);
  box-shadow: 0 0 18px rgba(29, 155, 240, 0.24);
}

.reading-progress-value {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.drawer-close {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  color: #f6f8fb;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 24px rgba(0, 0, 0, 0.18);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.drawer-close:hover,
.drawer-close:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06)),
    rgba(255, 255, 255, 0.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 14px 30px rgba(0, 0, 0, 0.24);
}

.modal-title {
  margin: 0;
  font-size: 1.58rem;
  line-height: 1.02;
  color: #f4f8fb;
}

.reader-drawer .comments-card {
  width: 100%;
  max-width: 84ch;
  margin: 4px auto 0;
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.comments-card h3 {
  font-size: 1.18rem;
  line-height: 1.08;
  color: #e7eef5;
}

.comments-card p {
  color: #8593a1;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.92rem;
  line-height: 1.68;
}

.comments-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 18px 18px 14px;
  border: 1px dashed rgba(143, 210, 255, 0.16);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(29, 155, 240, 0.04), rgba(255, 255, 255, 0.015));
  text-align: center;
}

.comments-empty[hidden] {
  display: none;
}

.comments-empty-visual {
  width: 74px;
  height: 74px;
  opacity: 0.9;
}

.comments-empty-title {
  margin: 0;
  color: #edf4fa;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.2;
}

.comments-empty-body {
  max-width: 28ch;
  margin: 0;
  color: #8e9ca9;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.88rem;
  line-height: 1.65;
}

.comments-thread {
  margin-top: 14px;
}

.comments-loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #8c99a6;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.9rem;
}

.comments-loading::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(180deg, #71c7ff, #1d9bf0);
  box-shadow: 0 0 0 6px rgba(29, 155, 240, 0.08);
  animation: comments-pulse 1.2s ease-in-out infinite;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink-caret {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0.22;
  }
}

@keyframes comments-pulse {
  0%,
  100% {
    transform: scale(0.9);
    opacity: 0.65;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 1220px) {
  .app-shell {
    width: min(100% - 14px, 1580px);
    grid-template-columns: 272px minmax(0, 1fr);
  }

  .reader-modal {
    padding: 0;
  }

  .modal-shell {
    width: 100vw;
    max-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    padding: 0 14px 14px;
    gap: 14px;
  }

  .drawer-topbar {
    align-items: stretch;
    position: sticky;
    top: 0;
    z-index: 5;
    margin: 0 -14px 0;
    padding: 14px 14px 8px;
    background: linear-gradient(180deg, rgba(17, 22, 28, 0.98), rgba(17, 22, 28, 0.92));
    backdrop-filter: blur(14px);
  }

  .drawer-topbar > div {
    flex: 1 1 auto;
    min-width: 0;
  }

  .drawer-close {
    width: auto;
    min-width: 96px;
    min-height: 42px;
    align-self: flex-start;
  }

  .reader-card,
  .comments-card {
    flex: 0 0 auto;
    padding: 14px;
    border-radius: 18px;
  }

  .reader-card {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    height: auto;
    min-height: 0;
    align-self: stretch;
  }

  .article-layout {
    gap: 12px;
  }

  .article-hero {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 2px 0 0;
  }

  .article-actions,
  .article-link {
    width: 100%;
  }

  .article-title {
    font-size: clamp(1.7rem, 4.2vw, 2.4rem);
    line-height: 1.02;
  }

  .article-meta-panel {
    gap: 10px;
  }

  .meta-group {
    padding: 10px 12px;
    border-radius: 16px;
  }

  .article-content-card {
    padding: 2px 0 18px;
  }

  .article-body {
    font-size: 1.09rem;
    line-height: 1.9;
  }

  .article-body .article-lead {
    font-size: 1.12em;
    line-height: 1.7;
  }

  .article-body h1,
  .article-body h2 {
    font-size: clamp(1.35rem, 4vw, 1.9rem);
  }

  .article-body pre {
    padding: 14px;
    border-radius: 14px;
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .article-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 1180px) {
  .app-shell {
    width: min(100% - 10px, 1580px);
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .left-rail {
    position: static;
    order: 2;
  }

  .timeline-column {
    order: 1;
  }

  .timeline-header,
  .timeline-toolbar {
    flex-direction: column;
    align-items: start;
  }

  .timeline-header,
  .timeline-toolbar {
    gap: 14px;
  }

  .timeline-header > div,
  .compose-link {
    width: 100%;
  }

  .compose-link {
    min-height: 46px;
  }

  .timeline-toolbar,
  .pagination {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .page-size {
    width: 100%;
    justify-content: space-between;
  }

  .page-size select {
    min-width: 88px;
  }

  .post-list {
    gap: 12px;
  }

  .post-card {
    width: 100%;
    overflow: hidden;
  }

  .post-footer {
    flex-direction: column;
    align-items: start;
  }

  .post-tags {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    flex-wrap: nowrap;
  }

  .pagination {
    gap: 10px;
  }

  .pager-button {
    flex: 1 1 0;
    min-width: 0;
  }

  .page-indicator {
    width: 100%;
    text-align: center;
  }

  .about-grid,
  .related-post-list,
  .article-nav-grid {
    grid-template-columns: 1fr;
  }

  .archive-item {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .archive-item-category {
    justify-self: start;
  }

  .article-hero {
    grid-template-columns: 1fr;
    padding: 2px 0 0;
  }

  .article-actions {
    width: 100%;
  }

  .article-link {
    width: 100%;
  }

  .article-title {
    max-width: none;
    font-size: clamp(1.75rem, 8vw, 2.35rem);
  }

  .article-meta-panel {
    gap: 10px;
  }

  .article-meta-strip {
    gap: 10px;
  }

  .article-content-card {
    padding: 2px 0 18px;
  }

  .article-body {
    font-size: 1.07rem;
    line-height: 1.88;
  }

  .article-body .article-lead {
    font-size: 1.1em;
    line-height: 1.68;
  }

  .reader-modal {
    padding: 0;
  }

  .modal-shell {
    width: 100vw;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    padding: 14px;
  }

  .reader-card,
  .comments-card {
    padding: 14px;
  }
}

@media (max-width: 860px) {
  .timeline-header,
  .timeline-toolbar {
    flex-direction: column;
    align-items: start;
  }

  .timeline-header,
  .timeline-toolbar {
    gap: 14px;
  }

  .timeline-header > div,
  .compose-link {
    width: 100%;
  }

  .compose-link {
    min-height: 46px;
  }

  .timeline-toolbar,
  .pagination {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .page-size {
    width: 100%;
    justify-content: space-between;
  }

  .page-size select {
    min-width: 88px;
  }

  .post-list {
    gap: 12px;
  }

  .post-card {
    width: 100%;
    overflow: hidden;
  }

  .post-footer {
    flex-direction: column;
    align-items: start;
  }

  .post-tags {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    flex-wrap: nowrap;
  }

  .pagination {
    gap: 10px;
  }

  .pager-button {
    flex: 1 1 0;
    min-width: 0;
  }

  .page-indicator {
    width: 100%;
    text-align: center;
  }

  .about-grid,
  .related-post-list,
  .article-nav-grid {
    grid-template-columns: 1fr;
  }

  .archive-item {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .archive-item-category {
    justify-self: start;
  }

  .article-hero {
    grid-template-columns: 1fr;
    padding: 2px 0 0;
  }

  .article-actions {
    width: 100%;
  }

  .article-link {
    width: 100%;
  }

  .article-title {
    max-width: none;
    font-size: clamp(1.75rem, 8vw, 2.35rem);
  }

  .article-meta-panel {
    gap: 10px;
  }

  .article-meta-strip {
    gap: 10px;
  }

  .article-content-card {
    padding: 2px 0 18px;
  }

  .article-body {
    font-size: 1.07rem;
    line-height: 1.88;
  }

  .article-body .article-lead {
    font-size: 1.1em;
    line-height: 1.68;
  }

  .reader-modal {
    padding: 0;
  }

  .modal-shell {
    width: 100vw;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    padding: 14px;
  }

  .reader-card,
  .comments-card {
    padding: 14px;
  }
}

@media (max-width: 620px) {
  .app-shell {
    width: calc(100% - 8px);
    padding-top: 8px;
    gap: 10px;
  }

  .left-rail {
    gap: 10px;
    width: 100%;
  }

  .left-rail > * {
    width: 100%;
    min-width: 0;
  }

  .rail-card,
  .timeline-header,
  .post-card,
  .reader-card,
  .comments-card {
    border-radius: 18px;
  }

  .brand-shell {
    margin-bottom: 0;
    align-items: center;
  }

  .language-toggle {
    margin: 0 0 2px;
    padding: 3px;
  }

  .lang-button {
    min-width: 54px;
    min-height: 32px;
    font-size: 0.84rem;
  }

  .brand-copy {
    max-width: 14ch;
    font-size: 0.92rem;
    line-height: 1.16;
    letter-spacing: 0;
    margin-bottom: 2px;
    opacity: 0.88;
  }

  .rail-card {
    padding: 14px;
  }

  .section-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .section-nav-link {
    justify-content: center;
    min-height: 38px;
    padding: 0 8px;
    border-radius: 12px;
    font-size: 0.86rem;
  }

  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .stats div {
    display: grid;
    justify-content: start;
    gap: 6px;
    padding: 10px 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
  }

  .stats dt,
  .stats dd {
    line-height: 1.1;
  }

  .stats dd {
    font-size: 1.02rem;
  }

  .timeline-header {
    padding: 14px;
  }

  .timeline-header h1 {
    font-size: clamp(1.6rem, 8vw, 2.15rem);
    line-height: 1.02;
  }

  .timeline-toolbar {
    padding: 0 2px;
  }

  .archive-group,
  .about-card {
    padding: 18px;
  }

  .result-count {
    font-size: 0.95rem;
  }

  .label-filters {
    gap: 8px;
  }

  .label-filters.is-collapsed-mobile .label-chip:nth-child(n + 6) {
    display: none;
  }

  .label-filters::-webkit-scrollbar,
  .post-tags::-webkit-scrollbar {
    display: none;
  }

  .brand-terminal {
    width: 100%;
    min-height: 52px;
    padding: 0 14px;
    gap: 10px;
  }

  .brand-shell {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
  }

  .brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }

  .brand-copy {
    font-size: 1.04rem;
    margin-bottom: 12px;
  }

  .post-card {
    padding: 16px;
  }

  .post-card h3 {
    font-size: 1.22rem;
    line-height: 1.18;
  }

  .post-summary {
    font-size: 0.98rem;
    line-height: 1.65;
    -webkit-line-clamp: 4;
  }

  .post-meta {
    gap: 6px 12px;
    font-size: 0.92rem;
  }

  .drawer-topbar {
    gap: 12px;
  }

  .modal-shell {
    padding: 0 12px 12px;
  }

  .drawer-topbar {
    align-items: stretch;
    position: sticky;
    top: 0;
    z-index: 5;
    margin: 0 -12px 0;
    padding: 12px 12px 8px;
    background: linear-gradient(180deg, rgba(17, 22, 28, 0.98), rgba(17, 22, 28, 0.92));
    backdrop-filter: blur(14px);
  }

  .drawer-close {
    min-height: 42px;
    align-self: flex-start;
  }

  .modal-title {
    font-size: 1.42rem;
  }

  .article-hero {
    gap: 14px;
    padding: 14px;
    border-radius: 18px;
  }

  .article-hero-copy .eyebrow {
    margin-bottom: 8px;
  }

  .article-meta-panel {
    gap: 10px;
  }

  .article-meta-strip {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .meta-group {
    padding: 14px;
    border-radius: 16px;
  }

  .meta-group strong {
    font-size: 0.95rem;
  }

  .article-content-card {
    padding: 2px 0 16px;
  }

  .article-body {
    font-size: 1.03rem;
    line-height: 1.84;
  }

  .article-body .article-lead {
    font-size: 1.08em;
    line-height: 1.66;
  }

  .article-body p,
  .article-body ul,
  .article-body ol {
    margin-bottom: 1rem;
  }

  .article-body h1,
  .article-body h2 {
    font-size: clamp(1.3rem, 6vw, 1.7rem);
  }

  .article-body h3,
  .article-body h4 {
    font-size: 1.12rem;
  }

  .article-body pre {
    margin: 1.1rem 0;
    padding: 14px;
    border-radius: 14px;
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .article-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .friend-links {
    gap: 8px;
  }

  .social-link,
  .friend-link {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 2px 10px;
    padding: 10px 12px;
  }

  .icon-badge {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .ui-icon {
    width: 16px;
    height: 16px;
  }

  .friend-links.is-collapsed-mobile .friend-link:nth-child(n + 4) {
    display: none;
  }

  .labels-toggle,
  .friends-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .app-shell {
    width: calc(100% - 4px);
    padding-top: 6px;
    gap: 8px;
  }

  .timeline-header,
  .rail-card,
  .post-card,
  .reader-card,
  .comments-card {
    border-radius: 16px;
  }

  .timeline-header {
    padding: 12px;
  }

  .timeline-header h1 {
    font-size: 1.46rem;
  }

  .brand-shell {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .brand-terminal {
    min-height: 46px;
    padding: 0 12px;
    gap: 8px;
  }

  .brand {
    font-size: 0.94rem;
  }

  .brand-copy {
    max-width: 12ch;
    font-size: 0.84rem;
    line-height: 1.14;
  }

  .rail-card {
    padding: 14px;
  }

  .section-nav-link {
    min-height: 36px;
    font-size: 0.82rem;
  }

  .stats {
    gap: 8px;
  }

  .stats div {
    padding: 9px 9px 10px;
    border-radius: 12px;
  }

  .stats dd {
    font-size: 0.96rem;
  }

  .stats div {
    gap: 10px;
  }

  .label-chip,
  .tag-chip {
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  .social-link,
  .friend-link {
    padding: 9px 10px;
  }

  .subscribe-actions {
    grid-template-columns: 1fr;
  }

  .post-card {
    padding: 14px;
  }

  .post-card h3 {
    font-size: 1.08rem;
  }

  .compose-link,
  .pager-button,
  .search-block input,
  .page-size select {
    min-height: 42px;
  }

  .reader-modal {
    padding: 0;
  }

  .modal-shell {
    padding: 0 10px 10px;
    gap: 10px;
    overflow-x: hidden;
  }

  .drawer-topbar {
    margin: 0 -10px 0;
    padding: 10px 10px 8px;
  }

  .drawer-topbar > div {
    flex: 1 1 auto;
    min-width: 0;
  }

  .reader-card,
  .comments-card {
    padding: 12px;
    border-radius: 16px;
  }

  .comments-thread {
    margin-top: 12px;
    overflow-x: auto;
  }

  .article-hero {
    padding: 14px;
  }

  .article-title {
    font-size: 1.42rem;
    line-height: 1.04;
  }

  .article-link {
    min-height: 40px;
    padding: 0 14px;
    font-size: 0.95rem;
    white-space: normal;
    text-align: center;
  }

  .article-content-card {
    padding: 12px 10px 16px;
  }

  .article-body {
    font-size: 1.04rem;
    line-height: 1.8;
  }

  .article-body blockquote {
    padding: 0.9rem 0.95rem;
    border-radius: 0 14px 14px 0;
  }

  .article-tags {
    gap: 8px;
  }

  .modal-title {
    font-size: 1.28rem;
  }

  .drawer-close {
    min-height: 40px;
    padding: 0 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .timeline-column,
  .compose-link,
  .post-card,
  .drawer-overlay,
  .modal-shell {
    animation: none;
    transition: none;
  }
}
