:root {
  --bg: #f8f6f1;
  --surface: #fffdfa;
  --surface-soft: #f0eee7;
  --text: #20231f;
  --muted: #6f746d;
  --line: #e7e1d7;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-soft: #dff4ef;
  --accent: #d97745;
  --danger: #ad3f32;
  --warning: #8a5a00;
  --shadow: 0 18px 45px rgba(36, 38, 32, 0.07);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.11), transparent 34rem),
    linear-gradient(180deg, #fbfaf7 0%, var(--bg) 52%, #f4f0e8 100%);
  color: var(--text);
  line-height: 1.58;
}

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

.site-header,
.site-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-header nav,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
}

.site-header nav {
  flex: 1;
  max-width: 620px;
  margin-left: auto;
  justify-content: space-between;
}

.site-header nav a,
.site-footer nav a {
  padding: 8px 10px;
  border-radius: 8px;
}

.site-header nav a:hover,
.site-footer nav a:hover {
  background: rgba(15, 118, 110, 0.08);
  color: var(--primary-dark);
}

.logo {
  font-weight: 850;
  font-size: 22px;
  color: var(--primary-dark);
  letter-spacing: 0;
}

.site-footer {
  border-top: 1px solid rgba(32, 35, 31, 0.08);
  justify-content: center;
  text-align: center;
  margin-top: 34px;
  padding-top: 22px;
  padding-bottom: 24px;
  font-size: 13px;
}

.site-footer p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.hero {
  border-top: 1px solid rgba(32, 35, 31, 0.06);
}

.hero-inner,
.page-title,
.section,
.tool-layout,
.result-page,
.legal-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 38px 20px;
}

.hero-inner {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero h1,
.page-title h1,
.tool-main h1,
.result-page h1,
.legal-page h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.04;
  margin: 0 0 16px;
  max-width: 880px;
  font-weight: 850;
}

.hero p,
.lead,
.page-title p {
  color: var(--muted);
  font-size: 19px;
  max-width: 720px;
  margin: 0 auto 26px;
}

.hero-actions {
  width: min(680px, 100%);
  display: grid;
  gap: 10px;
}

.hero-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 13px 18px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.78);
  box-shadow: 0 10px 30px rgba(15, 118, 110, 0.07);
  font-weight: 760;
  color: #193f3b;
  backdrop-filter: blur(10px);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.hero-actions a:hover {
  transform: translateY(-2px);
  background: #ffffff;
  border-color: rgba(15, 118, 110, 0.32);
}

.section h2,
.tool-sidebar h2,
.article-block h2 {
  margin: 0 0 16px;
  font-size: 24px;
  line-height: 1.2;
}

.section > h2 {
  text-align: center;
  margin-bottom: 22px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.tool-card,
.trust-grid > div,
.result-card,
.upload-form,
.contact-box {
  background: rgba(255, 253, 250, 0.88);
  border: 1px solid rgba(32, 35, 31, 0.08);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(36, 38, 32, 0.045);
}

.tool-card {
  display: block;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.26);
  box-shadow: var(--shadow);
}

.tool-card span {
  display: block;
  font-weight: 760;
  margin-bottom: 8px;
}

.tool-card small,
.muted {
  color: var(--muted);
}

.split-sections {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.split-sections > div {
  background: rgba(255, 253, 250, 0.64);
  border: 1px solid rgba(32, 35, 31, 0.07);
  border-radius: 8px;
  padding: 18px;
}

.split-sections h2 {
  font-size: 20px;
}

.mini-list {
  display: grid;
  gap: 9px;
}

.mini-list a {
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(32, 35, 31, 0.07);
  border-radius: 8px;
  color: #29322f;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.mini-list a:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
  transform: translateX(2px);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding-top: 18px;
}

.trust-grid p {
  margin-bottom: 0;
  color: var(--muted);
}

.info {
  max-width: 860px;
}

.info h2 {
  text-align: left;
  margin-top: 24px;
}

.info details,
.article-block details {
  background: rgba(255, 253, 250, 0.78);
  border: 1px solid rgba(32, 35, 31, 0.08);
  border-radius: 8px;
  padding: 13px 14px;
  margin: 10px 0;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 24px;
  align-items: start;
  padding-top: 34px;
}

.tool-main {
  min-width: 0;
  max-width: 100%;
}

.breadcrumb {
  color: var(--muted);
  font-size: 14px;
}

.upload-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin: 22px 0 26px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.upload-form > * {
  min-width: 0;
  max-width: 100%;
}

.upload-form.is-processing {
  border-color: rgba(15, 118, 110, 0.2);
  box-shadow: 0 22px 56px rgba(15, 118, 110, 0.1);
}

label span {
  display: block;
  font-weight: 720;
  margin-bottom: 8px;
}

input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  border: 1px solid rgba(32, 35, 31, 0.12);
  border-radius: 8px;
  padding: 13px 14px;
  font: inherit;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(15, 118, 110, 0.48);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
}

textarea {
  resize: vertical;
}

.file-drop {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 8px;
  padding: 18px;
  background: rgba(223, 244, 239, 0.42);
  cursor: pointer;
  min-width: 0;
  overflow: hidden;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.file-drop:hover {
  background: rgba(223, 244, 239, 0.66);
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.08);
  transform: translateY(-1px);
}

.file-drop.has-file {
  background: rgba(223, 244, 239, 0.76);
  border-color: rgba(15, 118, 110, 0.34);
}

.file-drop.has-error {
  border-color: #e6a49a;
  background: #fff5f2;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-upload-control {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-height: 52px;
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.82);
  border: 1px solid rgba(32, 35, 31, 0.07);
}

label .file-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin: 0;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 780;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: transform .18s ease, background .18s ease;
}

.file-drop:hover .file-upload-button,
.file-drop.has-file .file-upload-button {
  background: var(--primary-dark);
}

label .file-upload-name {
  display: block;
  flex: 1;
  min-width: 0;
  margin: 0;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

label .file-upload-meta {
  display: block;
  margin: 9px 2px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 520;
}

.inline-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.checkbox {
  color: var(--muted);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border-radius: 8px;
  padding: 0 22px;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.primary-button {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.18);
  position: relative;
  overflow: hidden;
}

.primary-button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: wait;
  transform: none;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark), var(--primary));
  background-size: 220% 100%;
  animation: button-flow 1.4s ease-in-out infinite;
}

.secondary-button {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.processing-panel {
  color: var(--primary-dark);
  font-weight: 720;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 8px;
  background: rgba(223, 244, 239, 0.48);
  animation: panel-in .22s ease both;
}

.processing-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.processing-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(15, 118, 110, 0.2);
  border-top-color: var(--primary);
  border-radius: 999px;
  animation: spin .8s linear infinite;
}

.processing-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
}

.processing-bar span {
  display: block;
  width: 8%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #60b9a6);
  transition: width .55s ease;
}

.processing-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 620;
}

.processing-steps li {
  position: relative;
  padding-left: 18px;
  overflow-wrap: anywhere;
}

.processing-steps li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.18);
}

.processing-steps li.is-active {
  color: var(--primary-dark);
}

.processing-steps li.is-active::before {
  background: var(--primary);
  box-shadow: 0 0 0 5px rgba(15, 118, 110, 0.1);
}

.processing-steps li.is-done {
  color: #3b6b63;
}

.processing-steps li.is-done::before {
  background: #60b9a6;
}

.alert,
.warning {
  border-radius: 8px;
  padding: 13px 14px;
  background: #fff3ef;
  color: var(--danger);
  border: 1px solid #f0c8bd;
}

.warning {
  background: #fff8e8;
  color: var(--warning);
  border-color: #eed7a1;
}

.article-block {
  margin: 22px 0;
}

.article-block h2 {
  margin-bottom: 12px;
}

.article-block ol,
.article-block ul {
  margin: 0;
  padding-left: 22px;
}

.article-block li {
  margin: 6px 0;
}

.tool-sidebar {
  position: sticky;
  top: 16px;
}

.ad-slot {
  max-width: 1120px;
  margin: 8px auto;
  min-height: 44px;
  color: rgba(111, 116, 109, 0.54);
  background: transparent;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  letter-spacing: .02em;
}

.ad-slot::before,
.ad-slot::after {
  content: "";
  width: min(90px, 18vw);
  height: 1px;
  margin: 0 12px;
  background: rgba(32, 35, 31, 0.09);
}

.ad-slot-sidebar {
  min-height: 140px;
  margin: 0 0 20px;
}

.ad-slot-middle {
  margin-top: 4px;
  margin-bottom: 16px;
}

.ad-slot-bottom {
  margin-top: 28px;
}

.result-page {
  max-width: 820px;
  padding-top: 52px;
}

.result-page h1 {
  margin-bottom: 22px;
}

.result-card {
  padding: 22px;
}

.result-file-name {
  margin-bottom: 16px;
  font-weight: 780;
  font-size: 18px;
  overflow-wrap: anywhere;
}

.result-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 18px;
  padding: 12px;
  background: rgba(240, 238, 231, 0.56);
  border-radius: 8px;
}

.result-card dt {
  color: var(--muted);
  font-size: 13px;
}

.result-card dd {
  margin: 4px 0 0;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.result-buttons {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr);
  gap: 10px;
  margin-top: 8px;
}

.download-button,
.result-buttons .secondary-button {
  width: 100%;
  margin: 0;
}

.text-result pre {
  white-space: pre-wrap;
  background: rgba(255, 253, 250, 0.88);
  border: 1px solid rgba(32, 35, 31, 0.08);
  border-radius: 8px;
  padding: 18px;
}

.related-tools {
  margin-top: 34px;
}

.related-tools h2 {
  font-size: 20px;
  text-align: center;
  margin: 0 0 14px;
}

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

.related-links a {
  display: block;
  min-height: 118px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.74);
  border: 1px solid rgba(32, 35, 31, 0.08);
  color: #29322f;
  box-shadow: 0 10px 24px rgba(36, 38, 32, 0.035);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.related-links span {
  display: block;
  margin-bottom: 8px;
  font-weight: 760;
}

.related-links small {
  display: -webkit-box;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.related-links a:hover {
  background: var(--primary-soft);
  border-color: rgba(15, 118, 110, 0.18);
  color: var(--primary-dark);
  transform: translateY(-2px);
}

.legal-page {
  max-width: 820px;
}

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

.cookie-notice {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  background: #20231f;
  color: #fff;
  padding: 14px;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
}

.cookie-notice button {
  border: 0;
  border-radius: 8px;
  padding: 9px 12px;
  font-weight: 800;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes button-flow {
  0% { background-position: 0 0; }
  100% { background-position: 220% 0; }
}

@media (max-width: 820px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header nav {
    width: 100%;
    max-width: none;
    margin-left: 0;
    justify-content: space-between;
  }

  .hero-inner {
    min-height: auto;
    padding-top: 42px;
    padding-bottom: 42px;
  }

  .split-sections,
  .trust-grid,
  .tool-layout,
  .result-metrics,
  .result-buttons,
  .related-links {
    grid-template-columns: 1fr;
  }

  .tool-sidebar {
    position: static;
  }

  .inline-fields {
    grid-template-columns: 1fr;
  }

  .processing-steps {
    grid-template-columns: 1fr 1fr;
  }

  .file-upload-control {
    align-items: stretch;
    flex-direction: column;
  }

  label .file-upload-button {
    width: 100%;
  }

  .hero-inner,
  .page-title,
  .section,
  .tool-layout,
  .result-page,
  .legal-page {
    padding-left: 16px;
    padding-right: 16px;
  }
}
