/* cull-home.css - the welcome page of cull.shock (assets/js/suite/cull-home.js renders inside #cull-home).
   5 Nov 2026, V4: Source Sans 3 (inherited from the app body), tokens from core.css / suite-app.css, dark first.
   Red (--red) is the one primary action ("Open a local folder", or "Sign in" when signed out) and nothing else.
   Everything is a plain flow of cards: nothing may overflow at 390 px, touch targets are 44 px on a phone. */

.cull-home { color: var(--text); font-family: var(--font-display, inherit); }
.ch-wrap { max-width: 1280px; margin: 0 auto; padding: 22px clamp(12px, 3vw, 28px) 56px; display: flex; flex-direction: column; gap: 22px; }

/* ---- head ---- */
.ch-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ch-head h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.ch-head h1 .ti { font-size: 24px; color: var(--dim); }
.ch-sub { margin: 4px 0 0; color: var(--dim); font-size: 13.5px; max-width: 70ch; }
.ch-head__act { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- section frame ---- */
.ch-sec { background: var(--app-surface); border: 1px solid var(--app-line); border-radius: 12px; padding: 16px clamp(12px, 2vw, 18px); min-width: 0; }
.ch-sec--hero { padding-bottom: 12px; }
.ch-sec__h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ch-sec__h h2 { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); display: flex; align-items: center; gap: 8px; }
.ch-sec__h h2 .ti { font-size: 15px; }
.ch-hint { color: var(--dim); font-size: 12px; }
.ch-body { min-width: 0; }
.ch-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.ch-cols > .ch-sec { min-width: 0; }
.ch-loading { color: var(--dim); font-size: 13px; padding: 10px 2px; }
.ch-msg { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--dim); font-size: 13.5px; padding: 14px 4px; line-height: 1.5; }
.ch-msg .ti { font-size: 18px; }
.ch-note { color: var(--dim); font-size: 12.5px; line-height: 1.55; margin: 0 0 10px; max-width: 88ch; }
.ch-note .ti { font-size: 14px; margin-right: 6px; vertical-align: -2px; }
.ch-note strong { color: var(--text); font-weight: 600; }

/* ---- showcase strip ---- */
.ch-strip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.ch-tile { flex: 0 0 auto; width: clamp(150px, 20vw, 230px); background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; scroll-snap-align: start; border-radius: 10px; }
.ch-tile__img { display: grid; place-items: center; aspect-ratio: 3 / 2; background: var(--app-canvas, var(--app-bg)); border: 1px solid var(--app-line); border-radius: 10px; overflow: hidden; color: var(--dim); }
.ch-tile__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ch-tile:hover .ch-tile__img, .ch-tile:focus-visible .ch-tile__img { border-color: var(--text); }
.ch-tile:focus-visible, .ch-card__open:focus-visible, .ch-chip:focus-visible, .ch-kpi:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.ch-tile__cap { display: block; margin-top: 6px; font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-strip--sm .ch-tile, .ch-tile--sm { width: 96px; }
.ch-strip--sm { padding-bottom: 8px; }

/* ---- KPI tiles ---- */
.ch-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.ch-kpis--s { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); margin-bottom: 10px; }
.ch-kpi { background: var(--app-surface2); border: 1px solid var(--app-line); border-radius: 10px; padding: 12px 14px; min-width: 0; display: flex; flex-direction: column; gap: 4px; cursor: help; }
.ch-kpi__k { display: flex; align-items: center; gap: 7px; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.ch-kpi__k .ti { font-size: 15px; }
.ch-info { margin-left: auto; opacity: .55; }
.ch-kpi:hover .ch-info, .ch-kpi:focus .ch-info { opacity: 1; }
.ch-kpi__v { font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ch-kpi--s .ch-kpi__v { font-size: 24px; }
.ch-kpi__v small { font-size: 13px; font-weight: 500; color: var(--dim); letter-spacing: 0; }
.ch-kpi__s { font-size: 12.5px; color: var(--dim); overflow-wrap: anywhere; }
.ch-bars { display: flex; gap: 2px; height: 6px; border-radius: 3px; overflow: hidden; margin-top: 6px; background: var(--app-line); }
.ch-bars__seg { min-width: 0; }
.ch-bars__seg--a { background: var(--text); } .ch-bars__seg--b { background: var(--dim); } .ch-bars__seg--c { background: var(--line2, var(--app-line)); }
.ch-bars__seg--ok { background: var(--green, #3FB950); } .ch-bars__seg--mid { background: var(--yellow, #D9A60A); } .ch-bars__seg--bad { background: var(--dim); }
.ch-spark { display: flex; align-items: flex-end; gap: 2px; height: 28px; margin-top: 6px; }
.ch-spark i { flex: 1 1 0; min-width: 0; background: var(--dim); border-radius: 1px; opacity: .8; }

/* ---- lists / rows / pills ---- */
.ch-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ch-list > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 10px 2px; border-top: 1px solid var(--app-line); }
.ch-list > li:first-child { border-top: 0; }
.ch-list__t { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; }
.ch-list__t .ti { color: var(--dim); font-size: 17px; }
.ch-list__n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-list__m { grid-column: 1; color: var(--dim); font-size: 12.5px; }
.ch-list > li > .ab { grid-column: 2; grid-row: 1 / span 2; }
.ch-list--tight > li { display: block; padding: 6px 2px; font-size: 12.5px; color: var(--dim); }
.ch-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 2px; border-top: 1px solid var(--app-line); font-size: 13.5px; line-height: 1.5; }
.ch-row:first-child { border-top: 0; }
.ch-row .ti { font-size: 17px; margin-top: 2px; color: var(--dim); }
.ch-row--dim { color: var(--dim); }
.ch-pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; line-height: 20px; border: 1px solid var(--app-line); background: var(--app-surface2); color: var(--text); white-space: nowrap; }
.ch-pill .ti { font-size: 12px; }
.ch-pill--pick { border-color: var(--green, #3FB950); }
.ch-pill--reject, .ch-pill--unsure, .ch-pill--undecided { color: var(--dim); }

/* ---- explore ---- */
.ch-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ch-bar--c { justify-content: center; margin: 12px 0 0; }
.ch-bar--filters { align-items: flex-end; }
.ch-search { flex: 1 1 240px; display: flex; align-items: center; gap: 8px; background: var(--app-surface2); border: 1px solid var(--app-ctl-line, var(--app-line)); border-radius: 8px; padding: 0 10px; min-height: 36px; }
.ch-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 14px; min-height: 34px; }
.ch-search:focus-within { border-color: var(--text); }
.ch-sel { display: flex; flex-direction: column; gap: 3px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.ch-sel select { background: var(--app-surface2); border: 1px solid var(--app-ctl-line, var(--app-line)); border-radius: 8px; color: var(--text); font: inherit; font-size: 13.5px; letter-spacing: 0; text-transform: none; min-height: 36px; padding: 0 8px; }
.ch-facets { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.ch-facet { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ch-facet__k { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); min-width: 84px; }
.ch-chip { background: var(--app-surface2); border: 1px solid var(--app-line); color: var(--text); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.ch-chip small { color: var(--dim); margin-left: 2px; font-size: 11.5px; }
.ch-chip:hover { border-color: var(--line2, var(--dim)); background: var(--app-hover); }
.ch-chip.is-on { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); font-weight: 600; }
.ch-count { color: var(--dim); font-size: 13px; flex: 1 1 auto; min-width: 0; }
.ch-results { min-height: 60px; }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.ch-card { min-width: 0; content-visibility: auto; contain-intrinsic-size: auto 210px; display: flex; flex-direction: column; gap: 6px; }
.ch-card__open { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 10px; display: block; min-width: 0; }
.ch-thumb { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--app-canvas, var(--app-bg)); border: 1px solid var(--app-line); border-radius: 10px; overflow: hidden; color: var(--dim); }
.ch-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ch-card__open:hover .ch-thumb { border-color: var(--text); }
.ch-name { display: block; margin-top: 6px; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-card__m { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 24px; }
.ch-sz { margin-left: auto; font-size: 11.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.ab.is-on { border-color: var(--text); }

/* ---- signed out ---- */
.ch-wrap--empty { min-height: 60vh; justify-content: center; }
.ch-empty { max-width: 640px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 28px 8px; }
.ch-empty__ic { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--app-surface2); border: 1px solid var(--app-line); }
.ch-empty__ic .ti { font-size: 32px; color: var(--dim); }
.ch-empty h1 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -.01em; }
.ch-empty p { margin: 0; color: var(--dim); font-size: 15px; line-height: 1.6; }
.ch-empty__act { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.ch-empty .ch-note { font-size: 13px; }
.ch-wrap a.ab { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 900px) {
  .ch-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .ch-wrap { padding-top: 14px; gap: 16px; }
  .ch-head h1 { font-size: 22px; }
  .ch-head__act { width: 100%; }
  .ch-head__act .ab { flex: 1 1 auto; justify-content: center; }
  .ch-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ch-kpi__v { font-size: 24px; }
  .ch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ch-tile { width: 62vw; }
  .ch-sel { flex: 1 1 40%; } .ch-sel select { width: 100%; }
  .ch-facet__k { min-width: 0; width: 100%; }
  .ch-empty h1 { font-size: 24px; }
  .ch-list > li > .ab, .ch-chip, .ch-bar .ab, .ch-head__act .ab, .ch-card__m .ab { min-height: 44px; }
  .ch-search { min-height: 44px; } .ch-sel select { min-height: 44px; }
}
@media (prefers-reduced-motion: no-preference) {
  .ch-tile__img, .ch-thumb { transition: border-color .12s; }
}
