/* CRM tab: Insights. Every rule is scoped to in- classes the insights module creates.
   admin.html's own <style> loads after this file, so overrides of its shared classes use two classes. */

.in-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.in-nav { align-items: center; }
.in-updated { font: 500 0.72rem/1.3 var(--f-mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); }
.in-updated:empty { display: none; }
.in-help { max-width: 860px; margin: -8px 0 22px; padding-left: 12px; border-left: 4px solid var(--hivis); color: var(--ink-soft); font-size: 0.98rem; line-height: 1.5; }
.in-help b { color: var(--ink); font-weight: 600; }
.in-body { transition: opacity 0.15s; }
.in-body[aria-busy="true"] { opacity: 0.6; }
.in-error { background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--error); padding: 16px 18px; }
.in-error .err { margin: 0 0 12px; }

/* Tiles: the shared .stats, six across on wide screens */
.in-stats.stats { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 20px; }
@media (max-width: 1100px) { .in-stats.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .in-stats.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.in-stats .stat { min-width: 0; }
.in-stats .stat dt { overflow-wrap: anywhere; }
.in-stats .in-of { margin: 8px 0 0; font: 500 0.72rem/1.4 var(--f-mono); letter-spacing: 0.02em; color: var(--on-dark-soft); }
.in-stats .stat.warm .in-of { color: var(--orange); }

.in-notice { margin: 0 0 28px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--hivis); font-weight: 600; }

/* Sections: two columns on desktop, stacked below */
.in-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; margin: 32px 0 0; }
@media (min-width: 1000px) { .in-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 28px; align-items: start; } }
.in-block { min-width: 0; }
.in-block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.in-block-head h2 { margin: 0; font-size: 1.35rem; }
.in-block-head h2:focus { outline: none; }
.in-meta { font: 500 0.7rem/1.3 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); white-space: nowrap; }
.in-hint { margin: 0 0 12px; font-size: 0.95rem; line-height: 1.45; color: var(--ink-soft); }
.in-foot { margin: 10px 0 0; font-size: 0.9rem; line-height: 1.45; color: var(--ink-soft); }
.in-empty { margin: 0; padding: 28px 18px; background: #fff; border: 1.5px dashed var(--line); text-align: center; color: var(--ink-soft); }
.in-sub { margin: 18px 0 8px; font: 500 0.7rem/1.3 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.in-none-line { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }

/* Legend: dark = every contact with that answer, yellow inside = the ones who registered (or attend) */
.in-legend { display: flex; gap: 4px 16px; flex-wrap: wrap; margin: 0 0 8px; font: 500 0.66rem/1.3 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.in-legend span { display: inline-flex; align-items: center; gap: 6px; }
.in-key { display: inline-block; width: 16px; height: 10px; background: var(--asphalt-3); border-radius: 1px; }
.in-key.in-key-hit { background: var(--hivis); box-shadow: inset 0 0 0 2px var(--asphalt-3); }

/* Ranked bars: a plain table, the bar under each answer */
.in-table tbody tr { cursor: default; }
.in-table tbody tr:hover { background: #FAFBF6; }
.in-table th.in-r { text-align: right; }
.in-table td.in-label { width: 100%; min-width: 0; }
.in-name { display: block; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.in-bar { display: block; height: 10px; margin-top: 7px; }
.in-bar i { display: block; height: 100%; min-width: 3px; padding: 2px; background: var(--asphalt-3); border-radius: 1px; }
.in-bar b { display: block; height: 100%; background: var(--hivis); }
.in-table tr.in-row-none td { background: var(--chalk); color: var(--ink-soft); border-top: 1px dashed var(--line); }
.in-table tr.in-row-none .in-name { font-weight: 500; font-style: italic; }
.in-table tr.in-row-zero td.num { color: var(--ink-soft); }
.in-table td.in-conv { font: 500 0.85rem/1.6 var(--f-mono); }
.in-table td.in-head { font-weight: 700; font-size: 1.05rem; }
.in-table td.in-soft { color: var(--ink-soft); }
@media (min-width: 561px) {
  .in-unit { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}

/* Other sources, in their words */
.in-others { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.in-others li { max-width: 100%; padding: 6px 10px; background: #fff; border: 1px solid var(--line); font-size: 0.92rem; line-height: 1.35; overflow-wrap: anywhere; }
.in-others b { margin-left: 6px; font: 500 0.75rem/1 var(--f-mono); color: var(--ink-soft); }

/* Requests and exhibit-floor interests */
.in-list { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--asphalt); }
.in-item { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.in-item:last-child { border-bottom: 0; }
.in-item-top { display: flex; justify-content: space-between; align-items: center; gap: 6px 12px; flex-wrap: wrap; }
.in-who { min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
button.in-who {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  cursor: pointer;
}
button.in-who:hover { text-decoration-color: var(--ink); }
.in-item-meta { margin: 3px 0 0; font-size: 0.9rem; line-height: 1.4; color: var(--ink-soft); overflow-wrap: anywhere; }
.in-item-meta a { color: var(--ink); }
.in-asks { display: grid; gap: 6px; margin: 10px 0 0; }
.in-asks div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 2px 10px; align-items: baseline; }
.in-asks dt { font: 500 0.66rem/1.3 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.in-asks dd { margin: 0; font-size: 0.95rem; line-height: 1.45; overflow-wrap: anywhere; }
.in-quote { margin: 10px 0 0; padding: 4px 0 4px 12px; border-left: 4px solid var(--hivis); font-size: 0.98rem; line-height: 1.45; overflow-wrap: anywhere; }
.in-b-attending { background: var(--asphalt); color: var(--hivis); }

/* Show all / Show fewer, attached under a list */
.in-more {
  display: block;
  width: 100%;
  margin: 0;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0;
  background: var(--chalk-2);
  color: var(--ink);
  font: 600 0.9rem/1 var(--f-cond);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
}
.in-more:hover { background: var(--asphalt); color: var(--hivis); }
.in-more:focus-visible { outline-offset: -3px; }

/* Phones: each answer becomes a row of its own, the bar full width, the numbers in a line under it with their units */
@media (max-width: 560px) {
  .in-wrap.table-wrap { overflow: visible; }
  .in-table thead { display: none; }
  .in-table, .in-table tbody { display: block; width: 100%; }
  .in-table tr.in-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .in-table tr.in-row:last-child { border-bottom: 0; }
  .in-table tr.in-row-none { background: var(--chalk); border-top: 1px dashed var(--line); }
  .in-table tr.in-row td { display: block; padding: 0; border: 0; background: none; }
  .in-table tr.in-row td.in-label { flex: 1 0 100%; width: auto; margin-bottom: 4px; }
  .in-table tr.in-row td.num { text-align: left; font: 500 0.8rem/1.4 var(--f-mono); }
  .in-table tr.in-row td.in-head { font-weight: 700; color: var(--ink); }
  .in-unit { color: var(--ink-soft); font-weight: 400; }
  .in-asks div { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .in-body { transition: none; } }
