/* ATC selection and documentary comparison — supplements the existing editorial system. */
.product-card-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.product-card-shell > .product-card { flex: 1; }

.selection-card-controls,
.selection-detail-controls {
  padding: 16px;
  border: 1px solid #d8cbb7;
  border-radius: 10px;
  background: #fff;
}
.selection-control-title {
  display: block;
  color: #12374a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1.5;
  text-transform: uppercase;
}
.selection-choice-grid,
.selection-line-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 11px;
}
.selection-choice { display: block; min-width: 0; }
.selection-choice > span {
  display: block;
  margin-bottom: 5px;
  color: #556568;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.45;
}
.selection-choice select {
  min-height: 44px;
  margin: 0;
  padding: 9px 27px 9px 10px;
  border: 1px solid #cbd5ce;
  border-radius: 5px;
  background: #fff;
  color: #12374a;
  font-size: 12px;
  line-height: 1.4;
}
.selection-control-actions {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 12px;
}
.selection-add-control,
.selection-compare-control,
.selection-remove-control,
.selection-clear-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}
.selection-add-control {
  flex: 1 1 155px;
  padding: 10px 13px;
  border: 1px solid #12374a;
  background: #12374a;
  color: #fff;
  text-align: left;
}
.selection-add-control svg { width: 16px; height: 16px; margin-left: auto; }
.selection-compare-control {
  flex: 1 1 115px;
  padding: 10px 12px;
  border: 1px solid #b6c4c5;
  background: #fff;
  color: #12374a;
}
.selection-compare-control[aria-pressed="true"] { border-color: #12374a; background: #ede3d3; }
.selection-control-dot { width: 7px; height: 7px; border-radius: 50%; background: #f36b21; }
.selection-add-control:disabled,
.selection-compare-control:disabled { cursor: not-allowed; opacity: .62; }
.selection-control-state { min-height: 1.5em; margin-top: 8px; color: #46614e; font-size: 10px; font-weight: 600; line-height: 1.5; }
.selection-detail-controls { margin-top: 20px; background: #f4f0e8; }
.selection-current-choice { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; color: #556568; font-size: 11px; line-height: 1.5; }
.selection-current-choice strong { color: #12374a; font-weight: 700; text-align: right; }

.selection-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.selection-toolbar-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 9px;
  color: #12374a;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}
.selection-toolbar-link strong {
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: #12374a;
  color: #fff;
  font-size: 9px;
}
.selection-toolbar-link + .selection-toolbar-link { border-left: 1px solid #d8cbb7; }
.selection-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.selection-page,
.comparison-page { padding-block: 68px 94px; }
.selection-page-header {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr);
  align-items: end;
  gap: 36px 72px;
  padding-bottom: 34px;
  border-bottom: 1px solid #d8cbb7;
}
.selection-page-header .eyebrow { grid-column: 1 / -1; margin-bottom: -17px; }
.selection-page-header h1 { max-width: 770px; font-size: clamp(42px, 4.2vw, 61px); }
.selection-page-header > p { max-width: 430px; color: #556568; font-size: 15px; line-height: 1.85; }
.selection-documentary-note {
  max-width: 760px;
  margin-top: 18px;
  padding: 12px 15px;
  border-left: 3px solid #f36b21;
  background: #f4f0e8;
  color: #12374a;
  font-size: 11px;
  line-height: 1.75;
}
.selection-feedback { min-height: 1.7em; margin-top: 12px; color: #46614e; font-size: 12px; font-weight: 600; line-height: 1.7; }
.selection-list { display: grid; gap: 18px; margin-top: 30px; }
.selection-line {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr) minmax(255px, .65fr);
  align-items: center;
  gap: 26px;
  padding: 19px;
  border: 1px solid #d8cbb7;
  border-radius: 14px;
  background: #fff;
}
.selection-line-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 154px;
  padding: 12px;
  border-radius: 9px;
  background: #f4f0e8;
  overflow: hidden;
}
.selection-line-visual .selection-item-packshot { width: 100%; height: 100%; object-fit: contain; }
.selection-line-visual .visual-pending { align-items: center; padding: 8px; text-align: center; }
.selection-line-visual .visual-pending strong { font-size: 18px; }
.selection-line-visual .visual-pending > span:not(.pending-line) { font-size: 9px; }
.selection-packshot-fallback { color: #12374a; font-size: 14px; font-weight: 700; text-align: center; }
.selection-line-copy { min-width: 0; }
.selection-line-copy h2 { margin-top: 7px; font-size: 27px; overflow-wrap: anywhere; }
.selection-line-subtitle { margin-top: 7px; color: #46614e; font-size: 13px; font-weight: 600; line-height: 1.65; }
.selection-line-summary { display: flex; flex-wrap: wrap; gap: 11px 24px; margin: 17px 0 9px; }
.selection-line-summary > div { display: flex; gap: 8px; font-size: 11px; line-height: 1.6; }
.selection-line-summary dt { color: #556568; }
.selection-line-summary dd { margin: 0; color: #12374a; font-weight: 700; }
.selection-line-copy .text-link { min-height: 38px; font-size: 11px; }
.selection-line-actions { min-width: 0; }
.selection-line-choice-grid { grid-template-columns: 1fr; margin-top: 0; }
.selection-remove-control,
.selection-clear-control {
  width: 100%;
  margin-top: 10px;
  padding: 10px 14px;
  border: 1px solid #a9b6b3;
  background: transparent;
  color: #12374a;
}
.selection-page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 29px; }
.selection-page-actions .button { min-width: min(100%, 315px); justify-content: space-between; }
.selection-page-actions .selection-clear-control { width: auto; margin-top: 0; }
.selection-empty,
.comparison-empty {
  max-width: 670px;
  margin-top: 31px;
  padding: 30px;
  border: 1px solid #d8cbb7;
  border-radius: 14px;
  background: #fff;
}
.selection-empty h2,
.comparison-empty h2 { font-size: 30px; }
.selection-empty p,
.comparison-empty p { max-width: 520px; margin-top: 11px; color: #556568; font-size: 14px; line-height: 1.8; }
.selection-empty .button,
.comparison-empty .button { margin-top: 19px; }

.comparison-picker {
  display: grid;
  grid-template-columns: 145px minmax(180px, 1fr) auto;
  align-items: end;
  gap: 16px;
  max-width: 880px;
  margin-top: 29px;
  padding: 18px;
  border: 1px solid #d8cbb7;
  border-radius: 12px;
  background: #fff;
}
.comparison-picker > div p { margin-top: 4px; color: #12374a; font-size: 22px; font-weight: 700; line-height: 1.2; }
.comparison-picker .selection-add-control { flex: 0 0 auto; min-width: 190px; }
.comparison-table-wrap { margin-top: 28px; border: 1px solid #d8cbb7; border-radius: 12px; background: #fff; overflow-x: auto; }
.comparison-table { width: 100%; min-width: 760px; border-collapse: collapse; text-align: left; }
.comparison-table th,
.comparison-table td { min-width: 190px; padding: 18px; border-bottom: 1px solid #d8cbb7; vertical-align: top; }
.comparison-table thead th { background: #12374a; color: #fff; font-size: 15px; font-weight: 700; line-height: 1.45; }
.comparison-table thead th:first-child { min-width: 155px; background: #0e3145; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.comparison-table thead th > span { display: block; overflow-wrap: anywhere; }
.comparison-table thead button {
  min-height: 35px;
  margin-top: 11px;
  padding: 5px 0;
  border: 0;
  border-bottom: 1px solid #f36b21;
  background: transparent;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}
.comparison-table tbody th { width: 155px; color: #12374a; font-size: 11px; font-weight: 700; line-height: 1.6; }
.comparison-table td { color: #12374a; font-size: 12px; line-height: 1.75; }
.comparison-table tbody tr:last-child th,
.comparison-table tbody tr:last-child td { border-bottom: 0; }
.comparison-table .text-link { min-height: 32px; font-size: 10px; text-decoration-color: #b8c7bb; }
.comparison-constituents { margin: 0; padding-left: 17px; }
.comparison-constituents li + li { margin-top: 4px; }
.comparison-muted { color: #556568; font-size: 11px; }
.comparison-formats > div + div { margin-top: 6px; }
.comparison-formats strong { font-weight: 700; }

#selection-dock { display: none; }
@media (hover: hover) {
  .selection-add-control:not(:disabled):hover { background: #204f64; }
  .selection-compare-control:not(:disabled):hover,
  .selection-remove-control:hover,
  .selection-clear-control:hover { border-color: #12374a; background: #ede3d3; }
  .selection-toolbar-link:hover { text-decoration: underline; text-decoration-color: #f36b21; text-underline-offset: 5px; }
}

@media (max-width: 900px) {
  .selection-line { grid-template-columns: 138px minmax(0, 1fr); }
  .selection-line-actions { grid-column: 1 / -1; display: flex; align-items: end; gap: 13px; }
  .selection-line-choice-grid { flex: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .selection-remove-control { width: auto; min-width: 105px; margin-bottom: 0; }
}
@media (max-width: 800px) {
  .selection-toolbar { align-self: stretch; justify-content: flex-start; }
  .selection-toolbar-link { min-height: 44px; padding-inline: 12px; font-size: 12px; }
  .selection-page,
  .comparison-page { padding-block: 48px 76px; }
  .selection-page-header { grid-template-columns: 1fr; gap: 20px; padding-bottom: 27px; }
  .selection-page-header .eyebrow { grid-column: auto; margin-bottom: -4px; }
  .selection-page-header > p { max-width: 600px; }
  .selection-line { grid-template-columns: 128px minmax(0, 1fr); gap: 18px; }
  .selection-line-visual { height: 132px; }
  .selection-line-copy h2 { font-size: 23px; }
  .comparison-picker { grid-template-columns: 115px minmax(0, 1fr); }
  .comparison-picker .selection-add-control { grid-column: 1 / -1; width: 100%; }
  #selection-dock:not([hidden]) { position: fixed; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); left: 12px; z-index: 25; display: block; }
  .selection-dock-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 7px; border: 1px solid #d8cbb7; border-radius: 10px; background: rgba(255,255,255,.98); box-shadow: 0 12px 30px rgba(18,55,74,.16); }
  .selection-dock-panel a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 9px 11px; border-radius: 6px; background: #12374a; color: #fff; font-size: 11px; font-weight: 700; }
  .selection-dock-panel a + a { background: #ede3d3; color: #12374a; }
  .selection-dock-panel strong { display: grid; place-items: center; min-width: 20px; height: 20px; border-radius: 50%; background: #f36b21; color: #12374a; font-size: 9px; }
}
@media (max-width: 560px) {
  .selection-card-controls,
  .selection-detail-controls { padding: 14px; }
  .selection-choice-grid { grid-template-columns: 1fr; }
  .selection-control-actions { display: grid; grid-template-columns: 1fr; }
  .selection-add-control,
  .selection-compare-control { width: 100%; }
  .selection-page-header h1 { font-size: clamp(35px, 10vw, 47px); }
  .selection-documentary-note { font-size: 10px; }
  .selection-line { grid-template-columns: 1fr; gap: 15px; padding: 15px; }
  .selection-line-visual { height: 190px; }
  .selection-line-actions { display: block; }
  .selection-line-choice-grid { grid-template-columns: 1fr; }
  .selection-remove-control { width: 100%; margin-top: 10px; }
  .selection-page-actions { align-items: stretch; flex-direction: column; }
  .selection-page-actions .button,
  .selection-page-actions .selection-clear-control { width: 100%; }
  .selection-empty,
  .comparison-empty { padding: 22px 18px; }
  .comparison-picker { grid-template-columns: 1fr; gap: 12px; padding: 15px; }
  .comparison-picker .selection-add-control { grid-column: auto; }
  .comparison-table-wrap { margin-right: -1px; margin-left: -1px; border-radius: 9px; }
  .selection-dock-panel a { font-size: 10px; }
}
@media (forced-colors: active) {
  .selection-card-controls,
  .selection-detail-controls,
  .selection-line,
  .comparison-picker,
  .comparison-table-wrap { border: 1px solid ButtonText; }
  .selection-add-control,
  .selection-compare-control,
  .selection-remove-control,
  .selection-clear-control { border: 1px solid ButtonText; }
}
