:root {
  --bg: #0b1220;
  --bg-soft: #111a2d;
  --card: #ffffff;
  --line: #dbe4f0;
  --text: #152033;
  --muted: #59657a;
  --accent: #0070cb;
  --accent-dark: #395dc1;
  --success: #e9f9ef;
  --success-line: #b7e7c5;
  --danger: #fff1f1;
  --danger-line: #f4c8c8;
  --shadow: 0 16px 40px rgba(17, 26, 45, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.18);
  --radius: 20px;
  --radius-sm: 14px;
  --container-max: 1280px;
  --container-gutter: clamp(16px, 2.4vw, 32px);
  --tools-sidebar-width: 320px;
  --tools-sidebar-collapsed-width: 180px;
  --header-height: 88px;
  --drawer-width: min(88vw, 360px);
}

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

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

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(31, 107, 255, 0.12), transparent 28%),
    linear-gradient(180deg, #f5f8fc 0%, #eef3f9 100%);
}

body.has-tools-sidebar {
  padding-left: var(--tools-sidebar-width);
  transition: padding-left 0.25s ease;
}

body.menu-tools-open,
body.menu-nav-open {
  overflow: hidden;
}

header,
main,
footer {
  width: auto;
  float: none;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(var(--container-max), calc(100% - (var(--container-gutter) * 2)));
  margin: 0 auto;
}

.hidden {
  display: none !important;
}

.page404 .center {
  display: grid;
  justify-content: center;
  margin: 100px 0;
  text-align: center;
}
.page404 .lead {
  color: #59657a;
  margin: 30px 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.site-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(11, 18, 32, 0.5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.site-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.site-header {
    position: sticky;
    z-index: 30;
    background: rgb(255 255 255 / 51%);
    border-bottom: 1px solid rgba(219, 228, 240, 0.8);
    backdrop-filter: blur(12px);
    top: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 28px);
  min-height: var(--header-height);
  padding: 16px 0;
}

.header-side {
  display: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  max-width: min(360px, 42vw);
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  height: 50px;
  width: auto;
  max-width: 100%;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #3a8bff);
  color: #fff;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  font-size: 18px;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

.header-toggle {
  display: none;
  appearance: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.header-toggle:hover {
  transform: translateY(-1px);
  background: #f8fbff;
  border-color: rgba(31, 107, 255, 0.2);
}

.header-toggle__emoji {
  font-size: 20px;
  line-height: 1;
}

.header-toggle__hamburger {
  display: inline-grid;
  gap: 4px;
  width: 18px;
}

.header-toggle__hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
}

.site-nav__mobile-head {
  display: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
  background: rgba(31, 107, 255, 0.08);
  text-decoration: none;
}

.nav-link.is-active {
  background: rgba(31, 107, 255, 0.12);
  color: var(--accent);
}

.site-main {
  min-width: 0;
  padding: clamp(24px, 2.4vw, 36px) 0 56px;
}

.hero {
  padding: 34px;
  border-radius: 28px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(12, 23, 46, 0.95), rgba(26, 58, 125, 0.92)),
    linear-gradient(135deg, #0f172a, #1e3a8a);
  box-shadow: var(--shadow);
}

.hero-home {
  margin-bottom: 28px;
}

.eyebrow {
  display: inline-flex;
  padding: 8px 14px;
  margin: 0 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero h1,
.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.1;
}

.lead {
  margin: 0;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.88);
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.pill {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 600;
}

.tool-card,
.content-card,
.info-card,
.page-hero {
  background: var(--card);
  border: 1px solid rgba(219, 228, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.tool-card,
.content-card,
.page-hero {
  padding: 28px;
}

.content-card {
  margin-top: 24px;
}

.page-hero {
  margin-bottom: 24px;
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tab {
  appearance: none;
  border: 1px solid var(--line);
  background: #f7faff;
  color: var(--text);
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.tab.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.stack {
  display: grid;
  gap: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-group > span {
  font-weight: 700;
}

.input,
textarea.input {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea.input {
  resize: vertical;
  min-height: 160px;
}

.input:focus {
  outline: none;
  border-color: rgba(31, 107, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(31, 107, 255, 0.12);
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text);
}

.checkbox input {
  margin-top: 4px;
}

.button-group {
  margin-bottom: 20px;
}

.btn {
  appearance: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-bottom {
  position: absolute;
  bottom: 20px;
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-secondary {
  background: #eef4ff;
  color: var(--accent);
  border: 1px solid rgba(31, 107, 255, 0.2);
}
a.full-btn {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}
.status-box,
.alert {
  padding: 14px 16px;
  border-radius: 14px;
  font-weight: 600;
}

.status-box {
  background: #f7faff;
  border: 1px solid #d8e7ff;
}

.alert-error {
  background: #fff1f1;
  border: 1px solid #f4c8c8;
  color: #a12828;
}

.result-card {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.media-preview {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 20px;
}

.media-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #eff4fb;
}

.media-title {
  margin: 8px 0 12px;
  font-size: 26px;
  line-height: 1.2;
}

.mini-meta,
.muted {
  color: var(--muted);
}

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

.chip {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f1f5fb;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.cards-grid,
.two-cols,
.card-grid,
.meta-grid,
.article-grid {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

.cards-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-card {
  padding: 24px;
}

.info-card h2,
.content-card h2,
.page-hero h2,
.prose h2 {
  margin-top: 0;
  line-height: 1.2;
}

.info-card-success {
  background: var(--success);
  border-color: var(--success-line);
}

.info-card-danger {
  background: var(--danger);
  border-color: var(--danger-line);
}

.simple-list {
  margin: 0;
  padding-left: 20px;
}

.simple-list li + li {
  margin-top: 8px;
}

.faq-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.faq-item:last-child {
  border-bottom: 0;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 800;
}

.faq-item p {
  margin: 12px 0 0;
}

.prose {
  font-size: 17px;
}

.prose h2 {
  margin-top: 32px;
}

.prose h3 {
  margin-top: 24px;
}

.prose p,
.prose ul,
.prose ol,
.prose table {
  margin: 14px 0;
}

.prose ul,
.prose ol {
  padding-left: 22px;
}

.note-box {
  padding: 18px 20px;
  border-radius: 16px;
  background: #f7faff;
  border: 1px solid #d8e7ff;
}

.article-card {
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.article-card h2,
.article-card h3 {
  margin-top: 0;
}

.site-footer {
  color: #dfe7f5;
  background:
    linear-gradient(180deg, rgba(9, 18, 36, 0.98), rgba(13, 24, 48, 1));
  padding: 42px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 20px;
}

.footer-card {
  padding: 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-card h3 {
  margin-top: 0;
  color: #fff;
}

.footer-list {
  margin: 0;
  padding-left: 18px;
}

.footer-card a {
  color: #d8e7ff;
}

.footer-bottom {
  padding: 20px 0 28px;
  color: rgba(223, 231, 245, 0.8);
}

.cookie-banner {
  position: fixed;
  right: 16px;
  bottom: 16px;
  max-width: 420px;
  z-index: 80;
  border-radius: 18px;
  border: 1px solid rgba(31, 107, 255, 0.2);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.cookie-banner__content {
  padding: 18px;
  display: grid;
  gap: 14px;
}

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

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

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

.wrap {
  max-width: 100%;
  margin: 0 auto;
  padding: 20px;
}

.ads {
  width: min(100%, 640px);
  padding: 20px;
}

.tools-layout {
  max-width: 100%;
  margin: 0 auto;
  min-width: 0;
}

.tools-layout--with-sidebar .site-main {
  margin-left: 0;
}

.tools-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--tools-sidebar-width);
  z-index: 50;
}

.tools-sidebar__card {
  height: 100%;
  overflow-y: auto;
  background: #ffffff;
  border-right: 1px solid rgba(15, 23, 42, 0.08);
  padding: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.tools-sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.tools-sidebar__eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.tools-sidebar__title {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.2;
}

.tools-sidebar__note {
  margin: 0 0 14px;
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
}

.drawer-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.tools-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.tools-menu__link {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  background: #f8fafc;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 12px 14px;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.tools-menu__link:hover {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
  text-decoration: none;
}

.tools-menu__link.is-active {
  background: #e0f2fe;
  border-color: #7dd3fc;
}

.tools-menu__icon {
  font-size: 20px;
  line-height: 1;
  flex: 0 0 auto;
  margin-top: 1px;
}

.tools-menu__meta {
  display: block;
  min-width: 0;
}

.tools-menu__name {
  display: block;
  font-weight: 700;
  line-height: 1.35;
}

.tools-menu__desc {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 24px;
  position: relative;
}
@media (max-width: 999px) {
    .tools-grid {grid-template-columns: repeat(1, 1fr);}
}
.tool-tile,
.empty-tools-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  position: relative;
}

.empty-tools-card {
  border-style: dashed;
}

.tool-tile__icon {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 14px;
}

.tool-tile__title {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.3;
}

.tool-tile__desc {
  margin: 0 0 60px;
  color: #475569;
  line-height: 1.6;
}

.tool-tile__footer {
  /*display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;*/
}

.home-intro {
  margin-bottom: 24px;
}

@media (max-width: 1440px) and (min-width: 1101px) {
  body.has-tools-sidebar {
    padding-left: var(--tools-sidebar-collapsed-width);
  }

  body.has-tools-sidebar .tools-sidebar {
    width: var(--tools-sidebar-collapsed-width);
  }

  body.has-tools-sidebar .tools-sidebar__card {
    padding: 18px 10px;
  }

  body.has-tools-sidebar .tools-sidebar__head,
  body.has-tools-sidebar .count-badge,
  body.has-tools-sidebar .tools-menu__meta {
    display: none;
  }

  body.has-tools-sidebar .tools-menu {
    margin-top: 0;
  }

  body.has-tools-sidebar .tools-menu__link {
    justify-content: center;
    align-items: center;
    padding: 14px 10px;
  }

  body.has-tools-sidebar .tools-menu__icon {
    margin-top: 0;
    font-size: 24px;
  }
}

@media (max-width: 1180px) {
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-link {
    padding: 9px 12px;
    font-size: 15px;
  }

  .brand {
    max-width: min(300px, 34vw);
  }

  .brand img {
    height: 46px;
  }
}

@media (max-width: 1024px) {
  .footer-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .media-preview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  body.has-tools-sidebar,
  body.no-tools-sidebar {
    padding-left: 0;
  }

  .site-header {
    z-index: 40;
  }

  .header-inner {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    gap: 12px;
    min-height: 72px;
    padding: 12px 0;
  }

  .header-side {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .header-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .brand {
    justify-self: center;
    margin: 0 auto;
    max-width: min(240px, 100%);
  }

  .brand img {
    height: 40px;
    margin: 0 auto;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--drawer-width);
    margin: 0;
    padding: 20px 16px 28px;
    background: #ffffff;
    border-left: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-y: auto;
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.28s ease, opacity 0.28s ease, visibility 0.28s ease;
    z-index: 60;
  }

  body.menu-nav-open .site-nav {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .site-nav__mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }

  .site-nav__mobile-head strong {
    font-size: 18px;
    line-height: 1.2;
  }

  .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 14px 16px;
    border-radius: 14px;
  }

  .tools-sidebar {
    width: min(86vw, 340px);
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.28s ease, opacity 0.28s ease, visibility 0.28s ease;
    z-index: 60;
  }

  body.menu-tools-open .tools-sidebar {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .tools-sidebar__card {
    padding: 20px 16px 24px;
    border-right: 0;
  }

  .tools-sidebar__head {
    display: flex;
  }

  .drawer-close {
    display: inline-flex;
  }

  .tools-menu {
    margin-top: 16px;
  }

  .tools-menu__link {
    justify-content: flex-start;
    align-items: flex-start;
    padding: 12px 14px;
  }

  .tools-menu__meta {
    display: block;
  }

  .count-badge {
    display: inline-flex;
  }

  .site-main {
    padding-top: 20px;
  }

  .hero,
  .tool-card,
  .content-card,
  .info-card,
  .page-hero,
  .tool-tile,
  .empty-tools-card,
  .footer-card {
    padding: 20px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: clamp(28px, 8vw, 34px);
  }

  .lead {
    font-size: 16px;
  }

  .cards-grid,
  .two-cols,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-width: none;
  }
}

@media (max-width: 640px) {
  :root {
    --container-gutter: 12px;
    --drawer-width: 100vw;
  }

  .hero {
    padding: 18px;
    border-radius: 22px;
  }

  .tool-card,
  .content-card,
  .page-hero,
  .info-card,
  .tool-tile,
  .empty-tools-card {
    padding: 18px;
    border-radius: 18px;
  }

  .tabs {
    gap: 8px;
  }

  .tab,
  .btn,
  .input,
  textarea.input {
    min-height: 48px;
  }

  .tool-tile__footer {
    align-items: stretch;
  }

  .tool-tile__footer .btn {
    width: 100%;
  }

  .footer-card {
    padding: 18px;
  }
}

@media (max-width: 420px) {
  .header-inner {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 10px;
  }

  .header-toggle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
  }

  .brand img {
    height: 36px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 26px;
  }

  .chip,
  .count-badge,
  .eyebrow,
  .pill {
    font-size: 12px;
  }
}
.dropzone {
      border: 2px dashed #b8c2d6;
      border-radius: var(--radius-sm);
      padding: 28px 20px;
      background: #f8fbff;
      text-align: center;
      cursor: pointer;
      transition: .2s ease;
      user-select: none;
    }

    .dropzone:hover,
    .dropzone.is-dragover {
      border-color: #4f7cff;
      background: #eef4ff;
      transform: translateY(-1px);
    }

    .dropzone strong {
      display: block;
      font-size: 18px;
      margin-bottom: 8px;
    }

    .dropzone span {
      display: block;
      color: #5f6f8a;
    }

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

    .file-list {
      margin: 0;
      padding: 0;
      list-style: none;
      display: grid;
      gap: 10px;
    }

    .file-item {
      padding: 12px 14px;
      border: 1px solid #e2e8f0;
      border-radius: var(--radius-sm);
      background: #fff;
      display: flex;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
    }

    .file-name {
      font-weight: 600;
      word-break: break-word;
    }

    .file-size {
      color: #64748b;
      white-space: nowrap;
    }

    /* Группировка на главной */
.category-section {
    margin-top: 48px;
}
.category-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 20px;
    padding-left: 10px;
    border-left: 4px solid var(--accent);
}

/* Аккордеон в сайдбаре */
.menu-category {
    margin-bottom: 4px;
    background-color: #f1f5f963;
    border-radius: var(--radius-sm);
    border: 1px solid #f1f5f9;
}
.menu-category__title {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #f1f5f9;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    transition: background 0.2s;
}
.menu-category__title:hover {
    background: #e2e8f0;
}
.menu-category__title .chevron {
    transition: transform 0.3s;
}
.menu-category__list {
    display: none;
    padding: 8px 0 8px 10px;
    flex-direction: column;
    gap: 6px;
}
.menu-category.is-expanded .menu-category__list {
    display: flex;
}
.menu-category.is-expanded .chevron {
    transform: rotate(180deg);
}

/* Компактный вид ссылок в сайдбаре */
.menu-category .tools-menu__link {
    padding: 8px 12px;
    background: transparent;
}
.menu-category .tools-menu__link:hover {
    background: rgba(31, 107, 255, 0.05);
}
.menu-category .tools-menu__link.is-active {
    background: #e0f2fe;
}
.menu-category .tools-menu__name {
    font-size: 14px;
}

/* Hero Pills как ссылки */
.hero-pills .pill {
    transition: transform 0.2s, background 0.2s;
    color: #fff;
}
.hero-pills .pill:hover {
    background: var(--accent);
    transform: translateY(-2px);
    text-decoration: none;
}

.auto-dropzone .auto-dropzone__accept {
  margin-top: 6px;
  font-size: 12px;
  color: #7a879b;
}

.auto-file-summary {
  margin-top: 14px;
  text-align: left;
}

.auto-file-summary > .muted {
  text-align: center;
  font-size: 13px;
}

/* Mobile/tablet layout hardening */
@media (max-width: 1100px) {
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .site-header {
    background: rgba(255, 255, 255, 0.92);
  }

  .site-overlay {
    z-index: 55;
  }

  .tools-sidebar,
  .site-nav {
    z-index: 70;
    max-width: 100vw;
  }

  .header-inner {
    width: 100%;
  }

  .brand {
    min-width: 0;
  }

  .brand img {
    max-width: min(220px, 62vw);
  }

  .site-main,
  .site-footer,
  .container,
  .tool-card,
  .content-card,
  .hero,
  .page-hero,
  .cards-grid,
  .tools-grid,
  .form-grid,
  .button-group,
  .group-buttons {
    max-width: 100%;
  }

  .button-group,
  .group-buttons,
  .hero-pills,
  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .button-group::-webkit-scrollbar,
  .group-buttons::-webkit-scrollbar,
  .hero-pills::-webkit-scrollbar,
  .tabs::-webkit-scrollbar {
    display: none;
  }
}

/* Drawer visibility fix: .site-header creates a stacking context, so mobile panels must sit above the overlay. */
@media (max-width: 1100px) {
  .site-header {
    z-index: 100;
  }

  .site-nav,
  .tools-sidebar {
    position: fixed;
    isolation: isolate;
    overscroll-behavior: contain;
  }

  .site-nav {
    z-index: 120;
  }

  .tools-sidebar {
    z-index: 115;
  }
}

/* Mobile navigation drawer: full-height right panel above page and overlay. */
@media (max-width: 1100px) {
  body.menu-nav-open {
    overflow: hidden;
    touch-action: none;
  }

  body.menu-nav-open .site-header {
    z-index: 1002;
  }

  #siteNav.site-nav {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    left: auto !important;
    width: min(88vw, 360px) !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: none !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: max(18px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom)) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background: #ffffff !important;
    border-left: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: -24px 0 60px rgba(15, 23, 42, 0.22) !important;
    transform: translate3d(100%, 0, 0) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: 1001 !important;
    isolation: isolate !important;
    overscroll-behavior: contain !important;
    transition: transform 0.28s ease, opacity 0.28s ease, visibility 0.28s ease !important;
  }

  body.menu-nav-open #siteNav.site-nav {
    transform: translate3d(0, 0, 0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  #siteNav .site-nav__mobile-head {
    display: flex !important;
    flex: 0 0 auto;
  }

  #siteNav .nav-link {
    display: flex !important;
    width: 100% !important;
    flex: 0 0 auto;
  }

  .site-overlay {
    z-index: 900 !important;
  }

  .tools-sidebar {
    z-index: 1000 !important;
  }
}

.tool-how-block {
  margin-top: 24px;
}

.tool-how-details summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 800;
  font-size: 18px;
  list-style: none;
}

.tool-how-details summary::-webkit-details-marker {
  display: none;
}

.tool-how-details summary::after {
  content: "↓";
  margin-left: auto;
  color: var(--muted);
  font-size: 16px;
}

.tool-how-details[open] summary::after {
  content: "↑";
}

.tool-how-body {
  margin-top: 18px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.button-link:hover {
  text-decoration: none;
  filter: brightness(0.96);
}

.blog-card-grid {
  margin-top: 18px;
}

.article-tool-link {
  margin-top: 14px;
  font-weight: 700;
  color: var(--muted);
}

.tool-articles-block {
  margin-top: 24px;
}

.tool-articles-block .card-grid,
.latest-blog-block .card-grid {
  margin-top: 18px;
}

/* Tiled blog layout */
.blog-card-grid.article-tile-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 22px;
}

.article-tile-grid-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.article-card.article-tile {
  position: relative;
  min-height: 100%;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 0%, rgba(42, 124, 255, 0.12), transparent 34%),
    #fff;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.article-card.article-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(42, 124, 255, 0.28);
  box-shadow: 0 22px 52px rgba(21, 41, 82, 0.14);
}

.article-tile__link {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 235px;
  padding: 24px;
  color: inherit;
  text-decoration: none;
}

.article-tile__link:hover {
  text-decoration: none;
}

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

.article-tile__category,
.article-tile__date {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
}

.article-tile__category {
  color: var(--accent);
  background: rgba(42, 124, 255, 0.1);
}

.article-tile__date {
  color: var(--muted);
  background: #f5f7fb;
  white-space: nowrap;
}

.article-tile__title {
  display: block;
  margin: 0 0 12px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.article-tile__excerpt {
  display: block;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.article-tile__tool {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: auto 0 0;
  padding: 15px 24px;
  border-top: 1px solid var(--line);
  background: rgba(248, 251, 255, 0.88);
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.article-tile__tool::after {
  content: "→";
  font-size: 18px;
  line-height: 1;
}

.article-tile__tool:hover {
  text-decoration: none;
  background: rgba(42, 124, 255, 0.08);
}

.tool-articles-block,
.latest-blog-block {
  overflow: hidden;
}

.tool-articles-block .article-tile-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tool-articles-block .article-tile__link {
  min-height: 210px;
}

.tool-articles-block .article-tile__title,
.latest-blog-block .article-tile__title {
  font-size: 19px;
}

.latest-blog-block .article-tile__link {
  min-height: 220px;
}

@media (max-width: 1180px) {
  .article-tile-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .blog-card-grid.article-tile-grid,
  .tool-articles-block .article-tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .blog-card-grid.article-tile-grid,
  .article-tile-grid-compact,
  .tool-articles-block .article-tile-grid {
    grid-template-columns: 1fr;
  }

  .article-tile__link {
    min-height: 0;
    padding: 20px;
  }

  .article-tile__top {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-tile__tool {
    padding: 14px 20px;
  }
}

/* Day/night theme switcher */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: 4px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  background: #ffffff;
  border-color: rgba(31, 107, 255, 0.22);
}

.theme-toggle__icon {
  font-size: 19px;
  line-height: 1;
}

.theme-toggle__icon--sun {
  display: inline;
}

.theme-toggle__icon--moon {
  display: none;
}

html[data-theme="dark"] {
  --bg: #050914;
  --bg-soft: #0d1628;
  --card: #101827;
  --line: rgba(148, 163, 184, 0.22);
  --text: #edf3ff;
  --muted: #a7b3c8;
  --accent: #dc3432;
  --accent-dark: #752126;
  --success: rgba(34, 197, 94, 0.12);
  --success-line: rgba(74, 222, 128, 0.28);
  --danger: rgba(239, 68, 68, 0.12);
  --danger-line: rgba(248, 113, 113, 0.28);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.26);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.38);
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(116, 167, 255, 0.15), transparent 30%),
    linear-gradient(180deg, #050914 0%, #0b1220 100%);
}

html[data-theme="dark"] .site-header {
  background: rgba(8, 13, 24, 0.78);
  border-bottom-color: rgba(148, 163, 184, 0.2);
}

html[data-theme="dark"] .header-toggle,
html[data-theme="dark"] .theme-toggle {
  background: rgba(15, 23, 42, 0.86);
  border-color: rgba(148, 163, 184, 0.24);
  color: var(--text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .header-toggle:hover,
html[data-theme="dark"] .theme-toggle:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(116, 167, 255, 0.36);
}

html[data-theme="dark"] .theme-toggle__icon--sun {
  display: none;
}

html[data-theme="dark"] .theme-toggle__icon--moon {
  display: inline;
}

html[data-theme="dark"] .nav-link {
  color: var(--text);
}

html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .nav-link.is-active {
  background: rgba(116, 167, 255, 0.14);
  color: #dbeafe;
}

html[data-theme="dark"] .content-card,
html[data-theme="dark"] .tool-tile,
html[data-theme="dark"] .article-card,
html[data-theme="dark"] .article-tile,
html[data-theme="dark"] .footer-card,
html[data-theme="dark"] .tools-sidebar__card,
html[data-theme="dark"] .result,
html[data-theme="dark"] .blog-article,
html[data-theme="dark"] .tool-how-card,
html[data-theme="dark"] .tool-related-articles {
  background: rgba(16, 24, 39, 0.94);
  border-color: rgba(148, 163, 184, 0.22);
  color: var(--text);
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .dropzone,
html[data-theme="dark"] .menu-category__title,
html[data-theme="dark"] .tools-menu__link {
  background-color: rgba(15, 23, 42, 0.86);
  border-color: rgba(148, 163, 184, 0.22);
  color: var(--text);
}

html[data-theme="dark"] .article-tile__tool,
html[data-theme="dark"] .article-tile__date {
  background: rgba(15, 23, 42, 0.7);
}

html[data-theme="dark"] .muted,
html[data-theme="dark"] .tool-tile__desc,
html[data-theme="dark"] .article-card__excerpt,
html[data-theme="dark"] .article-tile__excerpt,
html[data-theme="dark"] .lead {
  color: var(--muted);
}

html[data-theme="dark"] .site-footer {
  background: #050914;
  border-top-color: rgba(148, 163, 184, 0.18);
}

@media (max-width: 1100px) {
  .site-nav .theme-toggle {
    width: 100%;
    justify-content: flex-start;
    gap: 10px;
    padding: 12px 14px;
    margin: 4px 0 0;
    border-radius: 16px;
  }

  .site-nav .theme-toggle::after {
    content: "Ночная тема";
    font-weight: 700;
  }

  html[data-theme="dark"] .site-nav .theme-toggle::after {
    content: "Дневная тема";
  }
}

/* Dark theme contrast fixes */
html[data-theme="dark"] {
  --surface-dark: #101827;
  --surface-dark-2: #0f172a;
  --surface-dark-3: #172033;
  --surface-border-dark: rgba(148, 163, 184, 0.26);
  --text-on-dark: #edf3ff;
  --muted-on-dark: #aebbd2;
}

html[data-theme="dark"] .content-card,
html[data-theme="dark"] .tool-card,
html[data-theme="dark"] .tool-section,
html[data-theme="dark"] .converter-card,
html[data-theme="dark"] .dropzone,
html[data-theme="dark"] .status-box,
html[data-theme="dark"] .note-box,
html[data-theme="dark"] .cookie-banner,
html[data-theme="dark"] .drawer-close,
html[data-theme="dark"] .tab,
html[data-theme="dark"] .chip,
html[data-theme="dark"] .count-badge,
html[data-theme="dark"] .article-tile__date,
html[data-theme="dark"] .article-tile__tool,
html[data-theme="dark"] .tools-menu__link,
html[data-theme="dark"] .tools-menu__link.is-active,
html[data-theme="dark"] .menu-category__title,
html[data-theme="dark"] .mobile-drawer {
  background: var(--surface-dark-2) !important;
  border-color: var(--surface-border-dark) !important;
  color: var(--text-on-dark) !important;
}

html[data-theme="dark"] .dropzone {
  background: #0c1424 !important;
  border-color: rgba(116, 167, 255, 0.28) !important;
}

html[data-theme="dark"] .dropzone:hover,
html[data-theme="dark"] .dropzone.is-dragover,
html[data-theme="dark"] .tab:hover,
html[data-theme="dark"] .tools-menu__link:hover,
html[data-theme="dark"] .tools-menu__link.is-active {
  background: var(--surface-dark-3) !important;
  border-color: rgba(116, 167, 255, 0.42) !important;
}

html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .download-link,
html[data-theme="dark"] .file-list,
html[data-theme="dark"] .file-item,
html[data-theme="dark"] .result-item,
html[data-theme="dark"] .preview-box,
html[data-theme="dark"] .output-box {
  background: var(--surface-dark-3) !important;
  border-color: var(--surface-border-dark) !important;
  color: var(--text-on-dark) !important;
}

html[data-theme="dark"] .btn-primary {
  background: #5d8fe8 !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .btn-primary:disabled,
html[data-theme="dark"] .btn:disabled {
  background: #3f5f98 !important;
  color: #d9e6ff !important;
  opacity: 1 !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .input,
html[data-theme="dark"] textarea.input,
html[data-theme="dark"] .hidden-input {
  background: #0b1322 !important;
  border-color: var(--surface-border-dark) !important;
  color: var(--text-on-dark) !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder,
html[data-theme="dark"] .input::placeholder {
  color: #9fb0ca !important;
  opacity: 1 !important;
}

html[data-theme="dark"] .status-box,
html[data-theme="dark"] .note-box,
html[data-theme="dark"] .contact-box,
html[data-theme="dark"] .help-box,
html[data-theme="dark"] .info-box {
  background: #0f1a2d !important;
  border-color: rgba(116, 167, 255, 0.26) !important;
  color: var(--text-on-dark) !important;
}

html[data-theme="dark"] .alert-error {
  background: rgba(127, 29, 29, 0.28) !important;
  border-color: rgba(248, 113, 113, 0.35) !important;
  color: #fecaca !important;
}

html[data-theme="dark"] .tools-sidebar__eyebrow,
html[data-theme="dark"] .tools-sidebar__note,
html[data-theme="dark"] .tools-menu__desc,
html[data-theme="dark"] .mini-meta,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .lead,
html[data-theme="dark"] .hint,
html[data-theme="dark"] .small,
html[data-theme="dark"] small {
  color: var(--muted-on-dark) !important;
}

html[data-theme="dark"] .tab.is-active,
html[data-theme="dark"] .article-tile__category,
html[data-theme="dark"] .count-badge {
  background: rgba(116, 167, 255, 0.18) !important;
  border-color: rgba(116, 167, 255, 0.38) !important;
  color: #dbeafe !important;
}

html[data-theme="dark"] table,
html[data-theme="dark"] th,
html[data-theme="dark"] td {
  color: var(--text-on-dark) !important;
  border-color: var(--surface-border-dark) !important;
}

html[data-theme="dark"] hr {
  border-color: var(--surface-border-dark) !important;
}

.bottom-banners {
  position: absolute;
  bottom: 20px;
  padding-right: 20px;
}

.bottom-banners__item {
  margin-top: 20px;
}

.bottom-banners__item img {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}