/* Smart Hierarchy Generator modal + demo additions on the production client page.
   Class names are prefixed (gm-, demo-) so they never collide with the portal's app.css. */
.gm-backdrop { position: fixed; inset: 0; background: rgba(50, 38, 44, .45); display: grid; place-items: center; z-index: 2000; padding: 16px; font-family: Mulish, sans-serif; }
.gm-backdrop[hidden] { display: none; }
.gm { background: #fff; width: min(880px, 100%); border-radius: 1.25rem; padding: 28px 32px; position: relative; max-height: 94vh; overflow: auto; color: #32262c; }
.gm .ic { width: 20px; height: 20px; flex: none; }
.gm .ic.sm { width: 16px; height: 16px; }
.gm-x { position: absolute; right: 24px; top: 24px; background: none; border: 0; color: #32262c; cursor: pointer; }
.gm-x .ic { width: 26px; height: 26px; }
.gm-head { display: flex; gap: 18px; align-items: center; margin-bottom: 8px; }
.gm-round { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; background: #fef2ea; color: #e96624; flex: none; }
.gm-round .ic { width: 30px; height: 30px; }
.gm-head h2 { margin: 0; font-size: 28px; font-weight: 600; color: #32262c; }
.gm-head p { margin: 2px 0 0; font-size: 17px; color: #4a3a44; }
.gm-q { display: block; font-weight: 700; color: #32262c; margin: 26px 0 10px; font-size: 16px; }
.gm-field { width: 100%; font: inherit; font-size: 17px; padding: 13px 16px; border: 1px solid #f4ebe5; border-radius: 6px; outline: none; color: #32262c; background: #fff; }
.gm-field:focus { border-color: #a17694; }
.gm-field::placeholder { color: #a39aa0; }
.gm-row { display: flex; gap: 10px; }
.gm-btn { border-radius: 6px; padding: 0 22px; font: inherit; font-weight: 700; font-size: 18px; display: inline-flex; align-items: center; gap: 8px; border: 0; background: #621b4d; color: #fff; cursor: pointer; }
.gm-btn:disabled { background: #d0bbca; cursor: default; }
.gm-combo { position: relative; }
.gm-combo-x { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #2f5fa8; cursor: pointer; }
.gm-combo-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border-radius: 10px; box-shadow: 0 10px 30px rgba(40,0,30,.18); padding: 10px 0; z-index: 10; max-height: 340px; overflow-y: auto; }
.gm-combo-list .hint { color: #8f8189; padding: 4px 20px 8px; font-size: 15px; }
.gm-combo-list button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 12px 40px; font: inherit; font-size: 19px; color: #32262c; cursor: pointer; }
.gm-combo-list button small { font-size: 14px; color: #6b5d68; margin-left: 4px; }
.gm-combo-list button:hover { background: #f7f4f6; }
.gm-trigs { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.gm-trig { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 20px; border: 1px solid #f4ebe5; border-radius: 8px; font-size: 17px; }
.gm-trig b { flex: 1; font-weight: 400; }
.gm-del { background: none; border: 0; color: #6b5d68; cursor: pointer; }
.gm-int { position: relative; }
.gm-int > button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: #f3eff0; border-radius: 20px; padding: 8px 16px; color: #32262c; font: inherit; font-size: 16px; cursor: pointer; }
.gm-int > button .warn-ic { color: #c0405a; display: inline-flex; }
.gm-int i, .gm-int-menu i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.gm-int-menu { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border-radius: 10px; box-shadow: 0 10px 30px rgba(40,0,30,.18); padding: 6px 0; z-index: 12; min-width: 210px; }
.gm-int-menu button { display: flex; align-items: center; gap: 14px; width: 100%; border: 0; background: none; padding: 12px 22px; font: inherit; font-size: 17px; color: #32262c; text-align: left; cursor: pointer; }
.gm-int-menu button:hover { background: #f7f4f6; }
.gm-scale { display: grid; grid-template-columns: repeat(10, 1fr); border: 1px solid #f4ebe5; border-radius: 8px; overflow: hidden; }
.gm-scale button { border: 0; border-right: 1px solid #f4ebe5; background: #fff; padding: 18px 0; font: inherit; font-size: 18px; color: #32262c; cursor: pointer; }
.gm-scale button:last-child { border-right: 0; }
.gm-scale button.on { background: #621b4d; color: #fff; }
.gm-scale-l { display: flex; justify-content: space-between; color: #8f8189; font-size: 14px; margin-top: 6px; }
.gm-foot { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin-top: 28px; }
.gm-foot .gm-btn { padding: 12px 22px; }
.gm-status { color: #6b5d68; font-size: 15px; }
.gm-spin { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: gmspin .8s linear infinite; }
@keyframes gmspin { to { transform: rotate(360deg); } }

/* hierarchy cards on the client page */
.demo-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.demo-card { cursor: pointer; text-decoration: none; color: inherit; }
.demo-card .media { height: 170px; border-radius: .5rem; overflow: hidden; position: relative; background: #efe8ed; }
.demo-card .media img, .demo-card .media svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.demo-card .spark { position: absolute; left: 10px; top: 10px; width: 34px; height: 34px; border-radius: 50%; background: #e96624; color: #fff; display: grid; place-items: center; }
.demo-card .spark .ic { width: 18px; height: 18px; }
.demo-card b { display: block; margin-top: 10px; font-size: 1.05rem; color: #32262c; }
.demo-card .meta { color: #6b5d68; font-size: .95rem; margin: 2px 0 6px; }
.demo-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #e96624; background: #fef2ea; padding: 3px 10px; border-radius: 14px; }
.demo-badge .ic { width: 12px; height: 12px; }
