/* ===== Tokens ===== */
:root {
  --bg: #f4f4f5;
  --card: #ffffff;
  --ink: #111316;
  --ink-2: #2a2e35;
  --muted: #8b9099;
  --line: #e7e7ea;
  --chip: #f1f1f3;
  --nav: #2d3138;
  --lime: #b8f13c;
  --lime-ink: #18200a;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(17, 19, 22, .04), 0 8px 24px rgba(17, 19, 22, .04);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--bg);
  /* soft diagonal light streaks, like the template */
  background-image:
    linear-gradient(115deg, transparent 0 18%, rgba(255,255,255,.55) 18% 24%, transparent 24% 46%, rgba(255,255,255,.4) 46% 50%, transparent 50% 100%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ===== Nav pill ===== */
.topbar { position: sticky; top: 14px; z-index: 50; display: flex; justify-content: center; padding: 22px 16px 0; }
.navpill {
  display: flex; align-items: center; gap: 6px;
  background: var(--nav); color: #fff;
  padding: 6px 6px 6px 14px; border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
  font-size: 13px; position: relative;
}
.brand { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; text-decoration: none; margin-right: 10px; white-space: nowrap; }
.brand-mark { flex: none; display: block; width: 24px; height: 24px; }
.navlinks { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.navlinks a { display: block; padding: 7px 11px; border-radius: 7px; text-decoration: none; color: #e8e9eb; white-space: nowrap; }
.navlinks a:hover, .navlinks a[aria-current="page"] { background: rgba(255,255,255,.08); color: #fff; }
.navlinks .btn-lime, .btn-lime { background: var(--lime); color: var(--lime-ink); font-weight: 500; margin-left: 8px; }
.navlinks .btn-lime:hover { background: #c8f763; color: var(--lime-ink); }
.navtoggle { display: none; background: none; border: 0; color: #fff; padding: 7px; cursor: pointer; }

/* ===== Hero ===== */
.hero { text-align: center; padding: 70px 0 30px; }
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--chip); border-radius: 999px; padding: 5px 12px;
  font-size: 13px; color: var(--ink-2);
}
.badge svg { width: 15px; height: 15px; }
.hero h1, .section-head h2.big {
  font-size: clamp(30px, 4.4vw, 44px); line-height: 1.25; font-weight: 600;
  letter-spacing: -.01em; margin: 18px auto 14px; max-width: 640px;
}
.hero p, .section-head p { color: var(--muted); max-width: 560px; margin: 0 auto; font-size: 15px; }

.search {
  display: flex; align-items: center; gap: 8px;
  width: min(480px, 100%); margin: 26px auto 0;
  background: #ebebed; border-radius: 8px; padding: 0 14px;
}
.search input { flex: 1; border: 0; background: transparent; font: inherit; font-size: 14px; padding: 12px 0; outline: none; color: var(--ink); }
.search svg { color: var(--ink-2); flex: none; }

/* ===== Sections ===== */
.section { padding: 46px 0 10px; }
.section-head { text-align: center; margin-bottom: 26px; }
.section-head h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 500; margin: 0 0 16px; }
.section-head h2.big { font-size: clamp(24px, 3vw, 32px); margin-top: 14px; }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip {
  font: inherit; font-size: 13px; cursor: pointer;
  background: var(--card); color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 7px; padding: 6px 14px;
}
.chip:hover { border-color: #cfd0d4; }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ===== Cards ===== */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--card); border-radius: var(--radius); padding: 10px 10px 14px;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(17,19,22,.08); }
.card-link { text-decoration: none; flex: 1; }
.card h3 { font-size: 17px; font-weight: 500; line-height: 1.4; margin: 14px 8px 8px; }
.card p { font-size: 14px; color: var(--muted); margin: 0 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: center; gap: 8px; margin: 14px 8px 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); }
.avatar {
  width: 24px; height: 24px; border-radius: 50%; background: #dcdde0; color: #555;
  display: inline-grid; place-items: center; font-size: 11px; font-weight: 600; flex: none;
}
.empty { text-align: center; color: var(--muted); padding: 30px 0; }

.cover { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); }
.cover-fallback {
  display: grid; place-items: end start; padding: 14px;
  background:
    radial-gradient(circle at 80% 20%, rgba(184,241,60,.55), transparent 45%),
    linear-gradient(135deg, #2d3138, #4b5563);
  color: #fff; font-size: 13px; font-weight: 500;
}
.cover-fallback span { background: rgba(255,255,255,.14); padding: 4px 10px; border-radius: 999px; }

/* ===== Featured ===== */
.featured { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.feat-big { background: var(--card); border-radius: var(--radius); padding: 22px 14px 14px; box-shadow: var(--shadow); }
.feat-big h3 { font-size: 18px; font-weight: 500; margin: 0 8px 8px; }
.feat-big h3 a, .feat-row h3 a { text-decoration: none; }
.feat-big p { color: var(--muted); font-size: 14px; margin: 0 8px 18px; }
.feat-big .cover { aspect-ratio: 4 / 3; border-radius: 14px; }
.feat-big .card-foot { border-top: 0; padding-top: 0; }
.feat-side { display: grid; gap: 20px; }
.feat-row {
  background: var(--card); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow);
  display: grid; grid-template-columns: 140px 1fr auto; gap: 14px; align-items: center;
}
.feat-row .thumb { aspect-ratio: 4 / 3; border-radius: 8px; }
.feat-row h3 { font-size: 15.5px; font-weight: 500; line-height: 1.45; margin: 8px 0 0; }
.feat-row p { color: var(--muted); font-size: 13.5px; margin: 6px 0 0; }
.feat-row.wide { grid-template-columns: 1fr auto; }
.feat-row.wide .thumb { grid-column: 1 / -1; aspect-ratio: 16 / 4; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--chip); border-radius: 6px; padding: 3px 10px; font-size: 12px; color: var(--ink-2); }
.arrow {
  width: 44px; height: 44px; border-radius: 50%; background: var(--chip);
  display: grid; place-items: center; color: var(--ink); text-decoration: none; transition: background .15s;
}
.arrow:hover { background: var(--lime); }

/* ===== Article ===== */
.article-wrap { max-width: 820px; padding-top: 44px; }
.crumbs { font-size: 13px; color: var(--muted); text-align: center; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs span { margin: 0 6px; }
.article-head { text-align: center; padding: 18px 0 26px; }
.article-head h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.25; font-weight: 600; margin: 16px 0 12px; letter-spacing: -.01em; }
.lede { color: var(--muted); max-width: 620px; margin: 0 auto; }
.meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 18px; font-size: 13px; color: var(--ink-2); }
.meta .dot { color: #c4c6cb; }
.hero-fig { margin: 0 0 20px; }
.hero-fig figcaption { font-size: 12px; color: var(--muted); text-align: right; margin-top: 6px; }
.article-hero { width: 100%; height: auto; border-radius: var(--radius); aspect-ratio: 16 / 9; object-fit: cover; }
.article-card { background: var(--card); border-radius: 20px; padding: clamp(20px, 5vw, 48px); box-shadow: var(--shadow); }
.disclosure { font-size: 12.5px; color: var(--muted); background: #fafafa; border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin: 0 0 26px; }

.prose { font-size: 16.5px; line-height: 1.75; color: #22252a; }
.prose h2 { font-size: 24px; font-weight: 600; line-height: 1.3; margin: 44px 0 14px; }
.prose h3 { font-size: 19px; font-weight: 600; margin: 30px 0 10px; }
.prose p { margin: 0 0 18px; }
.prose a { color: var(--ink); text-decoration-color: var(--lime); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.prose a:hover { background: rgba(184,241,60,.25); }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 18px; }
.prose li { margin-bottom: 6px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.prose blockquote { margin: 24px 0; padding: 16px 20px; background: #f6fbe9; border-left: 4px solid var(--lime); border-radius: 0 10px 10px 0; }
.prose blockquote p:last-child { margin: 0; }
.prose strong { color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 8px 0 22px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: #f6f6f7; font-weight: 600; white-space: nowrap; }
.prose tr:hover td { background: #fbfbfb; }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.share-btn { text-decoration: none; padding: 8px 14px; border-radius: 8px; background: var(--chip); font-weight: 500; }
.share-btn.pin { background: #e60023; color: #fff; }
.related { padding: 50px 0 10px; }
.related h2 { text-align: center; font-weight: 500; font-size: 26px; margin: 0 0 24px; }

/* ===== Forms ===== */
.form { display: grid; gap: 14px; }
.form label { font-size: 14px; font-weight: 500; display: grid; gap: 6px; }
.form input, .form textarea { font: inherit; font-size: 15px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; background: #fafafa; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--lime); border-color: transparent; }
.form button { justify-self: start; font: inherit; font-weight: 500; border: 0; cursor: pointer; padding: 11px 22px; border-radius: 8px; background: var(--ink); color: #fff; }
.hidden { display: none; }

/* ===== Footer ===== */
.footer { margin-top: 80px; padding: 40px 0 30px; background: var(--card); border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-inner > div { max-width: 420px; }
.footer-brand { font-weight: 600; text-decoration: none; font-size: 17px; }
.footer p { color: var(--muted); font-size: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14px; }
.footer ul a { text-decoration: none; color: var(--ink-2); }
.footer ul a:hover { color: var(--ink); text-decoration: underline; }
.footer-small { font-size: 12.5px !important; margin-top: 24px; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .grid3 { grid-template-columns: repeat(2, 1fr); }
  .featured { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .navtoggle { display: block; margin-left: auto; }
  .navpill { width: 100%; flex-wrap: wrap; }
  .navlinks { display: none; width: 100%; flex-direction: column; align-items: stretch; padding: 6px 0 4px; }
  .navpill.open .navlinks { display: flex; }
  .navlinks .btn-lime { margin: 6px 0 0; text-align: center; }
  .grid3 { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
  .feat-row { grid-template-columns: 96px 1fr auto; }
  .prose table { display: block; overflow-x: auto; }
}
