/* Payment plans (#/plans, Riyadh 2026-11-09): a project rail, compact plan cards, the plan view and the editor with its live preview.
   Calm look (DECISIONS #119): neutral surfaces, blue for the picked chip, no coloured side lines. Tokens only. */

/* ---- page: rail + list */
.pl-shell { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
.pl-shell.solo { grid-template-columns: minmax(0, 1fr); }
.pl-shell.solo > .pl-rail, .pl-shell.solo .pl-strip { display: none !important; } /* Table view and a project's tab: no project rail */
.pl-main { min-width: 0; display: grid; gap: var(--sp-3); }
.pl-main > * { min-width: 0; } /* a wide table scrolls inside its card, the page never does */
.pl-rail { position: sticky; top: calc(var(--head-h, var(--topbar-h)) + var(--sp-4)); /* under the sticky title row (#395) */ min-width: 0; }
.pl-railbox { display: flex; flex-direction: column; gap: var(--sp-2); max-height: calc(100vh - 120px); overflow-y: auto; padding: var(--sp-3); background: var(--c-card); border: 1px solid var(--c-card-line); border-radius: var(--r-lg); box-shadow: var(--card-shadow); }
.pl-lbl { margin: 0; padding: 0 var(--sp-1); font-size: var(--fs-hint); font-weight: var(--fw-semibold); letter-spacing: .08em; text-transform: uppercase; color: var(--c-faint); }
/* project rail, look A (Sami 2026-11-11, lighter the same day): All projects, then Ready to offer (green) and Not offerable today (amber); no totals (the KPI cards say them) */
.pl-mono { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-md); background: var(--c-neutral-soft); color: var(--c-muted); font-size: var(--fs-hint); font-weight: var(--fw-semibold); letter-spacing: .02em; }
.pl-mono.ok { background: var(--c-success-soft); color: var(--c-success); }
.pl-mono.all { background: var(--c-ink); color: var(--c-card); }
.pl-mono .ico { width: 18px; height: 18px; }
.pl-pj:focus-visible, .pl-chipj:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.pl-grp { display: grid; gap: 2px; }
.pl-grp summary { display: flex; align-items: center; gap: var(--sp-2); padding: 6px var(--sp-1); border-radius: var(--r-sm); list-style: none; cursor: pointer; font-size: var(--fs-hint); font-weight: var(--fw-semibold); color: var(--c-text); }
.pl-grp summary::-webkit-details-marker { display: none; }
.pl-grp summary:hover { background: var(--c-tile); }
.pl-grp-ic { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; }
.pl-grp-ic .ico { width: 13px; height: 13px; }
/* the fold arrow is a small button of its own, so it reads as "open / close" */
.pl-grp-fold { display: grid; place-items: center; width: 24px; height: 24px; margin-inline-start: auto; border: 1px solid var(--c-line-strong); border-radius: var(--r-sm); background: var(--c-card); color: var(--c-text); transition: rotate .15s, border-color .12s, color .12s; }
.pl-grp summary:hover .pl-grp-fold { border-color: var(--c-accent); color: var(--c-accent); }
.pl-grp[open] .pl-grp-fold { rotate: 180deg; }
.pl-grp.ok .pl-grp-ic { background: var(--c-success-soft); color: var(--c-success); }
.pl-grp.no .pl-grp-ic { background: var(--c-warning-soft); color: var(--c-warning); }
.pl-pj { display: flex; align-items: center; gap: var(--sp-3); width: 100%; padding: var(--sp-2); border: 1px solid transparent; border-radius: var(--r-md); background: none; text-align: start; font: inherit; color: inherit; cursor: pointer; transition: background .12s, border-color .12s; }
.pl-pj:hover { background: var(--c-tile); border-color: var(--c-line); }
.pl-pj.on { background: var(--c-nav-on); border-color: var(--c-accent-line); }
.pl-pj-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pl-pj-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-table); font-weight: var(--fw-semibold); color: var(--c-ink); }
.pl-pj-t small { display: flex; align-items: center; gap: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--fs-hint); color: var(--c-muted); }
.pl-pj-t small .ico { flex: none; width: 12px; height: 12px; }
.pl-pj-t small.why-up { color: var(--c-info); }
.pl-pj-t small.why-none { color: var(--c-warning); }
.pl-cnt { flex: none; display: grid; place-items: center; min-width: 28px; height: 24px; padding: 0 7px; box-sizing: border-box; border-radius: var(--r-pill); background: var(--c-success-soft); color: var(--c-success); font-size: var(--fs-hint); font-weight: var(--fw-semibold); }
.pl-cnt.warn { border: 1px solid var(--c-warning-line); background: var(--c-warning-soft); color: var(--c-warning); }
/* tablet: the rail becomes a strip of project chips above the plans */
.pl-strip { display: none; }
.pl-chipj { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px 0 6px; border: 1px solid var(--c-line-strong); border-radius: var(--r-pill); background: var(--c-card); font: inherit; font-size: var(--fs-table); font-weight: var(--fw-semibold); color: var(--c-ink); cursor: pointer; }
.pl-chipj:not(.on):hover { background: var(--c-select-line); color: var(--c-ink); border-color: var(--c-line-strong); }
.pl-chipj.off { border-style: dashed; color: var(--c-text); }
.pl-chipj.on { border-color: var(--c-accent); background: var(--c-nav-on); }
.pl-chipj .pl-mono { width: 28px; height: 28px; border-radius: 50%; }
.pl-chipj .pl-mono .ico { width: 14px; height: 14px; }
.pl-chipj .pl-cnt { min-width: 22px; height: 20px; }


/* a status is not a colour band: the "no approved plan" card is the only tinted one */
.stat.tone-plgap { background: var(--c-warning-soft); border-color: var(--c-warning-line); --acc: var(--c-warning); --acc-solid: var(--c-warning); }
/* every project covered: a calm white card, grey icon (no colour of its place in the row) */
.stat.tone-plok { background: var(--c-card); border-color: var(--c-card-line); --acc: var(--c-neutral); --acc-solid: var(--c-neutral); }
.stat.tone-plok > .stat-ico { background: var(--c-neutral); }
.stat.tone-plgap > .stat-ico { background: var(--c-warning); }

/* ---- the card */
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-4); }
/* The plan card, look "Stops" (DECISIONS #189): band (state colour, code, state) · 🔥 years · discount · the line of stops · dates.
   Ended cards are as bright as the others (Sami 2026-11-11): their section and the grey band already say Ended. */
.pl-card { --st-soft: var(--c-tile); --st-line: var(--c-line); display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--c-card-line); border-radius: var(--r-lg); background: var(--c-card); box-shadow: var(--card-shadow); text-align: start; cursor: pointer; transition: border-color .15s, box-shadow .2s, transform .2s; }
.pl-card:hover { border-color: var(--c-accent-line); box-shadow: 0 14px 30px -16px rgba(27, 34, 51, .4); transform: translateY(-2px); }
.pl-card:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.pl-card.st-active { --st-soft: var(--c-success-soft); --st-line: var(--c-success-line); }
.pl-card.st-upcoming { --st-soft: var(--c-accent-soft); --st-line: var(--c-accent-line); }
.pl-band { display: flex; align-items: center; gap: var(--sp-2); min-height: 46px; padding: var(--sp-2) 14px; background: var(--st-soft); border-bottom: 1px solid var(--st-line); }
.pl-band .badge { margin-inline-start: auto; }
.pl-band-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--fw-semibold); }
.pl-head { display: flex; align-items: center; gap: 10px; padding: 14px var(--sp-4) 0; }
.pl-fire { font-size: 20px; line-height: 1; margin-inline-end: -4px; }
.pl-big { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--c-ink); }
.pl-big small { margin-inline-start: 3px; font-size: 13px; font-weight: var(--fw-semibold); letter-spacing: 0; color: var(--c-muted); }
.pl-off { padding: 3px 9px; border-radius: var(--r-pill); background: var(--c-danger-soft); box-shadow: inset 0 0 0 1px var(--c-danger-line); color: var(--c-danger); font-size: 13px; font-weight: var(--fw-semibold); line-height: 1.2; white-space: nowrap; }
.pl-stops { display: flex; align-items: flex-start; padding: 16px 12px 14px; }
.pl-stop { position: relative; flex: none; display: grid; justify-items: center; gap: 4px; min-width: 40px; text-align: center; }
.pl-stop .v { min-height: 13px; font-size: 12.5px; font-weight: var(--fw-semibold); line-height: 1; color: var(--c-ink); }
.pl-stop i { position: relative; z-index: 1; width: 16px; height: 16px; margin: 7px 0; border-radius: 50%; background: var(--c-ink); box-shadow: 0 0 0 3px var(--c-card); }
.pl-stop .t { font-size: 11px; font-weight: var(--fw-semibold); color: var(--c-muted); white-space: nowrap; }
.pl-stop.pl-ex .v, .pl-stop.pl-ex .t { color: color-mix(in srgb, var(--tint-amber) 80%, #000); }
.pl-stop.pl-ex i { width: 13px; height: 13px; margin: 8.5px 0; border-radius: 3px; transform: rotate(45deg); background: var(--tint-amber); }
.pl-stop.pl-end i { width: 12px; height: 12px; margin: 9px 0; background: var(--c-card); box-shadow: inset 0 0 0 2px var(--c-line-strong); }
.pl-stop.pl-end .t { font-weight: var(--fw-medium); font-size: 11.5px; }
.pl-leg { position: relative; flex: 1; min-width: 12px; height: 30px; margin-top: 17px; }
.pl-leg::before { content: ""; position: absolute; inset-inline: -12px; top: 13px; height: 5px; border-radius: var(--r-pill); background-image: repeating-linear-gradient(90deg, var(--c-line-strong) 0 3px, var(--c-neutral-soft) 3px 7px); }
.pl-leg b { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); padding: 0 6px; border-radius: var(--r-pill); background: var(--c-card); font-size: 10.5px; font-weight: var(--fw-semibold); color: var(--c-text); white-space: nowrap; }
.pl-foot { display: flex; align-items: center; gap: 6px; margin-top: auto; padding: 10px var(--sp-4) 12px; border-top: 1px solid var(--c-line); font-size: var(--fs-hint); color: var(--c-muted); }
.pl-foot svg { flex: none; width: 14px; height: 14px; color: var(--c-faint); }
.pl-name { min-width: 0; font-size: var(--fs-section); font-weight: var(--fw-semibold); color: var(--c-ink); overflow-wrap: anywhere; }
.pl-hero { font-size: var(--fs-body); color: var(--c-muted); }
.pl-hero b { font-size: var(--fs-kpi); font-weight: var(--fw-semibold); letter-spacing: -.02em; color: var(--c-ink); }
.pl-split { display: flex; gap: 2px; height: 8px; overflow: hidden; border-radius: var(--r-pill); background: var(--c-neutral-soft); }
.pl-split.lg { height: 12px; }
.pl-split i { display: block; width: var(--w); min-width: 2px; }
.pl-down { background: var(--c-ink); }
.pl-inst { background: var(--c-line-strong); }
.pl-extra { background: var(--c-accent); }
.pl-cap { margin: 0; font-size: var(--fs-table); color: var(--c-text); }
.pl-tag { padding: 2px var(--sp-2); border: 1px solid var(--c-accent-line); border-radius: var(--r-pill); background: var(--c-accent-soft); color: var(--c-accent-text); font-size: var(--fs-hint); font-weight: var(--fw-semibold); }
.pl-tag.quiet { border-color: var(--c-line-strong); background: var(--c-neutral-soft); color: var(--c-muted); }
.pl-proj { min-width: 0; margin-inline-start: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-hint); color: var(--c-faint); }

/* ---- the plan view */
.pl-view { display: grid; gap: var(--sp-3); }
.pl-view-h { display: flex; align-items: center; gap: var(--sp-2); }
.pl-facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--sp-3); padding: var(--sp-4); border: 1px solid var(--c-line); border-radius: var(--r-lg); background: var(--c-tile); }
.pl-facts dt { font-size: var(--fs-hint); color: var(--c-faint); }
.pl-facts dd { margin: 2px 0 0; font-size: var(--fs-body); font-weight: var(--fw-semibold); color: var(--c-ink); overflow-wrap: anywhere; }
.pl-sample { display: grid; gap: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--c-line); }

/* ---- the editor */
dialog.modal.pl-modal { width: min(1120px, 96vw); height: min(860px, 94vh); max-height: 94vh; }
.pl-ed { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--sp-5); align-items: start; }
.pl-form { display: grid; gap: var(--sp-3); min-width: 0; }
.pl-step { display: grid; gap: var(--sp-3); padding: var(--sp-4); border: 1px solid var(--c-card-line); border-radius: var(--r-lg); background: var(--c-card); box-shadow: var(--card-shadow); }
.pl-step.off { background: var(--c-tile); box-shadow: none; }
.pl-step.off h3 { color: var(--c-muted); }
.pl-step.off .pl-step-b { display: none; }
.pl-step-h { display: flex; align-items: center; gap: var(--sp-3); }
.pl-n { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--c-neutral-soft); color: var(--c-ink); font-size: var(--fs-hint); font-weight: var(--fw-semibold); }
.pl-step-t { flex: 1; min-width: 0; }
.pl-step-t h3 { margin: 0; font-size: var(--fs-section); font-weight: var(--fw-semibold); color: var(--c-ink); }
.pl-quiet { margin: 2px 0 0; font-size: var(--fs-hint); color: var(--c-muted); }
.pl-step-b { display: grid; gap: var(--sp-3); }
.pl-step[hidden], .pl-cust[hidden], .pl-step-b[hidden], .pl-other[hidden], .pl-xf[hidden], .pl-bad[hidden] { display: none; }
.pl-step-b > .btn { justify-self: start; }
.pl-step-b textarea { width: 100%; resize: vertical; }
.pl-fields { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.pl-bad { color: var(--c-danger); }

.pl-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.pl-chip { position: relative; display: inline-flex; cursor: pointer; }
.pl-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pl-chip span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--c-line-strong); border-radius: var(--r-pill); background: var(--c-card); color: var(--c-ink); font-size: var(--fs-body); font-weight: var(--fw-medium); transition: border-color .15s, background .15s; }
.pl-chip:hover span { border-color: var(--c-accent); }
.pl-chip:has(input:checked) span { border-color: var(--c-accent); background: var(--c-accent-soft); color: var(--c-accent-text); font-weight: var(--fw-semibold); }
.pl-chip:has(input:focus-visible) span { box-shadow: var(--focus-ring); }
.pl-chip:has(input:disabled) { cursor: not-allowed; }
.pl-chip input:disabled { cursor: not-allowed; }
.pl-chip:has(input:disabled) span { border-color: var(--c-line); background: var(--c-neutral-soft); color: var(--c-faint); }

.pl-other { justify-self: start; display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-hint); color: var(--c-muted); }
.pl-box { display: inline-flex; align-items: center; padding-inline: var(--sp-3); border: 1px solid var(--c-line-strong); border-radius: var(--r-md); background: var(--c-card); }
.pl-box:focus-within { border-color: var(--c-accent); box-shadow: var(--focus-ring); }
.pl-box input { width: 100%; min-width: 0; padding: var(--sp-2) 0; border: 0; outline: 0; background: none; font: inherit; font-size: var(--fs-body); color: var(--c-ink); font-variant-numeric: tabular-nums; }
.pl-box em { margin-inline-start: var(--sp-2); font-style: normal; font-size: var(--fs-hint); color: var(--c-faint); }
.pl-other .pl-box { width: 120px; }

.pl-switch { position: relative; flex: none; width: 44px; height: 26px; }
.pl-switch input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pl-switch:hover i { filter: brightness(.92); }
.pl-switch i { position: absolute; inset: 0; border-radius: var(--r-pill); background: var(--c-line-strong); transition: background .2s; }
.pl-switch i::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--c-card); box-shadow: var(--card-shadow); transition: transform .2s; }
.pl-switch input:checked + i { background: var(--c-success); }
.pl-switch input:checked + i::after { transform: translateX(18px); }
.pl-switch input:focus-visible + i { box-shadow: var(--focus-ring); }
.pl-switch input:disabled { cursor: not-allowed; }
.pl-switch input:disabled + i { opacity: .45; }

.pl-xrows { display: grid; gap: var(--sp-2); }
.pl-xrows:empty { display: none; }
.pl-xrow { display: flex; flex-wrap: wrap; align-items: end; gap: var(--sp-2) var(--sp-3); padding: var(--sp-3); border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-tile); }
.pl-xf { display: grid; gap: var(--sp-1); font-size: var(--fs-hint); color: var(--c-muted); }
.pl-xf select, .pl-xf input { font: inherit; font-size: var(--fs-body); padding: var(--sp-2) var(--sp-3); border: 1px solid var(--c-line-strong); border-radius: var(--r-md); background: var(--c-card); color: var(--c-ink); }
.pl-xf input { width: 96px; }
.pl-xrow .ib { margin-inline-start: auto; }

/* "Customize payment plan": a clearly clickable row right after the payment-term steps. It opens the Custom terms card under it
   (the chevron turns down, the row turns solid) and closes it again; steps 2 to 5 fold while it is open. */
.pl-cust { display: flex; align-items: center; gap: var(--sp-3); width: 100%; padding: var(--sp-3) var(--sp-4); border: 1px dashed var(--c-line-strong); border-radius: var(--r-lg); background: var(--c-card); text-align: start; font: inherit; color: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.pl-cust:hover { border-color: var(--c-accent); background: var(--c-accent-soft); }
.pl-cust:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.pl-cust-ico { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--c-accent-soft); color: var(--c-accent-text); }
.pl-cust-ico svg { width: 18px; height: 18px; }
.pl-cust-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pl-cust-t b { font-size: var(--fs-section); font-weight: var(--fw-semibold); color: var(--c-ink); }
.pl-cust-t small { font-size: var(--fs-hint); color: var(--c-muted); }
.pl-cust-go { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--c-faint); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.pl-cust.on { border-style: solid; border-color: var(--c-accent); background: var(--c-accent-soft); }
.pl-cust.on .pl-cust-ico { background: var(--c-accent); color: var(--c-card); }
.pl-cust[aria-expanded="true"] .pl-cust-go { transform: rotate(90deg); stroke: var(--c-accent-text); }
.pl-custom { margin-top: calc(-1 * var(--sp-2)); border-color: var(--c-accent); }
.pl-n-ico svg { width: 15px; height: 15px; }
.pl-cgrid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3) var(--sp-4); }
.pl-cf { display: grid; align-content: start; gap: var(--sp-1); min-width: 0; font-size: var(--fs-hint); font-weight: var(--fw-semibold); color: var(--c-muted); }
.pl-cf.wide { grid-column: 1 / -1; }
.pl-cf small { min-height: 1.2em; font-weight: var(--fw-regular, 400); color: var(--c-faint); }

/* ---- the live preview */
.pl-side { position: sticky; top: 0; min-width: 0; }
.pl-live { display: grid; gap: var(--sp-3); padding: var(--sp-4); border: 1px solid var(--c-card-line); border-radius: var(--r-lg); background: var(--c-card); box-shadow: var(--card-shadow); }
#plLive { display: grid; gap: var(--sp-3); }
.pl-live h3 { margin: 0; font-size: var(--fs-hint); font-weight: var(--fw-semibold); letter-spacing: .08em; text-transform: uppercase; color: var(--c-faint); }
.pl-price { display: grid; gap: var(--sp-1); font-size: var(--fs-hint); font-weight: var(--fw-semibold); color: var(--c-muted); }
.pl-sample .pl-price { max-width: 240px; }
.pl-keys { margin: 0; display: grid; }
.pl-keys > div { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-2) 0; border-top: 1px solid var(--c-line); }
.pl-keys dt { font-size: var(--fs-table); color: var(--c-muted); }
.pl-keys dd { margin: 0; display: grid; text-align: end; }
.pl-keys dd b { font-size: var(--fs-body); font-weight: var(--fw-semibold); color: var(--c-ink); font-variant-numeric: tabular-nums; }
.pl-keys dd small { font-size: var(--fs-hint); color: var(--c-faint); }
.pl-keys > div:last-child dd b { font-size: var(--fs-section); }
.pl-note { padding: var(--sp-2) 0; border-top: 1px solid var(--c-line); font-size: var(--fs-hint); color: var(--c-muted); }
.pl-problems { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--sp-2); }
.pl-problems li { padding: var(--sp-3); border: 1px solid var(--c-danger-line); border-radius: var(--r-md); background: var(--c-danger-soft); color: var(--c-danger); font-size: var(--fs-table); }

@media (max-width: 900px) {
  .pl-shell { grid-template-columns: minmax(0, 1fr); }
  .pl-rail { display: none; }
  .pl-strip { display: flex; gap: var(--sp-2); overflow-x: auto; padding: 2px 2px var(--sp-2); margin-bottom: var(--sp-3); scrollbar-width: thin; }
  .pl-ed { grid-template-columns: minmax(0, 1fr); }
  .pl-side { position: static; }
  .pl-fields, .pl-cgrid { grid-template-columns: minmax(0, 1fr); }
  dialog.modal.pl-modal { height: 94vh; }
}
@media (prefers-reduced-motion: reduce) { .pl-card, .pl-chip span, .pl-switch i, .pl-switch i::after { transition: none; } }

/* The plan name: never typed (DECISIONS #162), so it reads as a value, not a box. */
.pl-name { display: flex; align-items: center; min-height: 40px; padding: 0 var(--sp-3); border-radius: var(--r-md); background: var(--c-tile); color: var(--c-ink); font-weight: var(--fw-semibold); overflow-wrap: anywhere; }
.pl-name-h { color: var(--c-faint); }

/* The "From Google Sheet" line and the problems box (DECISIONS #170): Sales Operations only. */
.pl-sync { margin-bottom: var(--sp-4); display: grid; gap: var(--sp-3); }
/* Deep blue = this list comes from the sheet, nothing here is edited (Sami 2026-11-14; was the pale info blue, too easy to miss). */
.pl-sync-line { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--c-info); border-radius: var(--r-md); background: var(--c-info); color: var(--c-card); }
.pl-sync-src { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.pl-sync-txt { display: grid; gap: 2px; min-width: 0; }
.pl-sync-txt > span { color: var(--c-info-line); font-size: var(--fs-hint); }
.pl-sync-ro { display: inline-flex; align-items: center; gap: var(--sp-1); margin-inline-start: var(--sp-2); padding: 1px var(--sp-2); border-radius: var(--r-pill); background: var(--c-card); color: var(--c-info); font-size: var(--fs-hint); font-weight: 600; vertical-align: middle; }
.pl-sync-ro .ico { width: 12px; height: 12px; }
.pl-sync-act { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; } /* last read beside Sync now (Sami 2026-11-16) */
.pl-sync-when { color: var(--c-info-line); font-size: var(--fs-hint); white-space: nowrap; }
.pl-sync-ic { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--c-card); color: var(--c-info); }
.pl-sync-ic .ico { width: 16px; height: 16px; }
.pl-sync-line .btn .ico { width: 14px; height: 14px; }
.pl-sync-line .btn[aria-busy="true"] .ico { animation: pl-spin 1s linear infinite; }
@keyframes pl-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pl-sync-line .btn[aria-busy="true"] .ico { animation: none; } }
.pl-sync-problems { padding: var(--sp-3) var(--sp-4); border: 1px solid var(--c-warning-line); border-radius: var(--r-md); background: var(--c-warning-soft); color: var(--c-ink); }
.pl-sync-problems ul { margin: var(--sp-2) 0 0; padding-inline-start: var(--sp-5); display: grid; gap: var(--sp-1); }
.pl-sync-problems summary { cursor: pointer; }
.pl-sync-problems summary:hover { color: var(--c-accent-text); }
.pl-sync-codes { margin-top: var(--sp-1); color: var(--c-muted); font-size: var(--fs-hint); line-height: 1.6; }
/* A sheet sync that stopped (syncBox.js): red, it is a real problem; the amber list above is for single rows only. */
.pl-sync-stop { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--c-danger-line); border-radius: var(--r-md); background: var(--c-danger-soft); color: var(--c-ink); }
.pl-sync-stop b { color: var(--c-danger); }
.pl-sync-stop p { margin: var(--sp-1) 0 0; }
.pl-sync-stop-ic { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--c-card); color: var(--c-danger); }
.pl-sync-stop-ic .ico { width: 16px; height: 16px; }
