:root {
  --primary: #0b63f6;
  --primary-dark: #0848b8;
  --surface: #ffffff;
  --surface-muted: #f3f6fb;
  --text: #152238;
  --text-soft: #54627a;
  --border: #dce3ef;
  --success: #0b9b59;
  --danger: #d22d2d;
  --shadow: 0 8px 30px rgba(11, 35, 74, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "Roboto", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
  line-height: 1.6;
}

body.dark {
  --surface: #0f1725;
  --surface-muted: #182234;
  --text: #f2f5fb;
  --text-soft: #afbdd2;
  --border: #25344c;
  background: linear-gradient(180deg, #0e1624 0%, #121d2f 100%);
}

img {
  max-width: 100%;
  height: auto;
}

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

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

body.dark .site-header {
  background: rgba(15, 23, 37, 0.92);
}

.header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}

.logo {
  font-weight: 800;
  color: var(--text);
  font-size: 1.2rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav a {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

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

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

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--primary-dark);
}

.btn-ghost {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.hero {
  padding: 5rem 0 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: center;
}

.hero h1 {
  line-height: 1.25;
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
  margin-bottom: 0.8rem;
}

.hero p {
  color: var(--text-soft);
  margin-bottom: 1.2rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 1.1rem;
}

.badge {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 600;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-top: 1rem;
}

.stat-card {
  padding: 0.9rem;
  text-align: center;
}

.stat-card strong {
  display: block;
  font-size: 1.2rem;
  color: var(--text);
}

.button-row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.card,
.tool-card,
.article-card,
.ad-box,
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.grid {
  display: grid;
  gap: 1rem;
}

.tools-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.tool-card {
  padding: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-card h3,
.tool-card h2 {
  margin: 0.7rem 0 0.45rem;
}

.tool-card p {
  margin: 0 0 0.9rem;
  color: var(--text-soft);
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(11, 35, 74, 0.14);
}

.tool-card .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #e8f0ff;
  color: var(--primary);
  font-weight: 800;
}

.section {
  padding: 2.4rem 0;
}

.section h2 {
  margin: 0 0 0.8rem;
}

.section-subtitle {
  margin-top: 0;
  color: var(--text-soft);
}

.steps-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.step-card {
  padding: 1rem;
}

.step-number {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e8f0ff;
  color: var(--primary);
  font-weight: 800;
}

.tool-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.chip-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.chip-btn.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.tools-search {
  margin-bottom: 1rem;
}

.cta-card {
  padding: 1.1rem;
}

.article-list {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.article-card {
  padding: 1rem;
}

.article-page {
  padding: 2.4rem 0;
}

.article-page h1,
.article-page h2,
.article-page h3 {
  line-height: 1.25;
}

.article-page p,
.article-page li {
  color: var(--text-soft);
}

.upload-card {
  padding: 1.2rem;
}

.dropzone {
  border: 2px dashed #9db6e7;
  background: #f5f8ff;
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
}

body.dark .dropzone {
  background: #101d31;
}

.dropzone.dragover {
  border-color: var(--primary);
  background: #eaf1ff;
}

.progress-wrap {
  margin-top: 0.8rem;
  display: none;
}

.progress {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: #d6e1f8;
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--primary);
  transition: width 0.2s linear;
}

.status {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  color: var(--text-soft);
}

.preview {
  margin-top: 0.9rem;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-muted);
}

.ad-box {
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--text-soft);
  min-height: 100px;
  padding: 0.8rem;
}

.ad-lg {
  min-height: 90px;
}

.ad-side {
  min-height: 250px;
}

.layout-main {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1rem;
}

.footer {
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.form-grid {
  display: grid;
  gap: 0.8rem;
}

label {
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.72rem;
  font: inherit;
  background: var(--surface);
  color: var(--text);
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.skip-link {
  position: absolute;
  left: -10000px;
}

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

.skip-link:focus {
  left: 8px;
  top: 8px;
  z-index: 999;
  background: #fff;
  color: #000;
  padding: 0.5rem;
}

@media (max-width: 980px) {
  .hero-grid,
  .layout-main {
    grid-template-columns: 1fr;
  }

  .nav {
    justify-content: flex-end;
  }
}

@media (max-width: 720px) {
  .header-wrap {
    align-items: flex-start;
    padding: 0.7rem 0;
  }

  .nav {
    gap: 0.7rem;
  }

  .hero {
    padding-top: 3rem;
  }
}
