/* AI for Small Business - independent stylesheet. No frameworks, system fonts only. */
:root {
  --bg: #f6f8f7;
  --surface: #ffffff;
  --text: #16201d;
  --muted: #55645f;
  --brand: #0b6e63;
  --brand-strong: #07524a;
  --brand-text: #ffffff;
  --accent: #b86e00;
  --border: #d8e0dc;
  --notice-bg: #fff6e3;
  --notice-border: #e8c27a;
  --radius: 6px;
  --maxw: 1120px;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-read: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}
:root[data-theme="dark"] {
  --bg: #0e1513;
  --surface: #151f1c;
  --text: #e5eeea;
  --muted: #9db0a9;
  --brand: #4fd1be;
  --brand-strong: #7fe3d3;
  --brand-text: #05211d;
  --accent: #f0b34a;
  --border: #26352f;
  --notice-bg: #2a2412;
  --notice-border: #6b5a22;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 1rem/1.6 var(--font-ui);
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: 0.18em; }
a:hover { color: var(--brand-strong); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4vw + 0.5rem, 2.9rem); }
h2 { font-size: clamp(1.4rem, 2vw + 0.6rem, 1.9rem); }
h3, .h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 2px; }

.container { width: min(100% - 2rem, var(--maxw)); margin-inline: auto; }
.narrow { max-width: 760px; }
.section { padding-block: 2.5rem; }
.section-tight { margin-top: 2.5rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--brand); color: var(--brand-text); padding: 0.6rem 1rem; z-index: 100; }
.skip-link:focus { left: 0.5rem; top: 0.5rem; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { margin-bottom: 0.4rem; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; padding-block: 0.7rem; }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none; letter-spacing: -0.02em; }
.site-nav { display: flex; gap: 1.1rem; }
.site-nav a { color: var(--text); text-decoration: none; padding: 0.3rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-color: var(--brand); }
.nav-toggle { display: none; }
.search-form { display: flex; margin-left: auto; }

/* Form controls */
input[type="search"], input[type="text"], input[type="email"], textarea {
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 0.55rem 0.75rem; min-width: 0;
}
button, .btn {
  font: inherit; font-weight: 600; cursor: pointer; border: 1px solid var(--brand);
  background: var(--brand); color: var(--brand-text); border-radius: var(--radius); padding: 0.55rem 1rem;
}
button:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.search-form input { border-radius: var(--radius) 0 0 var(--radius); width: 11rem; }
.search-form button, .hero-search button { border-radius: 0 var(--radius) var(--radius) 0; }
.theme-toggle { background: transparent; color: var(--text); border-color: var(--border); }
.theme-toggle:hover { background: var(--bg); color: var(--text); border-color: var(--brand); }

/* Hero */
.hero { background: var(--surface); border-bottom: 1px solid var(--border); }
.hero-inner { padding-block: clamp(2.5rem, 7vw, 5rem); }
.hero h1 { max-width: 18ch; }
.hero-search { display: flex; max-width: 34rem; margin: 1.5rem 0; }
.hero-search input { flex: 1; border-radius: var(--radius) 0 0 var(--radius); }

/* Cards and grid */
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.post-card h3 { margin-bottom: 0.4em; }
.post-card h3 a { color: var(--text); text-decoration: none; }
.post-card h3 a:hover { color: var(--brand); text-decoration: underline; }
.meta { font-size: 0.875rem; color: var(--muted); margin: 0; }
.meta a { color: var(--muted); }

.badges { display: flex; gap: 0.4rem; margin-bottom: 0.6rem; flex-wrap: wrap; }
.badge { font-size: 0.78rem; font-weight: 600; padding: 0.1rem 0.55rem; border-radius: 99px; border: 1px solid var(--border); color: var(--muted); }
.badge-review { color: var(--accent); border-color: var(--accent); }
.badge-pillar { background: var(--brand); color: var(--brand-text); border-color: var(--brand); }

/* Article layout */
.layout { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .layout { grid-template-columns: minmax(0, 1fr) 300px; } .sidebar { position: sticky; top: 5rem; align-self: start; } }
.breadcrumb { font-size: 0.875rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--muted); }
.featured { width: 100%; border-radius: var(--radius); margin: 1rem 0; }

.prose { font-family: var(--font-read); font-size: 1.1875rem; line-height: 1.75; max-width: 68ch; }
.prose h2, .prose h3 { font-family: var(--font-ui); margin-top: 1.8em; }
.prose h2 { padding-top: 0.4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.35em; }
.prose blockquote { margin: 1.5em 0; padding: 0.2em 1.2em; border-left: 4px solid var(--brand); color: var(--muted); }
.prose code { font-size: 0.9em; background: var(--surface); border: 1px solid var(--border); padding: 0.1em 0.35em; border-radius: 4px; }
.prose pre { background: var(--surface); border: 1px solid var(--border); padding: 1rem; overflow-x: auto; border-radius: var(--radius); }
.prose pre code { border: 0; padding: 0; background: none; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; font-family: var(--font-ui); font-size: 0.95rem; margin-bottom: 1.4em; }
.prose th, .prose td { border: 1px solid var(--border); padding: 0.5rem 0.75rem; text-align: left; }
.prose th { background: var(--surface); }
.prose img { border-radius: var(--radius); }

.notice { background: var(--notice-bg); border: 1px solid var(--notice-border); border-radius: var(--radius); padding: 0.75rem 1rem; font-size: 0.95rem; }
.cluster { margin: 2rem 0; padding: 1.25rem 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.cluster ul { margin: 0; padding-left: 1.2rem; }

/* Ads: reserve space to prevent layout shift */
.ad-slot { min-height: 280px; margin: 1.75rem 0; text-align: center; overflow: hidden; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 1.25rem; margin-top: 2rem; }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 3rem; padding-top: 2rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.footer-heading { font-weight: 700; margin-bottom: 0.6rem; }
.footer-bottom { padding-block: 1.5rem; margin-top: 1.5rem; border-top: 1px solid var(--border); }

/* Mobile navigation */
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; margin-left: auto; background: transparent; color: var(--text); border-color: var(--border); }
  .nav-toggle:hover { background: var(--bg); color: var(--text); }
  .site-nav { display: none; flex-direction: column; width: 100%; gap: 0.2rem; order: 5; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.55rem 0; }
  .search-form { margin-left: 0; width: 100%; order: 4; }
  .search-form input { flex: 1; width: auto; }
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .ad-slot, .sidebar { display: none; } }
