:root {
  --tc-green: #00d084;
  --tc-blue: #0070f3;
  --text-primary: #111111;
  --text-secondary: #666666;
  --text-muted: #888888;
  --bg-primary: #ffffff;
  --bg-secondary: #fafafa;
  --border: #e5e5e5;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
  --radius-md: 12px;
  --radius-full: 9999px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* ── Header ── */
.header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-primary);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo {
  font-weight: 800;
  font-size: 20px;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -.02em;
}
.logo:hover { color: var(--tc-green); }
.logo-sep { color: var(--border); font-weight: 300; font-size: 20px; }
.site-name { font-size: 14px; font-weight: 500; color: var(--text-muted); }

/* ── Main ── */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ── Search ── */
.search-wrap { margin-bottom: 40px; }
.search-input {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 16px;
  color: var(--text-primary);
  background: var(--bg-primary);
  outline: none;
  transition: border-color .15s;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
  border-color: var(--tc-green);
  box-shadow: 0 0 0 3px rgba(0, 208, 132, 0.2);
}

/* ── Card grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ── Card ── */
.card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow .2s, border-color .2s, transform .15s;
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--tc-green);
  transform: translateY(-2px);
}
.card-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}
.card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}
.card-date {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Empty state ── */
.empty {
  display: none;
  text-align: center;
  padding: 80px 0;
  color: var(--text-muted);
  font-size: 16px;
}
.empty.visible { display: block; }

/* ── Footer ── */
.footer { border-top: 1px solid var(--border); background: var(--bg-secondary); }
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}
.footer-link {
  color: var(--tc-blue);
  text-decoration: none;
  font-weight: 500;
}
.footer-link:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
  .main { padding: 24px 16px 60px; }
  .header-inner { padding: 0 16px; }
  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
}
