/* Looping "how to connect" demos on /docs and /setup (public/howto-demos.js).
   Simplified mock-ups of each client, drawn in HTML; no third-party logos. */
.hd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; margin: 18px 0 8px; }
.hd-card { margin: 0; }
.hd-card h3 { margin: 0 0 10px !important; font-size: 17px; }
.hd-stage {
  position: relative; height: 300px; overflow: hidden; border-radius: 12px;
  background: #fbfcfa; border: 1px solid #dde5de; box-shadow: 0 1px 0 rgba(23,37,33,.04);
  font: 12px/1.45 "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #172521;
}
.hd-bar { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-bottom: 1px solid #e6ece7; background: #f2f5f1; font-size: 11px; color: #56635b; }
.hd-bar i { width: 7px; height: 7px; border-radius: 50%; background: #d3dbd4; }
.hd-bar b { margin-left: 6px; font-weight: 600; color: #3a4842; }
.hd-scene { position: absolute; inset: 28px 0 0; animation: hd-in .35s ease both; }
@keyframes hd-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.hd-app { display: flex; height: 100%; }
.hd-side { width: 31%; padding: 12px 10px; border-right: 1px solid #e6ece7; background: #f6f8f5; display: flex; flex-direction: column; gap: 3px; }
.hd-side b { font-size: 12px; margin-bottom: 6px; }
.hd-side span { padding: 4px 7px; border-radius: 6px; color: #56635b; }
.hd-side span.on { background: #e7ede5; color: #172521; font-weight: 600; }
.hd-main { flex: 1; padding: 12px 14px; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.hd-h { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.hd-sub { color: #56635b; font-size: 11px; margin-top: -4px; }
.hd-row { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid #e3e9e4; border-radius: 8px; background: #fff; }
.hd-row em { margin-left: auto; font-style: normal; font-size: 11px; color: #56635b; }
.hd-row em.ok { color: #2f6b22; font-weight: 600; }
.hd-row em.ok::before { content: "● "; }
.hd-ico { width: 18px; height: 18px; border-radius: 5px; background: #e1e8e2; display: inline-grid; place-items: center; font-size: 10px; font-weight: 700; color: #56635b; flex: none; }
.hd-ico.es { background: #0b1d16; color: #b8f36b; }
.hd-btn { align-self: flex-start; border: 1px solid #c9d3cb; background: #fff; border-radius: 8px; padding: 6px 11px; font: inherit; font-weight: 600; color: #172521; }
.hd-btn.dark { background: #172521; border-color: #172521; color: #fff; }
.hd-btn.lime { background: #b8f36b; border-color: #557a3f; }
.hd-btn.green { background: #3f6b2f; border-color: #3f6b2f; color: #fff; }
.hd-hit { transform: scale(.95); filter: brightness(.94); transition: transform .12s, filter .12s; }

.hd-dim { position: absolute; inset: 0; background: rgba(23,37,33,.28); display: grid; place-items: center; }
.hd-dialog { width: 82%; background: #fff; border-radius: 12px; padding: 14px 15px; box-shadow: 0 10px 30px rgba(0,0,0,.18); display: flex; flex-direction: column; gap: 7px; }
.hd-label { font-size: 11px; font-weight: 600; color: #3a4842; margin-bottom: -4px; }
.hd-field { min-height: 27px; padding: 5px 8px; border: 1px solid #d4ddd6; border-radius: 7px; background: #fff; font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-size: 11px; white-space: nowrap; overflow: hidden; }
.hd-field.focus { border-color: #3f6b2f; box-shadow: 0 0 0 2px #e3f0dc; }
.hd-field.plain { font-family: inherit; color: #56635b; }
.hd-check { display: flex; align-items: center; gap: 7px; font-size: 11px; color: #3a4842; }
.hd-box { width: 13px; height: 13px; border: 1px solid #9aa79d; border-radius: 3px; display: inline-grid; place-items: center; font-size: 10px; color: #fff; }
.hd-box.on { background: #172521; border-color: #172521; }
.hd-box.on::after { content: "✓"; }
.hd-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 3px; }

.hd-toggle { margin-left: auto; width: 28px; height: 16px; border-radius: 9px; background: #cfd8d1; position: relative; transition: background .2s; flex: none; }
.hd-toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: left .2s; }
.hd-toggle.on { background: #3f6b2f; }
.hd-toggle.on::after { left: 14px; }

.hd-auth { height: 100%; background: #f6f8f5; display: flex; flex-direction: column; }
.hd-auth-top { padding: 7px 12px; border-bottom: 1px solid #e1e8e2; font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 700; font-size: 11px; }
.hd-auth-top span, .hd-acc { color: #3f6b2f; }
.hd-auth-card { margin: 12px auto; width: 84%; background: #fff; border: 1px solid #e1e8e2; border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.hd-auth-card .hd-h { font-size: 15px; }
.hd-url { margin: 4px 10px 0; padding: 3px 9px; border-radius: 6px; background: #eef2ec; font-size: 10px; color: #56635b; }

.hd-chat { height: 100%; display: flex; flex-direction: column; padding: 10px 12px 10px; gap: 8px; }
.hd-msgs { flex: 1; display: flex; flex-direction: column; gap: 7px; overflow: hidden; justify-content: flex-end; }
.hd-user { align-self: flex-end; max-width: 82%; background: #e9eee7; border-radius: 12px 12px 3px 12px; padding: 6px 10px; }
.hd-tool { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid #dfe6e0; border-radius: 999px; background: #fff; font-size: 11px; color: #3a4842; }
.hd-tool code { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 10.5px; background: none; border: 0; padding: 0; }
.hd-spin { width: 9px; height: 9px; border: 2px solid #cdd7cf; border-top-color: #3f6b2f; border-radius: 50%; animation: hd-spin .7s linear infinite; }
.hd-tool.done .hd-spin { animation: none; border-color: #3f6b2f; background: #3f6b2f; }
@keyframes hd-spin { to { transform: rotate(360deg); } }
.hd-answer { align-self: stretch; }
.hd-answer p { margin: 0 0 5px; font-size: 12px; color: #172521; }
.hd-table { width: 100%; border-collapse: collapse; font-size: 11px; margin: 0 !important; }
.hd-table td, .hd-table th { padding: 3px 6px; border-bottom: 1px solid #e6ece7; text-align: left; }
.hd-table th { color: #56635b; font-weight: 600; }
.hd-table td:nth-child(2) { font-variant-numeric: tabular-nums; font-weight: 600; }
.hd-table td:last-child { color: #3f6b2f; }
.hd-composer { display: flex; align-items: center; gap: 7px; padding: 6px 7px; border: 1px solid #d4ddd6; border-radius: 12px; background: #fff; position: relative; }
.hd-plus { width: 22px; height: 22px; border-radius: 50%; border: 1px solid #d4ddd6; display: grid; place-items: center; font-size: 14px; color: #56635b; flex: none; }
.hd-input { flex: 1; min-height: 16px; color: #172521; overflow: hidden; }
.hd-input:empty::before { content: attr(data-ph); color: #8a968e; }
.hd-send { width: 22px; height: 22px; border-radius: 50%; background: #172521; color: #fff; display: grid; place-items: center; font-size: 11px; flex: none; }
.hd-menu { position: absolute; left: 6px; bottom: 36px; width: 70%; background: #fff; border: 1px solid #dfe6e0; border-radius: 10px; box-shadow: 0 8px 22px rgba(0,0,0,.12); padding: 5px; display: flex; flex-direction: column; gap: 2px; }
.hd-menu div { display: flex; align-items: center; gap: 7px; padding: 5px 7px; border-radius: 6px; }
.hd-menu .sel { background: #f0f4ee; }
.hd-hide { display: none !important; }
.hd-fade { animation: hd-in .35s ease both; }

.hd-cursor { position: absolute; left: 0; top: 0; width: 16px; height: 16px; pointer-events: none; z-index: 5; transition: transform .55s cubic-bezier(.4,.1,.2,1), opacity .2s; opacity: 0; }
.hd-cursor svg { display: block; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.hd-cursor.click::after { content: ""; position: absolute; left: -7px; top: -7px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #3f6b2f; animation: hd-ring .4s ease-out forwards; }
@keyframes hd-ring { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }

.hd-chip { display: inline-flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 7px 13px; border: 1px solid #dfe6e0; border-radius: 999px; background: #fff; font-size: 13.5px; color: #172521; min-height: 34px; }
.hd-chip b { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px; color: #3f6b2f; font-weight: 600; }
.hd-cap { margin: 10px 0 0 !important; color: #56635b !important; font-size: 14px !important; }
.hd-steps { margin: 10px 0 0; padding-left: 20px; font-size: 14px; color: #2f3d36; }
.hd-more { display: inline-block; margin-top: 6px; font-size: 14px; }

.hd-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hd-nobar .hd-scene { inset: 0; }
.hd-compact .hd-stage { border-radius: 10px; }

/* Feature demos (public/feature-demos.js) */
.hd-stage .mono { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-size: .92em; }
.hd-stage .ok { color: #2f6b22; font-weight: 700; }
.xl { height: 100%; display: flex; flex-direction: column; background: #fff; }
.xl-formula { padding: 5px 9px; border-bottom: 1px solid #e3e9e4; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 10.5px; color: #56635b; white-space: nowrap; overflow: hidden; }
.xl-body { flex: 1; position: relative; padding: 8px; overflow: hidden; }
.xl-tabs { display: flex; gap: 2px; padding: 0 6px; border-top: 1px solid #e3e9e4; background: #f2f5f1; overflow: hidden; }
.xl-tabs span { padding: 5px 8px; font-size: 10.5px; color: #56635b; white-space: nowrap; }
.xl-tabs span.on { background: #fff; color: #1d6b3a; font-weight: 700; border-bottom: 2px solid #1d6b3a; }
.xl-grid { width: 100%; border-collapse: collapse; font-size: 11px; margin: 0 !important; }
.xl-grid th, .xl-grid td { border: 1px solid #e3e9e4; padding: 4px 6px; text-align: right; white-space: nowrap; }
.xl-grid th { background: #f2f5f1; color: #56635b; font-weight: 600; }
.xl-grid td:first-child, .xl-grid th:first-child { text-align: left; white-space: normal; }
.xl-grid td.sel { outline: 2px solid #1d6b3a; outline-offset: -2px; background: #eef7ee; }
.xl-in { background: #fff6c8; color: #172521; font-weight: 600; }
.xl-note { position: absolute; right: 10px; bottom: 10px; width: 62%; padding: 8px 10px; background: #fffbe0; border: 1px solid #e8d98a; border-radius: 6px; font-size: 10.5px; line-height: 1.5; box-shadow: 0 6px 18px rgba(0,0,0,.1); animation: hd-in .3s ease both; }
.xl-note b { display: block; font-size: 11px; }
.xl-out { margin-top: 12px; padding: 9px 11px; border: 1px solid #e3e9e4; border-radius: 8px; font-size: 11px; color: #56635b; }
.xl-out b { display: block; font-size: 18px; color: #172521; margin: 2px 0; font-variant-numeric: tabular-nums; }
.xl-out b.flash { animation: xl-flash 1s ease; color: #1d6b3a; }
@keyframes xl-flash { 0% { background: #d8f5c0; } 100% { background: transparent; } }
.xl-out small { display: block; font-size: 10.5px; }
.xl-flag { margin-top: 10px; padding: 8px 10px; border-left: 3px solid #c58b1c; background: #fdf6e7; font-size: 11px; animation: hd-in .3s ease both; }
.xl-file { align-self: flex-start; display: flex; gap: 9px; align-items: center; padding: 8px 11px; border: 1px solid #dfe6e0; border-radius: 10px; background: #fff; max-width: 92%; }
.xl-file b { display: block; font-size: 11.5px; }
.xl-file small { color: #56635b; font-size: 10.5px; }
.xl-icon { width: 26px; height: 26px; border-radius: 5px; background: #1d6b3a; color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }

.df-form { padding: 14px 16px; display: flex; flex-direction: column; gap: 7px; }
.df-out { padding: 12px 14px; display: flex; flex-direction: column; gap: 9px; height: 100%; box-sizing: border-box; }
.df-counts { display: flex; gap: 6px; }
.df-counts span { flex: 1; padding: 6px 8px; border-radius: 8px; font-size: 11px; color: #3a4842; background: #f2f5f1; }
.df-counts b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.df-counts .add b { color: #2f6b22; } .df-counts .mod b { color: #8a5a12; } .df-counts .rem b { color: #a32d2d; }
.df-list { flex: 1; display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.df-line { display: flex; gap: 7px; font-size: 11.5px; line-height: 1.45; padding: 5px 8px; border-radius: 6px; }
.df-line i { font-style: normal; font-weight: 700; }
.df-line.add { background: #eef7e9; } .df-line.add i { color: #2f6b22; }
.df-line.mod { background: #fbf3e2; } .df-line.mod i { color: #8a5a12; }
.df-line.rem { background: #fbecec; } .df-line.rem i { color: #a32d2d; }
.df-line ins { background: #d6efc6; text-decoration: none; }
.df-line del { color: #7a3a3a; }
.df-src { font-size: 10.5px; color: #56635b; }

.mn { height: 100%; padding: 12px; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; gap: 8px; position: relative; background: #fff; }
.mn-cap { font-size: 11px; color: #56635b; }
.mn-tags { display: flex; flex-direction: column; gap: 5px; transition: all .6s; }
.mn-tags span { align-self: flex-start; padding: 3px 8px; border-radius: 6px; background: #f2f5f1; border: 1px solid #e1e8e2; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 10.5px; transition: all .6s; }
.mn-tags.merge span { transform: translateX(30%) scale(.6); opacity: 0; }
.mn-row { display: flex; gap: 8px; align-items: baseline; padding: 8px 10px; border: 1px solid #b9d4ad; background: #eef7e9; border-radius: 8px; font-size: 12px; animation: hd-in .35s ease both; }
.story-grid .mn-row b { display: inline; margin: 0 !important; padding: 0 !important; border: 0 !important; box-shadow: none; text-decoration: none; }
.mn-row span { color: #2f6b22; font-size: 11px; }
.mn:has(.mn-t) { justify-content: flex-start; padding-top: 22px; }
.mn-t { width: 100%; border-collapse: collapse; font-size: 12px; margin: 0 !important; }
.mn-t td { padding: 6px 4px; border-bottom: 1px solid #e6ece7; }
.mn-t td:last-child { text-align: right; font-weight: 700; }
.mn-t td.sel { background: #eef7e9; color: #2f6b22; }
.mn-pop { position: absolute; left: 12px; right: 12px; bottom: 14px; padding: 7px 9px; background: #172521; color: #e8efe9; border-radius: 8px; font-size: 10.5px; line-height: 1.5; animation: hd-in .3s ease both; }
.mn-pop .mono { color: #b8f36b; display: block; }
.mn-doc { font-size: 13px; line-height: 1.6; padding: 10px 12px; border: 1px solid #e3e9e4; border-radius: 8px; }
.mn-doc del { text-decoration: none; transition: all .3s; }
.mn-doc del.on { text-decoration: line-through; background: #fbecec; color: #a32d2d; }
.mn-doc ins { text-decoration: none; background: #d6efc6; color: #2f6b22; font-weight: 700; margin-left: 4px; animation: hd-in .3s ease both; }

.tm { height: 100%; box-sizing: border-box; padding: 12px 14px; background: #0f1a17; color: #d9e4dc; font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-size: 11px; line-height: 1.55; overflow: hidden; word-break: break-all; }
.tm-p { color: #b8f36b; }
.tm-out { margin-top: 8px; }
.tm-dim { color: #7f948a; }
.tm mark { background: #2c4a22; color: #d6f7b8; border-radius: 3px; padding: 0 2px; }
.hd-stage:has(.tm) .hd-bar { background: #1b2924; color: #9fb3a8; border-color: #26362f; }
.hd-stage:has(.tm) .hd-bar b { color: #d9e4dc; }

.pc-note { font-size: 10.5px !important; color: #56635b !important; margin: 5px 0 0 !important; }

.sc { height: 100%; box-sizing: border-box; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #fff; }
.sc-head { font-size: 13px; color: #56635b; }
.sc-head b { font-size: 22px; color: #172521; font-variant-numeric: tabular-nums; }
.sc-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.sc-grid span { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; border-radius: 4px; background: #f2f5f1; }
.sc-grid i { height: 7px; border-radius: 2px; background: #dfe6e0; transition: background .2s; }
.sc-grid span.ok i { background: #3f6b2f; }
.sc-grid span.bad i { background: #3f6b2f; }
.sc-grid span.bad i:first-child { background: #d89a2b; }
.sc-ex { font-size: 11px; color: #8a5a12; display: flex; flex-direction: column; gap: 2px; }
.sc-fix { display: flex; flex-direction: column; gap: 6px; }
.sc-fix div { display: flex; justify-content: space-between; padding: 7px 9px; border: 1px solid #e3e9e4; border-radius: 7px; font-size: 12px; }
.sc-fix b { font-weight: 600; color: #56635b; font-size: 11px; }
.sc-done { padding: 8px 10px; background: #eef7e9; border-radius: 7px; color: #2f6b22; font-size: 12px; font-weight: 600; animation: hd-in .3s ease both; }

.hero-tip { position: absolute; z-index: 3; width: 182px; padding: 7px 9px; border-radius: 8px; background: rgba(9,20,18,.94); border: 1px solid #2b4a3e; color: #cfe0d6; font-size: 10.5px; line-height: 1.45; pointer-events: none; opacity: 0; transition: opacity .3s, left .5s, top .5s; }
.hero-tip.on { opacity: 1; }
.hero-tip b { display: block; color: #fff; font-size: 11px; }
.hero-tip span { display: block; }
.hero-tip .mono { color: #b8f36b; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 10px; }

.mn.mn-top { justify-content: flex-start; gap: 7px; }
.mn-counts { display: flex; gap: 5px; min-height: 20px; }
.mn-counts span { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 5px; animation: hd-in .3s ease both; }
.mn-counts .add { background: #eef7e9; color: #2f6b22; } .mn-counts .mod { background: #fbf3e2; color: #8a5a12; } .mn-counts .rem { background: #fbecec; color: #a32d2d; }
.mn .df-line { font-size: 11px; padding: 4px 7px; }
.mn-q { min-height: 26px; padding: 5px 9px; border: 1px solid #c9d6cb; border-radius: 7px; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px; color: #172521; }
.mn-t small { display: block; font-size: 10px; color: #7a877e; font-weight: 400; }
.mn-t em { font-style: normal; color: #a35a12; font-size: 10.5px; }
.mn-bars { display: flex; flex-direction: column; gap: 8px; }
.mn-bars div { display: grid; grid-template-columns: 78px 1fr auto; align-items: center; gap: 8px; font-size: 11.5px; }
.mn-bars span { color: #3a4842; }
.mn-bars i { display: block; height: 12px; width: 0; border-radius: 3px; background: #7fae5a; transition: width .7s ease; }
.mn-bars b { font-variant-numeric: tabular-nums; }
.mn-bars small { grid-column: 2 / 4; margin-top: -6px; font-size: 10px; color: #7a877e; }

.hd-still, .hd-still * { animation: none !important; }
