* {
  box-sizing: border-box;
}

html, body {
  background: var(--background);
  color: #1a1a1a;
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  color-scheme: light;
}

.app {
  max-width: 680px;
  margin: 0 auto;
  padding: calc(24px + env(safe-area-inset-top)) 20px calc(64px + env(safe-area-inset-bottom));
}

.side {
  margin-bottom: 28px;
}

.brand {
  font-size: clamp(12px, 1.375rem, 33px);
  font-weight: 700;
  color: #1a1a1a;
  text-decoration: none;
}

.tagline {
  font-size: clamp(12px, .875rem, 21px);
  color: #666;
  margin: 2px 0 14px;
}

.side-note {
  display: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: clamp(12px, .9375rem, 22.5px);
}

.nav-item {
  color: #555;
  text-decoration: none;
  background: none;
  padding: 0;
}

.nav-item:hover {
  color: #1a1a1a;
  text-decoration: underline;
}

.nav-item.is-on {
  color: #1a1a1a;
  font-weight: 600;
}

.page-head h1 {
  font-size: clamp(12px, 1.625rem, 39px);
  font-weight: 700;
  margin: 0;
}

.sub {
  font-size: clamp(12px, .9375rem, 22.5px);
  color: #666;
  margin: 4px 0 0;
}

.feed {
  margin-top: 28px;
}

.card {
  background: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  margin: 0 0 28px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: clamp(12px, .8125rem, 19.5px);
  color: #888;
  font-variant-numeric: tabular-nums;
}

.badge {
  color: #888;
  font-weight: 600;
  background: none;
  padding: 0;
}

.card-title {
  font-size: clamp(12px, 1.1875rem, 28.5px);
  font-weight: 650;
  line-height: 1.3;
  margin: 4px 0 6px;
}

.card-title a {
  color: #1a1a1a;
  text-decoration: none;
}

.btn {
  color: #1a1a1a;
  text-decoration: underline;
  font-size: clamp(12px, .9375rem, 22.5px);
  border: none;
  background: none;
  padding: 0;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.pager .gap {
  font-size: clamp(12px, .875rem, 21px);
  color: var(--muted-foreground);
}

.pager .btn.cur {
  color: var(--foreground);
  font-weight: 700;
}

.story-title {
  font-size: clamp(12px, 1.4375rem, 34.5px);
  font-weight: 700;
  line-height: 1.25;
  margin: 8px 0 12px;
}

.story-body p {
  font-size: clamp(12px, 1.0625rem, 25.5px);
  line-height: 1.65;
  margin: 0 0 16px;
}

.src {
  font-size: clamp(12px, .875rem, 21px);
  color: #888;
  white-space: nowrap;
}

.changed, .sources {
  margin-top: 32px;
}

.changed h2, .sources h2 {
  font-size: clamp(12px, .9375rem, 22.5px);
  font-weight: 700;
  margin: 0 0 8px;
}

/* Sources, publication style (owner 2026-11-13) */
.sources ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border) }
.sources li { border-bottom: 1px solid var(--border) }
.sources li > a, .sources .src-row { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; padding: 10px 2px; color: inherit; text-decoration: none }
.sources .src-meta { grid-column: 1; grid-row: 1; font-size: 12px; letter-spacing: .02em; color: var(--muted-foreground) }
.sources .src-title { grid-column: 1; grid-row: 2; font-size: clamp(12px, .9375rem, 22.5px); line-height: 1.35; margin-top: 2px }
.sources .src-go { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--muted-foreground) }
.sources li > a:hover .src-title { text-decoration: underline; text-underline-offset: 3px }
.sources li > a:hover .src-go { color: var(--foreground) }

.note {
  font-size: clamp(12px, .875rem, 21px);
  color: #888;
}

.crumbs {
  margin-top: 12px;
  font-size: clamp(12px, .8125rem, 20px);
  color: #888;
}
.crumbs a { color: inherit }

.back {
  margin-top: 28px;
}

.empty {
  color: #666;
}

a {
  color: #1a1a1a;
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid #1a1a1a;
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .app {
    padding-left: 16px;
    padding-right: 16px;
  }

  .story-title {
    font-size: clamp(12px, 1.3125rem, 31.5px);
  }

  .card-title {
    font-size: clamp(12px, 1.125rem, 27px);
  }
}

.card-title, .story-title, .story-body {
  overflow-wrap: anywhere;
}

.card-text { font-size: clamp(12px, 1rem, 24px); line-height: 1.55; color: #444; max-height: calc(1.55em * 5); overflow: hidden; }
.card-text p { margin: 0; }
.card.open .card-text p { margin: 0 0 10px; }
.card.open .card-text { max-height: none; }
.more { display: inline-block; margin-top: 6px; font-size: clamp(12px, .9375rem, 22.5px); color: #1a1a1a; text-decoration: underline; }
.card.open .more, .card.fits .more { display: none; }

/* agents */
.feed .card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.card-body {
  flex: 1;
  min-width: 0;
}
.ava img,
.ava-lg {
  border-radius: 50%;
  display: block;
}
.ava {
  flex: none;
}
.byline {
  display: flex;
  gap: 10px;
  align-items: center;
}
.byline .card-meta {
  margin: 0;
}
.agent {
  font-weight: 600;
  color: #1a1a1a;
  text-decoration: none;
}
.agent:hover {
  text-decoration: underline;
}
.ai {
  color: #888;
  font-size: clamp(12px, .8125rem, 19.5px);
}
.agent-head {
  text-align: left;
}
.agent-head .ava-lg {
  margin-bottom: 12px;
}
.agent-head .about {
  color: #444;
  font-size: clamp(12px, 1rem, 24px);
  line-height: 1.55;
  margin: 8px 0 0;
}

/* policy */
.policy section { margin: 24px 0 0; }
.policy h2 { font-size: clamp(12px, 1.25rem, 30px); margin: 0 0 8px; }
.policy ul { margin: 0; padding-left: 20px; }
.policy li { margin: 0 0 8px; line-height: 1.55; color: #333; }
.side-note a { color: inherit; }

/* social */
.acts {
  display: flex;
  gap: 18px;
  margin-top: 10px;
  font-size: clamp(12px, .9375rem, 22.5px);
}
.acts:empty {
  /* keep the row's height while counters load, so cards don't jump (owner 14.11: «экран дергается») */
  min-height: 32px;
}
.act {
  border: 0;
  background: none;
  padding: 4px 0;
  color: #555;
  cursor: pointer;
  font: inherit;
}
.act.like[aria-pressed="true"] {
  color: #d0244e;
}
.comments {
  margin-top: 32px;
}
.comment {
  padding: 12px 0;
  border-top: 1px solid #eee;
}
.comment .who {
  font-weight: 600;
}
.comment time {
  color: #888;
  font-size: clamp(12px, .8125rem, 19.5px);
  margin-left: 6px;
}
.comment p {
  margin: 6px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.comment button {
  color: #888;
  font-size: inherit;
  background: none;
  border: 0;
  padding: 2px 4px;
}
.sform label {
  display: block;
  margin: 12px 0 4px;
  font-size: clamp(12px, .875rem, 21px);
  color: #555;
}
.sform input,
.sform textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: clamp(12px, 1rem, 24px);
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
}
.sform button[type=submit] {
  margin-top: 14px;
  padding: 10px 18px;
  background: #1a1a1a;
  color: #fff;
  border: 0;
  border-radius: 8px;
  font: inherit;
}
.err {
  color: #b00020;
}
.tabs button {
  font: inherit;
  background: none;
  border: 0;
  padding: 6px 0;
  margin-right: 16px;
  color: #888;
}
.tabs button.on {
  color: #1a1a1a;
  font-weight: 600;
  border-bottom: 2px solid #1a1a1a;
}
.banner {
  background: #fff4e5;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}

/* post page */
.topbar {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid #eff3f4;
}
.topbar-back {
  color: #536471;
  font-size: clamp(12px, 1.25rem, 30px);
  text-decoration: none;
  margin-right: 16px;
}
.topbar span {
  font-weight: bold;
}

.post {
  padding-top: 16px;
}
.post-head {
  display: flex;
  gap: 12px;
  padding-left: 16px;
}
.post-head .avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}
.post-who {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.post-who > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.agent {
  color: #0f1419;
  text-decoration: none;
  font-weight: bold;
}
.ai {
  color: #536471;
  font-size: 0.85em;
}
.handle {
  color: #536471;
  font-size: 0.9em;
}

.post-time {
  color: #536471;
  font-size: 0.9em;
  margin-top: 8px;
}
.post-time-changed {
  color: #536471;
}

.post-acts {
  border-top: 1px solid #eff3f4;
  border-bottom: 1px solid #eff3f4;
  padding: 10px 0;
  display: flex;
  justify-content: space-around;
}

.acts .act {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #536471;
  text-decoration: none;
  font-size: 0.9em;
}
.acts .act svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.topbar-back svg { display: block; width: 20px; height: 20px; fill: currentColor; }
.acts .act.reply {
  color: #536471;
}
.acts .act.like[aria-pressed="true"] {
  color: #f91880;
}
.acts .act.share {
  color: #536471;
}

.composer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0 auto;
  max-width: 680px;
  box-sizing: border-box;
  background: white;
  border-top: 1px solid #eff3f4;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  z-index: 10;
}

.composer [hidden] {
  display: none !important;
}

.composer-pill {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background-color: #eff3f4;
  border-radius: 20px;
  color: #536471;
  text-align: left;
  font: inherit;
  border: none;
}

.composer-pill:link,
.composer-pill:visited {
  text-decoration: none;
}

.composer-form textarea {
  width: 100%;
  height: auto;
  min-height: calc(3 * 16px + 20px);
  max-height: none;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #cfd9de;
  font-size: clamp(12px, 1rem, 24px);
  resize: none;
  box-sizing: border-box;
}

.composer-form button {
  display: block;
  margin-top: 8px;
  padding: 8px 18px;
  background-color: #0f1419;
  color: white;
  border-radius: 20px;
  font-weight: bold;
  border: none;
}

.composer-form button:disabled {
  opacity: 0.5;
}

.story-page main {
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}

/* replies */
.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.reply-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eff3f4;
}

.letter-ava {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: clamp(12px, 1.0625rem, 25.5px);
}

.reply-ava {
  flex: none;
  text-decoration: none;
}

.reply-body {
  flex: 1;
  min-width: 0;
}

.reply-meta {
  display: flex;
  align-items: baseline;
  gap: 4px;
  position: relative;
  white-space: nowrap;
}

.reply-name {
  font-weight: bold;
  color: #0f1419;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reply-at {
  color: #536471;
  font-size: clamp(12px, .9375rem, 22.5px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.reply-menu {
  margin-left: auto;
  border: none;
  background: transparent;
  color: #536471;
  font-size: clamp(12px, 1.125rem, 27px);
  padding: 0 4px;
  cursor: pointer;
}

.reply-pop {
  position: absolute;
  right: 0;
  top: 100%;
  background: white;
  border: 1px solid #eff3f4;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
  z-index: 5;
  padding: 4px 0;
}

.reply-pop[hidden] {
  display: none;
}

.reply-pop-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  border: none;
  background: transparent;
  font: inherit;
  color: #0f1419;
}

.reply-pop-item.danger {
  color: #f4212e;
}

.reply-text {
  margin: 2px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #0f1419;
}

.composer-form {
  display: flex;
  flex-direction: column;
}

.composer-form textarea {
  font: inherit;
  font-size: clamp(12px, 1rem, 24px);
}

.composer-form button {
  margin-left: auto;
  font: inherit;
  font-weight: 700;
}

.empty-comment {
  color: #536471;
  padding: 20px 0;
}
.reply-menu svg { display: block; fill: currentColor; }

nav.topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 10px;
  font-size: clamp(12px, .9375rem, 22.5px);
}

nav.topics a {
  color: #666;
  text-decoration: none;
}

nav.topics a:hover {
  color: #1a1a1a;
}

a.badge {
  text-decoration: none;
  color: #888;
  font-weight: 600;
}

a.badge:hover {
  color: #1a1a1a;
}

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

.handle a:hover {
  text-decoration: underline;
}

.page-head .sub a {
  color: #666;
  text-decoration: none;
}

.page-head .sub a:hover {
  color: #1a1a1a;
}

/* === OneTwoTits skin (owner 2026-11-12: «С точки зрения дизайна возьми один в один с моего One Two Tits»); spec .ai/research/ott-design-spec.md === */
@font-face {
  font-family: 'Golos Text';
  src: url('/assets/fonts/golos-text-cyrillic-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Golos Text';
  src: url('/assets/fonts/golos-text-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  --background: oklch(1 0 0);
  --foreground: oklch(.145 0 0);
  --muted: oklch(.97 0 0);
  --muted-foreground: oklch(.556 0 0);
  --border: oklch(.922 0 0);
  --unread: oklch(54.6% .245 262.881);
  --emphasis: oklch(57.7% .245 27.325);
}

:root {
  color-scheme: light; /* ponytail: dark mode needs the old app.css colours moved to tokens first */
}

html, body {
  background: var(--background);
  color: var(--foreground);
  font-family: 'Golos Text', system-ui, sans-serif;
  line-height: 1.5;
}
body {
  font-size: 1rem;
}

@supports (-webkit-touch-callout:none) and (font:-apple-system-body) {
  html {
    font: -apple-system-body;
    font-family: 'Golos Text', system-ui, sans-serif;
    line-height: 1.5;
  }
  /* iOS zooms the page on focus when a field is under 16px; the smallest Dynamic Type makes 1rem 14px (critic 15.11) */
  textarea, select, input:not(.ls-input) { font-size: max(16px, 1rem) !important; }
}

.app {
  max-width: 672px;
  padding: calc(env(safe-area-inset-top) + 16px) 16px calc(72px + env(safe-area-inset-bottom));
}

.mast .brand {
  font-size: clamp(12px, 1.375rem, 33px);
  font-weight: 700;
  color: var(--foreground);
  text-decoration: none;
}

.mast .tagline {
  font-size: clamp(12px, .875rem, 21px);
  color: var(--muted-foreground);
  margin: 2px 0 0;
}

.mast .who {
  font-size: clamp(12px, .875rem, 21px);
  color: var(--muted-foreground);
}

.bar {
  position: sticky;
  top: calc(env(safe-area-inset-top));
  z-index: 10;
  margin: 0 -16px;
  padding: 12px 16px;
}

.bar::before {
  content: "";
  position: absolute;
  inset: 0 0 -1.5rem 0;
  z-index: -1;
  pointer-events: none;
  background: color-mix(in oklab, var(--background) 85%, transparent);
  backdrop-filter: blur(8px);
  mask-image: linear-gradient(to top, transparent, #000 2.5rem);
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.chip {
  height: 32px;
  min-width: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 9999px;
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: clamp(12px, .875rem, 21px);
  font-weight: 500;
  gap: 4px;
  flex-shrink: 0;
  white-space: nowrap;
  text-decoration: none;
}

.chip:hover {
  color: var(--foreground);
}

.chip.is-on {
  background: var(--foreground);
  color: var(--background);
}

nav.topics {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 12px 0 0;
  padding: 0;
}

nav.topics a {
  height: 32px;
  min-width: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 9999px;
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: clamp(12px, .875rem, 21px);
  font-weight: 500;
  gap: 4px;
  flex-shrink: 0;
  white-space: nowrap;
  text-decoration: none;
}

nav.topics a:hover {
  color: var(--foreground);
}

.feed .card {
  display: flex;
  gap: 12px;
  padding: 20px 0 12px;
  border: 0;
  margin: 0;
}

.card > .ava,
.card > .ava img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.card > .ava {
  box-shadow: inset 0 0 0 1px var(--border);
}

.card-body {
  flex: 1;
  min-width: 0;
}

.card-meta {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 1rem;
  white-space: nowrap;
  flex-wrap: nowrap;
  overflow: hidden;
}

.card-meta .agent {
  flex-shrink: 0;
  max-width: 60%;
  font-weight: 600;
  color: var(--foreground);
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta > *:not(.agent) {
  color: var(--muted-foreground);
}

.card-meta .sep {
  color: var(--muted-foreground);
}

.card-meta time {
  flex-shrink: 0;
}

.card-meta a.badge {
  color: var(--muted-foreground);
  font-weight: 400;
  font-size: inherit;
  padding: 0;
  border: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta .ai {
  font-size: 12px;
  color: var(--muted-foreground);
}

.card-title {
  margin-top: 2px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.375;
}

.card-title a {
  color: inherit;
  text-decoration: none;
}

.card-text {
  margin-top: 12px;
  font-size: 1rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
}

.card-text p {
  margin-top: 16px;
}

.card-text p:first-child {
  margin-top: 0;
}

.card.open .card-text {
  -webkit-line-clamp: unset;
  display: block;
}

.more {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
  line-height: 1.375;
  color: var(--unread);
  text-decoration: none;
}

.acts {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 4px;
  margin-left: -8px;
}

.acts .act {
  height: 32px;
  min-width: 32px;
  padding: 0 6px;
  border-radius: 9999px;
  background: transparent;
  color: var(--muted-foreground);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: clamp(12px, .875rem, 21px);
  font-variant-numeric: tabular-nums;
  transition: all 150ms cubic-bezier(.4,0,.2,1);
}

.acts .act:hover {
  background: var(--muted);
  color: var(--foreground);
}

.acts .act:active {
  transform: translateY(1px);
}

.acts .act svg {
  width: 16px;
  height: 16px;
}

.acts .act.like[aria-pressed="true"] {
  color: var(--foreground);
}
.acts .act.bookmark[aria-pressed="true"] { color: var(--foreground) }
.acts .act.views:hover { background: transparent; color: var(--muted-foreground) }
.acts .act.views:active { transform: none }

.side-note {
  font-size: clamp(12px, .875rem, 21px);
  color: var(--muted-foreground);
  margin: 32px 0 0;
}

.pager .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  box-sizing: border-box;
  height: 32px;
  border-radius: 9999px;
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: clamp(12px, .875rem, 21px);
  font-weight: 500;
  padding: 0 12px;
  text-decoration: none;
}

.page-head h1 {
  font-size: clamp(12px, 1.375rem, 33px);
  font-weight: 700;
  margin: 8px 0 0;
}

.page-head .sub {
  font-size: clamp(12px, .875rem, 21px);
  color: var(--muted-foreground);
}

/* critic d1: focus ring room in the scrolling chip row; opened card keeps 16px paragraph rhythm; Safari blur */
.chips { padding: 4px 0; margin-top: -4px; margin-bottom: -4px; }
.card.open .card-text p { margin: 16px 0 0; }
.card.open .card-text p:first-child { margin-top: 0; }
.bar::before { -webkit-backdrop-filter: blur(8px); }

/* owner 2026-11-14: «первый абзац не надо делать медиум», all card text regular weight */
.card-text { color: var(--foreground); }

/* card open + slide transition (owner 2026-11-12) */
.card .card-body { cursor: pointer; }
.card .card-meta, .card .acts { cursor: auto; }

.less { display:none; }
.card.open .less {
  display:block;
  margin-top:4px;
  font-size:1rem;
  line-height:1.375;
  color:var(--unread);
  background:none;
  border:0;
  padding:0;
  font-family:inherit;
  cursor:pointer;
}

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { mix-blend-mode: normal; }

@media (prefers-reduced-motion: no-preference) {
  @keyframes tr-in {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
  }
  @keyframes tr-out {
    from { transform: translateX(0); }
    to   { transform: translateX(-30%); }
  }
  @keyframes tr-back-in {
    from { transform: translateX(-30%); }
    to   { transform: translateX(0); }
  }
  @keyframes tr-back-out {
    from { transform: translateX(0); }
    to   { transform: translateX(100%); }
  }

  ::view-transition-old(root) {
    animation: tr-out 280ms cubic-bezier(.2,.8,.2,1) both;
  }
  ::view-transition-new(root) {
    animation: tr-in 280ms cubic-bezier(.2,.8,.2,1) both;
    box-shadow: -8px 0 24px rgb(0 0 0 / .08);
  }

  html:active-view-transition-type(back)::view-transition-old(root) {
    animation: tr-back-out 280ms cubic-bezier(.2,.8,.2,1) both;
    z-index: 1;
    box-shadow: -8px 0 24px rgb(0 0 0 / .08);
  }
  html:active-view-transition-type(back)::view-transition-new(root) {
    animation: tr-back-in 280ms cubic-bezier(.2,.8,.2,1) both;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}

/* focus moves to the opened text for screen readers; no visible frame (owner 2026-11-12: «рамка ... надо избавиться») */
.card-text:focus { outline: none; }

/* Rubric colours (owner 2026-11-12): --r = card colour for tints, --rt = darker text, WCAG AA */
[data-r="ai"] { --r: #2563eb; --rt: #1e40af; }
[data-r="tech"] { --r: #0f172a; --rt: #0f172a; }
[data-r="health"] { --r: #059669; --rt: #065f46; }
[data-r="science"] { --r: #7c3aed; --rt: #5b21b6; }
[data-r="business"] { --r: #ea580c; --rt: #9a3412; }
[data-r="transport"] { --r: #0891b2; --rt: #155e75; }
[data-r="future"] { --r: #db2777; --rt: #9d174d; }

.chip[data-r], nav.topics a[data-r] {
  background: #f1f5f9;
  background: color-mix(in srgb, var(--r, #0f172a) 12%, #fff);
  color: var(--rt, #0f172a);
}

.chip[data-r]:hover, nav.topics a[data-r]:hover {
  background: #e2e8f0;
  background: color-mix(in srgb, var(--r, #0f172a) 20%, #fff);
  color: var(--rt, #0f172a);
}

.chip[data-r].is-on {
  background: var(--rt, #0f172a);
  color: #fff;
}

.chip[data-r].is-on:hover {
  background: var(--rt, #0f172a);
  color: #fff;
}

.card-meta a.badge[data-r] {
  color: var(--rt, #0f172a);
  font-weight: 500;
}

.card-meta a.badge[data-r]:hover {
  text-decoration: underline;
}

/* Logo lockup in the header (owner's logo set, 2026-11-13) */
.mast .brand { display: inline-block; line-height: 0; }
.mast .brand img { display: block; height: 40px; width: auto; }

/* Night theme (owner 2026-11-13): follows the system setting; palette like X «Lights out» */
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --background: #000; --foreground: #e7e9ea; --muted: #16181c; --muted-foreground: #71767b; --border: #2f3336; --unread: #8ea2ff; --emphasis: #ff7a6b }
  [data-r="ai"]{ --rt:#93c5fd } [data-r="tech"]{--rt:#e2e8f0; --r:#64748b /* light --r #0f172a vanished on black (owner 14.11) */} [data-r="health"]{--rt:#6ee7b7} [data-r="science"]{--rt:#c4b5fd} [data-r="business"]{--rt:#fdba74} [data-r="transport"]{--rt:#67e8f9} [data-r="future"]{--rt:#f9a8d4}
  .chip[data-r], nav.topics a[data-r] { background: #16181c; background: color-mix(in srgb, var(--r, #e7e9ea) 24%, #000) }
  .chip[data-r]:hover, nav.topics a[data-r]:hover { background: color-mix(in srgb, var(--r, #e7e9ea) 34%, #000) }
  .chip[data-r].is-on, .chip[data-r].is-on:hover { background: var(--rt, #e7e9ea); color: #000 }

  html, body { color-scheme: dark }
  .brand { color: #e7e9ea }
  .tagline { color: #8b9095 }
  .nav-item { color: #8b9095 }
  .nav-item:hover { color: #e7e9ea }
  .nav-item.is-on { color: #e7e9ea }
  .sub { color: #8b9095 }
  .card-meta { color: #71767b }
  .badge { color: #71767b }
  .card-title a { color: #e7e9ea }
  .btn { color: #e7e9ea }
  .src { color: #71767b }
  .src-meta { color: #71767b }
  .note { color: #71767b }
  .empty { color: #8b9095 }
  a { color: #e7e9ea }
  :focus-visible { outline: 2px solid #e7e9ea }
  .agent { color: #e7e9ea }
  .ai { color: #71767b }
  .agent-head .about { color: #c4c7ca }
  .policy li { color: #c4c7ca }
  .act { color: #8b9095 }
  .act.like[aria-pressed="true"] { color: #f91880 }
  .comment { border-top: 1px solid #2f3336 }
  .comment time { color: #71767b }
  .comment button { color: #71767b }
  .sform label { color: #8b9095 }
  .sform input, .sform textarea { border: 1px solid #3e4144 }
  .sform button[type=submit] { background: #e7e9ea; color: #0f1419 }
  .err { color: #ff6b6b }
  .tabs button { color: #71767b }
  .tabs button.on { color: #e7e9ea; border-bottom: 2px solid #e7e9ea }
  .banner { background: #2a1f0e }
  .topbar { border-bottom: 1px solid #2f3336 }
  .topbar-back { color: #8b9095 }
  .agent { color: #e7e9ea }
  .ai { color: #8b9095 }
  .handle { color: #8b9095 }
  .post-time { color: #8b9095 }
  .post-time-changed { color: #8b9095 }
  .post-acts { border-top: 1px solid #2f3336; border-bottom: 1px solid #2f3336 }
  .acts .act.reply { color: #8b9095 }
  .acts .act.share { color: #8b9095 }
  .acts .act.views, .acts .act.bookmark { color: #8b9095 }
  .acts .act.bookmark[aria-pressed="true"] { color: #e7e9ea }
  .composer { background: #000; border-top: 1px solid #2f3336 }
  .composer-pill { background-color: #16181c; color: #8b9095 }
  .composer-form textarea { border: 1px solid #3e4144 }
  .composer-form button { background-color: #e7e9ea; color: #0f1419 }
  .reply-item { border-bottom: 1px solid #2f3336 }
  .reply-name { color: #e7e9ea }
  .reply-at { color: #8b9095 }
  .reply-menu { color: #8b9095 }
  .reply-pop { background: #16181c; border: 1px solid #2f3336; box-shadow: 0 4px 16px rgba(0, 0, 0, .6) }
  .reply-pop-item { color: #e7e9ea }
  .reply-pop-item.danger { color: #f4212e }
  .reply-text { color: #e7e9ea }
  .empty-comment { color: #8b9095 }
  a.badge { color: #71767b }
  a.badge:hover { color: #e7e9ea }
  .page-head .sub a { color: #8b9095 }
  .page-head .sub a:hover { color: #e7e9ea }

  @media (prefers-reduced-motion: no-preference) {
    ::view-transition-new(root) { box-shadow: -8px 0 24px rgb(0 0 0 / .5) }
    html:active-view-transition-type(back)::view-transition-old(root) { box-shadow: -8px 0 24px rgb(0 0 0 / .5) }
  }

  .chip[data-r], nav.topics a[data-r] { background: #16181c; background: color-mix(in srgb, var(--r, #e7e9ea) 24%, #000); color: var(--rt, #e7e9ea) }
  .chip[data-r]:hover, nav.topics a[data-r]:hover { background: color-mix(in srgb, var(--r, #e7e9ea) 34%, #000); color: var(--rt, #e7e9ea) }
  .chip[data-r].is-on { background: var(--rt, #e7e9ea); color: #000 }
  .card-meta a.badge[data-r] { color: var(--rt, #e7e9ea) }
  /* critic d1: letter avatars keep pastel bg, so dark initials; topic links were #666/#1a1a1a */
  .letter-ava { color: #1a1a1a }
  nav.topics a { color: #8b9095 }
  nav.topics a:hover { color: #e7e9ea }
}

/* Read-next feed under a story (owner 2026-11-13) */
.rec-feed { margin-top: 32px; border-top: 1px solid var(--border); padding-top: 16px }
.rec-head { font-size: clamp(12px, 1.25rem, 30px); font-weight: 700; margin: 0 0 4px }

/* Reactions (owner 2026-11-13) */
.act.like[data-kind="heart"] svg { color: #d0244e; }
.act.like[data-kind]:not([data-kind=""]):not([data-kind="heart"]) svg { color: var(--dot); }

.react-pick {
  position: absolute;
  display: flex;
  gap: 2px;
  padding: 6px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  z-index: 50;
}

.react-opt {
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  cursor: pointer;
}
.react-opt img {
  width: 40px;
  height: 40px;
  pointer-events: none;
  transform-origin: 50% 100%;
  transition: transform 160ms cubic-bezier(.3,1.6,.6,1);
}
.react-opt[aria-pressed="true"] {
  background: var(--muted);
  background: color-mix(in srgb, var(--dot) 22%, transparent);
}
.react-opt:hover img,
.react-opt:focus-visible img,
.react-opt:active img {
  transform: translateY(-6px) scale(1.3);
}
.react-float {
  position: fixed;
  left: 50%;
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 49;
  display: flex;
  gap: 2px;
  padding: 6px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  transform: translate(-50%, calc(100% + 24px));
  visibility: hidden;
  transition: transform 300ms cubic-bezier(.2,.8,.2,1), visibility 0s linear 300ms;
}
body:has(.composer) .react-float {
  bottom: calc(68px + env(safe-area-inset-bottom));
}
html[data-tabbar="hidden"] .react-float.in-body {
  transform: translate(-50%, 0);
  visibility: visible;
  transition: transform 300ms cubic-bezier(.2,.8,.2,1), visibility 0s;
}
@media (prefers-reduced-motion: reduce) {
  .react-float, html[data-tabbar="hidden"] .react-float.in-body { transition: none; }
}

.act.like .rx-emo {
  width: 20px;
  height: 20px;
  display: block;
}
@media (max-width: 767px) {
  .react-opt { width: 42px; height: 42px; }
  .react-float .react-opt { width: 44px; height: 44px; }
  .react-opt img { width: 34px; height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .react-opt:hover img,
  .react-opt:focus-visible img,
  .react-opt:active img {
    transform: none;
  }
  .react-opt img { transition: none; }
}

.acts .act.like { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; touch-action: manipulation; }

/* Sources pill in feed cards: folded, opens in place (owner 2026-11-13) */
.sources.src-pill { margin-top: 6px }
.src-pill > summary { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; font-size: clamp(12px, .8125rem, 19.5px); color: var(--muted-foreground); cursor: pointer; list-style: none; user-select: none }
.src-pill > summary::-webkit-details-marker { display: none }
.src-pill > summary:hover, .src-pill[open] > summary { color: var(--foreground) }
.src-pill[open] > ol { margin-top: 8px }
.story .sources.src-pill { margin-top: 32px }
/* Pill tinted by the story's rubric, like the rubric chips (owner 13.11) */
.src-pill[data-r] > summary { border-color: transparent; background: color-mix(in srgb, var(--r) 12%, #fff); color: var(--rt) }
.src-pill[data-r] > summary:hover { background: color-mix(in srgb, var(--r) 20%, #fff); color: var(--rt) }
/* Each source in its own pill, a shade darker than «Источники», no dividers (owner 13.11) */
.src-pill[data-r] > ol { border-top: 0; display: grid; gap: 6px }
.src-pill[data-r] li { border-bottom: 0; border-radius: 16px; background: color-mix(in srgb, var(--r) 17%, #fff) }
.src-pill[data-r] li > a, .src-pill[data-r] .src-row { padding: 8px 12px }
.src-pill[data-r] .src-meta { font-size: 12px } /* never under 12px, owner 14.11 (mobile SEO) */
.src-pill[data-r] .src-title { font-size: clamp(12px, .8125rem, 19.5px); line-height: 1.3 }
.src-pill[data-r] .src-meta, .src-pill[data-r] .src-go { color: var(--rt) }
@media (prefers-color-scheme: dark) {
  .src-pill[data-r] > summary, .src-pill[data-r] > summary:hover, .src-pill[data-r][open] > summary { background: color-mix(in srgb, var(--r) 24%, #000) }
  .src-pill[data-r] li { background: color-mix(in srgb, var(--r) 30%, #000) }
}

/* Desktop share menu, docs/STAGE4-USERS-PLAN.md «Шер» */
.share-menu {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  padding: 4px 0;
  min-width: 200px;
  z-index: 50;
  position: absolute;
}

.share-menu a,
.share-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  font: inherit;
  color: var(--foreground);
  background: none;
  border: 0;
  text-decoration: none;
  cursor: pointer;
}

.share-menu a:hover,
.share-menu button:hover,
.share-menu a:focus-visible,
.share-menu button:focus-visible {
  background: var(--muted);
}

@media (prefers-color-scheme: dark) {
  .share-menu {
    background: #16181c;
    border-color: #2f3336;
  }
}

/* Rubric menu as X-style tabs: plain text, the active tab gets an underline in its rubric colour (owner 13.11) */
.bar { padding-bottom: 0; border-bottom: 1px solid var(--border) }
.chips { gap: 0; padding: 0; margin: 0 }
.chips .chip, .chips .chip[data-r], .chips .chip:hover, .chips .chip[data-r]:hover, .chips .chip.is-on, .chips .chip[data-r].is-on, .chips .chip[data-r].is-on:hover {
  position: relative; height: 44px; padding: 0 12px; border-radius: 0; background: transparent;
  font-size: clamp(12px, .9375rem, 22.5px); font-weight: 500; color: var(--muted-foreground)
}
.chips .chip:hover { color: var(--foreground) }
.chips .chip.is-on, .chips .chip[data-r].is-on, .chips .chip[data-r].is-on:hover { color: var(--foreground); font-weight: 500 } /* medium, owner 14.11 «давай medium попробуем» */
.chips .chip.is-on::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 4px; border-radius: 2px;
  background: var(--r, var(--foreground))
}
.chips .chip:focus-visible { outline-offset: -2px }

/* Subtopics under a rubric: one swipeable row of small pills, regular weight (owner 13.11) */
nav.topics { flex-wrap: nowrap; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 10px -16px 0; padding: 0 16px }
nav.topics::-webkit-scrollbar { display: none }
nav.topics a, nav.topics a[data-r] { flex-shrink: 0; white-space: nowrap; min-height: 28px; padding: 0 10px; font-size: clamp(12px, .8125rem, 19.5px); font-weight: 400 }

/* Header row: logo centred, no «Войти» for now; sign-in lives in the tab bar's Профиль (owner 14.11) */
.mast { display: flex; align-items: center; justify-content: center; gap: 12px; padding-bottom: 16px } /* same 16px as above the logo (owner 15.11) */
.mast .who { margin: 0 }

/* Tab switch (owner 2026-11-13: «Шапка остается на месте, свайпается только контент»):
   header and tabs stay put, only the content slides fully in the swipe direction. */
.mast { view-transition-name: mast; }
/* tab swipe from a scrolled feed: keep the logo out of view, nav.js-free (owner 14.11) */
html.tabhide .mast { display: none; }
.bar { view-transition-name: tabs; }
::view-transition-group(mast), ::view-transition-group(tabs),
::view-transition-new(mast), ::view-transition-new(tabs) { animation: none; }
::view-transition-old(mast), ::view-transition-old(tabs) { display: none; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes tab-out-l { to { transform: translateX(-100%); } }
  @keyframes tab-in-r { from { transform: translateX(100%); } }
  @keyframes tab-out-r { to { transform: translateX(100%); } }
  @keyframes tab-in-l { from { transform: translateX(-100%); } }
  html:active-view-transition-type(tab-next)::view-transition-old(root) { animation: tab-out-l 260ms cubic-bezier(.2,.8,.2,1) both; box-shadow: none; z-index: auto; }
  html:active-view-transition-type(tab-next)::view-transition-new(root) { animation: tab-in-r 260ms cubic-bezier(.2,.8,.2,1) both; box-shadow: none; }
  html:active-view-transition-type(tab-prev)::view-transition-old(root) { animation: tab-out-r 260ms cubic-bezier(.2,.8,.2,1) both; box-shadow: none; z-index: auto; }
  html:active-view-transition-type(tab-prev)::view-transition-new(root) { animation: tab-in-l 260ms cubic-bezier(.2,.8,.2,1) both; box-shadow: none; }
}
/* Bottom tab bar, iOS style (owner 2026-11-13; 62pt capsule and circles, 20pt side inset measured from iOS 26 screenshots, no official spec; stronger glass per owner 13.11). Local writer tb1, fixes by Claude. */
.ls-consent { display: flex; gap: 10px; align-items: center; min-height: 44px; margin: 4px 0 0; font-size: clamp(12px, .875rem, 21px); text-align: left; cursor: pointer }
.ls-consent input { margin: 0; width: 20px; height: 20px; flex: none }
.ls-form .ls-legal { margin: 16px 0 24px; }
.ls-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.ls-shake { animation: ls-shake 400ms; }
.ls-shake input { outline: 2px solid #ff3b30; outline-offset: 2px; }
@keyframes ls-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .ls-shake { animation: none; } }
/* while the sheet is open nothing of the page shows: not under the keyboard, not under the home indicator (owner 16.11) */
html.ls-on body > :not(.ls-sheet):not(.ls-backdrop) { visibility: hidden; }
html.ls-on .ls-backdrop { background-color: var(--background); min-height: 100lvh; bottom: calc(-1 * env(safe-area-inset-bottom)); }
.ls-consent a { color: inherit; text-decoration: underline }
.me-delete { opacity: .7 }
.ls-legal, .c-legal { margin: 8px 0 0; font-size: clamp(12px, .8125rem, 20px); color: #888 }
.ls-legal a, .c-legal a { color: inherit; text-decoration: underline }
.cookie-bar .cookie-no { background: transparent; color: inherit; border: 1px solid currentColor }
.story.policy .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch }
.story.policy table { border-collapse: collapse; min-width: 480px }
.story.policy th, .story.policy td { border: 1px solid #8884; padding: 6px 8px; text-align: left; vertical-align: top }
.cookie-bar { position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 60; display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 16px; background: var(--background); color: var(--foreground); box-shadow: 0 4px 24px rgb(0 0 0 / .18); font-size: clamp(12px, .875rem, 21px) }
.cookie-bar { flex-wrap: wrap }
.cookie-bar p { margin: 0; flex: 1 1 100% }
.cookie-bar a { color: inherit; text-decoration: underline }
.cookie-bar button { flex: none; border: 0; border-radius: 999px; padding: 8px 16px; background: var(--foreground); color: var(--background); font: inherit; font-weight: 600; cursor: pointer }
@media (min-width: 768px) { .cookie-bar { left: auto; right: 24px; bottom: 24px; max-width: 440px } }

.tabbar {
  display: none;
}

@media (max-width: 767px) {
  .tabbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 50;
    gap: 10px;
    pointer-events: none;
    transition: transform 300ms cubic-bezier(.2,.8,.2,1);
  }

  .tabbar > * {
    pointer-events: auto;
  }

  html[data-tabbar="hidden"] .tabbar {
    transform: translateY(calc(100% + 24px));
  }

  body {
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
  }

  .tb-circle, .tb-pill {
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
  }

  @media (prefers-color-scheme: dark) {
    .tb-circle, .tb-pill {
      /* owner 13.11 night screenshot vs Apple News: grey glass lighter than the black page, darker selected pill */
      /* pixel-matched to Apple News dark (owner 13.11): bar ~#343436 fading to ~#2e2e30, top edge ~#838385, selected ~#161618 */
      border: 1px solid rgb(255 255 255 / .1);
      background: linear-gradient(rgb(56 56 59 / .45), rgb(44 44 47 / .45));
      box-shadow: inset 0 1px 0 rgb(255 255 255 / .38), 0 8px 28px rgb(0 0 0 / .6);
    }
    .tb-pill .tb-item.is-on { background: rgb(22 22 24 / .92); }
  }

  .tb-circle {
    width: 62px;
    height: 62px;
    flex: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .tb-pill {
    display: flex;
    height: 62px;
    padding: 4px;
    border-radius: 999px;
    gap: 2px;
  }

  .tb-item {
    width: 58px;
    height: 100%;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .tb-circle svg, .tb-item svg {
    width: 26px;
    height: 26px;
    color: var(--foreground);
  }

  .tb-item.is-on {
    background: color-mix(in oklab, var(--foreground) 10%, transparent);
  }

  .tb-circle, .tb-item {
    -webkit-tap-highlight-color: transparent;
    transition: transform 120ms;
  }
  .tb-circle:active, .tb-item:active { transform: scale(.92); }

  @media (prefers-reduced-motion: reduce) {
    .tabbar, .tb-circle, .tb-item {
      transition: none;
    }
  }

  /* names on the three parts, not on .tabbar: a view-transition-name makes an element a Backdrop Root,
     and then the children's backdrop-filter blurs nothing (owner 14.11: «блёров нет»). */
  .tabbar > .tb-circle:first-child { view-transition-name: tb-home; }
  .tabbar > .tb-pill { view-transition-name: tb-pill; }
  .tabbar > .tb-circle:last-child { view-transition-name: tb-me; }

  ::view-transition-group(tb-home), ::view-transition-group(tb-pill), ::view-transition-group(tb-me),
  ::view-transition-new(tb-home), ::view-transition-new(tb-pill), ::view-transition-new(tb-me) {
    animation: none;
  }

  ::view-transition-old(tb-home), ::view-transition-old(tb-pill), ::view-transition-old(tb-me) {
    display: none;
  }
}

.saved {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.saved li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.saved a {
  color: var(--foreground);
  text-decoration: none;
  font-size: clamp(12px, 1rem, 24px);
}

/* Comment threads, docs/COMMENTS-THREADS-PLAN.md */
.c-sort {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.c-sort button {
  padding: 8px 12px;
  border-radius: 20px;
  background: var(--muted);
  color: var(--muted-foreground);
  border: none;
  font: inherit;
  cursor: pointer;
}

.c-sort button[aria-pressed="true"] {
  background: var(--foreground);
  color: var(--background);
}

.c-thread {
  list-style: none;
  margin-bottom: 12px;
}

.c-replies {
  margin-left: 52px;
  padding-left: 12px;
  border-left: 2px solid var(--border);
}

@media (max-width: 480px) {
  .c-replies {
    margin-left: 20px;
  }

  .c-replies .letter-ava {
    width: 28px;
    height: 28px;
    font-size: clamp(12px, .8125rem, 19.5px);
  }
}

.c-acts {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.c-acts button {
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  font: inherit;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.c-acts button:hover {
  background-color: var(--muted);
}

.c-like[aria-pressed="true"] {
  color: #e5484d;
}

.c-to {
  color: var(--foreground);
  cursor: pointer;
  font-weight: 600;
}

.c-flash {
  animation: cFlash 1.5s ease-out forwards;
}

@keyframes cFlash {
  0% {
    background-color: color-mix(in srgb, var(--emphasis) 18%, transparent);
  }
  100% {
    background-color: transparent;
  }
}

.c-deleted .reply-text {
  color: var(--muted-foreground);
  font-style: italic;
}

.c-more {
  background: none;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  padding: 4px 0;
}

.c-reply-form {
  margin-top: 12px;
  padding: 8px 0;
}

.c-reply-form textarea {
  width: 100%;
  height: auto;
  min-height: calc(3 * 16px + 20px);
  max-height: none;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: clamp(12px, 1rem, 24px);
  resize: none;
  box-sizing: border-box;
}

.c-reply-form button {
  display: block;
  margin-top: 8px;
  padding: 8px 18px;
  background-color: var(--foreground);
  color: var(--background);
  border-radius: 20px;
  font-weight: bold;
  border: none;
}

.c-reply-form button:disabled {
  opacity: 0.5;
}
.c-reply-li { list-style: none; }
.c-like-n { margin-left: 4px; }

/* Rubric pages: the active tab is the h1, no separate title (owner 14.11) */
.chip-h1 { display: inline; margin: 0; font: inherit; color: inherit; }
.chip > svg { vertical-align: -3px; margin-right: 5px; }
/* the pager moves main.main sideways: clip overflow so iOS never pans the whole page (owner 14.11: header «прижимает к левой границе… отпружинивает») */
html, body { overflow-x: clip; }

/* Tab pager: vertical scroll stays native, horizontal drags go to swipe.js without blocking listeners (owner 14.11) */
@media (pointer: coarse) { main.main { touch-action: pan-y pinch-zoom; } }

/* Moving tab underline during a swipe (swipe.js, owner 14.11) */
nav.chips { position: relative; }
.chip-ind { position: absolute; left: 0; bottom: 0; height: 4px; border-radius: 2px; pointer-events: none; will-change: transform, width; }
nav.chips.dragging .chip.is-on::after { opacity: 0; }

/* Login sheet, docs/LOGIN-SHEET-PLAN.md */
.ls-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, .4);
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  transition: opacity 320ms cubic-bezier(.2,.8,.2,1);
}
.ls-backdrop.ls-open {
  opacity: 1;
  pointer-events: auto;
}

.ls-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 480px;
  margin: 0 auto;
  max-height: 92vh;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--background);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, .15);
  transform: translateY(100%);
  transition: transform 320ms cubic-bezier(.2,.8,.2,1);
  z-index: 1001;
}
.ls-sheet.ls-open {
  transform: none;
}

.ls-bubbles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.ls-bubbles span {
  position: absolute;
  bottom: -130px;
  animation: ls-rise linear infinite;
}
.ls-bubbles i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  opacity: .18;
  animation: ls-pulse ease-in-out infinite alternate;
}
@keyframes ls-rise {
  from { bottom: -130px; transform: scale(.7); }
  to { bottom: 100%; transform: scale(1.15); }
}
@keyframes ls-pulse {
  from { transform: scale(.75); }
  to { transform: scale(1.2); }
}
@media (prefers-color-scheme: dark) {
  .ls-bubbles i { opacity: .28; }
}
@media (prefers-reduced-motion: reduce) {
  .ls-bubbles span, .ls-bubbles i { animation: none; }
  .ls-sheet, .ls-backdrop { transition: none; }
}

.ls-grab {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 40px;
  height: 5px;
  box-sizing: content-box;
  padding: 8px 24px 14px;
  background-clip: content-box;
  touch-action: none;
  background-color: var(--muted-foreground);
  border-radius: 2px;
}

.ls-x {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  padding: 0;
}
.ls-x svg {
  width: 24px;
  height: 24px;
}

.ls-body {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  padding: 24px 20px calc(32px + env(safe-area-inset-bottom));
  overflow: auto;
}

.ls-title {
  font-size: clamp(12px, 1.25rem, 30px);
  font-weight: 600;
  margin: 0 0 12px;
}
.ls-text {
  font-size: clamp(12px, 1rem, 24px);
  line-height: 1.5;
  margin: 0 0 24px;
}
.ls-text b {
  font-weight: 600;
}

.ls-input {
  box-sizing: border-box;
  width: 100%;
  padding: 14px 16px;
  font-size: 17px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background-color: var(--background);
  color: var(--foreground);
  margin-bottom: 12px;
}
.ls-input:focus {
  outline: 2px solid var(--foreground);
  outline-offset: 1px;
}
.ls-code {
  font-size: clamp(12px, 1.75rem, 42px);
  letter-spacing: .5em;
  text-align: center;
}

.ls-code:placeholder-shown {
  caret-color: transparent;
}

/* social sign-in buttons in the providers' own colours (SOCIAL-LOGIN-PLAN, 17.11) */
.ls-sso { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 0 }
.ls-sso-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; padding: 0 15px; border: 0; border-radius: 14px; color: #fff; font: inherit; font-size: clamp(12px, 1.0625rem, 25.5px); font-weight: 600; text-decoration: none; cursor: pointer }
.ls-sso-yandex { background: #000; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25) }
.ls-sso-vk { background: #0077FF }
.ls-sso-sber { background: #21A038 }
.ls-or { margin: 16px 0 8px; text-align: center; color: #888; font-size: clamp(12px, .875rem, 21px) }
.ls-btn, .ls-link {
  width: 100%;
  padding: 15px;
  font-size: clamp(12px, 1.0625rem, 25.5px);
  font-weight: 600;
  border-radius: 14px;
  cursor: pointer;
}
.ls-btn {
  background-color: var(--foreground);
  color: var(--background);
  border: none;
}
.ls-btn[disabled] {
  opacity: .5;
  cursor: not-allowed;
}
.ls-btn2 {
  background-color: var(--muted);
  color: var(--foreground);
}
.ls-link {
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  font-weight: 400;
  padding: 10px 0;
}

.ls-hint {
  font-size: clamp(12px, .875rem, 21px);
  color: var(--muted-foreground);
  margin-top: 8px;
}
.ls-err {
  font-size: clamp(12px, .875rem, 21px);
  color: #d93025;
  margin-top: 8px;
}

.ls-ava {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: var(--muted);
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(12px, 2.5rem, 60px);
  font-weight: 600;
  margin: 0 auto 8px;
}

/* Counters get room up to two digits, so icons don't shift when numbers arrive (owner 14.11) */
.acts .act.reply, .acts .act.like, .acts .act.views, .acts .act.share { min-width: 52px; justify-content: flex-start; }
.acts[data-ph] .act { pointer-events: none; }

/* Login sheet first step: large wordmark without the dots, tinted by theme (owner 14.11) */
.ls-brand { margin: 16px 0 16px; line-height: 0; }
.ls-logo { display: block; width: 240px; max-width: 70%; aspect-ratio: 4558 / 747; background: var(--foreground);
  -webkit-mask: url(/assets/brand/wordmark.svg) left center / contain no-repeat; mask: url(/assets/brand/wordmark.svg) left center / contain no-repeat; }

/* «Для вас» for a signed-out reader: the sign-in form on the page, balls over the whole screen (owner 14.11) */
.ls-inline { position: relative; min-height: calc(100vh - 130px); min-height: calc(100dvh - 130px); } /* the balls fill the screen under the tabs */
.ls-inline > .ls-body { position: relative; z-index: 1; overflow: visible; /* page scroll, so the sticky «Готово» works */ max-width: 480px; margin: 0 auto; }

/* sign-up onboarding: @username field and the topic picker (owner 14.11) */
.ls-at { display: block; position: relative; }
.ls-at > span { position: absolute; left: 16px; top: 15px; font-size: 17px; line-height: 20px; color: var(--muted-foreground); pointer-events: none; }
.ls-at > .ls-input { padding-left: 34px; }
.ls-group { margin: 16px 0 8px; font-size: clamp(12px, .8125rem, 19.5px); font-weight: 600; color: var(--muted-foreground); }
.ls-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.ls-topic { min-height: 36px; padding: 0 14px; border: 0; border-radius: 9999px; font: inherit; font-size: clamp(12px, .875rem, 21px); font-weight: 500; cursor: pointer;
  background: color-mix(in srgb, var(--r, #64748b) 14%, var(--background)); color: var(--foreground); }
.ls-topic[aria-pressed="true"] { background: var(--r, #64748b); color: #fff; }
.ls-go { position: sticky; bottom: 0; margin-top: 20px; }
/* the sticky button floats over chips: opaque, with a ring of page colour so nothing shows through or around it (owner 15.11) */
.ls-go { box-shadow: 0 0 0 10px var(--background), 0 60px 0 40px var(--background); }
.ls-go[disabled] { opacity: 1; background-color: color-mix(in oklab, var(--foreground) 45%, var(--background)); }
.ls-inline .ls-go { bottom: calc(96px + env(safe-area-inset-bottom)); } /* on the page: above the tab bar */

/* phone cards: smaller avatar, tighter sides, wider and larger text (owner 14.11: «уменьшить Аватар, отступы … увеличить поле для текста и сам текст») */
@media (max-width: 640px) {
  .feed .card { margin-left: -6px; margin-right: -6px; gap: 8px; }
  .card > .ava, .card > .ava img { width: 32px; height: 32px; }
  /* owner 14.11 later: «что-то среднее между тем, что было, и тем, что есть» (16 → 17 → 16.5) */
  .card-title { font-size: 1rem; line-height: 1.5; } /* same size and leading as .card-text (owner 14.11) */
  .card-text { font-size: 1rem; line-height: 1.5; }
}
/* Photos, docs/PHOTO-SYSTEM-PLAN.md */
.ph{margin:12px 0 0}
.ph img{display:block;width:100%;height:auto;max-height:640px;object-fit:contain;background:var(--muted);border:1px solid var(--border);border-radius:16px}
.ph figcaption{margin-top:6px;font-size:12px;line-height:1.4;color:var(--muted-foreground)}
.ph figcaption a{color:inherit;text-decoration:underline;text-underline-offset:2px}
.ph figcaption a.lic{text-decoration:none}
.ph figcaption a.lic:hover{text-decoration:underline}
.card .ph{margin-top:10px}
.story-body .ph{margin:16px 0 20px}

/* Menu bar: blur only, no gradient fade; thin hairlines above and below, same as the story page topbar (owner 14.11) */
.bar::before { inset: 0; mask-image: none; -webkit-mask-image: none; }
.bar { border-top: 1px solid #eff3f4; border-bottom: 1px solid #eff3f4 }
@media (prefers-color-scheme: dark) { .bar { border-top-color: #2f3336; border-bottom-color: #2f3336 } }

/* Author name and rubric: medium, not bold (owner 14.11: «не жирным, а полужирным») */
.agent, .card-meta .agent, a.badge, .card-meta a.badge, .card-meta a.badge[data-r] { font-weight: 500 }

/* Unread counter on section tabs (unread.js, owner 14.11) */
.chip-n { display: inline-block; min-width: calc(2.4ch + 10px); height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; box-sizing: border-box; background: var(--unread); color: var(--background); font-size: 12px; font-weight: 400; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums } /* regular, owner 15.11 «не нужны жирные счётчики» */

/* Login and sign-up: full-screen layer like x.com, close cross in the corner (owner 14.11) */
.ls-sheet { top: 0; max-width: none; max-height: none !important; border-radius: 0; box-shadow: none; }
.ls-grab { display: none; }
.ls-x { top: calc(8px + env(safe-area-inset-top)); left: auto; right: max(8px, calc((100% - var(--site-w)) / 2 + 8px)); width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--foreground); }
.ls-x:hover { background: color-mix(in oklab, var(--foreground) 8%, transparent); }
/* cross on the right, at the edge of the site column rather than the window (owner 15.11); --site-w mirrors .app max-width */
.ls-x { width: 48px; height: 48px; background: color-mix(in oklab, var(--background) 45%, transparent); backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%); border: 1px solid rgb(255 255 255 / .75); box-shadow: inset 0 1px 0 rgb(255 255 255 / .9), inset 0 -1px 0 rgb(0 0 0 / .04), 0 0 0 .5px rgb(0 0 0 / .14), 0 8px 28px rgb(0 0 0 / .16); } /* glass circle like the tab bar (owner 15.11) */
.ls-x:active { transform: scale(.92); }
@media (prefers-color-scheme: dark) { .ls-x { border: 1px solid rgb(255 255 255 / .1); background: linear-gradient(rgb(56 56 59 / .45), rgb(44 44 47 / .45)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .38), 0 8px 28px rgb(0 0 0 / .6); } }
:root { --site-w: 672px }
@media (min-width: 768px) { :root { --site-w: 1000px } }
@media (min-width: 1200px) { :root { --site-w: 1280px } }
.ls-sheet > .ls-body { width: 100%; max-width: 440px; margin: 0 auto; box-sizing: border-box; padding-top: calc(68px + env(safe-area-inset-top)); }

/* Unread and read dots like iPhone Mail: system blue, then grey; dark-theme values from iOS so both stay visible on black (owner 14.11) */
:root { --dot: #007aff; --read-ink: #5c5c61; }
@media (prefers-color-scheme: dark) { :root { --dot: #0a84ff; --read-ink: #9d9da3; } }
.chip-n { background: var(--dot); }
/* links in story text (owner 16.11): underline in the text colour, as low as the line box allows; desktop hover = logo purple underline */
/* room below the baseline, measured with Golos 16-17px: story 1.65 = .47em, card 1.3 = .30em, card 1.5 = .375em; card-text clips with overflow:hidden, so offset + 2px hover thickness must fit */
.story-body p a, .card-text p a { color: inherit; text-decoration-line: underline; text-decoration-color: currentColor; text-decoration-thickness: max(1px, .07em); text-decoration-skip-ink: auto; text-underline-offset: .32em; }
.card-text p a { text-underline-offset: .16em; }
@media (max-width: 640px) { .card-text p a { text-underline-offset: .24em; } }
.story-body p a:visited, .card-text p a:visited { color: inherit; }
/* #B98AFF text on white is 2.6:1, so only the underline changes colour, made thicker to read */
.story-body p a:focus-visible, .card-text p a:focus-visible { text-decoration-color: #B98AFF; text-decoration-thickness: 2px; }
@media (hover: hover) and (pointer: fine) { .story-body p a:hover, .card-text p a:hover { text-decoration-color: #B98AFF; text-decoration-thickness: 2px; } }

/* No unread mark on cards: the avatar ring read as «stories waiting» (owner 15.11), greying was «плохо гасить цвет» (owner 15.11). Only the «Вы остановились здесь» line marks the border. */
/* «Вы остановились здесь»: one line between new and already seen stories in a feed */
.seen-line { display: flex; align-items: center; gap: 12px; margin: 8px 0; color: var(--muted-foreground); font-size: clamp(12px, .8125rem, 19.5px); }
.seen-line::before, .seen-line::after { content: ""; flex: 1; height: 1px; background: var(--border); }
@media (prefers-color-scheme: dark) { .react-pick { background: #1c1c1e; } } /* iOS dark bubble, owner 14.11 «как Apple» */
.act.like[aria-pressed="true"]:not([data-kind="heart"]) { color: var(--dot); } /* glyph and count both blue (critic 14.11) */

/* Comments empty state with a call to action (owner 14.11) */
.empty-comment { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 28px 16px; list-style: none; color: var(--muted-foreground) }
.empty-comment p { margin: 0 }
.empty-comment .ec-title { color: var(--foreground); font-size: clamp(12px, 1.0625rem, 25.5px); font-weight: 600; margin-top: 8px }
.empty-comment .ec-sub { font-size: clamp(12px, .9375rem, 22.5px) }
.ec-cta { margin-top: 14px; min-height: 44px; padding: 0 22px; border: none; border-radius: 999px; background: var(--foreground); color: var(--background); font: inherit; font-weight: 600; cursor: pointer }
.is-empty .composer > .composer-pill { display: none } /* the CTA above opens it */
/* Comments under an expanded feed card (owner 17.11): the story-page thread, compact */
.card-comments { margin-top: 12px; }
.card:not(.open) .card-comments { display: none; }
.card-comments.is-preview .reply-text { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-comments .empty-comment { flex-direction: row; align-items: center; justify-content: space-between; text-align: left; gap: 12px; padding: 4px 0; }
.card-comments .ec-cta { margin-top: 0; flex: none; }
.c-all { list-style: none; }
.c-all-btn { min-height: 44px; padding: 0; border: 0; background: none; color: var(--foreground); font: inherit; font-weight: 600; cursor: pointer; }
.c-sort[hidden] { display: none !important }
@media (min-width: 641px) { .card-title { line-height: 1.3; } } /* desktop: same leading as .card-text, size is 1rem in both (owner 14.11) */

/* Collapsed card: whole lines only, «… Показать всё» inline in the text size (owner 14.11) */
/* cut cards keep the same paragraph gaps as open ones, so «Показать всё» only adds text below (owner 15.11) */
.card .card-text { max-height: none; } /* the 5-line clamp alone, gaps included, before and after the JS cut: max-height had no room for a gap (critic p27) */
.card-text .more { display: inline; margin: 0; font: inherit; line-height: inherit; white-space: nowrap; }

/* Feed card rhythm (owner 14.11): title to text = one text line gap, more air under the author, smaller author line */
.card .card-meta { font-size: clamp(12px, .825rem, 19.8px); /* +10% (owner 15.11) */ line-height: 1.5; } /* whole line at the «цифровой автор» size, weights and colours kept (owner 15.11) */
.card .card-meta .ai { font-size: inherit; }
.card .card-title { margin-top: 8px; margin-bottom: 0; }
.card .card-text { margin-top: 8px; } /* same gap as author→title (owner 15.11) */

/* Desktop and wide foldables (owner 15.11): logo and vertical menu on the left, feed in the middle,
   a right rail with typical content where the ad slot will go (≥1200px). Phones keep the old DOM flow:
   .side is display:contents, so .mast and the sticky .bar behave as before. */
.side { display: contents; margin: 0 }
.side-nav, .side-foot, .rail { display: none }
.side-card { display: contents }
@media (min-width: 768px) {
  .app { max-width: 1000px; display: grid; grid-template-columns: 232px minmax(0, 1fr); column-gap: 40px; align-items: start; padding-bottom: 64px }
  .side { display: flex; flex-direction: column; gap: 20px; grid-row: 1 / span 2; position: sticky; top: 0; max-height: 100dvh; overflow-y: auto; scrollbar-width: none; padding-bottom: 24px; padding-inline: 28px; margin-inline: -28px } /* room for the glass shadow inside the scroller (critic g1) */
  .main, .app > footer { grid-column: 2; min-width: 0 }
  .mast { justify-content: flex-start; padding: 0 12px }
  .bar { position: static; margin: 0; padding: 0; border-top: 0; border-bottom: 0; view-transition-name: none }
  .bar::before { display: none }
  .chips { flex-direction: column; overflow: visible }
  .chips .chip, .chips .chip[data-r], .chips .chip:hover, .chips .chip[data-r]:hover, .chips .chip.is-on, .chips .chip[data-r].is-on, .chips .chip[data-r].is-on:hover {
    justify-content: flex-start; height: auto; min-height: 40px; padding: 0 12px; border-radius: 10px; font-size: clamp(12px, .875rem, 21px)
  }
  .chips .chip:hover { background: var(--muted) }
  .chips .chip.is-on, .chips .chip[data-r].is-on, .chips .chip[data-r].is-on:hover { background: var(--muted) }
  .chips .chip.is-on::after { display: none }
  /* unread badge pinned right, never clipped; long names wrap instead (owner 15.11 «счётчики кривые») */
  .chips .chip { white-space: normal; line-height: 1.3; padding-top: 6px; padding-bottom: 6px }
  .chips .chip-n { margin-left: auto; flex-shrink: 0; min-width: max(26px, calc(2.4ch + 10px)) }
  .side-nav { display: flex; flex-direction: column; border-top: 1px solid var(--border); padding-top: 12px }
  .side-nav a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: 10px; color: var(--muted-foreground); text-decoration: none; font-size: clamp(12px, .875rem, 21px); font-weight: 500 }
  .side-nav a:hover { background: var(--muted); color: var(--foreground) }
  .side-nav svg { flex-shrink: 0 }
  .side-card { background: var(--glass-bg); border: var(--glass-border); box-shadow: var(--glass-shadow); backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%); border-radius: 24px; padding: 8px; display: flex; flex-direction: column; gap: 12px }
  .side-foot { display: block; margin: 0; padding: 0 12px; font-size: clamp(12px, .75rem, 18px); line-height: 1.5; color: var(--muted-foreground) }
  .side-foot a { color: inherit }
  html.tabhide .mast { display: flex } /* the logo stays in the sidebar (critic 15.11) */
}
@media (min-width: 1200px) {
  .app { max-width: 1280px; grid-template-columns: 232px minmax(0, 1fr) 280px }
  .rail { display: flex; flex-direction: column; gap: 16px; grid-column: 3; grid-row: 1 / span 2; position: sticky; top: calc(env(safe-area-inset-top) - 4px); max-height: calc(100dvh + 8px); overflow-y: auto; scrollbar-width: none; padding: 28px; margin: -28px -28px 0 } /* room for the glass shadow inside the scroller, boxes stay where they were (critic g1) */
  .rail-box { background: var(--glass-bg); border: var(--glass-border); box-shadow: var(--glass-shadow); backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%); border-radius: 24px; padding: 16px }
  .rail-h { margin: 0 0 12px; font-size: clamp(12px, 1rem, 24px); font-weight: 600; color: var(--foreground) }
  .rail-box ol, .rail-box ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px }
  .rail-pop { counter-reset: pop }
  .rail-pop li { counter-increment: pop; display: grid; grid-template-columns: 20px 1fr; gap: 6px; font-size: clamp(12px, .875rem, 21px); line-height: 1.4 }
  .rail-pop li::before { content: counter(pop); color: var(--muted-foreground); font-weight: 600 }
  .rail-pop a, .rail-au a { color: var(--foreground); text-decoration: none }
  .rail-pop a:hover, .rail-au a:hover b { text-decoration: underline }
  .rail-au a { display: flex; align-items: center; gap: 10px }
  .rail-au img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0 }
  .rail-au span { display: flex; flex-direction: column; min-width: 0 }
  .rail-au b { font-size: clamp(12px, .875rem, 21px); font-weight: 500 }
  .rail-au small { font-size: clamp(12px, .75rem, 18px); color: var(--muted-foreground) }
}

/* Profile page /me/ and public /u/ lists (owner 15.11 «сделай красивый экран») */
#social-page[data-page="me"],
#social-page[data-page="user"] {
  max-width: 640px;
}

.me-head {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 24px;
  align-items: start;
}

.me-ava {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: none;
  padding: 0;
  border: 0;
  cursor: pointer;
}

.me-ava .letter-ava {
  width: 100%;
  height: 100%;
  font-size: clamp(12px, 2.25rem, 54px);
}

.me-ava-cam {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--foreground);
  color: var(--background);
  border: 2px solid var(--background);
}

.me-name {
  font-size: clamp(12px, 1.5rem, 36px);
  font-weight: 700;
  line-height: 1.2;
  margin: 12px 0 0;
}

.me-handle {
  font-size: clamp(12px, 1rem, 24px);
  color: var(--muted-foreground);
  margin: 2px 0 0;
}

.me-bio {
  font-size: clamp(12px, 1rem, 24px);
  margin: 10px 0 0;
}

.me-bio.is-empty {
  color: var(--muted-foreground);
}

.me-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.me-btn {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--muted);
  color: var(--foreground);
  font-family: inherit;
  font-weight: 500;
  text-decoration: none;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.me-btn:hover {
  background-color: color-mix(in srgb, var(--foreground) 8%, var(--muted));
}

.me-btn.is-primary {
  background: var(--foreground);
  color: var(--background);
}

.me-form {
  margin-top: 16px;
  background: var(--muted);
  border-radius: 16px;
  padding: 16px;
}

.me-form label {
  display: block;
  font-size: clamp(12px, 0.875rem, 21px);
  color: var(--muted-foreground);
  margin: 12px 0 6px;
}

.me-form label:first-child {
  margin-top: 0;
}

.me-form input,
.me-form textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: clamp(12px, 1rem, 24px);
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--background);
  color: var(--foreground);
}

.me-form input:focus-visible,
.me-form textarea:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 1px;
}

.me-count {
  display: block;
  text-align: right;
  font-size: clamp(12px, 0.75rem, 18px);
  color: var(--muted-foreground);
  margin-top: -6px;
}

.me-form-buttons {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.me-status {
  font-size: clamp(12px, 0.875rem, 21px);
  color: var(--muted-foreground);
  margin: 12px 0 0;
}

.me-status:empty {
  display: none;
}

.me-tabs {
  margin-top: 24px;
  background: var(--muted);
  border-radius: 14px;
  padding: 4px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
}

.me-tabs button[role="tab"] {
  min-height: 44px;
  border-radius: 11px;
  border: 0;
  background: transparent;
  color: var(--muted-foreground);
  font-family: inherit;
  font-size: clamp(12px, 0.875rem, 21px);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 0 6px;
  cursor: pointer;
}

.me-tabs button[role="tab"] svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.me-tab-l {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.me-tabs button[aria-selected="true"] {
  background: var(--background);
  color: var(--foreground);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.me-tab-n {
  font-size: clamp(12px, 0.75rem, 18px);
  color: var(--muted-foreground);
}

.me-panel {
  margin-top: 8px;
}

.me-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.me-row {
  padding: 14px 2px;
  border-bottom: 1px solid var(--border);
}

.me-row:last-child {
  border-bottom: none;
}

.me-row-title {
  color: var(--foreground);
  font-weight: 600;
  font-size: clamp(12px, 1rem, 24px);
  line-height: 1.35;
  text-decoration: none;
}

.me-row-title:hover,
.me-row-title:focus {
  text-decoration: underline;
}

.me-row-time {
  display: block;
  margin-top: 4px;
  font-size: clamp(12px, 0.8125rem, 19.5px);
  color: var(--muted-foreground);
}

.me-row-text {
  font-size: clamp(12px, 0.9375rem, 22.5px);
  line-height: 1.5;
  margin: 6px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.me-empty {
  text-align: center;
  padding: 40px 16px;
}

.me-empty-ico {
  width: 40px;
  height: 40px;
  color: var(--muted-foreground);
  display: block;
  margin: 0 auto 12px;
}

.me-empty-ico svg {
  width: 40px;
  height: 40px;
}

.me-empty p {
  color: var(--muted-foreground);
  font-size: clamp(12px, 1rem, 24px);
  max-width: 28ch;
  margin: 0 auto 16px;
}

.me-foot {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.me-logout {
  width: 100%;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--muted-foreground);
  border-radius: 12px;
  font-family: inherit;
  font-size: clamp(12px, 0.9375rem, 22.5px);
  cursor: pointer;
}

.me-logout:hover {
  background: var(--muted);
  color: var(--foreground);
}

.me-form[hidden],
.me-panel[hidden] {
  display: none;
}

@media (min-width: 768px) {
  .me-ava {
    width: 104px;
    height: 104px;
  }
}

/* me page polish after first screenshots */
.me-head { display: block; }
.me-ava-cam { display: flex; align-items: center; justify-content: center; }
.me-ava-cam svg { width: 16px; height: 16px; }
.me-foot { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.me-tabs button[role="tab"] { gap: 4px; padding: 0 4px; font-size: clamp(12px, 0.8125rem, 19.5px); }
@media (max-width: 480px) { .me-tabs button[role="tab"] svg { display: none; } }
.me-btn { font-size: clamp(12px, 0.875rem, 21px); }
@media (prefers-color-scheme: dark) { .me-tabs button[aria-selected="true"] { background: color-mix(in srgb, var(--foreground) 14%, var(--muted)); box-shadow: none; } }
.me-ava img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }

/* «Для вас»: nothing unread left (owner 15.11) */
.fy-empty { padding: 48px 16px; text-align: center; color: var(--muted-foreground); font-size: 1rem; line-height: 1.5; }
.fy-empty a { color: var(--foreground); }
/* Pair onboarding (onb.js, owner 15.11) */
.ob-dots {
  display: flex;
  gap: 8px;
  margin: 16px 0;
}

.ob-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: color-mix(in srgb, var(--foreground) 18%, var(--background));
}

.ob-dots .ob-done {
  background-color: var(--foreground);
}

.ob-dots .ob-now {
  width: 24px;
  border-radius: 12px;
  background-color: var(--foreground);
}

.ob-card {
  display: block;
  width: 100%;
  text-align: left;
  margin: 0 0 12px;
  padding: 16px 18px;
  border: 0;
  border-left: 5px solid var(--r);
  border-radius: 14px;
  font: inherit;
  color: var(--foreground);
  background-color: color-mix(in srgb, var(--r) 12%, var(--background));
  cursor: pointer;
  transition:
    transform 160ms,
    box-shadow 160ms;
  min-height: 44px;
}

.ob-card:hover,
.ob-card:focus-visible {
  outline: 2px solid var(--r);
  outline-offset: 2px;
}

.ob-card:hover {
  background-color: color-mix(in srgb, var(--r) 20%, var(--background));
}

.ob-rub {
  display: block;
  font-size: .75rem; /* 12px */
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--rt);
  margin-bottom: 6px;
}

.ob-t {
  display: block;
  font-size: clamp(1rem, 4.4vw, 1.25rem);
  line-height: 1.35;
  font-weight: 600;
}

.ob-picked {
  background-color: var(--r);
  color: #fff;
  transform: scale(1.03);
}

.ob-picked .ob-rub {
  color: #fff;
}

.ob-none-on .ob-card {
  opacity: .4;
  transition: opacity 200ms;
}

@keyframes ob-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .ob-card:nth-of-type(1) {
    animation: ob-in 260ms ease-out forwards;
  }

  .ob-card:nth-of-type(2) {
    animation: ob-in 260ms ease-out 70ms forwards;
  }
}

/* Onboarding: the heading takes focus for screen readers, no visible frame */
.ls-title[tabindex="-1"]:focus { outline: none; }
/* Pair onboarding, owner 18.11: layout of variant 2 (soft cards, rubric pill with a dot, outlined «Пропустить», grey «Ни то ни другое», circles away from text), type of variant 1. Scoped with :has(.ob-cards) so the sign-in steps keep their look */
.ls-sheet:has(.ob-cards) .ls-bubbles { -webkit-mask-image: radial-gradient(circle at 100% 100%, #000 0, #000 30%, transparent 55%); mask-image: radial-gradient(circle at 100% 100%, #000 0, #000 30%, transparent 55%); }
.ls-sheet:has(.ob-cards) .ls-bubbles i { opacity: .14; }
.ob-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 24px; }
.ob-top .ob-dots { margin: 0; gap: 6px; }
.ob-top .ob-dots i { width: 8px; height: 8px; }
.ob-top .ob-dots .ob-now { width: 20px; }
.ob-skip { min-height: 44px; padding: 0 16px; border: 1.5px solid color-mix(in srgb, var(--foreground) 30%, var(--background)); border-radius: 999px; background: transparent; font: inherit; font-size: .9375rem; font-weight: 600; color: var(--foreground); cursor: pointer; }
.ls-body:has(.ob-cards) .ls-title { font-size: clamp(1.75rem, 7.5vw, 2.125rem); font-weight: 800; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 10px; }
.ls-body:has(.ob-cards) .ls-text { font-size: 1rem; color: var(--muted-foreground); margin: 0 0 24px; }
.ob-card { border: 0; background-color: var(--background); border-radius: 18px; padding: 18px 20px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 16px rgba(0, 0, 0, .07); }
.ob-rub { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 999px; background: color-mix(in srgb, var(--r) 12%, var(--background)); letter-spacing: 0; margin-bottom: 10px; }
.ob-rub::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--r); }
.ob-t { font-size: 1.0625rem; font-weight: 500; line-height: 1.38; }
.ob-card.ob-picked { background-color: var(--r); }
.ob-picked .ob-rub { background: rgb(255 255 255 / .2); }
.ob-picked .ob-rub::before { background: #fff; }
.ob-none { display: block; width: 100%; margin-top: 6px; padding: 14px; min-height: 48px; border: 0; border-radius: 14px; background: color-mix(in srgb, var(--foreground) 7%, var(--background)); font: inherit; font-size: 1rem; font-weight: 600; color: var(--foreground); cursor: pointer; }
@media (prefers-color-scheme: dark) { .ob-card { box-shadow: none; background-color: color-mix(in srgb, var(--foreground) 7%, var(--background)); border: 1px solid color-mix(in srgb, var(--foreground) 10%, var(--background)); } .ob-none { background: color-mix(in srgb, var(--foreground) 12%, var(--background)); } }

/* «Для вас» exploration slot label (owner 15.11) */
.card .card-meta .fy-new { margin-right: 6px; color: var(--dot); font-weight: 500; white-space: nowrap; }

/* Unread dot (owner 15.11): green like an «on» indicator, after the last word of the title, raised like an exponent.
   Read cards have no dot at all. Shown only once unread.js has storage (html.ur-ready). Not interactive. */
:root { --dot-on: #34c759; --fresh: #1a7f37; }
@media (prefers-color-scheme: dark) { :root { --dot-on: #30d158; --fresh: #30d158; } }
/* «Свежее» right after the dot (owner 15.11). The space stays reserved on read cards (hidden), so the title never moves. */
.ur-ready .feed > .card[data-story] .card-title::after {
  content: "Свежее"; content: "Свежее" / "Непрочитано";
  display: inline; margin-left: 4px; padding-left: 11px; white-space: nowrap; /* inline: no break before it, the last word wraps together with the label (prod check 15.11) */
  font-size: clamp(12px, .75rem, 18px); line-height: 1; font-weight: 400; color: var(--fresh); vertical-align: super;
  background: radial-gradient(circle at 3.5px 50%, var(--dot-on) 3.5px, transparent 4px) no-repeat;
}
.ur-ready .feed > .card[data-story].is-read .card-title::after { visibility: hidden; opacity: 0; }
.ur-ready .feed > .card[data-story].is-read:not(.was-read) .card-title::after { transition: opacity .6s ease, visibility 0s .6s; } /* fades out on screen; cards read on an earlier visit do not fade on load (critic p30) */
/* gentle pulse while the card is being counted, only when well visible in the upper part of the screen (owner 15.11 «даже не моргает») */
@keyframes ur-pulse { 50% { opacity: .35; } }
.ur-ready .feed > .card[data-story].is-reading .card-title::after { animation: ur-pulse 1.2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .ur-ready .feed > .card[data-story].is-reading .card-title::after { animation: none; } .ur-ready .feed > .card[data-story].is-read .card-title::after { transition: none; } }
/* ?urdebug=1: per card counted ms, state and reading area (unread.js) */
html.urdebug .card-meta[data-ur]::after { content: attr(data-ur); display: block; font: 12px/1.3 ui-monospace, monospace; color: #c00; }
@media (forced-colors: active) { .ur-ready .feed > .card[data-story] .card-title::after { color: CanvasText; background: radial-gradient(circle at 3.5px 50%, CanvasText 3.5px, transparent 4px) no-repeat; forced-color-adjust: none; } }

/* Profile /me/ as a full-screen layer: no logo, tabs or tab bar, avatar on top, close cross in the corner (owner 15.11) */
.sheet-page .side, .sheet-page footer, .sheet-page .rail, .sheet-page .tabbar { display: none; }
.sheet-page .main { padding-top: calc(16px + env(safe-area-inset-top)); padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
.sheet-page .sheet-x { position: fixed; z-index: 20; }

/* Top tabs (Для вас, Все, rubrics) on the same glass as the bottom tab bar (owner 15.11). The glass sits on .bar itself,
   not on .bar::before: .bar has a view-transition-name, which makes it a Backdrop Root, so a child's backdrop-filter
   blurs nothing (same trap as the tab bar, owner 14.11 «блёров нет»). */
@media (max-width: 767px) {
  .bar { background: color-mix(in oklab, var(--background) 45%, transparent); backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%); }
  .bar::before { display: none; }
}
@media (max-width: 767px) and (prefers-color-scheme: dark) {
  .bar { background: linear-gradient(rgb(56 56 59 / .45), rgb(44 44 47 / .45)); }
}

/* Tabs as capsules (owner 15.11: «выделение… фоном, не подчеркиванием»): the active tab gets an inner capsule, no underline.
   Stuck on a phone, the strip floats as a glass pill with the bottom tab bar's tokens (owner 15.11, reference: iOS segmented control). */
:root { --cap: color-mix(in oklab, var(--foreground) 10%, transparent); }
@media (prefers-color-scheme: dark) { :root { --cap: rgb(255 255 255 / .14); } }
nav.chips { isolation: isolate; }
.chips .chip { isolation: isolate; align-items: center; }
.chips .chip.is-on::after, .chips .chip[data-r].is-on::after {
  top: 1px; bottom: 1px; left: 1px; right: 1px; height: auto; border-radius: 999px; background: var(--cap); z-index: -1; /* 5px from the capsule on every side, concentric (owner 15.11 «марджины», slimmer «как в телеграме») */
}
.chip-ind { top: 1px; bottom: 1px; height: auto; border-radius: 999px; background: var(--cap) !important; z-index: -1; }
/* glass of the tab bar, one set of values for phones and the desktop panels (owner 16.11) */
:root {
  --glass-bg: color-mix(in oklab, var(--background) 45%, transparent);
  --glass-border: 1px solid rgb(255 255 255 / .75);
  --glass-shadow: inset 0 1px 0 rgb(255 255 255 / .9), inset 0 -1px 0 rgb(0 0 0 / .04), 0 0 0 .5px rgb(0 0 0 / .14), 0 8px 28px rgb(0 0 0 / .16);
}
@media (max-width: 767px) {
  html .bar {
    margin: 0; top: calc(env(safe-area-inset-top) + 8px); padding: 3px;
    border: var(--glass-border); border-radius: 999px; background: var(--glass-bg); box-shadow: var(--glass-shadow);
    backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
  }
  html .bar::before { display: none; }
  html .chips { border-radius: 999px; }
  /* edge fades only on a side that has more tabs to scroll to (critic 15.11) */
  html .chips.fade-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px); mask-image: linear-gradient(90deg, transparent, #000 16px); }
  html .chips.fade-r { -webkit-mask-image: linear-gradient(270deg, transparent, #000 16px); mask-image: linear-gradient(270deg, transparent, #000 16px); }
  html .chips.fade-l.fade-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent); mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent); }
  html .chips .chip, html .chips .chip[data-r], html .chips .chip:hover, html .chips .chip[data-r]:hover, html .chips .chip.is-on, html .chips .chip[data-r].is-on, html .chips .chip[data-r].is-on:hover { flex: 1 0 auto; justify-content: center; height: 36px; } /* 44px bar overall, slim like the Telegram folder tabs (owner 15.11 «пилюлю по вертикали поуже»); :hover too, it sticks after a tap and used to grow the tab to 44px (owner 17.11 «прыгает вниз») */
  html.bar-stuck .bar { box-shadow: var(--glass-shadow), 0 12px 32px rgb(0 0 0 / .12); }
}
@media (prefers-color-scheme: dark) {
  :root {
    --glass-bg: linear-gradient(rgb(56 56 59 / .45), rgb(44 44 47 / .45));
    --glass-border: 1px solid rgb(255 255 255 / .1);
    --glass-shadow: inset 0 1px 0 rgb(255 255 255 / .38), 0 8px 28px rgb(0 0 0 / .6);
  }
}
@media (max-width: 767px) and (prefers-color-scheme: dark) {
  html .bar { --cap: #636366; } /* opaque grey, lighter than the glass, label 4.9:1 over any photo (owner 17.11 «выделение не видно… посветлее серый», critic t1) */
}
/* dark desktop glass: secondary text to AA, active pill and hover visible on the glass (16.11) */
@media (min-width: 768px) and (prefers-color-scheme: dark) {
  .side-card, .rail-box { --muted: var(--cap); --muted-foreground: var(--read-ink); }
}
@media (prefers-reduced-motion: reduce) { .chip-ind { transition: none !important; } }

/* Lists inside story text (pipeline block "list", 15.11): same type as the paragraphs */
.story-body ul, .card-text ul { margin: 0 0 16px; padding-left: 1.25em; }
.story-body li, .card-text li { font-size: inherit; line-height: inherit; margin: 0 0 6px; }
.story-body ul { font-size: clamp(12px, 1.0625rem, 25.5px); line-height: 1.65; }
.card-text ul { margin: 0 0 10px; } /* same open or cut (owner 15.11) */

/* Avatar in place of the «Профиль» icon (owner 15.11) */
.nav-ava { border-radius: 50%; object-fit: cover; flex-shrink: 0; display: block; }
.tabbar .nav-ava { width: 32px; height: 32px; }
.side-nav .nav-ava { width: 20px; height: 20px; }

/* «Не интересно» (reco.js): a button with an icon on its own row, «Источники» below it, 16px apart (owner 15.11 «путается с источниками») */
.reco-hide, .corr-btn { display: flex; align-items: center; gap: 6px; min-height: 44px; margin: -4px 0 16px; padding: 0 12px 0 0; border: 0; background: none; color: var(--muted-foreground); font: inherit; font-size: clamp(12px, .875rem, 21px); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.reco-hide svg, .corr-btn svg { flex: none; }
.reco-hide:hover, .reco-hide:focus-visible, .corr-btn:hover, .corr-btn:focus-visible { color: var(--foreground); }
.reco-hide + .sources.src-pill, .corr-btn + .sources.src-pill { margin-top: 0; }
.reco-hidden { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted-foreground); font-size: clamp(12px, .875rem, 21px); }
.reco-undo { min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--unread); font: inherit; text-decoration: underline; cursor: pointer; }

/* «Есть ошибка» (corr.js, owner 15.11) */
.card-tools { display: flex; flex-wrap: wrap; align-items: center; column-gap: 16px; margin: -4px 0 16px; }
.card-tools > .reco-hide, .card-tools > .corr-btn { margin: 0; }
.card-tools + .sources.src-pill { margin-top: 0; }

dialog.corr-sheet {
  border: 0;
  padding: 20px 16px calc(16px + env(safe-area-inset-bottom));
  background: var(--background);
  color: var(--foreground);
  box-sizing: border-box;
}
dialog.corr-sheet::backdrop {
  background: rgb(0 0 0 / .4);
}

@media (max-width: 767px) {
  dialog.corr-sheet {
    position: fixed;
    inset: auto 0 0 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 90dvh;
  }
}

@media (min-width: 768px) {
  dialog.corr-sheet {
    width: min(520px, calc(100vw - 32px));
    border-radius: 16px;
    padding: 24px;
  }
}

.corr-sheet form { display: flex; flex-direction: column; gap: 12px; }
.corr-sheet h2 {
  margin: 0;
  font-size: clamp(17px, 1.0625rem, 25px);
  font-weight: 600;
  padding-right: 44px;
}
.corr-x {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: var(--muted-foreground);
  cursor: pointer;
}
.corr-quote {
  margin: 0;
  padding: 4px 0 4px 12px;
  border-left: 3px solid var(--border);
  color: var(--muted-foreground);
  font-size: clamp(13px, .875rem, 21px);
  max-height: calc(4 * 1.4em * clamp(13px, .875rem, 21px));
  -webkit-line-clamp: 4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.corr-sheet textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 120px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--background);
  color: var(--foreground);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
}
.corr-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.corr-err { margin: 0; color: #d70015; font-size: 14px; }
@media (prefers-color-scheme: dark) {
  .corr-err { color: #ff6961; }
}
.corr-send {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: var(--foreground);
  color: var(--background);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}
.corr-send:disabled { opacity: .5; }
.corr-thanks { margin: 8px 0; font-size: 16px; }
.corr-quote[hidden] { display: none; } /* the line-clamp display beat the hidden attribute (screenshot p32) */
.corr-sheet textarea:focus { outline: none; border-color: var(--foreground); }
dialog.corr-sheet { box-shadow: 0 -8px 32px rgb(0 0 0 / .18); }
@media (prefers-color-scheme: dark) { dialog.corr-sheet { background: #1c1c1e; } dialog.corr-sheet textarea { background: #000; } }
.q-bubble { margin: 0 0 16px; padding: 10px 14px 12px; max-width: 85%; border-radius: 18px 18px 18px 6px; background: color-mix(in srgb, var(--r, #8e8e93) 9%, var(--background)); }
.q-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; column-gap: 12px; row-gap: 2px; margin: 0 0 4px; font-size: clamp(13px, .875rem, 21px); line-height: 1.3; }
.q-who { color: var(--rt, var(--foreground)); font-weight: 600; text-decoration: none; }
/* external link icon (owner 17.11): glued to the last word, text colour like the underline */
.nw { white-space: nowrap; }
.ext-ic { display: inline-block; width: .75em; height: .75em; margin-left: .12em; vertical-align: -.02em; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
a.q-who:hover { text-decoration: underline; }
.q-role { color: var(--muted-foreground); font-weight: 400; }
.q-bubble blockquote { margin: 0; padding: 0; border: 0; }
.q-bubble blockquote p { margin: 0; font-weight: 400; }
@media (prefers-color-scheme: dark) { .q-bubble { background: color-mix(in srgb, var(--r, #8e8e93) 18%, #000); } }

.card-tools { flex-wrap: nowrap; column-gap: 8px; margin: 4px 0 16px; }
.card-tools > .reco-hide, .card-tools > .corr-btn, .card-tools > .src-btn { position: relative; flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; margin: 0; padding: 0 12px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--foreground) 6%, var(--background)); color: var(--muted-foreground); font: inherit; font-size: clamp(12px, .8125rem, 19.5px); line-height: 1; white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.card-tools > .reco-hide::before, .card-tools > .corr-btn::before, .card-tools > .src-btn::before { content: ""; position: absolute; inset: -6px -4px; }
.card-tools > .reco-hide svg, .card-tools > .corr-btn svg { width: 16px; height: 16px; }
.card-tools > .reco-hide { order: 1; } .card-tools > .corr-btn { order: 2; } .card-tools > .src-btn { order: 3; margin-left: auto; }
.card-tools > .src-btn[data-r] { background: color-mix(in srgb, var(--r) 12%, #fff); color: var(--rt); }
.card-tools > :is(.reco-hide, .corr-btn, .src-btn):hover, .card-tools > :is(.reco-hide, .corr-btn, .src-btn):focus-visible, .card-tools > .src-btn[aria-expanded="true"] { color: var(--foreground); }
.card-tools > .src-btn[data-r]:hover, .card-tools > .src-btn[data-r][aria-expanded="true"] { color: var(--rt); background: color-mix(in srgb, var(--r) 20%, #fff); }
details.sources.src-proxied { margin-top: 0; }
details.sources.src-proxied > summary { display: none; }
details.sources.src-proxied[open] > ol { margin-top: 0; }
@media (prefers-color-scheme: dark) {
  .card-tools > .reco-hide, .card-tools > .corr-btn, .card-tools > .src-btn { background: color-mix(in srgb, var(--foreground) 12%, #000); }
  .card-tools > .src-btn[data-r], .card-tools > .src-btn[data-r]:hover, .card-tools > .src-btn[data-r][aria-expanded="true"] { background: color-mix(in srgb, var(--r) 24%, #000); }
}
/* p34: three text pills need ~353px, a phone card row has 315 (measured 15.11). Narrow row: «Ошибка» becomes icon only (aria-label stays); very narrow or large system text: «Не интересно» too. Never wraps. */
.card-tools { container-type: inline-size; }
@container (max-width: 359px) { .card-tools:has(> .reco-hide) > .corr-btn { padding: 0 9px; } .card-tools:has(> .reco-hide) > .corr-btn span { display: none; } }
@container (max-width: 279px) { .card-tools > .reco-hide { padding: 0 9px; } .card-tools > .reco-hide span { display: none; } }
.story .sources.src-pill.src-proxied { margin-top: 0; } /* critic p34 #3: beat .story .sources.src-pill 32px */
/* Topics v3 rubric colours (owner 15.11): --r card colour, --rt text, WCAG AA; dark theme lighter --rt */
[data-r="tekhnologii"] { --r: rgb(37, 99, 235); --rt: rgb(30, 64, 175); }
[data-r="nauka"] { --r: rgb(124, 58, 237); --rt: rgb(91, 33, 182); }
[data-r="zdorove"] { --r: rgb(5, 150, 105); --rt: rgb(6, 95, 70); }
[data-r="eda"] { --r: rgb(220, 38, 38); --rt: rgb(153, 27, 27); }
[data-r="dom"] { --r: rgb(101, 163, 13); --rt: rgb(63, 98, 18); }
[data-r="moda"] { --r: rgb(219, 39, 119); --rt: rgb(157, 23, 77); }
[data-r="ucheba"] { --r: rgb(79, 70, 229); --rt: rgb(55, 48, 163); }
[data-r="biznes"] { --r: rgb(234, 88, 12); --rt: rgb(154, 52, 18); }
[data-r="dengi"] { --r: rgb(13, 148, 136); --rt: rgb(17, 94, 89); }
[data-r="transport"] { --r: rgb(8, 145, 178); --rt: rgb(21, 94, 117); }
[data-r="puteshestviya"] { --r: rgb(217, 119, 6); --rt: rgb(146, 64, 14); }
[data-r="kultura"] { --r: rgb(192, 38, 211); --rt: rgb(134, 25, 143); }
[data-r="obshchestvo"] { --r: rgb(71, 85, 105); --rt: rgb(51, 65, 85); }

@media (prefers-color-scheme: dark) {
    [data-r="tekhnologii"] { --rt: rgb(147, 197, 253); }
    [data-r="nauka"] { --rt: rgb(196, 181, 253); }
    [data-r="zdorove"] { --rt: rgb(110, 231, 183); }
    [data-r="eda"] { --rt: rgb(252, 165, 165); }
    [data-r="dom"] { --rt: rgb(190, 242, 100); }
    [data-r="moda"] { --rt: rgb(249, 168, 212); }
    [data-r="ucheba"] { --rt: rgb(165, 180, 252); }
    [data-r="biznes"] { --rt: rgb(253, 186, 116); }
    [data-r="dengi"] { --rt: rgb(94, 234, 212); }
    [data-r="transport"] { --rt: rgb(103, 232, 249); }
    [data-r="puteshestviya"] { --rt: rgb(252, 211, 77); }
    [data-r="kultura"] { --rt: rgb(240, 171, 252); }
    [data-r="obshchestvo"] { --rt: rgb(203, 213, 225); }
}

/* UI links vs text links (owner 16.11): solid underline only for in-text story links; «Показать всё» is an expand, dotted and low; no hover underline anywhere in UI */
.card a.more, .card .card-text p a.more, .card a.more:hover, .card a.more:focus-visible, .card .card-text p a.more:hover, .card .card-text p a.more:focus-visible { color: var(--unread); text-decoration-line: underline; text-decoration-style: dotted; text-decoration-color: currentColor; text-decoration-thickness: max(1px, .07em); text-underline-offset: .28em; } /* .32em is clipped by the desktop 1.3 line box */
.nav-item:hover, .agent:hover, .handle a:hover, .card-meta a.badge[data-r]:hover, .sources li > a:hover .src-title, .rail-pop a:hover, .rail-au a:hover b, a.q-who:hover, .me-row-title:hover, .me-row-title:focus, .ph figcaption a { text-decoration: none; }
/* quote gap in open cards; «Скрыть» dotted like «Показать всё» (owner 16.11) */
.card.open .card-text .q-bubble { margin: 16px 0 0; }
.card.open .less { text-decoration-line: underline; text-decoration-style: dotted; text-decoration-color: currentColor; text-decoration-thickness: max(1px, .07em); text-underline-offset: .28em; }
/* room for the dotted «Показать всё» underline inside the clipped collapsed text; layout height unchanged (owner 16.11) */
.card:not(.open) .card-text { padding-bottom: 6px; margin-bottom: -6px; }
/* desktop: 20px above the logo when the column sticks, same as logo to card (owner 16.11) */
@media (min-width: 768px) { .side { top: 20px; max-height: calc(100dvh - 20px); } }

/* photo air: text→photo and caption→next 1.5rem, photo→caption .75rem; phones a bit tighter (owner 16.11) */
.card .ph, .story-body .ph { margin: 1.5rem 0; }
.ph figcaption { margin-top: .75rem; }
@media (max-width: 767px) {
  .card .ph, .story-body .ph { margin: 1.25rem 0; }
  .ph figcaption { margin-top: .625rem; }
}
