:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #eef3f8;
  --text: #17202a;
  --muted: #5d6b7a;
  --line: #d9e1ea;
  --brand: #0b6bcb;
  --brand-dark: #084f98;
  --accent: #0f8b6f;
  --danger: #b42318;
  --shadow: 0 12px 30px rgba(23, 32, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a:hover {
  text-decoration: underline;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.brand {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
}

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

.container {
  margin: 0 auto;
  max-width: 1120px;
  padding: 0 20px;
}

.hero {
  background: linear-gradient(180deg, #ffffff 0%, #eef5fb 100%);
  border-bottom: 1px solid var(--line);
  padding: 54px 0 28px;
}

.hero-grid {
  align-items: center;
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

.eyebrow {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 14px;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
}

h2 {
  font-size: 2rem;
  margin-top: 8px;
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 16px;
}

.lead {
  color: var(--muted);
  font-size: 1.12rem;
  max-width: 680px;
}

.trust-list {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
}

.trust-list li {
  list-style: none;
  padding-left: 26px;
  position: relative;
}

.trust-list li::before {
  background: var(--accent);
  border-radius: 50%;
  content: "";
  height: 8px;
  left: 5px;
  position: absolute;
  top: 10px;
  width: 8px;
}

.tool-panel,
.content-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.tool-panel {
  padding: 18px;
}

.drop-zone {
  align-items: center;
  background: var(--surface-soft);
  border: 2px dashed #9db2c7;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  min-height: 190px;
  padding: 24px;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.drop-zone.dragover {
  background: #e5f3ef;
  border-color: var(--accent);
}

.drop-title {
  font-size: 1.18rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.drop-note {
  color: var(--muted);
  font-size: 0.93rem;
}

.controls {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0;
}

label {
  color: var(--muted);
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 6px;
}

select,
input[type="number"],
input[type="range"] {
  width: 100%;
}

select,
input[type="number"] {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  min-height: 40px;
  padding: 8px 10px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.btn {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.95rem;
  font-weight: 700;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
}

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

.btn-primary:hover {
  background: var(--brand-dark);
  text-decoration: none;
}

.btn-secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--surface-soft);
  text-decoration: none;
}

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

.summary {
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 16px;
  padding: 14px;
}

.summary strong {
  display: block;
  font-size: 1.2rem;
}

.summary span {
  color: var(--muted);
  font-size: 0.84rem;
}

.results {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.result-card {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  padding: 12px;
}

.result-card img {
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: cover;
  width: 82px;
}

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

.result-meta strong {
  color: var(--text);
}

.status {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 10px;
}

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

.section {
  padding: 46px 0;
}

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

.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.article-layout {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1fr) 280px;
  padding: 42px 0;
}

.article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 30px;
}

.article h1 {
  font-size: 2.4rem;
}

.article h2 {
  border-top: 1px solid var(--line);
  font-size: 1.6rem;
  margin-top: 28px;
  padding-top: 24px;
}

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

.sidebar {
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  position: sticky;
  top: 80px;
}

.sidebar a {
  display: block;
  margin: 10px 0;
}

.ad-placeholder {
  background: #f4f6f8;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 26px 0;
  padding: 18px;
  text-align: center;
}

.site-footer {
  background: #111827;
  color: #d7dde5;
  margin-top: 40px;
  padding: 34px 0;
}

.footer-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr 1fr 1fr;
}

.site-footer a {
  color: #d7dde5;
  display: block;
  margin: 7px 0;
}

.small {
  color: #aeb8c5;
  font-size: 0.88rem;
}

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

  .controls,
  .summary,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .result-card {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .result-card .button-row {
    grid-column: 1 / -1;
  }

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

  .nav-links {
    justify-content: flex-start;
  }

  .sidebar {
    position: static;
  }
}
