/* autogeny.ai homepage: the #in-the-wild section ("The same failures, in shipped products.").
   incidents.js draws the list from feed/incidents.json; this file gives it the design
   system's colours and type, so it follows light and dark mode like the rest of the page.
   Every value comes from ds/autogeny/tokens.css. The count row is #problem's, the list
   frame is #harness's and the label's square is the logo's flagged cell. */

/* The count and the two costs. */
.iw-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px 40px; }
.iw-stat { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--ink); padding-top: 16px; }
.iw-big { margin: 0; font-family: var(--font-mono); font-size: 40px; line-height: 44px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.iw-say { margin: 0; font-size: 16px; line-height: 25px; color: var(--ink-muted); }

/* The list, in a frame with a strip of filters on top. */
.iw-feed { background: var(--paper-raised); border: 1px solid var(--rule); min-width: 0; }
.iw-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.iw-bar > .ag-label { color: var(--ink); }
.iw-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.iw-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; margin: 0; padding: 0 12px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: transparent; cursor: pointer; font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.iw-chip:hover { color: var(--ink); border-color: var(--mark); }
.iw-chip[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); background: var(--grid); }
.iw-n { font-variant-numeric: tabular-nums; letter-spacing: 0; }

.iw-list { margin: 0; padding: 0; list-style: none; }
.iw-item { display: grid; grid-template-columns: 9rem minmax(0, 1fr) auto; gap: 6px 24px; align-items: baseline; padding: 16px; border-top: 1px solid var(--rule); }
.iw-item:first-child { border-top: 0; }
.iw-when { margin: 0; display: flex; flex-direction: column; gap: 2px; font-family: var(--font-mono); font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.iw-what { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.iw-kind { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); text-decoration: none; }
a.iw-kind:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.iw-flag { flex: none; width: 8px; height: 8px; background: var(--fail); }
.iw-title { font-family: var(--font-display); font-size: 17px; line-height: 24px; font-weight: 600; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.iw-title:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.iw-also { margin: 0; font-size: 14px; line-height: 21px; color: var(--ink-muted); }
.iw-also a { color: var(--ink-muted); }
.iw-impact { margin: 0; font-family: var(--font-mono); font-size: 20px; line-height: 24px; font-weight: 500; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }

.iw-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 16px; border-top: 1px solid var(--rule); }
.iw-shown { margin: 0; }
.iw-note { margin: 0; max-width: var(--measure); font-size: 15px; line-height: 23px; color: var(--ink-muted); }

.iw-chip:focus-visible, .iw-kind:focus-visible, .iw-title:focus-visible, .iw-also a:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }

/* On a phone the date and publisher go on one line above the headline, and the figure sits
   beside the label. */
@media (max-width: 639px) {
  .iw-item { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; }
  .iw-when { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 0 12px; }
  .iw-impact { grid-column: 2; grid-row: 2; align-self: start; font-size: 17px; }
  .iw-what { grid-column: 1; grid-row: 2; }
}

/* On paper: every item, no buttons. (site.css hides [hidden] with !important.) */
@media print {
  .iw-item[hidden] { display: grid !important; }
  .iw-filters, .iw-foot { display: none; }
}
