:root {
  --surface: #fff;
  --text: #0f1a1c;
  --body: #263a40;
  --muted: #52676d;
  --border: #dce0e1;
  --soft: #e9edef;
  --hover: #f1f4f4;
  --tint: #e1ebe5;
  --accent: #24634c;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --surface: #111719;
  --text: #e7edef;
  --body: #d1dce0;
  --muted: #a7bbc4;
  --border: #35434a;
  --soft: #1e292d;
  --hover: #222e32;
  --tint: #203d31;
  --accent: #a7ddbf;
  color-scheme: dark;
}
:root {
  font-family: Arial, Helvetica, ui-sans-serif, system-ui, sans-serif;
  color: var(--text);
  background: var(--surface);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
input {
  font: inherit;
}
button,
a,
summary {
  touch-action: manipulation;
}
button,
summary {
  cursor: pointer;
}
button {
  color: inherit;
  border: 0;
  background: none;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
input {
  min-width: 0;
}
h1,
h2,
p {
  margin: 0;
}
svg {
  flex-shrink: 0;
  vertical-align: middle;
}
button,
a {
  overflow-wrap: anywhere;
}
.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;
}
.is-hidden {
  visibility: hidden;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 100;
  background: var(--surface);
  padding: 12px;
}
.skip-link:focus {
  top: 8px;
}
.topbar {
  height: 57px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand-area {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.brand {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
}
.brand img {
  border-radius: 9px;
}
.brand span {
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -1px;
  color: var(--accent);
}
.search {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 680px;
  margin: auto;
  background: var(--soft);
  border: 1px solid transparent;
  border-radius: 24px;
  padding: 0 12px;
}
.search:hover {
  background: var(--hover);
}
.search:focus-within {
  border-color: var(--muted);
  background: var(--surface);
}
.search input {
  border: 0;
  outline: none;
  background: transparent;
  flex: 1;
  width: 100%;
  font-size: 14px;
  line-height: 24px;
  color: var(--text);
}
.search input:focus-visible {
  outline: none;
}
.search input::-webkit-search-cancel-button {
  display: none;
}
.search .icon-button {
  width: 28px;
  height: 32px;
}
.search .icon-button svg {
  width: 17px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.icon-button {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  padding: 0;
}
.icon-button:hover,
.icon-button.active,
.filter-trigger.is-filtered {
  background: var(--soft);
}
.profile {
  border-radius: 50%;
  width: 34px;
  height: 34px;
  min-width: 34px;
  background: var(--tint);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}
.profile:hover {
  outline: 3px solid var(--tint);
}

.sidebar {
  position: fixed;
  top: 57px;
  bottom: 0;
  left: 0;
  width: 216px;
  border-right: 1px solid var(--border);
  padding: 20px 16px;
  background: var(--surface);
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  white-space: nowrap;
}
.nav-item:hover {
  background: var(--hover);
}
.nav-item.active {
  background: var(--soft);
  font-weight: 600;
}
.sidebar .nav-item:last-child {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  border-radius: 0;
  padding-top: 20px;
}
.content-wrap {
  margin-left: 216px;
}
.feed-column {
  min-width: 0;
}
#main {
  max-width: 800px;
  margin: 0 auto;
  padding: 12px 24px 56px;
  outline: none;
}
.section-title {
  font-size: 20px;
  font-weight: 700;
  margin: 12px 0 20px;
  overflow-wrap: anywhere;
}
.demo-banner {
  max-width: 800px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 24px 0;
  font-size: 12px;
  color: var(--muted);
}
.demo-banner a {
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 32px;
  display: flex;
  align-items: center;
}
.demo-banner b {
  font-weight: 600;
}
.active-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  margin: 4px 0 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  min-height: 36px;
}
.active-filter svg {
  width: 16px;
  height: 16px;
}
.post {
  padding: 14px 12px 16px;
  border-bottom: 1px solid var(--border);
  position: relative;
  border-radius: 0;
  margin: 0;
}
.post:not(.detail) {
  cursor: pointer;
}
.post:not(.detail):hover {
  background: var(--hover);
  border-radius: 12px;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
  min-height: 32px;
}
.topic-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--accent);
  font-size: 12px;
  font-weight: bold;
}
.topic-name {
  padding: 6px 2px;
  font-size: 12px;
  font-weight: 700;
  color: var(--body);
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topic-name:hover {
  text-decoration: underline;
}
.meta-dot {
  color: var(--muted);
}
.post-menu-trigger {
  margin-left: auto;
  width: 32px;
  height: 32px;
}
.post h2 {
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
  letter-spacing: -0.15px;
  margin-bottom: 9px;
}
.post-title {
  display: block;
}
.post-title:hover {
  text-decoration: none;
}
.post-body {
  font-size: 14px;
  color: var(--body);
  line-height: 21px;
  white-space: pre-line;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-footer {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.action-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 20px;
  background: var(--soft);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.action-pill:hover {
  background: var(--hover);
}
.action-pill svg {
  width: 17px;
  height: 17px;
}
.is-saved {
  background: var(--tint);
  color: var(--accent);
}
.copy-link {
  margin-left: 0;
}
.sources {
  display: contents;
}
.sources summary {
  list-style: none;
}
.sources summary::-webkit-details-marker {
  display: none;
}
.sources[open] summary svg:last-child {
  transform: rotate(180deg);
}
.source-count {
  color: var(--muted);
}
.source-links {
  order: 10;
  width: 100%;
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  background: var(--soft);
  border-radius: 8px;
}
.source-links a {
  font-size: 13px;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  line-height: 20px;
  padding: 4px 0;
}
.source-links a:hover {
  color: var(--accent);
}
.detail {
  border: 0;
  padding-top: 8px;
  cursor: auto;
}
.detail h1 {
  font-size: 26px;
  line-height: 32px;
  letter-spacing: -0.4px;
  margin: 12px 0 20px;
}
.detail .post-body {
  display: block;
  font-size: 16px;
  line-height: 26px;
  color: var(--body);
}
.detail .post-footer {
  margin-top: 22px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 22px;
}
.tags button {
  font-size: 12px;
  background: var(--soft);
  padding: 6px 10px;
  border-radius: 12px;
  min-height: 30px;
}
.back {
  background: var(--soft);
  margin: 0 0 4px 10px;
  width: 36px;
  height: 36px;
}
.post-page {
  padding-top: 18px !important;
}
.menu-popover {
  position: fixed;
  inset: 64px 18px auto auto;
  padding: 8px;
  margin: 0;
  width: 240px;
  max-height: min(70vh, 480px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 5px 20px #0f1a1c26;
  z-index: 30;
}
.menu-popover button:not(.icon-button) {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  min-height: 44px;
  font-size: 14px;
  text-align: left;
  border-radius: 6px;
}
.menu-popover button:hover,
.menu-popover button.selected {
  background: var(--hover);
}
.post-menu {
  width: 180px;
}
.filter-popover-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 12px;
}
.filter-popover-heading h2 {
  font-size: 14px;
  font-weight: 700;
}
.filter-options button {
  justify-content: space-between;
}
.filter-options button.selected {
  font-weight: 700;
}
#topic-filter {
  width: 280px;
  right: 64px;
}

.empty,
.login-card {
  padding: 48px 24px;
  text-align: center;
}
.empty h1,
.empty h2,
.login-card h1 {
  font-size: 24px;
  line-height: 30px;
  margin-bottom: 14px;
}
.empty p,
.login-card p {
  font-size: 14px;
  line-height: 22px;
  color: var(--muted);
  margin: 12px 0;
}
.error-page {
  max-width: 620px;
  margin: 60px auto;
}
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 50vh;
  font-size: 14px;
  color: var(--muted);
}
.loading-dot {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.feed-heading {
  margin: 20px 0;
}
.feed-heading h1 {
  font-size: 26px;
}
.settings-card {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}
.settings-card h2 {
  font-size: 18px;
  margin-bottom: 14px;
}
.settings-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 22px;
  margin: 12px 0;
}
.primary {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  background: #24583f;
  color: white;
  border-radius: 24px;
  font-size: 14px;
  min-height: 44px;
}
.primary:hover {
  background: #193f2d;
}
.text-button {
  display: inline-block;
  font-size: 14px;
  padding: 12px;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 44px;
}
.helper {
  font-size: 12px !important;
  color: var(--muted) !important;
}
.notice,
.setup-callout {
  padding: 16px;
  background: var(--soft);
  border-radius: 8px;
  font-size: 13px !important;
}
.settings-card label {
  font-size: 14px;
  display: block;
  margin: 12px 0 8px;
}
.settings-card input:not([type="checkbox"]):not([type="radio"]) {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  width: 100%;
  color: var(--text);
}
.input-row {
  display: flex;
  gap: 8px;
}
.input-row input {
  flex: 1;
}
.input-row button {
  white-space: nowrap;
}
.checkbox {
  display: flex !important;
  align-items: center;
  gap: 8px;
  line-height: 1.7;
}
.integration {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.integration b {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.integration small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}

#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 20px;
  background: #172e36;
  color: white;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 4px 20px #0002;
  z-index: 50;
  max-width: 90vw;
}
@media (min-width: 1400px) {
  .topbar {
    gap: 40px;
  }
  .brand-area {
    width: 200px;
  }
  #main,
  .demo-banner {
    max-width: 840px;
  }
}
@media (max-width: 1000px) and (min-width: 761px) {
  .sidebar {
    width: 184px;
    padding: 16px 8px;
  }
  .brand-area {
    width: 168px;
  }
  .content-wrap {
    margin-left: 184px;
  }
  .topbar {
    gap: 12px;
  }
  .brand span {
    font-size: 22px;
  }
  #main {
    padding-left: 16px;
    padding-right: 16px;
  }
}
@media (max-width: 760px) {
  .topbar {
    height: 57px;
    gap: 8px;
    padding: 0 12px;
  }
  .brand-area {
    width: auto;
  }
  .brand span {
    display: none;
  }
  .brand img {
    width: 28px;
    height: 28px;
  }

  .brand {
    min-width: 32px;
  }
  .search {
    height: 36px;
    padding: 0 9px;
    gap: 5px;
  }
  .search > svg {
    width: 17px;
    height: 17px;
  }
  .search input {
    font-size: 13px;
  }
  .header-actions {
    gap: 2px;
  }
  .header-actions .icon-button {
    width: 36px;
  }
  .profile {
    width: 30px;
    height: 30px;
    min-width: 30px;
  }
  .sidebar {
    display: none;
  }
  .content-wrap {
    margin: 0;
  }
  #main {
    padding: 0 0 calc(24px + env(safe-area-inset-bottom));
    max-width: 100%;
  }
  .post {
    padding: 12px 16px 16px;
  }
  .post:not(.detail):hover {
    border-radius: 0;
    background: var(--surface);
  }
  .post h2 {
    font-size: 18px;
    line-height: 24px;
  }
  .post-body {
    font-size: 14px;
    line-height: 21px;
    -webkit-line-clamp: 4;
  }
  .post-meta {
    margin-bottom: 7px;
  }
  .post-footer {
    gap: 8px;
    margin-top: 12px;
  }
  .action-pill {
    min-height: 36px;
    padding: 8px 12px;
  }
  .post-menu-trigger {
    width: 36px;
    height: 36px;
  }
  .section-title {
    font-size: 20px;
    margin: 20px 16px 12px;
  }
  .active-filter {
    margin: 12px 16px 0;
  }
  .demo-banner {
    padding: 7px 16px;
    border-bottom: 1px solid var(--border);
  }
  .detail h1 {
    font-size: 24px;
    line-height: 30px;
  }
  .detail .post-body {
    font-size: 16px;
    line-height: 25px;
  }
  .post-page {
    padding-top: 12px !important;
  }
  .back {
    margin-left: 16px;
  }

  .feed-heading,
  .settings-card {
    margin-left: 20px;
    margin-right: 20px;
  }
  .settings-card {
    padding: 22px 0;
  }
  #toast {
    bottom: calc(24px + env(safe-area-inset-bottom));
  }
  .copy-link {
    display: none;
  }
  #topic-filter {
    right: 12px;
    width: min(280px, calc(100vw - 24px));
  }
  .menu-popover {
    max-height: 65vh;
  }
  .login-card {
    padding: 40px 24px;
  }
}
@media (max-width: 370px) {
  .topbar {
    gap: 4px;
    padding: 0 8px;
  }

  .brand {
    min-width: 32px;
  }
  .search input {
    font-size: 12px;
  }
  .post {
    padding-left: 12px;
    padding-right: 12px;
  }
  .input-row {
    flex-wrap: wrap;
  }
  .input-row input {
    flex-basis: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
  }
}

.post-media {
  margin: 14px 0 0;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--soft);
  aspect-ratio: 16/9;
}
.post-media > a {
  display: block;
  width: 100%;
  height: 100%;
}
.post-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.post-media .image-fallback {
  display: none;
}
.post-media.image-failed img {
  visibility: hidden;
}
.post-media.image-failed .image-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}
.detail .post-media {
  margin: 0 0 24px;
  aspect-ratio: auto;
  background: none;
}
.detail .post-media img {
  aspect-ratio: 16/9;
  background: var(--soft);
  border-radius: 12px;
}
.post-media figcaption {
  font-size: 12px;
  color: var(--muted);
  padding: 8px 0;
}
.post-media figcaption a {
  text-decoration: underline;
}
.detail-sources {
  margin-top: 28px;
}
.detail-sources h2 {
  font-size: 16px;
  margin-bottom: 12px;
}
.sync-status {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 9px 24px;
  font-size: 12px;
  background: var(--tint);
  color: var(--accent);
}
.sync-status[hidden] {
  display: none;
}
.sync-status button {
  font-weight: 600;
  text-decoration: underline;
  min-height: 28px;
  white-space: nowrap;
}
.navigation-enter {
  animation: route-enter 140ms ease-out;
}
@keyframes route-enter {
  from {
    opacity: 0.6;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .navigation-enter {
    animation: none !important;
  }
}
@media (max-width: 760px) {
  .post-media {
    margin-top: 12px;
    border-radius: 10px;
  }
  .sync-status {
    padding: 8px 16px;
  }
  .post:not(.detail) {
    padding-bottom: 14px;
  }
}

/* Header transforms preserve layout and scroll positions. */
.topbar {
  transition: transform 180ms cubic-bezier(0.2, 0.75, 0.25, 1);
}
body.chrome-hidden .topbar {
  transform: translateY(calc(-100% - 1px));
  pointer-events: none;
}
body.chrome-interacting .topbar {
  transition: none;
}
@media (prefers-reduced-motion: reduce) {
  .topbar {
    transition: none !important;
  }
}
.appearance-choice {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.appearance-choice legend {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
  padding: 0;
}
.appearance-choice > div {
  display: flex;
  gap: 8px;
}
.settings-card .appearance-choice label {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  margin: 0;
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.appearance-choice label:has(:checked) {
  background: var(--tint);
  border-color: var(--accent);
}
.appearance-choice input {
  accent-color: var(--accent);
  margin: 0;
}
.detail .rich-text {
  white-space: normal;
  line-height: 1.75;
  overflow: visible;
  max-width: 72ch;
}
.rich-text p {
  margin: 0 0 18px;
  white-space: pre-line;
}
.rich-text h2,
.rich-text h3,
.rich-text h4 {
  color: var(--text);
  font-weight: 700;
  line-height: 1.35;
  margin: 30px 0 12px;
  letter-spacing: -0.2px;
}
.rich-text h2 {
  font-size: 21px;
}
.rich-text h3 {
  font-size: 19px;
}
.rich-text h4 {
  font-size: 17px;
}
.rich-text > :first-child {
  margin-top: 0;
}
.rich-text strong {
  font-weight: 700;
  color: var(--text);
}
.rich-text ul,
.rich-text ol {
  padding-left: 24px;
  margin: 0 0 20px;
}
.rich-text li {
  padding-left: 4px;
  margin: 7px 0;
}
.rich-text a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.rich-text code {
  background: var(--soft);
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 0.9em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
input::placeholder {
  color: var(--muted);
  opacity: 1;
}

/* Four destinations share the same cached route state on mobile and desktop. */
.mobile-nav {
  display: none;
}
.topics-page {
  padding: 0 12px;
}
.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.topic-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
}
.topic-tile:hover {
  background: var(--hover);
}
.topic-tile > span:nth-child(2) {
  flex: 1;
  overflow-wrap: anywhere;
}
.topic-tile > svg {
  width: 16px;
  transform: rotate(-90deg);
}
@media (max-width: 760px) {
  #main {
    padding-bottom: calc(84px + var(--safe-bottom-max));
  }
  .mobile-nav {
    display: flex;
    position: fixed;
    inset: auto 0 0;
    z-index: 20;
    justify-content: space-around;
    padding: 4px 8px calc(4px + var(--safe-bottom-max));
    bottom: calc(env(safe-area-inset-bottom, 0px) - var(--safe-bottom-max));
    background: var(--surface);
    border-top: 1px solid var(--border);
    transition: transform 180ms cubic-bezier(0.2, 0.75, 0.25, 1);
  }
  .mobile-nav .nav-item {
    flex: 1;
    min-width: 0;
    min-height: 52px;
    padding: 5px 4px;
    gap: 4px;
    flex-direction: column;
    justify-content: center;
    font-size: 11px;
    line-height: 14px;
    white-space: normal;
    border-radius: 10px;
    color: var(--muted);
  }
  .mobile-nav .nav-item.active {
    background: var(--tint);
    color: var(--accent);
    font-weight: 700;
  }
  .mobile-nav .nav-item svg {
    width: 21px;
    height: 21px;
  }
  body.chrome-hidden .mobile-nav {
    transform: translateY(calc(100% + 1px));
    pointer-events: none;
  }
  body.chrome-interacting .mobile-nav {
    transition: none;
  }
  .topics-page {
    padding: 0 16px;
  }
  .topics-page > .section-title {
    margin-left: 0;
    margin-right: 0;
  }
  .topic-grid {
    grid-template-columns: 1fr;
  }
  #toast {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-nav {
    transition: none !important;
  }
}

/* Prevent browser-level pull reload; the feed owns only an intentional top pull. */
html,
body {
  overscroll-behavior-y: contain;
}
.pull-refresh {
  height: 0;
  position: sticky;
  top: 66px;
  z-index: 15;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.pull-refresh[hidden] {
  display: none;
}
.pull-refresh span {
  align-self: flex-start;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 8px #0002;
  font-size: 13px;
  font-weight: 600;
}
.refresh-option {
  border-top: 1px solid var(--border) !important;
  margin-top: 6px;
}

:root {
  --safe-bottom-max: env(
    safe-area-max-inset-bottom,
    env(safe-area-inset-bottom, 0px)
  );
}
body,
#app {
  min-height: 100svh;
  background: var(--surface);
  color: var(--text);
}
.link-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0;
}
.link-consent input {
  width: auto;
  margin-top: 4px;
}
#posting-links .integration {
  flex-wrap: wrap;
}
#posting-link-result input {
  width: 100%;
  min-width: 0;
}
#posting-links button {
  min-height: 44px;
}
