/* Attack comparisons share the Price Check palette and work without JavaScript. */
.ap-history-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 40px; padding: 5px 9px; margin-left: -9px; border: 1px solid transparent; border-radius: 9px; color: var(--ink); text-decoration: none; transition: color .15s, background .15s, border-color .15s; }
.ap-history-link:hover { color: var(--accent-ink); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 22%, var(--line)); }
.ap-history-link:focus-visible, .ap-selector a:focus-visible, .ap-item:focus-visible, .ap-method summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 7px; }
.ap-section { margin-bottom: 20px; scroll-margin-top: calc(var(--topbar-h) + 78px); }
.ap-section .ap-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; padding: 24px 26px 18px; }
.ap-heading h2 { margin: 0 0 7px; font-size: 21px; }
.ap-heading p { margin: 0; color: var(--ink-3); font-size: 15px; }
.ap-heading-tools { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ap-period { order: 2; flex: none; color: var(--ink-3); font-size: 12px; font-weight: 550; white-space: nowrap; }
.ap-selector-wrap { padding: 0; }
.ap-selector { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--card-2); }
.ap-selector a { display: flex; align-items: center; min-height: 40px; padding: 7px 13px; border-radius: 999px; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.ap-selector a:hover { color: var(--accent-ink); background: var(--accent-soft); }
.ap-selector a.on { color: var(--accent-ink); background: var(--accent-soft); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent); }
.ap-plot-wrap { padding: 0 22px 10px; }
.ap-key { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 0 6px 2px; padding: 0; list-style: none; color: var(--ink-2); font-size: 13px; }
.ap-key li { display: inline-flex; align-items: center; gap: 8px; }
.ap-key i { display: inline-block; flex: none; width: 9px; height: 9px; }
.ap-key-median { border-radius: 50%; background: var(--accent); }
.ap-key-scrolled { background: var(--violet); transform: rotate(45deg); }
.ap-key .ap-key-ask { width: 10px; height: 10px; border: 2px solid var(--blue); border-radius: 50%; }
.ap-key .ap-key-range { width: 7px; height: 15px; border-top: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); background: linear-gradient(var(--ink-3), var(--ink-3)) center / 2px 100% no-repeat; opacity: .7; }
.ap-chart-scroll { position: relative; overflow-x: auto; padding: 5px 0; scrollbar-width: thin; }
.ap-chart { display: block; width: 100%; min-width: 720px; height: auto; overflow: visible; }
.ap-axis { fill: var(--ink-3); font: 500 14px var(--font); font-variant-numeric: tabular-nums; }
.ap-axis-label { fill: var(--ink-2); font: 600 14px var(--font); }
.ap-axis.ap-axis-selected { fill: var(--accent-ink); font-weight: 750; }
.ap-selected-band { fill: var(--accent); fill-opacity: .055; }
.ap-selected-guide { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 3 5; stroke-opacity: .5; }
.ap-gridline { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 5; }
.ap-tick { stroke: var(--line-2); stroke-width: 1.5; }
.ap-mark { color: var(--accent); }
.ap-mark.ap-scrolled { color: var(--violet); }
.ap-median { fill: currentColor; stroke: var(--card); stroke-width: 2; }
.ap-whisker, .ap-cap { stroke: currentColor; stroke-width: 3; stroke-opacity: .45; }
.ap-ask { fill: transparent; stroke: var(--blue); stroke-width: 2.5; }
.ap-mark:hover .ap-median, .ap-mark:focus .ap-median { stroke: var(--ink); stroke-width: 2; }
.ap-mark:hover .ap-ask, .ap-mark:focus .ap-ask { stroke-width: 4; }
.ap-mark-selected .ap-median { stroke: var(--ink); stroke-width: 2.5; }
.ap-scroll-hint { display: none; }
.ap-table-wrap { position: relative; overflow-x: auto; scrollbar-width: thin; border-top: 1px solid var(--line); }
.ap-table { margin: 0; font-size: 14px; }
table.grid.ap-table thead th { padding-top: 12px; padding-bottom: 12px; font-size: 12px; }
table.grid.ap-table tbody th { padding: 10px 16px; border-bottom: 1px solid var(--line); text-align: left; background: none; white-space: nowrap; font-weight: 700; color: var(--ink); }
table.grid.ap-table tbody td { padding-top: 10px; padding-bottom: 10px; }
.ap-table .meso { color: var(--ink-2); font-weight: 550; }
.ap-table .ap-median-col .meso { color: var(--ink); font-weight: 700; }
.ap-table .meso::before { display: none; }
.ap-table .ap-range-col { color: var(--ink-3); font-size: 13px; }
.ap-value { font-size: 19px; font-variant-numeric: tabular-nums; }
.ap-stat { display: inline-block; color: var(--ink-3); font-size: 11px; font-weight: 600; }
.ap-condition { display: inline-block; padding: 3px 9px; color: var(--accent-ink); background: var(--accent-soft); border-radius: 7px; font-size: 12px; font-weight: 650; }
.ap-condition-scrolled { color: var(--violet); background: color-mix(in srgb, var(--violet) 12%, transparent); }
.ap-few, .ap-offers { display: block; margin-top: 2px; font-size: 11px; font-weight: 500; }
.ap-few { color: var(--ink-3); }
.ap-item { display: inline-flex; align-items: center; gap: 8px; min-width: 150px; }
.ap-item b { white-space: normal; }
.ap-current { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.ap-table tbody tr:hover > th { background: var(--card-2); }
.ap-table tbody tr.ap-current > th { box-shadow: inset 3px 0 0 var(--accent); }
.ap-table tbody tr.ap-current:hover > td, .ap-table tbody tr.ap-current:hover > th { background: color-mix(in srgb, var(--accent) 7%, var(--card)); }
.ap-viewing { display: block; margin-top: 1px; color: var(--accent-ink); font-size: 11px; font-weight: 600; }
.ap-current-label { display: block; margin-left: 30px; font-size: 11px; color: var(--accent-ink); }
.ap-mobile { display: none; }
.ap-table tbody tr:target { background: var(--accent-soft); outline: 2px solid var(--accent); outline-offset: -2px; scroll-margin-top: calc(var(--topbar-h) + 90px); }
.ap-section .ap-note { padding: 14px 26px; border-top: 1px solid var(--line); background: var(--card); font-size: 13px; line-height: 1.65; }
.ap-method summary { width: fit-content; color: var(--ink-2); font-weight: 600; cursor: pointer; }
.ap-method[open] summary { margin-bottom: 9px; }
.ap-method > div { max-width: 100ch; color: var(--ink-3); }
.ap-note p { margin: 0; }
.ap-note p + p { margin-top: 5px; }
.ap-section .ap-empty { padding: 12px 26px 22px; }
.ap-empty p:first-child { margin-bottom: 5px; font-size: 16px; font-weight: 650; }
.ap-empty p:last-child { margin: 0; color: var(--ink-3); font-size: 14px; }
@media (max-width: 680px) {
  .ap-section .ap-heading { padding: 19px 16px 12px; gap: 10px; }
  .ap-heading h2 { font-size: 18px; }
  .ap-heading p { font-size: 14px; }
  .ap-heading-tools { width: 100%; gap: 10px; }
  .ap-period { font-size: 12px; }
  .ap-section[data-mode="equipment"] .ap-period { display: none; }
  .ap-selector-wrap { padding: 0; }
  .ap-selector a { padding-left: 11px; padding-right: 11px; }
  .ap-plot-wrap { padding: 0 10px 10px; }
  .ap-key { gap: 8px 15px; margin-left: 6px; font-size: 12px; }
  .ap-axis, .ap-axis-label { font-size: 18px; }
  .ap-scroll-hint { display: block; margin: 0 6px 4px; font-size: 12px; color: var(--ink-3); }
  table.grid.ap-table { width: 100%; min-width: 0; }
  .ap-range-col, .ap-trades-col { display: none; }
  .ap-section[data-mode="equipment"] .ap-identity-col, .ap-section[data-mode="stars"] .ap-attack-col { display: none; }
  .ap-mobile { display: block; }
  .ap-mobile-condition { margin-top: 4px; text-transform: none; letter-spacing: normal; }
  .ap-trade-note, .ap-star-attack { margin-top: 4px; font-size: 11px; }
  .ap-stat { display: none; }
  table.grid.ap-table thead th { padding: 11px 10px; font-size: 11px; letter-spacing: .04em; white-space: normal; }
  table.grid.ap-table tbody th, table.grid.ap-table tbody td { padding: 12px 10px; }
  .ap-item { min-width: 0; gap: 5px; font-size: 12px; }
  .ap-item .ico { width: 18px; height: 18px; }
  .ap-item b { overflow-wrap: anywhere; }
  .ap-table tbody tr.ap-current > td.ap-identity-col { box-shadow: inset 3px 0 0 var(--accent); }
  .ap-star-attack { margin-left: 23px; }
  .ap-current-label { margin-left: 23px; }
  .ap-section .ap-note { padding: 12px 16px; }
  .ap-section .ap-empty { padding: 10px 16px 18px; }
}
