/* Styles for the insights plugin. Every selector is prefixed with .p-insights */

.p-insights h3 { margin: 26px 0 8px; }
.p-insights h4 { font: 700 15px/1.2 var(--display); margin: 0 0 6px; display: flex; align-items: center; gap: 7px; }
.p-insights .fine a, .p-insights .sub a { font-weight: 500; }
.p-insights-tag { display: inline-block; font: 500 12px/1.3 var(--mono); border: 1px solid var(--ink); border-radius: 2px; padding: 3px 7px; margin: 2px 0 10px; background: var(--paper); }
.p-insights-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.p-insights-wait { font: 400 14px/1.5 var(--mono); color: var(--ink-2); margin: 0; }

/* Progressive disclosure */
.p-insights-more { margin-top: 10px; }
.p-insights-more > summary { display: inline-block; cursor: pointer; font: 500 14px/1 var(--display); padding: 9px 12px; border: 1px solid var(--ink); border-radius: 2px; list-style: none; }
.p-insights-more > summary::-webkit-details-marker { display: none; }
.p-insights-more > summary::after { content: " +"; font-family: var(--mono); }
.p-insights-more[open] > summary::after { content: " \2212"; }
.p-insights-more > summary:hover { background: var(--mark); }
.p-insights-more[open] > summary { margin-bottom: 10px; }

/* 1. Five sentences */
.p-insights-five { list-style: none; margin: 14px 0 0; padding: 0; max-width: 860px; }
.p-insights-five li { display: grid; grid-template-columns: 178px minmax(0, 1fr); gap: 4px 20px; padding: 13px 0; border-top: 1px solid var(--rule); }
.p-insights-five li:first-child { border-top: 0; padding-top: 4px; }
.p-insights-k { font: 500 13px/1.4 var(--mono); color: var(--ink-2); padding-top: 4px; }
.p-insights-k b { display: inline-block; width: 24px; height: 24px; line-height: 24px; text-align: center; margin-right: 9px; background: var(--ink); color: #fff; font-weight: 500; border-radius: 50%; }
.p-insights-five p { margin: 0; font-size: 19px; line-height: 1.45; }
.p-insights-num { font-weight: 700; text-decoration: none; box-shadow: inset 0 -0.42em 0 var(--mark); white-space: nowrap; }
.p-insights-num:hover { background: var(--mark); }

/* 2. What changed */
.p-insights-scroll { overflow-x: auto; }
.p-insights-delta { border-collapse: collapse; width: 100%; max-width: 860px; }
.p-insights-delta th, .p-insights-delta td { text-align: left; padding: 9px 14px 9px 0; border-bottom: 1px solid var(--rule); font-size: 15px; vertical-align: baseline; }
.p-insights-delta thead th { font: 400 12px/1.3 var(--mono); color: var(--ink-2); border-bottom-color: var(--ink); vertical-align: bottom; }
.p-insights-delta tbody th { font-weight: 700; white-space: nowrap; }
.p-insights-delta tbody th .sw { margin-right: 7px; }
.p-insights-delta td { font-family: var(--mono); font-size: 14px; white-space: nowrap; }
.p-insights-delta td.now { font-weight: 500; }
.p-insights-delta td.na { color: var(--ink-3); }
.p-insights .p-insights-hung { background: none; border: 2px solid var(--ink); }
.p-insights-log { list-style: none; margin: 0; padding: 0; max-width: 860px; }
.p-insights-log li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 2px 14px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--rule); font-size: 15px; }
.p-insights-log time, .p-insights-log .move { font: 400 13px/1.4 var(--mono); color: var(--ink-2); }
.p-insights-log .why { font-weight: 700; overflow-wrap: anywhere; }
.p-insights-moved { margin-top: 4px; }
.p-insights-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px 32px; }
.p-insights-movers { list-style: none; margin: 0; padding: 0; }
.p-insights-movers li { padding: 7px 0; border-top: 1px solid var(--rule); }
.p-insights-movers .top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.p-insights-movers .top a { font-weight: 700; }
.p-insights-movers .n { font: 500 13px/1.4 var(--mono); white-space: nowrap; }
.p-insights-movers .meta { font-size: 14px; color: var(--ink-2); }

/* 3. Tipping points */
.p-insights-colhead { display: flex; justify-content: space-between; gap: 16px; font: 400 12px/1.3 var(--mono); color: var(--ink-2); margin: 0; padding-bottom: 6px; border-bottom: 1px solid var(--ink); max-width: 860px; }
.p-insights-tip { list-style: none; margin: 0; padding: 0; max-width: 860px; }
.p-insights-tip li { display: grid; grid-template-columns: 26px minmax(0, 1.25fr) minmax(0, 1fr) 30px; gap: 4px 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.p-insights-tip .rank { font: 400 13px/1 var(--mono); color: var(--ink-2); }
.p-insights-tip .who a { font-weight: 700; font-size: 17px; }
.p-insights-tip .meta { display: block; font-size: 13.5px; line-height: 1.35; color: var(--ink-2); }
.p-insights-tip .bar { display: flex; gap: 2px; height: 16px; }
.p-insights-tip .bar i { display: block; height: 100%; min-width: 2px; border-radius: 2px; }
.p-insights-tip .n { font: 500 15px/1 var(--mono); text-align: right; }

/* 4. Seats to watch */
.p-insights-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.p-insights-tabs button { font: 500 14px/1 var(--display); padding: 10px 12px; border: 1px solid var(--ink); border-radius: 2px; background: var(--paper); color: var(--ink); cursor: pointer; }
.p-insights-tabs button:hover { background: var(--wash); }
.p-insights-tabs button[aria-pressed="true"] { background: var(--mark); font-weight: 700; }
.p-insights-blurb { font-size: 15px; color: var(--ink-2); margin: 0 0 14px; max-width: 44em; }
.p-insights-blurb .p-insights-tag { margin: 0 6px 4px 0; color: var(--ink); }
.p-insights-cards { list-style: none; margin: 0; padding: 0 4px 4px 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.p-insights-cards li { border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); padding: 11px 12px 12px; background: var(--paper); }
.p-insights-cards .top a { font-weight: 800; font-size: 19px; line-height: 1.15; font-variation-settings: "wdth" 80; }
.p-insights-cards .stack { margin: 9px 0 8px; height: 12px; }
.p-insights-cards p { margin: 0; font-size: 14px; line-height: 1.4; color: var(--ink-2); }

/* 5. Paths to power */
.p-insights-paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; padding: 0 4px 4px 0; }
.p-insights-path { border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); padding: 14px 16px 16px; }
.p-insights-path h3 { margin: 0 0 2px; font-size: 21px; display: flex; align-items: center; gap: 8px; }
.p-insights-path > p { margin: 8px 0 0; font-size: 15px; }
.p-insights-path .how { font: 400 13px/1.4 var(--mono); color: var(--ink-2); margin: 0 0 10px; }
.p-insights-path dl { margin: 0; }
.p-insights-path dt { font: 500 12.5px/1.3 var(--mono); color: var(--ink-2); border-top: 1px solid var(--rule); padding-top: 9px; margin-top: 10px; }
.p-insights-path dd { margin: 3px 0 0; font-size: 15px; line-height: 1.45; }
.p-insights-path dd b { font-weight: 800; }
.p-insights-path details p { margin: 0; font-size: 14px; }
.p-insights-path .f { font: 400 12px var(--mono); color: var(--ink-2); }
.p-insights-path .p-insights-more > summary { font-size: 13px; padding: 7px 10px; }

@media (max-width: 900px) {
  .p-insights-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .p-insights-five li { grid-template-columns: minmax(0, 1fr); }
  .p-insights-delta th, .p-insights-delta td { padding-right: 8px; font-size: 14px; }
  .p-insights-delta td { font-size: 12.5px; white-space: normal; }
  .p-insights-delta thead th { white-space: normal; font-size: 11px; }
  .p-insights-delta tbody th .sw { margin-right: 5px; }
  .p-insights-five p { font-size: 17px; }
  .p-insights-k { padding-top: 0; }
  .p-insights-log li { grid-template-columns: 58px minmax(0, 1fr); }
  .p-insights-log .move { grid-column: 2; }
  .p-insights-tip li { grid-template-columns: 22px minmax(0, 1fr) 30px; }
  .p-insights-tip .bar { grid-column: 2; grid-row: 2; }
  .p-insights-tip .n { grid-row: 1 / span 2; grid-column: 3; }
  .p-insights-cards { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .p-insights-paths { grid-template-columns: minmax(0, 1fr); }
  .p-insights-colhead span:first-child { display: none; }
}
