.pareto-page {
  --pareto-line: color-mix(in srgb, var(--border) 78%, transparent);
  width: 100%;
  min-width: 0;
  max-width: 1440px;
  margin: 0 auto;
  color: var(--text);
}
.pareto-page > *, .pareto-page .pareto-workspace > * { min-width: 0; }
.pareto-page :is(h1,h2,h3,p) { margin: 0; }
.pareto-page .pareto-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 24px; }
.pareto-page .pareto-heading h1 { font-family: var(--font-display); font-size: 44px; font-weight: 500; line-height: 1.05; letter-spacing: -.3px; }
.pareto-page .pareto-heading > button { flex-shrink: 0; }
.pareto-page button { min-height: 35px; padding: 7px 12px; border-radius: 3px; font-family: inherit; font-size: 12px; font-weight: 500; box-shadow: none; }
.pareto-page button.primary { border-color: var(--accent-deep); background: var(--accent-deep); color: var(--on-accent); box-shadow: none; }
.pareto-page button.primary:hover:not(:disabled) { border-color: var(--accent); background: var(--accent); }
.pareto-page :is(a,button,input,select,summary):focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; }
.pareto-page :disabled { cursor: default; opacity: .55; }
.pareto-page .pareto-filters { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px 15px; padding: 16px 0; border-block: 1px solid var(--pareto-line); }
.pareto-page .pareto-filters > label, .pareto-page .pareto-filters > .field { display: grid; gap: 6px; flex: 0 1 145px; min-width: 130px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.pareto-page .pareto-filters :is(input,select) { width: 100%; min-width: 0; height: 35px; min-height: 35px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 3px; background: var(--surface-input); color: var(--text); font-family: inherit; font-size: 12px; box-shadow: none; }
.pareto-page .pareto-presets { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin-left: auto; }
.pareto-page .pareto-presets > button { min-height: 33px; padding: 6px 8px; border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 11px; font-weight: 400; }
.pareto-page .pareto-presets > button:hover:not(:disabled) { background: var(--surface-hover); color: var(--text); }
.pareto-page .pareto-presets > button[aria-pressed="true"] { border-color: var(--border); color: var(--text); }
.pareto-page .pareto-filter-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 15px; min-width: 0; }
.pareto-page .pareto-filter-actions > a { display: inline-flex; align-items: center; min-height: 35px; padding: 6px 0; color: var(--muted); font-size: 12px; text-decoration: none; }
.pareto-page .pareto-filter-actions > a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.pareto-page .pareto-message { margin-top: 13px; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.pareto-page .pareto-message[data-error="true"] { color: var(--warning); }
.pareto-page .pareto-message:empty { display: none; }
.pareto-page .pareto-dirty { margin-top: 13px; color: var(--warning); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.pareto-page .pareto-overview { display: grid; grid-template-columns: minmax(200px,.75fr) minmax(0,1.6fr); align-items: end; gap: 24px 42px; padding: 28px 0 30px; }
.pareto-page .pareto-total { display: grid; gap: 8px; min-width: 0; }
.pareto-page .pareto-total > span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.pareto-page .pareto-total > strong { color: var(--text); font-family: var(--font-display); font-size: 48px; font-weight: 500; line-height: 1; letter-spacing: -.4px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pareto-page .pareto-insight { display: grid; gap: 6px; max-width: 470px; padding-bottom: 3px; color: var(--muted); font-size: 13px; line-height: 1.65; text-wrap: pretty; }
.pareto-page .pareto-insight strong { color: var(--text); font-family: var(--font-display); font-size: 29px; font-weight: 500; line-height: 1.1; }
.pareto-page .pareto-applied { margin: 0 0 17px; color: var(--muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.pareto-page .pareto-total > .pareto-applied { margin: 0; }
.pareto-page .pareto-workspace { display: grid; grid-template-columns: minmax(0,2fr) minmax(250px,.9fr); align-items: start; gap: 34px; }
.pareto-page .pareto-ranking { min-width: 0; }
.pareto-page .pareto-ranking > header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 18px; min-height: 56px; padding-bottom: 17px; }
.pareto-page :is(.pareto-ranking,.pareto-history) h2 { color: var(--text); font-family: var(--font-display); font-size: 28px; font-weight: 500; line-height: 1.1; letter-spacing: -.1px; }
.pareto-page .pareto-ranking > header > label { display: grid; gap: 5px; flex: 1 1 170px; max-width: 235px; min-width: 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.pareto-page .pareto-ranking > header input { width: 100%; min-width: 0; min-height: 33px; padding: 6px 0; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; color: var(--text); font-family: inherit; font-size: 12px; box-shadow: none; }
.pareto-page .pareto-rank-head, .pareto-page .pareto-ranks > li { display: grid; grid-template-columns: 25px minmax(0,1fr) 58px 105px 69px; align-items: center; gap: 13px; }
.pareto-page .pareto-rank-head { padding: 11px 0; border-block: 1px solid var(--pareto-line); color: var(--muted); font-size: 10px; line-height: 1.4; }
.pareto-page .pareto-rank-head > :nth-child(n+3) { text-align: right; }
.pareto-page .pareto-ranks { margin: 0; padding: 0; list-style: none; }
.pareto-page .pareto-ranks > li { position: relative; min-width: 0; min-height: 89px; padding: 18px 0; border-bottom: 1px solid var(--pareto-line); }
.pareto-page .pareto-ranks > li > * { min-width: 0; }
.pareto-page .pareto-ranks > li.pareto-priority-end { margin-bottom: 8px; padding-bottom: 24px; border-bottom: 2px solid var(--accent-deep); }
.pareto-page .pareto-rank-number { align-self: start; padding-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.pareto-page .pareto-product { display: grid; justify-items: start; gap: 6px; }
.pareto-page .pareto-product > :is(a,strong) { color: var(--text); font-size: 14px; font-weight: 500; line-height: 1.4; text-decoration: none; overflow-wrap: anywhere; }
.pareto-page .pareto-product > a:hover { color: var(--accent-bright); text-decoration: underline; text-underline-offset: 3px; }
.pareto-page .pareto-product > small { color: var(--muted); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.pareto-page .pareto-rank-select { display: grid; justify-items: end; gap: 4px; padding: 4px 0; color: var(--text); text-align: right; text-decoration: none; }
.pareto-page .pareto-rank-select > strong { font-family: var(--font-display); font-size: 29px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.pareto-page .pareto-rank-select > span { color: var(--muted); font-size: 10px; line-height: 1.3; }
.pareto-page .pareto-rank-select:hover > strong { color: var(--accent-bright); }
.pareto-page .pareto-rank-select[aria-current="true"] > strong, .pareto-page .pareto-rank-select[aria-current="page"] > strong { color: var(--accent-bright); }
.pareto-page .pareto-share { display: grid; align-content: center; gap: 8px; }
.pareto-page .pareto-share > span { color: var(--text); font-size: 12px; line-height: 1.4; text-align: right; font-variant-numeric: tabular-nums; }
.pareto-page .pareto-share-bar, .pareto-page .pareto-share > .bar { display: block; width: 100%; height: 4px; min-width: 0; margin: 0; overflow: hidden; border-radius: 0; background: var(--surface-hover); }
.pareto-page .pareto-share-bar > i, .pareto-page .pareto-share > .bar > i { display: block; height: 100%; max-width: 100%; border-radius: 0; background: var(--accent); }
.pareto-page .pareto-cumulative { color: var(--muted); font-size: 12px; line-height: 1.5; text-align: right; font-variant-numeric: tabular-nums; }
.pareto-page .pareto-cumulative > strong { color: inherit; font-size: inherit; font-weight: 400; }
.pareto-page :is(.pareto-share,.pareto-cumulative) > small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pareto-page .pareto-priority-end .pareto-cumulative { color: var(--text); font-weight: 500; }
.pareto-page .pareto-ranking > footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 16px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.pareto-page .pareto-ranking > footer :is(a,button) { min-height: 32px; padding: 5px 0; border: 0; border-radius: 0; background: transparent; color: var(--text); font-size: 12px; text-decoration: none; }
.pareto-page .pareto-ranking > footer :is(a,button):hover { color: var(--accent-bright); text-decoration: underline; text-underline-offset: 3px; }
.pareto-page .pareto-history { min-width: 0; padding-left: 25px; border-left: 1px solid var(--pareto-line); }
.pareto-page .pareto-history > header { display: grid; justify-items: start; gap: 9px; min-width: 0; margin-bottom: 18px; }
.pareto-page .pareto-history > header :is(p,strong,small) { min-width: 0; color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.5; overflow-wrap: anywhere; }
.pareto-page .pareto-history > header > a { color: var(--text); font-size: 11px; line-height: 1.5; text-decoration: none; }
.pareto-page .pareto-history > header > a:hover { color: var(--accent-bright); text-decoration: underline; text-underline-offset: 3px; }
.pareto-page .pareto-records { min-width: 0; margin: 0; padding: 0; }
.pareto-page .pareto-records > details { min-width: 0; border-top: 1px solid var(--pareto-line); }
.pareto-page .pareto-records > details:last-child { border-bottom: 1px solid var(--pareto-line); }
.pareto-page .pareto-records > details > summary { position: relative; display: grid; gap: 6px; min-width: 0; padding: 15px 19px 15px 0; cursor: pointer; list-style: none; }
.pareto-page .pareto-records > details > summary::-webkit-details-marker { display: none; }
.pareto-page .pareto-records > details > summary::after { content: ''; position: absolute; top: 20px; right: 2px; width: 6px; height: 6px; border-right: 1px solid var(--muted); border-bottom: 1px solid var(--muted); transform: rotate(45deg); }
.pareto-page .pareto-records > details[open] > summary::after { transform: rotate(225deg); }
.pareto-page .pareto-records > details > summary time { color: var(--muted); font-size: 10px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.pareto-page .pareto-records > details > summary strong { color: var(--text); font-size: 12px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.pareto-page .pareto-records > details > summary > span { color: var(--muted); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.pareto-page .pareto-records > details > summary:hover strong { color: var(--accent-bright); }
.pareto-page .pareto-records > details > :not(summary) { min-width: 0; margin: 0; padding: 0 0 15px; color: var(--muted); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.pareto-page .pareto-records > details > :not(summary) p + p { margin-top: 7px; }
.pareto-page .pareto-records > details > :not(summary) strong { color: var(--text); font-weight: 400; }
.pareto-page .pareto-history > footer { margin-top: 14px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.pareto-page .pareto-history > button { margin-top: 14px; padding-inline: 0; border: 0; border-radius: 0; background: transparent; color: var(--text); font-size: 11px; font-weight: 400; }
.pareto-page .pareto-history > button:hover:not(:disabled) { color: var(--accent-bright); text-decoration: underline; text-underline-offset: 3px; }
.pareto-page .pareto-empty { padding: 28px 0; color: var(--muted); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.pareto-page [hidden] { display: none; }
#modal[open]:has(.missed-request-form) { display: flex; flex-direction: column; width: min(520px,calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 40px); padding: 0; overflow: hidden; border-radius: 5px; background: var(--surface); }
#modal:has(.missed-request-form) > .modal-head { flex-shrink: 0; gap: 16px; padding: 17px 22px; background: var(--surface); }
#modal:has(.missed-request-form) > .modal-head h2 { margin: 0; font-family: var(--font-display); font-size: 29px; font-weight: 500; line-height: 1.1; }
#modal:has(.missed-request-form) > .modal-body { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; min-height: 0; padding: 0; overflow: hidden; }
#modal .missed-request-form { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; min-height: 0; margin: 0; }
#modal .missed-request-content { min-width: 0; min-height: 0; padding: 20px 22px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
#modal .missed-request-fields { display: grid; gap: 16px; min-width: 0; margin: 0; padding: 0; border: 0; }
#modal .missed-request-form label { display: grid; gap: 7px; min-width: 0; color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.5; }
#modal .missed-request-form :is(input,select,textarea) { width: 100%; min-width: 0; min-height: 37px; padding: 8px 9px; border: 1px solid var(--border); border-radius: 3px; background: var(--surface-input); color: var(--text); font-family: inherit; font-size: 13px; line-height: 1.5; box-shadow: none; }
#modal .missed-request-search input { min-height: 42px; font-size: 15px; }
#modal .missed-request-form textarea { min-height: 73px; max-height: 170px; resize: vertical; }
#modal .missed-request-form :is(button,input,select,textarea,summary):focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; }
#modal .missed-request-picker { min-width: 0; }
#modal .missed-request-results { max-height: min(180px,30dvh); margin: 8px 0 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; border-block: 1px solid var(--border); list-style: none; }
#modal .missed-request-results > li { margin: 0; padding: 0; }
#modal .missed-request-results > li + li { border-top: 1px solid var(--border); }
#modal .missed-request-results [data-missed-product] { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 43px; padding: 9px 8px; border: 0; border-radius: 0; background: transparent; color: var(--text); font-family: inherit; font-size: 12px; font-weight: 400; line-height: 1.5; text-align: left; box-shadow: none; }
#modal .missed-request-results [data-missed-product] > * { min-width: 0; overflow-wrap: anywhere; }
#modal .missed-request-results [data-missed-product] strong { font-weight: 500; }
#modal .missed-request-results [data-missed-product] small { color: var(--muted); font-size: 10px; }
#modal .missed-request-results [data-missed-product]:hover:not(:disabled), #modal .missed-request-results [data-missed-product]:focus-visible, #modal .missed-request-results [data-missed-product][aria-current="true"] { background: var(--surface-hover); }
#modal .missed-request-free, #modal .missed-request-selection [data-missed-unlink] { min-height: 30px; padding: 5px 0; border: 0; border-radius: 0; background: transparent; color: var(--green); font-family: inherit; font-size: 11px; font-weight: 400; line-height: 1.5; text-align: left; overflow-wrap: anywhere; box-shadow: none; }
#modal .missed-request-free:hover:not(:disabled), #modal .missed-request-selection [data-missed-unlink]:hover:not(:disabled) { color: var(--accent-bright); text-decoration: underline; text-underline-offset: 3px; }
#modal .missed-request-selection { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 13px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
#modal .missed-request-selection strong { color: var(--text); font-weight: 500; }
#modal .missed-request-quantity { width: 155px; max-width: 100%; }
#modal .missed-request-quantity input { font-variant-numeric: tabular-nums; }
#modal .missed-request-more { min-width: 0; }
#modal .missed-request-more > summary { width: fit-content; padding: 3px 0; color: var(--muted); cursor: pointer; font-size: 12px; line-height: 1.5; }
#modal .missed-request-more > summary:hover { color: var(--text); }
#modal .missed-request-more > :not(summary) { margin-top: 14px; }
#modal .missed-request-message { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
#modal .missed-request-message[data-error="true"] { color: var(--warning); }
#modal .missed-request-message:empty { display: none; }
#modal .missed-request-footer { display: flex; align-items: center; justify-content: flex-end; flex-shrink: 0; flex-wrap: wrap; gap: 9px; margin: 0; padding: 14px 22px 17px; border-top: 1px solid var(--border); background: var(--surface); }
#modal .missed-request-footer button { min-height: 36px; padding: 8px 13px; border: 1px solid var(--border); border-radius: 3px; background: transparent; color: var(--text); font-family: inherit; font-size: 12px; font-weight: 500; box-shadow: none; }
#modal .missed-request-footer button:hover:not(:disabled) { background: var(--surface-hover); }
#modal .missed-request-footer [data-missed-submit] { border-color: var(--accent-deep); background: var(--accent-deep); color: var(--on-accent); }
#modal .missed-request-footer [data-missed-submit]:hover:not(:disabled) { border-color: var(--accent); background: var(--accent); }
#modal .missed-request-form :is(input,select,textarea,button):disabled { cursor: default; opacity: .55; }
#modal .missed-request-form [hidden] { display: none; }
@media (max-width: 1100px) {
  .pareto-page .pareto-workspace { grid-template-columns: minmax(0,1fr); gap: 30px; }
  .pareto-page .pareto-history { padding: 24px 0 0; border: 0; border-top: 1px solid var(--pareto-line); }
  .pareto-page .pareto-history > header { grid-template-columns: minmax(0,1fr) auto; align-items: baseline; gap: 8px 20px; }
  .pareto-page .pareto-history > header h2 { grid-column: 1; }
  .pareto-page .pareto-history > header > a { grid-column: 2; grid-row: 1; }
  .pareto-page .pareto-history > header > :is(p,strong,small) { grid-column: 1 / -1; }
  .pareto-page .pareto-records > details > summary { grid-template-columns: 140px minmax(0,1fr) minmax(120px,.7fr); align-items: baseline; gap: 14px; }
  .pareto-page .pareto-records > details > :not(summary) { padding-left: 154px; }
}
@media (max-width: 760px) {
  .pareto-page .pareto-heading { align-items: flex-start; flex-wrap: wrap; gap: 14px; padding-bottom: 18px; }
  .pareto-page .pareto-heading h1 { font-size: 37px; }
  .pareto-page .pareto-filters { gap: 12px; }
  .pareto-page .pareto-filters > label, .pareto-page .pareto-filters > .field { flex: 1 1 calc(50% - 12px); min-width: 125px; }
  .pareto-page .pareto-presets { flex: 1 1 165px; margin-left: 0; }
  .pareto-page .pareto-overview { grid-template-columns: minmax(0,.75fr) minmax(0,1.4fr); gap: 18px; padding-block: 23px; }
  .pareto-page .pareto-total > strong { font-size: 44px; }
  .pareto-page .pareto-insight { max-width: none; font-size: 13px; line-height: 1.6; }
  .pareto-page .pareto-ranking > header { align-items: flex-end; gap: 13px; }
  .pareto-page :is(.pareto-ranking,.pareto-history) h2 { font-size: 26px; }
  .pareto-page .pareto-rank-head { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
  .pareto-page .pareto-ranks { border-top: 1px solid var(--pareto-line); }
  .pareto-page .pareto-ranks > li { grid-template-columns: 23px repeat(3,minmax(0,1fr)); grid-template-areas: 'position product product product' '. requests share cumulative'; align-items: end; gap: 15px 13px; min-height: 0; padding-block: 17px; }
  .pareto-page .pareto-rank-number { grid-area: position; }
  .pareto-page .pareto-product { grid-area: product; }
  .pareto-page .pareto-rank-select { grid-area: requests; justify-items: start; text-align: left; }
  .pareto-page .pareto-rank-select > strong { font-size: 26px; }
  .pareto-page .pareto-share { grid-area: share; align-self: stretch; align-content: end; gap: 5px; }
  .pareto-page .pareto-cumulative { display: grid; grid-area: cumulative; gap: 5px; align-content: end; padding-bottom: 7px; }
  .pareto-page :is(.pareto-share,.pareto-cumulative) > small { position: static; display: block; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; color: var(--muted); font-size: 10px; line-height: 1.4; text-align: right; }
  .pareto-page .pareto-share > span, .pareto-page .pareto-cumulative > strong { font-size: 13px; }
  .pareto-page .pareto-records > details > summary { grid-template-columns: minmax(0,1fr); gap: 6px; }
  .pareto-page .pareto-records > details > :not(summary) { padding-left: 0; }
  #modal[open]:has(.missed-request-form) { width: calc(100vw - 24px); max-width: 520px; max-height: calc(100dvh - 24px); }
  #modal:has(.missed-request-form) > .modal-head { padding: 16px 18px; }
  #modal .missed-request-content { padding: 18px; }
  #modal .missed-request-footer { padding: 13px 18px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .pareto-page *, .pareto-page *::before, .pareto-page *::after, #modal:has(.missed-request-form), #modal .missed-request-form * { animation: none; transition: none; scroll-behavior: auto; }
}
