:root {
  --paper: #f4f7f2;
  --paper-2: #e9efe8;
  --paper-3: #dbe6df;
  --ink: #111a16;
  --ink-2: #26372f;
  --muted: #66776f;
  --panel: #fbfdf8;
  --panel-2: #f1f6ef;
  --line: rgba(26, 44, 35, 0.13);
  --line-strong: rgba(26, 44, 35, 0.22);
  --accent: #0d7d62;
  --accent-2: #74e0bd;
  --accent-soft: #dff5ec;
  --blue: #315f76;
  --danger: #a33c33;
  --shadow: 0 28px 80px rgba(24, 35, 29, 0.14);
  --shadow-soft: 0 18px 44px rgba(24, 35, 29, 0.09);
  --radius: 8px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1512;
    --paper-2: #111d18;
    --paper-3: #1b2b24;
    --ink: #f2f8f4;
    --ink-2: #d9e7df;
    --muted: #9fb4aa;
    --panel: #15221d;
    --panel-2: #1a2b24;
    --line: rgba(230, 247, 238, 0.13);
    --line-strong: rgba(230, 247, 238, 0.24);
    --accent: #78e3bf;
    --accent-2: #b4f3dc;
    --accent-soft: #1b3a2f;
    --blue: #8cc6dc;
    --danger: #ee8d83;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
    --shadow-soft: 0 18px 44px rgba(0, 0, 0, 0.24);
  }
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: "Plus Jakarta Sans", "Avenir Next", Avenir, Aptos, ui-sans-serif, system-ui, sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.64), transparent 42%),
    radial-gradient(circle at 18% 8%, rgba(116, 224, 189, 0.22), transparent 28%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 54%, var(--paper) 100%);
}

@media (prefers-color-scheme: dark) {
  body {
    background:
      radial-gradient(circle at 16% 6%, rgba(116, 224, 189, 0.12), transparent 30%),
      linear-gradient(180deg, #0e1512 0%, #132019 52%, #0b1210 100%);
  }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(20, 31, 25, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 31, 25, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000, transparent 76%);
}

@media (prefers-color-scheme: dark) {
  body::before {
    opacity: 0.16;
    background-image:
      linear-gradient(rgba(230, 247, 238, 0.065) 1px, transparent 1px),
      linear-gradient(90deg, rgba(230, 247, 238, 0.065) 1px, transparent 1px);
  }
}

main,
.site-header,
.site-footer {
  position: relative;
  z-index: 2;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 20;
  width: min(1360px, calc(100% - 32px));
  margin: 14px auto 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(1.08);
}

.nav {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 12px 8px 14px;
}

.brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 850;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #10231d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.brand-mark span {
  width: 22px;
  height: 24px;
  display: block;
  background:
    linear-gradient(90deg, transparent 0 6%, var(--accent-2) 6% 22%, transparent 22% 31%, var(--accent-2) 31% 47%, transparent 47% 56%, var(--accent-2) 56% 72%, transparent 72% 81%, var(--accent-2) 81% 100%);
  clip-path: polygon(0 35%, 100% 0, 100% 100%, 0 70%);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  color: var(--muted);
  font-size: 13px;
}

.nav-links a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  text-decoration: none;
  transition: color 420ms var(--ease), background 420ms var(--ease), transform 420ms var(--ease);
}

.nav-links a:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  transform: translateY(-1px);
}

.language-switcher {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel) 72%, transparent);
  padding: 0 8px 0 11px;
  font-size: 12px;
  font-weight: 750;
}

.language-switcher select {
  width: auto;
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  padding: 0 4px;
  font-size: 12px;
  font-weight: 750;
}

.nav-toggle {
  display: none;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--panel-2);
  padding: 0 14px;
  font: inherit;
  font-weight: 750;
}

.hero {
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100dvh - 92px);
  margin: 0 auto;
  padding: 56px 0 42px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  align-items: center;
  gap: 34px;
}

.tool-hero {
  min-height: auto;
  padding-top: 54px;
}

.copy-block {
  max-width: 640px;
}

.eyebrow {
  width: fit-content;
  margin: 0 0 16px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 72%, transparent);
  font-size: 12px;
  font-weight: 850;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 12ch;
  margin-bottom: 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.08;
  letter-spacing: 0;
}

.tool-hero h1 {
  max-width: 13ch;
  font-size: clamp(38px, 5vw, 64px);
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(28px, 3.3vw, 44px);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
}

.lead {
  max-width: 62ch;
  margin-bottom: 22px;
  color: var(--ink-2);
  font-size: 18px;
}

.hero-actions,
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.button,
button[data-run],
button.secondary {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, #000 10%);
  border-radius: 999px;
  color: #f7fffb;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 92%, white 8%), color-mix(in srgb, var(--accent) 78%, black 22%));
  box-shadow: 0 15px 34px color-mix(in srgb, var(--accent) 24%, transparent);
  padding: 0 18px;
  text-decoration: none;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  transition: transform 380ms var(--ease), box-shadow 380ms var(--ease), opacity 380ms var(--ease);
}

.button:hover,
button[data-run]:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 20px 42px color-mix(in srgb, var(--accent) 30%, transparent);
}

.button:active,
button[data-run]:active:not(:disabled) {
  transform: translateY(1px) scale(0.99);
}

.secondary,
button.secondary {
  border-color: var(--line-strong);
  color: var(--ink);
  background: color-mix(in srgb, var(--panel) 84%, transparent);
  box-shadow: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.proof-line {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.proof-line div {
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 76%, transparent);
}

.proof-line strong,
.proof-line span {
  display: block;
}

.proof-line strong {
  margin-bottom: 5px;
}

.proof-line span {
  color: var(--muted);
  font-size: 13px;
}

.tool-shell {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 96%, white 4%), var(--panel-2));
  box-shadow: var(--shadow);
  padding: 18px;
}

.tool-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.tool-top h2 {
  margin-bottom: 4px;
  font-size: 24px;
}

.tool-top p,
.control-note {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.local-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.drop-zone {
  width: 100%;
  min-height: 152px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 64%, transparent), transparent),
    color-mix(in srgb, var(--panel) 84%, transparent);
  padding: 22px;
  text-align: left;
  cursor: pointer;
}

.drop-zone.dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop-zone strong,
.drop-zone small {
  display: block;
}

.drop-zone small {
  color: var(--muted);
}

.wave-icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 50%;
  background: #10231d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.wave-icon i {
  width: 5px;
  border-radius: 999px;
  background: var(--accent-2);
}

.wave-icon i:nth-child(1) { height: 18px; }
.wave-icon i:nth-child(2) { height: 34px; }
.wave-icon i:nth-child(3) { height: 46px; }
.wave-icon i:nth-child(4) { height: 30px; }
.wave-icon i:nth-child(5) { height: 22px; }

.privacy-note {
  margin: 12px 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.selected-files {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.selected-files li {
  min-height: 42px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 86%, transparent);
  padding: 7px 10px;
}

.selected-files span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 850;
}

.selected-files strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

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

.selected-files button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.selected-files button:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.field {
  min-width: 0;
}

.field.wide {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 800;
}

select,
input[type="number"],
input[type="search"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--panel);
  padding: 0 12px;
  font: inherit;
}

.field small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 10%, transparent);
  margin-top: 14px;
}

.bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 360ms var(--ease);
}

.log {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}

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

.metric {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 12px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.section {
  padding: 56px 0;
}

.section-inner,
.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.page-hero {
  padding: 72px 0 24px;
}

.page-hero h1 {
  max-width: 14ch;
  line-height: 1.1;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 22px;
}

.section-heading p,
.prose p,
.trust-panel p {
  color: var(--muted);
}

.featured-grid,
.tool-grid,
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

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

.tool-card,
.related-card,
.trust-panel,
.tool-cluster,
.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.56) inset;
}

.tool-card,
.related-card {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  padding: 16px;
  text-decoration: none;
  transition: transform 420ms var(--ease), border-color 420ms var(--ease), box-shadow 420ms var(--ease);
}

.tool-card:hover,
.related-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}

.tool-card span,
.related-card span {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
}

.tool-card h3,
.related-card strong {
  margin-bottom: 8px;
  font-size: 18px;
}

.tool-card p,
.related-card small {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.muted-card {
  opacity: 0.78;
}

.cluster-list {
  display: grid;
  gap: 12px;
}

.empty-search {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: color-mix(in srgb, var(--panel) 78%, transparent);
  padding: 18px;
}

.tool-cluster {
  padding: 0;
}

.tool-cluster summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  padding: 18px;
  font-weight: 850;
}

.tool-cluster summary small {
  color: var(--muted);
  font-weight: 600;
}

.tool-cluster .tool-grid {
  padding: 0 18px 18px;
}

.content-grid,
.sibling-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.65fr);
  gap: 22px;
  align-items: start;
}

.steps {
  margin: 0;
  padding-left: 22px;
  color: var(--ink-2);
}

.steps li + li {
  margin-top: 9px;
}

.trust-panel {
  padding: 20px;
}

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

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

.faq-list summary {
  cursor: pointer;
  font-weight: 850;
}

.faq-list p {
  margin: 10px 0 0;
  color: var(--muted);
}

.search-box {
  max-width: 460px;
  margin-top: 22px;
}

.prose {
  max-width: 860px;
}

.prose h2 {
  margin-top: 30px;
  font-size: 28px;
}

.index-list {
  padding-left: 22px;
}

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

.sibling-section {
  padding-bottom: 84px;
}

.sibling-grid {
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--panel) 88%, transparent));
  padding: 28px;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  padding: 34px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-brand {
  color: var(--ink);
  padding-left: 0;
}

.site-footer p {
  max-width: 440px;
  margin: 8px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
}

[dir="rtl"] .nav,
[dir="rtl"] .site-footer,
[dir="rtl"] .tool-top,
[dir="rtl"] .sibling-grid {
  direction: rtl;
}

[dir="rtl"] .drop-zone,
[dir="rtl"] .tool-card,
[dir="rtl"] .related-card,
[dir="rtl"] .prose {
  text-align: right;
}

[hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  .site-header {
    border-radius: 22px;
  }

  .nav {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  .nav-links {
    width: 100%;
    display: none;
    justify-content: flex-start;
    padding: 8px 0 4px;
  }

  .nav-links.open {
    display: flex;
  }

  .hero,
  .content-grid,
  .sibling-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 46px;
  }

  h1,
  .tool-hero h1 {
    max-width: 14ch;
  }

  .featured-grid,
  .tool-grid.compact,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .site-header,
  .hero,
  .section-inner,
  .page-hero,
  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    padding-top: 34px;
  }

  h1,
  .tool-hero h1 {
    font-size: 40px;
  }

  .lead {
    font-size: 16px;
  }

  .proof-line,
  .featured-grid,
  .tool-grid.compact,
  .related-grid,
  .control-grid,
  .inspect-grid {
    grid-template-columns: 1fr;
  }

  .drop-zone {
    grid-template-columns: 1fr;
    min-height: 138px;
  }

  .site-footer {
    display: block;
  }

  .footer-links {
    justify-content: flex-start;
    margin-top: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
