/* The Matchup Planner page's example week (pages/plannerDemo.ts, js/matchup-planner.js): the week's board, the two moves
   to try and Pikola's Recommended plan, in the app's look from the brand's tokens (tokens.css; the homepage's start/sit
   card, home.css .ss-opt, for the choices). Light and dark with the system. Reduced motion: no count up, no flash. */

.pd-sect { scroll-margin-top: calc(var(--bar-h) + 8px); }
.pd-sect .t-h2 { margin-bottom: 8px; }
.pd-lede { max-width: 62ch; margin: 0 0 20px; color: var(--dim); font-size: 17px; }
.pd { display: grid; gap: 16px; align-items: start; }
.pd p { margin: 0; }
.pd [hidden] { display: none !important; }
.pd abbr { text-decoration: none; }
.pd-card { display: grid; gap: 12px; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-pic); background: var(--card-bg); box-shadow: var(--shadow-card); }
@media (min-width: 980px) {
  .pd { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 24px; }
  .pd-board { grid-row: span 2; position: sticky; top: calc(var(--bar-h) + 16px); box-shadow: var(--shadow-lift); }
  .pd-card { padding: 20px; }
}

/* The board: the matchup, the two figures, the tug, each category */
.pd-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 10px; border-bottom: 2px solid var(--rule); }
.pd-bar b { font: 800 21px/1 var(--font-display); letter-spacing: .02em; text-transform: uppercase; }
.pd-bar .ex, .pd-plan-h span { font: 800 12px/1 var(--font-display); letter-spacing: .1em; text-transform: uppercase; padding: 4px 7px 3px; border-radius: var(--r-sticker); background: var(--careful-tint); color: var(--careful-text); }
.pd-vs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--dim); font-size: 14.5px; }
.pd-vs b, .pd-vs .when { white-space: nowrap; }
.pd-vs .when { margin-left: auto; font-size: 13.5px; }
.pd-vs .tp { width: 32px; height: 32px; }
.pd-vs b { color: var(--text); font-weight: 650; }
.pd-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pd-fig { display: grid; gap: 4px; align-content: start; }
.pd-fig .k, .pd-sum .k { font: 700 12.5px/1.2 var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.pd-big, .pd-score { font: 800 56px/.9 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pd-big small { font-size: .5em; }
.pd-score .them { font-size: .5em; color: var(--dim); }
.pd-was { min-height: 1.3em; font-size: 13.5px; color: var(--dim); }
.pd-tug { position: relative; height: 10px; border-radius: 6px; background: var(--track); overflow: hidden; }
.pd-tug i { position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: 6px; background: var(--you); transition: width var(--motion-slow) var(--ease); }
.pd-tug::after { content: ''; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: var(--text); opacity: .55; }
.pd-cats { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 2px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pd-cats th { padding: 8px 0 2px; font: 700 11.5px/1 var(--font-display); letter-spacing: .02em; color: var(--dim); text-align: center; }
.pd-cats td { padding: 2px 0 6px; text-align: center; vertical-align: top; border-radius: 0 0 6px 6px; }
.pd-cats td b { display: block; font: 800 20px/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
.pd-cats td i { display: inline-grid; place-items: center; width: 20px; height: 18px; border-radius: 4px; font: 800 12px/1 var(--font-display); font-style: normal; }
.pd-cats .W i { background: var(--you); color: var(--you-ink); }
.pd-cats .T i { background: var(--surface-2); color: var(--dim); box-shadow: inset 0 0 0 1px var(--line-strong); }
.pd-cats .L i { background: var(--them); color: var(--them-ink); }
.pd-cats .d { display: block; min-height: 15px; margin-top: 2px; font: 800 12px/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
.pd-cats .up .d { color: var(--go-text); }
.pd-cats .down .d { color: var(--stop-text); }
.pd-cats td.flash { animation: pd-flash 900ms var(--ease); }
@keyframes pd-flash { 0%, 40% { background: var(--wash); } 100% { background: transparent; } }
.pd-note { font-size: 13.5px; line-height: 1.4; color: var(--dim); }
.pd-note b { color: var(--text); }
@media (max-width: 420px) {
  .pd-card { padding: 14px 12px; }
  .pd-big, .pd-score { font-size: 46px; }
  .pd-cats { border-spacing: 1px 0; }
  .pd-cats th { font-size: 10.5px; }
  .pd-cats td b { font-size: 17px; }
  .pd-cats td i { width: 17px; height: 16px; font-size: 11px; }
  .pd-cats .d { font-size: 10.5px; }
}

/* The moves: a short bar with the figures that stays in view on a phone, then each choice */
.pd-mini { position: sticky; top: calc(var(--bar-h) + 6px); z-index: 2; display: flex; align-items: baseline; gap: 10px; margin: -4px -4px 0; padding: 8px 12px; border-radius: var(--r-inner); background: var(--surface-ink); color: var(--text-on-ink); font-size: 13.5px; }
.pd-mini span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 13px/1.2 var(--font-display); letter-spacing: .06em; text-transform: uppercase; }
.pd-mini b { font: 800 22px/1 var(--font-display); font-variant-numeric: tabular-nums; }
@media (min-width: 980px) { .pd-mini { display: none; } }
.pd-pick { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.pd-pick + .pd-pick { padding-top: 14px; border-top: 1px solid var(--line); }
.pd-pick legend { display: flex; align-items: center; gap: 8px; float: left; width: 100%; margin-bottom: 10px; padding: 0; font-weight: 700; font-size: 16px; }
.pd-pick legend + * { clear: both; }
.pd .n { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-ink); color: var(--text-on-ink); font: 800 13px/1 var(--font-display); }
.pd-adds { font-size: 13.5px; color: var(--dim); }
.pd-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pd-opt { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 8px; min-height: 56px; padding: 8px 10px 8px 34px; border-radius: var(--r-inner); background: var(--surface-2); box-shadow: inset 0 0 0 1.5px transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: box-shadow var(--motion-fast), background var(--motion-fast); }
.pd-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pd-opt::before { content: ''; position: absolute; left: 10px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line-strong); background: var(--card-bg); }
.pd-opt:has(input:checked) { background: var(--card-bg); box-shadow: inset 0 0 0 2px var(--text); }
.pd-opt:has(input:checked)::before { box-shadow: inset 0 0 0 2px var(--text), inset 0 0 0 5px var(--card-bg); background: var(--text); }
.pd-opt:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.pd-opt:hover { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.pd-opt:has(input:checked):hover { box-shadow: inset 0 0 0 2px var(--text); }
.pd-opt:has(input:disabled) { cursor: default; }
.pd-opt:has(input:disabled) input { cursor: default; }
.pd-opt:has(input:disabled):hover { box-shadow: inset 0 0 0 1.5px transparent; }
.pd-opt:has(input:disabled:checked):hover { box-shadow: inset 0 0 0 2px var(--text); }
.pd-opt .pf { --s: 30px; }
.pd-opt .who { grid-column: -2; display: grid; min-width: 0; line-height: 1.2; }
.pd-opt .who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15.5px; font-weight: 700; }
.pd-opt .who small { font-size: 12.5px; line-height: 1.3; color: var(--dim); }
.pd-opt .who small .tc { margin-right: 2px; vertical-align: 1px; }
@media (max-width: 420px) { .pd-opt { padding: 8px 8px 8px 30px; column-gap: 6px; } .pd-opt .pf { display: none; } }
.pd-why { font-size: 15px; line-height: 1.45; text-wrap: pretty; }
.pd-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-top: 4px; }
.pd-undo { min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line-strong); border-radius: var(--r-control); background: transparent; color: var(--text); font: 650 15px/1 var(--font-body); cursor: pointer; }
.pd-undo:hover { background: var(--surface-2); }
.pd-undo:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Pikola's Recommended plan, one box (the app's plannerPlanBox.tsx) */
.pd-plan { border-top: 4px solid var(--you); }
.pd-plan-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pd-plan-h h3 { font-family: var(--font-brand); font-weight: 800; font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1; font-size: 24px; line-height: 1.1; letter-spacing: -.01em; }
.pd-plan-h span { background: var(--go-tint); color: var(--go-text); }
.pd-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pd-steps li { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 10px; }
.pd-steps .pf { --s: 36px; }
.pd-steps .t { display: grid; gap: 2px; min-width: 0; }
.pd-steps .l1 { font-size: 15.5px; line-height: 1.35; }
.pd-steps small { font-size: 13px; color: var(--dim); }
.pd-sum { display: grid; gap: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.pd-sum .v { display: flex; align-items: baseline; gap: 8px; font: 800 40px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.pd-sum .v .was { font-size: 26px; color: var(--dim); }
.pd-sum .v span[aria-hidden] { font-size: 24px; color: var(--dim); }
.pd-sum .u { font-size: 14.5px; color: var(--dim); }
.pd:not([data-ready]) .pd-sum .act { display: none; }
.pd-sum .act { display: flex; align-items: center; min-height: 44px; margin-top: 8px; }
.pd-tried { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--r-control); background: var(--go-tint); color: var(--go-text); font: 700 15.5px/1 var(--font-body); }
.pd-tried:focus { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Then: see it for your own matchup */
.pd-cta { display: grid; gap: 12px; justify-items: start; max-width: 760px; margin-top: 28px; padding: 22px 20px; border-radius: var(--r-pic); background: var(--brand-tint); color: var(--text); }
.pd-cta-h { font-family: var(--font-brand); font-weight: 800; font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.1; letter-spacing: -.02em; }
.pd-cta p { margin: 0; font-size: 16.5px; max-width: 60ch; }
.pd-cta .pd-note { font-size: 14px; color: var(--dim); }
@media (max-width: 519px) { .pd-cta { padding: 20px 16px; } .pd-cta .ctas { width: 100%; } .pd-cta .btn { width: 100%; padding: 10px 16px; white-space: normal; text-align: center; line-height: 1.2; } }
@media (min-width: 980px) { .pd-cta { margin-left: auto; margin-right: auto; justify-items: center; text-align: center; } }

@media (prefers-reduced-motion: reduce) {
  .pd-tug i, .pd-opt { transition: none; }
  .pd-cats td.flash { animation: none; }
}
