:root {
  /* Color Palette - Modern Tech Style */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --accent: #10b981;
  --accent-hover: #059669;
  --accent-light: #ecfdf5;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  --border-light: #e2e8f0;
  --border-focus: #3b82f6;
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.05) 0px, transparent 50%);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

/* Header & Navigation */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

.topbar-inner {
  display: flex;
  height: 64px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-size: 1.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.025em;
}

.detail-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  max-width: min(52vw, 420px);
  overflow: hidden;
}

.detail-brand span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.detail-brand-logo {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  object-fit: cover;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: #fff;
  -webkit-text-fill-color: initial;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
}

.nav-link:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-button {
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.header-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.header-brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
}

.header-brand-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.header-brand-name,
.header-brand-sub {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  letter-spacing: 0;
}

.header-brand-name {
  font-size: 17px;
  font-weight: 820;
  line-height: 1.12;
}

.header-brand-sub {
  font-size: 11px;
  font-weight: 650;
  line-height: 1.15;
}

.header-brand-light .header-brand-mark {
  background: linear-gradient(135deg, #2f7cff 0%, #14b8a6 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(47, 124, 255, 0.18);
}

.header-brand-light .header-brand-name {
  color: #111827;
}

.header-brand-light .header-brand-sub {
  color: #6b7280;
}

.header-brand-dark .header-brand-mark {
  background: linear-gradient(135deg, #f8fafc 0%, #d7f7ee 100%);
  color: #171a1c;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.header-brand-dark .header-brand-name {
  color: #f5f6f7;
}

.header-brand-dark .header-brand-sub {
  color: #9aa3a8;
}

/* Hero Section */
.hero {
  padding: 4rem 0 3rem;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.trust-badges {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

.trust-item svg {
  width: 18px;
  height: 18px;
}

/* Toolbar & Search */
.toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 2rem;
  padding-top: 2rem;
}

.toolbar h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 800;
}

.toolbar p {
  margin: 0;
  color: var(--text-muted);
}

.search-container {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.search-form {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-card);
  padding: 0.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
}

.search-form input {
  flex: 1;
  border: none;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  outline: none;
  background: transparent;
}

/* Grid & Cards */
.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  padding-bottom: 4rem;
}

.software-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.software-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.card-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 5;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
}

.badge-hot { background: var(--danger); }
.badge-new { background: var(--primary); }

.software-cover-wrapper {
  height: 180px;
  overflow: hidden;
  position: relative;
}

.software-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-cover {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-light), #e0e7ff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 800;
  font-size: 1.5rem;
}

.software-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.software-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.software-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
}

.version-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-sm);
}

.software-summary {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.software-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* Buttons */
.btn, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  border: 1px solid transparent;
  gap: 0.5rem;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-primary, .button-primary {
  background: var(--primary);
  color: #fff !important;
  box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}

.btn-primary:hover, .button-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.23);
}

.btn-secondary, .button-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-light);
}

.btn-secondary:hover, .button-secondary:hover {
  background: var(--bg-main);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-full, .button-wide {
  width: 100%;
}

/* Admin Specific */
.table-shell {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: auto;
  margin-bottom: 2rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

.admin-table th {
  text-align: left;
  padding: 1rem;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.875rem;
}

.table-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.table-link {
  color: var(--primary);
  font-weight: 600;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
}

.admin-badge-hot {
  background: #fef2f2;
  color: #dc2626;
}

.link-button {
  background: none;
  border: none;
  padding: 0;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
}

.inline-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.form-shell, .login-card {
  background: var(--bg-card);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
}

.form-help {
  margin-top: -0.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-card {
  width: 100%;
  max-width: 450px;
}

.software-form, .login-form {
  display: grid;
  gap: 1.5rem;
}

.software-form {
  grid-template-columns: repeat(2, 1fr);
}

.software-form label, .login-form label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.software-form label span, .login-form label span, .choice-field legend {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

.choice-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-field legend {
  margin-bottom: 0.5rem;
  padding: 0;
}

.choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.choice-chip {
  flex-direction: row !important;
  align-items: center;
  gap: 0.45rem !important;
  min-height: 38px;
  padding: 0 0.75rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
}

.choice-chip:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.choice-chip input {
  width: auto;
  margin: 0;
}

.software-picker {
  display: grid;
  gap: 1rem;
  position: relative;
}

.software-picker-trigger {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.software-picker-trigger:hover,
.software-picker.is-open .software-picker-trigger {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.software-picker-trigger::after {
  content: "▾";
  position: absolute;
  right: 1rem;
  top: 1rem;
  color: var(--text-muted);
}

.software-picker.is-open .software-picker-trigger::after {
  content: "▴";
}

.software-picker-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
}

.software-picker-search {
  display: grid !important;
  gap: 0.5rem !important;
}

.software-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.software-picker-head strong {
  font-size: 0.9rem;
}

.software-picker-head span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.software-picker-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  padding-right: 1.5rem;
}

.software-picker-tag,
.software-picker-empty {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
}

.software-picker-tag {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: var(--primary);
  cursor: pointer;
}

.software-picker-tag::after {
  content: "×";
  margin-left: 0.5rem;
  font-weight: 700;
}

.software-picker-empty {
  border: 1px dashed var(--border-light);
  color: var(--text-muted);
}

.software-picker-list {
  display: grid;
  gap: 0.75rem;
  max-height: 320px;
  overflow: auto;
  padding-right: 0.25rem;
}

.software-picker-option {
  display: flex !important;
  align-items: flex-start;
  gap: 0.85rem !important;
  padding: 0.95rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.software-picker-option[hidden] {
  display: none !important;
}

.software-picker-option:hover {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-sm);
}

.software-picker-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
}

.software-picker-option input {
  width: auto;
  margin-top: 0.15rem;
}

.software-picker-option-body {
  display: grid;
  gap: 0.3rem;
}

.software-picker-option-body strong {
  font-size: 0.95rem;
  color: var(--text-main);
}

.software-picker-option-body span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.description-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ai-generate-button {
  color: var(--primary);
  font-size: 0.875rem;
}

.ai-generate-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.ai-status {
  min-height: 1.25rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.ai-status[data-type="success"] {
  color: var(--accent-hover);
}

.ai-status[data-type="error"] {
  color: var(--danger);
}

input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="search"], input[type="number"], textarea {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  width: 100%;
  transition: border-color 0.2s;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.full-row {
  grid-column: 1 / -1;
}

.checkbox-row {
  flex-direction: row !important;
  align-items: center;
}

.checkbox-row input {
  width: auto;
}

.flash, .error {
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.flash {
  background: var(--accent-light);
  color: var(--accent-hover);
  border: 1px solid var(--accent);
}

.error {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid var(--danger);
}

/* Detail Page Layout */
.detail-container {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.detail-main {
  background: var(--bg-card);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.back-link:hover {
  color: var(--primary);
}

.detail-title-section h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
}

.detail-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.detail-title-icon {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  object-fit: cover;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.detail-lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.detail-cover-large {
  width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-md);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

.description {
  line-height: 1.8;
  color: #334155;
}

/* Markdown Styles */
.markdown-body h1, .markdown-body h2, .markdown-body h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.markdown-body h2 { font-size: 1.5rem; border-bottom: 1px solid var(--border-light); padding-bottom: 0.5rem; }
.markdown-body h3 { font-size: 1.25rem; }

.markdown-body p {
  margin-bottom: 1rem;
}

.markdown-body ul, .markdown-body ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.markdown-body li {
  margin-bottom: 0.5rem;
}

.markdown-body code {
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
}

.markdown-body pre {
  background: #1e293b;
  color: #f8fafc;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  overflow: auto;
  margin-bottom: 1.5rem;
}

.markdown-body pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.markdown-body blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-style: italic;
}

.markdown-body img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin: 1rem 0;
}

.sidebar-panel {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 100px;
}

.specs-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.spec-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.spec-value {
  font-size: 0.875rem;
  font-weight: 700;
}

.detail-disclaimer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.7;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
}

.empty-state h2 {
  font-size: 1.5rem;
  color: var(--text-muted);
}

.site-footer {
  width: min(1200px, calc(100% - 40px));
  margin: 28px auto 22px;
  padding: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.site-footer a:hover {
  color: var(--primary);
}

.police-beian-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.police-beian-link img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex: 0 0 auto;
}

.info-page {
  padding: 4rem 0 5rem;
}

.info-hero {
  max-width: 820px;
  margin: 0 auto 2rem;
  text-align: center;
}

.info-hero h1 {
  margin: 0.75rem 0 1rem;
  font-size: 2.5rem;
  line-height: 1.2;
  color: var(--text-main);
}

.info-hero p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.9;
}

.info-content {
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

.info-section {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-light);
}

.info-section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  color: var(--text-main);
}

.info-section p {
  margin: 0.55rem 0 0;
  color: var(--text-muted);
  line-height: 1.9;
}

/* Responsive */
@media (max-width: 1024px) {
  .detail-container {
    grid-template-columns: 1fr;
  }
  .sidebar-panel {
    position: static;
  }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2.25rem; }
  .software-grid { grid-template-columns: 1fr; }
  .hero { padding: 3rem 0 2rem; }
  .detail-main { padding: 1.5rem; }
  .detail-title-section h1 { font-size: 1.75rem; }
  .detail-title-row { align-items: flex-start; }
  .detail-title-icon {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }
  .software-form { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; align-items: flex-start; }
}

/* 软件工具库首页样式 */
.home-body {
  min-height: 100vh;
  background:
    linear-gradient(rgba(226, 232, 240, 0.42) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 232, 240, 0.42) 1px, transparent 1px),
    radial-gradient(circle at 8% 18%, rgba(125, 211, 252, 0.34), transparent 24%),
    radial-gradient(circle at 84% 14%, rgba(196, 181, 253, 0.34), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #f4f8ff 48%, #ffffff 100%);
  background-size: 72px 72px, 72px 72px, auto, auto, auto;
}

.home-nav {
  position: sticky;
  top: 0;
  z-index: 120;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(18px);
}

.home-nav-inner {
  width: min(1460px, calc(100% - 64px));
  height: 76px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 34px;
}

.home-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #111827;
  font-size: 26px;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.home-logo-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2f7cff 0%, #7c3cff 100%);
  color: transparent;
  position: relative;
}

.home-logo-mark::before {
  content: "M";
  color: #fff;
  font-size: 28px;
  font-weight: 950;
  line-height: 1;
}

.home-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.home-menu a {
  position: relative;
  color: #0f172a;
  font-size: 15px;
  font-weight: 650;
  white-space: nowrap;
}

.home-menu a.active {
  color: #1463ff;
}

.home-menu a.active:not(.home-filter-link)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -27px;
  height: 3px;
  border-radius: 999px;
  background: #1463ff;
}

.home-menu a.home-filter-link {
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
}

.home-menu a.home-filter-link.active {
  border-color: #d7e4ff;
  background: #eef5ff;
  color: #1463ff;
}

.home-nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.home-moon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #0f172a;
}

.home-moon svg,
.home-mini-search svg,
.home-search svg,
.home-section-head svg {
  width: 18px;
  height: 18px;
}

.home-mini-search {
  width: 206px;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid #dce5f2;
  border-radius: 999px;
  background: #fff;
  color: #718096;
}

.home-mini-search input {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 14px;
  box-shadow: none;
}

.home-favorite {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1673ff 0%, #075de8 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 750;
  box-shadow: 0 12px 24px rgba(22, 115, 255, 0.25);
}

.home-hero {
  position: relative;
  overflow: hidden;
  min-height: 440px;
  padding: 40px 20px 36px;
}

.home-hero-inner {
  position: relative;
  z-index: 2;
  width: min(860px, 100%);
  margin: 0 auto;
  text-align: center;
}

.home-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 8px 16px;
  border: 1px solid #d7e4ff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #1463ff;
  font-weight: 750;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.08);
}

.home-pill svg {
  width: 16px;
  height: 16px;
}

.home-hero h1 {
  margin: 0 0 18px;
  color: #111c35;
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.home-hero p {
  margin: 0 auto 30px;
  color: #4b5872;
  font-size: 18px;
  line-height: 1.8;
}

.home-search {
  width: min(760px, 100%);
  height: 66px;
  margin: 0 auto 26px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 0 14px 0 24px;
  border: 1px solid #dbe5f3;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 50px rgba(38, 70, 118, 0.14);
  color: #5f6f89;
}

.home-search input {
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  color: #111827;
  font-size: 16px;
}

.home-search button {
  min-width: 84px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #1673ff 0%, #075de8 100%);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(22, 115, 255, 0.25);
  cursor: pointer;
}

.home-categories {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.home-categories a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 20px;
  border: 1px solid #dce5f2;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #1f2937;
  font-weight: 650;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.home-categories a.active {
  border-color: #1268ff;
  background: #1268ff;
  color: #fff;
  box-shadow: 0 14px 24px rgba(18, 104, 255, 0.22);
}

.home-float {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.46);
  color: #4f83ff;
  font-weight: 900;
  box-shadow: inset 0 0 28px rgba(255, 255, 255, 0.72), 0 24px 56px rgba(70, 130, 210, 0.16);
  transform: rotate(-13deg);
}

.home-float-one {
  left: 8%;
  top: 80px;
  width: 78px;
  height: 78px;
  color: #88cafa;
  font-size: 34px;
}

.home-float-two {
  left: 16%;
  top: 205px;
  width: 92px;
  height: 82px;
  color: #58aaf4;
  font-size: 26px;
  transform: rotate(-10deg);
}

.home-float-three {
  right: 9%;
  top: 90px;
  width: 98px;
  height: 92px;
  color: #6383ff;
  font-size: 42px;
  transform: rotate(16deg);
}

.home-float-four {
  right: 12%;
  top: 285px;
  width: 92px;
  height: 70px;
  color: #f37cd6;
  font-size: 36px;
  transform: rotate(16deg);
}

.home-section {
  width: min(1360px, calc(100% - 72px));
  margin: 0 auto;
  padding-bottom: 44px;
}

.home-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 22px;
}

.home-section-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #111827;
  font-size: 20px;
  font-weight: 850;
}

.home-hot-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 70%, #ffcc4d 0 18%, #ff7a2f 38%, #ff335c 70%);
  box-shadow: 0 8px 18px rgba(255, 81, 80, 0.25);
}

.home-section-head a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #1268ff;
  font-weight: 750;
}

.home-tool-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 26px;
}

.home-tool-card {
  min-height: 238px;
  border: 1px solid rgba(220, 229, 242, 0.9);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 44px rgba(33, 56, 95, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.home-tool-card:hover {
  transform: translateY(-5px);
  border-color: rgba(22, 115, 255, 0.32);
  box-shadow: 0 24px 58px rgba(33, 56, 95, 0.13);
}

.home-tool-link {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 32px 26px 24px;
}

.home-tool-icon,
.home-tool-cover {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  margin-bottom: 24px;
  object-fit: cover;
}

.home-tool-icon {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ff3b63 0%, #ff6d4f 100%);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 12px 22px rgba(255, 59, 99, 0.24);
}

.home-tool-card:nth-child(2n) .home-tool-icon {
  background: linear-gradient(135deg, #20c56b 0%, #17a55c 100%);
  box-shadow: 0 12px 22px rgba(32, 197, 107, 0.24);
}

.home-tool-card:nth-child(3n) .home-tool-icon {
  background: linear-gradient(135deg, #7a4cff 0%, #572fe8 100%);
  box-shadow: 0 12px 22px rgba(122, 76, 255, 0.24);
}

.home-tool-card:nth-child(4n) .home-tool-icon {
  background: linear-gradient(135deg, #ff9c2a 0%, #ff7a18 100%);
  box-shadow: 0 12px 22px rgba(255, 156, 42, 0.24);
}

.home-tool-card:nth-child(5n) .home-tool-icon {
  background: linear-gradient(135deg, #2c96ff 0%, #1573e6 100%);
  box-shadow: 0 12px 22px rgba(44, 150, 255, 0.24);
}

.home-tool-card h3 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 17px;
  font-weight: 850;
}

.home-tool-card p {
  min-height: 48px;
  margin: 0 0 18px;
  color: #4b5872;
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-tool-tag {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef5ff;
  color: #1268ff;
  font-size: 12px;
  font-weight: 750;
}

.home-tool-card:nth-child(2n) .home-tool-tag {
  background: #eaf9ef;
  color: #139354;
}

.home-tool-card:nth-child(3n) .home-tool-tag {
  background: #f2eaff;
  color: #6f3df5;
}

.home-tool-card:nth-child(4n) .home-tool-tag {
  background: #fff2e7;
  color: #f07916;
}

.home-empty {
  padding: 60px 20px;
  border: 1px solid #dce5f2;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  text-align: center;
  box-shadow: 0 18px 44px rgba(33, 56, 95, 0.08);
}

.home-stats {
  margin-top: 34px;
  min-height: 124px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.35fr;
  align-items: center;
  gap: 24px;
  padding: 26px 34px;
  border: 1px solid #dce5f2;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 44px rgba(33, 56, 95, 0.08);
}

.home-feature {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-right: 24px;
  border-right: 1px solid #dce5f2;
}

.home-feature strong {
  display: block;
  margin-bottom: 4px;
  color: #111827;
  font-size: 16px;
}

.home-feature p {
  margin: 0;
  color: #4b5872;
  font-size: 14px;
  line-height: 1.55;
}

.home-feature-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.home-feature-icon.shield {
  clip-path: polygon(50% 0, 88% 16%, 82% 72%, 50% 100%, 18% 72%, 12% 16%);
  background: linear-gradient(135deg, #6d8cff, #366dff);
}

.home-feature-icon.bolt {
  color: #35bdef;
  font-size: 40px;
}

.home-feature-icon.heart {
  color: #ef477b;
  font-size: 42px;
}

.home-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.home-metrics div {
  text-align: center;
}

.home-metrics div + div {
  border-left: 1px solid #dce5f2;
}

.home-metrics strong {
  display: block;
  color: #1268ff;
  font-size: 28px;
  line-height: 1.2;
}

.home-metrics span {
  color: #344054;
  font-size: 14px;
}

@media (max-width: 1180px) {
  .home-nav-inner {
    grid-template-columns: auto 1fr;
  }

  .home-menu {
    display: none;
  }

  .home-nav-actions {
    justify-content: flex-end;
  }

  .home-tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-feature {
    border-right: 0;
  }

  .home-metrics {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .home-nav-inner {
    width: min(100% - 28px, 1460px);
    height: auto;
    min-height: 68px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
  }

  .home-logo {
    font-size: 22px;
  }

  .home-nav-actions {
    width: 100%;
  }

  .home-mini-search {
    flex: 1;
    width: auto;
  }

  .home-favorite {
    padding: 0 14px;
  }

  .home-hero {
    min-height: 0;
    padding: 40px 16px 30px;
  }

  .home-hero p br {
    display: none;
  }

  .home-search {
    height: auto;
    grid-template-columns: auto 1fr;
    padding: 14px;
  }

  .home-search button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .home-float {
    display: none;
  }

  .home-section {
    width: min(100% - 28px, 1360px);
  }

  .home-section-head {
    align-items: flex-start;
    gap: 12px;
  }

  .home-tool-grid,
  .home-stats {
    grid-template-columns: 1fr;
  }

  .home-tool-link {
    padding: 24px;
  }

  .home-metrics {
    grid-template-columns: 1fr;
  }

  .home-metrics div + div {
    border-left: 0;
    border-top: 1px solid #dce5f2;
    padding-top: 14px;
  }
}

/* Softer editorial home variant */
.home-body {
  background:
    radial-gradient(circle at 18% 12%, rgba(183, 226, 221, 0.52), transparent 28%),
    radial-gradient(circle at 82% 6%, rgba(226, 216, 244, 0.52), transparent 26%),
    radial-gradient(circle at 54% 55%, rgba(255, 241, 214, 0.45), transparent 32%),
    linear-gradient(180deg, #fbfdfc 0%, #f6faf8 46%, #fbfcff 100%);
  color: #19211f;
}

.home-nav {
  border-bottom-color: rgba(216, 226, 222, 0.72);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.home-logo {
  color: #17201d;
}

.home-logo-mark {
  background: linear-gradient(135deg, #8bbcb3 0%, #9a96cf 100%);
  box-shadow: 0 12px 24px rgba(139, 188, 179, 0.22);
}

.home-menu a {
  color: #40514c;
}

.home-menu a.active {
  color: #527f76;
}

.home-menu a.active:not(.home-filter-link)::after {
  background: #88b8ae;
}

.home-menu a.home-filter-link.active {
  border-color: rgba(154, 184, 177, 0.42);
  background: #e6f1ee;
  color: #426e65;
}

.home-mini-search {
  border-color: rgba(198, 213, 208, 0.8);
  background: rgba(255, 255, 255, 0.7);
}

.home-favorite {
  background: #6f9e94;
  color: #fff;
  box-shadow: 0 14px 28px rgba(111, 158, 148, 0.22);
}

.home-hero {
  min-height: 520px;
  padding-top: 72px;
}

.home-hero-inner {
  width: min(920px, 100%);
}

.home-pill {
  border-color: rgba(154, 184, 177, 0.42);
  background: rgba(255, 255, 255, 0.62);
  color: #547f76;
  box-shadow: none;
}

.home-hero h1 {
  color: #17201d;
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.home-hero p {
  max-width: 680px;
  color: #63736f;
  font-size: 19px;
}

.home-search {
  width: min(820px, 100%);
  height: 70px;
  border-color: rgba(198, 213, 208, 0.72);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 24px 64px rgba(71, 92, 88, 0.1);
}

.home-search button {
  background: #6f9e94;
  box-shadow: none;
}

.home-categories {
  gap: 12px;
}

.home-categories a {
  min-height: 38px;
  border-color: rgba(198, 213, 208, 0.72);
  background: rgba(255, 255, 255, 0.48);
  color: #52645f;
  box-shadow: none;
}

.home-categories a.active {
  border-color: #7faea4;
  background: #e6f1ee;
  color: #426e65;
  box-shadow: none;
}

.home-hero-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  color: #6d7d79;
  font-size: 15px;
}

.home-hero-cta a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 20px;
  border-radius: 999px;
  background: #17201d;
  color: #fff;
  font-weight: 750;
}

.home-float {
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.42);
  color: #7a9f98;
  font-size: 18px;
  box-shadow: 0 24px 60px rgba(83, 117, 110, 0.1);
}

.home-float-one {
  left: 9%;
  top: 104px;
  color: #8fbab1;
}

.home-float-two {
  left: 13%;
  top: 300px;
  color: #9ba9cf;
}

.home-float-three {
  right: 10%;
  top: 128px;
  color: #9c98c7;
}

.home-float-four {
  right: 13%;
  top: 330px;
  color: #d0a6b8;
}

.home-section {
  width: min(1280px, calc(100% - 88px));
  padding-bottom: 72px;
}

.home-section-head {
  margin-bottom: 34px;
}

.home-section-head h2 {
  color: #17201d;
  font-size: 24px;
}

.home-section-head p {
  margin: 8px 0 0;
  color: #6a7a76;
  font-size: 15px;
}

.home-section-head a {
  color: #557f77;
}

.home-hot-icon {
  display: none;
}

.home-tool-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  align-items: start;
}

.home-tool-card {
  min-height: 300px;
  border-color: rgba(213, 225, 221, 0.82);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 22px 52px rgba(56, 76, 72, 0.08);
  backdrop-filter: blur(18px);
}

.home-tool-card:nth-child(3n + 2) {
  margin-top: 34px;
}

.home-tool-card:nth-child(3n) {
  margin-top: 14px;
}

.home-tool-card:hover {
  transform: translateY(-6px) rotate(-0.2deg);
  border-color: rgba(139, 188, 179, 0.64);
  box-shadow: 0 30px 70px rgba(56, 76, 72, 0.12);
}

.home-tool-link {
  padding: 30px;
}

.home-tool-icon,
.home-tool-cover {
  margin-bottom: 18px;
}

.home-tool-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: #e6f1ee;
  color: #507d74;
  font-size: 15px;
  box-shadow: none;
}

.home-tool-card:nth-child(2n) .home-tool-icon,
.home-tool-card:nth-child(3n) .home-tool-icon,
.home-tool-card:nth-child(4n) .home-tool-icon,
.home-tool-card:nth-child(5n) .home-tool-icon {
  background: #f1ece2;
  color: #8b7654;
  box-shadow: none;
}

.home-tool-tag {
  order: -1;
  margin: 0 0 18px;
  background: rgba(231, 240, 237, 0.78);
  color: #557f77;
}

.home-tool-card:nth-child(2n) .home-tool-tag,
.home-tool-card:nth-child(3n) .home-tool-tag,
.home-tool-card:nth-child(4n) .home-tool-tag {
  background: rgba(242, 236, 225, 0.82);
  color: #8b7654;
}

.home-tool-card h3 {
  margin-bottom: 10px;
  color: #17201d;
  font-size: 21px;
}

.home-tool-card p {
  min-height: auto;
  margin-bottom: 16px;
  color: #62716d;
  font-size: 15px;
  line-height: 1.75;
  -webkit-line-clamp: 3;
}

.home-tool-example {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(213, 225, 221, 0.72);
  color: #8a7770;
  font-size: 13px;
  line-height: 1.65;
}

.home-empty {
  border-color: rgba(213, 225, 221, 0.82);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 22px 52px rgba(56, 76, 72, 0.08);
}

.home-stats {
  margin-top: 60px;
  border-color: rgba(213, 225, 221, 0.82);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 22px 52px rgba(56, 76, 72, 0.08);
}

.home-feature {
  border-right-color: rgba(213, 225, 221, 0.82);
}

.home-feature strong,
.home-bottom-cta h2 {
  color: #17201d;
}

.home-feature p,
.home-bottom-cta p {
  color: #687873;
}

.home-feature-icon.shield {
  background: #89b6ad;
}

.home-feature-icon.bolt {
  color: #9ba9cf;
}

.home-feature-icon.heart {
  color: #d0a6b8;
}

.home-metrics strong {
  color: #557f77;
}

.home-bottom-cta {
  margin-top: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 38px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(229, 241, 237, 0.86), rgba(246, 239, 226, 0.76));
  border: 1px solid rgba(213, 225, 221, 0.82);
}

.home-bottom-cta h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.home-bottom-cta p {
  margin: 0;
}

.home-bottom-cta a {
  flex: 0 0 auto;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  padding: 0 22px;
  border-radius: 999px;
  background: #17201d;
  color: #fff;
  font-weight: 780;
}

@media (max-width: 980px) {
  .home-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-tool-card:nth-child(n) {
    margin-top: 0;
  }

  .home-bottom-cta {
    display: grid;
  }
}

@media (max-width: 760px) {
  .home-section {
    width: min(100% - 28px, 1280px);
  }

  .home-hero-cta {
    display: grid;
  }

  .home-tool-grid {
    grid-template-columns: 1fr;
  }

  .home-bottom-cta {
    padding: 26px;
  }
}

/* Fine-tuning pass: softer hierarchy and richer card details */
.home-body {
  background:
    radial-gradient(circle at 12% 12%, rgba(198, 226, 219, 0.5), transparent 26%),
    radial-gradient(circle at 80% 8%, rgba(224, 214, 238, 0.44), transparent 24%),
    radial-gradient(circle at 62% 58%, rgba(250, 237, 211, 0.38), transparent 31%),
    linear-gradient(180deg, #fbfdfb 0%, #f7fbf8 44%, #fbfcfb 100%);
}

.home-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(116, 136, 128, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(116, 136, 128, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.5) 44%, transparent 86%);
}

.home-nav {
  background: rgba(255, 255, 255, 0.68);
  border-bottom: 1px solid rgba(199, 214, 209, 0.46);
}

.home-nav-inner {
  height: 72px;
}

.home-logo {
  gap: 9px;
  font-size: 24px;
}

.home-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 11px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.36), transparent 42%),
    linear-gradient(135deg, #7eaaa1 0%, #9492c2 100%);
}

.home-menu {
  gap: 24px;
}

.home-menu a {
  color: rgba(47, 64, 59, 0.82);
  font-size: 14px;
  font-weight: 620;
}

.home-mini-search {
  height: 40px;
  border-color: rgba(195, 211, 205, 0.58);
  background: rgba(255, 255, 255, 0.58);
}

.home-favorite {
  min-height: 40px;
  border: 1px solid rgba(91, 130, 121, 0.16);
  background: rgba(87, 128, 119, 0.94);
  box-shadow: 0 10px 24px rgba(89, 126, 118, 0.16);
}

.home-hero {
  padding-top: 78px;
  padding-bottom: 58px;
}

.home-hero::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 112px;
  width: min(900px, 80vw);
  height: 360px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.72), transparent 68%);
  pointer-events: none;
}

.home-hero-note {
  margin-bottom: 14px;
  color: #8a9a96;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.home-pill {
  margin-bottom: 12px;
  padding: 7px 14px;
  border-color: rgba(156, 185, 178, 0.34);
  background: rgba(255, 255, 255, 0.54);
  color: #628c83;
  font-size: 14px;
}

.home-hero h1 {
  margin-bottom: 20px;
  color: #18221f;
  text-wrap: balance;
}

.home-hero p {
  color: #667772;
  text-wrap: balance;
}

.home-search {
  border: 1px solid rgba(194, 211, 205, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.7));
  box-shadow:
    0 26px 70px rgba(65, 84, 80, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.home-search button {
  border: 1px solid rgba(63, 102, 93, 0.18);
  background:
    linear-gradient(180deg, rgba(119, 162, 153, 0.98), rgba(92, 137, 127, 0.98));
  box-shadow: 0 12px 24px rgba(89, 126, 118, 0.15);
}

.home-categories a {
  border-color: rgba(194, 211, 205, 0.5);
  background: rgba(255, 255, 255, 0.42);
  color: #61736e;
  font-size: 14px;
}

.home-categories a:hover {
  background: rgba(255, 255, 255, 0.72);
  color: #3f655d;
}

.home-hero-cta {
  margin-top: 28px;
}

.home-hero-cta a {
  min-height: 46px;
  padding: 0 22px;
  background: #1c2925;
  box-shadow: 0 14px 30px rgba(28, 41, 37, 0.14);
}

.home-float {
  opacity: 0.56;
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow:
    0 22px 60px rgba(83, 117, 110, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.home-section {
  padding-top: 10px;
}

.home-section-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  color: #8a9a96;
  font-size: 13px;
  font-weight: 720;
  letter-spacing: 0.08em;
}

.home-section-head {
  align-items: flex-end;
}

.home-section-head h2 {
  font-size: 28px;
  letter-spacing: -0.02em;
}

.home-section-head p {
  max-width: 520px;
  line-height: 1.7;
}

.home-section-head a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #557f77;
}

.home-section-head a:hover {
  background: rgba(231, 240, 237, 0.72);
}

.home-tool-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  align-items: stretch;
  gap: 14px;
}

.home-tool-card {
  height: 100%;
  min-height: 82px;
  border: 1px solid rgba(205, 220, 215, 0.68);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.58));
  box-shadow:
    0 20px 55px rgba(54, 76, 70, 0.075),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
  position: relative;
  overflow: hidden;
}

.home-tool-card:nth-child(3n + 2),
.home-tool-card:nth-child(3n) {
  margin-top: 0;
}

.home-tool-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.92), transparent 28%),
    linear-gradient(135deg, rgba(135, 181, 171, 0.08), transparent 46%);
  opacity: 0.75;
  pointer-events: none;
}

.home-tool-card:hover {
  transform: translateY(-4px);
  border-color: rgba(134, 177, 168, 0.54);
  box-shadow:
    0 28px 70px rgba(54, 76, 70, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.home-tool-link {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  height: 100%;
  padding: 14px 16px;
}

.home-tool-icon,
.home-tool-cover {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  margin-bottom: 0;
}

.home-tool-icon {
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(123, 166, 156, 0.18);
  background:
    linear-gradient(180deg, rgba(239, 248, 245, 0.95), rgba(224, 239, 235, 0.95));
  color: #5d897f;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}

.home-tool-cover {
  object-fit: cover;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(213, 225, 221, 0.72);
}

.home-tool-brand {
  flex: 0 0 auto;
}

.home-tool-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
  align-content: center;
  flex: 1;
}

.home-tool-card h3 {
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.home-tool-subtitle {
  margin: 0;
  color: #8a9a96;
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.home-stats {
  padding: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.54));
  box-shadow:
    0 22px 60px rgba(54, 76, 70, 0.075),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.home-feature-icon {
  opacity: 0.9;
}

.home-bottom-cta {
  border-color: rgba(205, 220, 215, 0.68);
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.78), transparent 35%),
    linear-gradient(135deg, rgba(229, 241, 237, 0.76), rgba(247, 240, 228, 0.7));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.home-bottom-cta a {
  background: #1c2925;
  box-shadow: 0 14px 30px rgba(28, 41, 37, 0.14);
}

@media (max-width: 760px) {
  .home-section-head {
    display: grid;
  }

  .home-tool-card {
    min-height: 0;
  }

  .home-tool-card h3,
  .home-tool-card p,
  .home-tool-example {
    min-height: 0;
  }
}

/* Mobile polish: keep filters visible and prevent horizontal overflow. */
@media (max-width: 820px) {
  body {
    overflow-x: hidden;
  }

  .wrap {
    width: min(100% - 28px, 1200px);
  }

  .topbar-inner,
  .home-nav-inner {
    width: min(100% - 28px, 1460px);
  }

  .header-brand {
    gap: 8px;
  }

  .header-brand-mark {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    border-radius: 8px;
    font-size: 11px;
  }

  .header-brand-name {
    font-size: 15px;
  }

  .header-brand-sub {
    display: none;
  }

  .home-nav-inner {
    display: grid;
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
    gap: 12px;
    padding: 12px 0;
  }

  .home-logo {
    font-size: 22px;
  }

  .home-menu {
    display: flex;
    width: 100%;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 8px;
    scrollbar-width: none;
  }

  .home-menu::-webkit-scrollbar,
  .home-categories::-webkit-scrollbar {
    display: none;
  }

  .home-menu a {
    flex: 0 0 auto;
    font-size: 13px;
  }

  .home-menu a.active:not(.home-filter-link)::after {
    bottom: -8px;
  }

  .home-menu a.home-filter-link {
    padding: 7px 11px;
  }

  .home-nav-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .home-mini-search {
    width: auto;
    min-width: 0;
  }

  .home-favorite {
    min-width: max-content;
    padding: 0 14px;
  }

  .home-hero {
    min-height: 0;
    padding: 34px 14px 28px;
  }

  .home-hero h1 {
    font-size: 34px;
    line-height: 1.16;
  }

  .home-hero p {
    font-size: 16px;
    line-height: 1.7;
  }

  .home-search {
    height: auto;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
  }

  .home-search input {
    font-size: 15px;
  }

  .home-search button {
    grid-column: 1 / -1;
    width: 100%;
    height: 44px;
  }

  .home-categories {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 10px;
    width: 100%;
    overflow-x: auto;
    padding: 0 2px 8px;
  }

  .home-categories a {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 16px;
    font-size: 13px;
  }

  .home-section {
    width: min(100% - 28px, 1280px);
    padding-bottom: 44px;
  }

  .home-section-head {
    display: grid;
    gap: 12px;
    margin-bottom: 22px;
  }

  .home-section-head h2 {
    font-size: 24px;
  }

  .home-tool-grid,
  .home-stats {
    grid-template-columns: 1fr;
  }

  .home-tool-card {
    min-height: 0;
    border-radius: 20px;
  }

  .home-tool-link {
    padding: 16px;
  }

  .home-tool-card h3 {
    font-size: 14px;
  }

  .home-stats {
    margin-top: 34px;
    padding: 22px;
  }

  .home-feature {
    padding-right: 0;
    border-right: 0;
  }

  .home-bottom-cta {
    display: grid;
    padding: 24px;
    border-radius: 22px;
  }

  .home-bottom-cta a {
    width: 100%;
    justify-content: center;
  }

  .toolbar {
    align-items: stretch;
  }

  .toolbar .inline-actions,
  .form-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .form-shell,
  .login-card {
    padding: 1.25rem;
    border-radius: var(--radius-md);
  }

  .software-form {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  .choice-grid {
    gap: 0.5rem;
  }

  .choice-chip {
    min-height: 36px;
    padding: 0 0.65rem;
  }
}

@media (max-width: 430px) {
  .home-nav-actions {
    grid-template-columns: 1fr;
  }

  .home-favorite {
    width: 100%;
  }

  .home-hero h1 {
    font-size: 30px;
  }

  .home-pill,
  .home-hero-note {
    font-size: 12px;
  }

  .home-tool-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

/* Final homepage tool-card layout: compact cards with horizontal content. */
.home-tool-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
  gap: 14px !important;
  align-items: stretch !important;
}

.home-tool-card {
  min-height: 74px !important;
  height: auto !important;
  margin-top: 0 !important;
  border-radius: 8px !important;
}

.home-tool-link {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  min-height: 74px !important;
  height: 100% !important;
  padding: 12px 14px !important;
}

.home-tool-brand {
  display: inline-flex !important;
  flex: 0 0 38px !important;
  align-items: center !important;
  justify-content: center !important;
}

.home-tool-icon,
.home-tool-cover {
  width: 38px !important;
  height: 38px !important;
  flex: 0 0 38px !important;
  margin: 0 !important;
  border-radius: 10px !important;
}

.home-tool-meta {
  min-width: 0 !important;
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 3px !important;
}

.home-tool-card h3 {
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  color: #17201d !important;
  font-size: 14px !important;
  font-weight: 750 !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.home-tool-subtitle {
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  color: #7a8b86 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.home-tool-link > .home-tool-tag {
  align-self: center !important;
  margin: 0 0 0 auto !important;
}

.home-tool-link > h3 {
  flex: 1 1 auto !important;
}

@media (max-width: 820px) {
  .home-tool-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
  }
}

/* Category directory homepage */
.category-home {
  min-height: 100vh;
  background: #171a1c;
  color: #d7dbde;
}

.category-home .site-footer {
  width: min(1440px, calc(100% - 48px));
  border-top-color: rgba(255, 255, 255, 0.06);
  color: #879097;
}

.category-home .site-footer a:hover {
  color: #d7dbde;
}

.category-home::before {
  display: none;
}

.category-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: #2a2d2f;
}

.category-topbar-inner {
  width: min(1440px, calc(100% - 48px));
  height: 48px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr minmax(220px, 320px);
  align-items: center;
  gap: 24px;
}

.category-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #f5f6f7;
  font-size: 18px;
  font-weight: 800;
}

.category-logo-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f5f6f7;
  color: #202326;
  font-size: 15px;
}

.category-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.category-nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #b7bdc2;
  font-size: 14px;
  font-weight: 650;
}

.category-nav .site-icon {
  width: 16px;
  height: 16px;
}

.category-nav a.active,
.category-nav a:hover {
  color: #ffffff;
}

.category-search {
  height: 34px;
  display: grid;
  grid-template-columns: 1fr 38px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: #202326;
}

.category-search input {
  min-width: 0;
  height: 100%;
  padding: 0 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f5f6f7;
  line-height: 34px;
  box-shadow: none;
}

.category-search input::placeholder {
  color: #7f878d;
}

.category-search button {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #b7bdc2;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.category-shell {
  width: min(1440px, calc(100% - 48px));
  margin: 20px auto 64px;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
}

.category-sidebar {
  position: sticky;
  top: 68px;
  align-self: start;
  display: grid;
  gap: 2px;
  padding: 10px;
  border-radius: 8px;
  background: #2b2f32;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.category-side-link {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border-radius: 6px;
  color: #c8cdd1;
  font-size: 14px;
  font-weight: 650;
}

.category-side-link:hover,
.category-side-link.active {
  background: #363a3d;
  color: #ffffff;
}

.category-side-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #aeb5ba;
  flex: 0 0 18px;
}

.category-side-icon .site-icon {
  width: 17px;
  height: 17px;
}

.category-content {
  display: grid;
  gap: 16px;
  scroll-margin-top: 68px;
}

.category-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-radius: 8px;
  background: #25282a;
}

.category-page-head h1 {
  margin: 0 0 6px;
  color: #f5f6f7;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 820;
}

.category-page-head p {
  margin: 0;
  color: #8f979d;
  font-size: 14px;
}

.category-page-head > span {
  flex: 0 0 auto;
  color: #aeb5ba;
  font-size: 13px;
}

.category-section {
  position: relative;
  overflow: hidden;
  padding: 18px 16px 22px;
  border-radius: 8px;
  background: #2b2f32;
  scroll-margin-top: 68px;
}

.category-section.is-scroll-target,
.category-content.is-scroll-target .category-page-head {
  animation: category-target-pop 1.35s ease;
}

.category-section.is-scroll-target::before,
.category-section.is-scroll-target::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.category-section.is-scroll-target::before {
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(217, 75, 106, 0.2), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%);
  opacity: 0;
  animation: category-target-wash 1.35s ease;
}

.category-section.is-scroll-target::after {
  top: 12px;
  right: 10px;
  width: 4px;
  height: calc(100% - 24px);
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, #d94b6a, #f2b15f, transparent);
  box-shadow: 0 0 20px rgba(217, 75, 106, 0.55);
  opacity: 0;
  transform: translateY(-18px);
  animation: category-scroll-hint 1.35s ease;
}

@keyframes category-target-pop {
  0% {
    outline: 1px solid rgba(217, 75, 106, 0);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  }
  28% {
    outline: 1px solid rgba(217, 75, 106, 0.55);
    box-shadow:
      0 20px 48px rgba(0, 0, 0, 0.2),
      0 0 0 3px rgba(217, 75, 106, 0.12);
  }
  100% {
    outline: 1px solid rgba(217, 75, 106, 0);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  }
}

@keyframes category-target-wash {
  0% {
    opacity: 0;
    transform: translateX(-12px);
  }
  25%,
  58% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(12px);
  }
}

@keyframes category-scroll-hint {
  0% {
    opacity: 0;
    transform: translateY(-18px) scaleY(0.45);
  }
  25% {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
  72% {
    opacity: 0.9;
    transform: translateY(18px) scaleY(1);
  }
  100% {
    opacity: 0;
    transform: translateY(34px) scaleY(0.6);
  }
}

@media (prefers-reduced-motion: reduce) {
  .category-section.is-scroll-target,
  .category-content.is-scroll-target .category-page-head,
  .category-section.is-scroll-target::before,
  .category-section.is-scroll-target::after {
    animation: none;
  }

  .category-section.is-scroll-target {
    outline: 1px solid rgba(217, 75, 106, 0.55);
  }
}

.category-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.category-section-head h2 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #d7dbde;
  font-size: 18px;
  font-weight: 760;
}

.category-section-head h2 span {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  color: #8f979d;
}

.category-section-head h2 .site-icon {
  width: 20px;
  height: 20px;
}

.category-section-tabs {
  color: #8f979d;
  font-size: 13px;
}

.category-tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px 26px;
}

.category-tool-card {
  min-width: 0;
}

.category-tool-link {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: 7px;
  background: #343738;
  border: 1px solid rgba(255, 255, 255, 0.035);
}

.category-tool-link:hover {
  background: #3b3f41;
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.category-tool-logo {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border-radius: 9px;
  background: #202326;
  color: #d7dbde;
  font-size: 11px;
  font-weight: 800;
}

.category-tool-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-tool-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
  flex: 1;
}

.category-tool-copy strong {
  color: #dce0e3;
  font-size: 14px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-tool-copy small {
  color: #848c92;
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-tool-hot,
.site-hot-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(217, 75, 106, 0.16);
  color: #ff8da4;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.category-tool-hot {
  flex: 0 0 auto;
}

.category-empty {
  padding: 44px;
  border-radius: 8px;
  background: #2b2f32;
  text-align: center;
}

.category-empty h2 {
  margin: 0 0 8px;
  color: #f5f6f7;
}

.category-empty p {
  color: #8f979d;
}

.category-empty a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0 16px;
  border-radius: 6px;
  background: #d94b6a;
  color: #fff;
  font-weight: 700;
}

@media (max-width: 980px) {
  .category-topbar-inner {
    width: min(100% - 28px, 1440px);
    height: auto;
    min-height: 56px;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px 0;
  }

  .category-nav {
    overflow-x: auto;
  }

  .category-shell {
    width: min(100% - 28px, 1440px);
    grid-template-columns: 1fr;
  }

  .category-sidebar {
    position: static;
    display: flex;
    overflow-x: auto;
  }

  .category-side-link {
    flex: 0 0 auto;
  }
}

@media (max-width: 560px) {
  .category-tool-grid {
    grid-template-columns: 1fr;
  }

  .category-page-head,
  .category-section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Software detail page inspired by compact directory cards */
.site-detail-page {
  background: #171a1c;
  color: #d7dbde;
}

.site-detail-shell {
  width: min(1440px, calc(100% - 48px));
  margin: 18px auto 64px;
}

.site-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #879097;
  font-size: 13px;
}

.site-breadcrumb a {
  color: #aeb5ba;
}

.site-breadcrumb strong {
  overflow: hidden;
  color: #f5f6f7;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}

.site-detail-main {
  display: grid;
  gap: 16px;
}

.site-profile-card,
.site-content-card,
.site-side-card {
  border: 1px solid rgb(255 255 255 / 4.5%);
  border-radius: 8px;
  background: #2b2f32;
  box-shadow: 0 18px 40px rgb(0 0 0 / 18%);
}

.site-profile-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
}

.site-profile-logo {
  display: grid;
  overflow: hidden;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 14px;
  background: #202326;
  color: #d7dbde;
  font-weight: 800;
}

.site-profile-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-profile-copy h1 {
  margin: 0 0 8px;
  color: #f5f6f7;
  font-size: 26px;
  font-weight: 820;
  line-height: 1.2;
}

.site-profile-copy p {
  margin: 0 0 12px;
  color: #aeb5ba;
  line-height: 1.65;
}

.site-profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.site-profile-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #343738;
  color: #929aa0;
  font-size: 12px;
}

.site-profile-actions {
  display: grid;
  gap: 10px;
  min-width: 120px;
}

.site-action-primary,
.site-action-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 750;
}

.site-action-primary {
  background: #d94b6a;
  color: #fff;
}

.site-action-secondary {
  border: 1px solid rgb(255 255 255 / 6%);
  background: #343738;
  color: #d7dbde;
}

.site-content-card {
  padding: 20px;
}

.site-content-card > h2,
.site-side-card h3,
.site-section-title h2 {
  margin: 0;
  color: #f5f6f7;
  font-size: 18px;
}

.site-content-card > h2 {
  margin-bottom: 16px;
}

.site-markdown {
  color: #c8cdd1;
}

.site-markdown h1,
.site-markdown h2,
.site-markdown h3 {
  border-color: rgb(255 255 255 / 8%);
  color: #f5f6f7;
}

.site-markdown code {
  background: #202326;
  color: #f2b15f;
}

.site-markdown pre {
  background: #111416;
}

.site-markdown blockquote {
  border-left-color: #d94b6a;
  color: #aeb5ba;
}

.site-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.site-section-title a {
  color: #d94b6a;
  font-size: 13px;
  font-weight: 700;
}

.site-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.site-related-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgb(255 255 255 / 3.5%);
  border-radius: 7px;
  background: #343738;
}

.site-related-card strong {
  overflow: hidden;
  color: #e7eaec;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-related-card span {
  display: -webkit-box;
  overflow: hidden;
  color: #879097;
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.site-detail-sidebar {
  position: sticky;
  top: 68px;
  display: grid;
  gap: 16px;
}

.site-side-card {
  padding: 16px;
}

.site-side-card h3 {
  margin-bottom: 14px;
  font-size: 16px;
}

.site-side-specs {
  display: grid;
  gap: 12px;
  margin: 0;
}

.site-side-specs div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgb(255 255 255 / 6%);
}

.site-side-specs dt {
  color: #879097;
  font-size: 13px;
}

.site-side-specs dd {
  margin: 0;
  color: #d7dbde;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.site-side-note {
  margin: 0;
  color: #9aa2a8;
  font-size: 13px;
  line-height: 1.75;
}

@media (max-width: 980px) {
  .site-detail-shell {
    width: min(100% - 28px, 1440px);
  }

  .site-detail-layout {
    grid-template-columns: 1fr;
  }

  .site-detail-sidebar {
    position: static;
  }

  .site-profile-card {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .site-profile-logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
  }

  .site-profile-actions {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .site-profile-card {
    grid-template-columns: 1fr;
  }

  .site-profile-actions {
    grid-template-columns: 1fr;
  }

  .site-profile-copy h1 {
    font-size: 22px;
  }
}
