﻿* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--hl-canvas);
}

body {
  min-height: 100%;
  margin: 0;
  font-family: var(--hl-font);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--hl-ink);
  background: var(--hl-canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  border: 0;
}

a {
  color: inherit;
}

.app-root {
  min-height: 100vh;
}

.app-shell {
  --topbar-height: 64px;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--hl-canvas);
}

.topbar {
  position: fixed;
  z-index: 30;
  inset: 0 0 auto 0;
  height: var(--topbar-height);
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  align-items: center;
  border-bottom: 1px solid var(--hl-divider-soft);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(18px);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  height: 100%;
  padding: 0 24px;
  border-right: 1px solid var(--hl-divider-soft);
}

.menu-button,
.mobile-brand-button,
.history-button,
.icon-button,
.mobile-nav-button,
.sidebar-link,
.action-button,
.editor-tool,
.topic-pill,
.tab-button,
.follow-button,
.install-button,
.primary-button,
.secondary-button {
  transition: transform var(--hl-dur-press) var(--hl-ease-press), filter var(--hl-dur-color) ease, background-color var(--hl-dur-color) ease, color var(--hl-dur-color) ease, border-color var(--hl-dur-color) ease;
}

.menu-button:active,
.mobile-brand-button:active,
.history-button:active,
.icon-button:active,
.mobile-nav-button:active,
.sidebar-link:active,
.action-button:active,
.editor-tool:active,
.topic-pill:active,
.tab-button:active,
.follow-button:active,
.install-button:active,
.primary-button:active,
.secondary-button:active {
  transform: scale(0.96);
}

.menu-button:focus-visible,
.mobile-brand-button:focus-visible,
.history-button:focus-visible,
.icon-button:focus-visible,
.mobile-nav-button:focus-visible,
.sidebar-link:focus-visible,
.action-button:focus-visible,
.editor-tool:focus-visible,
.topic-pill:focus-visible,
.tab-button:focus-visible,
.follow-button:focus-visible,
.install-button:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.search-input:focus-visible,
.editor-title:focus-visible,
.editor-body:focus-visible,
.select-field:focus-visible {
  outline: 2px solid var(--hl-primary-focus);
  outline-offset: 2px;
}

.menu-button,
.history-button,
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--hl-ink-48);
  background: transparent;
  border-radius: var(--hl-r-pill);
  cursor: pointer;
}

.menu-button:hover,
.history-button:hover,
.icon-button:hover {
  background: var(--hl-parchment);
  color: var(--hl-ink);
}

.logo-mark {
  display: block;
  width: 142px;
  height: auto;
}

.mobile-wordmark {
  display: none;
  width: 34px;
  height: 34px;
}
.mobile-brand-button {
  display: none;
  place-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border-radius: var(--hl-r-pill);
  cursor: pointer;
}

.mobile-brand-button img {
  width: 24px;
  height: 24px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  height: 100%;
  padding: 0 22px;
  gap: 20px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: min(360px, 42vw);
  min-width: 180px;
}

.search-box svg {
  position: absolute;
  left: 16px;
  width: 17px;
  height: 17px;
  color: var(--hl-ink-48);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 42px;
  padding: 0 18px 0 44px;
  color: var(--hl-ink);
  background: var(--hl-parchment);
  border: 1px solid transparent;
  border-radius: var(--hl-r-pill);
}

.search-input::placeholder {
  color: var(--hl-ink-48);
}

.action-cluster {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: max-content;
}

.install-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  color: var(--hl-on-dark);
  background: var(--hl-ink);
  border-radius: var(--hl-r-pill);
  cursor: pointer;
}

.install-button:hover {
  filter: brightness(1.35);
}

.write-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 10px;
  color: var(--hl-ink-80);
  background: transparent;
  border-radius: var(--hl-r-pill);
  cursor: pointer;
}

.write-button:hover {
  color: var(--hl-ink);
  background: var(--hl-parchment);
}

.avatar-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  background: #eaf3ff;
  border-radius: var(--hl-r-pill);
  cursor: pointer;
}

.avatar-dot {
  width: 24px;
  height: 24px;
  border-radius: var(--hl-r-pill);
  background: linear-gradient(180deg, #8fb8ff, #3c70e8);
}

.sidebar {
  position: fixed;
  z-index: 20;
  inset: var(--topbar-height) auto 0 0;
  width: 232px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 26px 24px;
  border-right: 1px solid var(--hl-divider-soft);
  background: var(--hl-canvas);
}

.sidebar-nav,
.sidebar-secondary {
  display: grid;
  gap: 6px;
}

.sidebar-divider {
  height: 1px;
  background: var(--hl-divider-soft);
}

.sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 42px;
  padding: 0;
  color: var(--hl-ink-48);
  background: transparent;
  border-radius: var(--hl-r-sm);
  cursor: pointer;
  text-align: left;
}

.sidebar-link:hover,
.sidebar-link.is-active {
  color: var(--hl-ink);
}

.sidebar-link.is-active::before {
  content: "";
  position: absolute;
  left: -24px;
  width: 3px;
  height: 26px;
  background: var(--hl-ink);
  border-radius: 0 var(--hl-r-pill) var(--hl-r-pill) 0;
}

.sidebar-link svg,
.mobile-nav-button svg,
.history-button svg,
.icon-button svg,
.menu-button svg,
.write-button svg,
.install-button svg,
.editor-tool svg,
.action-button svg,
.stat-label svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  stroke-width: 1.8;
}

.sidebar-help {
  display: grid;
  gap: 10px;
  color: var(--hl-ink-48);
  font-size: 14px;
  line-height: 1.35;
}

.sidebar-help button {
  justify-self: start;
  padding: 0;
  color: var(--hl-ink-80);
  background: transparent;
  text-decoration: underline;
  cursor: pointer;
}

.app-main {
  grid-column: 2;
  min-width: 0;
  padding-top: var(--topbar-height);
}

.view {
  min-height: calc(100vh - var(--topbar-height));
}

.content-shell {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 54px 32px 96px;
}

.feed-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 56px;
  width: min(100%, 1140px);
  margin: 0 auto;
  padding: 36px 32px 96px;
}

.feed-main,
.panel-main {
  min-width: 0;
}

.view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.view-title {
  margin: 0;
  color: var(--hl-ink);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
}

.view-subtitle {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--hl-ink-48);
  font-size: 15px;
}

.tabs {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  border-bottom: 1px solid var(--hl-divider-soft);
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab-button {
  position: relative;
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0;
  color: var(--hl-ink-48);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}

.tab-button.is-active {
  color: var(--hl-ink);
}

.tab-button.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: var(--hl-ink);
}

.article-list {
  display: grid;
  gap: 0;
}

.article-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 164px;
  gap: 28px;
  padding: 34px 0;
  border-bottom: 1px solid var(--hl-divider-soft);
}

.article-meta,
.list-meta,
.story-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--hl-ink-48);
  font-size: 13px;
}

.article-source {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--hl-on-dark);
  background: var(--hl-primary);
  border-radius: var(--hl-r-xs);
  font-size: 11px;
  font-weight: 700;
}

.article-title {
  margin: 18px 0 8px;
  color: var(--hl-ink);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
}

.article-excerpt {
  margin: 0;
  color: var(--hl-ink-48);
  font-size: 16px;
}

.article-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
}

.metric-cluster,
.row-action-cluster {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--hl-ink-48);
  font-size: 13px;
}

.metric {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.metric svg {
  width: 16px;
  height: 16px;
}

.action-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--hl-ink-48);
  background: transparent;
  border-radius: var(--hl-r-pill);
  cursor: pointer;
}

.action-button:hover {
  color: var(--hl-ink);
  background: var(--hl-parchment);
}

.cover {
  position: relative;
  min-height: 116px;
  overflow: hidden;
  background: var(--hl-parchment);
  border: 1px solid var(--hl-divider-soft);
  border-radius: var(--hl-r-sm);
  isolation: isolate;
}

.cover::before,
.cover::after {
  content: "";
  position: absolute;
  inset: auto;
  pointer-events: none;
}

.cover::before {
  width: 92px;
  height: 92px;
  right: -18px;
  bottom: -20px;
  background: rgba(0, 180, 237, 0.18);
  border-radius: var(--hl-r-pill);
}

.cover::after {
  width: 100%;
  height: 1px;
  left: 0;
  top: 50%;
  background: rgba(29, 29, 31, 0.08);
  box-shadow: 0 26px 0 rgba(29, 29, 31, 0.06), 0 -26px 0 rgba(29, 29, 31, 0.06);
}

.cover img {
  position: absolute;
  right: 20px;
  bottom: 18px;
  width: 38px;
  opacity: 0.95;
}

.cover-label {
  position: absolute;
  left: 16px;
  top: 14px;
  max-width: 104px;
  color: var(--hl-ink-80);
  font-family: var(--hl-font-mono);
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.cover.dark {
  background: var(--hl-panel-1);
  border-color: var(--hl-panel-1);
}

.cover.dark .cover-label {
  color: var(--hl-on-dark);
}

.cover.dark::before {
  background: rgba(0, 180, 237, 0.38);
}

.cover.dark::after {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 26px 0 rgba(255, 255, 255, 0.08), 0 -26px 0 rgba(255, 255, 255, 0.08);
}

.cover.cyan {
  background: var(--hl-primary);
  border-color: var(--hl-primary);
}

.cover.cyan .cover-label {
  color: var(--hl-on-dark);
}

.cover.cyan::before {
  background: rgba(255, 255, 255, 0.28);
}

.right-rail {
  min-width: 0;
  padding-left: 36px;
  border-left: 1px solid var(--hl-divider-soft);
}

.rail-section {
  padding: 28px 0;
}

.rail-section:first-child {
  padding-top: 0;
}

.rail-title {
  margin: 0 0 18px;
  font-size: 17px;
  font-weight: 700;
}

.pick-list,
.people-list {
  display: grid;
  gap: 20px;
}

.pick-item {
  display: grid;
  gap: 8px;
}

.pick-source {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--hl-ink-48);
  font-size: 13px;
}

.pick-dot {
  width: 18px;
  height: 18px;
  background: var(--hl-primary);
  border-radius: var(--hl-r-xs);
}

.pick-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.topic-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topic-pill {
  min-height: 38px;
  padding: 0 14px;
  color: var(--hl-ink-80);
  background: var(--hl-parchment);
  border-radius: var(--hl-r-pill);
  cursor: pointer;
}

.topic-pill:hover {
  color: var(--hl-ink);
  background: var(--hl-divider-soft);
}

.person-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.person-avatar,
.person-avatar {
  width: 44px;
  height: 44px;
  font-size: 12px;
}

.person-name {
  margin: 0;
  font-weight: 700;
}

.person-desc {
  margin: 2px 0 0;
  color: var(--hl-ink-48);
  font-size: 13px;
  line-height: 1.3;
}

.follow-button,
.secondary-button {
  min-height: 38px;
  padding: 0 16px;
  color: var(--hl-ink);
  background: transparent;
  border: 1px solid var(--hl-ink-48);
  border-radius: var(--hl-r-pill);
  cursor: pointer;
}

.follow-button:hover,
.secondary-button:hover {
  border-color: var(--hl-primary);
  color: var(--hl-primary);
}

.primary-button {
  min-height: 42px;
  padding: 0 20px;
  color: var(--hl-on-dark);
  background: var(--hl-primary);
  border-radius: var(--hl-r-pill);
  cursor: pointer;
  font-weight: 500;
}

.primary-button:hover {
  filter: brightness(1.07);
}

.library-banner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 20px;
  min-height: 178px;
  margin-top: 28px;
  padding: 34px;
  overflow: hidden;
  color: var(--hl-on-dark);
  background: var(--hl-panel-1);
  border-radius: var(--hl-r-sm);
}

.library-banner::before {
  content: "";
  position: absolute;
  right: 46px;
  top: 50%;
  width: 220px;
  height: 220px;
  transform: translateY(-50%);
  background: rgba(0, 180, 237, 0.24);
  border-radius: var(--hl-r-pill);
}

.library-banner h2 {
  position: relative;
  z-index: 1;
  max-width: 430px;
  margin: 0 0 18px;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: 0;
}

.library-banner .primary-button {
  position: relative;
  z-index: 1;
  justify-self: start;
  color: var(--hl-ink);
  background: var(--hl-on-dark);
}

.banner-symbol {
  position: relative;
  z-index: 1;
  align-self: center;
  justify-self: center;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  background: var(--hl-on-dark);
  border-radius: var(--hl-r-pill);
}

.banner-symbol img {
  width: 34px;
}

.list-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  margin-top: 24px;
  background: var(--hl-pearl);
  border: 1px solid var(--hl-divider-soft);
  border-radius: var(--hl-r-sm);
  overflow: hidden;
}

.list-card-body {
  padding: 28px;
}

.list-card h3 {
  margin: 20px 0 12px;
  font-size: 22px;
  letter-spacing: 0;
}

.list-preview {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  min-height: 150px;
  background: var(--hl-divider-soft);
}

.list-preview span {
  border-left: 1px solid var(--hl-canvas);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 320px;
  text-align: center;
}

.empty-state h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.empty-state p {
  margin: 0 0 18px;
  color: var(--hl-ink-48);
}

.story-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 22px;
}

.follow-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0;
}

.circle-add {
  width: 44px;
  padding: 0;
  border-radius: var(--hl-r-pill);
}

.editor-view {
  min-height: calc(100vh - var(--topbar-height));
  padding: 0 32px 96px;
}

.editor-shell {
  width: min(100%, 820px);
  margin: 0 auto;
  padding-top: 52px;
}

.editor-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 44px;
  margin-bottom: 36px;
}

.editor-status-left {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--hl-ink-48);
}

.editor-status-left img {
  width: 116px;
}

.editor-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.editor-title {
  display: block;
  width: 100%;
  min-height: 74px;
  padding: 0;
  color: var(--hl-ink);
  background: transparent;
  border: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 44px;
  line-height: 1.16;
  letter-spacing: 0;
  resize: none;
}

.editor-title::placeholder,
.editor-body::placeholder {
  color: #b7b7b7;
}

.editor-area-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.block-insert {
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.block-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--hl-ink-48);
  background: transparent;
  border: 1px solid var(--hl-ink-48);
  border-radius: var(--hl-r-pill);
  cursor: pointer;
}

.block-menu {
  display: none;
  gap: 8px;
}

.block-menu.is-open {
  display: flex;
  flex-wrap: wrap;
}

.editor-body {
  display: block;
  width: 100%;
  min-height: 52vh;
  padding: 8px 0 140px;
  color: var(--hl-ink);
  background: transparent;
  border: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1.55;
  letter-spacing: 0;
  resize: vertical;
}

.editor-tool {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--hl-primary);
  background: var(--hl-canvas);
  border: 1px solid var(--hl-primary);
  border-radius: var(--hl-r-pill);
  cursor: pointer;
}

.editor-tool:hover {
  color: var(--hl-on-dark);
  background: var(--hl-primary);
}

.format-dock {
  position: fixed;
  z-index: 25;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  color: var(--hl-on-dark);
  background: rgba(29, 29, 31, 0.92);
  border-radius: var(--hl-r-sm);
  backdrop-filter: blur(16px);
}

.format-dock .editor-tool {
  width: 36px;
  height: 36px;
  color: var(--hl-on-dark);
  background: transparent;
  border: 0;
  border-radius: var(--hl-r-xs);
}

.format-dock .editor-tool:hover {
  background: rgba(255, 255, 255, 0.12);
}

.toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  max-width: min(460px, calc(100vw - 32px));
  padding: 12px 16px;
  color: var(--hl-on-dark);
  background: var(--hl-ink);
  border-radius: var(--hl-r-pill);
  box-shadow: var(--hl-render-shadow);
  transform: translateX(-50%);
}

.mobile-nav {
  display: none;
}

.noscript-panel {
  display: grid;
  place-items: center;
  min-height: 100vh;
  gap: 18px;
  color: var(--hl-ink);
}

.noscript-panel img {
  width: 180px;
}

@media (max-width: 1240px) {
  .feed-shell {
    grid-template-columns: minmax(0, 1fr);
    width: min(100%, 820px);
  }

  .right-rail {
    display: none;
  }
}

@media (max-width: 1068px) {
  .app-shell {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .topbar {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .topbar-brand {
    justify-content: center;
    padding: 0;
  }

  .logo-mark {
    display: none;
  }

  .mobile-wordmark {
    display: block;
  }

  .sidebar {
    width: 84px;
    padding: 24px 18px;
  }

  .sidebar-link {
    justify-content: center;
  }

  .sidebar-label,
  .sidebar-help,
  .sidebar-divider {
    display: none;
  }

  .sidebar-link.is-active::before {
    left: -18px;
  }

  .app-main {
    grid-column: 2;
  }

}

@media (max-width: 833px) {
  .app-shell {
    --topbar-height: 58px;
  }

  .topbar {
    --topbar-height: 58px;
    grid-template-columns: minmax(0, 1fr);
  }

  .topbar-brand {
    display: none;
  }

  .topbar-actions {
    padding: 0 16px;
  }

  .mobile-brand-button {
    display: inline-grid;
    flex: 0 0 40px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .app-main {
    padding-top: 58px;
  }

  .search-box {
    width: min(100%, 380px);
    min-width: 0;
  }

  .install-button span,
  .write-button span,
  .icon-button.optional,
  .avatar-button.optional {
    display: none;
  }

  .install-button,
  .write-button {
    width: 40px;
    padding: 0;
    justify-content: center;
  }

  .content-shell,
  .feed-shell {
    padding: 32px 20px 112px;
  }

  .feed-shell {
    width: 100%;
  }

  .view-title {
    font-size: 34px;
  }

  .article-row {
    grid-template-columns: minmax(0, 1fr) 128px;
    gap: 18px;
  }

  .article-title {
    font-size: 22px;
  }

  .article-excerpt {
    display: none;
  }

  .cover {
    min-height: 106px;
  }

  .library-banner {
    grid-template-columns: minmax(0, 1fr);
    padding: 28px;
  }

  .banner-symbol {
    position: absolute;
    right: 28px;
    bottom: 26px;
    width: 62px;
    height: 62px;
  }

  .list-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .list-preview {
    min-height: 100px;
  }


  .editor-view {
    padding: 0 20px 112px;
  }

  .editor-shell {
    padding-top: 28px;
  }

  .editor-status {
    margin-bottom: 26px;
  }

  .editor-status-left img {
    width: 98px;
  }

  .editor-title {
    font-size: 38px;
  }

  .format-dock {
    right: 12px;
    bottom: calc(74px + env(safe-area-inset-bottom));
    left: 12px;
    justify-content: center;
    overflow-x: auto;
  }

  .mobile-nav {
    position: fixed;
    z-index: 60;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    min-height: 68px;
    padding: 6px max(10px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    background: rgba(255, 255, 255, 0.94);
    border-top: 1px solid var(--hl-divider-soft);
    backdrop-filter: saturate(180%) blur(18px);
  }

  .mobile-nav-button {
    display: grid;
    place-items: center;
    gap: 3px;
    min-width: 0;
    color: var(--hl-ink-48);
    background: transparent;
    border-radius: var(--hl-r-sm);
    cursor: pointer;
    font-size: 11px;
  }

  .mobile-nav-button.is-active {
    color: var(--hl-ink);
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .topbar-actions {
    gap: 10px;
  }

  .search-input {
    height: 40px;
  }

  .view-header {
    display: grid;
    gap: 18px;
  }

  .view-title {
    font-size: 30px;
  }

  .tabs {
    gap: 22px;
  }

  .article-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .article-row .cover {
    order: -1;
    min-height: 170px;
  }

  .article-actions {
    align-items: flex-start;
  }

  .row-action-cluster {
    gap: 4px;
  }


  .library-banner h2 {
    max-width: 260px;
    font-size: 23px;
  }



  .editor-title {
    font-size: 34px;
  }

  .editor-area-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .block-insert {
    display: flex;
    align-items: center;
    padding-top: 0;
  }

  .editor-body {
    font-size: 20px;
  }
}

@media (max-width: 440px) {
  .content-shell,
  .feed-shell,
  .editor-view {
    padding-right: 16px;
    padding-left: 16px;
  }

  .search-box {
    max-width: 180px;
  }

  .action-cluster {
    gap: 4px;
  }

  .install-button,
  .write-button,
  .history-button,
  .icon-button,
  .avatar-button {
    width: 38px;
    height: 38px;
  }

  .article-title {
    font-size: 21px;
  }

  .metric-cluster {
    gap: 8px;
  }

  .library-banner {
    padding: 24px;
  }

  .library-banner::before {
    right: -20px;
  }

}




/* Functional blog app additions */
.blog-shell {
  grid-template-columns: minmax(0, 1fr) 280px;
}

.compact-header {
  margin-bottom: 22px;
}

.primary-button,
.secondary-button,
.write-button,
.install-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary-button svg,
.secondary-button svg {
  width: 18px;
  height: 18px;
}

.post-row {
  grid-template-columns: minmax(0, 1fr) auto;
  cursor: pointer;
}

.post-click-target {
  min-width: 0;
  border-radius: var(--hl-r-sm);
}

.post-click-target:focus-visible,
.story-title-button:focus-visible,
.text-button:focus-visible,
.tag-input:focus-visible {
  outline: 2px solid var(--hl-primary-focus);
  outline-offset: 3px;
}

.post-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  align-self: center;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  color: var(--hl-ink-80);
  background: var(--hl-parchment);
  border-radius: var(--hl-r-pill);
  font-size: 12px;
}

.knowledge-rail .rail-section {
  display: grid;
  gap: 12px;
}

.knowledge-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hl-divider-soft);
  color: var(--hl-ink-48);
}

.knowledge-metric strong {
  color: var(--hl-ink);
  font-family: var(--hl-font-mono);
  font-size: 18px;
}

.muted-text {
  color: var(--hl-ink-48);
  font-size: 14px;
}

.reader-view {
  background: var(--hl-canvas);
}

.reader-shell {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: 48px 32px 112px;
}

.text-button {
  min-height: 36px;
  padding: 0;
  color: var(--hl-ink-48);
  background: transparent;
  border-radius: var(--hl-r-sm);
  cursor: pointer;
}

.text-button:hover {
  color: var(--hl-ink);
}

.reader-header {
  padding: 34px 0 28px;
  border-bottom: 1px solid var(--hl-divider-soft);
}

.reader-header h1 {
  margin: 16px 0 0;
  color: var(--hl-ink);
  font-size: clamp(34px, 7vw, 56px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0;
}

.reader-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.danger-button:hover {
  color: #b42318;
  border-color: #b42318;
}

.reader-body {
  padding-top: 34px;
  color: var(--hl-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  line-height: 1.72;
}

.reader-body p,
.reader-body blockquote,
.reader-body ul {
  margin: 0 0 24px;
}

.reader-body h2 {
  margin: 42px 0 16px;
  font-family: var(--hl-font);
  font-size: 28px;
  line-height: 1.18;
  letter-spacing: 0;
}

.reader-body blockquote {
  padding-left: 18px;
  color: var(--hl-ink-80);
  border-left: 3px solid var(--hl-primary);
}

.reader-body a {
  color: var(--hl-primary);
  text-decoration: underline;
}

.management-list {
  margin-top: 8px;
}

.story-table {
  display: grid;
  margin-top: 18px;
  border-top: 1px solid var(--hl-divider-soft);
}

.story-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px auto;
  gap: 20px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--hl-divider-soft);
}

.story-title-button {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 0;
  color: var(--hl-ink);
  background: transparent;
  border-radius: var(--hl-r-sm);
  cursor: pointer;
  text-align: left;
}

.story-title-button strong {
  overflow: hidden;
  font-size: 17px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.story-title-button span {
  overflow: hidden;
  color: var(--hl-ink-48);
  font-size: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.story-meta {
  display: grid;
  gap: 3px;
  justify-items: start;
}

.tag-input {
  display: block;
  width: 100%;
  height: 44px;
  margin: 2px 0 24px;
  padding: 0 16px;
  color: var(--hl-ink);
  background: var(--hl-parchment);
  border: 1px solid transparent;
  border-radius: var(--hl-r-pill);
}

.tag-input::placeholder {
  color: var(--hl-ink-48);
}

@media (max-width: 1240px) {
  .blog-shell {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 833px) {
  .reader-shell {
    padding: 32px 20px 112px;
  }

  .story-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .story-meta {
    display: flex;
  }

  .post-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-card-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 640px) {
  .reader-header h1 {
    font-size: 34px;
  }

  .reader-body {
    font-size: 19px;
  }

  .reader-actions {
    display: grid;
  }

  .reader-actions .primary-button,
  .reader-actions .secondary-button {
    width: 100%;
  }
}


