/* W1 planner (planner-pages.js / planner-view.js) on the Mihwar design system r51 (B08/B08b). Tokens, panels, rows,
   chips, .hist, .kv, .pill-conn, .sess-bar and states come from the verbatim lifeos.css (W0); this file only lays out
   the planner's own pieces with those tokens. No new colors. */

.pl-page, .pl-split > *, .pl-item, .pl-source { min-width: 0; }
.pl-split { grid-template-columns: minmax(0, 1fr) 380px; }
@media (max-width: 1279px) { .pl-split { grid-template-columns: minmax(0, 1fr) 340px; } }
@media (max-width: 1023px) { .pl-split { grid-template-columns: minmax(0, 1fr); } }

/* the proposal editor and the original conversation */
.pl-form { gap: 16px; }
.pl-form > .h2 { font-size: 18px; }
.pl-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pl-messages > summary, .pl-context > summary { cursor: pointer; list-style: none; }
.pl-messages > summary::-webkit-details-marker, .pl-context > summary::-webkit-details-marker { display: none; }
.pl-conversation .h { grid-template-columns: 132px minmax(0, 1fr); }
.pl-message--assistant .d::after { content: " · نص لُصق يدويًا"; color: var(--ink-3); }
.pl-composer { border-top: 1px solid var(--line); padding-top: 14px; }
.pl-check { cursor: pointer; height: auto; min-height: 30px; white-space: normal; }
.pl-check input { margin: 0; accent-color: var(--accent); }

/* source context picker: rows of the board's .list with explicit choices */
.pl-source { flex-wrap: wrap; align-items: flex-start; gap: 6px 12px; }
.pl-source > strong { flex: 1 1 220px; font-weight: 500; }
.pl-source > small { flex: 1 1 100%; color: var(--ink-3); font-size: 12.5px; }
.pl-source .btn-row { flex: 1 1 100%; }

/* structured change cards */
.pl-item.is-accepted { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok-soft) 45%, var(--surface)); }
.pl-item.is-rejected { opacity: .72; }
.pl-item-selection { cursor: pointer; }
.pl-effect .t { font-size: 14.5px; }
.pl-start-steps { margin: 4px 0; }

/* comparison and the device focus timer */
.pl-comparison { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.pl-comparison-row { display: grid; grid-template-columns: 160px minmax(0, 1fr) minmax(0, 1fr); gap: 8px 16px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.pl-comparison-row p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.pl-timer-number { font-family: var(--font-display); font-size: 40px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }

/* phone widths (the board's 390/375/360 frames): 44px touch targets, 16px inputs so phones do not zoom */
.pl-page input, .pl-page select, .pl-page textarea { font-size: 16px; }
@media(max-width:650px) {
  .pl-page .btn, .pl-page .seg button, .pl-page .chip-btn, .pl-page summary { min-block-size: 44px; }
  .pl-page .seg { flex-wrap: wrap; }
  .pl-comparison-row { grid-template-columns: 1fr; }
  .pl-conversation .h { grid-template-columns: 1fr; gap: 2px; }
  .pl-timer-number { font-size: 34px; }
}
