:root {
  --bg: #07090b;
  --surface: #11161a;
  --surface-soft: #171e22;
  --text: #f4f7f7;
  --muted: #a8b4b6;
  --line: rgba(255, 255, 255, 0.12);
  --teal: #49d0c0;
  --amber: #ffbe5c;
  --steel: #7ca2b3;
  --max: 1180px;
  --sp-8: 8px;
  --sp-12: 12px;
  --sp-16: 16px;
  --sp-24: 24px;
  --sp-32: 32px;
  --sp-48: 48px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

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

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 56px);
  background: rgba(7, 9, 11, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.nav,
.hero-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #08100f;
  background: var(--teal);
  border-radius: 8px;
  font-size: 0.9rem;
}

.nav {
  gap: clamp(14px, 3vw, 30px);
  color: var(--muted);
  font-size: 0.94rem;
}

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

.nav a.is-active {
  color: var(--text);
}

.notify-badge {
  display: inline-flex;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  color: #071211;
  background: var(--teal);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 120px clamp(20px, 5vw, 56px) 76px;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(7, 9, 11, 0.95) 0%, rgba(7, 9, 11, 0.82) 38%, rgba(7, 9, 11, 0.28) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(7, 9, 11, 0) 34%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(2rem, 5vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 14px;
  font-size: 1.18rem;
  letter-spacing: 0;
}

.hero-lead {
  max-width: 640px;
  margin: 26px 0 0;
  color: #dce5e6;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.hero-actions {
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 700;
}

.button-primary {
  color: #071211;
  background: var(--teal);
  border-color: transparent;
}

.button-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.button-tertiary {
  color: var(--steel);
  background: transparent;
  border-color: transparent;
}

.button-tertiary:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

.intro {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  max-width: var(--max);
  margin: -30px auto 0;
  padding: 0 clamp(20px, 5vw, 0px);
  position: relative;
  z-index: 2;
}

.intro-metric {
  min-height: 148px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}

.intro-metric strong {
  display: block;
  color: var(--amber);
  font-size: 2.8rem;
  line-height: 1;
}

.intro-metric span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
}

.section,
.stack-section,
.contact-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 104px clamp(20px, 5vw, 0px);
}

.section-heading {
  margin-bottom: 42px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.feature-card {
  min-height: 280px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(23, 30, 34, 0.98), rgba(18, 24, 28, 0.98));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
}

.feature-card p,
.leadership-item p {
  margin: 0;
  color: var(--muted);
}

.split-section {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 58px;
  align-items: start;
}

.leadership-list {
  display: grid;
  gap: 12px;
}

.leadership-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 18px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.leadership-item:last-child {
  border-bottom: 1px solid var(--line);
}

.leadership-item span {
  color: var(--steel);
  font-weight: 800;
}

.stack-section {
  padding-top: 20px;
  padding-bottom: 20px;
  overflow: hidden;
}

.stack-slider {
  display: flex;
  width: 100%;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.stack-track {
  display: flex;
  flex: 0 0 max-content;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 20px 0;
  animation: stack-scroll 48s linear infinite;
}

.stack-track + .stack-track {
  padding-left: 10px;
}

.stack-slider:hover .stack-track {
  animation-play-state: paused;
}

.stack-track span {
  flex: 0 0 auto;
  padding: 10px 14px;
  color: #d7e1e3;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.92rem;
}

@keyframes stack-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

.contact-section {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
  padding-bottom: 86px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  min-height: 58px;
  padding: 0 22px;
  color: #071211;
  background: var(--teal);
  border-radius: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.inner-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% 0%, rgba(73, 208, 192, 0.08), transparent 34%),
    var(--bg);
}

.page-shell,
.article-shell,
.admin-shell {
  width: min(1440px, calc(100% - 64px));
  margin: 0 auto;
  padding: 128px 0 90px;
}

.page-hero {
  max-width: 980px;
  padding: 44px 0 54px;
}

.page-hero h1,
.admin-header h1,
.article h1 {
  margin: 0;
  font-size: clamp(2.45rem, 6vw, 5rem);
  line-height: 1.04;
}

.page-hero p:not(.eyebrow),
.admin-header p:not(.eyebrow),
.article-lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.15rem;
}

.blog-shell {
  width: min(1360px, calc(100% - 40px));
}

.blog-filters {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.blog-feed-header {
  margin: 0 0 14px;
  padding: 22px 24px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.blog-feed-header h1 {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.1;
}

.blog-feed-header p {
  margin: 10px 0 0;
  color: var(--muted);
}

.habr-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
}

.main-feed {
  display: grid;
  gap: 14px;
}

.right-rail {
  display: grid;
  gap: 16px;
  align-content: start;
}

.feed-panel {
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.feed-panel h2,
.reading-now h2 {
  margin: 0 0 14px;
  font-size: 1.2rem;
}

.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 0;
  width: 100%;
}

.search-form input[name="q"] {
  flex: 1 1 0;
  min-width: 0;
  min-height: 40px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
  font-size: 0.94rem;
}

.search-form .button {
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.9rem;
}

.search-form .search-submit {
  flex: 0 0 96px;
  width: 96px;
  white-space: nowrap;
}

.search-form > a {
  flex: 0 0 100%;
  justify-self: start;
}

.search-panel {
  padding: 18px 22px 16px;
}

.search-panel h2 {
  margin: 0 0 14px;
  font-size: 1.2rem;
}

.search-panel .search-form {
  gap: 8px;
}

.sort-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.feed-post,
.reading-now {
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.feed-post {
  padding: 24px;
}

.feed-type {
  margin-bottom: 16px;
  color: #49b7ff;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.feed-post h2 {
  margin: 12px 0;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  line-height: 1.14;
}

.feed-image {
  width: 100%;
  max-height: 460px;
  margin: 22px 0;
  object-fit: cover;
  border-radius: 4px;
}

.feed-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  color: var(--muted);
}

.feed-actions form {
  margin: 0;
}

.reading-now {
  position: sticky;
  top: 96px;
  margin-top: 0;
  padding: 22px;
}

.reading-now a {
  display: grid;
  gap: 8px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.reading-now a:first-of-type {
  border-top: 0;
}

.reading-now strong {
  line-height: 1.35;
}

.reading-now span {
  color: var(--steel);
  font-size: 0.9rem;
}

.category-panel,
.empty-state,
.post-card,
.admin-form,
.admin-table-section,
.notice,
.article {
  background: linear-gradient(180deg, rgba(23, 30, 34, 0.98), rgba(18, 24, 28, 0.98));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
}

.category-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.category-panel h2,
.admin-form h2,
.admin-table-section h2 {
  margin: 0 0 16px;
  font-size: 1.2rem;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: flex;
  min-height: 38px;
  align-items: center;
  padding: 0 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.94rem;
}

.chip.is-selected,
.chip:hover {
  color: #071211;
  background: var(--teal);
}

.tag-filter,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-filter a,
.tag-row a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 10px;
  color: var(--steel);
  background: rgba(124, 162, 179, 0.09);
  border: 1px solid rgba(124, 162, 179, 0.22);
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
}

.tag-filter a.is-selected,
.tag-filter a:hover,
.tag-row a:hover {
  color: #071211;
  background: var(--teal);
}

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

.blog-feed {
  display: grid;
  gap: 22px;
}

.featured-post {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) 1fr;
  gap: 28px;
  padding: 26px;
  background: linear-gradient(180deg, rgba(23, 30, 34, 0.98), rgba(18, 24, 28, 0.98));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
}

.featured-post img,
.post-thumb,
.article-image,
.current-image img,
.table-title img {
  width: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.featured-post img {
  height: 320px;
}

.featured-post h2 {
  margin: 18px 0 14px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.04;
}

.featured-post p {
  color: var(--muted);
  font-size: 1.08rem;
}

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

.post-card,
.empty-state {
  padding: 26px;
}

.empty-state h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
}

.post-thumb {
  height: 190px;
  margin-bottom: 18px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--steel);
  font-size: 0.86rem;
  font-weight: 700;
}

.post-card h2 {
  margin: 14px 0 12px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.post-card p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.read-more,
.back-link,
.admin-table-section a {
  display: inline-flex;
  margin-top: 18px;
  color: var(--teal);
  font-weight: 800;
}

.table-actions {
  display: grid;
  gap: 8px;
}

.table-actions a {
  margin-top: 0;
}

.table-actions button,
.inline-user-form button,
.inline-entity-form button,
.admin-table-section td > form button {
  min-height: 36px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.table-actions button:hover,
.danger-button:hover {
  border-color: #9f2d36;
}

.inline-entity-form button:hover,
.inline-user-form button:hover {
  color: #071211;
  background: var(--teal);
}

.article-shell {
  width: min(1240px, calc(100% - 48px));
  max-width: 1240px;
}

.article {
  padding: clamp(34px, 5vw, 72px);
}

.article-image {
  max-height: 440px;
  margin-bottom: 28px;
}

.article-content {
  margin-top: var(--sp-32);
  color: #dce5e6;
  font-size: 1.09rem;
  line-height: 1.78;
  max-width: 100%;
}

.article-content p {
  margin: 0 0 var(--sp-16);
}

.article-content > :where(p, ul, ol, h2, h3, h4, blockquote) {
  max-width: 76ch;
}

.article-content figure,
.wysiwyg-editor figure {
  margin: var(--sp-24) 0;
}

.article-content > :where(pre, table, figure) {
  width: 100%;
  max-width: 100%;
}

.article-content img,
.wysiwyg-editor img {
  max-width: 100%;
  border-radius: 8px;
}

.article-content figcaption,
.wysiwyg-editor figcaption {
  margin-top: var(--sp-8);
  color: var(--muted);
  font-size: 0.92rem;
}

.article-content blockquote,
.wysiwyg-editor blockquote {
  margin: var(--sp-24) 0;
  padding: var(--sp-16) var(--sp-24);
  color: #dce5e6;
  border-left: 3px solid var(--teal);
  background: rgba(73, 208, 192, 0.06);
}

.article-content pre,
.wysiwyg-editor pre {
  overflow-x: auto;
  padding: var(--sp-16);
  background: #050607;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.article-content table,
.wysiwyg-editor table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
}

.article-content th,
.article-content td,
.wysiwyg-editor th,
.wysiwyg-editor td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.article-content th,
.wysiwyg-editor th {
  color: var(--steel);
  font-size: 0.88rem;
}

.comments-section {
  margin-top: var(--sp-48);
  padding: clamp(22px, 4vw, 34px);
  background: linear-gradient(180deg, rgba(23, 30, 34, 0.98), rgba(18, 24, 28, 0.98));
  border: 1px solid var(--line);
  border-radius: 8px;
}

.comments-section h2 {
  margin-top: 0;
  font-size: 1.6rem;
}

.comment-list {
  display: grid;
  gap: var(--sp-16);
  margin-bottom: var(--sp-32);
}

.comment {
  padding: var(--sp-16);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.comment-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-8);
  color: var(--steel);
}

.comment-delete-form {
  margin-left: auto;
}

.comment-delete-form button {
  min-height: 30px;
  padding: 0 10px;
  color: #ffb9bf;
  background: rgba(159, 45, 54, 0.12);
  border: 1px solid rgba(159, 45, 54, 0.35);
  border-radius: 8px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.comment-delete-form button:hover {
  color: #fff;
  border-color: #9f2d36;
}

.comment-avatar {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 8px;
}

.user-role {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  color: #071211;
  background: var(--amber);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
}

.comment p {
  margin: var(--sp-12) 0 0;
  color: #e7eeee;
  line-height: 1.72;
}

.comment-children {
  display: grid;
  gap: var(--sp-12);
  margin-top: var(--sp-12);
  margin-left: var(--sp-24);
}

.comment.level-1,
.comment.level-2,
.comment.level-3 {
  border-left: 2px solid rgba(73, 208, 192, 0.25);
}

.comment-reply-btn {
  min-height: 30px;
  padding: 0 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.comment-reply-btn:hover {
  color: #071211;
  background: var(--teal);
}

.comment-reply-target {
  margin: 0;
  color: var(--steel);
}

.mention {
  color: var(--teal);
  font-weight: 800;
}

.comment-form {
  display: grid;
  gap: var(--sp-16);
  padding-top: var(--sp-16);
  border-top: 1px solid var(--line);
}

.comment-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  font: inherit;
}

.article-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-16);
  margin-top: var(--sp-32);
  padding-top: var(--sp-16);
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

.post-reactions-box {
  display: grid;
  align-content: start;
  gap: var(--sp-12);
}

.post-reactions-box > span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.post-reactions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-8);
}

.post-reactions form {
  margin: 0;
}

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

.social-like-button {
  display: inline-grid;
  grid-template-columns: 30px minmax(22px, auto);
  min-height: 40px;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.social-like-button:hover {
  color: #fff;
  background: rgba(255, 77, 109, 0.1);
}

.social-like-button:focus-visible {
  outline: 2px solid rgba(255, 77, 109, 0.55);
  outline-offset: 2px;
}

.social-like-button:disabled {
  cursor: wait;
  opacity: 0.78;
}

.social-like-button.is-liked {
  color: #fff;
  background: rgba(255, 77, 109, 0.14);
}

.social-like-button.is-liked .like-heart {
  color: #ff4d6d;
  transform: scale(1.08);
}

.social-like-button.is-pending .like-heart {
  transform: scale(0.9);
}

.like-heart {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--muted);
  font-size: 1.55rem;
  line-height: 1;
  transition: color 0.16s ease, transform 0.16s ease;
}

.like-count {
  min-width: 20px;
  color: var(--steel);
  text-align: right;
}

.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.code-lang {
  color: var(--steel);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.code-copy-btn {
  min-height: 30px;
  padding: 0 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.code-copy-btn:hover {
  color: #071211;
  background: var(--teal);
}

.code-lang-select {
  min-height: 30px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  font: inherit;
  font-size: 0.82rem;
}

.code-toolbar .code-copy-btn {
  margin-left: auto;
}

.article-content code .tok-kw {
  color: #8dd7ff;
  font-weight: 700;
}

.article-content code .tok-str {
  color: #ffd490;
}

.article-content code .tok-com {
  color: #8aa0a6;
  font-style: italic;
}

.article-content code .tok-num {
  color: #8bf0b5;
}

.attachment-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  margin-top: 28px;
  padding: 0 14px;
  color: #071211;
  background: var(--teal);
  border-radius: 8px;
  font-weight: 800;
}

.share-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-12);
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.share-box span {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.share-box-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-8);
}

.share-box .button {
  min-height: 38px;
  padding: 0 12px;
  font-size: 0.9rem;
}

.article-back-button {
  margin-left: auto;
  min-height: 36px;
  padding: 0 var(--sp-12);
  font-size: 0.86rem;
  font-weight: 700;
}

.attachment-link.compact {
  margin-top: 0;
  color: var(--teal);
  background: rgba(73, 208, 192, 0.08);
  border: 1px solid rgba(73, 208, 192, 0.26);
}

.attachment-list {
  display: grid;
  gap: 8px;
}

.attachment-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.attachment-row form {
  margin: 0;
}

.attachment-row button {
  min-height: 32px;
  padding: 0 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  margin-top: var(--sp-48);
  margin-bottom: var(--sp-16);
}

.article-content h4 {
  font-size: 1.12rem;
}

.article-content hr,
.wysiwyg-editor hr {
  margin: var(--sp-32) 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.article-content li {
  margin: var(--sp-8) 0;
  color: var(--muted);
}

.admin-preview-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-preview-bar span {
  color: var(--amber);
  font-weight: 800;
}

.admin-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.admin-shell {
  width: min(1520px, calc(100% - 64px));
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.admin-stats div {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-stats strong {
  display: block;
  color: var(--amber);
  font-size: 2.2rem;
  line-height: 1;
}

.admin-stats span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.product-stats {
  margin-top: -6px;
}

.admin-section-nav {
  position: sticky;
  z-index: 10;
  top: 74px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px;
  background: rgba(17, 22, 26, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  backdrop-filter: blur(16px);
}

.admin-section-nav a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.admin-section-nav a:hover {
  color: #071211;
  background: var(--teal);
}

.admin-workspace {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.admin-workspace > h2 {
  margin: 0;
  font-size: 1.35rem;
}

.notice {
  margin-bottom: 18px;
  padding: 14px 16px;
  color: #071211;
  background: var(--teal);
  font-weight: 800;
}

.notice-toast {
  position: sticky;
  top: 76px;
  z-index: 30;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.notice-toast.is-hidden {
  opacity: 0;
  transform: translateY(-6px);
}

.notice.danger {
  color: #fff;
  background: #9f2d36;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.42fr);
  gap: 18px;
  align-items: start;
}

.secondary-admin-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-top: 18px;
}

.admin-form,
.admin-table-section {
  padding: 24px;
  min-width: 0;
}

.post-editor-form {
  margin-bottom: 18px;
}

.form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
}

.editor-main,
.editor-side {
  display: grid;
  align-content: start;
  min-width: 0;
}

.wide-form {
  max-width: 900px;
}

.admin-form label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 700;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  font: inherit;
}

.admin-form option,
.comment-form option,
.profile-form option {
  color: var(--text);
  background: var(--surface);
}

.form-hint {
  margin: 0 0 16px;
  color: var(--muted);
}

.editor-shell {
  position: relative;
  display: grid;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.editor-toolbar {
  position: sticky;
  z-index: 8;
  top: 74px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px;
  background: rgba(17, 22, 26, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.editor-toolbar button {
  min-height: 38px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.editor-toolbar button:hover {
  color: #071211;
  background: var(--teal);
}

.editor-toolbar button:focus-visible {
  outline: 2px solid rgba(73, 208, 192, 0.55);
  outline-offset: 2px;
}

.editor-toolbar-divider {
  width: 1px;
  height: 28px;
  background: var(--line);
}

.editor-quickbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--line);
}

.editor-quickbar button {
  min-height: 34px;
  padding: 0 10px;
  color: var(--steel);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}

.editor-quickbar button:hover {
  color: #071211;
  background: var(--teal);
}

.editor-command-menu {
  position: fixed;
  z-index: 80;
  display: grid;
  width: min(340px, calc(100vw - 24px));
  max-height: 430px;
  overflow: auto;
  padding: 8px;
  background: #11181c;
  border: 1px solid rgba(73, 208, 192, 0.35);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

.editor-command-menu[hidden] {
  display: none;
}

.editor-command-menu button {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 8px;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.editor-command-menu button:hover,
.editor-command-menu button:focus-visible {
  color: #071211;
  background: var(--teal);
  outline: none;
}

.editor-command-menu span {
  color: var(--muted);
  font-size: 0.82rem;
}

.editor-command-menu button:hover span,
.editor-command-menu button:focus-visible span {
  color: #15302d;
}

.wysiwyg-editor {
  min-height: 460px;
  padding: var(--sp-24);
  color: var(--text);
  background: rgba(7, 10, 12, 0.22);
  border: 0;
  border-radius: 0;
  outline: none;
  line-height: 1.78;
  font-size: 1.09rem;
  max-width: 100%;
}

.wysiwyg-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  pointer-events: none;
}

.wysiwyg-editor > :where(p, ul, ol, h2, h3, h4, blockquote) {
  max-width: 76ch;
}

.wysiwyg-editor > :where(pre, table, figure) {
  width: 100%;
  max-width: 100%;
}

.wysiwyg-editor:focus {
  border-color: rgba(73, 208, 192, 0.65);
}

.wysiwyg-editor p,
.wysiwyg-editor ul,
.wysiwyg-editor h2 {
  margin-top: 0;
}

.wysiwyg-editor p,
.wysiwyg-editor li {
  margin-bottom: var(--sp-16);
}

.wysiwyg-editor h2 {
  margin: var(--sp-48) 0 var(--sp-16);
  font-size: 1.75rem;
  line-height: 1.2;
}

.wysiwyg-editor h3 {
  margin: var(--sp-32) 0 var(--sp-12);
  font-size: 1.35rem;
  line-height: 1.25;
}

.wysiwyg-editor h4 {
  margin: var(--sp-24) 0 var(--sp-12);
  font-size: 1.12rem;
  line-height: 1.3;
}

.tag-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.check-pill {
  display: inline-flex !important;
  grid-template-columns: none !important;
  min-height: 32px;
  align-items: center;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.check-pill input {
  width: 16px !important;
  height: 16px;
  margin: 0;
  accent-color: var(--teal);
}

.inline-user-form .check-pill {
  justify-content: space-between;
  min-height: 36px;
  padding: 0 12px;
}

.inline-user-form .check-pill input {
  order: 2;
}

.current-image {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.current-image img {
  height: 180px;
}

.current-image.is-empty {
  min-height: 120px;
  place-items: center;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.editor-check {
  margin-bottom: 16px !important;
}

.admin-form textarea {
  resize: vertical;
}

.admin-table-section {
  margin-top: 18px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--steel);
  font-size: 0.86rem;
  text-transform: uppercase;
}

td span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.table-title {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  align-items: start;
}

.table-title img {
  height: 58px;
}

.inline-user-form {
  display: grid;
  gap: 8px;
  min-width: 260px;
}

.inline-user-form input:not([type="checkbox"]),
.inline-entity-form input,
.admin-table-section input,
.admin-table-section select {
  width: 100%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

.admin-table-section input,
.admin-table-section select {
  min-height: 38px;
  font-size: 0.92rem;
  accent-color: var(--teal);
}

.admin-table-section input::placeholder,
.search-form input[name="q"]::placeholder {
  color: var(--muted);
  opacity: 0.85;
}

.inline-create-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.5fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
  padding: 16px;
  box-shadow: none;
}

.inline-create-form label {
  margin-bottom: 0;
}

.inline-entity-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  min-width: 620px;
}

.inline-entity-form.compact {
  min-width: 520px;
}

.inline-entity-form input {
  flex: 1 1 220px;
}

.inline-entity-form.compact input {
  flex-basis: 260px;
}

.inline-entity-form code {
  flex: 0 0 auto;
  padding: 0 4px;
}

.inline-entity-form button,
.admin-table-section td > form button {
  flex: 0 0 auto;
  padding: 0 12px;
  white-space: nowrap;
}

.auth-shell,
.profile-shell {
  width: min(520px, calc(100% - 40px));
  margin: 0 auto;
  padding: 140px 0 90px;
}

.profile-shell {
  width: min(760px, calc(100% - 40px));
}

.auth-form h1,
.profile-card h1 {
  margin: 0 0 22px;
  font-size: clamp(2.3rem, 6vw, 4rem);
}

.profile-card {
  padding: 28px;
  background: linear-gradient(180deg, rgba(23, 30, 34, 0.98), rgba(18, 24, 28, 0.98));
  border: 1px solid var(--line);
  border-radius: 8px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.profile-stats div {
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.profile-stats strong {
  display: block;
  color: var(--amber);
}

.profile-stats span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.profile-form {
  margin-top: 20px;
}

.profile-list {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.profile-list h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.profile-list article {
  display: grid;
  gap: 4px;
  padding: 8px 0;
}

.profile-list article span {
  color: var(--muted);
  font-size: 0.9rem;
}

.profile-list article form {
  margin-top: 6px;
}

.profile-list-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.profile-list-filters a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 700;
}

.profile-list-filters a.is-active,
.profile-list-filters a:hover {
  color: #071211;
  background: var(--teal);
}

.profile-avatar {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 18px;
}

code {
  color: var(--amber);
}

@media (max-width: 920px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .hero {
    min-height: 860px;
  }

  .intro,
  .feature-grid,
  .split-section,
  .contact-section,
  .habr-layout,
  .featured-post,
  .post-grid,
  .admin-grid,
  .admin-header,
  .admin-stats,
  .editor-layout,
  .inline-create-form,
  .inline-entity-form,
  .inline-entity-form.compact {
    grid-template-columns: 1fr;
  }

  .inline-entity-form,
  .inline-entity-form.compact {
    min-width: 320px;
  }

  .inline-entity-form button,
  .admin-table-section td > form button {
    width: auto;
  }

  .admin-header {
    display: grid;
    align-items: start;
  }

  .category-panel {
    position: static;
  }

  .reading-now {
    position: static;
  }

  .intro {
    margin-top: 0;
    gap: 12px;
  }

  .feature-card {
    min-height: auto;
  }

  .contact-section {
    align-items: start;
  }
}

@media (max-width: 560px) {
  .page-shell,
  .article-shell,
  .admin-shell,
  .blog-shell {
    width: min(100% - 32px, 100%);
    padding-top: 150px;
  }

  .nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    font-size: 0.86rem;
  }

  .page-hero h1,
  .admin-header h1,
  .article h1,
  .blog-hero h1 {
    font-size: clamp(2.2rem, 12vw, 3.1rem);
  }

  .hero {
    min-height: 760px;
    padding-top: 150px;
  }

  h1 {
    font-size: clamp(2.65rem, 12vw, 3.8rem);
  }

  .button,
  .contact-link {
    width: 100%;
  }

  .share-box .button,
  .search-form .button,
  .inline-entity-form button,
  .admin-table-section td > form button {
    width: auto;
  }

  .form-header,
  .form-actions,
  .search-form {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
  }

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

  .article-back-button {
    margin-left: 0;
  }

  .admin-form,
  .admin-table-section,
  .post-card,
  .empty-state,
  .featured-post {
    padding: 18px;
  }

  .featured-post img,
  .post-thumb,
  .article-image {
    height: 190px;
  }

  .wysiwyg-editor {
    min-height: 340px;
  }

  .editor-toolbar button {
    flex: 1 1 auto;
  }

  .intro-metric {
    min-height: 126px;
  }
}
