/* horizontal.one/trends: 创业赛道追踪 · Startup Trends (tools/trends/build.mjs makes the pages), and its block on the home
   page. On top of site.css (and cases.css on the trends pages): the same tokens, type scale, spacing steps and easing.
   The charts are the case report's (cases.css: .viz, .spark, .panels), one series each in --viz. The four stages and the
   checks' answers have colours of their own, kept off the charts, and always come with their words. */
.trends-site { --viz: #c98500; --viz-wash: rgb(201 133 0 / 0.1); }
.trends-site .sub { margin: 0; color: var(--muted); font-size: 14px; line-height: 20px; }
.trends-site .block-title { font-size: 30px; line-height: 36px; letter-spacing: -0.02em; margin-bottom: 8px; }

/* ---------------------------------------------------------------- stages and answers */
.chip.st { gap: 6px; }
.chip.st::before { content: ""; width: 8px; height: 8px; border-radius: 9999px; background: currentColor; }
.chip.st-emerging { color: #6fd39a; border-color: rgb(111 211 154 / 0.5); }
.chip.st-heating { color: #f2b45a; border-color: rgb(242 180 90 / 0.5); }
.chip.st-overheated { color: #ff8f7a; border-color: rgb(255 143 122 / 0.5); }
.chip.st-cooling { color: #9fb3c8; border-color: rgb(159 179 200 / 0.5); }
.chip.dir-up, .chip.met-good { color: #6fd39a; border-color: rgb(111 211 154 / 0.5); }
.chip.dir-down, .chip.met-bad { color: #ff8f7a; border-color: rgb(255 143 122 / 0.5); }
.chip.dir-flat, .chip.met-no { color: var(--muted); }
.chip.who, .chip.ev { font-weight: 500; color: var(--muted); }
.refs { margin-left: 4px; font-size: 12px; line-height: 16px; white-space: nowrap; }
.refs a { color: var(--faint); text-decoration: none; font-variant-numeric: tabular-nums; }
.refs a:hover { color: var(--text); }

/* ---------------------------------------------------------------- the board */
.trends-board { padding: 16px 0 48px; }
.trends-board .sub { margin-bottom: 24px; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: start; }
.stage-col { display: grid; gap: 12px; align-content: start; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.stage-col header { display: grid; gap: 8px; }
.stage-col h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 16px; line-height: 24px; }
.stage-col h3 .chip { font-size: 14px; line-height: 20px; padding: 2px 12px; }
.stage-col h3 .n { color: var(--faint); font-size: 14px; line-height: 20px; font-variant-numeric: tabular-nums; }
.stage-col header p { margin: 0; color: var(--faint); font-size: 12px; line-height: 16px; }
.stage-col .empty { margin: 0; padding: 12px 0; color: var(--faint); font-size: 14px; line-height: 20px; border-top: 1px solid var(--rule); }
.tcards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tcard { display: grid; gap: 8px; padding: 16px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line); transition: border-color 300ms var(--ease); }
.tcard:hover { border-color: var(--faint); }
.tcard h3 { font-size: 18px; line-height: 28px; }
.tcard h3 a { text-decoration: none; }
.tcard h3 a:hover { color: var(--accent); }
.tcard .what { margin: 0; color: var(--soft); font-size: 14px; line-height: 20px; }
.tcard p { margin: 0; }
.tc-sig { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tc-sig li { display: grid; gap: 2px; padding-top: 8px; border-top: 1px solid var(--line); }
.tc-sig span { color: var(--faint); font-size: 12px; line-height: 16px; }
.tc-sig b { font-size: 14px; line-height: 20px; font-weight: 600; }
.tc-mini { display: grid; gap: 4px; padding-top: 8px; border-top: 1px solid var(--line); }
.tc-k, .tc-v { margin: 0; color: var(--faint); font-size: 12px; line-height: 16px; }
.tc-v { color: var(--muted); }
.spark.mini { height: 48px; }

/* ---------------------------------------------------------------- the watch list and the method */
.trends-watch { padding: 16px 0 48px; }
.trends-watch .sub { margin-bottom: 24px; }
.trends-watch .panel p { margin: 0; color: var(--soft); font-size: 14px; line-height: 20px; }
.trends-method { padding: 32px 0 64px; border-top: 1px solid var(--rule); }
.trends-method .wrap { display: grid; gap: 16px; }
.trends-method h3 { margin-top: 16px; font-size: 20px; line-height: 28px; }
.trends-method .facts dd { color: var(--soft); }
.rules li .chip { margin-right: 8px; }

/* ---------------------------------------------------------------- a market */
.trend-head { display: grid; gap: 12px; }
.trend-page .principle { padding: 24px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); gap: 8px; }
.trend-page .principle h2 { font-size: 14px; line-height: 20px; color: var(--accent); }
.trend-page .principle p { font-size: 18px; line-height: 30px; font-weight: 500; }
.trend-page h3 { font-size: 16px; line-height: 24px; color: var(--soft); margin-top: 8px; }
.checks dt small { display: block; margin-top: 4px; color: var(--faint); font-size: 12px; line-height: 16px; }
.checks dd .chip, .sigs dd .chip { margin-right: 4px; vertical-align: 2px; }
.checks .crowding dt { color: var(--muted); }
.rule { padding: 12px 16px; border-radius: 12px; background: var(--surface); color: var(--soft); font-size: 14px; line-height: 24px !important; }
.rule .chip { margin: 0 4px; vertical-align: 1px; }
.rule a { color: var(--muted); text-underline-offset: 4px; white-space: nowrap; }
.sigs dd b { font-weight: 600; }
.sigs .when { color: var(--faint); font-size: 14px; }
.tr-list { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; line-height: 28px; }
.tr-list.repos span { color: var(--muted); font-size: 14px; }
.tr-list.repos a { color: var(--text); text-underline-offset: 4px; }
.earners { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.earners .panel { gap: 8px; padding: 16px 24px; }
.earners .panel h3 { margin: 0; font-size: 18px; line-height: 28px; color: var(--text); }
.earners .panel p { line-height: 28px; }
.examples { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.examples li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 14px; line-height: 20px; }
.examples a { color: var(--text); font-weight: 600; text-underline-offset: 4px; }
.examples span { color: var(--soft); }

/* ---------------------------------------------------------------- the home page's block */
.trends-home { margin-top: 48px; }
.trends-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.tr-card { height: 100%; display: grid; align-content: start; gap: 8px; padding: 24px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: transform 500ms var(--ease), border-color 300ms var(--ease); }
.tr-card:hover { transform: translateY(-2px); border-color: var(--faint); }
.tr-card:active { transform: scale(0.98); }
.tr-top { display: flex; flex-wrap: wrap; gap: 8px; }
.tr-card b { font-size: 18px; line-height: 28px; font-weight: 600; }
.tr-card small { color: var(--muted); font-size: 14px; line-height: 20px; }

/* ---------------------------------------------------------------- narrow screens */
@media (max-width: 1100px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .board { grid-template-columns: 1fr; }
  .trend-page .principle { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .tcard, .tr-card { transition: none; }
  .tr-card:hover, .tr-card:active { transform: none; }
}
