/* Tedence Wiki Styles */

/* Homepage nav */
.home-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 0.4rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: system-ui, sans-serif;
}
.home-nav .home-title {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.home-nav .theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  text-decoration: none;
}
.home-nav .theme-toggle:hover {
  background: var(--bg-hover);
}

:root {
  --bg: #fff;
  --bg-card: #f9f9f9;
  --bg-hover: #f0f0f0;
  --text: #1a1a1a;
  --text-muted: #666;
  --border: rgba(0, 0, 0, 0.1);
  --accent: #0066cc;
  --tag-bg: #e0e0e0;
  --tag-text: #333;
  --status-final: #2da44e;
  --status-draft: #999;
  --status-waiting: #bf8700;
}

* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 3rem 1rem 2rem 1rem;
  line-height: 1.6;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
}

.subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Search */
.search-bar {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.search-bar:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Filter Labels */
.filter-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* Status Filter */
.status-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.status-pill {
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: ui-monospace, monospace;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s;
  color: white;
}

.status-pill-final {
  background: var(--status-final);
}

.status-pill-waiting {
  background: var(--status-waiting);
}

.status-pill-draft {
  background: var(--status-draft);
}

.status-pill:hover {
  opacity: 0.8;
}

.status-pill.active {
  border-color: var(--text);
  box-shadow: 0 0 0 1px var(--bg);
}

/* Tags Filter */
.tags-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.tag-pill {
  padding: 0.4rem 0.8rem;
  background: var(--tag-bg);
  color: var(--tag-text);
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: ui-monospace, monospace;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s;
}

.tag-pill:hover {
  background: var(--bg-hover);
}

.tag-pill.active {
  border-color: var(--accent);
  color: var(--accent);
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  transition: all 0.2s;
  cursor: pointer;
}

.card:hover {
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.card.hidden {
  display: none;
}

.card a {
  text-decoration: none;
  color: inherit;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
}

.category {
  color: var(--text-muted);
  font-family: ui-monospace, monospace;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.status {
  font-family: ui-monospace, monospace;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
}

.status-final {
  background: var(--status-final);
  color: white;
}

.status-draft {
  background: var(--status-draft);
  color: white;
}

.status-waiting {
  background: var(--status-waiting);
  color: white;
}

.card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: var(--accent);
}

.description {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 1rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  padding: 0.2rem 0.5rem;
  background: var(--tag-bg);
  color: var(--tag-text);
  border-radius: 3px;
  font-size: 0.75rem;
  font-family: ui-monospace, monospace;
}

.updated {
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

/* Responsive */
@media (max-width: 640px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }

  body {
    padding: 1rem 0.5rem;
  }
}

/* Dark mode */
body.dark-mode {
  --bg: #1a1a1a;
  --bg-card: #252525;
  --bg-hover: #333;
  --text: #e5e5e5;
  --text-muted: #aaa;
  --border: rgba(255, 255, 255, 0.1);
  --tag-bg: #333;
  --tag-text: #ddd;
  --accent: #6cb2f7;
}
