:root {
  --bg: #0f1419;
  --card: #16202a;
  --line: #2a3540;
  --text: #e7e9ea;
  --muted: #8b98a5;
  --accent: #1d9bf0;
  --accent-hover: #1a8cd8;
  --danger: #f4212e;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); }

/* Top navigation — shared across all pages for internal linking (SEO). */
.nav {
  border-bottom: 1px solid var(--line);
  background: rgba(15, 20, 25, 0.85);
}
.nav-inner {
  max-width: 820px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.nav .brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; color: var(--text); text-decoration: none;
}
.nav .brand svg { width: 18px; height: 18px; fill: var(--text); }
.nav-links { display: flex; gap: 14px; flex-wrap: wrap; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.nav-links a:hover { color: var(--accent); }

.wrap {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  flex: 1;
}
.wrap.article { max-width: 720px; }

header { text-align: center; margin: 28px 0 8px; }
header h1 { font-size: 1.75rem; margin: 0 0 6px; letter-spacing: -0.02em; }
header p { color: var(--muted); margin: 0; }
.logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 14px;
  background: #000; margin-bottom: 12px;
}
.logo svg { width: 26px; height: 26px; fill: #fff; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 22px;
}
form { display: flex; gap: 10px; flex-wrap: wrap; }
input[type="url"] {
  flex: 1 1 260px;
  min-width: 0;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0b1117;
  color: var(--text);
  font-size: 1rem;
}
input[type="url"]:focus { outline: 2px solid var(--accent); border-color: transparent; }
button {
  padding: 13px 22px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
button:hover:not(:disabled) { background: var(--accent-hover); }
button:disabled { opacity: 0.55; cursor: default; }

.status { margin-top: 16px; min-height: 22px; font-size: 0.95rem; }
.status.error { color: var(--danger); }
.status.muted { color: var(--muted); }

.preview {
  display: none;
  margin-top: 18px;
  gap: 14px;
  align-items: center;
}
.preview.show { display: flex; }
.preview img {
  width: 96px; height: 96px; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--line);
  background: #0b1117; flex: none;
}
.preview .meta { min-width: 0; }
.preview .meta h3 {
  margin: 0 0 4px; font-size: 1rem; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.preview .meta span { color: var(--muted); font-size: 0.88rem; }
.preview .dl { margin-top: 10px; display: inline-block; text-decoration: none; }

.spinner {
  display: inline-block; width: 15px; height: 15px;
  border: 2px solid var(--muted); border-top-color: transparent;
  border-radius: 50%; animation: spin 0.7s linear infinite;
  vertical-align: -2px; margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.steps { margin-top: 30px; color: var(--muted); font-size: 0.92rem; }
.steps ol { padding-left: 20px; margin: 8px 0 0; }
.steps li { margin: 4px 0; }

/* Article / landing-page prose */
.article-body { margin-top: 34px; }
.article-body h2 {
  font-size: 1.3rem; margin: 32px 0 10px; letter-spacing: -0.01em;
}
.article-body h3 { font-size: 1.05rem; margin: 22px 0 8px; }
.article-body p { margin: 12px 0; }
.article-body ul, .article-body ol { padding-left: 22px; }
.article-body li { margin: 6px 0; }
.article-body .lead { font-size: 1.08rem; color: var(--text); }

/* FAQ — native <details> accordion, no JS needed. */
.faq { margin-top: 20px; }
.faq details {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 16px;
  margin: 10px 0;
  background: var(--card);
}
.faq summary {
  cursor: pointer; padding: 14px 0; font-weight: 600;
  list-style: none; position: relative; padding-right: 28px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 12px;
  color: var(--muted); font-weight: 400; font-size: 1.3rem;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* Related-pages grid for internal linking */
.related { margin-top: 34px; }
.related h2 { font-size: 1.15rem; margin-bottom: 12px; }
.related-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.related-grid a {
  display: block; text-decoration: none;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; background: var(--card); color: var(--text);
  transition: border-color 0.15s;
}
.related-grid a:hover { border-color: var(--accent); }
.related-grid a strong { display: block; margin-bottom: 4px; }
.related-grid a span { color: var(--muted); font-size: 0.88rem; }

/* Ad slots — drop your ad network's snippet inside these. */
.ad-slot {
  margin: 26px 0;
  min-height: 90px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #47535e; font-size: 0.8rem; letter-spacing: 0.04em;
  text-transform: uppercase;
}

footer {
  text-align: center; color: var(--muted);
  font-size: 0.82rem; padding: 20px; border-top: 1px solid var(--line);
}
footer .disclaimer { max-width: 560px; margin: 8px auto 0; line-height: 1.5; }
footer .foot-links { margin-bottom: 8px; }
footer .foot-links a { color: var(--muted); margin: 0 8px; text-decoration: none; }
footer .foot-links a:hover { color: var(--accent); }
