/* LessonBench — Riverside-inspired clean resources aesthetic */
:root {
  --bg: #f6f6f8;
  --surface: #ffffff;
  --ink: #0f0f12;
  --muted: #5c5c66;
  --muted-2: #8a8a96;
  --line: #e8e8ee;
  --lavender-bg: #ebe8ff;
  --lavender: #6b5cff;
  --lavender-deep: #3d2f8f;
  --warn-bg: #fff8e6;
  --warn-border: #f0d78c;
  --note-bg: #f3f1ff;
  --needs-bg: #fff1f1;
  --needs-border: #e8a0a0;
  --ph-bg: #ffe8e8;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 15, 18, 0.04);
  --max: 1120px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }

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

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}
.logo:hover { text-decoration: none; color: var(--ink); }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.25rem;
  flex: 1;
}
.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}
.nav a:hover { color: var(--ink); text-decoration: none; }

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  background: var(--ink);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 999px;
  text-decoration: none !important;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-cta:hover { background: #2a2a32; }

/* —— Disclosure bar —— */
.disc {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.65rem 1.5rem;
  background: var(--warn-bg);
  border-bottom: 1px solid var(--warn-border);
  font-size: 0.875rem;
  color: #5a4a20;
}
.disc a { color: #4a3a10; font-weight: 600; }

/* —— Page shells —— */
.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.page-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.page-narrow main,
.article-body {
  background: transparent;
}

/* —— Homepage hero grid —— */
.home-hero {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 3.5rem;
}

@media (max-width: 900px) {
  .home-hero { grid-template-columns: 1fr; }
  .header-inner { flex-wrap: wrap; }
  .btn-cta { margin-left: auto; }
}

.featured {
  display: block;
  text-decoration: none;
  color: inherit;
}
.featured:hover { text-decoration: none; color: inherit; }
.featured:hover .featured-title { color: var(--lavender); }

.featured-card {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(107, 92, 255, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 50% at 80% 70%, rgba(61, 47, 143, 0.45), transparent 50%),
    linear-gradient(145deg, #2a2258 0%, #1a1535 45%, #0f0f12 100%);
  position: relative;
  overflow: hidden;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}
.featured-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.06) 50%, transparent 60%);
  pointer-events: none;
}
.featured-card-label {
  position: absolute;
  left: 1.25rem;
  bottom: 1.25rem;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  opacity: 0.9;
  z-index: 1;
}

.featured-title {
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 0.75rem;
  color: var(--ink);
  transition: color 0.15s ease;
}

.featured-desc {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 0 1.15rem;
  max-width: 36em;
}

.featured-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  font-size: 0.875rem;
  color: var(--muted-2);
}

.meta-author {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6b5cff, #3d2f8f);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.meta-author strong {
  display: block;
  color: var(--ink);
  font-size: 0.9rem;
}
.meta-author span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted-2);
}

/* —— Tags —— */
.tag {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  background: var(--lavender-bg);
  color: var(--lavender);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* —— Trending sidebar —— */
.trending {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.trending-head {
  background:
    radial-gradient(circle at 90% 20%, rgba(255,255,255,0.12), transparent 40%),
    linear-gradient(135deg, #3d2f8f 0%, #2a1f6e 50%, #1a1535 100%);
  color: #fff;
  padding: 1.15rem 1.25rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.trending-list { list-style: none; margin: 0; padding: 0; }

.trending-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.trending-item:first-child { border-top: none; }
a.trending-item:hover { text-decoration: none; background: #fafafa; }
a.trending-item:hover .trending-title { color: var(--lavender); }

.trending-thumb {
  width: 72px;
  height: 54px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.thumb-1 {
  background:
    radial-gradient(circle at 30% 40%, rgba(107,92,255,0.5), transparent 60%),
    linear-gradient(160deg, #4a3db0, #1e1848);
}
.thumb-2 {
  background:
    radial-gradient(circle at 70% 30%, rgba(255,255,255,0.15), transparent 50%),
    linear-gradient(160deg, #5c4fd4, #2d2466);
}
.thumb-3 {
  background:
    radial-gradient(circle at 40% 70%, rgba(107,92,255,0.4), transparent 55%),
    linear-gradient(160deg, #352a8a, #12101f);
}
.thumb-4 {
  background:
    radial-gradient(circle at 60% 50%, rgba(180,160,255,0.35), transparent 50%),
    linear-gradient(160deg, #6b5cff, #251c5c);
}

.trending-title {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
  letter-spacing: -0.015em;
  margin: 0 0 0.4rem;
  color: var(--ink);
  transition: color 0.15s ease;
}

.trending-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  font-size: 0.75rem;
  color: var(--muted-2);
}

/* —— Section: more guides —— */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.25rem;
}
.section-head h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 900px) {
  .guide-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .guide-grid { grid-template-columns: 1fr; }
}

.guide-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.guide-card:hover {
  text-decoration: none;
  color: inherit;
  border-color: #d4d0f0;
  box-shadow: 0 4px 16px rgba(61, 47, 143, 0.08);
}
.guide-card:hover .guide-card-title { color: var(--lavender); }

.guide-card-media {
  aspect-ratio: 16 / 9;
  width: 100%;
}
.guide-card-body {
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.guide-card-title {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0;
  color: var(--ink);
  transition: color 0.15s ease;
}
.guide-card-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  flex: 1;
}
.guide-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  font-size: 0.75rem;
  color: var(--muted-2);
  margin-top: 0.35rem;
}

/* —— Intro strip (home) —— */
.intro-strip {
  margin-bottom: 2.5rem;
  max-width: 40em;
}
.intro-strip h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin: 0 0 0.75rem;
}
.intro-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
}

/* —— Article / content pages —— */
.article-header {
  margin-bottom: 1.75rem;
}
.article-header h1 {
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin: 0 0 0.85rem;
}
.article-header .meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

main h1 {
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin: 0 0 1rem;
}
main h2 {
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
main h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}
main p { margin: 0 0 1rem; color: var(--ink); }
main ul, main ol { margin: 0 0 1rem; padding-left: 1.25rem; }
main li { margin-bottom: 0.35rem; }

.meta { color: var(--muted); font-size: 0.95rem; margin: 0.25rem 0 1.25rem; }

.note {
  background: var(--note-bg);
  border-left: 3px solid var(--lavender);
  padding: 0.85rem 1rem;
  margin: 1.25rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.needs {
  background: var(--needs-bg);
  border-left: 3px solid var(--needs-border);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.ph {
  background: var(--ph-bg);
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  font-size: 0.92em;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
  margin: 1.25rem 0;
  background: var(--surface);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
}
th, td {
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
th {
  background: #f3f3f7;
  font-weight: 600;
  font-size: 0.85rem;
}
tr:last-child td { border-bottom: none; }

.btn {
  display: inline-block;
  margin: 0.35rem 0.5rem 0.35rem 0;
  padding: 0.45rem 0.9rem;
  background: var(--ink);
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
}
.btn:hover { background: #2a2a32; }
.btn.sec { background: #5c5c66; }
.btn.sec:hover { background: #484850; }

ul.checklist { padding-left: 1.2rem; }

code {
  font-size: 0.9em;
  background: #eeeef2;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  margin-top: 2rem;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--muted-2);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}
.footer-links a {
  color: var(--muted);
  font-weight: 500;
}
.footer-links a:hover { color: var(--ink); }

/* legacy footer tag still used on some pages until fully migrated */
footer:not(.site-footer) {
  max-width: var(--max);
  margin: 2rem auto 0;
  padding: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted-2);
  border-top: 1px solid var(--line);
}

/* —— Cover images —— */
.guide-cover { margin: 1.5rem 0 2rem; }
.guide-cover img { display:block; width:100%; aspect-ratio:16/9; object-fit:cover; border-radius:18px; box-shadow:0 10px 30px rgba(30,20,60,.12); }
.guide-cover figcaption { margin-top:.5rem; font-size:.75rem; color:#8a8698; }
.guide-cover figcaption a { color:inherit; }
.featured-card { position:relative; overflow:hidden; }
.featured-card .featured-img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:0; }
.featured-card-label { position:relative; z-index:2; }
.guide-card-media.has-img, .trending-thumb.has-img { overflow:hidden; background:none; }
.guide-card-media.has-img { aspect-ratio:16/9; }
.has-img img { display:block; width:100%; height:100%; object-fit:cover; }

/* —— Compact affiliate disclosure (low weight, still visible) —— */
.meta-aff { color:#8a8698; }
.disc-foot { max-width:var(--max); margin:2.5rem auto 1rem; padding:.75rem 1.5rem 0; border-top:1px solid rgba(0,0,0,.08); font-size:.8rem; line-height:1.5; color:#6f6b7d; }
.disc-foot a { color:inherit; text-decoration:underline; }
.featured-card::after { z-index:1; }
.related-guides{margin:2.5rem 0 1rem;padding-top:1.25rem;border-top:1px solid #e5e5ef}.related-guides h2{font-size:1.1rem}.related-guides ul{padding-left:1.1rem}.related-guides a{color:inherit}
