/* Start the project you keep putting off. Loaded after articles.css, for this article only.

   The colour rule carries the argument. Orange is the project as one block: planned for a whole day,
   moved to the next one, never started. That is the leak. Indigo is what the split gives back: the
   first step done, and the rest of each day free again. Nothing else on the page is orange or indigo.
   In step 3 the same orange marks the words of a step that happen in the head, drawn exactly the way
   the tool marks them. */

.a-hero h1, .a-body h2, .a-body h3 { text-wrap: balance; }
.a-hero .lead, .a-body p, .a-body li { text-wrap: pretty; }
.sp-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* A person before the picture, in one line, so the week still clears the fold. */
.sp-by { margin-top: 18px; }
.sp-by img { width: 32px; height: 32px; }
.sp-by strong { display: inline; margin-right: 0.6em; }

/* ---------- The set piece: one block across a week, then the same project in steps ----------
   The finished week is the markup, so no JS still gets the whole picture. tool.js adds is-before
   to show the block, walks it from Monday to Friday, then splits it. */
.sp-fig { position: relative; margin: 22px 0 0; padding: clamp(14px, 2.6vw, 24px); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-float); display: grid; gap: 16px; min-width: 0; }
.sp-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.sp-toggle { padding: 0.5em 0.95em; border: 0; border-radius: 999px; background: var(--grid); color: var(--ink); font: 700 0.8125rem/1.2 var(--sans); cursor: pointer; transition: background-color 0.2s; }
.sp-toggle:hover { background: var(--rule); }
.sp-toggle[hidden] { display: none; }
.sp-toggle:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

/* Two sentences in one place, the finished one by default, so no JS still reads true. */
.sp-b4, .sp-b4k { display: none; }
.is-before .sp-b4 { display: inline; }
.is-before .sp-b4k { display: flex; }
.is-before .sp-af, .is-before .sp-afk { display: none; }

.sp-stage { position: relative; min-width: 0; }
.sp-week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.sp-day { display: grid; gap: 6px; align-content: start; min-width: 0; }
.sp-dn { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; line-height: 1.2; text-transform: uppercase; color: var(--ink); }

/* One day, drawn as a box of its own height. The block and the steps share the box, so the day
   never changes size between the two pictures: only what fills it does. */
.sp-box { position: relative; display: grid; height: 8.5rem; padding: 4px; border-radius: 12px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule); min-width: 0; }
.sp-block, .sp-after { grid-area: 1 / 1; min-width: 0; }

.sp-block { display: grid; align-content: center; gap: 6px; padding: 10px; border-radius: 9px; color: var(--lift-ink); background: var(--lift-tint); box-shadow: inset 0 0 0 1.5px var(--lift); visibility: hidden; opacity: 0; transition: opacity 0.35s var(--ease), visibility 0s 0.35s; }
.sp-block b { font-size: 0.875rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.sp-block small { font-size: 0.75rem; font-weight: 700; line-height: 1.2; }
.is-before .sp-block { visibility: visible; opacity: 1; transition: none; }
/* Where it was planned, and left: a dashed outline stays, because the day under it was spoken for.
   The words stay dark enough to read, struck through. */
.is-before .is-ghost .sp-block { place-content: center; text-align: center; background: #FFF8EF; box-shadow: none; outline: 1.5px dashed var(--lift); outline-offset: -1.5px; }
/* The title is said once, on the card that is still moving. An outline only says where it was. */
.is-before .is-ghost .sp-block b { display: none; }
.is-before .is-now .sp-block { box-shadow: inset 0 0 0 2px var(--lift), 0 8px 18px -8px rgba(162, 79, 0, 0.5); animation: sp-hop 0.38s var(--ease) both; }
.is-before .is-ahead .sp-block { visibility: hidden; opacity: 0; }
@keyframes sp-hop { from { transform: translateX(-30px); opacity: 0; } to { transform: none; opacity: 1; } }
/* The push, drawn between the days. */
.is-before .is-ghost .sp-box::after { content: "→"; position: absolute; z-index: 2; top: 50%; right: -9px; width: 18px; height: 18px; margin-top: -9px; display: grid; place-items: center; border-radius: 50%; background: var(--lift); color: #fff; font: 700 0.6875rem/1 var(--sans); }

.sp-after { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 4px; }
.sp-step, .sp-room { transition: opacity 0.45s var(--ease), transform 0.45s var(--ease); transition-delay: calc(0.18s + var(--d) * 0.11s); }
.is-before .sp-step, .is-before .sp-room { opacity: 0; transform: translateY(8px); transition: none; }
.sp-step { display: grid; gap: 4px; padding: 8px 9px; border-radius: 9px; background: #EFF0F6; color: var(--ink); min-width: 0; }
.sp-step b { font-size: 0.8125rem; font-weight: 700; line-height: 1.22; overflow-wrap: anywhere; }
.sp-step small { font-size: 0.75rem; font-weight: 700; line-height: 1.2; color: var(--ink-2); }
.sp-step.is-done { background: var(--primary-deep); color: #fff; }
.sp-step.is-done small { color: #DDE2FF; }
.sp-step.is-done small::before { content: "✓ "; font-family: var(--sans); font-weight: 700; }
.sp-step.is-wait { background: none; box-shadow: inset 0 0 0 1.5px #B5BAD2; color: var(--ink-2); }
.sp-step.is-wait b { font-weight: 600; }
.sp-room { display: flex; align-items: flex-end; padding: 8px 9px; border-radius: 9px; background: var(--primary-tint); box-shadow: inset 0 0 0 1px #C9D2FC; color: var(--primary-deep); font-size: 0.75rem; font-weight: 700; line-height: 1.2; }

.sp-read { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sp-read > div { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--paper); min-width: 0; }
.sp-read .eyebrow { color: var(--ink-hint); }
.sp-read b { font-family: var(--serif); font-size: clamp(1.6rem, 1.35rem + 1vw, 2.1rem); font-weight: 700; line-height: 1.05; color: var(--ink); }
.sp-read small { font-size: 0.8125rem; line-height: 1.3; color: var(--ink-hint); }
.sp-ask b { color: var(--primary-deep); }
.is-before .sp-read b { color: var(--lift-ink); }

.sp-key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; font-size: 0.875rem; line-height: 1.3; color: var(--ink-2); }
.sp-key li { display: flex; align-items: center; gap: 7px; }
.sp-key i { width: 14px; height: 14px; border-radius: 4px; }
.sp-key .k-moved { background: var(--lift-tint); box-shadow: inset 0 0 0 1.5px var(--lift); }
.sp-key .k-done { background: var(--primary-deep); }
.sp-key .k-step { background: #DFE1EC; }
.sp-key .k-wait { box-shadow: inset 0 0 0 1.5px #B5BAD2; }
.sp-key .k-room { background: var(--primary-tint); box-shadow: inset 0 0 0 1px #AEBBFA; }
.sp-cap { margin-top: 14px; font-size: 0.9375rem; line-height: 1.5; color: var(--ink-hint); }

/* ---------- Cards and fields ---------- */
.sp-card { padding: clamp(14px, 2.4vw, 20px); border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); display: grid; gap: 10px; min-width: 0; }
.sp-lab { font-size: 0.875rem; font-weight: 700; line-height: 1.3; color: var(--ink); }
.sp-card .sp-lab + input { margin-bottom: 6px; }
.sp-card input, .sp-fix input, .sp-wfield input, .sp-mins input { width: 100%; min-width: 0; padding: 0.65em 0.8em; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); color: var(--ink); font: 500 1rem/1.4 var(--sans); transition: border-color 0.2s, box-shadow 0.2s; }
.sp-card input:focus, .sp-fix input:focus, .sp-wfield input:focus, .sp-mins input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 108, 248, 0.25); }
.sp-card input::placeholder, .sp-fix input::placeholder, .sp-wfield input::placeholder, .sp-mins input::placeholder { color: var(--ink-hint); }

/* The one dark surface in the reading column: this is where the reader stops reading and writes. */
.sp-tool { padding: clamp(16px, 2.6vw, 26px); border-radius: 22px; background: var(--night); color-scheme: dark; display: grid; gap: 12px; min-width: 0; }
.sp-tool .sp-lab { color: var(--on-night); }
.sp-tool textarea { width: 100%; min-width: 0; padding: 0.7em 0.85em; border: 1px solid var(--night-line); border-radius: 12px; background: var(--night-2); color: var(--on-night); font: 500 1.0625rem/1.55 var(--sans); resize: vertical; transition: border-color 0.2s, box-shadow 0.2s; }
.sp-tool textarea::placeholder { color: var(--on-night-2); }
.sp-tool textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 108, 248, 0.25); }
.sp-count { font: 600 0.9375rem/1.4 var(--mono); color: var(--on-night); }
.sp-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.sp-text { padding: 0.2em 0; border: 0; background: none; color: var(--on-night); font: 600 0.9375rem/1.2 var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sp-text:hover { color: #fff; }
.sp-tool button:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.a-body .sp-tool .fine { line-height: 1.5; color: var(--on-night-2); }

.sp-empty { padding: 16px 18px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); font-size: 1rem; line-height: 1.5; color: var(--ink-hint); }
.sp-tool .sp-empty { background: var(--night-2); box-shadow: none; color: var(--on-night-2); }
.sp-say { font-size: 1.0625rem; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.sp-say[hidden] { display: none; }
.sp-say b { font-family: var(--mono); font-weight: 600; }
.sp-say.is-leak, .sp-say .is-leak { color: var(--lift-ink); }
.sp-card .sp-say { font-size: 0.9375rem; color: var(--ink-2); }
.sp-card .sp-say.is-leak { color: var(--lift-ink); }

/* ---------- Step 3: the rewrite, drawn ---------- */
/* The three small figures sit on the page itself, with no box of their own: the step already has its
   tool and its check in boxes, and a fourth frame on one screen read as clutter. */
.sp-rew { margin: 4px 0; display: grid; gap: 10px; position: relative; }
.sp-rh, .sp-rr { display: grid; grid-template-columns: minmax(0, 1fr) 1.6rem minmax(0, 1fr); gap: 10px; align-items: center; }
.sp-rh span { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em; line-height: 1.2; text-transform: uppercase; color: var(--ink-hint); }
.sp-rh span:last-child { grid-column: 3; }
.sp-rr i { font-style: normal; font-weight: 700; text-align: center; color: #8990B4; }
/* Drawn the way the tool below draws a step: the same row, with the words that happen in the head
   underlined in orange. What the reader sees here is what the page will show them. */
.sp-loose, .sp-firm { padding: 0.55em 0.8em; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink); font-size: 0.9375rem; font-weight: 600; line-height: 1.3; }
.sp-loose { box-shadow: inset 0 0 0 1px var(--rule), inset 3px 0 0 var(--lift); }
.sp-loose u { text-decoration: none; color: var(--lift-ink); background: linear-gradient(var(--lift), var(--lift)) 0 96% / 100% 2px no-repeat; }

/* ---------- Step 3 and 4: one row per step ---------- */
.sp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.a-body .sp-list { padding: 0; }
.sp-row { display: grid; gap: 8px; min-width: 0; padding: 12px 14px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); font-size: 1rem; line-height: 1.4; }
.sp-row > strong { min-width: 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
/* Flagged, so orange: the mark goes the moment the step is rewritten or kept. */
.sp-row.is-flag { box-shadow: inset 0 0 0 1px var(--rule), inset 3px 0 0 var(--lift); }
.sp-lead { color: var(--lift-ink); background: linear-gradient(var(--lift), var(--lift)) 0 96% / 100% 2px no-repeat; }
.sp-why { font-size: 0.9375rem; line-height: 1.45; color: var(--lift-ink); }
.sp-fix { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.sp-use { padding: 0.55em 1em; border: 0; border-radius: 12px; background: var(--night); color: #fff; font: 700 0.9375rem/1.2 var(--sans); cursor: pointer; }
.sp-use:hover { background: var(--night-2); }
.sp-use:focus-visible, .sp-link:focus-visible, .sp-try:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.sp-link { justify-self: start; padding: 0.1em 0; border: 0; background: none; color: var(--primary-deep); font: 600 0.875rem/1.3 var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sp-tag { font-size: 0.8125rem; font-weight: 700; line-height: 1.3; color: var(--ink-hint); }
.sp-was { font-size: 0.8125rem; line-height: 1.3; color: var(--ink-hint); }
.sp-was s { text-decoration-thickness: 1px; }
#sp-check, #sp-sizer { display: grid; gap: 12px; min-width: 0; }

/* The sample before there is a list. Recomputed colours, not opacity. */
.is-ghost .sp-row > strong { font-weight: 500; color: var(--ink-hint); }
.is-ghost .sp-why { color: #B9773A; }
.is-ghost .sp-seg button { color: var(--ink-hint); cursor: default; }
.is-ghost .sp-seg [aria-pressed="true"] { background: #DFE1EC; color: var(--ink-2); }
.sp-try { justify-self: start; padding: 0.6em 1.05em; border: 0; border-radius: 999px; background: var(--primary-tint); color: var(--primary-deep); font: 700 0.9375rem/1.2 var(--sans); cursor: pointer; }
.sp-try:hover { background: #DFE4FD; }

.sp-marks { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 8px 12px; align-items: center; }
.sp-mins { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; font-size: 0.875rem; font-weight: 600; color: var(--ink-hint); }
.sp-mins input { padding: 0.5em 0.6em; font: 500 1rem/1.3 var(--mono); }
.sp-wfield { grid-column: 1 / -1; }
.sp-row.is-next { box-shadow: inset 0 0 0 2px var(--night); }
.sp-nexttag { display: none; }
.sp-row.is-next .sp-nexttag { display: block; color: var(--ink); }

.sp-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; min-width: 0; }
.sp-seg button { min-height: 2.5rem; padding: 0.3em 0.55em; border: 0; border-radius: 10px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink-2); font: 700 0.875rem/1.15 var(--sans); cursor: pointer; transition: background-color 0.2s, box-shadow 0.2s, color 0.2s; }
.sp-seg button:hover { box-shadow: inset 0 0 0 2px #B5BAD2; }
.sp-seg button:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.sp-seg [aria-pressed="true"] { background: var(--night); box-shadow: none; color: #fff; }
.sp-seg [aria-pressed="true"]:hover { box-shadow: none; }

/* ---------- Step 5: the same step at three sizes ---------- */
.sp-ladder { position: relative; margin: 4px 0; display: grid; gap: 12px; --lw: 15rem; }
.sp-lr { display: grid; grid-template-columns: var(--lw) minmax(0, 1fr) 3.4rem; gap: 14px; align-items: center; }
.sp-lt { font-size: 0.9375rem; font-weight: 600; line-height: 1.3; color: var(--ink); }
/* The track is the scale: 45 minutes is its full width. The minutes sit in their own column, so a
   line drawn across the track never runs through them. */
.sp-tr { position: relative; align-self: stretch; display: flex; align-items: center; min-width: 0; }
.sp-tr i { display: block; width: calc(100% * var(--m) / 45); min-width: 6px; height: 14px; border-radius: 4px; background: var(--ink-2); }
.sp-lr > b { font: 600 0.8125rem/1 var(--mono); text-align: right; white-space: nowrap; color: var(--ink); }
/* The reader's own size, drawn on the same scale once they pick one: one dashed piece per row, so the
   pieces meet across the gaps and read as one line. */
.sp-ladder.has-cut { padding-top: 26px; }
.sp-ladder.has-cut .sp-tr::after { content: ""; position: absolute; top: -7px; bottom: -7px; left: calc(100% * var(--c) / 45); border-left: 2px dashed var(--ink); pointer-events: none; }
.sp-ladder.has-cut .sp-lr:first-child .sp-tr::before { content: "Your size"; position: absolute; bottom: calc(100% + 7px); left: calc(100% * var(--c) / 45); transform: translateX(-50%); padding: 0.15em 0.5em; border-radius: 6px; background: var(--ink); color: #fff; font: 700 0.6875rem/1.3 var(--sans); white-space: nowrap; }
.sp-sizes { grid-auto-flow: row; grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* ---------- Step 6: the next action, and the plan ---------- */
.sp-next { display: grid; gap: 6px; padding: clamp(16px, 2.6vw, 22px); border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 2px var(--night); min-width: 0; }
.a-body .sp-next .eyebrow { color: var(--ink-hint); }
.sp-nt { font-family: var(--serif); font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem); font-weight: 700; line-height: 1.15; color: var(--ink); overflow-wrap: anywhere; }
.sp-nm { font: 600 0.9375rem/1.4 var(--mono); color: var(--ink-2); }
.sp-nm.is-leak { color: var(--lift-ink); }
.a-step .a-code.is-tall pre { max-height: none; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Phones: the week turns on its side ----------
   Five columns at 390 leave no room to read, so each day becomes a row, and inside it the step sits
   on the left with the free part of the day running out to the right. A different drawing of the
   same week, not a smaller one. */
@media (max-width: 640px) {
  .sp-week { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .sp-day { grid-template-columns: 2.4rem minmax(0, 1fr); align-items: center; gap: 8px; }
  .sp-box { height: 3.75rem; padding: 3px; }
  .sp-block { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 6px 10px; }
  .sp-block b { font-size: 0.8125rem; }
  .sp-block small { font-size: 0.6875rem; text-align: right; }
  @keyframes sp-hop { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
  .is-before .is-ghost .sp-box::after { content: "↓"; top: auto; bottom: -11px; right: auto; left: 50%; margin: 0 0 0 -9px; }
  /* On its side the whole day turns indigo and the step is a small card sitting on it, so the free
     part still reads as most of the day, the way the column does on a desktop. */
  .sp-after { display: flex; align-items: stretch; gap: 0; padding: 3px; border-radius: 9px; background: var(--primary-tint); box-shadow: inset 0 0 0 1px #C9D2FC; transition: background-color 0.45s var(--ease) 0.15s, box-shadow 0.45s var(--ease) 0.15s; }
  .is-before .sp-after { background: none; box-shadow: none; transition: none; }
  .sp-step { flex: 0 1 auto; max-width: 64%; align-content: center; gap: 2px; padding: 5px 8px; }
  .sp-step b { font-size: 0.75rem; line-height: 1.2; }
  .sp-step small { font-size: 0.6875rem; }
  .sp-room { flex: 1 1 0; justify-content: flex-end; align-items: center; padding: 5px 8px; background: none; box-shadow: none; }
  .sp-read > div { padding: 10px 12px; }
  .sp-key { gap: 5px 14px; font-size: 0.8125rem; }

  .sp-rh { display: none; }
  .sp-rr { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .sp-rr i { display: none; }
  .sp-firm::before { content: "→ "; color: #8990B4; font-weight: 700; }


  .sp-ladder { --lw: 7.5rem; }
  .sp-lr { grid-template-columns: var(--lw) minmax(0, 1fr) 3.5rem; gap: 8px; }
  .sp-lt { font-size: 0.8125rem; }
  .sp-sizes { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .sp-marks { grid-template-columns: minmax(0, 1fr); }
  .sp-mins { grid-template-columns: 6rem auto; justify-content: start; }
  .sp-fix { grid-template-columns: minmax(0, 1fr); }
  .sp-use { justify-self: start; }
}
@media (max-width: 340px) {
  .sp-after { grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); }
  .sp-step b { font-size: 0.6875rem; }
}

@media (prefers-reduced-motion: reduce) {
  .sp-toggle, .sp-seg button, .sp-block, .sp-step, .sp-room { transition: none !important; }
  .is-before .is-now .sp-block { animation: none; }
}

/* ---------- The free prompt, just above the newsletter box ----------
   The prompt shows whole and wraps, so a reader sees all of what they paste before they copy it. Each
   line is its own row, and each step stands a little apart under its own number, so five steps read as
   five. The newlines stay in the text between the rows, so Copy still gives the prompt as written: a
   grid does not draw text that is only white space. The line under the box leads into the newsletter
   box, so the section keeps no space of its own at the bottom. */
.a-prompt { margin-top: 8px; border-top: 1px solid var(--rule); padding-bottom: 0; }
.a-prompt .a-code.is-tall pre { max-height: none; white-space: pre-wrap; overflow-wrap: anywhere; }
.a-prompt .a-code code { display: grid; }
.a-prompt code .is-gap { margin-top: 1.1em; }
.a-prompt code .is-step { padding-left: 3ch; text-indent: -3ch; }
.a-prompt code .is-step + .is-step { margin-top: 0.7em; }
.a-prompt code b { font-weight: 700; color: #fff; }
/* Copying is the one thing to do here, so its button is the primary one and the prompt's name reads. */
.a-prompt .a-code[data-label]::before { top: 21px; font-size: 0.875rem; color: var(--on-night); }
.a-prompt .a-copy { top: 12px; padding: 0.7em 1.25em; font-size: 0.875rem; color: #fff; background: var(--primary); }
.a-prompt .a-copy:hover { background: var(--primary-deep); }
/* A link to #free-prompt lands clear of the progress strip, the way #updates does. */
@media (max-width: 1080px) { .a-prompt { scroll-margin-top: 66px; } }
