/*
 * AI寻光 visual system v3
 * Editorial index: cold neutrals, one coral accent, soft cards, pill controls.
 */

:root {
  --bg: #eef1f2;
  --bg-elevated: #fbfcfc;
  --bg-subtle: #e3e7e9;
  --ink: #101315;
  --ink-soft: #535a60;
  --ink-faint: #6c757d;
  --line: #cfd5d8;
  --accent: #f45132;
  --accent-dark: #d93c20;
  --accent-soft: #fbe4de;
  --green: #14745e;
  --blue: #3067c8;
  --yellow: #e5a928;
  --radius: 10px;
  --radius-small: 6px;
  --shadow: 0 22px 60px rgba(18, 26, 30, 0.09);
  --header-height: 68px;
}

[data-theme="dark"] {
  --bg: #101315;
  --bg-elevated: #171b1e;
  --bg-subtle: #22282c;
  --ink: #f3f5f5;
  --ink-soft: #b2b8bc;
  --ink-faint: #777f85;
  --line: #31383d;
  --accent: #ff6848;
  --accent-dark: #ff8268;
  --accent-soft: #35211d;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}

html { scroll-padding-top: 90px; }

body {
  background-color: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

.desktop-nav a,
.page-desktop-nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.nav-mini-icon {
  display: inline-grid;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  place-items: center;
  border-radius: 4px;
  background: #34383e;
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

.desktop-nav a.active .nav-mini-icon,
.page-desktop-nav a.active .nav-mini-icon { background: var(--accent); }

[data-theme="dark"] .nav-mini-icon { background: #eef1f3; color: #25282b; }

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

.shell,
.page-shell { width: min(1480px, calc(100% - 56px)); }

.section-kicker,
.page-kicker {
  letter-spacing: 0.18em;
  font-weight: 900;
}

.primary-button,
.ghost-button,
.page-submit-button {
  min-height: 40px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.01em;
}

.top-ticker,
.page-ticker {
  background: #101315;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ticker-inner,
.page-ticker .page-shell { height: 31px; min-height: 31px; }
.ticker-label,
.page-ticker span { color: #ff9b86; }

.site-header,
.page-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elevated) 93%, transparent);
  box-shadow: none;
}

.header-inner,
.page-header-inner { height: 68px; min-height: 68px; }

.brand { gap: 10px; }
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  transform: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}
.brand-copy strong { font-size: 17px; }
.brand-copy small { margin-top: 4px; letter-spacing: 0.17em; }

.desktop-nav,
.page-desktop-nav { gap: clamp(16px, 1.65vw, 25px); }
.desktop-nav a,
.page-desktop-nav a { font-size: 12px; font-weight: 800; }
.desktop-nav a.active::after,
.page-desktop-nav a.active::after {
  bottom: -19px;
  width: 18px;
  height: 2px;
  border-radius: 0;
}

.header-actions .primary-button,
.page-submit-button {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg-elevated);
}

.icon-button,
.page-icon-button {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  box-shadow: none;
}

/* Home masthead */
.hero-section {
  padding: 58px 0 0;
  background:
    linear-gradient(90deg, transparent calc(50% - .5px), color-mix(in srgb, var(--line) 42%, transparent) 50%, transparent calc(50% + .5px)),
    linear-gradient(var(--bg), var(--bg));
}

.hero-noise {
  opacity: 1;
  background-image:
    linear-gradient(color-mix(in srgb, var(--line) 28%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--line) 28%, transparent) 1px, transparent 1px),
    radial-gradient(circle at 82% 7%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 23%);
  background-size: 72px 72px, 72px 72px, auto;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.45), transparent 78%);
}

.hero-grid {
  grid-template-columns: minmax(0, 1.16fr) minmax(380px, .68fr);
  gap: clamp(48px, 7vw, 105px);
  align-items: start;
}

.hero-copy { padding: 28px 0 20px; }
.eyebrow {
  margin-bottom: 26px;
  padding: 0 0 0 12px;
  border: 0;
  border-left: 3px solid var(--accent);
  border-radius: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: .03em;
}
.live-dot { display: none; }
.hero-copy h1 {
  max-width: 850px;
  font-size: clamp(46px, 5.25vw, 74px);
  line-height: 1.01;
  letter-spacing: -0.067em;
  font-weight: 850;
}
.hero-copy > p {
  max-width: 620px;
  margin: 24px 0 25px;
  font-size: 15px;
  line-height: 1.85;
}

.hero-search {
  max-width: 720px;
  border: 1px solid var(--ink);
  border-radius: 9px;
  box-shadow: 7px 7px 0 color-mix(in srgb, var(--accent) 25%, transparent);
}
.search-mode-row { padding: 11px 17px 0; }
.search-input-row { padding: 12px 13px 12px 17px; }
.search-input-row button { border-radius: 6px; }
.popular-searches { margin-top: 16px; }
.popular-searches button { padding-bottom: 2px; border-bottom: 1px solid var(--line); }

.hero-radar {
  position: relative;
  margin-top: 5px;
  border-color: var(--ink);
  border-radius: 10px;
  padding: 21px;
  box-shadow: 8px 8px 0 var(--accent-soft);
  transform: none;
}
.hero-radar::before {
  content: "LIVE INDEX";
  position: absolute;
  top: 14px;
  right: -24px;
  padding: 5px 8px;
  background: var(--accent);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .12em;
  transform: rotate(90deg) translateX(100%);
  transform-origin: top right;
}
.radar-head h2 { font-size: 23px; }
.radar-feature { border-radius: 7px; }
.radar-item { border-bottom-style: dashed; }
.wide-link { border-radius: 999px; }

.trust-row {
  grid-template-columns: repeat(3, minmax(120px, 170px)) 1fr;
  margin-top: 58px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.trust-row strong { font-size: 22px; }

.quick-dock {
  margin-top: 0;
  padding: 30px 0 34px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.dock-head h2 { font-size: 23px; }
.shortcut-grid { gap: 8px; }
.shortcut-item {
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--bg-elevated);
}

.task-section {
  width: 100%;
  padding: 96px max(28px, calc((100vw - 1480px) / 2));
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--line);
}
.task-grid { counter-reset: task-index; gap: 0; border-top: 1px solid var(--line); }
.task-card {
  counter-increment: task-index;
  min-height: 190px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none !important;
}
.task-card:nth-child(3n) { border-right: 0; }
.task-card::before {
  content: "0" counter(task-index);
  position: absolute;
  right: 21px;
  bottom: 18px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}
.task-card:hover { transform: none; background: var(--bg-subtle); }
.task-card.orange::before,
.task-card.ink::before { color: rgba(255,255,255,.62); }

/* Home directory */
.directory-section { padding: 100px 0 120px; }
.directory-toolbar {
  margin: 28px 0 34px;
  border-color: var(--line);
  border-radius: 8px;
  background: var(--bg);
}
.toolbar-filters button { border-radius: 999px; }
.directory-layout { grid-template-columns: 190px minmax(0,1fr) 290px; gap: 26px; }
.category-button { min-height: 40px; border-radius: 6px; }
.category-button.active { background: var(--ink); color: var(--bg-elevated); }
.tool-grid { gap: 10px; }
.tool-card {
  min-height: 224px;
  border-radius: 8px;
  box-shadow: none;
}
.tool-card::after {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  top: -1px;
  height: 3px;
  background: transparent;
}
.tool-card:hover { transform: translateY(-2px); border-color: var(--ink); box-shadow: 6px 6px 0 var(--accent-soft); }
.tool-card:hover::after { background: var(--accent); }
.tool-logo { border-radius: 8px; }
.ranking-card,
.newsletter-card { border-radius: 8px; }

.insight-section,
.compare-section,
.library-section { padding: 105px 0; }
.editorial-grid { gap: 10px; }
.article-card { border-radius: 8px; }
.prompt-section { border-block: 1px solid #000; }
.prompt-card { border-radius: 8px; }
.compare-wrap { border-radius: 8px; }
.course-card { border-radius: 8px; }
.book-card { border-radius: 8px; }
.submit-cta {
  min-height: 290px;
  border-radius: 10px;
  box-shadow: 10px 10px 0 var(--accent);
}
.submit-cta h2 { font-size: clamp(34px, 3.7vw, 52px); }

.site-footer,
.page-footer { background: var(--ink); color: var(--bg-elevated); }
.site-footer .brand-copy small,
.page-footer .brand-copy small,
.site-footer p,
.page-footer p,
.site-footer a,
.page-footer a,
.footer-bottom,
.page-footer-bottom { color: color-mix(in srgb, var(--bg-elevated) 62%, transparent) !important; }
.site-footer .brand-mark,
.page-footer .brand-mark { background: var(--bg-elevated); }
.site-footer .brand-mark::before,
.site-footer .brand-mark::after,
.site-footer .brand-mark span::before,
.page-footer .brand-mark::before,
.page-footer .brand-mark::after,
.page-footer .brand-mark span::before { background: var(--ink); }
.footer-bottom,
.page-footer-bottom { border-color: rgba(255,255,255,.14); }

/* Channel pages */
.content-page {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--line) 28%, transparent) 1px, transparent 1px) 50% 0 / 72px 72px,
    var(--bg);
}
.content-page main { background: var(--bg); }

.page-hero {
  padding: 48px 0 64px;
  background:
    radial-gradient(circle at 87% 8%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 24%),
    linear-gradient(color-mix(in srgb, var(--line) 30%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--line) 30%, transparent) 1px, transparent 1px),
    var(--bg-elevated);
  background-size: auto, 72px 72px, 72px 72px, auto;
}
.breadcrumbs { margin-bottom: 34px; }
.page-hero-grid { grid-template-columns: minmax(0, 1.2fr) minmax(320px, .58fr); }
.page-hero h1,
.article-hero h1,
.form-page h1 {
  font-size: clamp(44px, 5.35vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.061em;
}
.page-hero-grid > div:first-child { padding-left: 18px; border-left: 3px solid var(--accent); }
.page-hero-grid > div:first-child > p { font-size: 15px; }
.page-stats { background: color-mix(in srgb, var(--bg-elevated) 72%, transparent); backdrop-filter: blur(8px); }
.page-stats div { padding: 18px 13px; }

.content-section { padding-top: 86px; }
.section-title h2 { font-size: clamp(28px, 3.15vw, 42px); }

.content-page .directory-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 28px; }
.filter-rail { padding-right: 17px; }
.filter-rail > a { border-radius: 6px; }
.filter-rail > a.active { background: var(--ink); color: var(--bg-elevated); box-shadow: none; }
.filter-rail > a.active span { color: color-mix(in srgb, var(--bg-elevated) 62%, transparent); }
.directory-toolbar label,
.prompt-filter-row label { border-color: var(--ink); border-radius: 7px; box-shadow: 4px 4px 0 var(--accent-soft); }
.directory-card {
  border-radius: 8px;
  box-shadow: none;
}
.directory-card::before {
  content: "";
  position: absolute;
  inset: -1px -1px auto;
  height: 3px;
  background: transparent;
}
.directory-card:hover { border-color: var(--ink); box-shadow: 6px 6px 0 var(--accent-soft); }
.directory-card:hover::before { background: var(--accent); }
.page-tool-logo { border-radius: 7px; }
.directory-card-tags span { border-radius: 4px; }
.pagination > a,
.pagination div a { box-shadow: none; }

.collection-group { padding: 48px 0; }
.collection-group-title { grid-template-columns: 42px 1fr auto; }
.collection-card {
  min-height: 182px;
  border-radius: 8px;
  box-shadow: none;
}
.collection-card:hover { border-color: var(--ink); box-shadow: 5px 5px 0 var(--accent-soft); }
.collection-card > span { padding-bottom: 10px; border-bottom: 1px solid var(--line); }

.guide-strip { background: var(--bg-elevated); }
.guide-strip strong,
.guide-strip a { border-radius: 4px; }

.tool-detail-hero {
  padding: 44px 0 64px;
  background:
    linear-gradient(color-mix(in srgb, var(--line) 28%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--line) 28%, transparent) 1px, transparent 1px),
    var(--bg-elevated);
  background-size: 72px 72px, 72px 72px, auto;
}
.tool-detail-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(48px, 8vw, 118px); }
.detail-tool-logo { border-radius: 12px; box-shadow: 6px 6px 0 var(--accent-soft); }
.tool-detail-main h1 { font-size: clamp(48px, 5.8vw, 76px); }
.tool-score-panel { border-color: var(--ink); border-radius: 9px; box-shadow: 8px 8px 0 var(--accent-soft); }
.tool-score-panel > strong { font-size: 47px; }
.tool-content-layout,
.article-layout { padding-top: 72px; }
.article-body h2 { font-size: clamp(26px, 2.7vw, 37px); }
.related-rail > div { border-bottom-style: dashed; }

.ranking-board,
.news-card,
.prompt-library-card,
.model-table-wrap,
.submission-form { border-radius: 8px; }
.ranking-board { box-shadow: 5px 5px 0 var(--accent-soft); }
.ranking-board:first-child { border-color: var(--ink); }
.news-card.featured { box-shadow: 8px 8px 0 var(--accent); }
.news-card h2 { font-size: clamp(28px, 3.5vw, 48px); }
.news-card:not(.featured) h2 { font-size: clamp(24px, 2.35vw, 33px); }

.article-hero {
  padding: 48px 0 60px;
  background:
    linear-gradient(color-mix(in srgb, var(--line) 27%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--line) 27%, transparent) 1px, transparent 1px),
    var(--bg-elevated);
  background-size: 72px 72px, 72px 72px, auto;
}
.article-hero .page-kicker { padding-left: 12px; border-left: 3px solid var(--accent); }
.article-intro { font-size: 18px !important; }
.article-disclaimer { border-radius: 0 7px 7px 0; }

.prompt-library-card { border-top: 3px solid var(--ink); }
.prompt-library-card:hover { border-color: var(--accent); }
.academy-course-grid article { border-top-color: var(--accent); }
.wiki-section { border-block: 1px solid #000; }
.model-table-wrap { border-color: var(--ink); }
.submission-form { border-color: var(--ink); box-shadow: 8px 8px 0 var(--accent-soft); }
.manifesto > div { border-top-color: var(--accent); }
.standards-section { border-top: 1px solid var(--line); }

.search-panel {
  border-color: var(--ink);
  border-radius: 9px;
  box-shadow: 10px 10px 0 var(--accent);
}
.search-result { border-radius: 6px; }

@media (max-width: 1180px) {
  .hero-copy h1 { font-size: clamp(45px, 6vw, 68px); }
  .directory-layout { grid-template-columns: 170px minmax(0,1fr) 260px; }
}

@media (max-width: 980px) {
  .shell,
  .page-shell { width: min(100% - 40px, 1480px); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { max-width: 820px; }
  .hero-radar { max-width: 760px; }
  .trust-row { grid-template-columns: repeat(3, 1fr); }
  .trust-note { grid-column: 1 / -1; justify-self: start; }
  .task-section { padding-inline: 20px; }
  .directory-layout { grid-template-columns: 1fr; }
  .category-sidebar { position: static; }
}

@media (max-width: 640px) {
  .shell,
  .page-shell { width: min(100% - 28px, 1480px); }
  .hero-section { padding-top: 30px; }
  .hero-copy { padding-top: 10px; }
  .hero-copy h1,
  .page-hero h1,
  .article-hero h1,
  .form-page h1 { font-size: clamp(39px, 12.5vw, 54px); }
  .hero-copy > p { font-size: 14px; }
  .hero-search { box-shadow: 4px 4px 0 color-mix(in srgb, var(--accent) 25%, transparent); }
  .hero-radar { box-shadow: 5px 5px 0 var(--accent-soft); }
  .trust-row { grid-template-columns: 1fr; gap: 0; }
  .trust-row > div:not(.trust-note) { justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--line); }
  .trust-note { grid-column: auto; }
  .task-grid { grid-template-columns: 1fr; }
  .task-card,
  .task-card:nth-child(3n) { border-right: 0; }
  .task-card { min-height: 170px; }
  .directory-toolbar { border-radius: 7px; }
  .submit-cta { margin-inline: 14px; padding: 34px 24px; box-shadow: 6px 6px 0 var(--accent); }
  .page-hero-grid > div:first-child { padding-left: 13px; }
  .page-stats { background: transparent; }
  .directory-card:hover,
  .collection-card:hover,
  .ranking-board,
  .tool-score-panel,
  .submission-form { box-shadow: 4px 4px 0 var(--accent-soft); }
  .page-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .tool-card,
  .directory-card,
  .collection-card { transition: none; }
}
