/* Did the automation save time. Loaded after articles.css, for this article only.

   One picture carries the page: the same week of one task, three times, on one scale. The full bar
   is what the task took by hand. Ink is a person's hands on it. Orange is the time that leaks back
   in after the automation: checking, fixing and upkeep, told apart by shade and pattern, never by
   a second colour. Indigo is the time that came back, and nothing else on this page uses it.

   Every segment is a flex item sized by its minutes (--m), so the same markup lies down on wide
   screens and stands up as columns on phones. tool.js builds the reader's own bars from these
   classes, so what they make looks like what they were shown. */

:root { --dt-bar: 60px; --dt-col: 340px; }

.a-body p, .a-body li, .a-done span, .dt-cap, .a-rail li a > span { text-wrap: pretty; }

/* The reading picks up again after the picture: a rule says so, where a gap read as a missing piece. */
.a-sec[data-sec="why"] { border-top: 1px solid var(--rule); }

/* ---------- The argument in one line, before anyone scrolls ----------
   Same scale, same colours as the picture below it: what it took by hand, what leaked back in, what came back. */
.dt-strip { margin: 34px 0 0; display: grid; gap: 12px; }
.dt-strip-top { font-size: 1rem; font-weight: 600; line-height: 1.3; color: var(--ink); }
.dt-strip-top b { font-family: var(--mono); font-weight: 600; }
.dt-strip-bar { display: flex; gap: 3px; height: clamp(76px, 10vw, 108px); }
.dt-strip-bar i { display: block; height: 100%; font-style: normal; }
.dt-strip-bar .is-w { flex: 15 0 0; min-width: 10px; border-radius: 12px 0 0 12px; background: var(--ink); }
.dt-strip-bar .is-q, .dt-strip-bar .is-b { display: flex; align-items: center; min-width: 0; padding-inline: clamp(12px, 2.2vw, 24px); }
.dt-strip-bar .is-q { flex: 112.7 0 0; background: var(--lift); color: var(--ink); }
.dt-strip-bar .is-b { flex: 97.3 0 0; border-radius: 0 12px 12px 0; background: var(--primary-deep); color: #fff; }
.dt-strip-bar span { font-size: 1rem; font-weight: 600; line-height: 1.2; }
.dt-strip-bar b { display: block; font-family: var(--mono); font-size: clamp(1.5rem, 1.1rem + 2.2vw, 2.4rem); font-weight: 600; letter-spacing: -0.02em; }
.dt-strip figcaption { font-size: 0.9375rem; line-height: 1.4; color: var(--ink-hint); }

.a-body .dt-pull { padding-block: 6px; font-family: var(--serif); font-size: clamp(1.5rem, 1.25rem + 1vw, 1.9rem); font-weight: 700; line-height: 1.18; letter-spacing: -0.012em; color: var(--ink); text-wrap: balance; }
.dt-cap { font-size: 0.9375rem; line-height: 1.5; color: var(--ink-hint); }

@media (min-width: 641px) {
  .a-table { table-layout: fixed; }
  .a-table th:nth-child(1), .a-table td:nth-child(1) { width: 32%; }
  .a-table th:nth-child(2), .a-table td:nth-child(2) { width: 30%; }
}

/* ---------- The set piece ---------- */
.dt-fig { margin: 0; padding: clamp(16px, 2.6vw, 26px); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-float); display: grid; gap: 18px; min-width: 0; }
.dt-head { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; }
.dt-head .eyebrow { color: var(--ink-hint); }
.dt-unit { font: 500 0.75rem/1.3 var(--mono); color: var(--ink-hint); }

.dt-chart { display: grid; gap: 16px; min-width: 0; }
.dt-row { display: grid; gap: 7px; min-width: 0; }
.dt-rl { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; font-size: 0.9375rem; font-weight: 700; line-height: 1.25; color: var(--ink); }
.dt-rl small { font-size: 0.8125rem; font-weight: 500; color: var(--ink-hint); }

.dt-bar { display: flex; gap: 2px; height: var(--dt-bar); min-width: 0; }
.dt-bar > i { flex: var(--m) 1 0px; display: flex; align-items: center; min-width: 0; overflow: hidden; border-radius: 3px; font-style: normal; }
.dt-bar > i:first-child { border-radius: 10px 3px 3px 10px; }
.dt-bar > i:last-child { border-radius: 3px 10px 10px 3px; }
.dt-bar > i:only-child { border-radius: 10px; }
.dt-bar span { display: grid; gap: 1px; padding: 0 8px; font-size: 0.75rem; font-weight: 700; line-height: 1.15; white-space: nowrap; }
.dt-bar span em { font-style: normal; }
.dt-bar span b { font: 600 0.875rem/1.2 var(--mono); }
.dt-bar .no-l span { display: none; }

/* The parts. Ink is a person, orange is the leak, indigo is what came back. */
.s-hand, .s-touch { background: var(--ink); color: #fff; }
.s-check { background: var(--lift); color: var(--ink); }
.s-fix { background: var(--lift-ring); color: var(--ink); }
.s-keep { background: repeating-linear-gradient(135deg, var(--lift) 0 2px, var(--lift-tint) 2px 7px); color: var(--ink); }
.dt-bar .s-keep span { margin-left: 4px; padding: 3px 5px; border-radius: 6px; background: var(--lift-tint); }
.s-back { background: var(--primary-deep); color: #fff; }
.s-gap { background: none; }
.s-back span { font-size: 0.8125rem; }
.s-back span b { font-size: 1rem; }

/* The demo's number, shown only while the leak is still drawing in. Without JS it never shows. */
.s-back { display: grid !important; }
.s-back > span { grid-area: 1 / 1; align-self: center; }
.dt-paper { display: none !important; }

/* ---------- The one motion moment ----------
   Armed by articles.js. The bar starts as the demo shows it: a sliver of ink and a long stretch of
   indigo. Then checking, fixing and upkeep grow in from the left and push the indigo back. Then the
   tuned row appears. Without JS, or with reduced motion, every row is simply finished. */
.is-armed .dt-paper { display: grid !important; }
.is-auto .s-check { transition: flex-grow 0.8s var(--ease) 0.35s; }
.is-auto .s-fix { transition: flex-grow 0.7s var(--ease) 0.95s; }
.is-auto .s-keep { transition: flex-grow 0.7s var(--ease) 1.45s; }
.is-auto .s-check span, .is-auto .s-fix span, .is-auto .s-keep span { transition: opacity 0.3s 2.1s; }
.is-armed .is-auto .dt-paper { opacity: 0; transition: opacity 0.25s 0.3s; }
.is-armed .is-auto .dt-real { transition: opacity 0.35s 2.15s; }
.is-armed .is-tuned { transition: opacity 0.6s var(--ease) 2.5s, transform 0.6s var(--ease) 2.5s; }

.is-armed:not(.is-cut) .is-auto .s-check,
.is-armed:not(.is-cut) .is-auto .s-fix,
.is-armed:not(.is-cut) .is-auto .s-keep { flex-grow: 0; transition: none; }
.is-armed:not(.is-cut) .is-auto .s-check span,
.is-armed:not(.is-cut) .is-auto .s-fix span,
.is-armed:not(.is-cut) .is-auto .s-keep span,
.is-armed:not(.is-cut) .is-auto .dt-real { opacity: 0; transition: none; }
.is-armed:not(.is-cut) .is-auto .dt-paper { opacity: 1; transition: none; }
.is-armed:not(.is-cut) .is-tuned { opacity: 0; transform: translateY(6px); transition: none; }

/* ---------- The numbers under the picture ---------- */
.dt-read { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dt-read > div { display: grid; gap: 3px; align-content: start; padding: 12px 14px; border-radius: 12px; background: var(--paper); min-width: 0; }
.dt-read .eyebrow { color: var(--ink-hint); }
.dt-read b { font: 600 1.375rem/1.15 var(--mono); color: var(--ink); }
.dt-read small { font-size: 0.8125rem; line-height: 1.3; color: var(--ink-hint); }
.dt-read .is-left b { color: var(--lift-ink); }
.dt-read .is-back b { color: var(--primary-deep); }

.a-body .dt-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); }
.dt-key li { display: flex; align-items: center; gap: 7px; }
.dt-key i { width: 14px; height: 14px; border-radius: 4px; background: var(--ink); }
.dt-key .k-check { background: var(--lift); }
.dt-key .k-fix { background: var(--lift-ring); }
.dt-key .k-keep { background: repeating-linear-gradient(135deg, var(--lift) 0 2px, var(--lift-tint) 2px 5px); }
.dt-key .k-back { background: var(--primary-deep); }

/* ---------- Step 2: the four parts, named ---------- */
.a-body .dt-parts-def { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dt-parts-def li { display: grid; gap: 4px; align-content: start; padding: 14px 16px 14px 42px; position: relative; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); font-size: 0.9375rem; line-height: 1.45; }
.dt-parts-def li::before { content: ""; position: absolute; left: 16px; top: 18px; width: 14px; height: 14px; border-radius: 4px; background: var(--ink); }
.dt-parts-def .p-check::before { background: var(--lift); }
.dt-parts-def .p-fix::before { background: var(--lift-ring); }
.dt-parts-def .p-keep::before { background: repeating-linear-gradient(135deg, var(--lift) 0 2px, var(--lift-tint) 2px 5px); }
.dt-parts-def b { color: var(--ink); font-size: 1rem; }

/* ---------- Step 2: a week, with one failure ----------
   The same parts at day size. The daily slivers and the two lumps sit on one scale, 120 minutes. */
.dt-week { margin: 0; padding: clamp(18px, 3vw, 26px); border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); display: grid; gap: 12px; min-width: 0; }
.dt-wk-h { font-size: var(--t-eyebrow); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-hint); }
.dt-wk { display: grid; gap: 8px; }
.dt-wr { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 4rem; gap: 10px; align-items: center; min-width: 0; }
.dt-wd { font-size: 0.875rem; font-weight: 700; line-height: 1.2; color: var(--ink); }
.dt-wt { position: relative; display: flex; gap: 2px; height: 30px; min-width: 0; border-radius: 6px; background: var(--grid); }
.dt-wt i { flex: none; width: calc(var(--m) / 120 * 100%); min-width: 3px; display: flex; align-items: center; overflow: hidden; font-style: normal; border-radius: 3px; }
.dt-wt i:first-child { border-radius: 6px 3px 3px 6px; }
.dt-wt i:only-child { border-radius: 6px; }
.dt-wt span { padding: 0 8px; font-size: 0.8125rem; font-weight: 700; line-height: 1.2; white-space: nowrap; color: var(--ink); }
.dt-wt .s-keep span { margin-left: 4px; padding: 2px 6px; border-radius: 6px; background: var(--lift-tint); }
.dt-wm { font: 600 0.875rem/1.2 var(--mono); text-align: right; color: var(--ink); }
.dt-wr.is-month { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--rule); }
.dt-wk-note { font-size: 1rem; line-height: 1.45; color: var(--ink); }

/* ---------- Step 5: where the alert lands ----------
   Two timelines, one failure. The long orange stretch is the time nobody knew. */
.dt-alert { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.dt-route { padding: clamp(16px, 2.6vw, 22px); border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); display: grid; gap: 14px; align-content: start; min-width: 0; }
.dt-rh { font-size: 1.0625rem; font-weight: 700; line-height: 1.25; color: var(--ink); }
.a-body .dt-tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.dt-tl li { position: relative; display: grid; gap: 1px; padding: 0 0 14px 24px; font-size: 0.9375rem; line-height: 1.4; color: var(--ink-2); }
.dt-tl li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.dt-tl li::after { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 2px; background: #AEB5D6; }
.dt-tl li:last-child { padding-bottom: 0; }
.dt-tl li:last-child::after { display: none; }
.dt-tl time { font: 600 0.8125rem/1.4 var(--mono); color: var(--ink); }
.dt-tl .dt-gap { min-height: 30px; padding-block: 4px 18px; }
.dt-tl .dt-gap::before { display: none; }
.dt-tl .dt-gap::after { top: 0; }
.dt-tl .dt-gap span { font-size: 0.8125rem; font-weight: 600; color: var(--ink-hint); }
.is-lost .dt-gap { min-height: 112px; }
.is-lost .dt-gap::after { width: 4px; left: 7px; border-radius: 2px; background: var(--lift); }
.is-lost .dt-gap span { color: var(--lift-ink); }
.dt-rr { font-size: 0.9375rem; line-height: 1.35; color: var(--ink-2); }
.dt-rr b { font: 600 1.25rem/1.2 var(--mono); color: var(--ink); }
.is-lost .dt-rr b { color: var(--lift-ink); }

/* ---------- The calculator ----------
   The one dark surface in the reading column. This is where the reader stops reading and does
   the thing, so it should look like a different place. */
.dt-tool { padding: clamp(16px, 2.6vw, 26px); border-radius: 22px; background: var(--night); color-scheme: dark; display: grid; gap: 18px; min-width: 0; }
.a-body .dt-tool .fine { line-height: 1.5; color: var(--on-night-2); }
.dt-tool input, .dt-tool select {
  min-width: 0; width: 100%; padding: 0.6em 0.7em; border: 1px solid var(--night-line); border-radius: 10px;
  background: var(--night-2); color: var(--on-night); font: 500 1rem/1.3 var(--sans);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.dt-tool input::placeholder { color: var(--on-night-2); }
.dt-tool input[type="number"] { font-family: var(--mono); }
.dt-tool input:focus, .dt-tool select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 108, 248, 0.25); }
.dt-name { display: grid; gap: 6px; font-size: 0.8125rem; font-weight: 700; color: var(--on-night-2); }
.dt-group { margin: 0; padding: 0; border: 0; display: grid; gap: 10px; min-width: 0; }
.dt-group legend { padding: 0 0 10px; font-size: var(--t-eyebrow); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-night-2); }
/* A label above each box, the unit beside it. Each part carries the swatch it has in the picture,
   so the reader sees which bar they are filling. */
.dt-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.dt-f { display: grid; gap: 6px; align-content: start; min-width: 0; }
.dt-f label { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; font-weight: 700; line-height: 1.3; color: var(--on-night); }
.dt-f[class*="p-"] label::before { content: ""; flex: none; width: 12px; height: 12px; border-radius: 3px; background: var(--on-night-2); }
.dt-f.p-check label::before { background: var(--lift); }
.dt-f.p-fix label::before { background: var(--lift-ring); }
.dt-f.p-keep label::before { background: repeating-linear-gradient(135deg, var(--lift) 0 2px, var(--lift-tint) 2px 5px); }
.dt-in { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 0.9375rem; color: var(--on-night-2); }
.dt-tool .dt-in input { flex: none; width: 5.5em; }
.dt-tool .dt-in select { flex: 1 1 auto; width: auto; min-width: 0; }
/* The browser's own arrow looks unfinished on the dark panel, so the select draws its own. */
.dt-tool select {
  -webkit-appearance: none; appearance: none; padding-right: 2.1em; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23A8AED2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.75em center; background-size: 12px 8px;
}
.dt-actions { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.dt-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; }
.dt-text:hover { color: #fff; }
.dt-tool button:focus-visible, .dt-result button:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

.dt-empty[hidden], .dt-result[hidden] { display: none; }
.dt-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); }

/* ---------- Step 4: the reader's own bars ---------- */
.dt-out { display: grid; gap: 14px; min-width: 0; }
.dt-out .dt-fig { box-shadow: inset 0 0 0 1px var(--rule); }
.dt-verdict { font-size: 1.0625rem; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.dt-verdict b { font-family: var(--mono); font-weight: 600; }

.a-body .dt-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.dt-r { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: 4px 8px; }
.dt-r > * { min-width: 0; }
.dt-rn { font: 600 0.875rem/1.5 var(--mono); color: var(--ink-hint); }
.dt-rt { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 14px; font-size: 1rem; line-height: 1.4; }
.dt-rt strong { font-weight: 600; }
.dt-rt span { font: 500 0.8125rem/1.7 var(--mono); color: var(--ink-hint); }
.dt-rb { grid-column: 2; display: block; height: 10px; min-width: 3px; border-radius: 3px; }
.dt-first { font-size: 1.0625rem; line-height: 1.55; color: var(--ink); overflow-wrap: anywhere; }
.dt-first:empty { display: none; }
.dt-first a { font-weight: 600; }

/* ---------- Step 5: the name ---------- */
.dt-who { display: grid; gap: 7px; padding: 16px 18px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); font-size: 0.9375rem; font-weight: 700; line-height: 1.3; color: var(--ink); }
.dt-who input { width: 100%; max-width: 22rem; padding: 0.55em 0.7em; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); color: var(--ink); font: 500 1rem/1.3 var(--sans); }
.dt-who input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 108, 248, 0.25); }
.dt-who small { font-size: 0.875rem; font-weight: 500; color: var(--ink-hint); }

/* ---------- Step 6: the plan ---------- */
.dt-result { padding: clamp(16px, 2.6vw, 24px); border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); display: grid; gap: 14px; min-width: 0; }
.dt-result .a-code.is-tall pre { max-height: none; white-space: pre-wrap; overflow-wrap: anywhere; }
.dt-send { justify-self: start; }
.dt-sent { font-size: 0.9375rem; line-height: 1.5; color: var(--ink-hint); }

/* ---------- Phones: the bars stand up ----------
   Three bars side by side at 390 leave a sliver each. So each row becomes a column, the same height
   for the same task, with time running up from the bottom. The indigo is what is left at the top.
   It is a different drawing of the same week, not a smaller one. */
@media (max-width: 640px) {
  .dt-strip-bar { height: auto; min-height: 96px; }
  .dt-strip-bar i { height: auto; padding-block: 10px; }
  .dt-strip-bar span { font-size: 0.875rem; }
  .dt-chart { grid-template-columns: repeat(var(--rows, 3), minmax(0, 1fr)); gap: 8px; align-items: end; }
  .dt-row { gap: 8px; }
  .dt-rl { display: grid; gap: 2px; font-size: 0.875rem; }
  .dt-rl small { font-size: 0.75rem; line-height: 1.3; }
  .dt-bar { flex-direction: column-reverse; height: var(--dt-col); }
  .dt-bar > i:first-child { border-radius: 3px 3px 10px 10px; }
  .dt-bar > i:last-child { border-radius: 10px 10px 3px 3px; }
  .dt-bar > i:only-child { border-radius: 10px; }
  .dt-bar span { padding: 4px 7px; white-space: normal; font-size: 0.6875rem; }
  .dt-bar span b { font-size: 0.8125rem; }
  .dt-bar .s-keep span { margin: 0 4px; padding: 3px 5px; }
  .s-back span b { font-size: 0.9375rem; }

  .dt-read { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .dt-read > div { grid-template-columns: 5.5rem minmax(0, auto) minmax(0, 1fr); align-items: baseline; gap: 0 10px; padding: 10px 12px; }
  .dt-read b { font-size: 1.125rem; }
  .dt-read .eyebrow { letter-spacing: 0.1em; }

  .a-body .dt-parts-def { grid-template-columns: minmax(0, 1fr); }

  .dt-wr { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
  .dt-wd { grid-row: 1; }
  .dt-wm { grid-row: 1; grid-column: 2; }
  .dt-wt { grid-column: 1 / -1; height: 26px; }
  .dt-wt .s-keep span { font-size: 0.75rem; }

  .dt-alert { grid-template-columns: minmax(0, 1fr); }
  .is-lost .dt-gap { min-height: 84px; }

  .dt-fields { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}
@media (max-width: 360px) {
  .dt-read > div { grid-template-columns: minmax(0, 1fr); }
  :root { --dt-col: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  .dt-bar > i, .dt-bar span, .is-tuned, .dt-tool input, .dt-tool select { transition: none !important; }
}
