:root {
  --ink: #172033;
  --muted: #697386;
  --paper: #f3f4f6;
  --blue: #1976ff;
  --cyan: #00a8d8;
  --orange: #ff9f1c;
  --red: #ff6b6b;
  --line: rgba(23, 32, 51, 0.08);
  --shadow: 0 14px 38px rgba(30, 48, 80, 0.08);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 100;
  transform: translateY(-150%);
  border-radius: 999px;
  padding: 10px 14px;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
}
.skip-link:focus { transform: translateY(0); }
:focus-visible {
  outline: 3px solid rgba(25, 118, 255, .35);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 72px;
  padding: 0 clamp(18px, 4vw, 52px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(23, 32, 51, 0.05);
  backdrop-filter: blur(16px);
}

.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; font-weight: 900; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; color: #fff; background: linear-gradient(135deg, #1681ff, #20b8ff); font-size: 14px; box-shadow: 0 8px 20px rgba(25, 118, 255, .22); }
.brand-text { white-space: nowrap; font-size: 18px; }
.nav { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); flex: 1 1 auto; min-width: 0; }
.nav a { color: #5b6475; font-size: 16px; font-weight: 750; white-space: nowrap; }
.nav a:hover, .nav .active { color: var(--blue); }
.login-link { flex: 0 0 auto; color: #5b6475; font-weight: 750; }
.login-link:hover { color: var(--blue); }

.hero {
  position: relative;
  display: grid;
  min-height: 470px;
  place-items: center;
  overflow: hidden;
  padding: 76px 18px 64px;
  background:
    radial-gradient(circle at 8% 86%, rgba(82, 130, 255, 0.15), transparent 30%),
    radial-gradient(circle at 88% 20%, rgba(18, 194, 233, 0.18), transparent 28%),
    linear-gradient(180deg, #fbfdff 0%, #f5f8ff 100%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 92%);
}
.hero-inner { position: relative; z-index: 1; width: min(920px, 100%); text-align: center; }
.eyebrow { margin: 0 0 14px; color: var(--blue); font-size: 13px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(42px, 6vw, 68px); line-height: 1.1; letter-spacing: 0; }
.hero h1::first-letter { color: var(--blue); }
.hero-copy { max-width: 760px; margin: 20px auto 0; color: #536071; font-size: 20px; line-height: 1.7; }
.hero-art { position: absolute; color: rgba(25, 118, 255, 0.18); font-size: 78px; font-weight: 900; }
.hero-art-left { left: 6vw; top: 35%; transform: rotate(-12deg); }
.hero-art-right { right: 7vw; top: 30%; transform: rotate(14deg); }
.mascot {
  position: absolute;
  left: 3vw;
  bottom: 82px;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 4px solid #dbeafe;
  border-radius: 20px;
  color: var(--blue);
  background: #fff;
  font-weight: 950;
  box-shadow: 0 14px 34px rgba(25, 118, 255, .16);
}

.search-box { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: min(920px, 100%); min-height: 78px; margin: 42px auto 0; padding: 10px 10px 10px 24px; border: 1px solid rgba(23, 32, 51, 0.1); border-radius: 999px; background: #fff; box-shadow: 0 18px 50px rgba(30, 48, 80, 0.12); }
.search-icon { color: #9aa5b5; font-size: 30px; }
.search-box input { min-width: 0; border: 0; outline: 0; color: var(--ink); font-size: 19px; }
.search-box input::placeholder { color: #98a2b3; }
.search-box button { min-width: 112px; min-height: 56px; border: 0; border-radius: 999px; color: #fff; background: var(--blue); font-weight: 900; cursor: pointer; box-shadow: 0 10px 22px rgba(25, 118, 255, .28); }
.hot-search { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 22px; margin-top: 24px; color: #8a94a6; font-size: 16px; }
.hot-search button {
  border: 0;
  padding: 0;
  color: var(--blue);
  background: transparent;
  cursor: pointer;
  font: inherit;
}
.search-results {
  display: grid;
  gap: 12px;
  width: min(920px, 100%);
  max-height: 420px;
  overflow: auto;
  margin: 18px auto 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 50px rgba(30, 48, 80, .12);
  text-align: left;
}
.search-result {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 14px;
  padding: 14px;
  border-radius: 12px;
  background: #f8fafc;
  transition: background .18s ease, transform .18s ease;
}
.search-result:hover {
  background: #eef5ff;
  transform: translateY(-1px);
}
.search-result strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 17px;
}
.search-result p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.search-type {
  width: fit-content;
  height: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--blue);
  background: #e8f1ff;
  font-size: 13px;
  font-weight: 900;
}
.search-empty {
  padding: 20px;
  color: var(--muted);
  text-align: center;
}

.section { padding: 48px clamp(18px, 4vw, 48px); }
.section.compact { padding-top: 0; }
.section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.section-title-row h2, .side-title h2 { margin: 0; color: var(--ink); font-size: clamp(28px, 3vw, 36px); letter-spacing: 0; }
.section-title-row a, .side-title a { color: #6b7280; font-weight: 750; }
.section-title-row a:hover, .side-title a:hover { color: var(--blue); }

.featured-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.feature-card {
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.feature-card::before { display: none; }
.feature-cover {
  min-height: 190px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 22px;
  color: #172033;
  background:
    radial-gradient(circle at 18% 20%, rgba(255,255,255,.9), transparent 22%),
    linear-gradient(135deg, #fff4d8, #dff7ff);
}
.feature-cover strong {
  font-size: 30px;
  line-height: 1.05;
  text-align: center;
}
.feature-cover small {
  color: #5b6475;
  font-weight: 850;
}
.feature-cover ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.feature-cover li {
  border-radius: 999px;
  padding: 4px 8px;
  color: #3d4758;
  background: rgba(255,255,255,.72);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.3;
}
.feature-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px 22px;
}
.feature-card span { width: fit-content; padding: 5px 10px; border-radius: 999px; color: var(--blue); background: #e8f1ff; font-size: 13px; font-weight: 900; }
.feature-card h3 { margin: 0; font-size: 24px; line-height: 1.25; }
.feature-card p { margin: 0; color: var(--muted); line-height: 1.65; }
.openclaw-cover { background: linear-gradient(135deg, #ffe7d2, #ddfff2); }
.codex-cover { color: #fff; background: linear-gradient(135deg, #111827, #44246f); }
.codex-cover small, .codex-cover li { color: rgba(255,255,255,.82); }
.codex-cover li { background: rgba(255,255,255,.14); }
.prompt-cover { background: linear-gradient(135deg, #f5e8ff, #e9f1ff); }
.workflow-cover { background: linear-gradient(135deg, #dff7ff, #e8fff2); }
.roadmap-cover { background: linear-gradient(135deg, #ffe7e7, #fff1d6); }
.accent-blue { background: linear-gradient(135deg, #1d75ff, #00a8d8); }
.accent-green { background: linear-gradient(135deg, #14b875, #20c997); }
.accent-purple { background: linear-gradient(135deg, #764cff, #b65cff); }
.accent-orange { background: linear-gradient(135deg, #ff8a00, #ff5f6d); }
.accent-cyan { background: linear-gradient(135deg, #06b6d4, #2563eb); }
.accent-red { background: linear-gradient(135deg, #ef4444, #f97316); }

.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 32px; align-items: start; }
.main-column { display: grid; gap: 48px; }
.category-tabs, .prompt-tags { display: flex; flex-wrap: wrap; gap: 12px; padding: 22px; border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.category-tabs button, .prompt-tags span { min-height: 48px; border: 0; border-radius: 8px; padding: 0 20px; color: #3d4758; background: #f1f3f6; font-weight: 800; cursor: pointer; }
.category-tabs button:hover { color: var(--blue); background: #e9f1ff; }
.category-tabs button.active { color: #fff; background: var(--blue); }
.tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.tool-card { display: flex; align-items: center; gap: 14px; min-height: 98px; padding: 16px; border-radius: 8px; background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(30,48,80,.05); }
.tool-card h3 { margin: 0 0 6px; font-size: 20px; }
.tool-card p { margin: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo { display: grid; place-items: center; flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%; color: #fff; font-weight: 900; font-size: 14px; }
.logo-pink { background: #f28bd6; } .logo-dark { background: #101217; } .logo-violet { background: #8e5cff; } .logo-black { background: #151515; } .logo-blue { background: #6875ff; } .logo-indigo { background: #6158f4; } .logo-cyan { background: #00a4e8; } .logo-slate { background: #263241; } .logo-orange { background: #f97316; } .logo-red { background: #ef4444; } .logo-teal { background: #14b8a6; } .logo-gray { background: #64748b; }

.post-list { display: grid; gap: 18px; }
.post-card { display: grid; grid-template-columns: 58px 1fr; gap: 18px; padding: 26px; border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.avatar { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #ff9466, #ff6b6b); font-weight: 900; }
.avatar.blue { background: linear-gradient(135deg, #1976ff, #00a8d8); }
.avatar.green { background: linear-gradient(135deg, #16a34a, #14b8a6); }
.meta { margin: 0 0 8px; color: #7b8495; }
.post-card h3, .prompt-grid h3, .learn-card h3 { margin: 0 0 10px; font-size: 22px; line-height: 1.35; }
.post-card p, .prompt-grid p, .learn-card p, .contact-panel p { margin: 0; color: var(--muted); line-height: 1.75; }

.prompt-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.prompt-grid a { min-height: 190px; display: flex; flex-direction: column; padding: 22px; border-radius: 8px; background: #fff; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; }
.prompt-grid a:hover { transform: translateY(-3px); box-shadow: 0 18px 46px rgba(30, 48, 80, .12); }
.prompt-grid a span { width: fit-content; margin-top: auto; padding: 6px 10px; border-radius: 6px; color: #7b2cff; background: #f0dcff; font-weight: 800; }

.sidebar { position: sticky; top: 96px; display: grid; gap: 24px; }
.side-card { padding: 24px; border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.side-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.side-title h2 { font-size: 24px; }
.rank-list { margin: 0; padding: 0; list-style: none; counter-reset: rank; display: grid; gap: 0; }
.rank-list li { counter-increment: rank; display: grid; grid-template-columns: 34px 1fr; gap: 4px; align-items: center; min-height: 48px; color: #3f495c; }
.rank-list li::before { content: counter(rank); color: var(--red); font-weight: 900; font-size: 18px; }
.muted-rank li::before { color: var(--orange); }
.rank-list a { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rank-list a:hover { color: var(--blue); }

.learning-tabs h2 { display: flex; flex-wrap: wrap; gap: 28px; }
.learning-tabs h2 button {
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  transition: color .18s ease, transform .18s ease;
}
.learning-tabs h2 button.active,
.learning-tabs h2 button:hover {
  color: var(--blue);
  transform: translateY(-1px);
}
.learn-panel {
  display: none;
}
.learn-panel.is-active {
  display: grid;
}
.learn .learn-panel:not(.learn-layout).is-active {
  display: block;
}
.panel-heading {
  margin-bottom: 22px;
}
.panel-heading h3 {
  margin: 0 0 8px;
  font-size: 28px;
}
.panel-heading p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}
.learn-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
.learn-list { display: grid; gap: 22px; }
.learn-card { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: center; padding: 22px; border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.learn-card,
.course-card,
.wiki-card {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.learn-card:hover,
.course-card:hover,
.wiki-card:hover,
.tool-card:hover,
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 46px rgba(30, 48, 80, .12);
}
.thumb { display: grid; place-items: center; min-height: 148px; border-radius: 6px; color: #fff; font-size: 28px; font-weight: 900; }
.remotion { background: linear-gradient(135deg, #eaf4ff, #cde8ff); color: #1376ff; }
.openclaw { background: linear-gradient(135deg, #111827, #2d1748); }
.course { background: linear-gradient(135deg, #b91c1c, #ef4444); }
.karpathy { background: linear-gradient(135deg, #f8fafc, #dbeafe); color: #1e40af; }
.microsoft { background: linear-gradient(135deg, #0f172a, #2563eb); }
.contact-panel { position: sticky; top: 96px; display: grid; grid-template-columns: 116px 1fr; gap: 18px; padding: 24px; border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.contact-panel h3 { margin: 0 0 10px; font-size: 22px; }
.contact-panel a { color: var(--blue); }
.qr-box { display: grid; place-items: center; width: 112px; height: 112px; border: 10px solid #111827; color: #111827; background: repeating-linear-gradient(45deg, #fff 0 8px, #111827 8px 12px); font-weight: 900; font-size: 30px; }

.resource-block {
  padding-top: 12px;
}
.course-grid,
.wiki-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.course-card,
.wiki-card {
  display: block;
  min-height: 178px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.course-card span {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--orange);
  font-size: 26px;
  font-weight: 950;
}
.course-card h3,
.wiki-card h3 {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.35;
}
.course-card p,
.wiki-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.center-row { justify-content: center; }
.friend-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; }
.friend-link { display: inline-flex; align-items: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: 999px; color: #3f495c; background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 22px rgba(30,48,80,.05); font-weight: 800; }
.friend-link:hover { color: #fff; background: var(--blue); border-color: var(--blue); }
.friend-link span { font-size: 18px; }

.site-footer { display: flex; justify-content: space-between; gap: 24px; padding: 30px clamp(18px, 4vw, 48px); color: rgba(255,255,255,.76); background: #111827; }
.site-footer strong { color: #fff; }
.site-footer p { margin: 8px 0 0; color: inherit; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px 22px; align-items: center; }
.footer-links a { color: rgba(255,255,255,.86); }
.footer-links a:hover { color: #fff; }

.news-hero {
  padding: 78px clamp(18px, 4vw, 48px) 54px;
  background:
    radial-gradient(circle at 88% 12%, rgba(25, 118, 255, .16), transparent 32%),
    linear-gradient(180deg, #fff, #f5f8ff);
}
.news-hero h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.05;
}
.news-hero p:not(.eyebrow) {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.7;
}
.news-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.news-pills a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--blue);
  background: #e8f1ff;
  font-weight: 850;
}
.news-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: start;
}
.news-list {
  display: grid;
  gap: 18px;
}
.news-feature {
  display: block;
  padding: 30px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #1976ff, #0f172a);
  box-shadow: var(--shadow);
}
.news-feature span {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  font-weight: 900;
}
.news-feature h2 {
  margin: 0 0 12px;
  font-size: 30px;
}
.news-feature p {
  max-width: 780px;
  margin: 0;
  color: rgba(255,255,255,.82);
  line-height: 1.75;
}
.news-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  padding: 26px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.news-item:hover { transform: translateY(-2px); box-shadow: 0 18px 46px rgba(30, 48, 80, .12); }
.news-item span {
  color: var(--blue);
  font-size: 28px;
  font-weight: 950;
}
.news-item h2 {
  margin: 0 0 10px;
  font-size: 24px;
}
.news-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}
.detail-shell {
  background: var(--paper);
}
.detail-hero {
  padding: 66px clamp(18px, 4vw, 48px) 42px;
  background:
    radial-gradient(circle at 82% 18%, rgba(25, 118, 255, .16), transparent 32%),
    linear-gradient(180deg, #fff, #f6f9ff);
}
.back-link {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--blue);
  font-weight: 850;
}
.detail-hero h1 {
  max-width: 880px;
  margin: 0;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.08;
}
.detail-hero p:not(.eyebrow) {
  max-width: 820px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.75;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  font-weight: 850;
}
.button-link.primary {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  padding: 40px clamp(18px, 4vw, 48px) 58px;
  align-items: start;
}
.detail-main {
  display: grid;
  gap: 18px;
}
.detail-main section {
  padding: 28px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.detail-main h2 {
  margin: 0 0 14px;
  font-size: 26px;
}
.section-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.section-subhead h2 {
  margin: 0;
}
.copy-button {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  color: #fff;
  background: var(--blue);
  font-weight: 850;
  cursor: pointer;
}
.detail-main p,
.detail-main li {
  color: var(--muted);
  line-height: 1.8;
  font-size: 17px;
}
.detail-main p {
  margin: 0;
}
.detail-main ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}
.detail-main ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 22px;
}
.prompt-template {
  margin: 0;
  padding: 18px;
  overflow: auto;
  border-radius: 8px;
  color: #dbeafe;
  background: #111827;
  line-height: 1.7;
  white-space: pre-wrap;
}
.prompt-template code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
}
.example-box {
  display: grid;
  gap: 12px;
  color: var(--muted);
  line-height: 1.75;
}
.example-box p {
  margin: 0;
}
.detail-side {
  position: sticky;
  top: 96px;
}

@media (max-width: 1180px) {
  .content-layout, .learn-layout { grid-template-columns: 1fr; }
  .news-page-layout { grid-template-columns: 1fr; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .sidebar, .contact-panel { position: static; }
  .tool-grid, .featured-grid, .prompt-grid, .course-grid, .wiki-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 880px) {
  .site-header { flex-wrap: wrap; gap: 14px; padding-block: 14px; }
  .nav { order: 3; width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .login-link { margin-left: auto; }
  .hero { min-height: auto; padding-top: 70px; }
  .search-box { grid-template-columns: auto 1fr; border-radius: 22px; }
  .search-box button { grid-column: 1 / -1; width: 100%; }
  .learn-card { grid-template-columns: 1fr; }
  .thumb { min-height: 130px; }
}

@media (max-width: 640px) {
  .brand-text { font-size: 16px; }
  .hero-copy { font-size: 17px; }
  .section { padding-inline: 16px; }
  .featured-grid, .tool-grid, .prompt-grid, .course-grid, .wiki-grid { grid-template-columns: 1fr; }
  .tool-card p, .rank-list a { white-space: normal; }
  .post-card, .contact-panel { grid-template-columns: 1fr; }
  .news-item { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; }
  .footer-links { justify-content: flex-start; }
}
