/* MDWorkLab — global site styles (marketing pages only; /editor uses its own styles) */

:root {
  --bg: #f7f8fa;
  --panel: #ffffff;
  --surface: #f0f2f6;
  --text: #1a1d23;
  --text-secondary: #5f6775;
  --text-muted: #8a93a1;
  --border: rgba(0, 0, 0, 0.08);
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: rgba(79, 70, 229, 0.1);
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max: 1120px;
  --content: 720px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

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

.container {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

.container--narrow {
  width: min(var(--content), calc(100% - 32px));
  margin-inline: auto;
}

/* ── Header ── */
.site-header {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  flex-wrap: wrap;
}

.site-logo {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.site-logo:hover { text-decoration: none; color: var(--accent); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

.site-nav a.btn--primary {
  color: #fff;
  background: var(--accent);
}
.site-nav a.btn--primary:hover {
  color: #fff;
  background: var(--accent-hover);
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover { background: var(--accent-hover); color: #fff; }
.btn--outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn--outline:hover { background: var(--accent-soft); color: var(--accent); }
.btn--lg { padding: 14px 32px; font-size: 17px; }

/* ── Ad slots (hidden until AdSense enabled; DOM kept for future use) ── */
.ad-slot {
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 12px;
  overflow: hidden;
  margin-inline: auto;
}
.ad-slot.is-active {
  display: flex;
}
.ad-slot--leaderboard {
  width: 100%;
  max-width: 728px;
  min-height: 90px;
  margin-block: 12px;
}
.ad-slot--rectangle {
  width: 300px;
  min-height: 250px;
}
.ad-slot--in-feed {
  width: 100%;
  min-height: 120px;
  margin-block: 24px;
}
.ad-slot.is-hidden { display: none; }

/* Collapse sidebar layout when ads are off */
body.ads-off .page-layout {
  grid-template-columns: 1fr;
}
body.ads-off .page-layout__sidebar {
  display: none;
}
body.ads-off .site-header .ad-slot {
  display: none;
}

@media (max-width: 768px) {
  .ad-slot.is-active.ad-slot--leaderboard,
  .ad-slot.is-active.ad-slot--rectangle { display: none; }
  .ad-slot.is-active.ad-slot--in-feed { min-height: 100px; display: flex; }
}

/* ── Hero ── */
.hero {
  padding: 64px 0 48px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}
.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 32px;
}
.hero__cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero__note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Features ── */
.features {
  padding: 48px 0;
}
.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}
.feature-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}
.feature-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

/* ── Two-column layout (content + sidebar ads) ── */
.page-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  padding: 48px 0;
  align-items: start;
}
.page-layout__sidebar {
  position: sticky;
  top: 80px;
}
@media (max-width: 960px) {
  .page-layout { grid-template-columns: 1fr; }
  .page-layout__sidebar { position: static; display: flex; justify-content: center; }
}

/* ── Steps ── */
.steps {
  padding: 48px 0;
  background: var(--panel);
  border-block: 1px solid var(--border);
}
.steps ol {
  max-width: 560px;
  margin: 0 auto;
  padding-left: 20px;
  color: var(--text-secondary);
}
.steps li { margin-bottom: 12px; }
.steps h2 { text-align: center; margin: 0 0 24px; }

/* ── Blog list ── */
.blog-list { padding: 48px 0; }
.blog-list h2 { margin: 0 0 24px; }
.blog-card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.blog-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--accent);
  text-decoration: none;
  color: inherit;
}
.blog-card h3 { margin: 0 0 8px; font-size: 18px; color: var(--text); }
.blog-card p { margin: 0; color: var(--text-secondary); font-size: 14px; }
.blog-card time { font-size: 12px; color: var(--text-muted); }

/* ── Article ── */
.article {
  padding: 48px 0 64px;
}
.article h1 {
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
  margin: 0 0 12px;
}
.article__meta {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
}
.article h2 { margin: 32px 0 12px; font-size: 22px; }
.article h3 { margin: 24px 0 8px; font-size: 18px; }
.article p, .article li { color: var(--text-secondary); }
.article pre {
  background: #1e1e2e;
  color: #e4e4e7;
  padding: 16px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 14px;
}
.article code {
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
.article pre code { background: none; padding: 0; }
.article .cta-box {
  margin-top: 48px;
  padding: 32px;
  background: var(--accent-soft);
  border-radius: var(--radius);
  text-align: center;
}
.article .cta-box h2 { margin-top: 0; }

/* ── Legal / About ── */
.legal-page { padding: 48px 0 64px; }
.legal-page h1 { margin: 0 0 8px; }
.legal-page h2 { margin: 32px 0 12px; font-size: 20px; }
.legal-page p, .legal-page li { color: var(--text-secondary); }

/* ── Footer ── */
.site-footer {
  background: var(--panel);
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
  margin-top: auto;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}
.site-footer h4 {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--text);
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer li { margin-bottom: 8px; }
.site-footer a {
  color: var(--text-secondary);
  font-size: 14px;
  text-decoration: none;
}
.site-footer a:hover { color: var(--accent); }
.site-footer__bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ── 404 ── */
.page-404 {
  text-align: center;
  padding: 80px 0;
}
.page-404 h1 { font-size: 72px; margin: 0; color: var(--accent); }
.page-404 p { color: var(--text-secondary); margin: 16px 0 32px; }

/* ── Cookie banner (GDPR placeholder) ── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--panel);
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  display: none;
  align-items: center;
  gap: 16px;
  z-index: 200;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
  flex-wrap: wrap;
}
.cookie-banner.is-visible { display: flex; }
.cookie-banner p {
  flex: 1;
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  min-width: 200px;
}

.page-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
