:root {
  --bg0: #f3f6f8;
  --bg1: #e8eef3;
  --ink: #14212b;
  --muted: #5b6b78;
  --line: #d5dee6;
  --card: #ffffff;
  --brand: #0f6e6a;
  --brand-ink: #084844;
  --brand-soft: #d9f1ef;
  --accent: #c45c26;
  --ok: #1f7a45;
  --warn: #9a6700;
  --err: #b42318;
  --shadow: 0 10px 30px rgba(20, 33, 43, 0.08);
  --radius: 18px;
  --font: "Manrope", "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
  --max: 1080px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #d7ebe8 0%, transparent 55%),
    radial-gradient(900px 420px at 100% 0%, #f3e6d8 0%, transparent 50%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 40%, #eef3f6 100%);
  min-height: 100vh;
  line-height: 1.6;
}

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

a {
  color: var(--brand-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--brand);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(243, 246, 248, 0.86);
  border-bottom: 1px solid rgba(213, 222, 230, 0.8);
}

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

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
}

.brand span {
  color: var(--brand);
}

.nav-tools {
  display: none;
  gap: 0.85rem;
  font-size: 0.92rem;
}

.nav-tools a {
  color: var(--muted);
  text-decoration: none;
}

.nav-tools a:hover {
  color: var(--ink);
}

.lang-switch {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.9rem;
}

.lang-switch a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
}

.lang-switch a[aria-current="page"] {
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-weight: 700;
}

.hero {
  padding: 1.4rem 0 0.6rem;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 0.6rem;
  letter-spacing: -0.02em;
}

.hero .lead {
  margin: 0 0 1.1rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 46rem;
}

.tool-shell {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.dropzone {
  border: 2px dashed #9eb0bd;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #fbfcfd, #f4f8fa);
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.5rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.is-dragover {
  border-color: var(--brand);
  background: #f1faf9;
  outline: none;
}

.dropzone strong {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.dropzone p {
  margin: 0.2rem 0;
  color: var(--muted);
}

.dropzone .hint {
  font-size: 0.9rem;
}

.privacy-banner {
  margin-top: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: 0.95rem;
}

.options {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafbfc;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
}

label.field {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  color: var(--muted);
}

label.field input,
label.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

label.field input:focus,
label.field select:focus {
  outline: 2px solid #7ec7c2;
  outline-offset: 1px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 0.7rem 1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid #7ec7c2;
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
  background: var(--brand-ink);
}

.btn-secondary {
  background: #e8eef3;
  color: var(--ink);
}

.btn-secondary:hover:not(:disabled) {
  background: #d9e3ec;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.status {
  margin-top: 0.8rem;
  min-height: 1.4rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.status[data-tone="error"] {
  color: var(--err);
}

.status[data-tone="ok"] {
  color: var(--ok);
}

.progress {
  display: none;
  margin-top: 0.7rem;
  height: 8px;
  border-radius: 999px;
  background: #e4ebf0;
  overflow: hidden;
}

.progress.is-on {
  display: block;
}

.progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brand), #2aa39b);
  transition: width 0.2s ease;
}

.file-table {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

.file-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem;
  background: #fff;
  display: grid;
  gap: 0.7rem;
}

.file-card-top {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.thumb {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: #eef3f6;
  border: 1px solid var(--line);
}

.meta {
  min-width: 0;
}

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

.meta .sub {
  color: var(--muted);
  font-size: 0.88rem;
}

.file-card .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #eef3f6;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.badge.ok {
  background: #e5f6ec;
  color: var(--ok);
}

.badge.err {
  background: #fdeceb;
  color: var(--err);
}

.section {
  padding: 2.2rem 0;
}

.section h2 {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  margin: 0 0 0.7rem;
}

.section p {
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.tool-link {
  display: block;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.tool-link:hover {
  transform: translateY(-2px);
  border-color: #9ebfc0;
}

.tool-link strong {
  display: block;
  margin-bottom: 0.25rem;
}

.tool-link span {
  color: var(--muted);
  font-size: 0.92rem;
}

.content-block {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.2rem 1.25rem;
  margin-top: 1rem;
}

.content-block h2,
.content-block h3 {
  font-family: var(--display);
  margin-top: 1.2rem;
}

.content-block h2:first-child,
.content-block h3:first-child {
  margin-top: 0;
}

.content-block ul {
  padding-left: 1.2rem;
  color: var(--muted);
}

.faq details {
  border-top: 1px solid var(--line);
  padding: 0.85rem 0;
}

.faq details:first-child {
  border-top: 0;
}

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

.faq summary:focus-visible {
  outline: 2px solid #7ec7c2;
  outline-offset: 2px;
}

.faq p {
  margin: 0.55rem 0 0;
}

.ad-slot {
  margin: 1.75rem 0;
  min-height: 90px;
  display: grid;
  place-items: center;
  border: 1px dashed #c9d4dd;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.45);
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer {
  margin-top: 2rem;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.2rem;
}

.footer-grid a {
  display: block;
  margin: 0.25rem 0;
  color: var(--muted);
  text-decoration: none;
}

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

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

.entry-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.entry-card {
  display: block;
  padding: 1.4rem;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
}

.entry-card strong {
  font-family: var(--display);
  font-size: 1.35rem;
  display: block;
  margin-bottom: 0.35rem;
}

@media (min-width: 860px) {
  .nav-tools {
    display: flex;
  }

  .tool-shell {
    padding: 1.25rem;
  }
}

@media (max-width: 700px) {
  .file-card-top {
    grid-template-columns: 56px 1fr;
  }

  .file-card-top .row-actions {
    grid-column: 1 / -1;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .thumb {
    width: 56px;
    height: 56px;
  }
}
