/* webclaw - shared styles */
:root {
  --bg: #0f1115;
  --surface: #161a22;
  --surface-2: #1d222d;
  --border: #262d3b;
  --text: #e6e9ef;
  --text-dim: #9099ad;
  --accent: #5b8def;
  --accent-hover: #7aa3ff;
  --success: #4ade80;
  --error: #f87171;
  --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

/* header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}
.brand span { color: var(--accent); }
.nav a {
  color: var(--text-dim);
  margin-left: 20px;
  font-size: 14px;
}
.nav a:hover { color: var(--text); }

/* hero */
.hero {
  padding: 60px 0 40px;
  text-align: center;
}
.hero h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}
.hero p {
  color: var(--text-dim);
  font-size: 17px;
  max-width: 600px;
  margin: 0 auto;
}
.hero .trust-features {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.hero .trust-features .feat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hero .trust-features .feat .check {
  color: var(--success);
  font-weight: 700;
}

/* trust strip — shown on every page below the header */
.trust-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-dim);
}
.trust-strip .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  padding: 8px 20px;
}
.trust-strip span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.trust-strip .check {
  color: var(--success);
  font-weight: 700;
}

/* tool grid */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 20px 0 60px;
}
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.15s, transform 0.15s;
  display: block;
}
.tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.tool-card h3 {
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--text);
}
.tool-card p {
  font-size: 14px;
  color: var(--text-dim);
}
.tool-card.coming {
  opacity: 0.5;
  cursor: not-allowed;
}

/* breadcrumb */
.breadcrumb {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.breadcrumb a {
  color: var(--text-dim);
}
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { color: #4a5260; }
.breadcrumb .current { color: var(--text); }

/* in-page jump links (e.g. Jump to FAQ) */
.quick-links {
  margin-top: 6px;
  margin-bottom: 18px;
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.quick-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
}
.quick-links a:hover { color: var(--accent-hover); text-decoration: underline; }

/* tool page */
.tool-page {
  padding: 30px 0 60px;
}
.tool-page h1 {
  font-size: 28px;
  margin-bottom: 8px;
}
.tool-page > p.lead {
  color: var(--text-dim);
  margin-bottom: 24px;
}

.editor-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 768px) {
  .editor-wrap { grid-template-columns: 1fr; }
}
.editor-pane label {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 6px;
}
textarea.editor {
  width: 100%;
  min-height: 380px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  resize: vertical;
  outline: none;
}
textarea.editor:focus { border-color: var(--accent); }
textarea.editor.is-error { border-color: var(--error); }

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.btn {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--border); }
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0b1020;
  font-weight: 600;
}
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.status {
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 16px;
  display: none;
}
.status.show { display: block; }
.status.ok { background: rgba(74, 222, 128, 0.1); color: var(--success); border: 1px solid rgba(74, 222, 128, 0.3); }
.status.err { background: rgba(248, 113, 113, 0.1); color: var(--error); border: 1px solid rgba(248, 113, 113, 0.3); }

/* article (SEO content) */
.article {
  margin-top: 50px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  max-width: 760px;
}
.article h2 { font-size: 22px; margin: 30px 0 12px; }
.article h3 { font-size: 17px; margin: 22px 0 10px; }
.article p, .article li { color: #c9cfdc; margin-bottom: 12px; }
.article ul, .article ol { padding-left: 22px; margin-bottom: 14px; }
.article code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
}
.article pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  overflow-x: auto;
  margin: 12px 0;
}
.article pre code { background: none; border: none; padding: 0; }

/* faq */
.faq {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  max-width: 760px;
}
.faq h2 {
  font-size: 22px;
  margin-bottom: 16px;
}
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  margin-bottom: 8px;
  overflow: hidden;
}
.faq details[open] { border-color: var(--accent); }
.faq summary {
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 500;
  color: var(--text);
  list-style: none;
  position: relative;
  padding-right: 40px;
  user-select: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--text-dim);
  transition: transform 0.15s;
}
.faq details[open] summary::after { content: '−'; color: var(--accent); }
.faq summary:hover { background: var(--surface-2); }
.faq details > p,
.faq details > div {
  padding: 0 18px 16px;
  color: #c9cfdc;
  font-size: 14px;
  line-height: 1.65;
}

/* 404 */
.not-found {
  text-align: center;
  padding: 80px 20px 40px;
}
.not-found .code {
  font-size: 88px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -2px;
  margin-bottom: 12px;
}
.not-found h1 {
  font-size: 26px;
  margin-bottom: 10px;
}
.not-found p {
  color: var(--text-dim);
  max-width: 520px;
  margin: 0 auto 24px;
}

/* footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  color: var(--text-dim);
  font-size: 13px;
  text-align: center;
}
.site-footer a { color: var(--text-dim); margin: 0 8px; }
.site-footer a:hover { color: var(--text); }

/* ad slot placeholder (so layout reserves space before AdSense loads) */
.ad-slot {
  margin: 24px 0;
  min-height: 90px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}
