/* ==========================================================================
   llollin IDE — сайт в виде редактора кода
   Палитры: Tokyo Night (тёмная) и Tokyo Night Day (светлая).
   Шрифты Inter и JetBrains Mono — локальные, из родительской темы.
   ========================================================================== */

/* ── Токены ─────────────────────────────────────────────────────────────── */

:root,
:root[data-theme="dark"] {
  --bg:            #1a1b26;
  --bg-side:       #16161e;
  --bg-card:       #1e2030;
  --bg-hl:         #292e42;
  --border:        #262a3d;
  --border-strong: #3b4261;

  --fg:       #c0caf5;
  --fg-muted: #a9b1d6;
  --fg-dim:   #828bb8;
  --comment:  #565f89; /* только декор: номера строк, «//» */

  --blue:   #7aa2f7;
  --cyan:   #7dcfff;
  --green:  #9ece6a;
  --purple: #bb9af7;
  --orange: #ff9e64;
  --red:    #f7768e;
  --yellow: #e0af68;
  --teal:   #73daca;

  --on-accent: #16161e;
  --code-bg:   #16161e;
  --overlay:   rgba(8, 8, 14, 0.6);
  --shadow:    0 24px 64px rgba(0, 0, 0, 0.55);

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg:            #e1e2e7;
  --bg-side:       #d5d7e1;
  --bg-card:       #eceef3;
  --bg-hl:         #c9ccdc;
  --border:        #c6c9d8;
  --border-strong: #a8aecb;

  --fg:       #2f365a;
  --fg-muted: #464d75;
  --fg-dim:   #555c89;
  --comment:  #8990b3;

  --blue:   #2560c4;
  --cyan:   #006486;
  --green:  #4b6a2c;
  --purple: #7a3fce;
  --orange: #9a5000;
  --red:    #c8184b;
  --yellow: #7a5c30;
  --teal:   #0c7560;

  --on-accent: #ffffff;
  --code-bg:   #1a1b26; /* подсветка кода остаётся тёмной (tokyo-night-dark) */
  --overlay:   rgba(40, 44, 70, 0.35);
  --shadow:    0 24px 64px rgba(40, 44, 70, 0.25);

  color-scheme: light;
}

:root {
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;

  --titlebar-h:  42px;
  --tabs-h:      38px;
  --statusbar-h: 26px;
  --activity-w:  50px;
  --explorer-w:  264px;

  --radius:    10px;
  --radius-sm: 6px;
  --wrap:      1120px;
  --gutter:    clamp(16px, 4vw, 48px);
}

/* ── База ───────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--titlebar-h) + var(--tabs-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-bottom: var(--statusbar-h);
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; }
img, svg, video { max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 3px;
}

::selection { background: color-mix(in srgb, var(--blue) 35%, transparent); }

code, kbd, pre, samp { font-family: var(--font-mono); }

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 1px 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--bg-card);
  color: var(--fg-muted);
  font-size: 0.72em;
  line-height: 1.5;
  text-align: center;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--blue);
  color: var(--on-accent);
  font-weight: 600;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

html.is-locked { overflow: hidden; }

/* ── Токены подсветки ───────────────────────────────────────────────────── */

.t-key    { color: var(--blue); }
.t-str    { color: var(--green); }
.t-num    { color: var(--orange); }
.t-kw     { color: var(--purple); }
.t-punc   { color: var(--cyan); }
.t-com    { color: var(--fg-dim); }
.t-prompt { color: var(--purple); }
.t-ok     { color: var(--green); }
.t-err    { color: var(--red); }

.hl-str { color: var(--green); }
.hl-kw  { color: var(--purple); }

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fg-dim);
  flex-shrink: 0;
}
.dot--ok {
  background: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent);
}

/* ── Иконки файлов ──────────────────────────────────────────────────────── */

.fi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  font: 700 9.5px/1 var(--font-mono);
  letter-spacing: -0.04em;
  vertical-align: -3px;
}
.fi::before       { content: '·'; color: var(--fg-dim); }
.fi--md::before   { content: 'M↓'; color: var(--blue); }
.fi--ts::before   { content: 'TS'; color: var(--blue); }
.fi--yml::before  { content: '!'; color: var(--purple); font-size: 13px; }
.fi--json::before { content: '{}'; color: var(--yellow); font-size: 11px; }
.fi--sh::before   { content: '$_'; color: var(--green); }
.fi--log::before  { content: '≡'; color: var(--fg-dim); font-size: 14px; }
.fi--dir          { color: var(--blue); opacity: 0.85; }
span.fi--dir::before { content: '▸'; color: var(--blue); font-size: 13px; } /* в палитре — текстом, без SVG */

/* ── Заголовок окна ─────────────────────────────────────────────────────── */

.titlebar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--titlebar-h);
  padding: 0 10px 0 14px;
  background: var(--bg-side);
  border-bottom: 1px solid var(--border);
}

.titlebar__dots { display: flex; gap: 7px; }
.titlebar__dots i,
.panel__dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #f7768e;
}
.titlebar__dots i:nth-child(2), .panel__dots i:nth-child(2) { background: #e0af68; }
.titlebar__dots i:nth-child(3), .panel__dots i:nth-child(3) { background: #9ece6a; }

.titlebar__brand {
  margin-left: 6px;
  color: var(--fg);
  font: 700 14px/1 var(--font-mono);
  letter-spacing: -0.02em;
}
.titlebar__brand span { color: var(--purple); }
.titlebar__brand:hover { text-decoration: none; color: var(--blue); }

.titlebar__path {
  min-width: 0;
  overflow: hidden;
  color: var(--fg-dim);
  font: 12.5px/1 var(--font-mono);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.titlebar__path [data-ide-file] { color: var(--fg-muted); }

.titlebar__search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(420px, 38vw);
  height: 28px;
  margin-left: auto;
  padding: 0 6px 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--fg-dim);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.titlebar__search:hover { border-color: var(--blue); color: var(--fg-muted); }
.titlebar__search-text { flex: 1; overflow: hidden; text-align: left; white-space: nowrap; text-overflow: ellipsis; }

.titlebar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
}
.titlebar__btn:hover { background: var(--bg-hl); color: var(--fg); }
.titlebar__menu { display: none; }

[data-theme="dark"] .icon-moon,
:root:not([data-theme]) .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }

/* ── Рабочая область ────────────────────────────────────────────────────── */

.workbench {
  display: grid;
  grid-template-columns: var(--activity-w) var(--explorer-w) minmax(0, 1fr);
  min-height: calc(100vh - var(--titlebar-h) - var(--statusbar-h));
}

.activitybar,
.explorer {
  position: sticky;
  top: var(--titlebar-h);
  align-self: start;
  height: calc(100vh - var(--titlebar-h) - var(--statusbar-h));
}

.activitybar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-top: 8px;
  background: var(--bg-side);
  border-right: 1px solid var(--border);
}

.activitybar__btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--fg-dim);
  cursor: pointer;
}
.activitybar__btn:hover { color: var(--fg); background: var(--bg-hl); text-decoration: none; }
.activitybar__btn.is-active { color: var(--fg); }
.activitybar__btn.is-active::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: var(--blue);
}

/* ── Проводник ──────────────────────────────────────────────────────────── */

.explorer {
  overflow-y: auto;
  padding-bottom: 24px;
  background: var(--bg-side);
  border-right: 1px solid var(--border);
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.explorer__title {
  padding: 12px 16px 6px;
  color: var(--fg-dim);
  font: 600 11px/1.4 var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.explorer__root {
  padding: 4px 16px;
  color: var(--fg);
  font: 700 12px/1.6 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tree,
.tree ul { list-style: none; }
.tree ul {
  margin-left: 21px;
  border-left: 1px solid var(--border);
}

.tree details > summary {
  list-style: none;
  cursor: pointer;
}
.tree details > summary::-webkit-details-marker { display: none; }

.tree__dir {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px 3px 10px;
  color: var(--fg-muted);
  font: 13px/1.6 var(--font-mono);
  user-select: none;
}
.tree__dir::before {
  content: '';
  width: 6px;
  height: 6px;
  margin: 0 2px 0 4px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform .15s;
}
.tree details[open] > .tree__dir::before { transform: rotate(45deg); margin-top: -3px; }
.tree__dir:hover { background: var(--bg-hl); color: var(--fg); }

.tree__item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 12px 3px 10px;
  color: var(--fg-muted);
  font: 13px/1.6 var(--font-mono);
}
.tree__item:hover { background: var(--bg-hl); color: var(--fg); text-decoration: none; }
.tree__item.is-active {
  background: color-mix(in srgb, var(--blue) 16%, transparent);
  color: var(--fg);
  box-shadow: inset 2px 0 0 var(--blue);
}
.tree__label { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tree__item--more { color: var(--fg-dim); font-style: italic; }

.explorer__outline { margin-top: 12px; border-top: 1px solid var(--border); }
.outline { list-style: none; padding: 0 8px; }
.outline a {
  display: block;
  padding: 3px 8px;
  overflow: hidden;
  border-radius: 4px;
  color: var(--fg-muted);
  font-size: 13px;
  line-height: 1.45;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.outline a:hover { background: var(--bg-hl); color: var(--fg); text-decoration: none; }
.outline .outline__h3 a { padding-left: 22px; font-size: 12.5px; }
.outline a.is-active { color: var(--fg); box-shadow: inset 2px 0 0 var(--purple); }

.explorer-backdrop { display: none; }

/* ── Редактор: вкладки и хлебные крошки ─────────────────────────────────── */

.editor { min-width: 0; display: flex; flex-direction: column; }

.tabs {
  position: sticky;
  top: var(--titlebar-h);
  z-index: 40;
  display: flex;
  height: var(--tabs-h);
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--bg-side);
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  position: relative;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  max-width: 260px;
  padding: 0 16px;
  border-right: 1px solid var(--border);
  color: var(--fg-dim);
  font: 13px/1 var(--font-mono);
  white-space: nowrap;
}
.tab:hover { background: var(--bg-hl); color: var(--fg-muted); text-decoration: none; }
.tab.is-active {
  background: var(--bg);
  color: var(--fg);
}
.tab.is-active::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--blue);
}
.tab.is-active::after {
  content: '';
  position: absolute;
  inset: auto 0 -1px;
  height: 1px;
  background: var(--bg);
}
.tab__label { overflow: hidden; text-overflow: ellipsis; }

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  padding: 8px var(--gutter);
  color: var(--fg-dim);
  font: 12.5px/1.4 var(--font-mono);
}
.breadcrumbs a { color: var(--fg-dim); }
.breadcrumbs a:hover { color: var(--fg); }
.breadcrumbs__sep { opacity: 0.6; }
.breadcrumbs__file { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-muted); }

.editor__main { flex: 1; outline: none; }

/* ── Общие блоки ────────────────────────────────────────────────────────── */

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.file {
  padding: clamp(56px, 8vw, 96px) 0;
  border-top: 1px solid var(--border);
}
.file--hero { border-top: 0; padding-top: clamp(32px, 6vw, 72px); }

.sec-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 44px); }
.sec-head__path {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-side);
  color: var(--fg-muted);
  font: 12.5px/1.4 var(--font-mono);
}
.sec-head__title {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
}
.sec-head__sub {
  margin-top: 12px;
  color: var(--fg-muted);
  font-size: 1.05rem;
}
.sec-head__sub::before { content: '// '; color: var(--fg-dim); font-family: var(--font-mono); }

.sec-more { margin-top: 28px; }

.panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-side);
}
.panel__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  color: var(--fg-dim);
  font: 12.5px/1 var(--font-mono);
}
.panel__bar > span { display: inline-flex; align-items: center; gap: 8px; }
.panel__dots { display: flex; gap: 6px; }
.panel__dots i { width: 10px; height: 10px; }
.panel__body { padding: 16px 18px; }

.term {
  font: 13.5px/1.85 var(--font-mono);
  color: var(--fg-muted);
  overflow-x: auto;
}
.term p { white-space: pre-wrap; word-break: break-word; }
.term__cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  vertical-align: -0.2em;
  background: var(--fg);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Строки кода с номерами */
.code {
  counter-reset: ln;
  padding: 14px 16px 16px 0;
  font: 13.5px/1.85 var(--font-mono);
  color: var(--fg-muted);
}
.code--lg { font-size: 14.5px; }
.code .ln {
  position: relative;
  padding-left: 3.6em;
  counter-increment: ln;
}
.code .ln::before {
  content: counter(ln);
  position: absolute;
  left: 0;
  width: 2.5em;
  color: var(--comment);
  text-align: right;
  user-select: none;
}
.code .i1 { padding-left: calc(3.6em + 2ch); }
.code .i2 { padding-left: calc(3.6em + 4ch); }
.code ul { list-style: none; }

.card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: inherit;
  transition: border-color .2s, transform .2s, background .2s;
}
a.card:hover {
  border-color: var(--c, var(--blue));
  text-decoration: none;
  transform: translateY(-2px);
}
.card__file {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-dim);
  font: 12.5px/1.4 var(--font-mono);
}
.card__title {
  color: var(--fg);
  font-size: 1.15rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.card__text { color: var(--fg-muted); font-size: 0.95rem; line-height: 1.6; }

.badge {
  padding: 1px 8px;
  border: 1px solid color-mix(in srgb, var(--yellow) 45%, transparent);
  border-radius: 99px;
  color: var(--yellow);
  font: 11px/1.6 var(--font-mono);
}

.empty { color: var(--fg-muted); font-family: var(--font-mono); }

.legal-note {
  max-width: 820px;
  margin-top: 24px;
  padding-left: 14px;
  border-left: 2px solid var(--border-strong);
  color: var(--fg-dim);
  font-size: 0.85rem;
  line-height: 1.7;
}
.legal-note strong { color: var(--fg-muted); }

/* ── Кнопки ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: 600 14px/1 var(--font-sans);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn kbd { font-size: 10.5px; }

.btn-primary {
  background: var(--blue);
  color: var(--on-accent);
}
.btn-primary:hover { background: color-mix(in srgb, var(--blue) 85%, var(--fg)); color: var(--on-accent); }

.btn-outline {
  border-color: var(--border-strong);
  background: transparent;
  color: var(--fg);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13.5px;
}
.btn-outline:hover { background: var(--bg-hl); border-color: var(--fg-dim); color: var(--fg); }

.btn--block { width: 100%; }

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── README.md: первый экран ────────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--green);
  font: 13px/1 var(--font-mono);
}

.hero__title {
  font-size: clamp(2.5rem, 4.4vw, 4.25rem);
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.hero__title::before {
  content: '# ';
  color: var(--comment);
  font: 500 0.55em/1 var(--font-mono);
  letter-spacing: 0;
  vertical-align: 0.35em;
}

.hero__sub {
  max-width: 540px;
  margin-top: 22px;
  color: var(--fg-muted);
  font-size: 1.12rem;
  line-height: 1.7;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero__hint {
  margin-top: 22px;
  color: var(--fg-dim);
  font-size: 0.85rem;
}

.hero__term { box-shadow: var(--shadow); }
.hero__term .panel__body { padding: 18px 20px 22px; }

/* ── about.json ─────────────────────────────────────────────────────────── */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(28px, 5vw, 56px);
}
.about__text p {
  color: var(--fg-muted);
  font-size: 1.08rem;
  line-height: 1.8;
}
.about__text p + p { margin-top: 18px; }

.about__profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px 4px;
}
.about__name { font: 700 16px/1.3 var(--font-mono); }
.about__role { color: var(--fg-dim); font-size: 14px; }

.avatar {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--purple) 30%, var(--bg-card)), color-mix(in srgb, var(--blue) 25%, var(--bg-card)));
  color: var(--fg);
  font: 700 18px/1 var(--font-mono);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.chips { display: flex; flex-wrap: wrap; gap: 6px 8px; padding: 4px 0; list-style: none; }
.chips li {
  padding: 1px 9px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--green) 12%, transparent);
  color: var(--green);
  font-size: 12.5px;
  line-height: 1.7;
}
.chips li::before, .chips li::after { content: '"'; opacity: 0.6; }

/* ── stack.ts ───────────────────────────────────────────────────────────── */

.skills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}
.skill {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 22px;
  border-top: 2px solid var(--c);
}
.skill .card__file .fi::before { color: var(--c); }
.skill .card__text { flex: 1; }

.tokens { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin-top: 4px; }
.tokens li {
  padding: 2px 9px;
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
  border-radius: 4px;
  background: color-mix(in srgb, var(--c) 10%, transparent);
  color: var(--c);
  font: 12px/1.6 var(--font-mono);
}
.tokens li::before, .tokens li::after { content: "'"; opacity: 0.55; }

/* ── services.yml ───────────────────────────────────────────────────────── */

.services {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}
.services--single { grid-template-columns: minmax(0, 1fr); }

/* Висячий отступ: перенесённые строки выравниваются по тексту, а не по «- » */
.yaml-list .ln {
  padding-left: calc(3.6em + 4ch);
  text-indent: -2ch;
  color: var(--fg);
}
.yaml-list .ln::before { text-indent: 0; }
.yaml-dash { color: var(--purple); }

.rate { position: relative; }
.rate__body { padding: 20px 20px 22px; }
.rate__key { color: var(--blue); font: 13.5px/1.4 var(--font-mono); }
.rate__value {
  margin-top: 6px;
  color: var(--green);
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.rate__hint { margin-top: 10px; color: var(--fg-dim); font: 12.5px/1.6 var(--font-mono); }
.rate__cta { width: 100%; margin-top: 20px; }

.pricelist { margin-top: 16px; }

/* ── projects/ ──────────────────────────────────────────────────────────── */

.repos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.repo { display: flex; flex-direction: column; overflow: hidden; }
.repo__cover {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--bg-side);
}
.repo__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.repo__body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 20px 22px 22px; }
.repo__top { display: flex; align-items: center; gap: 10px; }
.repo__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-side);
  font-size: 18px;
}
.repo__path {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--fg-dim);
  font: 12.5px/1.4 var(--font-mono);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.repo__ext { color: var(--fg-dim); font-size: 18px; transition: color .2s, transform .2s; }
a.repo:hover .repo__ext { color: var(--blue); transform: translate(2px, -2px); }
.repo .card__text { flex: 1; }

.repo--featured { grid-column: 1 / -1; flex-direction: row; }
.repo--featured .repo__cover {
  flex: 0 0 46%;
  aspect-ratio: auto;
  min-height: 260px;
  border-bottom: 0;
  border-right: 1px solid var(--border);
}
.repo--featured .card__title { font-size: 1.45rem; }
.repo--featured .repo__body { padding: 26px 28px 28px; }

.langs { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; margin-top: 6px; }
.langs li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--fg-muted);
  font: 12.5px/1.6 var(--font-mono);
}
.langs li::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
}
.langs li:nth-child(2)::before { background: var(--purple); }
.langs li:nth-child(3)::before { background: var(--green); }
.langs li:nth-child(4)::before { background: var(--orange); }
.langs li:nth-child(5n)::before { background: var(--cyan); }

/* ── blog.log: git log ──────────────────────────────────────────────────── */

.gitlog { list-style: none; padding: 6px 0; background: var(--bg-card); }
.gitlog li + li .commit { border-top: 1px solid var(--border); }

.commit {
  position: relative;
  display: grid;
  grid-template-columns: 22px auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 20px 14px 18px;
  color: var(--fg);
}
.commit:hover { background: var(--bg-hl); text-decoration: none; }

.commit__graph { position: relative; align-self: stretch; }
.commit__graph::before {
  content: '';
  position: absolute;
  top: -15px;
  bottom: -15px;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: color-mix(in srgb, var(--purple) 45%, transparent);
}
.gitlog li:first-child .commit__graph::before { top: 50%; }
.gitlog li:last-child .commit__graph::before { bottom: 50%; }
.commit__graph::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 11px;
  margin: -5.5px 0 0 -5.5px;
  border: 2px solid var(--purple);
  border-radius: 50%;
  background: var(--bg-card);
}
.commit:hover .commit__graph::after { background: var(--purple); }

.commit__hash { color: var(--yellow); font: 13px/1 var(--font-mono); }
.commit__cat {
  padding: 2px 8px;
  border: 1px solid color-mix(in srgb, var(--cyan) 35%, transparent);
  border-radius: 99px;
  color: var(--cyan);
  font: 11.5px/1.5 var(--font-mono);
  white-space: nowrap;
}
.commit__title {
  overflow: hidden;
  font-weight: 550;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.commit__meta { color: var(--fg-dim); font: 12.5px/1.4 var(--font-mono); white-space: nowrap; }

/* ── contact.sh ─────────────────────────────────────────────────────────── */

.contact { box-shadow: var(--shadow); }
.contact__body {
  padding: clamp(28px, 5vw, 56px);
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--purple) 10%, transparent), transparent 60%);
}
.contact__cmd { color: var(--fg-dim); font: 13.5px/1.6 var(--font-mono); }
.contact__title {
  margin-top: 14px;
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -0.04em;
}
.contact__text { max-width: 520px; margin-top: 16px; color: var(--fg-muted); font-size: 1.08rem; }
.contact__links { display: grid; gap: 8px; max-width: 560px; margin-top: 30px; list-style: none; }
.contact__link {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 14px;
  transition: border-color .15s, background .15s;
}
.contact__link:hover { border-color: var(--blue); background: var(--bg-hl); text-decoration: none; }
.contact__key { color: var(--purple); }
.contact__key::after { content: ':'; color: var(--fg-dim); }
.contact__val { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--green); }
.contact__arrow { color: var(--fg-dim); transition: transform .15s, color .15s; }
.contact__link:hover .contact__arrow { color: var(--blue); transform: translateX(3px); }

/* ── Страницы: блог, статья, документы ──────────────────────────────────── */

.page-wrap { padding-top: clamp(28px, 5vw, 56px); padding-bottom: clamp(56px, 8vw, 96px); }
.page-wrap--narrow { max-width: calc(720px + var(--gutter) * 2); }

.page-head { max-width: 820px; margin-bottom: clamp(28px, 4vw, 40px); }
.page-head__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin-bottom: 14px;
  color: var(--fg-dim);
  font: 13px/1.5 var(--font-mono);
}
.page-head__cat {
  padding: 2px 10px;
  border: 1px solid color-mix(in srgb, var(--cyan) 35%, transparent);
  border-radius: 99px;
  color: var(--cyan);
}
.page-head__cat:hover { text-decoration: none; background: color-mix(in srgb, var(--cyan) 10%, transparent); }
.page-head__hash { color: var(--yellow); }
.page-head__title {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -0.035em;
  overflow-wrap: break-word;
}
.page-head__lead {
  margin-top: 16px;
  color: var(--fg-muted);
  font-size: 1.15rem;
  line-height: 1.7;
}

/* Фильтры-«ветки» */
.branches { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.branch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-side);
  color: var(--fg-muted);
  font: 13px/1.3 var(--font-mono);
}
.branch:hover { border-color: var(--border-strong); color: var(--fg); text-decoration: none; }
.branch.is-active { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--fg); }
.branch__count { color: var(--fg-dim); font-size: 11.5px; }

/* Карточки статей */
.posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.post-card { display: flex; flex-direction: column; overflow: hidden; }
.post-card__cover {
  position: relative;
  aspect-ratio: 16 / 8;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--bg-side);
}
.post-card__cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.post-card__cover--code {
  background:
    repeating-linear-gradient(to bottom, transparent 0 17px, color-mix(in srgb, var(--c) 7%, transparent) 17px 18px),
    linear-gradient(135deg, color-mix(in srgb, var(--c) 16%, var(--bg-side)), var(--bg-side) 70%);
}
.post-card__file {
  position: absolute;
  top: 12px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: var(--fg-dim);
  font: 12px/1.4 var(--font-mono);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.post-card__glyph {
  position: absolute;
  right: 18px;
  bottom: -18px;
  color: color-mix(in srgb, var(--c) 40%, transparent);
  font: 800 110px/1 var(--font-mono);
}
.post-card__body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 18px 20px 20px; }
.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: var(--fg-dim);
  font: 12px/1.5 var(--font-mono);
}
.post-card__cat { color: var(--c); }
.post-card .card__text { flex: 1; }
.post-card__more { color: var(--blue); font: 13px/1 var(--font-mono); }

.post-card--featured { grid-column: 1 / -1; flex-direction: row; }
.post-card--featured .post-card__cover { flex: 0 0 48%; aspect-ratio: auto; min-height: 280px; border-bottom: 0; border-right: 1px solid var(--border); }
.post-card--featured .card__title { font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.2; }
.post-card--featured .post-card__body { justify-content: center; padding: 28px 32px; }
.post-card--featured .card__text { flex: 0; font-size: 1.02rem; }

/* Пагинация */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 40px; }
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-side);
  color: var(--fg-muted);
  font: 13px/1 var(--font-mono);
}
.pagination a.page-numbers:hover { border-color: var(--blue); color: var(--fg); text-decoration: none; }
.pagination .current { border-color: var(--blue); background: var(--blue); color: var(--on-accent); }
.pagination .dots { border: 0; background: none; }

.empty-state { max-width: 620px; }
.empty-state__text { padding: 0 18px 18px; color: var(--fg-muted); }

/* Статья */
.article { padding-top: clamp(28px, 5vw, 56px); padding-bottom: clamp(56px, 8vw, 96px); }
.article > * { max-width: 760px; }
.article > .page-head { max-width: 820px; }
.article__cover { margin-bottom: 36px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); }
.article__cover img { display: block; width: 100%; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; list-style: none; }
.tags a {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--purple);
  font: 13px/1.4 var(--font-mono);
}
.tags a:hover { border-color: var(--purple); text-decoration: none; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 40px; }
.post-nav__link { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; }
.post-nav__link--next { text-align: right; }
.post-nav__hint { color: var(--fg-dim); font: 12.5px/1 var(--font-mono); }
.post-nav__title { color: var(--fg); font-weight: 600; line-height: 1.4; }

.author-box { display: flex; align-items: center; gap: 16px; margin-top: 40px; padding: 18px 20px; }
.author-box__name { font-weight: 700; }
.author-box__role { color: var(--fg-dim); font-weight: 400; font-size: 14px; }
.author-box__bio { margin-top: 2px; color: var(--fg-muted); font-size: 0.95rem; }

.related { margin-top: 48px; }
.related__title { margin-bottom: 16px; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.related .commit { grid-template-columns: 22px auto minmax(0, 1fr) auto; }

/* ── Текст статьи ───────────────────────────────────────────────────────── */

.prose { color: var(--fg); font-size: 1.07rem; line-height: 1.8; overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.25em; }
.prose h2, .prose h3, .prose h4 {
  margin-top: 2.2em;
  color: var(--fg);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  scroll-margin-top: calc(var(--titlebar-h) + var(--tabs-h) + 16px);
}
.prose h2 { font-size: 1.65rem; }
.prose h3 { font-size: 1.3rem; }
.prose h4 { font-size: 1.1rem; }
.prose h2::before, .prose h3::before {
  color: var(--comment);
  font: 500 0.7em/1 var(--font-mono);
  vertical-align: 0.12em;
}
.prose h2::before { content: '## '; }
.prose h3::before { content: '### '; }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--blue) 45%, transparent); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--blue); }
.prose strong { font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.4em; }
.prose ul li::marker { color: var(--purple); }
.prose ol li::marker { color: var(--purple); font-family: var(--font-mono); font-size: 0.9em; }
.prose blockquote {
  padding: 14px 20px;
  border-left: 3px solid var(--purple);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--bg-card);
  color: var(--fg-muted);
}
.prose hr { height: 1px; margin: 2.5em 0; border: 0; background: var(--border); }
.prose img { border-radius: var(--radius-sm); }
.prose figure { margin-left: 0; margin-right: 0; }
.prose figcaption { margin-top: 8px; color: var(--fg-dim); font-size: 0.85rem; text-align: center; }

.prose :not(pre) > code {
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-card);
  color: var(--cyan);
  font-size: 0.86em;
}

.prose pre {
  overflow-x: auto;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--code-bg);
  color: #a9b1d6;
  font-size: 14px;
  line-height: 1.7;
  tab-size: 4;
}
.prose pre code.hljs { padding: 0; background: transparent; }
.prose pre.has-code-header { margin-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }

.code-block-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 1.75em;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background: #13131a;
}
.code-block-header__dots { display: flex; gap: 6px; }
.code-block-header__dots span { width: 9px; height: 9px; border-radius: 50%; background: #3b4261; }
.code-block-header__lang { margin-left: auto; color: #828bb8; font: 12px/1 var(--font-mono); }

/* Плагин Highlighting Code Block */
.hcb_wrap {
  --hcb--bgc: #16161e;
  --hcb--c: #a9b1d6;
  --hcb--tsh: none;
  --hcb--line-numbers--c: #3b4261;
  --hcb--highlight-color: rgba(122, 162, 247, 0.08);
  --hcb--scbar-track--bgc: transparent;
  --hcb--scbar-thumb--bgc: #3b4261;
  --hcb--radius: 10px;
  --hcb--fz: 14px;
  border: 1px solid var(--border) !important;
  border-radius: var(--hcb--radius) !important;
}
.hcb_wrap > pre { margin: 0 !important; border: 0 !important; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
}
.prose th, .prose td { padding: 10px 14px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.prose th { background: var(--bg-side); font: 600 13px/1.4 var(--font-mono); }

.prose .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.prose .alignleft { float: left; margin: 0.3em 1.5em 1em 0; }
.prose .alignright { float: right; margin: 0.3em 0 1em 1.5em; }

.prose--panel { padding: 18px 20px; font-size: 0.98rem; color: var(--fg-muted); }

/* ── Формы ──────────────────────────────────────────────────────────────── */

.form-panel { margin-top: 16px; }
.form { display: flex; flex-direction: column; gap: 20px; padding: 22px 22px 24px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field > label,
.field > legend {
  padding: 0;
  color: var(--fg-muted);
  font: 500 13px/1.4 var(--font-mono);
}
.field > legend { margin-bottom: 8px; }
.field__req { color: var(--red); }
.field__hint { color: var(--fg-dim); font-size: 0.82rem; line-height: 1.6; }

.field input:not([type="radio"]):not([type="checkbox"]),
.field textarea,
.input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.5 var(--font-sans);
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus,
.field textarea:focus,
.input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 25%, transparent);
}
.field ::placeholder, .input::placeholder { color: var(--fg-dim); opacity: 0.8; }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.form__note { flex: 1 1 260px; color: var(--fg-dim); font-size: 0.82rem; line-height: 1.6; }

.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  line-height: 1.6;
}
.alert__icon { flex-shrink: 0; font-family: var(--font-mono); font-weight: 700; }
.alert--ok { border-color: color-mix(in srgb, var(--green) 40%, transparent); background: color-mix(in srgb, var(--green) 10%, transparent); }
.alert--ok .alert__icon { color: var(--green); }
.alert--err { border-color: color-mix(in srgb, var(--red) 40%, transparent); background: color-mix(in srgb, var(--red) 10%, transparent); }
.alert--err .alert__icon { color: var(--red); }
.alert--neutral { border-color: var(--border); background: var(--bg-side); color: var(--fg-muted); }
.alert--neutral strong { color: var(--fg); }

/* Взнос */
.amounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.amount { position: relative; display: block; }
.amount input { position: absolute; opacity: 0; pointer-events: none; }
.amount span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--fg);
  font: 600 14.5px/1.2 var(--font-mono);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: border-color .15s, background .15s;
}
.amount span:hover { border-color: var(--fg-dim); }
.amount input:checked + span { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 16%, transparent); }
.amount input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

.amount-custom { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.amount-custom .amount { flex-shrink: 0; }
.amount-custom__cur { color: var(--fg-dim); font-family: var(--font-mono); }

.consent { display: flex; align-items: flex-start; gap: 10px; color: var(--fg-muted); font-size: 0.88rem; line-height: 1.6; cursor: pointer; }
.consent input { flex-shrink: 0; width: 17px; height: 17px; margin: 3px 0 0; accent-color: var(--blue); }

.methods { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--fg-dim); font-size: 0.78rem; }
.methods__item { padding: 3px 10px; border: 1px solid var(--border); border-radius: 99px; font-family: var(--font-mono); }

.donate-amount-result {
  margin-top: 10px;
  color: var(--green);
  font: 800 clamp(2rem, 5vw, 2.8rem)/1.1 var(--font-mono);
  letter-spacing: -0.03em;
}

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

/* ── 404 ────────────────────────────────────────────────────────────────── */

.not-found { max-width: calc(760px + var(--gutter) * 2); }
.not-found__code {
  color: var(--red);
  font: 800 clamp(5rem, 16vw, 9rem)/1 var(--font-mono);
  letter-spacing: -0.06em;
}
.not-found .page-head__title { margin-top: 12px; }
.not-found .page-head__lead { max-width: 560px; }
.not-found__log { margin-top: 32px; }
.not-found__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ── Панель «Вывод» (подвал) ────────────────────────────────────────────── */

.output {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--bg-side);
}
.output__bar {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 34px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--border);
  font: 600 11px/1 var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.output__tab { position: relative; display: flex; align-items: center; height: 100%; color: var(--fg-dim); }
.output__tab.is-active { color: var(--fg); }
.output__tab.is-active::after { content: ''; position: absolute; inset: auto 0 -1px; height: 1px; background: var(--fg); }
.output__src { margin-left: auto; color: var(--fg-dim); font: 400 12px/1 var(--font-mono); letter-spacing: 0; text-transform: none; }

.output__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px var(--gutter) 28px;
  color: var(--fg-muted);
  font: 13px/1.7 var(--font-mono);
}
.output__line strong { color: var(--fg); }

.requisites {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px 28px;
}
.requisites__row dt { color: var(--fg-dim); font-size: 11.5px; }
.requisites__row dd { color: var(--fg-muted); }
.requisites a { color: var(--fg-muted); }
.requisites a:hover { color: var(--blue); }

/* ── Строка состояния ───────────────────────────────────────────────────── */

.statusbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 60;
  display: flex;
  justify-content: space-between;
  height: var(--statusbar-h);
  background: var(--bg-side);
  border-top: 1px solid var(--border);
  font: 12px/1 var(--font-mono);
}
.statusbar__group { display: flex; min-width: 0; }
.statusbar__item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--fg-dim);
  font: inherit;
  white-space: nowrap;
  cursor: default;
}
a.statusbar__item, button.statusbar__item { cursor: pointer; }
a.statusbar__item:hover, button.statusbar__item:hover { background: var(--bg-hl); color: var(--fg); text-decoration: none; }
.statusbar__branch { background: var(--blue); color: var(--on-accent); font-weight: 600; }
a.statusbar__branch:hover { background: color-mix(in srgb, var(--blue) 85%, var(--fg)); color: var(--on-accent); }
.statusbar .dot { width: 7px; height: 7px; box-shadow: none; }

/* ── Палитра команд ─────────────────────────────────────────────────────── */

.palette {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 16px;
  background: var(--overlay);
  backdrop-filter: blur(2px);
}
.palette[hidden] { display: none; }

.palette__box {
  display: flex;
  flex-direction: column;
  width: min(640px, 100%);
  max-height: 70vh;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-side);
  box-shadow: var(--shadow);
  animation: palette-in .14s ease-out;
}
@keyframes palette-in { from { opacity: 0; transform: translateY(-6px) scale(0.99); } }

.palette__field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
}
.palette__prompt { color: var(--purple); font: 700 15px/1 var(--font-mono); }
.palette__input {
  flex: 1;
  min-width: 0;
  height: 50px;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: 15px/1 var(--font-mono);
  outline: none;
}
.palette__input::placeholder { color: var(--fg-dim); }

.palette__list { flex: 1; overflow-y: auto; padding: 6px; list-style: none; scrollbar-width: thin; }
.palette__group {
  padding: 10px 10px 4px;
  color: var(--fg-dim);
  font: 600 11px/1 var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.palette__opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--fg-muted);
  cursor: pointer;
}
.palette__opt[aria-selected="true"] { background: var(--bg-hl); color: var(--fg); box-shadow: inset 2px 0 0 var(--blue); }
.palette__title { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14.5px; }
.palette__title mark { background: none; color: var(--blue); font-weight: 700; }
.palette__hint { flex-shrink: 0; max-width: 40%; overflow: hidden; color: var(--fg-dim); font: 12px/1.3 var(--font-mono); white-space: nowrap; text-overflow: ellipsis; }
.palette__empty { padding: 18px 12px; color: var(--fg-dim); font: 13px/1.5 var(--font-mono); }

.palette__foot {
  display: flex;
  gap: 18px;
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  color: var(--fg-dim);
  font-size: 12px;
}
.palette__foot kbd { margin-right: 3px; }

/* ── Баннер cookie (разметка родительской темы) ─────────────────────────── */

.itpunk-cookie-banner {
  position: fixed;
  right: 16px;
  bottom: calc(var(--statusbar-h) + 16px);
  z-index: 150;
  width: min(440px, calc(100vw - 32px));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-side);
  box-shadow: var(--shadow);
}
.itpunk-cookie-banner::before {
  content: 'ℹ  Уведомление';
  display: block;
  padding: 10px 16px 0;
  color: var(--blue);
  font: 600 12px/1.4 var(--font-mono);
}
.itpunk-cookie-banner__inner { display: flex; flex-direction: column; gap: 14px; padding: 8px 16px 16px; }
.itpunk-cookie-banner__text { color: var(--fg-muted); font-size: 0.9rem; line-height: 1.6; }
.itpunk-cookie-banner__actions { display: flex; justify-content: flex-end; }
.itpunk-cookie-banner__accept { min-height: 36px; padding: 0 16px; }

/* ── Адаптив ────────────────────────────────────────────────────────────── */

@media (max-width: 1280px) {
  :root { --explorer-w: 232px; }
}

@media (max-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero__term { max-width: 560px; }
}

@media (max-width: 1080px) {
  .about,
  .services { grid-template-columns: minmax(0, 1fr); }
  .rate { max-width: 460px; }
}

@media (max-width: 960px) {
  .workbench { grid-template-columns: minmax(0, 1fr); }
  .activitybar { display: none; }
  .titlebar__menu { display: inline-flex; }
  .titlebar__dots { display: none; }

  .explorer {
    position: fixed;
    top: var(--titlebar-h);
    bottom: var(--statusbar-h);
    left: 0;
    z-index: 80;
    width: min(300px, 86vw);
    height: auto;
    align-self: stretch; /* иначе у fixed-потомка grid-а высота «по содержимому» */
    box-shadow: var(--shadow);
    transform: translateX(-105%);
    transition: transform .22s ease;
    visibility: hidden;
  }
  .explorer-open .explorer { transform: none; visibility: visible; }
  .explorer-backdrop {
    position: fixed;
    inset: var(--titlebar-h) 0 var(--statusbar-h);
    z-index: 70;
    display: block;
    background: var(--overlay);
  }
  .explorer-backdrop[hidden] { display: none; }

  .repos { grid-template-columns: minmax(0, 1fr); }
  .repo--featured,
  .post-card--featured { flex-direction: column; }
  .repo--featured .repo__cover,
  .post-card--featured .post-card__cover {
    flex-basis: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 720px) {
  .titlebar { gap: 8px; padding-left: 6px; }
  .titlebar__path { display: none; }
  .titlebar__search { width: auto; flex: 0 1 auto; }
  .titlebar__search-text,
  .titlebar__search kbd { display: none; }
  .titlebar__search { width: 32px; height: 32px; justify-content: center; padding: 0; }

  .hero__hint { display: none; }
  .hero__actions .btn { flex: 1 1 auto; }

  .commit {
    grid-template-columns: 22px auto minmax(0, 1fr);
    grid-template-areas:
      "graph hash meta"
      "graph title title";
    gap: 4px 12px;
    padding: 12px 16px 12px 12px;
  }
  .commit__graph { grid-area: graph; }
  .commit__hash { grid-area: hash; }
  .commit__cat { display: none; }
  .commit__meta { grid-area: meta; text-align: right; }
  .commit__title { grid-area: title; white-space: normal; }
  .related .commit { grid-template-columns: 22px auto minmax(0, 1fr); }

  .contact__link { grid-template-columns: minmax(0, 1fr) auto; }
  .contact__key { grid-column: 1 / -1; font-size: 12px; }

  .form__row,
  .post-nav { grid-template-columns: minmax(0, 1fr); }
  .post-nav__link--next { text-align: left; }
  .form { padding: 18px 16px 20px; }
  .form__footer .btn { width: 100%; }
  .amount-custom { flex-wrap: wrap; }
  .amount-custom .input { flex: 1 1 140px; }

  .posts { grid-template-columns: minmax(0, 1fr); }
  .statusbar__hide-sm { display: none; }
  .palette { padding-top: 8vh; }
  .palette__foot { display: none; }
}

@media (max-width: 420px) {
  .statusbar__hide-xs { display: none; }
  .tab { padding: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  .titlebar, .activitybar, .explorer, .tabs, .breadcrumbs, .statusbar, .palette, .itpunk-cookie-banner { display: none !important; }
  .workbench { display: block; }
  body { padding: 0; background: #fff; color: #000; }
}
