.calculator-page .result-notices,
.podsort-page .result-notices {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 8px 14px;
  border: 1px solid #d4deec;
  border-radius: 10px;
  background: #f8fbff;
  color: #25344f;
  font-size: 13px;
  line-height: 1.35;
}
.result-notices__count { font-weight: 700; font-variant-numeric: tabular-nums; }
.result-notices__partial { padding: 2px 7px; border-radius: 6px; background: #fff1d8; color: #8a4b10; font-size: 11px; font-weight: 700; }
.result-notices__stale { padding: 2px 7px; border-radius: 6px; background: #fff1d8; color: #8a4b10; font-size: 11px; font-weight: 700; }
.result-notices__dates { color: #725122; font-size: 12px; }
.podsort-stale-option {
  padding: 8px 14px;
  border: 1px solid #e7d19b;
  border-radius: 10px;
  background: #fffaf0;
  color: #62461d;
}
.podsort-stale-option label { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 9px; cursor: pointer; font-size: 13px; font-weight: 650; }
.podsort-stale-option input { margin: 0; width: 16px; height: 16px; accent-color: #a96813; }
.podsort-stale-option small { color: #806c4f; font-size: 11px; font-weight: 400; }
.podsort-storage-disclosure { border: 1px solid #d4deec; border-radius: 10px; background: #fff; }
.podsort-storage-disclosure > summary { display: list-item; margin-left: 28px; padding: 9px 12px 9px 0; cursor: pointer; color: #2457ad; font-size: 13px; font-weight: 650; }
.podsort-storage-disclosure > summary:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.podsort-storage-disclosure > .storage-status-panel { margin: 0; border: 0; border-top: 1px solid #d4deec; box-shadow: none; }
.podsort-error-notice { font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.podsort-error-notice summary { margin-top: 5px; cursor: pointer; font-weight: 650; }
.podsort-error-notice__body { max-height: 45vh; margin-top: 8px; overflow: auto; white-space: pre-wrap; font-weight: 400; }
.result-notices__detail { position: relative; }
.result-notices__detail summary {
  display: list-item;
  cursor: pointer;
  color: #2457ad;
  font-weight: 600;
  white-space: nowrap;
}
.result-notices__detail summary:hover { text-decoration: underline; }
.result-notices__detail summary:focus-visible { outline: 2px solid #2563eb; outline-offset: 3px; border-radius: 3px; }
.result-notices__body {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 30;
  box-sizing: border-box;
  width: min(570px, calc(100vw - 48px));
  max-height: min(52vh, 480px);
  overflow: auto;
  padding: 12px 16px;
  border: 1px solid #c7d6ee;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 40px #1d376026;
  color: #26344d;
  font-weight: 400;
  white-space: normal;
}
.result-notices__body ul { margin: 0; padding-left: 18px; }
.result-notices__body li + li { margin-top: 6px; }
.result-notices__body small { display: block; margin-top: 8px; color: #64748b; }
.calculator-page .calc-selection.panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 7px 14px;
}
.calculator-page .calc-selection .ops-section-head { display: flex; align-items: center; gap: 16px; min-height: 0; margin: 0; padding: 0; border: 0; }
.calculator-page .calc-selection h2 { margin: 0; font-size: 14px; white-space: nowrap; }
.calculator-page .calc-selection small { margin: 0; color: #64748b; font-size: 12px; }
.calculator-page .calc-selection .segmented-control button { min-height: 32px; }

/* Results workspaces keep their filters in the document flow on desktop. */
@media (min-width: 901px) {
  .app-shell .calculator-page,
  .app-shell .podsort-page,
  .app-shell .ops-page:has(> .ops-filter-panel .rnp-filters) {
    box-sizing: border-box;
    padding-right: 0 !important;
  }

  .app-shell.app-shell .calculator-page > .calc-scope,
  .app-shell.app-shell .podsort-page > .ops-filter-panel,
  .app-shell.app-shell .ops-page:has(> .ops-filter-panel .rnp-filters) > .ops-filter-panel {
    position: static !important;
    z-index: auto !important;
    inset: auto !important;
    box-sizing: border-box;
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    overflow: visible !important;
    scrollbar-gutter: auto !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    transform: none !important;
    clip-path: none !important;
    transition: none !important;
    will-change: auto !important;
    pointer-events: auto !important;
  }

  .app-shell .calculator-page > .calc-scope::after,
  .app-shell .podsort-page > .ops-filter-panel::after,
  .app-shell .ops-page:has(> .ops-filter-panel .rnp-filters) > .ops-filter-panel::after {
    content: none !important;
    display: none !important;
  }

  .app-shell .calculator-page > .calc-scope .calc-main-fields > .ops-field:first-child,
  .app-shell .podsort-page > .ops-filter-panel .podsort-filters > .ops-field:nth-child(2),
  .app-shell .ops-page:has(> .ops-filter-panel .rnp-filters) > .ops-filter-panel .rnp-filters > .ops-field:first-child {
    grid-column: auto !important;
  }
  .app-shell .calculator-page > .calc-scope .advanced-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .app-shell .calculator-page > .calc-scope .file-inputs { flex-direction: row; }
  .app-shell .calculator-page > .calc-scope .file-inputs label { width: 240px; }

  .app-shell:has(.calculator-page) .filter-dock-toggle,
  .app-shell:has(.podsort-page) .filter-dock-toggle,
  .app-shell:has(.ops-page > .ops-filter-panel .rnp-filters) .filter-dock-toggle {
    display: none;
  }

  body.sphere-table-fullscreen .app-shell:has(.calculator-page) .table-viewport.is-fullscreen,
  body.sphere-table-fullscreen .app-shell:has(.podsort-page) .table-viewport.is-fullscreen,
  body.sphere-table-fullscreen .app-shell:has(.ops-page > .ops-filter-panel .rnp-filters) .table-viewport.is-fullscreen {
    right: 0;
  }
}
@media (min-width: 1700px) {
  .calculator-page, .podsort-page { gap: 10px; }
  .calculator-page .page-header, .podsort-page .page-header { margin-bottom: 2px; }
  .calculator-page .page-header p, .podsort-page .page-header p { margin-bottom: 0; }
  .calculator-page .calc-scope, .podsort-page > .ops-filter-panel { padding-top: 12px; padding-bottom: 0; }
  .calculator-page .calc-main-fields, .podsort-page .podsort-filters { gap: 8px 12px; }
  .calculator-page .calc-scope-footer, .podsort-page .ops-filter-footer { min-height: 44px; }
  .calculator-page .calc-selection.panel { min-height: 42px; }
  .podsort-stale-option { padding-top: 6px; padding-bottom: 6px; }
  .calculator-page .calc-workspace, .podsort-page .podsort-workspace { margin-top: 0; }
}
@media (max-width: 700px) {
  .calculator-page .result-notices, .podsort-page .result-notices { gap: 7px 14px; }
  .result-notices__body { position: static; width: min(100%, calc(100vw - 48px)); max-height: 52vh; margin-top: 8px; }
  .result-notices__detail[open] { flex-basis: 100%; }
  .calculator-page .calc-selection.panel, .calculator-page .calc-selection .ops-section-head { align-items: flex-start; }
  .calculator-page .calc-selection .ops-section-head { flex-wrap: wrap; gap: 7px 12px; }
}
