:root {
  --ink: #172033;
  --muted: #667085;
  --line: #e3e8f0;
  --bg: #f7f9fc;
  --blue: #315bea;
  --blue-dark: #2447c6;
  --white: #ffffff;
  --green: #0a8a52;
  --danger: #d93025;
  --gold: #f7c948;
  --shadow: 0 14px 40px rgba(28, 44, 80, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

#tools,
.tool-ui-section,
section[id] {
  scroll-margin-top: 92px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
  line-height: 1.6;
}

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

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

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

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

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 12px;
  display: inline-block;
  background: linear-gradient(135deg, #dfe9ff, #ffffff);
  padding: 4px;
}

.brand-text {
  font-size: 1.08rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 0.96rem;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.text-link:hover,
.text-link:focus-visible,
.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--blue);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 0.9rem 1.4rem;
  font-weight: 700;
  border: 1px solid transparent;
  transition: 0.2s ease;
  cursor: pointer;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: white;
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: white;
  color: var(--ink);
  border-color: var(--line);
}

.hero {
  padding: 72px 0 32px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 38px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.section-heading h2,
.page-header h1 {
  margin: 0 0 16px;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.hero-copy h1 {
  font-size: clamp(2rem, 3vw, 3.1rem);
  max-width: 980px;
}

.highlight-new {
  display: inline-block;
  color: var(--blue);
  background: linear-gradient(135deg, #eff4ff, #f8fbff);
  border: 1px solid #dfe9ff;
  border-radius: 10px;
  padding: 0.12em 0.55em;
  margin-left: 0.12em;
  margin-right: 0.12em;
  font-size: 0.68em;
  line-height: 1.2;
}

.hero-copy p,
.feature p,
.tool-card p,
.step p,
.use-case-grid p,
.article-card p,
.page-body p,
.content-card p,
.callout,
.faq-list p,
.page-intro,
.site-footer p,
.cookie-note,
.list-text {
  color: var(--muted);
}

.trust-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
}

.features-strip,
.tools-section,
.use-case-section,
.steps-section,
.guides-section,
.faq-section,
.cta-section,
.page-section {
  padding: 34px 0 14px;
}

.features-grid,
.tool-grid,
.use-case-grid,
.steps-grid,
.article-grid,
.footer-grid,
.stats-grid {
  display: grid;
  gap: 12px;
}

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

.feature,
.tool-card,
.article-card,
.step,
.use-case-grid article,
.content-card,
.page-card,
.faq-list details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 22px rgba(17, 30, 60, 0.03);
}

.feature,
.tool-card,
.article-card,
.step,
.use-case-grid article,
.content-card,
.page-card {
  padding: 24px;
}

.feature-icon,
.tool-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  margin-bottom: 12px;
  object-fit: contain;
  display: block;
}

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

.section-heading h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
}

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

.tool-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 240px;
}

.tool-card h3,
.feature h3,
.article-card h3,
.step h3,
.use-case-grid h3,
.content-card h3,
.page-card h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.text-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--blue);
  font-weight: 700;
}

.tool-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.tool-card-actions .text-link {
  display: inline-block;
  margin-top: 0;
}

.mini-badge,
.new-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.55rem;
  margin-left: 0.45rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), #f6b51d);
  color: #412b00;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

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

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

.step-number {
  display: inline-flex;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: #edf3ff;
  color: var(--blue);
  font-weight: 800;
  margin-bottom: 10px;
}

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

.article-tag {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.faq-list {
  display: grid;
  gap: 16px;
}

.faq-list details {
  padding: 18px 20px;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

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

.cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: 32px 28px;
  background: linear-gradient(135deg, #eef3ff, #eefaf3);
  border: 1px solid var(--line);
  border-radius: 22px;
}

.site-footer {
  margin-top: 60px;
  background: #0f172a;
  color: #dfe9ff;
  padding: 40px 0 20px;
}

.footer-grid {
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  align-items: start;
}

.site-footer h4 {
  margin: 0 0 14px;
  color: white;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.footer-bottom {
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 22px;
}

.page-header {
  padding: 60px 0 24px;
}

.page-header h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
}

.page-intro {
  max-width: 780px;
  margin: 0;
  font-size: 1.08rem;
}

.page-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

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

.content-card h2,
.page-card h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: clamp(1.5rem, 2vw, 2rem);
}

.content-card ul,
.page-card ul,
.page-card ol {
  margin: 12px 0 0;
  padding-left: 22px;
  color: var(--muted);
}

.content-card li,
.page-card li {
  margin-bottom: 8px;
}

.callout {
  display: block;
  background: #f7f9ff;
  border-left: 4px solid var(--blue);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 18px 0;
}

.list-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}

.list-inline li {
  background: #f3f6ff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.92rem;
  font-weight: 600;
}

.step-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.step-list .step-item {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  background: #fafbff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.step-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.cookie-note {
  background: #fffdf6;
  border: 1px solid #f2e7b5;
  border-radius: 14px;
  padding: 16px 18px;
}

.tool-ui-section {
  padding: 32px 0 0;
}

.tool-shell {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 24px;
  margin-top: 24px;
}

.tool-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.tool-tab {
  background: #eef3ff;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
}

.tool-tab.active {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.tool-panel {
  display: none;
}

.tool-panel.active {
  display: block;
}

.tool-body {
  display: grid;
  gap: 14px;
}

.dropzone-area {
  display: grid;
  gap: 10px;
}

.dropzone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  border: 2px dashed var(--line);
  border-radius: 14px;
  background: #f8faff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  padding: 16px 18px;
  transition: 0.2s ease;
}

.dropzone:hover,
.dropzone.drag-over {
  border-color: var(--blue);
  background: #edf3ff;
  transform: translateY(-1px);
}

input[type="file"] {
  display: none;
}

.range-input,
select,
.text-input,
.text-editor {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  background: white;
}

.text-input {
  resize: vertical;
  min-height: 220px;
  color: var(--ink);
}

.text-editor {
  min-height: 260px;
  resize: vertical;
  line-height: 1.6;
  outline: none;
  background: #ffffff;
  color: var(--ink);
  white-space: pre-wrap;
}

.text-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}

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

.text-tool-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--ink);
}

.text-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  background: #f8faff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}

.toolbar-color {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 8px;
  font-weight: 600;
  color: var(--ink);
}

.toolbar-color input[type="color"] {
  width: 30px;
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.format-btn {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 10px;
  font-weight: 700;
  cursor: pointer;
}

.format-btn .underline {
  text-decoration: underline;
}

.highlight-box {
  display: block;
  background: linear-gradient(135deg, #f5f8ff, #f8fff9);
  border: 1px solid #dfeaff;
  border-left: 5px solid var(--blue);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink);
  font-size: 0.95rem;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f8faff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 600;
  color: var(--ink);
}

.check-row input {
  accent-color: var(--blue);
}

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

.files-list {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8faff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.file-row.drag-over {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(49, 91, 234, 0.2);
}

.file-row.dragging {
  opacity: 0.6;
}

.drag-handle {
  cursor: grab;
  color: var(--muted);
  font-weight: 700;
  font-size: 1.2rem;
  user-select: none;
}

.file-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.file-size {
  color: var(--muted);
  font-size: 0.9rem;
}

.file-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.move-file,
.remove-file {
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
  font-weight: 600;
}

.move-file {
  min-width: 32px;
  padding: 7px 8px;
}

.remove-file {
  color: #8a2438;
}

.drag-note {
  font-size: 0.88rem;
  color: var(--muted);
  padding-left: 2px;
}

.status-wrap {
  margin-top: 18px;
}

.status {
  min-height: 24px;
  font-weight: 700;
  color: var(--ink);
}

.status.success {
  color: var(--green);
}

.status.error {
  color: var(--danger);
}

.progress-wrap {
  width: 100%;
  height: 12px;
  background: #edf3ff;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(135deg, var(--blue), #6e8bff);
  transition: width 0.25s ease;
}

@media (max-width: 900px) {
  .hero-inner,
  .features-grid,
  .use-case-grid,
  .steps-grid,
  .article-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

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

  .nav-wrap {
    flex-wrap: wrap;
    justify-content: center;
    padding: 16px 0;
  }
}

@media (max-width: 640px) {
  .features-grid,
  .use-case-grid,
  .steps-grid,
  .article-grid,
  .footer-grid,
  .text-tool-grid,
  .checkbox-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

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

  .tool-card {
    padding: 8px 6px;
    min-height: 130px;
    gap: 6px;
    justify-content: flex-start;
  }

  .tool-card h3 {
    font-size: 0.92rem;
    margin: 0 0 3px;
    line-height: 1.3;
  }

  .tool-card p {
    font-size: 0.72rem;
    line-height: 1.3;
    margin: 3px 0;
  }

  .tool-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 4px;
  }

  .tool-card-actions {
    gap: 4px;
    flex-wrap: wrap;
    margin-top: auto;
  }

  .tool-card-actions .text-link {
    font-size: 0.7rem;
  }

  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .brand {
    width: 100%;
    justify-content: center;
  }

  .cta-box {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    padding-top: 28px;
  }

  .highlight-new {
    font-size: 0.64em;
  }
}

@media (max-width: 360px) {
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .tool-card {
    padding: 7px 5px;
    min-height: 120px;
    gap: 5px;
  }

  .tool-card h3 {
    font-size: 0.86rem;
    margin-bottom: 2px;
  }

  .tool-card p {
    font-size: 0.66rem;
    line-height: 1.25;
    margin: 2px 0;
  }

  .tool-icon {
    width: 26px;
    height: 26px;
    margin-bottom: 3px;
  }
}