/* Inline figures for "Most AI Apps Shouldn't Exist". Uses the v5 tokens from archive.css.
   One colour rule across every figure: red is what the essay asks you to look at (the leftover work, what people do,
   the part worth building); ink is the rest. Static, no JS: everything reads the same with reduced motion. */

.ma { container-type: inline-size; margin: 40px 0 44px; padding-top: 14px; border-top: 1px solid var(--hair); }
.ma-kicker { font: 500 12px/1.35 var(--mono); letter-spacing: .02em; color: var(--muted); }
.ma figcaption { margin-top: 20px; padding-top: 12px; border-top: 1px dashed var(--dash); font-size: 15px; line-height: 1.6; color: var(--muted); }
.ma-tag { font: 500 11px/1.4 var(--mono); letter-spacing: .03em; color: var(--muted); }

/* ---------- the short answer ---------- */
.ma-short { margin: 32px 0 8px; padding: 18px 22px 20px; max-width: 40em; background: var(--sheet); border-radius: 10px; box-shadow: var(--lift); font: 400 16.5px/1.55 var(--sans); }
.ma-short ol { margin-top: 10px; counter-reset: ma; display: grid; gap: 10px; }
.ma-short li { counter-increment: ma; position: relative; padding-left: 30px; color: var(--muted); }
.ma-short li::before { content: counter(ma); position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: var(--red); color: #fff; font: 600 11.5px/20px var(--mono); text-align: center; }
.ma-short li > span { color: var(--ink); font-weight: 600; }

/* ---------- the job and the demo ---------- */
.ma-job ol { margin-top: 16px; display: grid; gap: 8px; counter-reset: job; }
.ma-job li { counter-increment: job; display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 10px; padding: 10px 14px 11px; background: var(--sheet); border-radius: 10px; box-shadow: var(--lift); border-left: 3px solid var(--ink); }
.ma-job li::before { content: counter(job); grid-row: 1 / span 2; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font: 600 12px/24px var(--mono); text-align: center; }
.ma-job li > * { grid-column: 2; }
.ma-job b { font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.ma-job li.is-demo { border-left-color: var(--red); }
.ma-job li.is-demo::before { background: var(--red); }
.ma-job li.is-demo .ma-tag { color: var(--red-ink); }
@container (min-width: 640px) {
  .ma-job ol { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
  .ma-job li { grid-template-columns: 1fr; row-gap: 8px; padding: 12px 12px 14px; border-left: 0; border-top: 3px solid var(--ink); align-content: start; }
  .ma-job li.is-demo { border-top-color: var(--red); }
  .ma-job li::before { grid-row: auto; }
  .ma-job li > * { grid-column: 1; }
  .ma-job b { font-size: 14.5px; }
}

/* ---------- what the prompt leaves undone ---------- */
.ma-left ul { margin-top: 16px; display: grid; gap: 10px; }
.ma-left li { display: grid; gap: 6px; padding: 12px 16px 14px; background: var(--sheet); border-radius: 10px; box-shadow: var(--lift); }
.ma-left li > span { font-size: 15px; line-height: 1.45; color: var(--muted); }
.ma-left li > b { font-weight: 600; font-size: 15.5px; line-height: 1.4; }
.ma-left li > b::before { content: "→ "; color: var(--red); }
.ma-left li.is-app { outline: 2px solid var(--red); outline-offset: -2px; }
.ma-left .ma-head { display: none; }
@container (min-width: 600px) {
  .ma-left .ma-head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 14px; padding: 0 16px; }
  .ma-left ul { margin-top: 8px; }
  .ma-left li { grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
  .ma-left li > b::before { content: ""; }
}

/* ---------- say / do, qualitative / quantitative ---------- */
.ma-grid .ma-cells { margin-top: 16px; display: grid; gap: 10px; }
.ma-cell { padding: 12px 16px 14px; background: var(--sheet); border-radius: 10px; box-shadow: var(--lift); border-left: 3px solid var(--hair); }
.ma-cell .ma-tag { display: block; margin-bottom: 4px; }
.ma-cell b { display: block; font-weight: 600; font-size: 15.5px; line-height: 1.35; }
.ma-cell span:last-child { display: block; margin-top: 4px; font-size: 14.5px; line-height: 1.45; color: var(--muted); }
.ma-cell.is-do { border-left-color: var(--red); }
.ma-cell.is-do .ma-tag { color: var(--red-ink); }
.ma-cell.is-weak { background: transparent; box-shadow: 0 0 0 1px var(--hair); }
.ma-axis { display: none; }
@container (min-width: 600px) {
  .ma-grid .ma-cells { grid-template-columns: 6.5em 1fr 1fr; grid-template-areas: ". q1 q2" "say a b" "do c d"; gap: 10px 12px; }
  .ma-axis { display: block; font: 600 14.5px/1.3 var(--sans); }
  .ma-axis small { display: block; font: 500 11.5px/1.5 var(--mono); color: var(--muted); }
  .ma-axis.q1 { grid-area: q1; } .ma-axis.q2 { grid-area: q2; }
  .ma-axis.say { grid-area: say; align-self: center; } .ma-axis.do { grid-area: do; align-self: center; color: var(--red-ink); }
  .ma-cell.a { grid-area: a; } .ma-cell.b { grid-area: b; } .ma-cell.c { grid-area: c; } .ma-cell.d { grid-area: d; }
  .ma-cell .ma-tag { display: none; }
}

/* ---------- measures ---------- */
.ma-measures .ma-scroll { margin-top: 14px; overflow-x: auto; }
.ma-measures table { width: 100%; min-width: 30em; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.ma-measures th, .ma-measures td { padding: 10px 12px 10px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hair); }
.ma-measures thead th { font: 500 12px/1.35 var(--mono); color: var(--muted); border-bottom-color: var(--ink); }
.ma-measures tbody th { font-weight: 600; }
.ma-measures td { color: var(--muted); }
.ma-measures tr.is-signal th, .ma-measures tr.is-signal td { color: var(--red-ink); }

/* ---------- one line pulled out ---------- */
.ma-pull { margin: 36px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--red); font: italic 400 clamp(21px, 2.6vw, 26px)/1.35 var(--serif); letter-spacing: -.01em; }

/* ---------- the checklist ---------- */
.ma-check { margin: 24px 0 8px; padding: 18px 22px 20px; max-width: 40em; background: var(--sheet); border-radius: 10px; box-shadow: var(--lift); font: 400 16.5px/1.55 var(--sans); }
.ma-check ol { counter-reset: mc; display: grid; gap: 10px; }
.ma-check li { counter-increment: mc; position: relative; padding-left: 34px; }
.ma-check li::before { content: counter(mc); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink); font: 600 11.5px/22px var(--mono); text-align: center; }
.ma-check li.is-key::before { background: var(--red); box-shadow: none; color: #fff; }

/* ---------- three ways the benchmark can come out ---------- */
.ma-out ol { margin-top: 16px; display: grid; gap: 10px; }
.ma-out li { display: grid; gap: 6px; padding: 14px 16px 16px; background: var(--sheet); border-radius: 10px; box-shadow: var(--lift); border-top: 3px solid var(--ink); }
.ma-out li.is-main { border-top-color: var(--red); }
.ma-out li.is-main .ma-tag { color: var(--red-ink); }
.ma-out b { font-weight: 600; font-size: 16px; line-height: 1.3; }
.ma-out li > span:last-child { font-size: 15px; line-height: 1.5; color: var(--muted); }
@container (min-width: 600px) { .ma-out ol { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- the benchmark prompt ---------- */
.ma-prompt .ma-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ma-prompt pre { margin-top: 12px; padding: 16px 18px; background: var(--ink); color: #EDEDEA; border-radius: 10px; overflow-x: auto; font: 400 14px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.ma-prompt pre em { font-style: normal; color: #FFB4A8; }
.ma-copy { display: none; min-height: 44px; padding: 0 16px; border: 1px solid var(--ink); border-radius: 999px; background: var(--sheet); font: 500 13.5px/42px var(--sans); cursor: pointer; }
.ma-copy:hover { background: var(--ink); color: #fff; }
.js-copy .ma-copy { display: inline-block; }
