/* Comparison owns its layout; shared UI owns colors, typography and controls. */
.plan-compare-page .pc-back {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 13px;
}
.plan-compare-page .tool-hero {
  margin-bottom: 20px;
}
.plan-compare-page .tool-hero > div {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.plan-compare-page .tool-hero h1 {
  margin: 0;
}
#planCompareContent {
  overflow-anchor: none;
}
.pc-board {
  --pc-label-width: 190px;
  --pc-plan-width: 450px;
  --pc-table-width: 100%;
  --pc-view-width: 100%;
  --pc-header-offset: 92px;
  --pc-dock-height: 170px;
  position: relative;
  isolation: isolate;
}
.pc-dock {
  position: sticky;
  top: var(--pc-header-offset);
  z-index: 20;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--bg-secondary);
  box-shadow: var(--shadow-md);
}
.pc-short-viewport .pc-dock {
  position: relative;
  top: auto;
}
.pc-dock-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 5px 14px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  border-radius: inherit;
  font-size: 13px;
}
.pc-dock-tools > a {
  color: var(--text-secondary);
  white-space: nowrap;
}
.pc-position {
  color: var(--text-secondary);
  font-size: 12px;
}
.pc-dock-tools .pc-add {
  margin-left: auto;
}
.pc-head-scroll,
.pc-body-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
.pc-head-scroll {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.pc-body-scroll {
  border: 1px solid var(--border-color);
  border-top: 0;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: var(--bg-secondary);
  scrollbar-width: none;
}
.pc-body-scroll::-webkit-scrollbar {
  display: none;
}
.pc-comparison {
  table-layout: fixed;
  width: var(--pc-table-width);
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  line-height: 1.4;
}
.pc-comparison col:first-child {
  width: var(--pc-label-width);
}
.pc-comparison col:not(:first-child) {
  width: var(--pc-plan-width);
}
.pc-comparison th,
.pc-comparison td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  font-weight: 400;
}
.pc-comparison tr:not(.pc-section-title) > :not(:last-child) {
  border-right: 1px solid var(--border-color);
}
.pc-comparison > tbody:last-child > tr:last-child > * {
  border-bottom: 0;
}
.pc-comparison .pc-field {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--bg-secondary);
  color: var(--text-secondary);
}
.pc-comparison thead th {
  border-bottom: 0;
  background: var(--bg-secondary);
  padding: 10px 14px 8px;
}
.pc-comparison thead .pc-field {
  z-index: 6;
}
.pc-plan-header {
  position: relative;
  padding-right: 26px;
}
.pc-platform-name {
  display: inline-block;
  font-size: 12px;
  color: var(--text-secondary);
}
.pc-plan-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin: 2px 0 6px;
}
.pc-plan-name {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}
.pc-plan-name svg {
  width: 12px;
  height: 12px;
}
.pc-board .pc-drag {
  --button-padding: 0;
  --button-background: transparent;
  --button-color: var(--text-secondary);
  border-color: transparent;
  flex-shrink: 0;
  width: var(--control-icon-size);
  min-height: var(--control-icon-size);
}
.pc-board .pc-drag {
  width: 24px;
  cursor: grab;
  touch-action: none;
  font-size: 20px;
}
.pc-board .pc-remove {
  position: absolute;
  right: -10px;
  top: -5px;
  font-size: 21px;
}
.pc-price-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 12px;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}
.pc-price-pair > span {
  white-space: nowrap;
  color: var(--text-secondary);
}
.pc-price-pair strong {
  font-weight: 400;
}
.pc-price-pair .pc-active-price {
  color: var(--text-primary);
}
.pc-price-pair .pc-active-price strong {
  font-weight: 600;
}
.pc-header-label {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 86px;
  gap: 10px;
}
.pc-header-label strong {
  font-weight: 600;
  color: var(--text-primary);
}
.pc-header-label > span {
  font-size: 12px;
}
.pc-metrics {
  display: grid;
  grid-template-columns: 54px repeat(3, minmax(0, 1fr)) 150px;
  align-items: center;
  gap: 8px;
  text-align: right;
  font-size: 12px;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
}
.pc-metric-tier {
  text-align: left;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.4;
}
.pc-value-cell {
  min-width: 0;
  padding-left: 8px;
  border-left: 1px solid var(--border-color);
  text-align: right;
}
.pc-value-cell .ui-help {
  max-width: 100%;
}
.pc-board .value-multiple-button {
  width: auto;
  max-width: 100%;
  min-height: var(--control-compact-height);
  height: auto;
  color: var(--text-primary);
  font: inherit;
  font-weight: 650;
  text-align: right;
  white-space: normal;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.pc-board .value-multiple-button > span {
  display: inline;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  font: inherit;
}
.pc-board .value-multiple-button .ui-help-button-suffix {
  display: inline-block;
  margin-left: 4px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 400;
}
.pc-board .value-multiple-button + .ui-help-content {
  width: max-content;
  white-space: pre-line;
}
.pc-board .value-multiple-button + .ui-help-content::first-line {
  font-weight: 650;
}
.pc-board .plan-value-range,
.pc-quota-summary {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.pc-board .plan-value-amount {
  display: inline-block;
  margin-left: 4px;
  font-size: 12px;
  color: var(--text-secondary);
}
.pc-board .plan-value-partial {
  display: inline-block;
  margin-left: 5px;
  font-size: 11px;
  color: var(--text-secondary);
}
.pc-metric-number {
  white-space: nowrap;
}
.pc-primary-number {
  font-weight: 600;
}
.pc-metric-guide {
  border-top: 1px solid var(--border-color);
  padding-top: 6px;
  margin-top: 8px;
  font-size: 11px;
  line-height: 16px;
  color: var(--text-secondary);
}
.pc-metric-guide > :first-child {
  text-align: left;
}
.pc-comparison .pc-model-data > * {
  vertical-align: middle;
  padding-top: 7px;
  padding-bottom: 7px;
}
.pc-comparison .pc-model-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
}
.pc-section-title > th {
  padding: 0;
  background: var(--bg-tertiary);
}
.pc-section-inner {
  position: sticky;
  left: 0;
  width: var(--pc-view-width);
  max-width: 100%;
  padding: 10px 14px;
}
.pc-section-inner h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
.pc-section-inner p {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
}
.pc-section-anchor {
  scroll-margin-top: calc(var(--pc-header-offset) + var(--pc-dock-height) + 10px);
}
.pc-short-viewport .pc-section-anchor {
  scroll-margin-top: calc(var(--pc-header-offset) + 10px);
}
.pc-unrecorded,
.pc-no-models {
  color: var(--text-secondary);
  font-size: 12px;
}
.pc-comparison tbody tr:not(.pc-section-title):hover > * {
  background: var(--bg-primary);
}
.pc-cell-notes {
  font-size: 12px;
}
.pc-cell-notes summary {
  color: var(--accent-primary);
  cursor: pointer;
}
.pc-notes-content {
  margin-top: 8px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.pc-notes-content details + details {
  margin-top: 8px;
}
.pc-notes-content details > div {
  margin-top: 6px;
}
.pc-notes-content > a {
  display: inline-block;
  margin-top: 10px;
}
.pc-empty {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  padding: 70px 16px;
  text-align: center;
}
.pc-empty h2 {
  font-size: 20px;
  margin: 0 0 20px;
}
.pc-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: rgb(23 32 51 / 48%);
}
.pc-picker-dialog {
  display: flex;
  flex-direction: column;
  width: min(680px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: hidden;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}
.pc-picker-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px 12px;
}
.pc-picker-top h2 {
  margin: 0;
  font-size: 20px;
}
.pc-picker-search {
  padding: 0 24px 12px;
}
.pc-picker-search input {
  width: 100%;
}
.pc-picker-choices {
  overflow-y: auto;
  min-height: 0;
  padding: 0 24px 12px;
  overscroll-behavior: contain;
}
.pc-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}
.pc-choice input {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  accent-color: var(--accent-primary);
}
.pc-choice > span:not(.pc-choice-price) {
  min-width: 0;
  overflow-wrap: anywhere;
}
.pc-choice strong {
  font-size: 14px;
  font-weight: 500;
}
.pc-choice-price {
  margin-left: auto;
  text-align: right;
  font-size: 13px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.pc-choice-price small {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 12px;
}
.pc-picker-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 24px;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  font-size: 13px;
}
.pc-picker-bottom > div {
  display: flex;
  gap: 8px;
}
.pc-picker-empty {
  text-align: center;
  padding: 30px 12px;
  color: var(--text-secondary);
  font-size: 13px;
}
.pc-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: calc(100vw - 24px);
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
}
.pc-toast > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.pc-toast .tool-button {
  flex-shrink: 0;
}
.pc-toast .pc-toast-close {
  font-size: 20px;
}
.pc-drag-ghost {
  position: fixed;
  z-index: 1150;
  pointer-events: none;
  max-width: min(320px, calc(100vw - 16px));
  padding: 10px 14px;
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
}
.pc-sorting {
  user-select: none;
  cursor: grabbing;
}
.pc-drag-source {
  opacity: 0.45;
}
.pc-comparison [data-plan-head] {
  position: relative;
}
.pc-drop-before::before,
.pc-drop-after::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 -2px;
  width: 3px;
  z-index: 8;
  background: var(--accent-primary);
  pointer-events: none;
}
.pc-drop-after::after {
  left: auto;
  right: -2px;
}
.plan-compare-page .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
#planComparePicker[hidden],
#planCompareToast[hidden],
#planCompareDragGhost[hidden] {
  display: none;
}
@media (max-width: 800px) {
  .pc-board {
    --pc-label-width: 116px;
  }
  .pc-dock-tools {
    padding: 5px 10px;
    gap: 7px 12px;
    font-size: 12px;
  }
  .pc-position {
    display: none;
  }
  .pc-comparison th,
  .pc-comparison td,
  .pc-comparison thead th {
    padding-left: 10px;
    padding-right: 10px;
  }
  .pc-plan-name {
    font-size: 14px;
  }
  .pc-plan-title {
    gap: 2px;
  }
  .pc-board .pc-drag {
    width: 24px;
  }
  .pc-plan-header {
    padding-right: 22px;
  }
  .pc-platform-name {
    padding-right: 10px;
  }
  .pc-board .pc-remove {
    right: -10px;
  }
  .pc-price-pair {
    gap: 2px 8px;
  }
  .pc-header-label {
    min-height: 100px;
    font-size: 12px;
  }
  .pc-metrics {
    grid-template-columns: 30px repeat(3, minmax(0, 1fr)) 120px;
    gap: 5px;
  }
  .pc-section-inner {
    padding: 10px;
  }
  .pc-section-inner p {
    max-width: calc(100vw - 60px);
  }
  .pc-picker-top {
    padding: 14px 16px 10px;
  }
  .pc-picker-search {
    padding: 0 16px 10px;
  }
  .pc-picker-choices {
    padding: 0 16px 12px;
  }
  .pc-picker-bottom {
    padding: 12px 16px;
  }
  .pc-choice {
    gap: 9px;
  }
  .pc-choice strong {
    font-size: 13px;
  }
  .pc-choice-price {
    font-size: 12px;
  }
  .pc-choice-price small {
    font-size: 11px;
  }
}
@media (max-width: 380px) {
  .pc-board {
    --pc-label-width: 86px;
  }
  .pc-dock-tools {
    gap: 6px 10px;
  }
}
@media (max-width: 650px) {
  .pc-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr)) 88px;
    gap: 3px;
    font-size: 11px;
  }
  .pc-metric-tier {
    grid-column: 1 / -1;
  }
  .pc-metric-tier:empty,
  .pc-metric-guide > :first-child {
    display: none;
  }
  .pc-metric-guide {
    font-size: 10px;
  }
  .pc-value-cell {
    padding-left: 4px;
  }
  .pc-board .value-multiple-button .ui-help-button-suffix {
    font-size: 11px;
  }
}
