.match-insights { margin: 14px 0; border: 1px solid var(--stroke); border-radius: 5px; background: var(--bg); overflow: hidden; }
.match-insights[hidden] { display: none; }
.insights-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 38px; padding: 6px 12px; border-bottom: 1px solid var(--stroke); }
.insights-heading h4 { margin: 0; color: var(--text); font-size: 12px; font-weight: 600; }
.insights-calendar { display: inline-flex; align-items: center; min-height: 30px; padding: 3px 0; color: var(--accent); font-size: 11px; text-decoration: none; white-space: nowrap; }
.insights-calendar:hover { text-decoration: underline; text-underline-offset: 3px; }
.insights-comparison { padding: 7px 12px 0; }
.insights-comparison-row, .insights-form-grid { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: center; }
.insights-comparison-row { min-height: 25px; font-size: 11px; font-variant-numeric: tabular-nums; }
.insights-comparison-row > :not(:first-child) { text-align: center; }
.insights-comparison-row:first-child { color: var(--muted); font-size: 9px; }
.insights-comparison-row strong { color: var(--text); font-weight: 600; }
.insights-comparison-label { color: var(--muted); }
.insights-form-grid { margin: 5px 12px; padding: 7px 0 3px; }
.insights-form-caption { display: flex; flex-direction: column; gap: 2px; font-size: 10px; }
.insights-form-caption strong { color: var(--text); font-weight: 500; }
.insights-form-caption > span { color: var(--muted); font-size: 9px; }
.insights-form { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; }
.insights-form-result, body.theme-light .insights-form-result { display: inline-flex; align-items: center; justify-content: center; flex: 0 1 25px; min-width: 18px; min-height: 26px; padding: 2px 4px; border: 1px solid transparent; border-radius: 3px; background: var(--panel-raised); color: var(--text); box-shadow: none; font-family: 'DM Sans', sans-serif; font-size: 10px; font-weight: 700; }
.insights-form-result.result-z { color: #a5e3c5; background: #164b3c; border-color: #286e57; }
.insights-form-result.result-p { color: #ffd0cb; background: #562c35; border-color: #7d4650; }
.insights-form-result.result-r { color: #ead69e; background: #4c422b; border-color: #76643c; }
body.theme-light .insights-form-result.result-z { color: #16583b; background: #dcefe3; border-color: #b7d9c6; }
body.theme-light .insights-form-result.result-p { color: #852e3b; background: #f7e2e4; border-color: #e8bbc3; }
body.theme-light .insights-form-result.result-r { color: #70500d; background: #f2ebd3; border-color: #ddcea0; }
button.insights-form-result:hover { filter: brightness(1.18); }
.insights-unavailable { color: var(--muted); font-size: 10px; }
.insights-note { margin: 6px 12px 10px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.insights-history { border-top: 1px solid var(--stroke); }
.insights-history > summary { display: flex; align-items: center; gap: 7px; min-height: 36px; padding: 7px 12px; cursor: pointer; list-style: none; color: var(--text); font-size: 11px; }
.insights-history > summary::-webkit-details-marker { display: none; }
.insights-history > summary::after { content: "⌄"; margin-left: auto; color: var(--muted); font-size: 13px; }
.insights-history[open] > summary::after { content: "⌃"; }
.insights-history > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.insights-history-count { display: inline-flex; align-items: center; justify-content: center; min-width: 19px; min-height: 19px; padding: 1px 4px; border-radius: 3px; background: var(--panel-raised); color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.insights-history-list { border-top: 1px solid var(--stroke); }
.insights-history-match, body.theme-light .insights-history-match { display: grid; grid-template-columns: 75px minmax(0, 1fr) 38px; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--stroke); border-radius: 0; background: transparent; color: var(--text); box-shadow: none; text-align: left; font-size: 11px; line-height: 1.4; }
.insights-history-match:last-child { border-bottom: 0; }
button.insights-history-match:hover { background: var(--panel-raised); }
.insights-history-match time { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.insights-history-match > span { overflow-wrap: anywhere; }
.insights-history-match strong { color: var(--accent); font-variant-numeric: tabular-nums; text-align: right; }
@media (max-width: 600px) {
  .insights-heading { padding: 5px 9px; }
  .insights-comparison { padding: 6px 9px 0; }
  .insights-comparison-row, .insights-form-grid { grid-template-columns: 78px minmax(0, 1fr) minmax(0, 1fr); gap: 5px; }
  .insights-comparison-row { min-height: 24px; font-size: 10px; }
  .insights-comparison-row:first-child { font-size: 8px; }
  .insights-form-grid { margin-right: 9px; margin-left: 9px; }
  .insights-form { gap: 2px; }
  .insights-form-result, body.theme-light .insights-form-result { flex-basis: 20px; min-width: 13px; min-height: 24px; padding: 2px 1px; font-size: 9px; }
  .insights-form-caption { font-size: 9px; }
  .insights-form-caption > span { font-size: 8px; }
  .insights-unavailable { font-size: 9px; }
  .insights-note { margin-right: 9px; margin-left: 9px; font-size: 8px; }
  .insights-history > summary { padding-right: 9px; padding-left: 9px; }
  .insights-history-match, body.theme-light .insights-history-match { grid-template-columns: 57px minmax(0, 1fr) 30px; gap: 7px; padding: 7px 9px; font-size: 10px; }
  .insights-history-match time { font-size: 8px; }
}
