/* Product options: Simple/Expert toggle, "More options" fold, popular badges, explainer bubble and booklet cover tiles (First Press forest + mustard). */

/* toggle: one segmented pill, forest when on */
.mode-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 4px 0 14px; }
.mode-seg { display: inline-flex; border: 1px solid var(--m-line2); border-radius: 999px; padding: 3px; margin: 0; background: #fff; }
.mode-seg label { min-height: 36px; padding: 7px 18px; border-radius: 999px; font: 600 14px/1.5 var(--display); color: var(--m-mut); cursor: pointer; transition: background-color .18s cubic-bezier(.2, .7, .2, 1), color .18s; }
.mode-seg label:hover { color: var(--forest); }
.mode-seg input:checked + label { background: var(--forest); color: #fff; }
.mode-seg input:focus-visible + label { outline: 3px solid var(--mustard); outline-offset: 2px; }
.mode-hint { flex: 1 1 260px; margin: 0; display: flex; align-items: flex-start; gap: 8px; color: var(--m-mut); font-size: 13.5px; line-height: 1.45; }
.mode-hint[hidden] { display: none; }
.mode-hint-x { flex: none; width: 32px; height: 32px; margin: -6px -6px 0 auto; border: 0; background: none; color: var(--m-mut); font: 400 20px/1 var(--font); border-radius: 50%; cursor: pointer; }
.mode-hint-x:hover { background: var(--ground); color: #1f2622; }

/* "More options": a full-width row with the folded choices summarised */
.more-opts { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 14px 0 16px; border: 0; border-top: 1px solid var(--m-line); background: none; text-align: left; cursor: pointer; font: 700 15px/1.3 var(--display); color: var(--forest); }
.more-opts > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.more-opts > span:first-child::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); transition: transform .2s cubic-bezier(.2, .7, .2, 1); }
.more-opts[aria-expanded="true"] > span:first-child::after { transform: translateY(1px) rotate(-135deg); }
.more-opts:hover > span:first-child { text-decoration: underline; text-underline-offset: 3px; }
.more-opts:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }
.more-sum { font: 400 13.5px/1.45 var(--font); color: var(--m-mut); }
.more-opts[hidden], .opt.is-folded, .tile-wrap.is-off { display: none; }

/* badges: mustard for data-backed popularity, outlined for a recommendation */
.tile-badge { align-self: flex-start; display: inline-block; margin: 2px 0; padding: 2px 8px; border-radius: 999px; background: var(--mustard); color: #3b2a00; font: 600 11.5px/1.4 var(--font); letter-spacing: .01em; white-space: nowrap; }
.tile-badge.is-rec { background: none; color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); }
.ladder .tile-badge { display: block; width: max-content; margin: 3px 0 0; padding: 0 6px; font-size: 10.5px; }
.opt-rail .tile .tile-badge { grid-area: auto; justify-self: start; }

/* info button (touch screens) and the bubble */
.tile-wrap.has-tip .tile { padding-right: 38px; }
.tile-wrap.has-tip .tile-input:checked + .tile { padding-right: 37px; }
.tip-btn { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--m-mut); cursor: help; }
.tip-btn:hover, .tip-btn[aria-expanded="true"] { color: var(--forest); background: var(--m-on); }
.tip-btn:focus-visible { outline: 2px solid var(--forest); outline-offset: 1px; }
@media (hover: hover) and (pointer: fine) {
  .tip-btn { opacity: 0; transition: opacity .15s; }
  .tile-wrap:hover .tip-btn, .tip-btn:focus-visible, .tip-btn[aria-expanded="true"] { opacity: 1; }
}
.opt-tip { position: fixed; z-index: 60; max-width: 300px; padding: 10px 12px; border-radius: 10px; background: #1f2622; color: #fff; font: 400 13.5px/1.45 var(--font); box-shadow: 0 6px 22px rgba(31, 38, 34, .22); pointer-events: none; animation: tip-in .16s cubic-bezier(.2, .7, .2, 1); }
.opt-tip::after { content: ""; position: absolute; left: var(--tip-x, 50%); bottom: -5px; width: 10px; height: 10px; margin-left: -5px; background: #1f2622; transform: rotate(45deg); }
.opt-tip.is-below::after { bottom: auto; top: -5px; }
.opt-tip.has-img { width: 300px; }
.opt-tip img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 62%; border-radius: 6px; margin-bottom: 8px; background: #fff; }
@keyframes tip-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* booklet cover tiles: a drawn edge view above the name */
.tile-has-art { gap: 6px; }
.tile-art { width: 48px; height: 32px; color: var(--forest); }

/* Expert: every option, denser tiles */
.fpm-expert .pmain .opt { padding: 12px 0 12px; }
.fpm-expert .pmain .tiles { gap: 6px; }
.fpm-expert .pmain .tile { min-height: 48px; padding: 8px 10px 7px; }
.fpm-expert .pmain .tile-input:checked + .tile { padding: 7px 9px 6px; }
.fpm-expert .pmain .tile-wrap.has-tip .tile, .fpm-expert .pmain .tile-wrap.has-tip .tile-input:checked + .tile { padding-right: 36px; }
.fpm-expert .pmain .tile-label { font-size: 14px; }
.fpm-expert .tile-art { width: 36px; height: 24px; }
@media (min-width: 600px) {
  .fpm-expert .pmain .tiles { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
@media (max-width: 640px) {
  .pmain .tile { justify-content: flex-start; }
  .pmain .tile-diff { margin-left: auto; }
  .pmain .tile-has-art { flex-direction: row; align-items: center; flex-wrap: nowrap; justify-content: flex-start; }
  .pmain .tile-has-art .tile-badge { margin-left: auto; }
  .mode-bar { padding-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) { .opt-tip, .mode-seg label, .more-opts > span:first-child::after { animation: none; transition: none; } }
