/* Шапка блога — стиль и дизайн как у лендинга, но без ссылок на разделы. */

:root {
  --hmt-accent: #e5673a;
  --hmt-accent-2: #c34e24;
  --hmt-bg: #f7f5f0;
  --hmt-panel: #ffffff;
  --hmt-line: rgba(18, 18, 28, 0.12);
  --hmt-ink: #17151a;
  --hmt-ink-2: #5d5866;
}

html[data-theme="dark"] {
  --hmt-bg: #0b0a0f;
  --hmt-panel: #15141b;
  --hmt-line: rgba(255, 255, 255, 0.14);
  --hmt-ink: #f2f0ea;
  --hmt-ink-2: #a9a3b3;
}

.hmt-topnav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--hmt-bg) 86%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--hmt-line);
}

.hmt-topnav__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 860px;
  margin: 0 auto;
  padding: 10px 20px;
}

.hmt-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--hmt-ink);
  text-decoration: none;
  white-space: nowrap;
}

.hmt-logo img { width: 32px; height: 32px; border-radius: 9px; display: block; }

.hmt-logo__ai {
  margin-left: 5px;
  padding: 2px 6px 3px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--hmt-accent), var(--hmt-accent-2));
}

.hmt-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.hmt-btn {
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0 10px;
  border: 1px solid var(--hmt-line);
  border-radius: 9px;
  background: transparent;
  color: var(--hmt-ink-2);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.hmt-btn:hover { border-color: var(--hmt-accent); color: var(--hmt-ink); }

.hmt-cta {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border-radius: 9px;
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(135deg, var(--hmt-accent), var(--hmt-accent-2));
  box-shadow: 0 10px 22px -14px var(--hmt-accent);
}

@media (max-width: 640px) {
  .hmt-topnav__inner { gap: 8px; padding: 9px 14px; }
  .hmt-logo { font-size: 15px; }
  .hmt-logo img { width: 28px; height: 28px; border-radius: 8px; }
  .hmt-logo__ai { font-size: 10px; padding: 2px 5px; }
  .hmt-cta { display: none; }
  .hmt-btn { height: 32px; padding: 0 8px; font-size: 11.5px; }
}

/* переключатели языка и темы — в одном стиле с кнопками лендинга */
.hmt-actions .nav-actions { display: flex; align-items: center; gap: 8px; }

.hmt-actions .icon-btn,
.hmt-actions .menu > summary {
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--hmt-line);
  border-radius: 9px;
  background: transparent;
  color: var(--hmt-ink-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.hmt-actions .icon-btn { width: 34px; padding: 0; }
.hmt-actions .icon-btn svg { width: 17px; height: 17px; }
.hmt-actions .menu > summary::-webkit-details-marker { display: none; }

.hmt-actions .icon-btn:hover,
.hmt-actions .menu > summary:hover,
.hmt-actions .menu[open] > summary {
  border-color: var(--hmt-accent);
  color: var(--hmt-ink);
}

.hmt-actions .menu { position: relative; }

/* сама кнопка языка: глобус + код + шеврон, как .control--nav на лендинге */
.hmt-actions .menu > summary > svg:first-of-type { width: 16px; height: 16px; order: -1; }
.hmt-actions .menu > summary .chev { width: 10px; height: 10px; opacity: 0.7; margin-left: 2px; }
.hmt-actions .menu > summary .lang-name { font-size: 12px; font-weight: 600; letter-spacing: 0.01em; }

/* выпадающая панель: как .lang__menu на лендинге */
.hmt-actions .menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 70;
  min-width: 188px;
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--hmt-line);
  border-radius: 12px;
  background: var(--hmt-panel);
  box-shadow: 0 24px 48px -26px rgba(0, 0, 0, 0.55);
}

.hmt-actions .menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--hmt-ink-2);
  text-decoration: none;
}

.hmt-actions .menu-item:hover { background: color-mix(in srgb, var(--hmt-ink) 7%, transparent); color: var(--hmt-ink); }
.hmt-actions .menu-item[aria-current="true"] { color: var(--hmt-ink); }
.hmt-actions .menu-item[aria-current="true"]::after { content: "✓"; color: var(--hmt-accent); font-size: 11px; }

/* FAQ: там своя разметка — кнопка темы без класса и ссылка на другой язык */
.hmt-actions #theme-toggle,
.hmt-actions > a.active {
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--hmt-line);
  border-radius: 9px;
  background: transparent;
  color: var(--hmt-ink-2);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.hmt-actions #theme-toggle { width: 34px; padding: 0; }
.hmt-actions #theme-toggle svg { width: 17px; height: 17px; }

.hmt-actions #theme-toggle:hover,
.hmt-actions > a.active:hover { border-color: var(--hmt-accent); color: var(--hmt-ink); }
