/* === APV Style Guide v2.4 === */

:root {
  --apv-blue: #46C0E9;
  --navy: #002060;
  --navy-light: #2B4563;
  --bg: #F2F2F2;
  --white: #FFFFFF;
  --border: #E5E5E5;
  --grey-dark: #D8D8D8;
  --success: #43A047;
  --warning: #FB8C00;
  --error: #E53935;
  --info: #00ACC1;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  --radius-card: 8px;
  --radius-btn: 6px;
  --radius-badge: 4px;
  --max-width: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--navy);
  background: var(--bg);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === Header === */

.site-header {
  background: var(--navy);
  color: var(--white);
  padding: 1.5rem 0;
}

.header-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-logo {
  width: 48px;
  height: 48px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.site-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
}

.site-subtitle {
  font-size: 0.95rem;
  opacity: 0.8;
  margin-top: 0.15rem;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-btn);
  transition: all 0.15s;
  white-space: nowrap;
}

.header-link:hover {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.6);
}

.header-link-feedback {
  background: var(--apv-blue);
  border-color: var(--apv-blue);
  color: var(--white);
}

.header-link-feedback:hover {
  background: #36AED7;
  border-color: #36AED7;
  color: var(--white);
}

/* === Search === */

.search-bar {
  margin: 1.5rem 0;
}

.search-bar input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: var(--white);
  color: var(--navy);
  outline: none;
  transition: border-color 0.15s;
}

.search-bar input:focus {
  border-color: var(--apv-blue);
  box-shadow: 0 0 0 2px rgba(70, 192, 233, 0.2);
}

.search-bar input::placeholder {
  color: var(--navy-light);
  opacity: 0.6;
}

/* === Layout === */

.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* === Filters === */

.filters {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  overflow-x: hidden;
}

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.filters-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--apv-blue);
}

.filters-reset {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--navy-light);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
}

.filters-reset:hover { color: var(--error); }

.filter-group {
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.filter-group:last-child { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }

.filter-group-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem 0;
}

.filter-group-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--navy-light);
}

.filter-group-chevron {
  font-size: 12px;
  color: var(--navy-light);
  transition: transform 0.2s;
}

.filter-group.open .filter-group-chevron {
  transform: rotate(180deg);
}

.filter-chips {
  display: none;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding-top: 0.4rem;
}

.filter-group.open .filter-chips {
  display: flex;
}

.chip {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 5px 10px;
  border-radius: var(--radius-badge);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--navy-light);
  cursor: pointer;
  transition: all 0.15s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.chip:hover {
  border-color: var(--apv-blue);
  color: var(--apv-blue);
}

.chip.active {
  background: var(--apv-blue);
  border-color: var(--apv-blue);
  color: var(--white);
}

.chip-count {
  font-size: 9px;
  font-weight: 500;
  opacity: 0.7;
  margin-left: 3px;
}

.chip.active .chip-count {
  opacity: 0.85;
}

/* === Results === */

.results-info {
  font-size: 13px;
  color: var(--navy-light);
  margin-bottom: 1rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
}

/* === Skill Card === */

.skill-card {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: box-shadow 0.15s;
}

.skill-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.skill-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.skill-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--navy);
}

.skill-version {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--navy-light);
  white-space: nowrap;
}

.skill-description {
  font-size: 14px;
  color: var(--navy-light);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.skill-footer {
  display: flex;
  gap: 0.4rem;
  margin-top: auto;
}

/* === Badges === */

.badge {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: var(--radius-badge);
}

.badge-tag {
  background: var(--bg);
  color: var(--navy-light);
}

.badge-compat {
  color: var(--white);
}

.badge-compat[data-compat="cross-compatible"] { background: var(--success); }
.badge-compat[data-compat="claude-code"] { background: var(--apv-blue); }
.badge-compat[data-compat="cursor"] { background: #5E35B1; }

.badge-type {
  background: var(--navy);
  color: var(--white);
}

/* === Setup Guide === */

.setup-guide {
  margin-top: 3rem;
  margin-bottom: 2rem;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
}

.guide-content {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.guide-content > p {
  margin-bottom: 1.5rem;
  color: var(--navy-light);
}

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.guide-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.guide-step > div {
  flex: 1;
  min-width: 0;
}

.step-number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--apv-blue);
  color: var(--white);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-step > div > strong:first-child {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.guide-step p strong {
  color: var(--navy);
  font-weight: 600;
}

.guide-step p {
  font-size: 14px;
  color: var(--navy-light);
}

.prompt-examples {
  list-style: none;
  margin-top: 0.5rem;
}

.prompt-examples li {
  padding: 0.3rem 0;
  font-size: 14px;
}

.prompt-examples li::before {
  content: "\2192\00a0";
  color: var(--apv-blue);
}

.client-tabs {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.client-tab {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.55rem 1rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--navy-light);
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: -1px;
}

.client-tab:hover {
  color: var(--navy);
}

.client-tab.active {
  color: var(--apv-blue);
  border-bottom-color: var(--apv-blue);
}

.client-panel {
  display: none;
  padding-top: 1rem;
}

.client-panel.active {
  display: block;
}

.config-path {
  font-size: 13px;
  color: var(--navy-light);
  margin-bottom: 0.15rem;
}

.config-path code,
.os-note code,
.client-note code {
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 12px;
  background: var(--bg);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--navy);
}

.os-note {
  font-size: 12px;
  color: var(--navy-light);
  opacity: 0.8;
  margin-bottom: 0.75rem;
}

.code-block {
  position: relative;
  background: var(--navy);
  border-radius: var(--radius-btn);
  padding: 1rem 1rem 1rem 1rem;
  overflow: hidden;
}

.code-block pre {
  margin: 0;
  overflow-x: auto;
  padding-right: 4.5rem;
}

.code-block code {
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 12.5px;
  line-height: 1.55;
  color: #E8F4FB;
  background: none;
  padding: 0;
}

.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.3rem 0.65rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-badge);
  cursor: pointer;
  transition: all 0.15s;
}

.copy-btn:hover {
  background: var(--apv-blue);
  border-color: var(--apv-blue);
}

.client-note {
  font-size: 13px;
  color: var(--navy-light);
  margin-top: 0.75rem;
  line-height: 1.5;
}

.guide-help {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--navy-light);
}

.guide-help a {
  color: var(--apv-blue);
  font-weight: 600;
  text-decoration: none;
}

.guide-help a:hover {
  text-decoration: underline;
}

/* === Empty State === */

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--navy-light);
}

.empty-state-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* === Loading === */

.loading {
  text-align: center;
  padding: 3rem;
  color: var(--navy-light);
}

/* === Footer === */

.site-footer {
  margin-top: 2rem;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 13px;
  color: var(--navy-light);
  border-top: 1px solid var(--border);
}

.site-footer a {
  color: var(--apv-blue);
  text-decoration: none;
}

.site-footer a:hover { text-decoration: underline; }

/* === Responsive === */

@media (max-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
  }

  .filter-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .site-title { font-size: 1.5rem; }

  .header-link { padding: 0.35rem 0.6rem; font-size: 13px; }
  .header-link svg { width: 12px; height: 12px; }
}

/* Tools table (Personio MCP landing page) */
.tools-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: var(--white);
  box-shadow: var(--shadow);
  border-radius: var(--radius-card);
  overflow: hidden;
  font-size: 14px;
}

.tools-table th,
.tools-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.tools-table th {
  background: var(--bg);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  color: var(--navy);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.tools-table tbody tr:last-child th,
.tools-table tbody tr:last-child td {
  border-bottom: none;
}

.tools-table td:first-child {
  white-space: nowrap;
  width: 1%;
}

.tools-table td code {
  font-family: Menlo, Consolas, monospace;
  font-size: 13px;
  background: var(--bg);
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-badge);
}

/* Cowork ordered-step list */
.cowork-steps {
  margin: 0.75rem 0 0 1.25rem;
  padding: 0;
}

.cowork-steps li {
  padding: 0.25rem 0;
  font-size: 14px;
  line-height: 1.5;
}

.cowork-steps > li > code {
  font-family: Menlo, Consolas, monospace;
  font-size: 13px;
  background: var(--bg);
  padding: 0.08rem 0.3rem;
  border-radius: var(--radius-badge);
}
