/* Faithful recreation of the Noema desktop app, drawn at its real size (1440x872 CSS px)
   and scaled to fit by demo-app.js. Numbers come from the app's own CSS and from screenshots. */

.nm-stage { position: relative; width: 100%; overflow: hidden; border-radius: 12px; box-shadow: 0 1px 2px #0000000d, 0 40px 70px -36px #26302f66, 0 0 0 1px #d6d8d3; background: #fff; }
.nm-window {
  --fg: #171717; --muted: #737373; --line: #e5e5e5; --soft: #f5f5f5; --soft-2: #efefef;
  --warn: #d9701c; --warn-tint: #fdf0e2; --ok: #2d9d5c; --err: #e5484d; --mode: #4b73d6;
  position: absolute; left: 0; top: 0; width: 1440px; height: 872px; transform-origin: 0 0;
  overflow: hidden; background: #fff; color: var(--fg);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, var(--cjk-sans, sans-serif);
  font-size: 14px; line-height: 1.4; letter-spacing: 0; text-align: left; -webkit-font-smoothing: antialiased;
}
.nm-window *, .nm-window *::before, .nm-window *::after { box-sizing: border-box; }
.nm-window h1, .nm-window h2, .nm-window h3, .nm-window p { margin: 0; font-family: inherit; letter-spacing: 0; text-wrap: initial; }
.nm-window button { font-family: inherit; }
.nm-window svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nm-window code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }

/* scene switching: an element with data-in="1 3" shows in scenes 1 and 3 only */
.nm-window [data-in] { transition: opacity .35s ease, visibility .35s; }
.nm-window[data-scene="1"] [data-in]:not([data-in~="1"]),
.nm-window[data-scene="2"] [data-in]:not([data-in~="2"]),
.nm-window[data-scene="3"] [data-in]:not([data-in~="3"]),
.nm-window[data-scene="4"] [data-in]:not([data-in~="4"]) { opacity: 0; visibility: hidden; pointer-events: none; }
.nm-window .nm-swap[data-in]:not([data-in~="1"]):not([data-in~="2"]) { }

/* ---------- sidebar (x 0-255) ---------- */
.nm-side { position: absolute; left: 0; top: 0; bottom: 0; width: 255px; background: #fafafa; border-right: 1px solid #ececec; z-index: 3; }
.nm-lights { position: absolute; left: 17px; top: 14px; display: flex; gap: 10px; }
.nm-lights i { width: 13px; height: 13px; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 .5px #0000001f; }
.nm-lights i:nth-child(2) { background: #febc2e; }
.nm-lights i:nth-child(3) { background: #28c840; }
.nm-proj { position: absolute; left: 90px; top: 11px; font-size: 14px; font-weight: 500; line-height: 20px; }
.nm-toggle { position: absolute; right: 16px; top: 11px; color: #404040; }
.nm-toggle svg { width: 18px; height: 18px; }
.nm-side-row { position: absolute; left: 6px; right: 8px; height: 32px; display: flex; align-items: center; gap: 10px; padding: 0 10px; font-size: 14px; }
.nm-side-row svg { width: 17px; height: 17px; color: #262626; }
.nm-kbd { margin-left: auto; font-size: 11px; color: var(--muted); background: #efefef; border-radius: 6px; padding: 3px 6px; line-height: 1; letter-spacing: .02em; }
.nm-search { position: absolute; left: 9px; right: 9px; top: 121px; height: 28px; border: 1px solid var(--line); border-radius: 8px; background: #fff; display: flex; align-items: center; gap: 8px; padding: 0 9px; color: var(--muted); font-size: 14px; }
.nm-search svg { width: 15px; height: 15px; color: #404040; }
.nm-sync { position: absolute; left: 16px; right: 12px; top: 162px; font-size: 13px; color: var(--muted); }
.nm-sync-head { position: relative; height: 18px; }
.nm-sync-head > span { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 6px; }
.nm-sync-head .st-out { color: #b45309; font-weight: 500; }
.nm-sync-head .st-run { color: var(--fg); font-weight: 500; }
.nm-sync-head .st-run .nm-spin { width: 11px; height: 11px; }
.nm-sync-head i { width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
.nm-sync-act { position: absolute; right: 0; top: 0; display: flex; gap: 22px; }
.nm-sync-act .on { color: var(--fg); font-weight: 600; }
.nm-sync-desc { position: absolute; left: 0; right: 0; top: 24px; font-size: 12px; line-height: 16.6px; color: var(--muted); }
.nm-sync-desc > p { position: absolute; left: 0; right: 0; top: 0; }
.nm-h { position: absolute; left: 16px; font-size: 13px; color: var(--muted); }
.nm-tree { position: absolute; left: 8px; right: 8px; height: 30px; display: flex; align-items: center; font-size: 14px; border-radius: 8px; }
.nm-tree svg { width: 14px; height: 14px; color: #525252; }
.nm-tree.is-active { background: var(--soft-2); }
.nm-tree .more { margin-left: auto; margin-right: 8px; letter-spacing: 1px; color: #525252; font-weight: 700; line-height: 1; }
.nm-chat-row { position: absolute; left: 8px; right: 8px; height: 30px; display: flex; align-items: center; gap: 0; padding-left: 30px; padding-right: 8px; font-size: 13.5px; border-radius: 8px; white-space: nowrap; }
.nm-chat-row span { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.nm-chat-row time { flex: none; margin-left: 8px; font-size: 12px; color: var(--muted); }
.nm-chat-row.is-pin { }
.nm-chat-row .dot { position: absolute; left: 11px; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--fg); }
.nm-chat-row .dot.off { background: #a3a3a3; }
.nm-window[data-scene="2"] .nm-chat-row.row-a, .nm-window[data-scene="4"] .nm-chat-row.row-b { background: var(--soft-2); }
.nm-clip { position: absolute; left: 0; right: 0; top: 445px; height: 379px; overflow: hidden; }
.nm-clip .nm-chat-row { }
.nm-clip::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 26px; background: linear-gradient(#fafafa00, #fafafa); }
.nm-side-foot { position: absolute; left: 0; right: 0; bottom: 0; height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px 0 17px; background: #fafafa; color: #404040; }
.nm-side-foot svg { width: 17px; height: 17px; }

/* ---------- document (x 255-1440) ---------- */
.nm-bar { position: absolute; left: 256px; right: 0; top: 0; height: 52px; z-index: 2; background: linear-gradient(#fff 0, #fff 40px, #fff0); text-align: center; font-size: 13px; line-height: 40px; color: var(--muted); transition: right .5s cubic-bezier(.22,1,.36,1); }
.nm-window[data-scene="2"] .nm-bar, .nm-window[data-scene="4"] .nm-bar { right: 585px; }
.nm-doc { position: absolute; left: 550px; top: 0; width: 600px; transition: left .6s cubic-bezier(.22,1,.36,1), width .3s; --gap: 1px; }
.nm-window[data-scene="2"] .nm-doc, .nm-window[data-scene="4"] .nm-doc { left: 361px; width: 382px; }
.nm-window[data-scene="3"] .nm-doc { left: 361px; --gap: 12px; }
.nm-doc-in { transform: translateY(40px); transition: transform .7s cubic-bezier(.22,1,.36,1); font-size: 15px; line-height: 26.25px; }
.nm-window[data-scene="2"] .nm-doc-in { transform: translateY(-60px); }
.nm-window[data-scene="3"] .nm-doc-in { transform: translateY(-71px); }
.nm-window[data-scene="4"] .nm-doc-in { transform: translateY(-60px); }
.nm-doc h1 { padding-top: 132px; font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -.025em; }
.nm-doc h2 { margin-top: 86px; font-size: 22.5px; line-height: 27px; font-weight: 600; letter-spacing: -.02em; }
.nm-doc .u { position: relative; margin: 0 -10px var(--gap); padding: 11px 10px; border-radius: 6px; border: 1px dashed transparent; transition: background .3s, border-color .3s; }
.nm-doc h1 + .u, .nm-doc h2 + .u { margin-top: 29px; }
.nm-doc .u.hover, .nm-window[data-scene="1"] .u.hover { background: #f5f5f5; }
.nm-doc .u.sel { border-color: #cfcfcf; }
.nm-handle { position: absolute; left: -22px; top: 13px; color: #a3a3a3; display: none; }
.nm-window[data-scene="1"] .u.hover .nm-handle { display: block; }
.nm-handle svg { width: 12px; height: 12px; stroke-width: 2.6; }
.f { position: relative; }
.f.on::after { content: ""; position: absolute; left: 50%; bottom: -3px; width: 16px; height: 1.5px; margin-left: -8px; border-radius: 99px; background: #17171747; }
.f.sel::after { left: 0; right: 0; width: auto; margin: 0; height: 2px; background: var(--fg); }
.nm-caret { display: inline-block; width: 1.5px; height: 1.15em; margin-left: 1px; vertical-align: text-bottom; background: var(--fg); animation: nm-caret 1.1s steps(1) infinite; }
@keyframes nm-caret { 50% { opacity: 0; } }
.nm-doc mark { background: #dcefe3; color: inherit; border-radius: 3px; padding: 0 1px; }
.nm-flag { position: absolute; left: 100%; margin-left: 14px; top: 13px; color: var(--fg); }
.nm-flag svg { width: 16px; height: 16px; stroke-width: 1.7; }
.nm-flag sup { position: absolute; left: 16px; top: -11px; font-size: 9px; color: var(--muted); }
.nm-swap { position: relative; }
.nm-swap > span { display: inline; }

/* outline / minimap (x 281-317) */
.nm-map { position: absolute; left: 281px; top: 96px; width: 40px; height: 240px; z-index: 1; pointer-events: none; }
.nm-map i { position: absolute; height: 2px; border-radius: 2px; background: #b5b5b5; }
.nm-map i.top { left: 0; top: 0; width: 23px; background: #2a2a2a; }
.nm-map i.l { width: 16px; left: 8px; }
.nm-map i.s { width: 8px; left: 16px; }
.nm-map b { position: absolute; left: 30px; width: 6px; height: 6px; border-radius: 50%; background: #9a9a9a; margin-top: -2px; }
.nm-map i.act { background: #2a2a2a; }

/* connector */
.nm-conn { position: absolute; left: 0; top: 0; width: 1440px; height: 872px; z-index: 2; pointer-events: none; overflow: visible; }
.nm-conn path { fill: none; stroke: #b8b8b8; stroke-width: 1; }

/* ---------- inspector (x 1040-1393) ---------- */
.nm-insp { position: absolute; left: 1040px; top: 331px; width: 352px; font-size: 12px; line-height: 21.6px; z-index: 2; }
.nm-insp .kick { font-size: 10px; line-height: 16px; font-weight: 600; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.nm-insp h3 { font-size: 14px; line-height: 20px; font-weight: 600; margin-top: 0; }
.nm-insp .x { position: absolute; right: 8px; top: 6px; color: #404040; }
.nm-insp .x svg { width: 14px; height: 14px; }
.nm-insp .back { margin-top: 26px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.nm-insp .back svg { width: 12px; height: 12px; }
.nm-sec { margin-top: 20px; }
.nm-sec > .t { display: flex; align-items: center; gap: 6px; font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nm-sec > .t svg { width: 14px; height: 14px; }
.nm-sec > .t svg.c { width: 12px; height: 12px; opacity: .6; }
.nm-sec.is-attn > .t { color: var(--fg); }
.nm-sec p { margin-top: 8px; font-size: 13px; line-height: 21.6px; color: #262626; }
.nm-sec code { font-size: 12px; background: #f1f1f1; border-radius: 4px; padding: 1px 5px; margin-right: 2px; }
.nm-insp .pn { margin-top: 30px; display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }

/* ---------- chat pane (x 855-1433) ---------- */
.nm-chat { position: absolute; left: 855px; top: 6px; width: 578px; height: 858px; border: 1px solid var(--line); border-radius: 12px; background: #fff; z-index: 3; overflow: hidden; }
.nm-chat .ttl { height: 34px; line-height: 28px; text-align: center; font-size: 13px; color: var(--muted); }
.nm-msgs { position: absolute; left: 0; right: 0; top: 34px; bottom: 100px; padding: 0 24px; font-size: 13px; line-height: 21.6px; overflow: hidden; }
.nm-user { margin: 14px 0 0 auto; width: fit-content; background: #f4f4f4; border-radius: 12px; padding: 7px 14px; font-size: 13px; line-height: 22px; }
.nm-asst { margin-top: 44px; color: #171717; }
.nm-asst2 { margin-top: 30px; }
.nm-tho { display: flex; align-items: center; gap: 12px; margin: 28px 0 0 6px; color: var(--muted); font-size: 13px; }
.nm-tho .rd { width: 8px; height: 8px; border-radius: 50%; background: #d64545; margin-right: 2px; }
.nm-tho svg { width: 12px; height: 12px; }
.nm-tho .ring, .nm-spin { width: 14px; height: 14px; border: 1.6px solid #d4d4d4; border-top-color: #737373; border-radius: 50%; display: inline-block; animation: nm-spin .9s linear infinite; }
.nm-tho .ring { margin-right: 2px; }
.nm-tho em { font-style: normal; font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: #a3a3a3; }
@keyframes nm-spin { to { transform: rotate(360deg); } }
.nm-steps { position: relative; margin: 16px 0 0 6px; padding-left: 24px; }
.nm-tho2 { margin-top: 30px; }
.nm-steps::before { content: ""; position: absolute; left: 5px; top: 0; bottom: 6px; width: 1px; background: #e5e5e5; }
.nm-step { height: 32px; display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
.nm-step .cmd { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; font-weight: 500; font-size: 13px; }
.nm-step .cmd > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 250px; }
.nm-step svg.p { width: 14px; height: 14px; color: #525252; }
.nm-step .chip { margin-left: auto; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, Menlo, monospace; font-size: 11px; font-weight: 400; color: var(--muted); background: #f5f5f5; border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; }
.nm-step .ok { width: 16px; height: 16px; border-radius: 50%; background: #2f9e4f; color: #fff; display: grid; place-items: center; flex: none; margin-left: 8px; }
.nm-step .ok svg { width: 10px; height: 10px; stroke-width: 3; }
.nm-work { display: flex; align-items: center; gap: 10px; margin: 6px 0 0 -4px; color: var(--muted); font-size: 13px; }
.nm-work .grid { width: 16px; height: 16px; background: radial-gradient(circle, #b4b4b4 1.4px, transparent 1.6px) 0 0 / 5.33px 5.33px; opacity: .8; }
.nm-work em { font-style: normal; font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: #a3a3a3; }
.nm-comp { position: absolute; left: 22px; right: 22px; bottom: 12px; height: 76px; border: 1px solid #dcdcdc; border-radius: 14px; background: #fff; }
.nm-comp .ph { position: absolute; left: 18px; top: 15px; font-size: 14px; color: var(--muted); }
.nm-comp .l { position: absolute; left: 14px; bottom: 9px; display: flex; align-items: center; gap: 22px; font-size: 12px; color: var(--muted); }
.nm-comp .l span { display: inline-flex; align-items: center; gap: 6px; }
.nm-comp .l svg { width: 14px; height: 14px; }
.nm-comp .r { position: absolute; right: 62px; bottom: 15px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.nm-comp .r svg { width: 15px; height: 15px; }
.nm-comp .go { position: absolute; right: 10px; bottom: 10px; width: 29px; height: 29px; border-radius: 8px; background: #111; display: grid; place-items: center; }
.nm-comp .go i { width: 10px; height: 10px; background: #fff; border-radius: 2px; }

@media (prefers-reduced-motion: reduce) { .nm-caret, .nm-spin, .nm-tho .ring { animation: none; } }

/* ---------- scene rules ---------- */
.nm-window[data-scene="1"] .nm-sync-act .rz { color: var(--fg); font-weight: 600; }
.nm-swap > [data-in] { display: none; }
.nm-window[data-scene="1"] .nm-swap > [data-in~="1"], .nm-window[data-scene="2"] .nm-swap > [data-in~="2"], .nm-window[data-scene="3"] .nm-swap > [data-in~="3"], .nm-window[data-scene="4"] .nm-swap > [data-in~="4"] { display: inline; }
.nm-window[data-scene="1"] .u.t { background: #f5f5f5; }
.nm-window[data-scene="3"].sel-on .u.t { border-color: #cfcfcf; }
.nm-window:not(.sel-on) .f.sel::after { display: none; }
.nm-window[data-scene="3"] .nm-map i.k3 { background: #2a2a2a; }
.nm-window[data-scene="3"] .nm-map i.top { background: #b5b5b5; }
.nm-chat-row[style*="--n"] { top: calc(var(--o, 0px) + 6px + var(--n) * 30px); transition: top .4s ease; }
.nm-window[data-scene="1"] .nm-clip { --o: -30px; }
.nm-window[data-scene="4"] .nm-clip { --o: 30px; }

/* ---------- tabs, note, responsive shell ---------- */
.nm-hero .nm-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.nm-hero .nm-tabs button { appearance: none; border: 0; border-radius: 999px; padding: 10px 16px; font: 600 13px/1 "DM Sans", "PingFang SC", sans-serif; color: #6d7673; background: transparent; cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; }
.nm-hero .nm-tabs button i { font-style: normal; opacity: .5; margin-right: 6px; font-size: 10px; letter-spacing: .08em; }
.nm-hero .nm-tabs button:hover { color: var(--ink); background: #0000000a; }
.nm-hero .nm-tabs button[aria-selected="true"] { color: var(--ink); background: #fdfdfa; box-shadow: 0 1px 2px #33464122, 0 0 0 1px #d9dfd9; }
.nm-hero .nm-note { font-size: 14px; line-height: 1.7; color: #58615e; margin: 0 0 20px; min-height: 24px; }
.nm-hero .nm-note span[hidden] { display: none; }
.hero-display.nm-hero { background: none; padding: 0; box-shadow: none; border-radius: 0; margin-top: 56px; }

/* ---------- review state (scene 4): what a proposal changes, in the document's own layout ---------- */
.nm-swap > .rv-wrap[data-in] { display: none; }
.nm-window[data-scene="4"] .nm-swap > .rv-wrap { display: none; margin: 0 -10px; }
.nm-window[data-scene="4"].rv-on .nm-swap > .rv-wrap { display: block; }
.nm-window[data-scene="4"].rv-on .nm-swap > .plain4 { display: none; }
.nm-window.rv-on .rv { animation: nm-in .5s ease both; }
@keyframes nm-in { from { opacity: 0; } to { opacity: 1; } }
.rv { display: block; margin: 0; padding: 7px 10px; border-radius: 4px; }
.rv-old { background: #fdeeee; color: #525252; text-decoration: line-through; text-decoration-color: #d98a8d; }
.rv-old del { text-decoration: line-through; background: #f9c9cb; border-radius: 2px; color: #7a2a2d; }
.rv-new { margin-top: 10px; background: #edf7f0; box-shadow: inset 3px 0 0 var(--ok); }
.rv-new ins { text-decoration: none; background: #bfe4cb; border-radius: 2px; padding: 0 1px; }
.nm-window[data-scene="4"] .u.t { padding: 11px 10px; border-color: transparent; background: none; }
.nm-window[data-scene="4"].rv-on .u.t { padding: 0 10px; }
.nm-window[data-scene="4"] .u.t .nm-handle { display: none; }

/* the floating review bar, bottom centre of the document pane */
.nm-rbar { position: absolute; left: 555px; bottom: 16px; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 4px; height: 34px; padding: 0 4px 0 8px; border: 1px solid var(--line); border-radius: 999px; background: #ffffffee; box-shadow: 0 1px 2px #0000000d, 0 6px 16px -6px #00000026; font-size: 12px; white-space: nowrap; }
.nm-rbar .ic { width: 22px; height: 22px; display: grid; place-items: center; color: #404040; }
.nm-rbar .ic svg { width: 14px; height: 14px; }
.nm-rbar .cnt { color: var(--muted); font-variant-numeric: tabular-nums; }
.nm-rbar .sep { width: 1px; height: 16px; background: var(--line); margin: 0 6px; }
.nm-rbar .alt { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; height: 24px; color: #404040; border-radius: 6px; }
.nm-rbar .alt svg { width: 12px; height: 12px; opacity: .6; }
.nm-rbar .acc { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 6px; background: #171717; color: #fafafa; font-weight: 500; }
.nm-rbar .cl { margin-left: 2px; color: #525252; }

/* a Source proposal card in the conversation */
.nm-prop { margin-top: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 12px; overflow: hidden; }
.nm-prop .body { padding: 12px; }
.nm-prop .k { margin: 0; font-size: 10px; line-height: 16px; color: var(--muted); }
.nm-prop h4 { margin: 2px 0 0; font: 500 13px/20px inherit; font-family: inherit; letter-spacing: 0; }
.nm-prop .chip { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; padding: 1px 6px; border: 1px solid var(--line); border-radius: 6px; background: #f8f8f8; font: 400 11px/18px ui-monospace, Menlo, monospace; color: var(--muted); }
.nm-prop .chip svg { width: 12px; height: 12px; }
.nm-prop .foot { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-top: 1px solid var(--line); background: #fafafa; }
.nm-prop .foot > span { font-size: 11px; color: var(--muted); }
.nm-prop .foot > div { display: flex; align-items: center; gap: 6px; }
.nm-prop .ghost { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 6px; color: #404040; }
.nm-prop .ghost svg { width: 12px; height: 12px; opacity: .6; }
.nm-prop .pri { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 6px; background: #171717; color: #fafafa; font-weight: 500; }

/* ---------- choreography ---------- */
.nm-window [data-at] { transition: opacity .45s ease, transform .45s ease; }
.nm-window [data-in][data-at] { transition: opacity .45s ease, transform .45s ease, visibility .35s; }
.nm-js .nm-window [data-at]:not(.on) { opacity: 0; }
.nm-js .nm-msgs [data-at]:not(.on) { transform: translateY(6px); }
.nm-window [data-at].on { opacity: 1; }
.nm-js .nm-window .nm-rbar[data-at]:not(.on) { transform: translate(-50%, 8px); }
.nm-window .nm-rbar[data-at].on { transform: translateX(-50%); }
.nm-js .nm-window .nm-prop[data-at]:not(.on) { transform: translateY(8px); }

.nm-cursor { position: absolute; left: 0; top: 0; width: 22px; height: 22px; z-index: 30; pointer-events: none; opacity: 0; transition: opacity .3s; filter: drop-shadow(0 2px 3px #00000040); }
.nm-cursor.show { opacity: 1; }
.nm-cursor svg { width: 22px; height: 22px; fill: none; stroke: none; }
.nm-cursor::after { content: ""; position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: #4b73d666; opacity: 0; }
.nm-cursor.click::after { animation: nm-ripple .65s ease-out; }
@keyframes nm-ripple { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(3); } }
.nm-window.pulse-rz .nm-sync-act .rz { animation: nm-pulse 1s ease-in-out infinite; border-radius: 6px; }
@keyframes nm-pulse { 0%, 100% { box-shadow: 0 0 0 4px #ffffff00; } 50% { box-shadow: 0 0 0 5px #e4e4e4; background: #e4e4e4; } }
.nm-sec.is-attn p { padding: 2px 6px; margin: 6px -6px 0; border-radius: 6px; }
.nm-window.attn-pulse .nm-sec.is-attn p { animation: nm-flash 1.6s ease-out both; }
@keyframes nm-flash { 0% { background: #fbe3c8; } 100% { background: #fbe3c800; } }

/* stage on narrow screens: a cropped, legible part of the window per scene */
.nm-stage.is-crop { transition: height .7s cubic-bezier(.22, 1, .36, 1); }
.nm-stage.is-crop .nm-window { transition: transform .7s cubic-bezier(.22, 1, .36, 1); }

/* autoplay controls */
.nm-hero .nm-tabs { align-items: center; }
.nm-hero .nm-tabs button[role="tab"] { position: relative; }
.nm-hero .nm-tabs button[role="tab"][aria-selected="true"]::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--accent); opacity: .55; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.nm-play { margin-left: auto; width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #58615e; cursor: pointer; transition: background .2s, color .2s; }
.nm-play:hover { background: #0000000a; color: var(--ink); }
.nm-play svg { width: 16px; height: 16px; fill: currentColor; }
.nm-play .pl { display: none; }
.nm-play[aria-pressed="false"] .pa { display: none; }
.nm-play[aria-pressed="false"] .pl { display: block; }
.nm-play[hidden] { display: none; }
@media (max-width: 650px) { .nm-hero .nm-tabs button[role="tab"] { padding: 9px 12px; } .nm-hero .nm-tabs button[role="tab"]::after { left: 12px; right: 12px; } }

/* ---------- 理念: code vs intent, bound to each other ---------- */
.bd { --fg: #171717; --muted: #737373; --hl: #dfe9e7; --hl-row: #f1f6f4; --acc: #436b6c;
  position: relative; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; max-width: 1000px; margin-top: 40px;
  background: #fff; border-radius: 12px; overflow: hidden; color: var(--fg); text-align: left;
  box-shadow: 0 1px 2px #0000000d, 0 40px 70px -40px #26302f55, 0 0 0 1px #d6d8d3;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, var(--cjk-sans, sans-serif); }
.bd *, .bd *::before, .bd *::after { box-sizing: border-box; }
.bd h3, .bd p { margin: 0; letter-spacing: 0; font-family: inherit; text-wrap: initial; }
.bd-pane { min-width: 0; display: flex; flex-direction: column; }
.bd-code-pane { background: #fafafa; }
.bd-head { height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px; font-size: 13px; color: var(--muted); }
.bd-head b { font-weight: 700; font-size: 11px; letter-spacing: .12em; color: #525252; margin-right: 10px; text-transform: uppercase; }
.bd-head.is-accent b { color: var(--acc); }
.bd-btn { appearance: none; border: 1px solid #dcdcdc; background: #fff; color: var(--fg); font: 500 12px/1 inherit; font-family: inherit; padding: 7px 12px; border-radius: 8px; cursor: pointer; transition: background .2s, border-color .2s; }
.bd-btn:hover { background: #f2f2f2; border-color: #c9c9c9; }
.bd[data-ver="2"] .bd-btn { background: #171717; border-color: #171717; color: #fafafa; }
.bd[data-ver="2"] .bd-btn:hover { background: #404040; }

.bd-codes { padding: 8px 0 22px; }
.bd-code { display: none; font: 13px/24px ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; color: #262626; }
.bd[data-ver="1"] .bd-code[data-ver="1"], .bd[data-ver="2"] .bd-code[data-ver="2"] { display: block; }
.bd-codes.flash .bd-code { animation: bd-flash .6s ease; }
@keyframes bd-flash { 0% { opacity: 0; transform: translateY(6px); } 100% { opacity: 1; transform: none; } }
.bd .ln { display: flex; min-height: 24px; padding-right: 16px; white-space: pre; transition: background .2s; }
.bd .ln i { flex: none; width: 44px; padding-right: 14px; text-align: right; font-style: normal; color: #b0b0b0; user-select: none; }
.bd .ln b { font-weight: 400; color: #8a4fb3; }
.bd .ln mark { background: none; color: inherit; border-radius: 3px; transition: background .2s; }
.bd .ln.row-on { background: var(--hl-row); }
.bd .ln.on { background: var(--hl); }
.bd .ln mark.on { background: #c5dcd6; }

.bd-doc-pane { background: #fff; }
.bd-doc { padding: 34px 32px 44px; }
.bd-doc h3 { font-size: 26px; line-height: 1.3; font-weight: 600; letter-spacing: -.02em; margin-bottom: 18px; }
.bd-doc p { font-size: 17px; line-height: 2; }
.bd-f { position: relative; appearance: none; border: 0; background: none; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; border-radius: 3px; transition: background .2s; }
.bd-f::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 16px; height: 1.5px; margin-left: -8px; border-radius: 99px; background: #17171747; transition: width .2s, margin .2s, background .2s; }
.bd-f:hover::after { background: #171717a0; }
.bd-f.on { background: var(--hl); }
.bd-f.on::after { width: 100%; margin-left: -50%; background: var(--fg); height: 2px; }
.bd-f:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }

.bd-conn { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 2; }
.bd-conn path { fill: none; stroke: var(--acc); stroke-width: 1.5; }
.bd-conn circle { fill: var(--acc); }
.bd-foot { grid-column: 1 / -1; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 20px; background: #f6f6f4; font-size: 13px; color: #404040; }
.bd-tag { flex: none; font-size: 11px; font-weight: 600; color: var(--acc); background: var(--hl); border-radius: 999px; padding: 4px 10px; }
.bd-tag[hidden] { display: none; }
.bd-hint { margin: 16px 0 0; font-size: 14px; line-height: 1.7; color: #6d7673; max-width: var(--measure); }

@media (max-width: 720px) {
  .bd { grid-template-columns: 1fr; margin-top: 28px; }
  .bd-doc-pane { order: 1; }
  .bd-code-pane { order: 2; }
  .bd-foot { order: 3; }
  .bd-conn { display: none; }
  .bd-doc { padding: 24px 22px 28px; }
  .bd-doc h3 { font-size: 22px; }
  .bd-doc p { font-size: 16px; }
  .bd-codes { overflow-x: auto; }
  .bd-code { font-size: 12px; min-width: max-content; }
  .bd .ln { min-width: 100%; }
  .bd .ln i { width: 36px; padding-right: 10px; }
  .bd-head { padding: 0 16px; }
  .bd-foot { padding: 10px 16px; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .bd-codes.flash .bd-code { animation: none; } }

/* ---------- 问题 / 规则 / 自主: copy first, figures to come ---------- */
.thesis .pivot { margin: 48px 0 0; max-width: var(--measure); font-size: clamp(20px, 1.9vw, 24px); line-height: 1.5; font-weight: 600; letter-spacing: 0; }
.bridge-p { margin: 12px 0 0; max-width: var(--measure); font-size: 16px; line-height: 1.9; color: #58615e; }
.fig-slot { display: grid; place-items: center; max-width: none; height: var(--h, 360px); margin-top: 40px; padding: 0 24px; border-radius: 14px; background: var(--paper-deep); color: #8a9490; font-size: 13px; letter-spacing: .04em; text-align: center; }

.own { width: min(100% - 96px, var(--page)); margin: 128px auto 0; }
.own .section-intro { margin-bottom: 40px; }
.own .section-intro h2 span { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); letter-spacing: -.02em; }
.own .section-intro > p:not(.section-label) { font-size: 16px; line-height: 1.85; color: #58615e; max-width: var(--measure); margin: 0; }
.own-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.own-list article { display: flex; flex-direction: column; background: #fdfdfa; border-radius: 14px; padding: 26px 28px 30px; box-shadow: 0 1px 0 #fff inset, 0 24px 44px -30px #33464140; }
.own-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.own-top .rule-tag { margin: 0; }
.own-top code { flex: none; font: 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: #6d7673; background: #f3f2ed; border-radius: 6px; padding: 6px 9px; }
.own-list h3 { margin: 0 0 10px; font-size: 20px; line-height: 1.45; letter-spacing: -.02em; }
.own-list article > p { margin: 0; font-size: 15px; line-height: 1.85; color: #626967; }

/* the illustrations reuse the 规则 panel (.ill); only their insides are described here */
.own-list .own-fig { justify-content: center; overflow: hidden; }
.own-fig code, .own-fig b { font: 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.own-lang > div { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 8px; padding: 9px 10px; font-size: 12.5px; line-height: 1.2; color: #3f4644; white-space: nowrap; box-shadow: 0 1px 2px #0000000f, 0 0 0 1px #e1dfd8; }
.own-lang > div > span, .own-lang > div > code, .own-list .of-body p { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.own-lang b { flex: none; width: 38px; font-weight: 600; color: var(--accent); }
.own-lang code { color: #3f4644; }
.own-list .own-file { justify-content: flex-start; gap: 0; padding: 0; }
.of-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 10px; font: 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: #6d7673; }
.of-bar em { font-style: normal; font-size: 11px; color: var(--accent); background: var(--accent-light); border-radius: 999px; padding: 4px 8px; }
.of-body { margin: 0 12px; padding: 12px 14px; border-radius: 8px; background: #fff; display: grid; gap: 7px; box-shadow: 0 1px 2px #0000000f, 0 0 0 1px #e1dfd8; }
.own-list .of-body p { margin: 0; font-size: 12.5px; line-height: 1.3; color: #3f4644; white-space: nowrap; }
.of-body b { color: var(--accent); margin-right: 8px; }
.of-git { display: flex; align-items: center; gap: 8px; margin: 10px 16px 0; font: 11.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: #6d7673; }
.of-git i { width: 8px; height: 8px; border-radius: 50%; background: #2d9d5c; }
.own-list .own-agents { flex-direction: row; align-items: center; justify-content: center; gap: 14px; }
.agent-tile { display: grid; justify-items: center; gap: 10px; width: 118px; padding: 20px 8px 16px; border-radius: 10px; background: #fff; font-size: 13px; line-height: 1; color: #3f4644; box-shadow: 0 1px 2px #0000000f, 0 0 0 1px #e1dfd8; }
.agent-tile img { display: block; width: 30px; height: 30px; }
html:is(:lang(zh), :lang(ja), :lang(ko)) .own .section-intro h2 span { font-family: inherit; font-style: normal; font-weight: inherit; letter-spacing: 0; font-size: 1em; }
html:is(:lang(zh), :lang(ja), :lang(ko)) .own .section-intro h2 { line-height: 1.4; }
html:is(:lang(zh), :lang(ja), :lang(ko)) .own .section-intro > p:not(.section-label), html:is(:lang(zh), :lang(ja), :lang(ko)) .own-list p, html:is(:lang(zh), :lang(ja), :lang(ko)) .bridge-p { line-height: 1.9; }
html:is(:lang(zh), :lang(ja), :lang(ko)) .own-list h3, html:is(:lang(zh), :lang(ja), :lang(ko)) .thesis .pivot { letter-spacing: 0; }
@media (max-width: 860px) { .own-list { grid-template-columns: 1fr; } }
@media (max-width: 650px) {
  .own { width: min(100% - 36px, 580px); margin-top: 88px; }
  .thesis .pivot { margin-top: 32px; }
  .fig-slot { height: calc(var(--h, 360px) * .7); margin-top: 28px; }
  .own-list article { padding: 22px 22px 24px; }
  .own-top { flex-wrap: wrap; gap: 8px; }
}
.thesis-inner > p:not(.section-label), .bridge-p, .own .section-intro > p:not(.section-label) { text-wrap: balance; }

/* ---------- 图位 01: reading a diff in an editor vs opening the REA document ---------- */
.rvw { --fg: #171717; --muted: #737373; --acc: #436b6c; --ok: #2d9d5c; --warn: #b45309;
  display: grid; grid-template-columns: minmax(0, 1.12fr) 56px minmax(0, 1fr); gap: 0; width: 100%; margin-top: 40px; text-align: left; color: var(--fg);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, var(--cjk-sans, sans-serif); }
.rvw *, .rvw *::before, .rvw *::after { box-sizing: border-box; }
.rvw p, .rvw h4, .rvw ul { margin: 0; letter-spacing: 0; }
.rvw svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rvw-col { min-width: 0; display: flex; flex-direction: column; }
.rvw-cap { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; font-size: 14px; color: #6d7673; }
.rvw-cap b { font-size: 26px; line-height: 1; font-weight: 700; letter-spacing: 0; color: #9aa09d; }
.rvw-cap.is-accent b { color: var(--acc); }
.rvw-cap.is-accent span { color: #4d5553; }
.rvw-arrow { align-self: center; justify-self: center; margin-top: 52px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--acc); color: #fff; box-shadow: 0 8px 20px -8px #436b6c99; z-index: 1; }
.rvw-arrow svg { width: 18px; height: 18px; stroke-width: 2.2; }

/* left: a code editor showing a git diff (dark theme, dense) */
.rvw-code { --edbg: #1e1e1e; height: 560px; display: flex; flex-direction: column; background: var(--edbg); color: #d4d4d4; border-radius: 12px; overflow: hidden;
  box-shadow: 0 1px 2px #0000001a, 0 40px 70px -40px #0009, 0 0 0 1px #00000040; }
.ed-title { flex: none; height: 30px; display: flex; align-items: center; gap: 14px; padding: 0 12px; background: #323233; font-size: 12px; color: #9d9d9d; }
.ed-title .lights { display: flex; gap: 7px; }
.ed-title .lights i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.ed-title .lights i:nth-child(2) { background: #febc2e; }
.ed-title .lights i:nth-child(3) { background: #28c840; }
.ed-title .ed-name { flex: 1; text-align: center; margin-right: 44px; }
.ed-body { flex: 1; min-height: 0; display: flex; }
.ed-act { flex: none; width: 42px; padding-top: 8px; background: #333333; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ed-act span { position: relative; width: 42px; height: 40px; display: grid; place-items: center; color: #858585; }
.ed-act span svg { width: 20px; height: 20px; stroke-width: 1.5; }
.ed-act span.on { color: #fff; box-shadow: inset 2px 0 0 #fff; }
.ed-act em { position: absolute; right: 5px; bottom: 5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #007acc; color: #fff; font: 600 10px/16px inherit; font-style: normal; text-align: center; }
.ed-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ed-tabs { flex: none; height: 34px; display: flex; background: #252526; overflow: hidden; }
.ed-tabs span { flex: none; display: flex; align-items: center; gap: 8px; padding: 0 14px; font-size: 12px; color: #969696; background: #2d2d2d; }
.ed-tabs span.on { background: var(--edbg); color: #fff; box-shadow: inset 0 1px 0 #007acc; }
.ed-tabs u { text-decoration: none; color: #e2c08d; font-size: 11px; }
.ed-crumb { flex: none; height: 24px; display: flex; align-items: center; padding: 0 14px; font-size: 11.5px; color: #9d9d9d; }
.ed-diff { position: relative; flex: 1; min-height: 0; overflow: hidden; font: 11.5px/18px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ed-diff::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; background: linear-gradient(#1e1e1e00, #1e1e1e); pointer-events: none; }
.ed-diff .hunk { padding: 0 14px 0 8px; height: 22px; line-height: 22px; background: #26364a; color: #7aa2d6; white-space: pre; }
.ed-diff .ln { display: flex; height: 18px; white-space: pre; }
.ed-diff .ln i { flex: none; width: 34px; padding-right: 8px; text-align: right; font-style: normal; color: #6e7681; user-select: none; }
.ed-diff .ln b { flex: none; width: 16px; text-align: center; font-weight: 400; color: #8b949e; }
.ed-diff .ln code { font: inherit; padding-right: 20px; }
.ed-diff .ln.add { background: #1f3a29; }
.ed-diff .ln.add b { color: #56d364; }
.ed-diff .ln.del { background: #3f2225; }
.ed-diff .ln.del b { color: #f47067; }
.ed-diff .k { color: #c586c0; }
.ed-diff .t { color: #4ec9b0; }
.ed-diff .f { color: #dcdcaa; }
.ed-diff .s { color: #ce9178; }
.ed-diff .n { color: #b5cea8; }
.ed-status { flex: none; height: 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 12px; background: #007acc; color: #fff; font-size: 11.5px; }
.ed-status span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ed-status svg { width: 13px; height: 13px; }
.ed-status em { font-style: normal; font-family: ui-monospace, Menlo, monospace; }

/* right: the REA document, opened at one intent */
.rvw-doc { height: 560px; display: flex; flex-direction: column; background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 1px 2px #0000000d, 0 40px 70px -40px #26302f55, 0 0 0 1.5px #436b6c66; }
.doc-bar { flex: none; height: 30px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; background: #fafafa; font-size: 12px; color: var(--muted); }
.doc-bar em { font-style: normal; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.doc-intent { position: relative; margin: 20px 22px 0; padding: 14px 14px; border-radius: 8px; background: #f5f5f5; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.doc-intent p { font-size: 16px; line-height: 1.6; }
.doc-intent .flag { position: relative; flex: none; margin-top: 3px; color: var(--fg); }
.doc-intent .flag svg { width: 16px; height: 16px; }
.doc-intent .flag sup { position: absolute; left: 15px; top: -9px; font-size: 9px; color: var(--muted); }
.doc-secs { padding: 6px 22px 24px; }
.sec { margin-top: 20px; }
.sec h4 { display: flex; align-items: center; gap: 6px; font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sec h4 .c { width: 12px; height: 12px; opacity: .6; }
.sec.is-attn h4 { color: var(--fg); }
.sec.is-attn h4 svg:not(.c) { color: #d9701c; }
.sec p, .sec li { margin-top: 8px; font-size: 13.5px; line-height: 1.8; color: #262626; }
.sec ul { padding-left: 0; list-style: none; }
.sec li { position: relative; padding-left: 14px; }
.sec li::before { content: ""; position: absolute; left: 2px; top: 1.05em; width: 4px; height: 4px; border-radius: 50%; background: #a3a3a3; }
.sec li + li { margin-top: 4px; }
.sec code { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; background: #f1f1f1; border: 1px solid #e5e5e5; border-radius: 4px; padding: 0 5px; }
.sec p.choice { margin-top: 10px; font-size: 12.5px; line-height: 1.7; color: #6d7673; }
.sec p.choice b { font-weight: 600; color: #404040; margin-right: 8px; }
.sec.is-attn p { padding: 8px 12px; margin: 8px -12px 0; border-radius: 8px; background: #fdf3e6; color: #6f4310; }

/* the three parts of the document appear one after another when scrolled into view */
.rvw.is-armed .sec { opacity: 0; transform: translateY(6px); transition: opacity .55s ease, transform .55s ease; transition-delay: calc(var(--i, 0) * .5s + .25s); }
.rvw.is-armed.in .sec { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .rvw { grid-template-columns: 1fr; gap: 0; margin-top: 28px; }
  .rvw-arrow { margin: 20px 0; }
  .rvw-arrow svg { transform: rotate(90deg); }
  .rvw-cap b { font-size: 22px; }
  .rvw-code, .rvw-doc { height: auto; }
  .ed-diff { height: 330px; flex: none; }
  .ed-status span:last-child { display: none; }
  .ed-diff .ln code { padding-right: 12px; }
}
@media (prefers-reduced-motion: reduce) { .rvw.is-armed .sec { transition: none; } }

/* ---------- 规则: three short rules side by side ---------- */
.rules .rule-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; max-width: none; }
.rules .rule-grid article { background: #fdfdfa; border-radius: 14px; padding: 26px 28px 30px; box-shadow: 0 1px 0 #fff inset, 0 24px 44px -30px #33464140; }
.rules .rule-grid h3 { font-size: 20px; margin-bottom: 10px; }
.rules .rule-grid p { max-width: none; }
@media (max-width: 860px) { .rules .rule-grid { grid-template-columns: 1fr; } }
@media (max-width: 650px) { .rules .rule-grid article { padding: 22px 22px 24px; } }

/* small illustrations inside the three rule cards */
.rules .rule-grid article { display: flex; flex-direction: column; }
.ill { --acc: #436b6c; --amber: #d9701c; margin-top: 24px; padding: 16px 16px 16px; min-height: 176px; border-radius: 10px; background: #f3f2ed; display: flex; flex-direction: column; gap: 10px; color: #171717; text-align: left;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, var(--cjk-sans, sans-serif); }
.ill p { margin: 0; letter-spacing: 0; }
.ill svg { width: 13px; height: 13px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ill .intent { font-size: 13.5px; line-height: 1.7; }
.ill .intent u { text-decoration: none; background: linear-gradient(#0000 calc(100% - 1.5px), #17171760 0); padding-bottom: 1px; }
.ill .intent u.on { background: #dfe9e7; border-radius: 3px; padding: 0 2px; box-shadow: inset 0 -2px 0 #171717; }
.ill .lab { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; color: #7c8783; }

/* 自由: what was left open, and that the Agent filled it in */
.ill-free .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ill-free .chips span { padding: 7px 12px; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 500; box-shadow: 0 1px 2px #0000000f, 0 0 0 1px #e1dfd8; }

/* 约束: two attempts against one binding phrase */
.ill-bind .try { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: #fff; font-size: 13px; box-shadow: 0 1px 2px #0000000f, 0 0 0 1px #e1dfd8; }
.ill-bind .try i { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; }
.ill-bind .try em { font-style: normal; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
.ill-bind .try.no i { background: #fbe4e4; color: #c23b3b; }
.ill-bind .try.no span { color: #8a8f8c; text-decoration: line-through; text-decoration-color: #c9a3a3; }
.ill-bind .try.no em { background: #fbe4e4; color: #c23b3b; }
.ill-bind .try.yes i { background: #e3f3ea; color: #2d9d5c; }
.ill-bind .try.yes em { background: #e3f3ea; color: #2d9d5c; }

/* 可见: the choice surfaces as Attention, and you decide */
.ill-see .attn { padding: 13px 14px; border-radius: 8px; background: #fdf1e0; color: #6f4310; }
.ill-see .attn .lab { color: #6f4310; margin-bottom: 4px; }
.ill-see .attn .lab svg { color: var(--amber); }
.ill-see .attn p:last-child { font-size: 13px; line-height: 1.7; }
.ill-see .acts { display: flex; gap: 8px; }
.ill-see .acts span { padding: 7px 12px; border-radius: 8px; background: #fff; font-size: 12.5px; font-weight: 600; box-shadow: 0 1px 2px #0000000f, 0 0 0 1px #e1dfd8; }
.ill-see .acts .pri { background: #171717; color: #fafafa; box-shadow: none; }

/* each illustration builds up once, when its card scrolls into view */
.js-ill .ill .chips span, .js-ill .ill .try, .js-ill .ill .attn, .js-ill .ill .acts, .js-ill .ill .step { opacity: 0; transform: translateY(6px); transition: opacity .5s ease, transform .5s ease; transition-delay: calc(var(--i, 0) * .35s + .15s); }
.js-ill.ill-in .ill .chips span, .js-ill.ill-in .ill .try, .js-ill.ill-in .ill .attn, .js-ill.ill-in .ill .acts, .js-ill.ill-in .ill .step { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js-ill .ill .chips span, .js-ill .ill .try, .js-ill .ill .attn, .js-ill .ill .acts, .js-ill .ill .step { transition: none; } }

/* both rows: panels the same height and sitting on the bottom of equal-height cards */
.rules .rule-grid .ill, .own-list .ill { height: 190px; min-height: 0; margin-top: auto; }
.rules .rule-grid article > p, .own-list article > p { margin-bottom: 24px; }
@media (max-width: 860px) { .rules .rule-grid .ill, .own-list .ill { height: auto; min-height: 176px; } }
