/* v20 Mac windows: the shared look for the redrawn visuals (Vitoria, November 6, 2026).
   macOS / System Settings language at native size. Neutrals do the work; blue means selected,
   green, orange and red carry meaning only. Used by the article embeds and drafts/visual-lab-v20. */
:root {
  --label: #1d1d1f;
  --secondary: #6e6e73;
  --tertiary: #a1a1a6;
  --hairline: rgba(0, 0, 0, .085);
  --window: #ececec;
  --pane: #f5f5f5;
  --group: #fff;
  --sidebar: rgba(226, 226, 229, .82);
  --control: #e3e3e6;
  --blue: #007aff;
  --blue-tint: rgba(0, 122, 255, .1);
  --green: #28a745;
  --green-tint: #e3f4e6;
  --orange: #c76a00;
  --orange-tint: #fff1dc;
  --red: #d70015;
  --red-tint: #fde6e7;
  --sys: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
button, input, select { font: inherit; color: inherit; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* An embed is one window on a transparent page, with room for its shadow. */
html.mac-embed { -webkit-font-smoothing: antialiased; background: transparent; }
html.mac-embed body { margin: 0; padding: 18px 24px 44px; background: transparent; }
html.mac-embed .mac-window { width: auto; max-width: none; margin: 0; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .2), 0 1px 1.5px rgba(0, 0, 0, .06), 0 12px 26px -10px rgba(0, 0, 0, .2), 0 4px 10px -4px rgba(0, 0, 0, .06); }
/* Phones: room below the window for its whole shadow, so the frame never cuts it into a line. */
@media (max-width: 480px) { html.mac-embed body { padding: 12px 10px 34px; } }
/* Window chrome */
.mac-window {
  width: var(--w); max-width: calc(100vw - 32px);
  margin-left: calc((100% - min(var(--w), 100vw - 32px)) / 2);
  border-radius: 12px; overflow: hidden; background: var(--window); color: var(--label);
  font: 13px/1.38 var(--sys);
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .2), 0 1px 1.5px rgba(0, 0, 0, .06), 0 12px 32px -6px rgba(0, 0, 0, .18), 0 28px 64px -24px rgba(0, 0, 0, .16);
}
.mac-titlebar { position: relative; display: flex; align-items: center; justify-content: center; height: 38px; padding: 0 12px; background: linear-gradient(#eeeeee, #e7e7e7); }
.mac-titlebar + .mac-toolbar, .mac-titlebar + .mac-pane { border-top: .5px solid var(--hairline); }
.mac-lights { position: absolute; left: 12px; top: 50%; display: flex; gap: 8px; transform: translateY(-50%); }
.mac-lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .18); }
.mac-lights i:nth-child(2) { background: #febc2e; }
.mac-lights i:nth-child(3) { background: #28c840; }
.mac-title { font-weight: 600; font-size: 13px; color: #3d3d3f; }
.mac-toolbar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #e9e9e9; border-bottom: .5px solid var(--hairline); }
.mac-toolbar-center { justify-content: center; }
.mac-pane { padding: 14px; background: var(--pane); }
.mac-group { background: var(--group); border-radius: 10px; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .07), 0 .5px 1px rgba(0, 0, 0, .04); overflow: hidden; }
.mac-group + .mac-group { margin-top: 12px; }
.mac-row { display: flex; align-items: center; gap: 12px; min-height: 36px; padding: 7px 12px; }
.mac-row + .mac-row { box-shadow: 0 -.5px 0 var(--hairline); }
.mac-label { flex: none; color: var(--label); }
.mac-value { margin-left: auto; color: var(--secondary); text-align: right; font-variant-numeric: tabular-nums; }
.mac-footnote { margin: 10px 2px 0; color: var(--tertiary); font-size: 11px; line-height: 1.45; }

/* Controls */
.mac-search { display: flex; align-items: center; gap: 6px; flex: 1; height: 28px; padding: 0 8px; border-radius: 7px; background: rgba(0, 0, 0, .055); }
.mac-search svg { flex: none; width: 13px; height: 13px; fill: none; stroke: var(--secondary); stroke-width: 1.5; stroke-linecap: round; }
.mac-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 13px; color: var(--label); }
.mac-search input::placeholder { color: var(--tertiary); }
.mac-segmented { display: inline-flex; padding: 2px; border-radius: 7px; background: rgba(0, 0, 0, .065); }
.mac-segmented button { position: relative; min-width: 84px; padding: 3px 12px; border: 0; border-radius: 5px; background: none; font-size: 12px; font-weight: 500; color: #3a3a3c; cursor: default; transition: background-color .2s var(--ease), box-shadow .2s var(--ease); }
.mac-segmented button + button::before { content: ''; position: absolute; left: 0; top: 5px; bottom: 5px; border-left: .5px solid rgba(0, 0, 0, .14); }
.mac-segmented button[aria-pressed="true"] { background: #fff; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .1), 0 1px 2px rgba(0, 0, 0, .14); }
.mac-segmented button[aria-pressed="true"]::before, .mac-segmented button[aria-pressed="true"] + button::before { opacity: 0; }
.mac-segmented-small button { min-width: 0; padding: 2px 9px; font-size: 11px; }
.mac-switch { position: relative; flex: none; width: 32px; height: 19px; border: 0; border-radius: 10px; background: #e1e1e3; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .08); cursor: default; transition: background-color .2s var(--ease); }
.mac-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .22); transition: transform .2s var(--ease); }
.mac-switch[aria-checked="true"] { background: var(--blue); }
.mac-switch[aria-checked="true"]::after { transform: translateX(13px); }
.mac-switch:disabled { opacity: .45; }
.mac-button { height: 24px; padding: 0 12px; border: 0; border-radius: 6px; background: #fff; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .14), 0 .5px 1.5px rgba(0, 0, 0, .12); font-size: 12.5px; cursor: default; }
.mac-button.is-default { background: linear-gradient(#2a8cff, #0a74f0); color: #fff; box-shadow: 0 0 0 .5px rgba(0, 60, 160, .5), 0 1px 1.5px rgba(0, 0, 0, .14); }
.mac-button:disabled { opacity: .5; }
.mac-icon-button { display: grid; place-items: center; width: 28px; height: 24px; border: 0; border-radius: 6px; background: none; cursor: default; }
.mac-icon-button:hover { background: rgba(0, 0, 0, .06); }
.mac-icon-button:disabled { opacity: .35; background: none; }
.mac-icon-button svg { width: 14px; height: 14px; fill: none; stroke: #3a3a3c; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mac-icon-button [data-play-icon] path { fill: #3a3a3c; stroke: none; }
.mac-popup { position: relative; display: inline-flex; align-items: center; }
.mac-popup select { appearance: none; height: 24px; padding: 0 26px 0 10px; border: 0; border-radius: 6px; background: #fff; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .14), 0 .5px 1.5px rgba(0, 0, 0, .12); font-size: 12.5px; cursor: default; }
.mac-popup svg { position: absolute; right: 8px; width: 8px; height: 12px; fill: none; stroke: var(--secondary); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
:is(button, select, input, [tabindex]):focus-visible { outline: 3px solid rgba(0, 122, 255, .45); outline-offset: 1px; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--tertiary); vertical-align: 1px; }
.status-dot.is-ok { background: #34c759; }
.status-dot.is-warn { background: #ff9f0a; }
.status-dot.is-bad { background: #ff3b30; }

/* Storage-style bar, shared by the budget and compaction */
.bd-bar { position: relative; display: flex; height: 22px; margin: 0 12px; border-radius: 5px; background: #ececee; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .06); overflow: hidden; }
.bd-bar > i { display: block; height: 100%; transition: flex-basis .35s var(--ease), opacity .2s; }
.bd-bar > i + i { box-shadow: inset 1px 0 0 rgba(255, 255, 255, .9); }
.bd-bar .is-reserve { background: repeating-linear-gradient(135deg, #d8d8dc 0 4px, #ececee 4px 7px); }
.bd-over { position: absolute; top: 0; bottom: 0; right: 0; background: repeating-linear-gradient(135deg, rgba(255, 59, 48, .55) 0 4px, rgba(255, 59, 48, .2) 4px 7px); border-left: 1.5px solid #ff3b30; }
.bd-cap-label { position: absolute; top: -15px; transform: translateX(-50%); font-size: 10px; color: var(--red); white-space: nowrap; }
.bd-summary.is-over .bd-bar { overflow: visible; margin-top: 16px; }
.bd-summary { padding: 12px 0 12px; }
.bd-head { display: flex; justify-content: space-between; align-items: flex-end; padding: 0 12px 10px; }
.bd-head strong { display: block; font-size: 15px; font-weight: 600; letter-spacing: -.005em; }
.bd-head span { font-size: 11px; color: var(--secondary); }
.bd-free { font-size: 12px; color: var(--secondary); font-variant-numeric: tabular-nums; text-align: right; }
.bd-free.is-over { color: var(--red); font-weight: 500; }
.bd-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 10px 12px 0; font-size: 11px; color: var(--secondary); }
.bd-legend span { display: inline-flex; align-items: center; gap: 5px; }
.bd-legend i, .sw { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.bd-row-name { display: flex; align-items: center; gap: 8px; }
.bd-row-name i { width: 10px; height: 10px; border-radius: 3px; }
.bd-row-tokens { margin-left: auto; min-width: 54px; color: var(--secondary); text-align: right; font-variant-numeric: tabular-nums; }
.bd-row.is-off .bd-row-name, .bd-row.is-off .bd-row-tokens { color: var(--tertiary); }

/* Retrieval */
.rt-body { display: grid; grid-template-columns: 206px 1fr; height: 268px; background: #fff; border-bottom: .5px solid var(--hairline); }
.rt-results { padding: 6px; overflow: auto; background: #f7f7f8; border-right: .5px solid var(--hairline); }
.rt-result { display: grid; grid-template-columns: 22px 1fr; gap: 2px 8px; width: 100%; padding: 7px 8px; border: 0; border-radius: 6px; background: none; text-align: left; cursor: default; }
.rt-result + .rt-result { margin-top: 2px; }
.rt-result:hover { background: rgba(0, 0, 0, .04); }
.rt-result[aria-selected="true"] { background: var(--blue); color: #fff; }
.rt-result svg { grid-row: span 3; width: 20px; height: 24px; margin-top: 1px; }
.rt-result svg path { fill: #fff; stroke: #b9b9bf; stroke-width: 1; }
.rt-result svg .fold { fill: #ececef; }
.rt-result-title { font-size: 12.5px; font-weight: 500; line-height: 1.25; }
.rt-result-meta { display: flex; justify-content: space-between; gap: 6px; font-size: 11px; color: var(--secondary); }
.rt-result[aria-selected="true"] .rt-result-meta { color: rgba(255, 255, 255, .82); }
.rt-score { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--secondary); font-variant-numeric: tabular-nums; }
.rt-score b { position: relative; display: block; width: 44px; height: 3px; border-radius: 2px; background: rgba(0, 0, 0, .1); overflow: hidden; }
.rt-score b::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--score); background: #8e8e93; border-radius: 2px; }
.rt-result[aria-selected="true"] .rt-score { color: rgba(255, 255, 255, .82); }
.rt-result[aria-selected="true"] .rt-score b { background: rgba(255, 255, 255, .3); }
.rt-result[aria-selected="true"] .rt-score b::after { background: #fff; }
.rt-kind { font-weight: 500; }
.rt-kind.is-draft { color: var(--orange); }
.rt-kind.is-published { color: var(--green); }
.rt-result[aria-selected="true"] .rt-kind { color: #fff; }
.rt-preview { display: flex; flex-direction: column; padding: 16px 18px 12px; overflow: auto; }
.rt-preview-meta { font-size: 11px; color: var(--secondary); }
.rt-preview h4 { margin: 4px 0 8px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.rt-preview p { margin: 0 0 7px; font-size: 12.5px; line-height: 1.5; color: #3a3a3c; }
.rt-preview mark { padding: 1px 0; background: #fff1b8; color: inherit; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.rt-preview-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; font: 11px/1 var(--mono); color: var(--tertiary); }
.rt-preview-foot .mac-button { font-family: var(--sys); }
.rt-preview-foot .mac-button:disabled { opacity: 1; background: none; box-shadow: none; color: var(--secondary); padding-right: 0; }
.rt-row { align-items: flex-start; }
.rt-row .mac-label { width: 132px; color: var(--secondary); }
.rt-row .mac-value { flex: 1; margin-left: 0; color: var(--label); text-align: left; }
.rt-answer .mac-value { font-weight: 500; }

/* Compaction */
.cp-transcript { height: 248px; padding: 14px 16px; overflow: auto; background: #fff; border-bottom: .5px solid var(--hairline); }
.cp-msg { margin: 0 0 10px; font-size: 12.5px; line-height: 1.45; animation: cp-in .3s var(--ease) both; }
.cp-msg.is-you { width: fit-content; max-width: 82%; margin-left: auto; padding: 7px 11px; border-radius: 14px 14px 4px 14px; background: #f0f0f2; }
.cp-msg.is-tool { display: flex; align-items: center; gap: 7px; font: 11.5px/1.4 var(--mono); color: var(--secondary); }
.cp-msg.is-tool::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #c7c7cc; }
.cp-card { padding: 12px 14px; border-radius: 10px; background: #f6f6f8; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .06); animation: cp-in .35s var(--ease) both; }
.cp-card h5 { margin: 0 0 6px; font-size: 11px; font-weight: 600; color: var(--secondary); }
.cp-card p { margin: 0; font-size: 12.5px; line-height: 1.5; }
.cp-card dl { display: grid; grid-template-columns: 70px 1fr; gap: 4px 10px; margin: 0; font-size: 12.5px; line-height: 1.45; }
.cp-card dt { color: var(--secondary); }
.cp-card dd { margin: 0; }
.cp-archived { margin: 10px 0 0; font-size: 11px; color: var(--tertiary); text-align: center; }
.cp-meter-row { display: flex; align-items: center; padding: 10px 12px 8px; }
.cp-meter { margin-bottom: 12px; height: 14px; }
.cp-check { gap: 10px; }
.cp-check svg { flex: none; width: 14px; height: 14px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cp-check.is-yes svg { stroke: #28a745; }
.cp-check.is-no svg { stroke: #d70015; }
.cp-check.is-vague svg { stroke: #c76a00; }
.cp-check .mac-value { font-size: 12px; }
@keyframes cp-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Prefix caching */
.cc-request { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding: 11px 12px 12px; transition: opacity .25s var(--ease); }
.cc-request + .cc-request { box-shadow: 0 -.5px 0 var(--hairline); }
.cc-request.is-waiting { opacity: .42; }
.cc-request-title { font-weight: 500; }
.cc-request-title span { margin-left: 6px; font-weight: 400; color: var(--secondary); }
.cc-request-stat { font-size: 12px; color: var(--secondary); text-align: right; font-variant-numeric: tabular-nums; }
.cc-bar { grid-column: 1 / -1; display: flex; gap: 2px; height: 34px; }
.cc-seg { position: relative; display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 0 8px; border-radius: 5px; background: #ececee; color: var(--secondary); transition: background-color .35s var(--ease), color .35s var(--ease); }
.cc-seg small { order: 2; font-size: 10px; line-height: 1.25; opacity: .85; white-space: nowrap; }
.cc-seg span { overflow: hidden; font-size: 11.5px; font-weight: 500; line-height: 1.25; white-space: nowrap; text-overflow: ellipsis; }
.cc-seg.is-processed { background: #e3efff; color: #0b4fa8; }
.cc-seg.is-reused { background: var(--green-tint); color: #1d6b31; }
.cc-seg.is-changed { box-shadow: inset 0 0 0 1px #ff9f0a; }
.cc-answer { grid-column: 1 / -1; font-size: 12px; color: var(--secondary); }
.cc-answer b { font-weight: 500; color: var(--label); }
.cc-legend { display: flex; gap: 16px; margin: 10px 2px 0; font-size: 11px; color: var(--secondary); }
.cc-legend span { display: inline-flex; align-items: center; gap: 5px; }
.sw-processed { background: #b9d5ff; }
.sw-reused { background: #a9dcb5; }
.sw-waiting { background: #dcdce0; }

/* CLAUDE.md: System Settings */
.mac-settings { display: grid; grid-template-columns: 176px 1fr; height: 348px; background: #ececec; }
.ms-sidebar { position: relative; display: flex; flex-direction: column; padding: 0 8px 10px; background: var(--sidebar); backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6); border-right: .5px solid rgba(0, 0, 0, .1); }
.ms-sidebar-top { position: relative; height: 38px; }
.ms-sidebar-top .mac-lights { left: 6px; }
.ms-search { flex: none; margin: 0 2px 8px; background: rgba(0, 0, 0, .06); }
.ms-tree { overflow: auto; }
.ms-item { display: flex; align-items: center; gap: 7px; width: 100%; height: 26px; padding: 0 8px 0 calc(8px + var(--depth, 0) * 14px); border: 0; border-radius: 6px; background: none; font-size: 12.5px; text-align: left; color: var(--label); cursor: default; }
.ms-item[disabled] { color: var(--label); }
.ms-item:not([disabled]):hover { background: rgba(0, 0, 0, .05); }
.ms-item[aria-current="true"], .ms-item[aria-current="true"]:not([disabled]):hover { background: var(--blue); color: #fff; }
.ms-item svg { flex: none; width: 15px; height: 15px; }
.ms-item .ico-folder path { fill: #57a9f7; stroke: #3d8fe0; stroke-width: .6; }
.ms-item .ico-doc path { fill: #fff; stroke: #9a9aa0; stroke-width: .9; }
.ms-item .ico-doc .lines { stroke: #c2c2c7; fill: none; }
.ms-item .ico-md path:first-child { fill: #f2f6ff; stroke: #4c8df6; }
.ms-item[aria-current="true"] svg path { stroke: #fff; }
.ms-item[aria-current="true"] .ico-doc path:first-child, .ms-item[aria-current="true"] .ico-md path:first-child { fill: rgba(255, 255, 255, .22); }
.ms-content { display: flex; flex-direction: column; min-width: 0; background: var(--pane); }
.ms-toolbar { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px 0 10px; }
.ms-nav { display: flex; gap: 2px; }
.ms-nav svg { width: 22px; height: 22px; padding: 4px; fill: none; stroke: var(--secondary); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ms-nav svg:last-child { stroke: #c7c7cc; }
.ms-toolbar h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.005em; }
.ms-toolbar .mac-segmented { margin-left: auto; }
.ms-scroll { flex: 1; padding: 0 14px 14px; overflow: auto; }
.ms-path { margin: 0 2px 8px; font: 11px/1.3 var(--mono); color: var(--secondary); }
.ms-line { gap: 10px; }
.ms-line code { font: 11.5px/1 var(--mono); padding: 2px 4px; border-radius: 4px; background: rgba(0, 0, 0, .05); }
.ms-line.is-heading { font-weight: 600; }
.ms-line.is-code { font: 11.5px/1.5 var(--mono); white-space: pre; color: #3a3a3c; }
.ms-scroll .mac-row .mac-value { max-width: 64%; }

/* Harness */
.hn-toolbar { justify-content: space-between; }
.hn-controls { display: flex; align-items: center; gap: 2px; }
.hn-count { min-width: 92px; margin-left: 8px; font-size: 12px; color: var(--secondary); text-align: right; font-variant-numeric: tabular-nums; }
.hn-body { display: grid; grid-template-columns: 318px 1fr; height: 318px; background: #fff; border-bottom: .5px solid var(--hairline); }
.hn-diagram { position: relative; border-right: .5px solid var(--hairline); background: #fafafa; }
.hn-diagram svg.hn-wires { position: absolute; inset: 0; width: 100%; height: 100%; }
.hn-wires path { fill: none; stroke: #d1d1d6; stroke-width: 1.2; stroke-linejoin: round; }
.hn-wires path.is-dashed { stroke-dasharray: 3 3; }
.hn-wires path.is-live { stroke: var(--blue); stroke-width: 1.6; }
.hn-wires .hn-loop-label { fill: var(--tertiary); font: 10px var(--sys); }
.hn-zone { position: absolute; border-radius: 12px; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .12); background: rgba(255, 255, 255, .6); }
.hn-zone-label { position: absolute; font-size: 10.5px; color: var(--tertiary); }
.hn-node { position: absolute; display: flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border: 0; border-radius: 12px; background: #fff; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .16), 0 1px 2px rgba(0, 0, 0, .06); font-size: 11.5px; font-weight: 500; color: #3a3a3c; white-space: nowrap; transform: translate(-50%, -50%); cursor: default; transition: background-color .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease); }
.hn-node i { width: 6px; height: 6px; border-radius: 50%; background: #c7c7cc; transition: background-color .25s; }
.hn-node.is-done i { background: #8e8e93; }
.hn-node.is-current { background: var(--blue); color: #fff; box-shadow: 0 0 0 .5px rgba(0, 60, 160, .4), 0 2px 8px rgba(0, 122, 255, .3); }
.hn-node.is-current i { background: #fff; }
.hn-node.is-model { height: 30px; padding: 0 16px; border-radius: 9px; font-size: 12.5px; font-weight: 600; }
.hn-side-label { position: absolute; font-size: 10px; color: var(--tertiary); transform: translate(-50%, -50%) rotate(-90deg); white-space: nowrap; }
.hn-col-label { position: absolute; font-size: 10px; color: var(--tertiary); transform: translateX(-50%); white-space: nowrap; }
.hn-node.is-failed:not(.is-current) i { background: #ff3b30; }
.hn-log { margin: 0; padding: 8px; list-style: none; overflow: auto; scroll-behavior: smooth; }
.hn-event { display: grid; grid-template-columns: 22px 1fr; gap: 1px 6px; padding: 6px 8px; border-radius: 6px; font-size: 12px; line-height: 1.35; }
.hn-event + .hn-event { margin-top: 1px; }
.hn-event-step { grid-row: span 3; color: var(--tertiary); font-size: 11px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.hn-event-part { font-size: 10.5px; color: var(--secondary); }
.hn-event-title { font-weight: 500; }
.hn-event-out { font: 11px/1.4 var(--mono); color: var(--secondary); white-space: pre-wrap; overflow-wrap: anywhere; }
.hn-event.is-current { background: var(--blue-tint); }
.hn-event.is-current .hn-event-step { color: var(--blue); }
.hn-event.is-bad .hn-event-out { color: var(--red); }
.hn-event.is-good .hn-event-out { color: var(--green); }
.hn-inspector { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hn-inspector .mac-group { margin: 0; padding: 10px 12px; }
.hn-inspector h5 { margin: 0 0 3px; font-size: 11px; font-weight: 500; color: var(--secondary); }
.hn-inspector p { margin: 0; font-size: 12px; line-height: 1.45; }
.hn-inspector .mac-group + .mac-group { margin-top: 0; }
.hn-real { grid-column: 1 / -1; }
.hn-status { grid-column: 1 / -1; display: flex; align-items: center; font-size: 12px; color: var(--secondary); }
.hn-status b { font-weight: 500; color: var(--label); }

@media (max-width: 500px) {
  .rt-body, .hn-body { grid-template-columns: 1fr; height: auto; }
  .rt-results, .hn-diagram { border-right: 0; border-bottom: .5px solid var(--hairline); }
  .hn-diagram { height: 300px; }
  .hn-log { max-height: 300px; }
  .mac-settings { grid-template-columns: 1fr; height: auto; }
  .hn-inspector { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; scroll-behavior: auto !important; } }

/* Shared additions for the article embeds (November 6, 2026). */
.mac-icon-button svg.is-filled path { fill: #3a3a3c; stroke: none; }
/* A control pulses until the reader finds it; reduced motion gets a still ring instead. */
.is-hint { position: relative; }
.is-hint::after { content: ''; position: absolute; inset: -2px; border-radius: 8px; box-shadow: 0 0 0 0 rgba(0, 122, 255, .5); animation: mac-hint 1.8s var(--ease) infinite; pointer-events: none; }
.mac-icon-button.is-hint { background: rgba(0, 122, 255, .1); }
.mac-icon-button.is-hint svg path { stroke: var(--blue); }
.mac-icon-button.is-hint svg.is-filled path { fill: var(--blue); }
@keyframes mac-hint { 0% { box-shadow: 0 0 0 0 rgba(0, 122, 255, .45); } 70% { box-shadow: 0 0 0 7px rgba(0, 122, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 122, 255, 0); } }
@media (prefers-reduced-motion: reduce) { .is-hint::after { animation: none; box-shadow: 0 0 0 2px rgba(0, 122, 255, .45); } }

/* Harness toolbar: the task on the left, the controls on the right. */
.hn-task { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; font-weight: 500; }
.hn-task span { font-size: 11px; font-weight: 400; color: var(--secondary); }

/* Compaction: the session plays, fills the window, and collapses into what survives. */
.cp-toolbar { justify-content: center; gap: 10px; }
.cp-toolbar-label { font-size: 12px; color: var(--secondary); }
.cp-toolbar .mac-segmented button { min-width: 0; }
.cp-transcript { transition: opacity .5s var(--ease), filter .5s var(--ease), transform .5s var(--ease); }
.cp-transcript.is-compacting { opacity: .25; filter: blur(1.5px); transform: scale(.985); }
.cp-msg.is-assistant { color: var(--label); }
.cp-reply { width: fit-content; max-width: 88%; padding: 7px 11px; border-radius: 14px 14px 14px 4px; }
.cp-reply.is-bad { background: var(--orange-tint); }
.cp-reply.is-ok { background: var(--green-tint); }
.cp-status { min-height: 32px; margin-top: 10px; color: var(--secondary); font-size: 11.5px; }

/* CLAUDE.md: the actual file, as an editor shows it. */
.mac-settings { height: 372px; }
.ms-content { padding: 0 14px 12px; }
.ms-toolbar { padding: 0; }
.ms-editor { flex: 1; display: flex; flex-direction: column; min-height: 0; border-radius: 9px; background: #fff; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .1), 0 .5px 1px rgba(0, 0, 0, .05); overflow: hidden; }
.ms-editor-tab { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; background: #f6f6f7; border-bottom: .5px solid var(--hairline); font: 11px/1 var(--mono); color: var(--secondary); }
.ms-editor-tab svg { width: 13px; height: 13px; }
.ms-editor-tab svg path { fill: #fff; stroke: #9a9aa0; stroke-width: .9; }
.ms-editor-tab svg .lines { fill: none; stroke: #c2c2c7; }
.ms-code { flex: 1; margin: 0; padding: 10px 12px 12px 0; overflow: auto; font: 12px/1.65 var(--mono); color: #1d1d1f; white-space: pre; tab-size: 2; }
.ms-ln { display: inline-block; width: 34px; padding-right: 12px; color: #b4b4b9; text-align: right; user-select: none; }
.tk-h { font-weight: 700; color: #1d1d1f; }
.tk-mark { color: #b06a00; font-weight: 400; }
.tk-code { color: #c41a16; }
.tk-fence { color: #8e8e93; }
.tk-kw { color: #ad3da4; font-weight: 600; }
.tk-str { color: #c41a16; }
.tk-tag { color: #0b4f79; }
.tk-fn { color: #326d74; font-weight: 600; }
.ms-note { margin: 10px 2px 0; font-size: 11.5px; line-height: 1.45; color: var(--secondary); }

/* Retrieval: one question, a ranked list, the prompt, the answer, a caption per step. */
.rv-pane { display: grid; gap: 10px; }
.rv-results { transition: opacity .3s var(--ease); }
.rv-results.is-hidden { opacity: .35; }
.rv-result { display: grid; grid-template-columns: 18px 1fr auto 92px; align-items: center; gap: 10px; min-height: 34px; padding: 6px 12px; transition: background-color .3s var(--ease); }
.rv-result + .rv-result { box-shadow: 0 -.5px 0 var(--hairline); }
.rv-result .mac-doc { width: 15px; height: 18px; }
.rv-result .mac-doc path { fill: #fff; stroke: #b9b9bf; stroke-width: 1.2; }
.rv-result .mac-doc .fold { fill: #ececef; }
.rv-title { font-size: 12.5px; }
.rv-kind { font-size: 11px; color: var(--secondary); }
.rv-kind.is-draft { color: var(--orange); }
.rv-kind.is-published { color: var(--green); }
.rv-result .rt-score { justify-content: flex-end; }
.rv-result .rt-score b::after { transition: width .6s var(--ease); transition-delay: calc(var(--i) * 90ms); }
.rv-result.is-picked { background: var(--blue-tint); }
.rv-result.is-picked .rv-title { font-weight: 600; }
.rv-prompt, .rv-answer { padding: 10px 12px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .07), 0 .5px 1px rgba(0, 0, 0, .04); transition: opacity .3s var(--ease); }
.rv-prompt.is-empty, .rv-answer.is-empty { opacity: .55; }
.rv-label { display: block; margin-bottom: 4px; font-size: 11px; color: var(--secondary); }
.rv-prompt p, .rv-answer p { margin: 0; font-size: 12.5px; line-height: 1.45; }
.rv-passage { padding: 6px 8px; margin-bottom: 6px !important; border-radius: 6px; background: #fff7d6; animation: cp-in .35s var(--ease) both; }
.rv-source { display: block; font: 10.5px/1.4 var(--mono); color: var(--secondary); }
.rv-question { font-weight: 500; }
.rv-placeholder { color: var(--tertiary); }
.rv-answer p { font-weight: 500; animation: cp-in .35s var(--ease) both; }
.rv-footer { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 14px 12px; background: var(--pane); border-top: .5px solid var(--hairline); }
.rv-dots { display: flex; gap: 5px; }
.rv-dots i { width: 6px; height: 6px; border-radius: 50%; background: #d1d1d6; transition: background-color .25s; }
.rv-dots i.is-on { background: var(--blue); }
.rv-caption { margin: 0; font-size: 12px; line-height: 1.4; color: var(--label); }
.rv-controls { display: flex; align-items: center; gap: 4px; }
.rv-next { min-width: 64px; }
.mac-button.is-hint::after { border-radius: 8px; }

.ms-toolbar .mac-segmented button { min-width: 0; padding: 2px 10px; font-size: 11.5px; white-space: nowrap; }
.ms-toolbar h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-transcript { height: 300px; }

/* Retrieval, third draft: the passage travels from its document into the prompt. */
.rv-pane { position: relative; }
.rv-library-label { margin: 0 2px -4px; }
.rv-results .rt-score b::after { width: var(--score, 0%); }
.rv-result.is-picked { background: var(--blue-tint); }
.rv-result.is-picked .rv-title { font-weight: 600; }
.rv-result.is-lifting { box-shadow: inset 3px 0 0 var(--blue); }
.rv-slot { min-height: 58px; margin-bottom: 6px; }
.rv-slot .rv-placeholder { display: flex; align-items: center; min-height: 58px; padding: 0 10px; border: 1px dashed #d1d1d6; border-radius: 7px; font-size: 12px; }
.rv-passage, .rv-flyer { padding: 7px 10px 8px; border-radius: 7px; background: #fff7d6; box-shadow: inset 0 0 0 .5px rgba(176, 106, 0, .18); font-size: 12.5px; line-height: 1.45; animation: none; }
.rv-passage.is-incoming { visibility: hidden; }
.rv-source { display: flex; align-items: center; gap: 5px; margin-bottom: 2px; font: 10.5px/1.4 var(--mono); color: var(--secondary); }
.rv-source svg { width: 10px; height: 12px; }
.rv-source svg path { fill: #fff; stroke: #b9b9bf; stroke-width: 1.4; }
.rv-flyer { position: absolute; z-index: 3; overflow: hidden; box-shadow: 0 0 0 .5px rgba(176, 106, 0, .25), 0 10px 24px -6px rgba(0, 0, 0, .25); pointer-events: none; }
.rv-wire { position: absolute; inset: 0; overflow: visible; pointer-events: none; opacity: 0; transition: opacity .2s; }
.rv-wire.is-on { opacity: 1; }
.rv-wire path { fill: none; stroke: var(--blue); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.rv-wire-line { stroke-dasharray: 3 3; }
.rv-wire.is-drawing .rv-wire-line { animation: rv-dash .9s linear; }
@keyframes rv-dash { from { stroke-dashoffset: 60; } to { stroke-dashoffset: 0; } }

/* Phones: the cache's three parts share the row more evenly, and their names wrap. */
@media (max-width: 500px) {
  .cc-seg:nth-child(1), .cc-seg:nth-child(3) { flex-basis: 28% !important; }
  .cc-seg:nth-child(2) { flex-basis: 44% !important; }
  .cc-seg span { white-space: normal; font-size: 11px; }
  .cc-bar { height: auto; min-height: 40px; }
  .cc-seg { padding: 5px 7px; }
}
/* Phones: the CLAUDE.md window stacks (folders, then the file) and takes the height it needs. */
@media (max-width: 500px) {
  .mac-settings { height: auto; }
  .mac-settings .ms-search { display: none; }
  .mac-settings .ms-sidebar { padding-bottom: 6px; }
  .mac-settings .ms-editor { min-height: 150px; }
  .mac-settings .ms-code { overflow-x: auto; }
}

/* Prompt cache, shown on the prompts themselves (November 7, 2026). A colored edge and chip say
   what happened to each part; a dark flag marks where the match with the cache stops. */
.cp-cache { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 6px; margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: rgba(0, 0, 0, .04); font-size: 11.5px; line-height: 1.4; color: var(--secondary); }
.cp-cache b { font-weight: 600; color: var(--label); }
.cp-cache code { font: 11px var(--mono); color: #1d6b31; }
.cp-row { position: relative; padding: 10px 12px 10px 15px; }
.cp-row + .cp-row { box-shadow: 0 -.5px 0 var(--hairline); }
.cp-row::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #b9d5ff; transition: background-color .3s var(--ease); }
.cp-row.is-reused { background: rgba(227, 244, 230, .55); }
.cp-row.is-reused::before { background: #8fd09f; }
.cp-row.is-changed::before { background: #ff9f0a; }
.cp-row.is-stop { padding-top: 14px; box-shadow: inset 0 1.5px 0 var(--label); }
.cp-row-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.cp-name { font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--secondary); }
.cp-size { font-size: 10.5px; color: var(--tertiary); }
.cp-chip { margin-left: auto; padding: 1px 8px; border-radius: 99px; font-size: 10.5px; font-weight: 500; background: #e3efff; color: #0b4fa8; }
.is-reused .cp-chip { background: var(--green-tint); color: #1d6b31; }
.is-changed .cp-chip { background: var(--orange-tint); color: var(--orange); }
.cp-text { font: 12px/1.5 var(--mono); color: var(--label); }
.cp-text.is-clamped { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cp-why { margin-top: 4px; font-size: 11px; line-height: 1.4; color: var(--secondary); }
.cp-new { position: relative; padding: 0 3px; border-radius: 3px; background: var(--orange-tint); color: var(--orange); box-shadow: inset 0 0 0 1px rgba(255, 159, 10, .55); }
.cp-flag { position: absolute; z-index: 1; padding: 1px 6px; border-radius: 4px; background: var(--label); color: #fff; font: 500 9.5px/1.5 var(--sys); letter-spacing: .01em; white-space: nowrap; pointer-events: none; }
.cp-new .cp-flag { left: -1px; bottom: calc(100% + 3px); }
.cp-row.is-stop > .cp-flag { top: -9px; left: 15px; }
.cp-result { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 10px 2px 0; font-size: 12px; color: var(--secondary); }
.cp-stat { font-weight: 500; color: var(--label); font-variant-numeric: tabular-nums; }
.cp-answer b { font-weight: 500; color: var(--label); }
.sw-changed { background: #ffc46b; }
