/*
Theme Name: MustKnow AI
Theme URI: https://mustknow.org/
Author: MustKnow AI
Description: Editorial WordPress theme for practical AI education and tool guidance.
Version: 1.0.0
Text Domain: mustknow-ai
*/

:root {
  --ink: #111827;
  --muted: #52606d;
  --soft: #f4f7f7;
  --line: #dbe4e4;
  --teal: #0f766e;
  --green: #15803d;
  --blue: #155e9a;
  --white: #ffffff;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--white);
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
.container { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.skip-link { position: absolute; left: -999px; top: 12px; }
.skip-link:focus { left: 12px; z-index: 10; padding: 8px 12px; background: var(--white); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255,255,255,.98);
  border-bottom: 1px solid var(--line);
}
.header-inner { min-height: 70px; display: flex; align-items: center; gap: 34px; }
.brand { color: var(--ink); font-size: 23px; font-weight: 750; white-space: nowrap; }
.brand span { color: var(--teal); }
.site-nav { display: flex; flex: 1; align-items: center; gap: 22px; }
.site-nav a { color: var(--ink); font-size: 14px; font-weight: 550; }
.site-nav .about-link { margin-left: auto; }

.hero { padding: 42px 0 38px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1fr .95fr; align-items: center; gap: 42px; }
.eyebrow { margin: 0 0 12px; color: var(--teal); font-size: 13px; font-weight: 700; text-transform: uppercase; }
h1 { margin: 0 0 16px; font-size: clamp(36px, 5vw, 52px); line-height: 1.1; font-weight: 760; }
.hero-copy { margin: 0 0 26px; max-width: 545px; color: var(--muted); font-size: 18px; }
.hero-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  padding: 0 18px;
  border: 1px solid var(--teal);
  border-radius: 6px;
  color: var(--white);
  background: var(--teal);
  font-weight: 650;
}
.button.secondary { background: var(--white); color: var(--teal); }
.button:hover { text-decoration: none; background: #0b5c56; color: var(--white); }
.hero-image { overflow: hidden; border-radius: 8px; aspect-ratio: 16 / 11; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; }

.topic-bar { background: var(--soft); border-bottom: 1px solid var(--line); }
.topic-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; }
.topic-list a { padding: 24px 16px 22px 0; color: var(--ink); }
.topic-list strong { display: block; font-size: 15px; }
.topic-list span { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }

.section { padding: 46px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 22px; }
h2 { margin: 0; font-size: 28px; line-height: 1.25; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-card { padding: 20px; border: 1px solid var(--line); border-radius: 7px; min-height: 236px; }
.post-card .category { color: var(--teal); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.post-card h3 { margin: 9px 0 10px; font-size: 20px; line-height: 1.35; }
.post-card h3 a { color: var(--ink); }
.post-card p { margin: 0; color: var(--muted); font-size: 14px; }
.post-card .read { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 650; }
.tool-section { background: #fbfcfc; border-bottom: 1px solid var(--line); }
.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tool-card { padding: 20px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); }
.tool-card h3 { margin: 8px 0 8px; font-size: 19px; line-height: 1.3; }
.tool-card p { margin: 0; color: var(--muted); font-size: 14px; }
.mini-label { color: var(--teal); font-size: 12px; font-weight: 750; text-transform: uppercase; }

.content-layout { display: grid; grid-template-columns: minmax(0, 760px) 270px; gap: 54px; padding: 42px 0 64px; }
.article-header h1 { font-size: 42px; margin: 10px 0 12px; }
.article-meta { color: var(--muted); font-size: 14px; }
.affiliate-note {
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: var(--soft);
  font-size: 14px;
}
.entry-content { margin-top: 30px; font-size: 18px; }
.entry-content h2 { margin: 38px 0 12px; font-size: 27px; }
.entry-content h3 { margin: 26px 0 10px; font-size: 21px; }
.entry-content p, .entry-content ul { margin: 0 0 18px; }
.entry-content li { margin-bottom: 9px; }
.entry-content .takeaway {
  padding: 22px 24px;
  background: var(--soft);
  border-left: 4px solid var(--teal);
  border-radius: 0 6px 6px 0;
}
.sidebar { padding-top: 14px; }
.sidebar h2 { margin-bottom: 13px; font-size: 18px; }
.sidebar-block { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.sidebar a { display: block; margin-bottom: 10px; color: var(--ink); font-size: 14px; }

.archive-header { padding: 42px 0 12px; }
.page-content { max-width: 760px; padding: 48px 0 68px; }
.page-content h1 { font-size: 42px; }
.site-footer { background: #142329; color: #d8e2e4; padding: 38px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; }
.footer-brand { color: var(--white); font-size: 20px; font-weight: 700; }
.site-footer a { color: #d8e2e4; margin-left: 18px; }
.site-footer p { margin: 8px 0 0; font-size: 14px; color: #b7c8ca; }

@media (max-width: 920px) {
  .header-inner { flex-wrap: wrap; padding: 14px 0; gap: 14px; }
  .site-nav { flex-wrap: wrap; gap: 14px 20px; }
  .hero-grid, .content-layout { grid-template-columns: 1fr; }
  .hero-image { order: -1; }
  .topic-list { grid-template-columns: repeat(2, 1fr); }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .container { width: min(var(--max), calc(100% - 28px)); }
  .site-nav .about-link { margin-left: 0; }
  .hero { padding-top: 20px; }
  h1, .article-header h1, .page-content h1 { font-size: 33px; }
  .post-grid, .topic-list, .tool-grid { grid-template-columns: 1fr; }
  .footer-inner { display: block; }
  .site-footer a { display: inline-block; margin: 16px 14px 0 0; }
}
