:root {
  --red: #f61d32;
  --red-2: #ff5e3a;
  --ink: #111827;
  --soft: #374151;
  --muted: #6b7280;
  --line: #eee2dc;
  --paper: #fff4ec;
  --card: #ffffff;
  --yellow: #ffc62b;
  --tip: #fff8e1;
  --warn: #fff1f2;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-padding-top: 140px;
}

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand img { height: 36px; width: auto; display: block; }
.brand:hover { text-decoration: none; }

.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 9px 14px;
  border-radius: 12px;
  font: 600 13.5px/1 'Poppins', sans-serif;
  text-decoration: none;
  border: 2px solid transparent;
}
.btn:hover { text-decoration: none; }
.btn-ghost { color: var(--soft); }
.btn-ghost:hover { background: var(--paper); }
.btn-primary {
  background: linear-gradient(90deg, var(--red), var(--red-2));
  color: #fff;
  box-shadow: 3px 3px 0 var(--yellow);
}
.btn-primary:hover { transform: translate(-1px, -1px); }

.cats {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.cats.is-away { display: none; }
.cats-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cats-inner::-webkit-scrollbar { display: none; }
.cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--soft);
  font: 600 12.5px/1 'Poppins', sans-serif;
  text-decoration: none;
  white-space: nowrap;
}
.cat:hover {
  text-decoration: none;
  border-color: var(--red);
  color: var(--red);
}
.cat.is-active {
  background: linear-gradient(90deg, var(--red), var(--red-2));
  border-color: transparent;
  color: #fff;
}
.cat-n {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.7;
}
.cat.is-active .cat-n { opacity: 0.9; color: #fff; }

.wrap { max-width: 820px; margin: 0 auto; padding: 36px 20px 72px; }
.wrap-wide { max-width: 1040px; }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--red);
  background: #fff;
  border: 2px solid var(--red);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.8px; line-height: 1.2; }
.lede { margin-top: 10px; color: var(--muted); font-size: 16px; }

.section-title {
  margin: 36px 0 14px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 18px 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}
.card:hover {
  text-decoration: none;
  border-color: var(--red);
  box-shadow: 4px 4px 0 var(--yellow);
}
.card .num {
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
}
.card h2 { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; }
.card p { font-size: 13.5px; color: var(--muted); }

.video-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  border-radius: 16px;
  overflow: hidden;
  margin: 22px 0 28px;
}
.video-box iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-soon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #fff;
  font-weight: 600;
  padding: 24px;
  text-align: center;
}

.article h2 {
  font-size: 20px;
  margin: 28px 0 10px;
}
.article p { margin: 0 0 14px; color: var(--soft); }
.article ol, .article ul { padding-left: 22px; margin: 0 0 16px; }
.article li { margin: 7px 0; color: var(--soft); }
.tip, .warn {
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 0 16px;
  font-size: 14.5px;
}
.tip { background: var(--tip); }
.warn { background: var(--warn); }

.nav-posts {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.nav-posts a {
  flex: 1;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13.5px;
}
.nav-posts a:hover { border-color: var(--red); text-decoration: none; }
.nav-posts .dir { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.nav-posts .right { text-align: right; }

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 8px 20px 40px;
}

@media (max-width: 640px) {
  h1 { font-size: 26px; }
  .nav-posts { flex-direction: column; }
  .nav-posts .right { text-align: left; }
  .cats-inner { padding: 8px 14px; gap: 6px; }
  .cat { padding: 6px 10px; font-size: 12px; }
}
