/* ToolPilot — clean, fast, readable. No frameworks, no bloat. */
:root {
  --ink: #1a1d21;
  --muted: #5b6470;
  --accent: #4f46e5;
  --accent-soft: #eef0ff;
  --line: #e6e8ec;
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; max-width: 960px; }
.brand { font-weight: 800; font-size: 20px; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.brand-mark { color: var(--accent); }
.nav a { margin-left: 20px; color: var(--muted); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--ink); }

/* Hero */
.hero { padding: 56px 0 32px; }
.hero-split { display: flex; align-items: center; gap: 32px; padding: 48px 0 36px; }
.hero-copy { flex: 1; min-width: 0; }
.hero-mascot { width: 300px; max-width: 38%; height: auto; border-radius: 24px; flex-shrink: 0; }
.btn { display: inline-block; margin-top: 20px; background: var(--accent); color: #fff; font-weight: 700; padding: 12px 26px; border-radius: 999px; text-decoration: none; font-size: 16px; }
.btn:hover { background: #4338ca; color: #fff; }
@media (max-width: 640px) {
  .hero-split { flex-direction: column-reverse; padding: 36px 0 28px; }
  .hero-mascot { width: 220px; max-width: 72%; }
}
.kicker { text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px; font-weight: 700; color: var(--accent); margin: 0 0 8px; }
.hero h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.15; letter-spacing: -0.03em; margin: 0 0 12px; }
.hero-sub { color: var(--muted); font-size: 18px; max-width: 620px; margin: 0; }

h2 { font-size: 24px; letter-spacing: -0.02em; margin: 40px 0 16px; }

/* Cards */
.cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 0; overflow: hidden; text-decoration: none; color: inherit; background: var(--bg); transition: border-color .15s, transform .15s; display: block; }
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-thumb { display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--bg-soft); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { display: block; padding: 20px; }
.card .card-cat { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.card h3 { margin: 6px 0 8px; font-size: 18px; line-height: 1.35; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.card .card-date { display: block; margin-top: 10px; font-size: 13px; color: var(--muted); }

/* Topics */
.topics { display: flex; flex-wrap: wrap; gap: 10px; }
.topic-chip { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 8px 16px; font-size: 14.5px; font-weight: 600; text-decoration: none; }

/* Article */
.post { padding: 32px 0 8px; }
.post h1 { font-size: clamp(28px, 4.5vw, 38px); line-height: 1.2; letter-spacing: -0.025em; margin: 0 0 10px; }
.post .meta { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.post .lede { font-size: 19px; color: #333a44; border-left: 3px solid var(--accent); padding-left: 16px; margin: 0 0 28px; }
.post h2 { font-size: 24px; margin: 36px 0 12px; letter-spacing: -0.02em; }
.post h3 { font-size: 19px; margin: 28px 0 10px; }
.post p { margin: 0 0 18px; }
.post ul, .post ol { margin: 0 0 18px; padding-left: 24px; }
.post li { margin-bottom: 8px; }
.post table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 15px; display: block; overflow-x: auto; }
.post th, .post td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.post th { background: var(--bg-soft); font-weight: 700; }
.post blockquote { border-left: 3px solid var(--line); margin: 0 0 18px; padding: 4px 0 4px 16px; color: var(--muted); }
.post a { color: var(--accent); }

/* Article hero image */
.article-hero { margin: 0 0 28px; border-radius: var(--radius); overflow: hidden; }
.article-hero img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }

/* Table of contents */
.toc { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 0 0 28px; }
.toc .toc-title { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 10px; }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin-bottom: 6px; }
.toc a { color: var(--ink); text-decoration: none; font-size: 15px; }
.toc a:hover { color: var(--accent); }

/* Related */
.related { border-top: 1px solid var(--line); margin: 32px 0 48px; padding-top: 8px; }.related ul { list-style: none; padding: 0; margin: 0; }
.related li { margin-bottom: 10px; }
.related a { color: var(--ink); font-weight: 600; text-decoration: none; }
.related a:hover { color: var(--accent); }

/* About teaser */
.about-teaser { background: var(--bg-soft); border-radius: var(--radius); padding: 28px; margin: 40px 0 56px; }
.about-teaser h2 { margin-top: 0; }
.about-teaser p { margin-bottom: 0; color: var(--muted); }
.about-teaser a { color: var(--accent); font-weight: 600; }

/* Ad slots — invisible until AdSense is configured */
.ad-slot { margin: 28px auto; text-align: center; }
.ad-slot:empty { display: none; }
.ad-leaderboard { min-height: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); margin-top: 24px; }
.footer-inner { padding: 32px 20px; max-width: 960px; }
.footer-inner p { margin: 0 0 12px; font-size: 15px; }
.footer-nav a { margin-right: 18px; color: var(--muted); text-decoration: none; font-size: 14px; }
.footer-nav a:hover { color: var(--ink); }
.fine { color: var(--muted); font-size: 13px !important; }
