/* V151: final interaction and typography layer after a full cascade audit. */
:root {
  --ui-hover-v151: #17212c;
  --ui-hover-border-v151: #3b4d60;
  --ui-selected-row-v151: #142319;
  --ui-selected-row-border-v151: #2d4734;
  --ui-danger-v151: #ffabb5;
  --ui-danger-bg-v151: #271720;
  --ui-danger-hover-v151: #451d28;
  --type-caption-v151: 12px;
  --type-meta-v151: 13px;
  --type-body-v151: 14px;
  --type-section-v151: 20px;
  --type-page-v151: 28px;
}

/* One font family and standard weights that render the same in Chrome and Safari. */
#root#root,
#root#root :is(button, input, select, textarea) {
  font-family: Arial, Helvetica, sans-serif !important;
}
#root#root :is(button, [role="button"], summary) {
  font-weight: 700 !important;
}
#root#root .page-title-v102 > h1 {
  font-size: var(--type-page-v151) !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}
#root#root :is(.panel-heading, .v95-list-heading) > h2,
#root#root .usage-page-v11 > :is(.usage-models-v11, .usage-list-v11) > .panel-heading h2 {
  font-size: var(--type-section-v151) !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
}
#root#root :is(.analysis-settings-title-v133, .settings-choice-title-v135) > h2,
#root#root .prompt-card-v140 h2,
#root#root .settings-data-danger-v149 h2 {
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
}
#root#root .pick-table-v72 > thead th {
  font-size: var(--type-caption-v151) !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  letter-spacing: .12em !important;
}
#root#root :is(.v95-button, .history-select-all, .history-delete-selected, .image-download-button-v24,
  .type-details-button, .model-configure-button-v25, .settings-choice-change-v135,
  .settings-notification-toggle-v15, .notification-test-button-v49, .provider-link-v125,
  .settings-data-reset-v149) {
  font-size: var(--type-body-v151) !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
}
#root#root :is(.analysis-model-field-v133 > span, .manual-range-label-v122) {
  font-size: var(--type-body-v151) !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
}
#root#root :is(.analysis-model-stats-v133 dt, .schedule-preview-v130 > small,
  .v95-stat > small, .v95-stat > span, .analysis-run-row-v134 small) {
  font-size: var(--type-caption-v151) !important;
  line-height: 1.5 !important;
}
#root#root :is(.analysis-launch-v133, .settings-choice-copy-v135 > small,
  .prompt-card-v140 p, .settings-data-danger-v149 p) {
  font-size: var(--type-meta-v151) !important;
  line-height: 1.5 !important;
}

/* Neutral hover belongs only to a real mouse/trackpad. */
@media (hover: hover) and (pointer: fine) {
  #root#root#root :is(button, a[href], summary, [role="button"], [role="option"], label:has(> input[type="checkbox"]), .upload-avatar-button):hover:not(:disabled):not([aria-disabled="true"]):not(.run-button):not(.settings-save-v83):not(.modal-confirm):not(.history-delete-selected):not(.remove-avatar-button):not(.analysis-cancel-v113):not(.settings-data-reset-v149):not(.active):not(.selected):not([aria-selected="true"]):not([aria-pressed="true"]):not(:has(> input:checked)) {
    background-color: var(--ui-hover-v151) !important;
    border-color: var(--ui-hover-border-v151) !important;
    box-shadow: none !important;
    filter: none !important;
    transform: none !important;
  }

  #root#root#root :is(.market-explain-button-v49, .odds-chip, .quality-chip:is(button),
    .type-details-button, .settings-choice-change-v135, .provider-link-v125,
    .model-configure-button-v25, .image-download-button-v24):hover:not(:disabled) {
    background-color: var(--ui-hover-v151) !important;
    border-color: var(--ui-hover-border-v151) !important;
    box-shadow: none !important;
    filter: none !important;
    transform: none !important;
  }

  #root#root#root :is(tr.pick-row, .v96-coupon-history-item, .analysis-run-row-v134,
    .history-row, .v95-coupon-summary):hover:not(.selected) {
    background-color: var(--ui-hover-v151) !important;
    border-color: var(--ui-hover-border-v151) !important;
    box-shadow: none !important;
  }
  #root#root#root tr.pick-row:hover:not(.selected) > td {
    background-color: var(--ui-hover-v151) !important;
  }

  /* An unchecked selector shows its small square only. */
  #root#root#root .v96-selection[aria-pressed="false"]:hover {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  #root#root#root .v96-selection[aria-pressed="false"]:hover .selection-box {
    background: var(--ui-hover-v151) !important;
    border-color: var(--ui-hover-border-v151) !important;
    box-shadow: none !important;
  }
}

/* A checked square is green in every state, including hover and press. */
#root#root#root .v96-selection[aria-pressed="true"] .selection-box.checked,
#root#root#root .v96-selection[aria-pressed="true"]:is(:hover, :active, :focus-visible) .selection-box.checked {
  color: #07100a !important;
  background: #91ff00 !important;
  border-color: #91ff00 !important;
  box-shadow: none !important;
}
#root#root#root .v96-selection[aria-pressed="true"]:is(:hover, :active) {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Selected records share one quiet green fill, with neutral separators and no green stripes. */
#root#root#root .table-wrap.v96-selectable-picks tr.pick-row.selected,
#root#root#root .table-wrap.v96-selectable-picks tr.pick-row.selected:is(:hover, :active),
#root#root#root .table-wrap.v96-selectable-picks tr.pick-row.selected > td,
#root#root#root .v96-coupon-history-item.selected,
#root#root#root .v96-coupon-history-item.selected:is(:hover, :active),
#root#root#root .v96-coupon-history-item.selected .v95-coupon-summary,
#root#root#root .analysis-run-row-v134.selected,
#root#root#root .analysis-run-row-v134.selected:is(:hover, :active),
#root#root#root .history-row.selected,
#root#root#root .history-row.selected:is(:hover, :active) {
  background-color: var(--ui-selected-row-v151) !important;
  border-color: var(--ui-selected-row-border-v151) !important;
  box-shadow: none !important;
}
#root#root#root .table-wrap.v96-selectable-picks tr.pick-row.selected > td {
  border-bottom-color: #2b3e50 !important;
}

/* Destructive actions never turn white or neutral. */
#root#root#root :is(.history-delete-selected, .remove-avatar-button, .analysis-cancel-v113, .settings-data-reset-v149) {
  color: var(--ui-danger-v151) !important;
  background: var(--ui-danger-bg-v151) !important;
  border-color: #8f4b59 !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
}
#root#root#root :is(.history-delete-selected, .remove-avatar-button, .analysis-cancel-v113, .settings-data-reset-v149):is(:hover, :active, :focus-visible):not(:disabled) {
  color: #ffd8dd !important;
  background: var(--ui-danger-hover-v151) !important;
  border-color: #d36f80 !important;
}

/* Keyboard focus is visible, but mouse hover never receives an extra outline. */
#root#root#root :is(button, a[href], summary, [role="button"], [role="option"]):focus-visible {
  outline: 2px solid #87bff0 !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
  transform: none !important;
}

/* The date/day controls now fit their actual date labels more closely. */
@media (min-width: 761px) {
  #root#root .analysis-range-v133 .schedule-fields-v130 {
    grid-template-columns: repeat(2, minmax(0, 230px)) !important;
    width: fit-content !important;
    max-width: 100% !important;
  }
  #root#root .analysis-range-v133 .schedule-field-v130 {
    width: 230px !important;
    max-width: 100%;
  }
  #root#root .schedule-field-v130 .manual-range-inputs-v122 {
    grid-template-columns: minmax(0, 1fr) 74px !important;
  }
}

/* Touch devices keep deliberate selection, without sticky hover feedback. */
@media (hover: none), (pointer: coarse) {
  #root#root * { -webkit-tap-highlight-color: transparent; }
  #root#root :is(tr.pick-row, .v96-coupon-history-item, .analysis-run-row-v134,
    .history-row, .v95-coupon-summary):hover:not(.selected),
  #root#root tr.pick-row:hover:not(.selected) > td {
    background-color: transparent !important;
    box-shadow: none !important;
  }
  #root#root .v96-selection:is(:hover, :active) {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
  }
}

@media (max-width: 760px) {
  #root#root .page-title-v102 > h1 { font-size: 24px !important; }
  #root#root .analysis-range-v133 .schedule-field-v130 { width: 100% !important; }
}

@media (prefers-reduced-motion: reduce) {
  #root#root :is(button, a[href], summary, [role="button"], [role="option"]) {
    transition: none !important;
  }
}
