/* Baskets: short a whole basket, or buy and lend one (app-basket.js). Built from the shop's own pieces (the box sets,
   the carry case of tapes, the legs list, cards, facts, the risk card from bears.css, the pair rows from pairs.css);
   only what they lack is here. */

.bk-presets { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); }
.bk-presets .preset .p-tickers { font-size: 12px; line-height: 1.3; }
.bk-own { margin-top: 2px; }

/* How close each leg sits to its limit: three labels on a strip, the picked one pulled forward. */
.bk-safety .bk-lab { display: block; font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.bk-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bk-opt {
  position: relative; display: grid; gap: 1px; text-align: left; cursor: pointer; font: inherit; color: var(--ink);
  background: #fff; border: 2px solid var(--ink); border-radius: 8px; padding: 8px 10px 9px; transition: transform .12s ease;
}
.bk-opt b { font-family: var(--hand); font-weight: 400; font-size: 21px; line-height: 1.05; }
.bk-opt small { font-size: 12.5px; color: #55557a; }
.bk-opt[aria-checked="true"] { background: var(--ink); color: var(--label); transform: translateY(-2px); box-shadow: inset 0 5px 0 var(--sticker); }
.bk-opt[aria-checked="true"] small { color: var(--soft); }
.bk-opt:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }

/* The plan: one row per leg, before signing. A table where there is room, stacked cards where there is not. */
.bk-plan { container-type: inline-size; margin-top: 18px; display: grid; gap: 6px; }
.bk-plan:empty { display: none; }
.bk-row {
  display: grid; grid-template-columns: minmax(84px, 1.05fr) minmax(0, .85fr) minmax(0, .85fr) minmax(0, 1.55fr) minmax(0, .9fr);
  gap: 4px 10px; align-items: center; padding: 8px 10px; border-radius: 8px; background: #fff; border: 2px solid #e3ddc9;
  font-variant-numeric: tabular-nums;
}
.bk-plan.long .bk-row { grid-template-columns: minmax(84px, 1.1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
.bk-row.warn { border-color: var(--sticker); }
.bk-head { background: transparent; border-color: transparent; padding-top: 0; padding-bottom: 0; font-size: 12.5px; font-weight: 800; letter-spacing: .02em; color: #55557a; }
.bk-head span:not(:first-child), .bk-c { text-align: right; }
.bk-sym { display: grid; gap: 0; padding-left: 10px; border-left: 6px solid var(--band, var(--neon)); min-width: 0; }
.bk-sym b { font-family: var(--hand); font-weight: 400; font-size: 22px; line-height: 1; }
.bk-sym small { font-size: 12px; color: #55557a; white-space: nowrap; }
.bk-c { min-width: 0; }
.bk-c i { display: none; font-style: normal; font-size: 12.5px; color: #55557a; }
.bk-c b { font-size: 14.5px; font-weight: 700; overflow-wrap: anywhere; }

@container (max-width: 470px) {
  .bk-head { display: none; }
  .bk-row, .bk-plan.long .bk-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 14px; padding: 10px 12px; }
  .bk-sym { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; }
  .bk-c { display: grid; text-align: left; }
  .bk-c i { display: block; }
}

/* Legs that cannot take their share, and the offer to spread it over the others. */
.bk-offer {
  margin-top: 14px; padding: 12px 14px; border-radius: 8px; background: #fff7d1; border: 2px solid var(--ink);
  border-left: 10px solid var(--sticker); font-size: 15px;
}
.bk-offer > b { display: block; font-size: 16px; }
.bk-offer p { margin: 6px 0 0; }
.bk-offer .btn { margin-top: 10px; }
.bk-why { margin: 6px 0 0; padding-left: 18px; }
.bk-basis { margin-top: 6px; }

/* Your baskets: one card per basket, one line per leg with its own close. */
.bk-list { display: grid; gap: 12px; }
.bk-badge {
  display: inline-block; vertical-align: 2px; margin-right: 4px; padding: 1px 7px; border-radius: 4px; font-size: 11.5px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; background: var(--neon); color: var(--ink);
}
.bk-badge.long { background: var(--mint); }
.bk-legs-now li { gap: 10px; }
.bk-legs-now li > span:first-child { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex-wrap: wrap; }
.bk-legs-now li > span:first-child b { font-family: var(--hand); font-weight: 400; font-size: 20px; line-height: 1; }
.bk-legs-now li > span:first-child small { font-size: 13px; color: #55557a; }
.bk-right { display: flex; align-items: center; gap: 8px; flex: none; }
.bk-right b { font-variant-numeric: tabular-nums; font-size: 14.5px; }
.p-row .bk-one { margin-top: 0; padding: 4px 10px; font-size: 13.5px; }
.bk-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.p-row .bk-foot .btn { margin-top: 0; }
.bk-tx { font-size: 13.5px; }

@media (max-width: 620px) {
  .bk-seg { gap: 5px; }
  .bk-opt { padding: 7px 7px 8px; }
  .bk-opt b { font-size: 19px; }
  .bk-opt small { font-size: 11.5px; line-height: 1.2; }
  .bk-legs-now li { flex-wrap: wrap; }
  .bk-right { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) { .bk-opt { transition: none; } .bk-opt[aria-checked="true"] { transform: none; } }
