/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── CSS Variables ──────────────────────────────────────────────────────── */
:root {
  --bg: #f6f5f3; --surface: #ffffff; --surface-2: #efedea;
  --border: rgba(15,17,21,0.07); --border-strong: rgba(15,17,21,0.14);
  --text: #15161a; --text-2: #4a4b50; --muted: #8a8a90; --accent: #15161a;
  --green: #2d6a4f; --green-bg: #e9f5ef;
  --amber: #92400e; --amber-bg: #fef3c7;
  --red: #991b1b; --red-bg: #fef2f2;
  --blue: #1d4ed8; --blue-bg: #eff6ff;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  --serif: 'Fraunces', ui-serif, Georgia, serif;
  --r: 10px; --max: 1040px;
}
html[data-theme="dark"] {
  --bg: #0f1012; --surface: #16171a; --surface-2: #1e1f23;
  --border: rgba(236,236,239,0.08); --border-strong: rgba(236,236,239,0.15);
  --text: #ececef; --text-2: #b0b1b8; --muted: #6b6c72; --accent: #ececef;
  --green: #4ade80; --green-bg: rgba(74,222,128,0.12);
  --amber: #fbbf24; --amber-bg: rgba(251,191,36,0.12);
  --red: #fca5a5; --red-bg: rgba(254,242,242,.08);
  --blue: #93c5fd; --blue-bg: rgba(147,197,253,0.1);
}

/* ── Base ───────────────────────────────────────────────────────────────── */
body { font-family: var(--sans); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: inherit; }
p { line-height: 1.7; }

/* ── Header ─────────────────────────────────────────────────────────────── */
header {
  padding: 1.125rem 2rem; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border); background: var(--surface);
  position: sticky; top: 0; z-index: 100;
}
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.logo-text { font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: .06em; }
.logo-text span { color: var(--muted); }
.logo-icon { display: flex; align-items: center; flex-shrink: 0; }
.nav { display: flex; align-items: center; gap: 14px; }
.nav-link { font-size: 13px; color: var(--muted); text-decoration: none; transition: color .15s; }
.nav-link:hover { color: var(--text); }
.nav-cta { background: var(--accent); color: var(--bg) !important; padding: 7px 16px; border-radius: 7px; font-weight: 600; font-size: 13px; text-decoration: none; transition: opacity .15s; white-space: nowrap; }
.nav-cta:hover { opacity: .8; }
#themeToggle {
  width: 36px; height: 20px; background: var(--surface-2); border-radius: 10px;
  border: 1px solid var(--border-strong); position: relative; cursor: pointer; transition: background .2s; flex-shrink: 0;
}
#themeToggle::after {
  content: ''; position: absolute; width: 14px; height: 14px; border-radius: 50%;
  background: var(--muted); top: 2px; left: 2px; transition: transform .2s, background .2s;
}
html[data-theme="dark"] #themeToggle::after { transform: translateX(16px); background: #ececef; }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.lp-hero { max-width: var(--max); margin: 0 auto; padding: 5rem 2rem 3.5rem; text-align: center; }
.lp-tag {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border-strong); border-radius: 20px;
  padding: 4px 14px; font-family: var(--mono); font-size: 11px;
  color: var(--muted); letter-spacing: .1em; text-transform: uppercase;
  background: var(--surface); margin-bottom: 1.75rem;
}
.lp-tag-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
.lp-hero h1 { font-family: var(--serif); font-size: clamp(32px,5.5vw,56px); font-weight: 300; line-height: 1.05; letter-spacing: -.03em; margin-bottom: 1.25rem; }
.lp-hero h1 em { font-style: normal; font-weight: 500; }
.lp-hero p { font-size: clamp(15px,1.8vw,17px); color: var(--text-2); line-height: 1.7; max-width: 480px; margin: 0 auto 2.5rem; }

/* ── Tool Form ──────────────────────────────────────────────────────────── */
.tool-wrap { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.tool-form {
  display: flex; width: 100%; max-width: 520px;
  border: 1px solid var(--border-strong); border-radius: var(--r);
  background: var(--surface); overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,.06); transition: box-shadow .2s, border-color .2s;
}
.tool-form:focus-within { border-color: var(--accent); box-shadow: 0 2px 20px rgba(0,0,0,.1); }
.tool-input {
  flex: 1; border: none; outline: none; padding: .95rem 1.25rem;
  font-family: var(--mono); font-size: 15px; background: transparent; color: var(--text);
}
.tool-input::placeholder { color: var(--muted); }
.tool-btn {
  border: none; border-left: 1px solid var(--border-strong);
  background: var(--accent); color: var(--bg);
  padding: 0 1.5rem; font-family: var(--sans); font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: opacity .15s; letter-spacing: .02em;
}
.tool-btn:hover { opacity: .82; }
.tool-btn:disabled { opacity: .5; cursor: wait; }
.tool-hint { font-size: 11px; color: var(--muted); font-family: var(--mono); letter-spacing: .04em; }

/* ── Result Area ────────────────────────────────────────────────────────── */
.result-wrap { max-width: 680px; margin: 2.5rem auto 0; width: 100%; }
.result-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.result-head { padding: .875rem 1.25rem; background: var(--surface-2); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.result-head-title { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.result-domain { font-family: var(--mono); font-size: 12px; color: var(--text); }
.result-body { padding: 0; }

/* ── Data rows ──────────────────────────────────────────────────────────── */
.d-row { display: flex; justify-content: space-between; align-items: center; padding: .65rem 1.25rem; font-size: 13px; border-bottom: 1px solid var(--border); gap: 1rem; }
.d-row:last-child { border-bottom: none; }
.d-key { color: var(--text-2); flex-shrink: 0; }
.d-val { font-family: var(--mono); font-size: 12px; color: var(--text); text-align: right; word-break: break-all; }
.d-ok  { color: var(--green); font-weight: 600; }
.d-warn{ color: var(--amber); font-weight: 600; }
.d-bad { color: var(--red);   font-weight: 600; }
.d-muted { color: var(--muted); }

/* ── Big number highlight ───────────────────────────────────────────────── */
.big-result { padding: 2rem 1.25rem; text-align: center; }
.big-num { font-family: var(--serif); font-size: 64px; font-weight: 300; letter-spacing: -.04em; line-height: 1; }
.big-label { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-top: .5rem; }
.big-sub { font-size: 13px; color: var(--text-2); margin-top: .75rem; }

/* ── Badge ──────────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-ok   { background: var(--green-bg); color: var(--green); }
.badge-warn { background: var(--amber-bg); color: var(--amber); }
.badge-bad  { background: var(--red-bg);   color: var(--red); }
.badge-gray { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }

/* ── Tags list ──────────────────────────────────────────────────────────── */
.tags { display: flex; flex-wrap: wrap; gap: .5rem; padding: 1rem 1.25rem; }
.tag { padding: 4px 12px; border-radius: 20px; font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-family: var(--mono); }

/* ── Loading ────────────────────────────────────────────────────────────── */
.loader { text-align: center; padding: 3rem 2rem; }
.spinner { width: 28px; height: 28px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; margin: 0 auto 1rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text { font-size: 13px; color: var(--muted); font-family: var(--mono); }

/* ── Error ──────────────────────────────────────────────────────────────── */
.error-box { background: var(--red-bg); border: 1px solid var(--red); border-radius: var(--r); padding: 1rem 1.25rem; color: var(--red); font-size: 13px; max-width: 680px; margin: 1.5rem auto; }

/* ── Full width link button ─────────────────────────────────────────────── */
.link-btn { display: block; text-align: center; padding: .875rem; font-size: 13px; color: var(--accent); text-decoration: none; border-top: 1px solid var(--border); font-weight: 600; transition: background .15s; }
.link-btn:hover { background: var(--surface-2); }

/* ── SEO Content ────────────────────────────────────────────────────────── */
.seo-wrap { max-width: var(--max); margin: 0 auto; padding: 5rem 2rem; }
.seo-wrap h2 { font-family: var(--serif); font-size: clamp(24px,3.5vw,36px); font-weight: 300; letter-spacing: -.025em; margin-bottom: 1rem; }
.seo-wrap h2 em { font-style: normal; font-weight: 500; }
.seo-wrap h3 { font-size: 16px; font-weight: 600; margin: 2rem 0 .5rem; }
.seo-wrap p { font-size: 14px; color: var(--text-2); line-height: 1.75; margin-bottom: .875rem; }
.seo-wrap ul { padding-left: 1.25rem; margin-bottom: .875rem; }
.seo-wrap ul li { font-size: 14px; color: var(--text-2); line-height: 1.75; margin-bottom: .25rem; }
.seo-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; padding-top: 4rem; border-top: 1px solid var(--border); margin-top: 4rem; }

/* ── FAQ ────────────────────────────────────────────────────────────────── */
.faq { margin-top: 3.5rem; }
.faq-title { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1.5rem; }
.faq-item { border-top: 1px solid var(--border); }
.faq-q { width: 100%; background: none; border: none; text-align: left; padding: 1rem 0; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-family: var(--sans); }
.faq-q::after { content: '+'; font-size: 18px; color: var(--muted); flex-shrink: 0; transition: transform .2s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { display: none; padding-bottom: 1rem; font-size: 14px; color: var(--text-2); line-height: 1.75; }
.faq-item.open .faq-a { display: block; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: auto; }
.footer-top { max-width: var(--max); margin: 0 auto; padding: 3.5rem 2rem 2.5rem; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem; }
.footer-brand-desc { font-size: 13px; color: var(--text-2); line-height: 1.7; max-width: 240px; margin-top: .875rem; }
.footer-col-title { font-family: var(--mono); font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1rem; }
.footer-col-links { display: flex; flex-direction: column; gap: .5rem; }
.footer-col-links a { font-size: 13px; color: var(--text-2); text-decoration: none; transition: color .15s; }
.footer-col-links a:hover { color: var(--text); }
.footer-col-links a.current { color: var(--text); font-weight: 600; cursor: default; pointer-events: none; }
.footer-tg { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); text-decoration: none; padding: .5rem .875rem; border: 1px solid var(--border); border-radius: 8px; transition: border-color .15s, color .15s; margin-bottom: .75rem; }
.footer-tg:hover { border-color: var(--border-strong); color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding: 1.125rem 2rem; max-width: var(--max); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--muted); font-family: var(--mono); flex-wrap: wrap; gap: .5rem; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
/* ── Nav Dropdown ────────────────────────────────────────────────────────── */
.nav-dd-wrap { position: relative; }
.nav-dd-btn {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  color: var(--muted); background: none; border: none; cursor: pointer;
  padding: 4px 2px; transition: color .15s; white-space: nowrap;
}
.nav-dd-btn:hover, .nav-dd-wrap.open .nav-dd-btn { color: var(--text); }
.dd-arrow { transition: transform .2s; flex-shrink: 0; }
.nav-dd-wrap.open .dd-arrow { transform: rotate(180deg); }
.nav-dd-menu {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 14px; padding: 1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.12), 0 1px 4px rgba(0,0,0,.06);
  display: none; grid-template-columns: repeat(3, 1fr); gap: 0 1.5rem;
  min-width: 560px; z-index: 200;
}
.nav-dd-wrap.open .nav-dd-menu { display: grid; }
.dd-col { display: flex; flex-direction: column; gap: 2px; }
.dd-col-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); padding: 2px 8px 6px; margin-bottom: 2px;
  border-bottom: 1px solid var(--border);
}
.dd-link {
  font-size: 13px; color: var(--text-2); text-decoration: none;
  padding: 5px 8px; border-radius: 6px; transition: background .12s, color .12s;
  display: block;
}
.dd-link:hover { background: var(--surface-2); color: var(--text); }
.dd-link.current { color: var(--muted); pointer-events: none; font-weight: 500; }
.dd-link-about { margin-top: 6px; color: var(--muted) !important; border-top: 1px solid var(--border); padding-top: 8px; font-size: 12px; }
.dd-link-about:hover { color: var(--text-2) !important; }
.dd-link-cta { font-weight: 600; color: var(--accent) !important; }
.dd-link-cta:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }

/* ── Кнопка «Поделиться» ────────────────────────────────────────────── */
.share-row { padding: .75rem 1.25rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }
.share-btn { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .875rem; background: none; border: 1px solid var(--border-strong); border-radius: 7px; font-family: var(--sans); font-size: 12px; font-weight: 500; color: var(--text-2); cursor: pointer; transition: border-color .15s, color .15s; }
.share-btn:hover { border-color: var(--accent); color: var(--text); }
.footer-about-link { display: block; margin-top: .5rem; font-size: 12px; color: var(--muted); text-decoration: none; }
.footer-about-link:hover { color: var(--text); }

/* ── Кнопка «Копировать» ─────────────────────────────────────────────── */
.d-val { position: relative; padding-right: 1.4rem; }
.copy-icon { position: absolute; right: 0; top: 50%; transform: translateY(-50%); padding: 2px; background: none; border: none; cursor: pointer; color: var(--muted); opacity: 0; transition: opacity .15s, color .15s; display: flex; align-items: center; line-height: 1; }
.d-row:hover .copy-icon { opacity: 1; }
.copy-icon:hover { color: var(--text); }
.copy-icon.copied { color: #10b981; opacity: 1; }

/* ── Хлебные крошки ─────────────────────────────────────────────────── */
.breadcrumb { max-width: var(--max); margin: 0 auto; padding: .875rem 1.25rem 0; display: flex; align-items: center; flex-wrap: wrap; gap: .375rem; font-size: 13px; }
.breadcrumb a { color: var(--muted); text-decoration: none; transition: color .15s; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb-sep { color: var(--border-strong); user-select: none; }
.breadcrumb-current { color: var(--text-2); }

/* ── Похожие инструменты ─────────────────────────────────────────────── */
.related-wrap { max-width: var(--max); margin: 2.5rem auto 0; padding: 0 1.25rem; }
.related-title { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .75rem; }
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.related-item { display: block; padding: .6rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--text-2); text-decoration: none; transition: border-color .15s, color .15s; }
.related-item:hover { border-color: var(--border-strong); color: var(--text); }

/* ── About page table ────────────────────────────────────────────────── */
.about-table-wrap { overflow-x: auto; margin-top: .75rem; }
.about-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.about-table th { text-align: left; padding: .5rem .75rem; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom: 1px solid var(--border-strong); }
.about-table td { padding: .5rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.about-table td:first-child { font-weight: 500; white-space: nowrap; }
.about-table tr:last-child td { border-bottom: none; }

@media (max-width: 860px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .seo-cols { grid-template-columns: 1fr; gap: 2rem; }
  .nav-dd-menu { left: auto; right: -1rem; transform: none; min-width: 480px; grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  header { padding: 1rem 1.25rem; }
  .nav-link { display: none; }
  .nav-dd-btn { font-size: 12px; }
  .nav-dd-menu {
    position: fixed; top: 60px; left: 0; right: 0; width: 100%;
    border-radius: 0 0 14px 14px; transform: none;
    grid-template-columns: 1fr; min-width: 0; max-height: 70vh; overflow-y: auto;
  }
  .lp-hero { padding: 3rem 1.25rem 2.5rem; }
  .seo-wrap { padding: 3rem 1.25rem; }
  .result-wrap { padding: 0 1rem; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; padding: 1rem 1.25rem; }
  .tool-input { font-size: 14px; padding: .875rem 1rem; }
  .tool-btn { padding: 0 1.125rem; font-size: 12px; }
  .d-row { flex-direction: column; align-items: flex-start; gap: .25rem; }
  .d-val { text-align: left; padding-right: 0; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 400px) {
  .related-grid { grid-template-columns: 1fr; }
  .nav-cta { font-size: 12px; padding: 6px 12px; }
  .nav-dd-wrap ~ .nav-cta { display: none; }
}
