:root {
  --v2-bg: #f5f3ee;
  --v2-ink: #16181d;
  --v2-muted: #667085;
  --v2-soft: #e7e1d6;
  --v2-line: #d8d0c2;
  --v2-card: #ffffff;
  --v2-deep: #111827;
  --v2-teal: #0f766e;
  --v2-blue: #1d4ed8;
  --v2-amber: #b45309;
  --v2-red: #b42318;
  --v2-shadow: 0 18px 44px rgba(17, 24, 39, .11);
}

body.v2-body {
  margin: 0;
  min-height: 100vh;
  background: var(--v2-bg);
  color: var(--v2-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.v2-body * {
  box-sizing: border-box;
}

.v2-body button,
.v2-body input,
.v2-body select {
  font: inherit;
  letter-spacing: 0;
}

.v2-app {
  min-height: 100vh;
}

.v2-header {
  background: #111827;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.v2-header-inner {
  max-width: 1680px;
  margin: 0 auto;
  padding: 22px 28px 18px;
}

.v2-topline {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.v2-title h1 {
  margin: 0;
  font-size: clamp(27px, 3.2vw, 48px);
  line-height: 1;
  font-weight: 900;
}

.v2-title p {
  margin: 8px 0 0;
  color: #cbd5e1;
  font-size: 14px;
}

.v2-proof {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.v2-proof span {
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  padding: 7px 10px;
  color: #e5e7eb;
  background: rgba(255, 255, 255, .06);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.v2-toolbar-wrap {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 243, 238, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--v2-line);
}

.v2-toolbar {
  max-width: 1680px;
  margin: 0 auto;
  padding: 14px 28px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.v2-search,
.v2-select {
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  background: #fff;
  color: var(--v2-ink);
  padding: 11px 12px;
  min-height: 42px;
}

.v2-search {
  width: 100%;
}

.v2-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.v2-tab,
.v2-sort,
.v2-action,
.v2-copy {
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  background: #fff;
  color: var(--v2-ink);
  min-height: 40px;
  padding: 9px 11px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
}

.v2-tab.is-active,
.v2-sort.is-active {
  border-color: #111827;
  background: #111827;
  color: #fff;
}

.v2-main {
  max-width: 1680px;
  margin: 0 auto;
  padding: 24px 28px 44px;
}

.v2-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.v2-stat {
  background: #fff;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  padding: 13px;
  min-height: 76px;
}

.v2-stat b {
  display: block;
  font-size: 26px;
  line-height: 1;
  margin-bottom: 8px;
}

.v2-stat span {
  color: var(--v2-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.v2-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 18px 0 12px;
  color: var(--v2-muted);
  font-size: 13px;
}

.v2-status strong {
  color: var(--v2-ink);
}

.v2-featured {
  display: grid;
  grid-template-columns: 1.2fr .8fr .8fr;
  gap: 14px;
  margin-bottom: 20px;
}

.v2-featured .v2-card:first-child {
  grid-row: span 2;
}

.v2-featured .v2-card:first-child .v2-preview {
  aspect-ratio: 16 / 11;
}

.v2-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
}

.v2-card {
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--v2-card);
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--v2-shadow);
  min-width: 0;
}

.v2-preview {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #dad4ca;
  overflow: hidden;
}

.v2-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
}

.v2-preview-empty {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 20px;
  text-align: center;
  color: #5f6673;
  background: repeating-linear-gradient(135deg, #e6e1d8, #e6e1d8 12px, #d8d1c6 12px, #d8d1c6 24px);
  font-weight: 900;
}

.v2-card-body {
  padding: 13px;
  display: grid;
  gap: 10px;
}

.v2-card-head {
  display: grid;
  gap: 8px;
}

.v2-card h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.18;
}

.v2-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.v2-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  background: #edf7f5;
  color: #07524d;
  border: 1px solid #c5e4df;
}

.v2-pill.warn {
  background: #fff7ed;
  color: var(--v2-amber);
  border-color: #fed7aa;
}

.v2-pill.bad {
  background: #fef3f2;
  color: var(--v2-red);
  border-color: #fecdca;
}

.v2-code {
  width: fit-content;
  max-width: 100%;
  border-radius: 7px;
  background: #111827;
  color: #fff;
  padding: 7px 8px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.v2-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.v2-action,
.v2-copy {
  text-align: center;
}

.v2-action.primary {
  border-color: var(--v2-blue);
  background: var(--v2-blue);
  color: #fff;
}

.v2-action.ghost {
  background: #f8fafc;
  color: var(--v2-muted);
  cursor: default;
}

.v2-card-foot {
  display: grid;
  gap: 6px;
  color: var(--v2-muted);
  font-size: 12px;
  line-height: 1.35;
}

.v2-path {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
}

.v2-load {
  display: flex;
  justify-content: center;
  margin: 22px 0 0;
}

.v2-load[hidden] {
  display: none;
}

.v2-empty {
  grid-column: 1 / -1;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  background: #fff;
  padding: 36px;
  color: var(--v2-muted);
}

.v2-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  background: #111827;
  color: #fff;
  border-radius: 8px;
  padding: 11px 13px;
  box-shadow: var(--v2-shadow);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .16s ease, transform .16s ease;
  pointer-events: none;
  font-size: 13px;
  font-weight: 800;
}

.v2-toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .v2-toolbar {
    grid-template-columns: 1fr;
  }

  .v2-featured {
    grid-template-columns: 1fr;
  }

  .v2-featured .v2-card:first-child {
    grid-row: auto;
  }

  .v2-stats {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }
}

@media (max-width: 760px) {
  .v2-header-inner,
  .v2-toolbar,
  .v2-main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .v2-topline,
  .v2-status {
    display: grid;
    justify-content: stretch;
  }

  .v2-proof {
    justify-content: flex-start;
  }

  .v2-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .v2-actions {
    grid-template-columns: 1fr;
  }
}
