/* Daily Life Doc, round 38 (zone G2): the Plan tab's two parts, Goals and Rules (js/plan/plan-goal-draw.js, the page
   "Goals, Progress, Instructions", part 1): each goal one paragraph with a ring before it (filled when Done), Required
   or Optional at its right, its lines under it as "time · what happens · You" (no chips), its box on a tinted field
   (Instructions ✓/✗, Apps, Atlas, Connections with a status, Saves; one quiet line for a short goal), today's record
   and Pause; then the Rules. The headings reuse the round 30 section label (css/plan-sections.css .psec). */

.plines.pgmode { gap: 0; }
.pg-goals, .pg-rules { display: flex; flex-direction: column; }
.pg-goals > .psec { margin-top: 4px; }
.pgadd { align-self: flex-start; margin: 4px 0 6px 16px; padding: 4px 8px; border: 0; border-radius: 8px; background: none; color: var(--ink3);
  font: inherit; font-size: var(--t-s); cursor: pointer; transition: background-color var(--m-step, 160ms) ease, color var(--m-step, 160ms) ease; }
.pgadd:hover { background: var(--field); color: var(--ink2); }

/* ---------- A goal ---------- */
.pgb { display: flex; flex-direction: column; gap: 2px; margin: 0 10px; padding: 8px 6px 10px; border-top: 1px solid var(--cardline); }
.pg-list > .pgb:first-child { border-top: 0; }
.pgb.in { animation: dd-rise var(--m-add, 260ms) var(--ease-out, ease-out) backwards; }
.pgh { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; column-gap: 9px; align-items: start; }
.pgh::before { content: ""; width: 16px; height: 16px; margin-top: 7px; border-radius: 50%; border: 2px solid var(--sage-d); box-sizing: border-box; }
.pgb.done .pgh::before { background: var(--sage); border-color: var(--sage); }
.pgb.unpub .pgh::before { box-shadow: 0 0 0 3px color-mix(in srgb, var(--sage) 30%, transparent); }
.pgln.pln { padding: 3px 6px; font-size: var(--t-m); font-weight: 500; }
.pgln .ptx { flex-basis: 100%; }
.pgrq { margin-top: 6px; padding: 1px 6px; border: 0; border-radius: 6px; background: none; color: var(--ink3); font: inherit; font-size: var(--t-2xs);
  font-weight: 500; white-space: nowrap; cursor: pointer; }
button.pgrq:hover { background: var(--field); color: var(--ink2); }
.pgrq.opt { font-style: italic; }
.pgs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding-left: 31px; font-size: var(--t-xs); color: var(--ink3); }
.pgs:empty { display: none; }
.pgs .chp.q { white-space: normal; text-align: left; }
.pgdone b { font-weight: 600; color: var(--sage-d); }
.pgpz { color: var(--try-d); font-weight: 500; }
.pgb.paused .pgl .ptx, .pgb.paused .pgl .psay { color: var(--ink3); }

/* ---------- The goal's lines: time · what happens · You ---------- */
/* css/profile.css's .prow (a Profile row: padding, a rule between rows) shares the name: the plan's rows have neither. */
.pgmode .prow { padding: 0; gap: 0; border-radius: 0; }
.pgmode .prow + .prow { border-top: 0; }
.pgl { display: flex; flex-direction: column; padding-left: 19px; }
.pgl:empty { display: none; }
.pgmode .pln { align-items: baseline; }
.pgmode .pgl .pln { flex-wrap: nowrap; font-size: var(--t-s); }
.pgmode .pgl .pend { flex: none; }
.chp.pgtm { flex: 0 0 96px; display: inline-block; padding: 0; border-radius: 4px; background: none; color: var(--ink2); font-weight: 500;
  font-size: var(--t-xs); font-variant-numeric: tabular-nums; text-align: left; white-space: pre-line; line-height: 1.35; cursor: pointer; }
.chp.pgtm.on { box-shadow: none; color: var(--sage-d); text-decoration: underline; text-underline-offset: 3px; }
.chp.pgtm[hidden] { display: none; }
.pg-rl .chp.pgtm { flex: none; margin-right: 6px; } /* a Rule's time never runs into its words (fixer VF2) */
.psay { flex: 1 1 auto; min-width: 0; cursor: text; overflow-wrap: anywhere; }
.prow.rd .ptx { display: none; }
.prow:not(.rd) .psay { display: none; }
.pln.paused .psay { color: var(--ink3); }
.pgmode .pln .aitag { order: 9; flex: none; white-space: nowrap; }
.pgmode .pln.isai .aitag { display: none; }
.pgmode .pln.isyou .aitag { display: inline-block; max-width: none; opacity: 1; padding: 0 6px; background: color-mix(in srgb, var(--sage) 26%, transparent); color: var(--sage-d); }
.pgmode .pln.isyou .aitag:empty { display: none; }

/* ---------- The goal's box ---------- */
.pgx:empty, .pgf:empty { display: none; }
.gbox { display: grid; gap: 6px; margin: 6px 0 4px 25px; padding: 10px 12px; border-radius: 12px; background: var(--field); }
.gr { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; align-items: baseline; font-size: var(--t-xs); }
.gr > span:first-child { color: var(--ink3); font-weight: 500; }
.grv { display: flex; flex-wrap: wrap; gap: 4px 12px; min-width: 0; }
.gri { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; }
.ins { display: flex; flex-wrap: wrap; gap: 6px; }
.pgi { padding: 1px 8px; border: 0; border-radius: 7px; font: inherit; text-align: left; font-size: var(--t-xs); line-height: 20px; cursor: pointer;
  transition: background-color var(--m-step, 160ms) ease, color var(--m-step, 160ms) ease, transform var(--m-press, 100ms) ease; }
.pgi:active { transform: scale(.97); }
.pgi.ok { background: var(--note); color: var(--note-d); }
.pgi.ok i { margin-left: 5px; padding: 0 4px; border-radius: 4px; background: color-mix(in srgb, var(--sage) 26%, transparent); color: var(--sage-d);
  font-style: normal; font-size: var(--t-2xs); font-weight: 600; }
.pgi.no { background: var(--bad-bg); color: var(--bad-d); text-decoration: line-through; }
.pgi.addi { background: none; color: var(--ink3); }
.pgi.addi:hover { color: var(--ink2); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.pgst { display: inline-block; padding: 0 6px; border-radius: 6px; font-size: var(--t-2xs); font-weight: 600; line-height: 18px; white-space: nowrap; }
.pgi .pgst { margin-left: 6px; } /* fixer FX-W: an instruction's status (the AI buddy's Ready) beside its name */
.pgst-ready { background: color-mix(in srgb, var(--sage) 26%, transparent); color: var(--sage-d); }
.pgst-building { background: var(--note); color: var(--note-d); }
.pgst-waiting { background: var(--try-bg); color: var(--try-d); }
.pgst-cannot { background: var(--bad-bg); color: var(--bad-d); }
.pgst-asking { background: var(--note); color: var(--note-d); } /* an Atlas field asked of the client (fixer VF2) */
.pgnote { color: var(--ink3); }
.gsum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 2px 0 2px 25px; font-size: var(--t-xs); color: var(--ink3); }
.gsum b { font-weight: 500; color: var(--ink2); }
.pgsb { padding: 0; border: 0; background: none; font: inherit; font-weight: 500; color: var(--ink2); cursor: pointer; }
.pgsb:hover { text-decoration: line-through; color: var(--bad-d); }
.gsum .pgi.addi { padding: 0 6px; line-height: 18px; }
.pgmenu { margin: 0 0 4px 104px; max-width: 420px; }
.pgmenu .chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Today's record and Pause ---------- */
.pgf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 2px 0 0 25px; font-size: var(--t-xs); color: var(--ink3); }
.pgtd { flex: 1 1 200px; min-width: 0; }
.pgtd b { font-weight: 600; color: var(--ink2); margin-right: 4px; }
.pgpause { margin-left: auto; }

/* ---------- The Rules ---------- */
.pg-rl { display: flex; flex-direction: column; padding: 0 10px; }
.pg-rules > .psec { margin-top: 16px; }

/* ---------- The plan beside Chat: read only, quieter ---------- */
.cpside .pgb { margin: 0; padding: 6px 0 8px; }
.cpside .pgln.pln { font-size: var(--t-s); }
.cpside .pgl { padding-left: 12px; }
.cpside .chp.pgtm { flex-basis: 84px; } /* "Every 2 days" on one line (fixer FX-Z) */
.cpside .pgmode .pgl .pln { display: flex; }
.cpside .pgmode .pln .psay { display: inline; }

@media (max-width: 520px) {
  .pgb { margin: 0 4px; padding-left: 2px; padding-right: 2px; }
  .pgh { grid-template-columns: 16px minmax(0, 1fr); }
  .pgm { grid-column: 2; padding-left: 6px; }
  .pgrq { margin-top: 0; padding-left: 0; }
  .pgl { padding-left: 0; }
  .chp.pgtm { flex-basis: 78px; } /* "Every 2 days", "Right away" on one line at a phone width (fixer FX-Z) */
  .gbox { margin-left: 0; padding: 10px; }
  .gr { grid-template-columns: 80px minmax(0, 1fr); }
  .gsum, .pgf, .pgs { padding-left: 0; }
  .pgmenu { margin-left: 0; }
  .pgadd { margin-left: 8px; }
  .pg-rl { padding: 0 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .pgb.in { animation: none; }
}

/* ---------- Publish's list of what changes (js/plan/plan-publish-list.js) ---------- */
.publ { display: grid; gap: 5px; margin: 0 0 14px; }
.publh { margin-top: 6px; font-size: var(--t-xs); font-weight: 600; color: var(--ink3); }
.publr { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 6px; font-size: var(--t-s); line-height: 1.4; overflow-wrap: anywhere; }
.publm { font-weight: 600; color: var(--sage-d); text-align: center; }
.publr.off { color: var(--ink2); }
.publr.off .publm { color: var(--bad-d); }
.pubwh { margin-top: 4px; }

/* Round 39 (builder M1): the goal's block or the Rules a dragged line will land in. */
.pgb.pgdrop, .pg-rules.pgdrop { border-radius: 12px; background: var(--soft); box-shadow: inset 0 0 0 2px var(--sage-d); transition: background 120ms var(--ease-out); }
