/* Plan and one send time (/:slug/plan, /:slug/plan/:day/:slot): this page group's own rules, loaded after app.css.
 *
 * The shared components (the header, the title line ov-head, the list chooser ov-lists and service
 * chip ov-esp, figures ov-figs / ov-f-*, ov-lead, ov-plot, keys, marks, meters, ov-vs, ov-div, tones
 * ov-s-*) live in app.css with one name each: use them, never redefine them here. Every colour is a
 * token from the top of app.css.
 *
 * Every class here starts with pln-. Marks' states are is-<kind>, always written scoped to their
 * component (.pln-pipe > .is-done, never .is-done alone). */

/* ── Two figures between hairlines: action required, and the next send ── */
.pln-figs { --n: 2; }
.pln-figs .ov-f-v.pln-bad { color: var(--bad); }
.pln-figs .ov-f-viz { height: auto; min-height: 44px; margin-top: 14px; }

/* Who sees to the send times ahead: Sender Pilot, a person, the old scheduler, nobody yet. */
.pln-who { display: flex; gap: 2px; height: 10px; }
.pln-who > i { flex: 1 1 0; min-width: 3px; }
.pln-who > i:first-child { border-radius: 5px 0 0 5px; }
.pln-who > i:last-child { border-radius: 0 5px 5px 0; }
.pln-who > i:only-child { border-radius: 5px; }
.pln-who > .is-pilot, .pln-leg .ov-sw8.is-pilot { background: var(--mark); }
.pln-who > .is-you, .pln-leg .ov-sw8.is-you { background: var(--warn); }
.pln-who > .is-old, .pln-leg .ov-sw8.is-old { background: var(--line-2); }
.pln-who > .is-open, .pln-leg .ov-sw8.is-open { box-shadow: inset 0 0 0 1px var(--line-2); }
.pln-leg { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 9px; font-size: 12px; color: var(--ink-3); }
.pln-leg span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.pln-leg b { font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* The next send out: its headline and how far it has got. */
.pln-next { display: block; }
.pln-next .pln-hl { margin-top: 0; font-size: 14px; }
a.pln-next:hover .pln-hl { color: var(--accent); }
.pln-next .pln-top { margin-top: 7px; }

/* ── The pipeline: four steps, one mark each. Article, approval, in the email service, scheduled. ── */
.pln-pipe { display: inline-grid; grid-template-columns: repeat(4, 11px); column-gap: 2px; flex: none; }
.pln-pipe > i { display: block; height: 5px; border-radius: 1.5px; box-shadow: inset 0 0 0 1px var(--line-2); }
.pln-pipe > .is-done, .pln-step > .is-done, .pln-dm.is-done, .pln-k.is-done { background: var(--mark); box-shadow: none; }
.pln-pipe > .is-auto, .pln-step > .is-auto, .pln-dm.is-auto, .pln-k.is-auto { box-shadow: inset 0 0 0 1px var(--mark); opacity: 0.55; }
.pln-pipe > .is-you, .pln-step > .is-you, .pln-dm.is-you, .pln-k.is-you { box-shadow: inset 0 0 0 1.5px var(--warn); }
.pln-pipe > .is-test, .pln-step > .is-test, .pln-dm.is-test, .pln-k.is-test { background: repeating-linear-gradient(135deg, var(--mark) 0 1.5px, transparent 1.5px 3.5px); box-shadow: inset 0 0 0 1px var(--mark); }
.pln-pipe > .is-old, .pln-step > .is-old, .pln-dm.is-old, .pln-k.is-old { background: var(--line-2); box-shadow: none; }
.pln-pipe > .is-miss, .pln-step > .is-miss, .pln-dm.is-miss, .pln-k.is-miss { background: var(--bad); box-shadow: none; }
.pln-pipe > .is-kept, .pln-step > .is-kept { box-shadow: none; border-top: 1px dashed var(--line-2); height: 3px; margin-top: 2px; border-radius: 0; }
.pln-dm.is-kept { box-shadow: none; border: 1px dashed var(--line-2); }

/* The key under the caption, with the pipeline's own marks. */
.pln-k { display: inline-block; width: 14px; height: 6px; border-radius: 1.5px; box-shadow: inset 0 0 0 1px var(--line-2); }

/* ── Send times: one row per day, one column per send time of this list ── */
.pln-sec { margin-top: 28px; }
.pln-sec .ov-cap { margin-bottom: 8px; }
.pln-row { display: grid; grid-template-columns: 52px repeat(var(--n, 3), minmax(0, 1fr)); column-gap: 28px; margin: 0 -12px; padding: 12px; border-top: 1px solid var(--line); }
.pln-row-head { padding-top: 0; padding-bottom: 8px; border-top: 0; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.pln-row.pln-today { border-radius: 8px; background: var(--wash); border-top-color: transparent; }
.pln-row.pln-today + .pln-row { border-top-color: transparent; }
.pln-day { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; font-size: 12px; color: var(--ink-3); }
.pln-day b { min-width: 24px; padding: 0 5px; border-radius: 999px; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pln-today .pln-day b { background: var(--accent); color: var(--on-accent); }
.pln-today .pln-day span { color: var(--ink-2); }

/* One send time. A 2px edge marks one that needs a person (amber) or was missed (red). */
.pln-c { display: block; min-width: 0; margin-left: -10px; padding: 1px 0 2px 10px; }
.pln-c.pln-need { box-shadow: inset 2px 0 0 var(--warn); }
.pln-c.pln-missed { box-shadow: inset 2px 0 0 var(--bad); }
a.pln-c:hover .pln-hl { color: var(--accent); }
.pln-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pln-st { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--ink-3); }
.pln-st b { font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
/* A rate still collecting clicks (under 48 hours): lighter, in place of the words "so far". */
.pln-st b.pln-part { font-weight: 500; color: var(--ink-3); }
.pln-st.pln-st-you { font-weight: 600; color: var(--warn); }
.pln-st.pln-st-miss { font-weight: 600; color: var(--bad); }
.pln-hl { display: -webkit-box; margin-top: 5px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 13.5px; line-height: 1.35; font-weight: 550; color: var(--ink); text-wrap: pretty; }
.pln-hl.pln-hl-old { font-weight: 450; color: var(--ink-2); }
.pln-pick { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 7px; margin-top: 6px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.pln-pick b { font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pln-pick b.pln-weak { color: var(--warn); }
.pln-pick .ov-vs { width: 48px; height: 4px; }
.pln-pick .ov-vs > b { top: -2px; bottom: -2px; }
.pln-int { display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; border-radius: 999px; font-size: 11.5px; font-weight: 550; line-height: 18px; color: var(--accent); background: var(--wash); }

/* Days in a row with nothing in any send time yet, all alike, fold into one line:
   a small mark per day under each send time, and what will happen, said once. */
.pln-row.pln-fold { padding-top: 10px; padding-bottom: 10px; align-items: center; }
.pln-fold .pln-day { white-space: nowrap; }
.pln-fc { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pln-dms { display: inline-flex; gap: 5px; flex: none; }
.pln-dm { display: block; width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-2); }
.pln-dm:hover { outline: 1px solid var(--ink-3); outline-offset: 1px; }

/* ════ One send time ════ */

.pln-crumbs { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; font-size: 13px; color: var(--ink-2); }
.pln-crumbs a { display: inline-flex; align-items: center; gap: 5px; font-weight: 550; white-space: nowrap; }
.pln-crumbs a:hover { color: var(--accent); }
.pln-adj { display: flex; gap: 18px; }
.pln-adj a { font-weight: 500; }

.pln-shead { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 14px; }
.pln-shead h1 { font-size: 24px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; }
.pln-aud { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: 6px; font-size: 12.5px; color: var(--ink-3); }
.pln-aud span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pln-aud b { font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pln-clash { margin: 18px 0 0; }

/* The four steps across the page: the same pipeline, at the page's width. */
.pln-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 3px; margin-top: 22px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.pln-step { min-width: 0; padding-right: 18px; }
.pln-step > i { display: block; height: 6px; border-radius: 3px; box-shadow: inset 0 0 0 1px var(--line-2); }
.pln-step-n { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; font-weight: 600; }
.pln-step-n .ico { width: 13px; height: 13px; }
.pln-step.pln-step-wait .pln-step-n { color: var(--ink-2); font-weight: 550; }
.pln-step.pln-step-you .pln-step-n { color: var(--warn); }
.pln-step-w { margin-top: 1px; font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pln-step .act { margin-top: 10px; gap: 6px 12px; }

/* The article and why, beside the email. */
.pln-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; margin-top: 24px; align-items: start; }
.pln-block + .pln-block { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.pln-bcap { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 8px; }
.pln-bcap h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.pln-bcap .ov-q { text-align: right; }
.pln-bcap .ov-q a { color: var(--ink-2); font-weight: 550; }
.pln-bcap .ov-q a:hover { color: var(--accent); }
.pln-left { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 550; color: var(--warn); }
.pln-from { font-size: 12.5px; color: var(--ink-3); }
.pln-from + .pln-title { margin-top: 1px; }
.pln-title { font-size: 17px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; text-wrap: pretty; }
.pln-title.pln-sm { font-size: 14.5px; }
.pln-title a:hover { color: var(--accent); }
.pln-title.pln-2nd { font-size: 14px; font-weight: 550; letter-spacing: 0; }
.pln-stale .pln-2nd { color: var(--ink-3); text-decoration: line-through; }
.pln-warn { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; font-weight: 550; color: var(--warn); }
.pln-pre { margin-top: 4px; font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.pln-url { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--ink-3); min-width: 0; }
.pln-url a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pln-url a:hover { color: var(--accent); }
.pln-found { display: inline-flex; align-items: center; gap: 4px; flex: none; color: var(--ink-3); }
.pln-found.pln-gone { font-weight: 550; color: var(--bad); }

/* Why this article: measures, each with a small mark and its figure. */
.pln-why { margin-top: 12px; }
.pln-wr { display: grid; grid-template-columns: 104px minmax(0, 1fr) 72px; align-items: center; column-gap: 14px; min-height: 34px; border-top: 1px solid var(--line); }
.pln-wl { font-size: 12.5px; color: var(--ink-3); }
.pln-wv { text-align: right; white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
.pln-wv small { font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.pln-wv.pln-dim { font-weight: 500; color: var(--ink-3); }
.pln-wv.pln-weak { color: var(--warn); }
.pln-wr .ov-vs { display: block; width: 100%; }
.pln-rest { position: relative; display: block; height: 6px; border-radius: 3px; background: var(--line); }
.pln-rest > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--line-2); }
.pln-rest > b { position: absolute; top: -3px; bottom: -3px; width: 1px; background: var(--ink-3); }
.pln-why .ov-div { height: 28px; gap: 4px; }
.pln-why .ov-div > i { flex: 0 0 14px; max-width: none; }
.pln-wr .pln-none { display: block; border-top: 1px dashed var(--line-2); }

/* Sending a test: one field and its button. */
.pln-test { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }

/* Doing something by hand: a control on the right, and a part that opens below it. */
.pln-hand::after { content: ""; display: block; clear: both; }
.pln-keep { float: right; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; margin: 0 0 6px 16px; font-size: 13px; }
.pln-hand-one .pln-keep { float: none; margin: 0; }
.pln-edit summary, .pln-trail summary { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; cursor: pointer; font-size: 13px; font-weight: 550; color: var(--ink-2); list-style: none; }
.pln-edit summary::-webkit-details-marker, .pln-trail summary::-webkit-details-marker { display: none; }
.pln-edit summary:hover, .pln-trail summary:hover { color: var(--ink); }
.pln-edit summary svg, .pln-trail summary svg { transition: transform 0.12s; }
.pln-edit[open] summary svg, .pln-trail[open] summary svg { transform: rotate(90deg); }
.pln-edit .article { clear: both; padding-top: 2px; }
.pln-b-edit .pln-edit summary { display: none; }
.pln-trail .trail { clear: both; }
.pln-open { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
.pln-open span { color: var(--ink-3); font-variant-numeric: tabular-nums; }

.pln-prev { position: sticky; top: 76px; }
.pln-vers { margin-bottom: 12px; }

/* The old scheduler's send at this time, and nothing else. */
.pln-old { max-width: 640px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.pln-old .pln-open { margin-top: 10px; }

/* ── Narrower ── */
@media (max-width: 960px) {
  .pln-row { column-gap: 18px; grid-template-columns: 40px repeat(var(--n, 3), minmax(0, 1fr)); }
  /* One column: the article, then the email, then the rest. */
  .pln-split { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pln-split > .pln-col { display: contents; }
  .pln-split .pln-block { order: 3; }
  .pln-split .pln-b-art { order: 1; }
  .pln-prev { position: static; order: 2; margin: 24px 0 4px; }
  .pln-split .pln-block + .pln-block, .pln-prev ~ .pln-block { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
  .pln-split .pln-b-art + .pln-block { margin-top: 22px; }
  .pln-step { padding-right: 12px; }
  .pln-step-w { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; }
}
@media (max-width: 640px) {
  .pln-figs { grid-template-columns: minmax(0, 1fr); }
  .pln-figs .ov-f { padding-left: 0; border-left: 0; }
  .pln-row { grid-template-columns: minmax(0, 1fr); row-gap: 12px; }
  .pln-row-head { display: none; }
  .pln-day { flex-direction: row; align-items: center; gap: 6px; }
  .pln-fc::before { content: attr(data-time); flex: 0 0 40px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
  .pln-c::before { content: attr(data-time); display: block; margin-bottom: 2px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
  .pln-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .pln-keep { float: none; margin: 0 0 8px; }
}
