/* 源码吧 (mycode8.com) - Precision Developer Blueprint Design System */
:root {
  --brand: #0b63b8;
  --brand-dark: #084a8a;
  --brand-soft: #eff6ff;
  --accent: #e56b00;
  --accent-soft: #fff7ed;
  --teal: #0f766e;
  --teal-soft: #f0fdfa;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --bg: #f8fafc;
  --surface: #ffffff;
  --code-bg: #0f172a;
  --code-ink: #e2e8f0;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 6px 18px rgba(15, 23, 42, 0.07);
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

a:hover {
  color: var(--brand-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

code, pre, textarea.code-area {
  font-family: var(--font-mono);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header & Navigation */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo {
  height: 46px;
  width: auto;
  object-fit: contain;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.main-nav a {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--brand);
  background: var(--brand-soft);
}

.header-search {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 4px 2px 12px;
  width: 200px;
  flex-shrink: 0;
}

.header-search input {
  border: 0;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--ink);
  width: 100%;
  min-width: 0;
}

.header-search button {
  border: 0;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.header-search button:hover {
  background: var(--brand-dark);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

/* Mandatory Top Announcement Bar */
.site-notice {
  background: linear-gradient(90deg, #eff6ff 0%, #fff7ed 100%);
  border-bottom: 1px solid #dbeafe;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.55;
}

.site-notice-inner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
}

.notice-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

.notice-text {
  margin: 0;
  word-break: break-word;
}

/* Main wrapper */
.site-main {
  flex: 1 0 auto;
  padding-bottom: 48px;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #0b3b73 0%, #0b63b8 58%, #1d7ed6 100%);
  color: #fff;
  padding: 36px 0 38px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero-lead {
  margin: 0 0 18px;
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.88);
  max-width: 640px;
}

.hero-search {
  display: flex;
  gap: 8px;
  background: #fff;
  padding: 6px;
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(8, 34, 68, 0.24);
  max-width: 600px;
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--ink);
  background: transparent;
}

.hero-search button {
  border: 0;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
}

.hero-search button:hover {
  background: #cc5e00;
}

.hero-tags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}

.hero-tags span {
  color: rgba(255, 255, 255, 0.78);
}

.hero-tags a {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-tags a:hover {
  background: rgba(255, 255, 255, 0.25);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  padding: 16px;
  backdrop-filter: blur(4px);
}

.stat-num {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.85);
}

/* Section Helpers */
.section {
  margin-top: 32px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.section-title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--brand);
  display: inline-block;
}

.section-sub {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.section-more {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  white-space: nowrap;
}

/* Category Strip */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}

.cat-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  color: var(--brand);
}

.cat-card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.cat-card-desc {
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cat-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 3px 9px;
  border-radius: 999px;
  flex-shrink: 0;
}

/* Resource Cards Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.card-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  min-width: 0;
}

.item-card:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: var(--shadow-md);
}

.card-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  line-height: 1.4;
}

.badge-blue { background: var(--brand-soft); color: var(--brand); }
.badge-orange { background: var(--accent-soft); color: #c2410c; }
.badge-teal { background: var(--teal-soft); color: var(--teal); }
.badge-slate { background: #f1f5f9; color: #475569; }

.card-ver {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
}

.item-card h3 {
  margin: 0 0 8px;
  font-size: 15.5px;
  line-height: 1.45;
  font-weight: 600;
}

.item-card h3 a {
  color: var(--ink);
}

.item-card h3 a:hover {
  color: var(--brand);
}

.item-summary {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--muted);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  color: var(--muted);
}

.stack-pill {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink-2);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11.5px;
  max-width: 72%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Tool Cards */
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.tool-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.tool-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tool-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.tool-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
}

.tool-cta {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand);
}

/* Split Directory Panels */
.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 20px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.list-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-rows li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

.list-rows li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.list-row-main {
  min-width: 0;
  flex: 1;
}

.list-row-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-row-title:hover {
  color: var(--brand);
}

.list-row-sub {
  font-size: 12px;
  color: var(--muted);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Breadcrumb & Page Header */
.page-banner {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--brand);
}

.page-banner h1 {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.35;
}

.page-banner p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* Tag filter bar */
.tag-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.tag-pill {
  font-size: 12.5px;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 11px;
  border-radius: 999px;
}

.tag-pill:hover,
.tag-pill.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* Detail Layout */
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

.detail-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.meta-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 20px;
}

.meta-kv {
  font-size: 13px;
}

.meta-kv strong {
  color: var(--muted);
  font-weight: 500;
  display: block;
  font-size: 12px;
}

.meta-kv span {
  color: var(--ink);
  font-weight: 600;
  word-break: break-word;
}

.article-body {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.8;
}

.article-body h2 {
  font-size: 18px;
  color: var(--ink);
  margin: 24px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.article-body h3 {
  font-size: 15.5px;
  color: var(--ink);
  margin: 18px 0 8px;
}

.article-body ul, .article-body ol {
  padding-left: 20px;
  margin: 10px 0;
}

.article-body li {
  margin-bottom: 6px;
}

.article-body pre {
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.55;
  max-width: 100%;
}

.article-body code {
  background: #f1f5f9;
  color: #be123c;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 13px;
}

.article-body pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.callout {
  background: var(--brand-soft);
  border-left: 4px solid var(--brand);
  padding: 12px 15px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 16px 0;
  font-size: 13.5px;
  color: var(--ink-2);
}

.callout-warn {
  background: var(--accent-soft);
  border-left-color: var(--accent);
}

/* AI Prompt Box */
.ai-prompt-box {
  margin-top: 24px;
  border: 1px solid #bfdbfe;
  background: #f8fbff;
  border-radius: var(--radius);
  padding: 16px;
}

.ai-prompt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.ai-prompt-head h3 {
  margin: 0;
  font-size: 15px;
  color: var(--brand-dark);
}

.ai-prompt-text {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 13px;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  font-family: var(--font-mono);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  line-height: 1.3;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-dark);
  color: #fff;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: #cc5e00;
  color: #fff;
}

.btn-outline {
  background: var(--surface);
  color: var(--ink-2);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn-sm {
  padding: 5px 11px;
  font-size: 12.5px;
}

.btn-block {
  width: 100%;
}

/* Tool Workspace */
.tool-workspace {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.tool-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.tool-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field-group {
  margin-bottom: 14px;
}

.field-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}

.field-input, .field-select, .field-textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--ink);
  background: var(--surface);
  outline: none;
  font-family: var(--font-sans);
}

.field-textarea.code-area {
  font-family: var(--font-mono);
  font-size: 13px;
  min-height: 220px;
  resize: vertical;
  line-height: 1.5;
}

.field-input:focus, .field-select:focus, .field-textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 99, 184, 0.12);
}

.tool-output-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 13.5px;
  word-break: break-word;
}

.serp-preview {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.serp-url {
  font-size: 12px;
  color: #166534;
  margin-bottom: 2px;
  word-break: break-all;
}

.serp-title {
  font-size: 17px;
  color: #1d4ed8;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 4px;
}

.serp-desc {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
}

.status-msg {
  font-size: 12.5px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-top: 10px;
}

.status-ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.status-err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Pagination */
.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.pagination a, .pagination span {
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-2);
}

.pagination span.current {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 36px 0 24px;
  margin-top: auto;
  font-size: 13.5px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #1e293b;
}

.footer-brand {
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 8px;
}

.footer-col h4 {
  color: #fff;
  font-size: 14px;
  margin: 0 0 10px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 6px;
}

.footer-col a {
  color: #94a3b8;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: #94a3b8;
}

.footer-bottom a {
  color: #cbd5e1;
}

.footer-bottom a:hover {
  color: #fff;
}

/* Responsive Breakpoints (375px zero horizontal overflow guaranteed) */
@media (max-width: 1024px) {
  .header-search { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-grid { grid-template-columns: 1fr; }
  .detail-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 16px 14px;
    gap: 4px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 9px 12px; }
  .brand-logo { height: 40px; }
  .hero { padding: 26px 0 28px; }
  .hero h1 { font-size: 22px; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid, .card-grid-2, .card-grid-4, .tool-grid-2 { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .meta-table { grid-template-columns: 1fr; }
  .detail-main { padding: 18px 14px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-search { flex-direction: column; }
  .hero-search button { width: 100%; }
}
